/* Rolkify: landing z listą oczekujących
   Motyw: ciemny fiolet jak tło montażowni, jeden akcent: żółty jak klasyczne napisy w filmie. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-pl.woff2") format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #17132a;       /* tło */
  --ink-2: #211c3a;     /* powierzchnie */
  --ink-3: #352e57;     /* linie i obrysy */
  --paper: #f6f4ff;     /* tekst */
  --mute: #b4acd2;      /* tekst drugorzędny */
  --hint: #918aaf;      /* placeholdery */
  --sub: #ffd43b;       /* akcent: żółty jak napisy */
  --sub-hi: #ffe073;
  --sub-ink: #1b1500;   /* tekst na żółtym */
  --err: #ff9c8f;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 20px;
  --band: clamp(72px, 12vw, 136px);

  color-scheme: dark;
}

*, *::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(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--sub); }

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

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--sub); color: var(--sub-ink); padding: 10px 14px; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), 1160px); margin-inline: auto; }

/* ---------- Typografia ---------- */

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  font-stretch: 68%;
  line-height: .95;
  letter-spacing: -.005em;
  text-wrap: balance;
}
h2 { font-size: clamp(2.5rem, 10vw, 4.75rem); }
h3 { font-size: clamp(1.4rem, 5vw, 1.75rem); font-stretch: 76%; line-height: 1.05; }

.lead {
  font-size: clamp(1.125rem, 3.8vw, 1.375rem);
  line-height: 1.5;
  color: var(--mute);
  max-width: 40ch;
}

.band { padding-block: var(--band) 0; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 7vw, 64px); }

/* ---------- Nagłówek strony ---------- */

.top { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-weight: 800; font-stretch: 72%; font-size: 1.6rem; line-height: 1;
}
.brand-mark { width: 18px; height: 27px; }

.top-cta {
  font-weight: 700; font-size: .95rem; text-decoration: none;
  padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--ink-3);
}
.top-cta:hover { border-color: var(--sub); }

/* ---------- 1. Hero ---------- */

.hero { padding-top: clamp(28px, 7vw, 72px); }

.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .95rem; color: var(--mute);
  margin-bottom: clamp(18px, 4vw, 28px);
}
.status::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--sub); box-shadow: 0 0 0 4px rgb(255 212 59 / .18);
}

.hero-title {
  font-size: clamp(3.1rem, 13.2vw, 7rem);
  font-weight: 850;
  font-stretch: 64%;
  line-height: .9;
  letter-spacing: -.01em;
  text-wrap: initial;
}
.hero-title .line { display: block; }

/* Napis „słowo po słowie”: żółte podświetlenie przechodzi przez nagłówek raz, po wczytaniu. */
.hero-title .w {
  display: inline-block;
  padding: 0 .07em;
  margin: 0 -.07em;
  border-radius: .1em;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-title .w { animation: caption-word .62s cubic-bezier(.3, .7, .4, 1) both; }
  .hero-title .line:nth-child(1) .w:nth-child(1) { animation-delay: .35s; }
  .hero-title .line:nth-child(1) .w:nth-child(2) { animation-delay: .75s; }
  .hero-title .line:nth-child(2) .w:nth-child(1) { animation-delay: 1.15s; }
  .hero-title .line:nth-child(2) .w:nth-child(2) { animation-delay: 1.55s; }
  .hero-title .line:nth-child(2) .w:nth-child(3) { animation-delay: 1.95s; }
}
@keyframes caption-word {
  0%   { background-color: transparent; color: var(--paper); }
  12%  { background-color: var(--sub); color: var(--sub-ink); }
  70%  { background-color: var(--sub); color: var(--sub-ink); }
  100% { background-color: transparent; color: var(--paper); }
}

.hero-grid {
  display: grid; gap: 28px;
  margin-top: clamp(22px, 5vw, 40px);
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 56px; align-items: start; }
  .hero-lead { padding-top: 8px; }
}

/* ---------- Formularz ---------- */

.signup-box {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  border-radius: 22px;
  padding: clamp(16px, 4vw, 24px);
  scroll-margin-top: 24px;
}

.signup { display: grid; gap: 12px; }
.field-row { display: grid; gap: 12px; }

