:root {
  --tile: #ffffff;
  --grout: #d5d9dd;
  --grout-dark: #b9bfc5;
  --ink: #17202b;
  --ink-soft: #4a5562;
  --level: #f2c230;
  --level-deep: #d9a514;
  --pool: #e8f0f2;
  --warn: #b3261e;
  --measure: 40rem;
  --display: "Archivo", "Arial Narrow", sans-serif;
  --text: "Literata", Georgia, serif;
  --code: "JetBrains Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--tile);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.18em; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

/* ---------- typography ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 8vw, 4.6rem); }
h2 { font-size: clamp(2rem, 6vw, 3.4rem); margin-bottom: 1.4rem; }
h3 { font-size: 1.45rem; font-stretch: 85%; font-weight: 750; line-height: 1.15; margin-bottom: 0.4rem; }

p { margin: 0 0 1.1em; }
.lead { font-size: 1.3rem; line-height: 1.55; }
strong { font-weight: 650; }

/* ---------- layout ---------- */
.wrap { width: min(100% - 2rem, var(--measure)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2rem, 68rem); margin-inline: auto; }
section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
section + section { border-top: 1px solid var(--grout); }

/* ---------- top bar ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 600;
  font-size: 0.98rem;
  text-align: center;
  padding: 0.6rem 1rem;
}
.topbar a { color: var(--level); }

/* ---------- hero: the tile wall ---------- */
.hero { position: relative; padding: 0; border: 0; overflow: hidden; }
.wall {
  --t: clamp(52px, 9vw, 96px);
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, var(--t));
  grid-auto-rows: var(--t);
  gap: 4px;
  background: var(--grout);
  padding: 4px;
  align-content: start;
  overflow: hidden;
}
.wall span {
  background: var(--tile);
  font-family: var(--code);
  font-size: 0.62rem;
  line-height: 1.3;
  color: var(--ink-soft);
  padding: 6px;
  overflow: hidden;
  white-space: pre;
  box-shadow: inset 0 -2px 0 rgba(23, 32, 43, 0.04);
}
.wall span.code { color: #3b5a6b; }
.wall span.code.dim { color: #a7b3bb; }
.hero-inner {
  position: relative;
  /* odsłoń przynajmniej trzy rzędy płytek z kodem nad kartą */
  padding-block: calc(3 * (clamp(52px, 9vw, 96px) + 4px) + 4px) clamp(2rem, 6vw, 5rem);
}
.hero-card {
  background: var(--tile);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  box-shadow: 0 0 0 4px var(--grout), 0 0 0 5px var(--grout-dark);
  max-width: 46rem;
}
.hero-card h1 { margin-bottom: 1.1rem; }
.hero-card .sub { font-size: clamp(1.05rem, 2.6vw, 1.2rem); color: var(--ink-soft); margin-bottom: 1.4rem; }
.hero-bullets { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.hero-bullets li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.55rem;
}
.hero-bullets li::before {
  content: "";
  position: absolute; left: 0; top: 0.5em;
  width: 0.7rem; height: 0.7rem;
  background: var(--level);
  box-shadow: 0 0 0 2px var(--ink);
}

/* ---------- buttons ---------- */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-block;
  background: var(--level);
  color: var(--ink);
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  padding: 1rem 1.6rem;
  border-radius: 3px;
  box-shadow: 0 4px 0 var(--level-deep), 0 0 0 2px var(--ink);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { background: #f5cc4a; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--level-deep), 0 0 0 2px var(--ink); }
.btn-block { display: block; width: 100%; }
.micro { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.8rem; }

.cta-row { margin-top: 2rem; }

/* ---------- quotes (voices from the internet) ---------- */
.voices { display: grid; gap: 1rem; margin: 1.8rem 0; }
.voice {
  margin: 0;
  background: var(--pool);
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--ink);
}
.voice p { margin: 0 0 0.35rem; font-size: 1.02rem; }
.voice cite { font-style: normal; font-family: var(--display); font-stretch: 85%; font-size: 0.85rem; color: var(--ink-soft); }
.voice cite a { color: var(--ink-soft); }
.voices-note { font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- program (a real sequence, so numbered) ---------- */
.modules { list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: m; }
.modules li {
  counter-increment: m;
  display: grid;
  grid-template-columns: 3.4rem 1fr;
  gap: 0 1rem;
  padding: 1.3rem 0;
  border-top: 1px solid var(--grout);
}
.modules li::before {
  content: counter(m);
  font-family: var(--display);
  font-stretch: 75%;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
  width: 3.4rem; height: 3.4rem;
  display: grid; place-items: center;
  background: var(--tile);
  box-shadow: 0 0 0 3px var(--grout), inset 0 0 0 1px var(--grout-dark);
}
.modules .effect { font-size: 0.98rem; color: var(--ink-soft); margin: 0.3rem 0 0; }
.modules .effect b { font-family: var(--display); font-stretch: 85%; color: var(--ink); }

/* ---------- how it works ---------- */
.how { display: grid; gap: 1.4rem; margin-top: 1.6rem; }
.how > div { padding-left: 1rem; border-left: 4px solid var(--grout); }
.how h3 { font-size: 1.25rem; }
.how p { margin: 0; font-size: 1.04rem; }
.included { display: grid; gap: 1rem; margin-top: 1.6rem; }
.included > div { background: var(--pool); padding: 1rem 1.2rem; }
.included h3 { font-size: 1.1rem; }
.included ul { margin: 0; padding-left: 1.1rem; font-size: 1rem; }

/* ---------- price ---------- */
.stack { width: 100%; border-collapse: collapse; margin: 1.4rem 0; font-size: 1rem; }
.stack td { padding: 0.6rem 0; border-bottom: 1px solid var(--grout); vertical-align: top; }
.stack td:last-child { text-align: right; white-space: nowrap; padding-left: 1rem; font-family: var(--display); font-stretch: 85%; font-weight: 650; }
.stack tr.total td { border-bottom: 0; font-weight: 700; padding-top: 0.9rem; }
.stack s, .pkg s { color: var(--ink-soft); text-decoration-thickness: 2px; }

.packages { display: grid; gap: 1.2rem; margin-top: 2rem; }
.pkg {
  background: var(--tile);
  padding: 1.5rem;
  box-shadow: 0 0 0 4px var(--grout);
  display: flex; flex-direction: column;
}
.pkg.main { box-shadow: 0 0 0 4px var(--ink); }
.pkg h3 { font-size: 1.6rem; }
.pkg .for { color: var(--ink-soft); font-size: 1rem; margin-bottom: 1rem; }
.pkg ul { padding-left: 1.1rem; margin: 0 0 1.2rem; font-size: 1rem; }
.pkg ul li.no { color: var(--ink-soft); }
.pkg .value { font-size: 0.95rem; color: var(--ink-soft); margin: auto 0 0.2rem; }
.pkg .price { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 3rem; line-height: 1; margin: 0.2rem 0; }
.pkg .raty { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
.badge {
  align-self: flex-start;
  font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 0.85rem;
  background: var(--ink); color: #fff; padding: 0.2rem 0.6rem; margin-bottom: 0.8rem;
}

.dayrate {
  margin-top: 2.4rem;
  background: var(--ink);
  color: #fff;
  padding: clamp(1.4rem, 4vw, 2.2rem);
}
.dayrate .big { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1.05; margin-bottom: 0.8rem; color: var(--level); }
.dayrate p { font-size: 1.05rem; }
.dayrate .source { font-size: 0.85rem; opacity: 0.75; margin: 0; }
.dayrate a { color: #fff; }

/* ---------- guarantee ---------- */
.guarantee {
  background: var(--pool);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: 0 0 0 4px var(--grout);
}
.guarantee ol { padding-left: 1.3rem; }
.guarantee li { margin-bottom: 0.5rem; }

/* ---------- for / not for ---------- */
.fit { display: grid; gap: 1.4rem; }
.fit > div { padding: 1.3rem; box-shadow: 0 0 0 3px var(--grout); }
.fit h3 { margin-bottom: 0.8rem; }
.fit ul { list-style: none; padding: 0; margin: 0; }
.fit li { position: relative; padding-left: 1.7rem; margin-bottom: 0.6rem; font-size: 1.02rem; }
.fit li::before { position: absolute; left: 0; top: 0; font-family: var(--display); font-weight: 800; }
.fit .not li::before { content: "✕"; color: var(--warn); }
.fit .yes li::before { content: "✓"; color: #1f6b3a; }

/* ---------- faq ---------- */
.faq details { border-top: 1px solid var(--grout); }
.faq details:last-of-type { border-bottom: 1px solid var(--grout); }
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-stretch: 85%;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.25;
  padding: 1.1rem 2.2rem 1.1rem 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 0.2rem; top: 0.9rem;
  font-size: 1.6rem; font-weight: 600;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { font-size: 1.04rem; padding-bottom: 0.4rem; }

/* ---------- final + ps ---------- */
.final { text-align: left; }
.ps { margin-top: 2.4rem; font-size: 1.04rem; }
.ps p { margin-bottom: 0.8rem; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--grout); padding: 2.4rem 0 7rem; font-size: 0.9rem; color: var(--ink-soft); }
footer p { margin-bottom: 0.5rem; }

/* ---------- sticky mobile cta ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--grout-dark);
  transform: translateY(110%);
  transition: transform 0.2s ease;
  z-index: 20;
}
.sticky-cta.show { transform: none; }
@media (prefers-reduced-motion: reduce) { .sticky-cta { transition: none; } }

/* ---------- dialog / form ---------- */
dialog {
  border: 0;
  padding: 0;
  width: min(100% - 1.5rem, 32rem);
  max-height: calc(100dvh - 1.5rem);
  box-shadow: 0 0 0 4px var(--grout), 0 24px 60px rgba(23, 32, 43, 0.3);
  color: var(--ink);
}
dialog::backdrop { background: rgba(23, 32, 43, 0.55); }
.dlg { padding: 1.6rem; position: relative; }
.dlg h2 { font-size: 2rem; margin-bottom: 0.6rem; padding-right: 2rem; }
.dlg .intro { font-size: 1rem; color: var(--ink-soft); }
.close {
  position: absolute; top: 0.8rem; right: 0.8rem;
  width: 2.4rem; height: 2.4rem;
  border: 0; background: transparent; cursor: pointer;
  font-size: 1.6rem; line-height: 1; color: var(--ink);
}
.field { margin-bottom: 1rem; }
.field > label, fieldset legend {
  display: block;
  font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 1rem;
  margin-bottom: 0.35rem;
}
.field input[type="text"], .field input[type="email"] {
  width: 100%;
  font: inherit; font-size: 1.05rem;
  padding: 0.75rem 0.8rem;
  border: 2px solid var(--grout-dark);
  border-radius: 3px;
  background: #fff;
}
.field input:focus { border-color: var(--ink); outline: none; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.45rem 0; font-size: 1rem; line-height: 1.35; cursor: pointer; }
.choice input { width: 1.15rem; height: 1.15rem; margin-top: 0.12rem; accent-color: var(--ink); flex: none; }
.consent { font-size: 0.88rem; color: var(--ink-soft); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--warn); font-size: 0.95rem; min-height: 1.2em; margin: 0.4rem 0 0.8rem; }
.step { display: none; }
.dlg[data-step="soldout"] .step-soldout,
.dlg[data-step="reason"] .step-reason,
.dlg[data-step="done"] .step-done { display: block; }
.soldout-stamp {
  display: inline-block;
  font-family: var(--display); font-stretch: 85%; font-weight: 800; font-size: 0.95rem;
  color: var(--warn); border: 3px solid var(--warn); padding: 0.15rem 0.6rem;
  transform: rotate(-3deg); margin-bottom: 0.9rem;
}
.reasons { display: grid; gap: 0.6rem; margin: 1rem 0; }
.reasons button {
  font: inherit; font-size: 1rem; text-align: left; cursor: pointer;
  background: #fff; border: 2px solid var(--grout-dark); border-radius: 3px; padding: 0.8rem 1rem;
}
.reasons button:hover { border-color: var(--ink); }
.skip { background: none; border: 0; padding: 0; font: inherit; font-size: 0.92rem; color: var(--ink-soft); text-decoration: underline; cursor: pointer; }

/* pasek z twardymi liczbami pod hero */
.proof { background: var(--ink); color: #fff; padding-block: 1.6rem; border: 0; }
.proof .wrap-wide { display: grid; gap: 1.2rem; }
.proof .fact b { display: block; font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1; color: var(--level); margin-bottom: 0.3rem; }
.proof .fact span { font-size: 1rem; line-height: 1.4; display: block; }
.proof .fact small { display: block; font-size: 0.78rem; opacity: 0.7; margin-top: 0.3rem; }
@media (min-width: 760px) { .proof .wrap-wide { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }

.cta-under { font-size: 0.95rem; margin-top: 0.8rem; color: var(--ink-soft); }
.cta-under b { color: var(--ink); }

/* ---------- wider screens ---------- */
@media (min-width: 760px) {
  .voices.two { grid-template-columns: 1fr 1fr; }
  .packages { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .fit { grid-template-columns: 1fr 1fr; }
  .included { grid-template-columns: 1fr 1fr; }
  .sticky-cta { display: none; }
  footer { padding-bottom: 3rem; }
}

/* Na telefonie przycisk w hero ma być wcześniej: dwa ostatnie punkty tylko od tabletu w górę. */


/* Na komputerze karta wyżej, żeby przycisk zmieścił się na pierwszym ekranie. */
@media (min-width: 760px) {
  .hero-inner { padding-block: calc(clamp(52px, 9vw, 96px) + 8px) clamp(2rem, 5vw, 4rem); }
  .hero-card h1 { font-size: clamp(2.6rem, 4.6vw, 4.2rem); }
}