.signup input[type="email"],
.signup input[type="text"],
.signup select {
  width: 100%;
  min-height: 54px;
  padding: 14px 15px;
  font: inherit;
  font-size: 1.0625rem; /* ≥16px: iOS nie przybliża strony przy kliknięciu */
  color: var(--paper);
  background-color: var(--ink);
  border: 1.5px solid var(--ink-3);
  border-radius: 12px;
  transition: border-color .15s, box-shadow .15s;
}
.signup input::placeholder { color: var(--hint); opacity: 1; }
.signup select {
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b4acd2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  cursor: pointer;
}
.signup select:has(option[value=""]:checked) { color: var(--hint); }
.signup select option { color: var(--paper); background: var(--ink); }

.signup input:focus,
.signup select:focus {
  outline: none;
  border-color: var(--sub);
  box-shadow: 0 0 0 3px rgb(255 212 59 / .3);
}
.signup [aria-invalid="true"] { border-color: var(--err); }

.consent {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start;
  font-size: .9rem; line-height: 1.45; color: var(--mute);
  cursor: pointer;
  padding-block: 4px;
}
.consent input {
  appearance: none; margin: 0;
  width: 24px; height: 24px;
  border: 1.5px solid var(--mute); border-radius: 7px;
  background: var(--ink) no-repeat center / 16px;
  cursor: pointer;
}
.consent input:checked {
  background-color: var(--sub); border-color: var(--sub);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1500' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.consent input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px rgb(255 156 143 / .25); }
.consent a { color: var(--paper); }

.btn {
  min-height: 58px; width: 100%;
  padding: 0 22px;
  font: inherit; font-weight: 800; font-stretch: 78%; font-size: 1.3rem; letter-spacing: .005em;
  color: var(--sub-ink); background: var(--sub);
  border: 0; border-radius: 12px;
  cursor: pointer;
  transition: background-color .15s, transform .1s;
}
.btn:hover { background: var(--sub-hi); }
.btn:active { transform: scale(.99); }
.btn:disabled { cursor: progress; opacity: .75; }

.form-msg:empty { display: none; }
.form-msg { font-size: .95rem; }
.form-msg.is-error { color: var(--err); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.signup-note { margin-top: 14px; font-weight: 700; }

.signup-done { display: none; grid-template-columns: 28px 1fr; gap: 14px; align-items: start; font-size: 1.125rem; line-height: 1.45; }
.signup-done svg { width: 28px; height: 28px; margin-top: 1px; }
.signup-done:focus { outline: none; }
.signup-box.is-done .signup,
.signup-box.is-done .signup-note { display: none; }
.signup-box.is-done .signup-done { display: grid; }

/* ---------- Napisy (wspólny styl „jak w rolce”) ---------- */

.cap {
  font-weight: 850; font-stretch: 74%;
  line-height: 1.15;
  color: #fff;
}
.cap .on {
  background: var(--sub); color: var(--sub-ink);
  border-radius: 5px; padding: 0 4px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

/* ---------- 2. Przed / Po ---------- */

.compare-layout { display: grid; gap: 0; }
@media (min-width: 900px) {
  .compare-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: 56px; align-items: center; }
  .compare-layout .section-head { margin-bottom: 0; }
}

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 3vw, 20px); }

.clip { margin: 0; display: grid; gap: 10px; }
.clip figcaption { display: grid; font-size: .95rem; line-height: 1.3; color: var(--mute); }
.clip figcaption strong { color: var(--paper); font-weight: 800; font-stretch: 74%; font-size: 1.35rem; }

.frame {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: clamp(16px, 4vw, 24px);
  overflow: hidden;
  border: 1px solid var(--ink-3);
  background: linear-gradient(180deg, #2a2447 0%, #1e1936 100%);
}
.frame video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .3s;
}
.frame.has-video video { opacity: 1; }
.frame.has-video .ph { display: none; }

.ph {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: auto 1fr auto auto;
  padding: clamp(8px, 2.5vw, 14px);
}
.ph-tag {
  justify-self: start;
  font-size: .72rem; line-height: 1; color: var(--mute);
  padding: 6px 9px; border-radius: 999px;
  background: rgb(23 19 42 / .7); border: 1px solid var(--ink-3);
}
.ph-person {
  align-self: end; justify-self: center;
  width: 82%; fill: #3b3462;
}
.frame-done .ph-person { width: 100%; fill: #443c70; } /* „zoom” po montażu */
.frame-raw .ph-person { opacity: .8; }

.ph-cap {
  text-align: center;
  font-size: clamp(.95rem, 3.9vw, 1.2rem);
  margin: -32% 4px 12px;
  position: relative;
  text-shadow: 0 2px 10px rgb(0 0 0 / .35);
  min-height: 2.3em;
  display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-end; column-gap: .25em;
}

/* Oś czasu: przed montażem z dziurami i powtórką, po montażu zwarta. */
.tl {
  display: flex; gap: 3px; height: 10px; margin-top: 10px;
}
.tl i { display: block; border-radius: 3px; background: var(--mute); }
.tl .w1 { flex: 1; } .tl .w2 { flex: 2; } .tl .w3 { flex: 3; }
.tl .g { background: none; border: 1.5px dashed #6b6491; }
.tl .r { background: repeating-linear-gradient(135deg, #6b6491 0 3px, transparent 3px 6px); }
.tl-tight i { background: var(--sub); }

.frame-btn {
  position: absolute; right: 10px; bottom: 10px;
  font: inherit; font-size: .8rem; font-weight: 700;
  color: var(--paper); background: rgb(23 19 42 / .75);
  border: 1px solid var(--ink-3); border-radius: 999px;
  padding: 7px 11px; cursor: pointer;
}

/* ---------- 3. Jak to działa ---------- */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 34px;
}
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; align-content: start; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--mute); max-width: 34ch; }
.step .num { color: var(--sub); margin-right: .35em; }

.step-icon {
  position: relative; z-index: 1;
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--ink-2); border: 1.5px solid var(--ink-3);
  color: var(--sub);
}
.step-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Łącznik między krokami: pionowy na telefonie, poziomy na szerokim ekranie. */
.step:not(:last-child)::after {
  content: ""; position: absolute;
  left: 27px; top: 62px; bottom: -28px;
  border-left: 2px dashed var(--ink-3);
}
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .step { grid-template-columns: 1fr; gap: 22px; }
  .step:not(:last-child)::after {
    left: 68px; right: -28px; top: 27px; bottom: auto;
    border-left: 0; border-top: 2px dashed var(--ink-3);
  }
}

/* ---------- 4. Dlaczego Rolkify ---------- */

.why-feature {
  display: grid; gap: 28px;
  padding: clamp(22px, 5vw, 44px);
  border-radius: 24px;
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
}
.why-feature h3 { font-size: clamp(1.9rem, 7vw, 2.75rem); font-stretch: 68%; line-height: .98; margin-bottom: 14px; }
.why-feature-copy p { color: var(--mute); max-width: 40ch; font-size: 1.125rem; }
@media (min-width: 860px) {
  .why-feature { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
}

.why-demo { display: grid; gap: 14px; }
.demo-row {
  display: grid; gap: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--ink);
  border: 1px solid var(--ink-3);
}
.demo-label { font-size: .85rem; color: var(--mute); }
.why-demo .cap { font-size: clamp(1.3rem, 5vw, 1.65rem); }
.cap-bad { color: #8c85ab; }

.why-grid { display: grid; gap: 30px; margin-top: clamp(36px, 6vw, 56px); }
.why-item { border-top: 2px solid var(--ink-3); padding-top: 20px; }
.why-item h3 { margin-bottom: 10px; }
.why-item p { color: var(--mute); max-width: 38ch; }
@media (min-width: 860px) { .why-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; } }

/* ---------- 5. Dla kogo ---------- */

.who-grid { display: grid; gap: 14px; }
@media (min-width: 760px) { .who-grid { grid-template-columns: 1fr 1fr; gap: 18px; } }

.who {
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px;
  padding: clamp(20px, 4vw, 30px);
  border-radius: 20px;
  border: 1px solid var(--ink-3);
}
.who > p:not(.cap) { color: var(--mute); max-width: 44ch; }
.cap-chip {
  justify-self: start;
  margin-top: 10px;
  font-size: 1.05rem;
  padding: 9px 13px;
  border-radius: 10px;
  background: #0f0c1d;
}

/* ---------- 6. Wczesny dostęp ---------- */

.offer {
  display: grid; gap: 28px;
  padding: clamp(24px, 6vw, 64px);
  border-radius: 28px;
  background: var(--sub);
  color: var(--sub-ink);
}
.offer h2 { font-size: clamp(2.4rem, 9.5vw, 4.5rem); }
.offer-copy { display: grid; gap: 14px; align-content: start; }
.offer-copy p { font-size: clamp(1.125rem, 3.8vw, 1.3rem); max-width: 34ch; }
.offer-copy h2 + p { margin-top: 8px; }
@media (min-width: 900px) {
  .offer { grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 56px; align-items: start; }
}

.signup-box-light { background: #fff4c4; border-color: rgb(27 21 0 / .15); color: var(--sub-ink); }
.signup-box-light .signup input[type="email"],
.signup-box-light .signup input[type="text"],
.signup-box-light .signup select {
  color: var(--sub-ink); background-color: #fffdf3; border-color: rgb(27 21 0 / .3);
}
.signup-box-light .signup input::placeholder { color: #6e6234; }
.signup-box-light .signup select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1500' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.signup-box-light .signup select:has(option[value=""]:checked) { color: #6e6234; }
.signup-box-light .signup select option { color: var(--sub-ink); background: #fffdf3; }
.signup-box-light .signup input:focus,
.signup-box-light .signup select:focus { border-color: var(--sub-ink); box-shadow: 0 0 0 3px rgb(27 21 0 / .2); }
.signup-box-light .signup [aria-invalid="true"] { border-color: #b3261e; }
.signup-box-light .consent { color: #3d3412; }
.signup-box-light .consent a { color: var(--sub-ink); }
.signup-box-light .consent input { border-color: #3d3412; background-color: #fffdf3; }
.signup-box-light .consent input:checked {
  background-color: var(--sub-ink); border-color: var(--sub-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffd43b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.signup-box-light .consent input[aria-invalid="true"] { border-color: #b3261e; box-shadow: 0 0 0 3px rgb(179 38 30 / .2); }
.signup-box-light .btn { background: var(--ink); color: var(--sub); }
.signup-box-light .btn:hover { background: #241e40; }
.signup-box-light .form-msg.is-error { color: #a1211a; }
.offer :focus-visible { outline-color: var(--ink); }

/* ---------- 7. FAQ ---------- */

.faq > * { max-width: 860px; }
.faq details { border-top: 1px solid var(--ink-3); }
.faq details:last-of-type { border-bottom: 1px solid var(--ink-3); }
.faq summary {
  position: relative;
  list-style: none; cursor: pointer;
  padding: 22px 48px 22px 0;
  font-weight: 800; font-stretch: 76%;
  font-size: clamp(1.3rem, 4.6vw, 1.6rem); line-height: 1.15;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%;
  width: 20px; height: 20px; margin-top: -10px;
  background:
    linear-gradient(var(--sub), var(--sub)) center / 100% 2.5px no-repeat,
    linear-gradient(var(--sub), var(--sub)) center / 2.5px 100% no-repeat;
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 24px; color: var(--mute); max-width: 62ch; font-size: 1.1rem; }

/* ---------- 8. Stopka ---------- */

.foot { margin-top: var(--band); border-top: 1px solid var(--ink-3); padding-block: 40px 48px; }
.foot-grid { display: grid; gap: 26px; font-size: .95rem; color: var(--mute); }
.foot-brand { display: grid; gap: 10px; }
.foot-brand .brand { color: var(--paper); }
.foot-info { display: grid; gap: 6px; }
.foot-copy { font-size: .85rem; }
@media (min-width: 860px) {
  .foot-grid { grid-template-columns: 1fr 1.3fr auto; align-items: start; }
}

/* ---------- Podstrony (polityka prywatności, 404) ---------- */

.doc { padding-block: clamp(24px, 6vw, 56px) 0; max-width: 760px; }
.doc h1 { font-size: clamp(2.6rem, 10vw, 4.5rem); margin-bottom: 14px; }
.doc .doc-meta { color: var(--mute); margin-bottom: 40px; }
.doc h2 { font-size: clamp(1.6rem, 6vw, 2.1rem); font-stretch: 74%; line-height: 1.1; margin: 44px 0 14px; }
.doc p, .doc li { color: #ddd8f0; max-width: 68ch; }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 1.2em; margin: 12px 0 0; display: grid; gap: 8px; }
.doc strong { color: var(--paper); }
.doc .todo { background: rgb(255 212 59 / .16); color: var(--sub); border-radius: 4px; padding: 0 4px; }

/* Strona /potwierdz: jeden stan widoczny naraz */
.confirm .state { display: none; }
.confirm[data-state="loading"] .state-loading,
.confirm[data-state="ok"] .state-ok,
.confirm[data-state="link"] .state-link,
.confirm[data-state="unsubscribed"] .state-unsubscribed,
.confirm[data-state="error"] .state-error { display: block; }
.confirm .doc-meta { margin-bottom: 24px; max-width: 46ch; }
