/* Odliczanie i lista powiadomień. Zwykły CSS, bez builda; tokeny i komponenty opisuje README w repozytorium. */

/* Fonty z @fontsource (podzbiór latin, licencja OFL 1.1). */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Inter Tight Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-tight-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Inter Tight Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-tight-latin-wght-italic.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'JetBrains Mono Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(../fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(../fonts/caveat-latin-700-normal.woff2) format('woff2');
}

:root {
  /* Tło i powierzchnie */
  --color-night: #0a0a0a;
  --color-ink-850: #111111;
  --color-ink-800: #141414;
  --color-ink-750: #171717;
  --color-ink-700: #1a1a1a;
  --color-ember: #1a1410;

  /* Tekst */
  --color-cream: #f7efe5;
  --color-sand-200: #e9e2d8;
  --color-sand-300: #cfc8be;
  --color-sand-400: #b8b2aa;
  --color-sand-500: #8f8a83;
  --color-sand-700: #6f6a64;

  /* Akcent */
  --color-gold: #d8a95b;
  --color-gold-light: #e7c98f;
  --color-danger: #ff6b5e;

  /* Papier */
  --color-paper: #f4ede2;
  --color-paper-edge: #d9cdb8;
  --color-bronze: #80602c;
  --color-pen: #2b4a8a;

  /* Flagi przy prefiksie telefonu */
  --color-flag-blue: #1f3a7a;
  --color-flag-red: #c8102e;
  --color-flag-gr-blue: #0d5eaf;

  --font-sans: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Inter Tight Variable', 'Inter Variable', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono Variable', ui-monospace, monospace;
  --font-hand: 'Caveat', cursive;

  --ease-soft: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Krem i złoto w przezroczystościach (obrysy, separatory, poświaty). */
  --cream-8: color-mix(in oklab, var(--color-cream) 8%, transparent);
  --cream-10: color-mix(in oklab, var(--color-cream) 10%, transparent);
  --cream-12: color-mix(in oklab, var(--color-cream) 12%, transparent);
  --cream-14: color-mix(in oklab, var(--color-cream) 14%, transparent);
  --cream-30: color-mix(in oklab, var(--color-cream) 30%, transparent);
  --cream-40: color-mix(in oklab, var(--color-cream) 40%, transparent);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  color-scheme: dark;
  /* Pasek przewijania w kolorach planu, nie domyślny szary. */
  scrollbar-color: color-mix(in oklab, var(--color-cream) 22%, transparent) var(--color-night);
  background: var(--color-night);
  color: var(--color-cream);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  margin: 0;
}

main {
  flex: 1;
}

:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* Zaznaczenie i kursor tekstowy też są ze świata: złote światło, nie systemowy niebieski. */
::selection {
  background: color-mix(in oklab, var(--color-gold) 85%, transparent);
  color: var(--color-night);
}
input {
  caret-color: var(--color-gold);
}

a {
  color: var(--color-cream);
  text-decoration: none;
}
a:hover {
  color: var(--color-gold);
}

p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-bold {
  stroke-width: 2.6;
}
.icon-thin {
  stroke-width: 1.6;
}

/* Stan strony: przed startem odliczanie i formularz, po starcie link do tego, co pod pokrowcem. */
html[data-phase='soon'] [data-phase-show='live'],
html[data-phase='live'] [data-phase-show='soon'] {
  display: none !important;
}

/* ───── Wspólne elementy ───── */

.wrap {
  max-width: 1360px;
  margin: 0 auto;
}

.display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.eyebrow {
  color: var(--color-gold);
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Tekst tylko z obrysem (duże cyfry i napisy w tle). */
.text-outline {
  color: transparent;
  -webkit-text-stroke: var(--outline-width, 1.5px)
    color-mix(in oklab, var(--outline-base, var(--color-cream)) var(--outline-alpha, 10%), transparent);
}

.hairline {
  height: 1px;
  background: var(--cream-14);
}

/* Główne CTA: kremowy przycisk */
.btn-cream {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--color-cream);
  box-shadow: 0 10px 30px -12px color-mix(in oklab, var(--color-cream) 45%, transparent);
  color: var(--color-night);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 120ms,
    transform 160ms var(--ease-soft),
    box-shadow 160ms;
}
.btn-cream:hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow: 0 16px 40px -12px color-mix(in oklab, var(--color-cream) 60%, transparent);
  color: var(--color-night);
}
.btn-cream:active {
  transform: scale(0.985);
}
.btn-cream:disabled {
  cursor: wait;
}

/* Drugorzędne CTA: obrys */
.btn-line {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid color-mix(in oklab, var(--color-cream) 32%, transparent);
  border-radius: 8px;
  color: var(--color-cream);
  font-weight: 500;
  white-space: nowrap;
  transition:
    background 120ms,
    border-color 120ms;
}
.btn-line:hover {
  border-color: color-mix(in oklab, var(--color-cream) 60%, transparent);
  background: color-mix(in oklab, var(--color-cream) 7%, transparent);
  color: var(--color-cream);
}

/* Wejście elementu przy pierwszym malowaniu, bez czekania na JS. */
.rise {
  animation: rise 700ms var(--ease-soft) both;
  animation-delay: var(--rise-delay, 0ms);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}
.fade-in {
  animation: fade-in 420ms var(--ease-soft) both;
}
@keyframes fade-in {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}
.pop-in {
  animation: pop-in 360ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes pop-in {
  from {
    opacity: 0;
    scale: 0.4;
  }
}

/* ───── Nagłówek ───── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--cream-10);
  background: color-mix(in oklab, var(--color-night) 85%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.header-row {
  display: flex;
  height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 12px 0 16px;
}
.logo {
  line-height: 0;
}
.logo img {
  display: block;
  width: auto;
  height: 28px;
}
.header-meta {
  display: none;
}
.header-cta {
  position: relative;
  height: 38px;
  padding: 0 14px;
  box-shadow: none;
  font-size: 13px;
  transition:
    background 120ms,
    transform 160ms var(--ease-soft),
    opacity 200ms,
    visibility 200ms;
}
/* Cel dotyku 44 px przy przycisku 38 px. */
.header-cta::after {
  content: '';
  position: absolute;
  inset: -3px 0;
}
/* Formularz jest na ekranie: drugi taki sam przycisk tylko by konkurował (app.js). */
.header-cta.is-redundant {
  visibility: hidden;
  opacity: 0;
}

/* ───── Hero ───── */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-night);
}
.hero-glow {
  display: none;
}

/* Scena: auto pod pokrowcem w świetle lampy, za nim data samym obrysem. */
.stage {
  position: relative;
  aspect-ratio: 920 / 550;
  overflow: hidden;
  container-type: inline-size;
}
.stage-light {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(50% 48% at 54% 46%, color-mix(in oklab, var(--color-gold) 32%, transparent), transparent 72%),
    radial-gradient(58% 11% at 50% 80%, color-mix(in oklab, var(--color-cream) 14%, transparent), transparent 76%);
  animation: lamp-on 1500ms linear 150ms both;
}
/* Wejście strony: lampa w garażu zapala się jak świetlówka, dwa mrugnięcia i światło. Mała amplituda, poniżej progu błysku. */
@keyframes lamp-on {
  0% {
    opacity: 0;
  }
  9% {
    opacity: 0.55;
  }
  13% {
    opacity: 0.1;
  }
  24% {
    opacity: 0.8;
  }
  29% {
    opacity: 0.3;
  }
  44%,
  100% {
    opacity: 1;
  }
}
/* Ściana garażu z płyty perforowanej: ciemne otwory widać tylko tam, gdzie pada światło lampy (w ciemności znikają).
   Kończy się nad podłogą. */
.stage-wall {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgb(0 0 0 / 55%) 1.3px, transparent 1.9px) 0 0 / 16px 16px;
  -webkit-mask: radial-gradient(70% 62% at 54% 30%, #000 30%, transparent 78%);
  mask: radial-gradient(70% 62% at 54% 30%, #000 30%, transparent 78%);
}
.stage-date {
  position: absolute;
  top: 7%;
  right: 4%;
  font-size: 21cqw;
  line-height: 0.8;
  --outline-base: var(--color-gold);
  --outline-alpha: 26%;
  --outline-width: 1px;
}
/* `.car` to kadr samego auta (proporcje z tools/car.py). Zdjęcie wystaje poza niego (przezroczysty margines, cień pod autem). */
.car {
  position: absolute;
  bottom: 15%;
  left: 50%;
  width: 97%;
  aspect-ratio: 2720 / 1088;
  translate: -50% 0;
  isolation: isolate;
  animation: car-in 1400ms var(--ease-soft) both;
}
.car img {
  position: absolute;
  top: -26.75%;
  left: -4.08%;
  display: block;
  width: 108.24%;
  max-width: none;
  height: auto;
}
/* Wymiar jak na rysunku technicznym, pod autem na podłodze: długość pokrowca, wartość zaczerniona. Tylko desktop
   (na telefonie w tym miejscu jest już tekst). */
.car-dim {
  display: none;
}
@keyframes car-in {
  from {
    opacity: 0;
    scale: 1.06;
  }
}
/* Światło na pokrowcu, przycięte kształtem auta: ciepła lampa z góry i połysk, który co kilka sekund przechodzi po materiale. */
.car-light {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask: url(../img/car-mask.webp) center / 100% 100% no-repeat;
  mask: url(../img/car-mask.webp) center / 100% 100% no-repeat;
  mix-blend-mode: screen;
  pointer-events: none;
}
.car-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in oklab, var(--color-gold) 26%, transparent) 8%, transparent 62%);
  animation: lamp-on 1500ms linear 150ms both;
}
.car-light::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 36%, color-mix(in oklab, var(--color-cream) 26%, transparent) 50%, transparent 64%);
  translate: -120% 0;
  animation: sheen 6.5s cubic-bezier(0.45, 0, 0.55, 1) 1.8s infinite;
}
@keyframes sheen {
  38%,
  100% {
    translate: 120% 0;
  }
}

/* Papierowa karteczka na pokrowcu: nadruk, nagłówek i długopis Olliego. */
.tag {
  position: absolute;
  top: 8%;
  left: 5%;
  display: flex;
  width: max-content;
  flex-direction: column;
  gap: 1px;
  rotate: -5deg;
  border-radius: 3px;
  background: var(--color-paper);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 85%);
  padding: 12px 12px 7px;
  color: var(--color-ink-700);
  /* Wisi na taśmie: drgnięcie po próbie podglądania (app.js) obraca karteczkę wokół taśmy. */
  transform-origin: 50% 0;
  animation: paper-in 900ms var(--ease-soft) 700ms both;
}
@keyframes paper-in {
  from {
    opacity: 0;
    translate: 0 24px;
    rotate: 2deg;
  }
}
.tag-tape {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 54px;
  height: 16px;
  translate: -50% 0;
  rotate: -4deg;
  background: color-mix(in oklab, var(--color-paper-edge) 60%, transparent);
}
.tag-print {
  color: var(--color-bronze);
  font-family: var(--font-mono);
  font-size: 7.5px;
  line-height: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tag-title {
  font-size: 19px;
  line-height: 21px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.tag-hand {
  rotate: -2deg;
  color: var(--color-pen);
  font-family: var(--font-hand);
  font-size: 17px;
  font-weight: 700;
  line-height: 18px;
}
/* Nowa odpowiedź Olliego dopisuje się od lewej, jak długopisem (app.js). */
.tag-line {
  display: inline-block;
}
/* Pieczątka „On the list” po zapisie: tusz z brązu wsiąka w papier (multiply), podwójna ramka jak w gumowej pieczątce.
   Karteczka wydłuża się o miejsce na nią, żeby nie zasłaniała nagłówka ani dopisku Olliego. */
html[data-phase='soon'] .tag:has(.tag-stamp:not([hidden])) {
  padding-bottom: 26px;
}
.tag-stamp {
  position: absolute;
  right: 10px;
  bottom: 6px;
  rotate: -6deg;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  padding: 4px 6px;
  color: var(--color-bronze);
  font-family: var(--font-mono);
  font-size: 7.5px;
  font-weight: 800;
  line-height: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  mix-blend-mode: multiply;
  opacity: 0.88;
}
.tag-stamp::before {
  content: '';
  position: absolute;
  inset: 1.5px;
  border: 1px solid currentColor;
  border-radius: 1.5px;
  opacity: 0.7;
}
.tag-stamp.is-new {
  animation: stamp-in 420ms var(--ease-soft) both;
}
@keyframes stamp-in {
  0% {
    opacity: 0;
    scale: 1.9;
  }
  55% {
    opacity: 0.88;
    scale: 0.95;
  }
  100% {
    scale: 1;
  }
}

.hero-wrap {
  position: relative;
  z-index: 2;
  /* Na desktopie leży nad sceną na całą szerokość: kliknięcia poza kolumną tekstu trafiają w auto. */
  pointer-events: none;
}
.hero-copy {
  pointer-events: auto;
}
.hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: -12px;
  padding: 0 20px 30px;
}
.hero-title {
  margin: 0;
  font-size: 56px;
  line-height: 50px;
}
.lead {
  color: var(--color-sand-200);
  font-size: 18px;
  line-height: 24px;
}
.byline {
  margin-top: -4px;
  color: var(--color-sand-300);
  font-size: 14px;
  line-height: 20px;
  text-wrap: balance;
}
.byline a {
  color: var(--color-sand-200);
  text-decoration: underline;
  text-decoration-color: var(--cream-30);
  text-underline-offset: 3px;
}
.byline a:hover {
  color: var(--color-cream);
  text-decoration-color: var(--color-gold);
}

.field-label {
  margin-bottom: 8px;
  color: var(--color-sand-300);
  font-size: 13px;
  line-height: 20px;
}
.field-label strong {
  color: var(--color-sand-200);
  font-weight: 600;
}

/* Odliczanie: główny element strony. */
.when {
  margin-top: 2px;
}
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.cd-box {
  display: flex;
  height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid var(--cream-10);
  border-radius: 10px;
  background: var(--color-ink-800);
}
.cd-seconds {
  border-color: color-mix(in oklab, var(--color-gold) 40%, transparent);
}
/* Cyfry na klapkach jak w tablicy odlotów: szczelina przez środek, zawiasy w ramce, zmiana cyfry to opadająca klapka. */
.cd-value {
  position: relative;
  align-self: stretch;
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  line-height: 32px;
  text-align: center;
}
.cd-value::after {
  content: '';
  position: absolute;
  top: calc(50% - 0.5px);
  right: 0;
  left: 0;
  height: 1px;
  background: rgb(0 0 0 / 60%);
  box-shadow: 0 1px 0 var(--cream-8);
}
.cd-value::before {
  content: '';
  position: absolute;
  top: calc(50% - 3px);
  right: -1px;
  left: -1px;
  height: 6px;
  background: linear-gradient(
    90deg,
    var(--color-night) 0 2px,
    transparent 2px calc(100% - 2px),
    var(--color-night) calc(100% - 2px)
  );
}
.cd-value > span {
  display: inline-block;
}
.cd-seconds .cd-value {
  color: var(--color-gold);
}
.cd-value .tick {
  animation: flap 380ms var(--ease-soft);
}
@keyframes flap {
  from {
    opacity: 0.3;
    transform: perspective(160px) rotateX(-75deg);
  }
}
.cd-label {
  color: var(--color-sand-500);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.12em;
}

/* ───── Waitlista ───── */

.join {
  scroll-margin-top: 84px;
}
.waitlist[data-channel='sms'] [data-by='email'],
.waitlist[data-channel='email'] [data-by='sms'] {
  display: none !important;
}
.join-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.join-head .field-label {
  min-width: 0;
  margin: 0;
}

/* Przełącznik SMS / e-mail: wybrana opcja ma złoty obrys i poświatę, przesuwa się płynnie. */
.switch {
  position: relative;
  display: grid;
  flex: none;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--cream-14);
  border-radius: 999px;
  background: var(--color-night);
  padding: 3px;
}
.switch::before {
  content: '';
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border: 1.5px solid var(--color-gold-light);
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-gold) 8%, transparent);
  box-shadow: 0 16px 40px -24px color-mix(in oklab, var(--color-gold) 70%, transparent);
  transition: translate 260ms var(--ease-soft);
}
.waitlist[data-channel='email'] .switch::before {
  translate: 100% 0;
}
.switch-option {
  position: relative;
  cursor: pointer;
}
.switch-option input {
  position: absolute;
  inset: -6px 0;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}
.switch-option span {
  display: inline-flex;
  min-width: 78px;
  height: 32px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  color: var(--color-sand-400);
  font-size: 13px;
  font-weight: 600;
  line-height: 16px;
  transition: color 200ms;
}
.switch-option input:checked + span {
  color: var(--color-cream);
}
.switch-option:active span {
  scale: 0.97;
}
.switch-option input:focus-visible + span {
  border-radius: 999px;
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.join-field {
  min-width: 0;
}

/* Pole numeru (flaga, prefiks, duże cyfry); pole e-maila w tej samej ramce. */
.phone-field {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--cream-40);
  border-radius: 10px;
  background: var(--color-night);
  transition:
    border-color 160ms,
    box-shadow 220ms var(--ease-soft);
}
.phone-field[data-state='valid'] {
  border-color: color-mix(in oklab, var(--color-gold) 70%, transparent);
}
.phone-field[data-state='error'] {
  border-color: var(--color-danger);
}
.phone-field:focus-within {
  border-color: color-mix(in oklab, var(--color-cream) 80%, transparent);
  box-shadow:
    0 0 0 5px color-mix(in oklab, var(--color-cream) 8%, transparent),
    0 20px 40px -20px color-mix(in oklab, var(--color-gold) 40%, transparent);
}
.phone-field[data-state='error']:focus-within {
  border-color: var(--color-danger);
  box-shadow: 0 0 0 5px color-mix(in oklab, var(--color-danger) 12%, transparent);
}
.phone-prefix {
  position: relative;
  display: flex;
  height: 56px;
  flex: none;
  align-items: center;
  gap: 8px;
  border-right: 1px solid var(--cream-14);
  padding: 0 12px;
  color: var(--color-sand-200);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  transition: color 160ms;
}
.phone-prefix:has(select:not([hidden])):hover,
.phone-prefix:has(select:focus-visible) {
  color: var(--color-cream);
}
.phone-flag {
  display: block;
  line-height: 0;
}
.phone-flag svg {
  display: block;
  width: 24px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-cream) 20%, transparent);
}
.phone-chevron {
  color: var(--color-sand-500);
  stroke-width: 2.2;
}
.phone-prefix select {
  position: absolute;
  inset: 0;
  cursor: pointer;
  appearance: none;
  opacity: 0;
  color-scheme: dark;
}
.phone-field input {
  min-width: 0;
  height: 56px;
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0 14px;
  outline: none;
  color: var(--color-cream);
  font: inherit;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.email-field input {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0;
}
/* Z wyborem kraju (kilka prefiksów, staging) prefiks jest szerszy, więc cyfry odrobinę mniejsze. */
.phone-field.has-picker input {
  padding: 0 12px;
  font-size: 19px;
  letter-spacing: 0.02em;
}
.phone-field input::placeholder {
  color: var(--color-sand-500);
}
/* Podpowiedź przeglądarki nie zamalowuje pola na biało. */
.phone-field input:-webkit-autofill {
  -webkit-text-fill-color: var(--color-cream);
  box-shadow: 0 0 0 100px var(--color-night) inset;
  caret-color: var(--color-cream);
}
.valid-tick {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: none;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-gold) 18%, transparent);
  color: var(--color-gold);
  animation: pop-in 360ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.valid-tick .icon {
  stroke-width: 2.6;
}

/* Przycisk formularza: etykieta, spinner w trakcie zapisu, odhaczenie po zapisie. */
.join-submit {
  display: grid;
  width: 100%;
  height: 54px;
  place-items: center;
  margin-top: 14px;
  font-size: 17px;
}
.btn-face {
  display: inline-flex;
  grid-area: 1 / 1;
  align-items: center;
  gap: 10px;
  transition:
    opacity 160ms,
    translate 160ms var(--ease-soft);
}
.join-submit[data-state='idle'] .btn-face:not([data-face='idle']),
.join-submit[data-state='busy'] .btn-face:not([data-face='busy']),
.join-submit[data-state='done'] .btn-face:not([data-face='done']) {
  opacity: 0;
  translate: 0 10px;
}
.spinner {
  flex: none;
}
/* Kręci się tylko w trakcie zapisu, nie w tle pod schowaną etykietą. */
.join-submit[data-state='busy'] .spinner {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.field-error {
  color: var(--color-danger);
  font-size: 13px;
  line-height: 20px;
}
.field-error:not(:empty) {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-top: 8px;
  animation: fade-in 220ms var(--ease-soft) both;
}
.field-error .icon {
  margin-top: 2px;
  stroke-width: 1.8;
}

.join-fine {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}
.join-consent {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
}
/* Cały wiersz zgody jest celem dotyku: co najmniej 24 px wysokości (WCAG 2.5.8). Tekst prawny nie jest najmniejszy na stronie. */
.fine-check {
  display: flex;
  min-height: 24px;
  cursor: pointer;
  align-items: flex-start;
  gap: 8px;
  padding: 2px 0;
  color: var(--color-sand-300);
  font-size: 13px;
  line-height: 18px;
}
.fine-check a,
.legal a {
  color: var(--color-sand-200);
  text-decoration: underline;
  text-decoration-color: var(--cream-30);
  text-underline-offset: 3px;
}
.fine-check a:hover,
.legal a:hover {
  color: var(--color-cream);
  text-decoration-color: var(--color-gold);
}
.check {
  width: 22px;
  height: 22px;
  flex: none;
  margin: 0;
  cursor: pointer;
  appearance: none;
  border: 1.5px solid color-mix(in oklab, var(--color-cream) 45%, transparent);
  border-radius: 6px;
  background: var(--color-night);
  transition:
    background 140ms,
    border-color 140ms,
    box-shadow 160ms var(--ease-soft),
    transform 140ms var(--ease-soft);
}
.check:hover {
  border-color: var(--color-gold);
}
.check:active {
  transform: scale(0.9);
}
.check:checked {
  border-color: var(--color-cream);
  background: var(--color-cream);
  box-shadow: inset 0 0 0 4px var(--color-night);
}
.check[aria-invalid='true'] {
  border-color: var(--color-danger);
}
.check-sm {
  width: 18px;
  height: 18px;
  border-radius: 5px;
}
.check-sm:checked {
  box-shadow: inset 0 0 0 3px var(--color-night);
}
.consent-error {
  padding-left: 26px;
  color: var(--color-danger);
  font-size: 13px;
  line-height: 18px;
  animation: fade-in 220ms var(--ease-soft) both;
}
.retry-note,
.human-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--color-sand-300);
  font-size: 13px;
  line-height: 20px;
  animation: fade-in 220ms var(--ease-soft) both;
}
.retry-note .icon {
  margin-top: 2px;
  color: var(--color-gold);
  stroke-width: 1.8;
}
.human-note[data-tone='failed'] {
  color: var(--color-danger);
}
.human-widget:empty {
  display: none;
}
.form-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid color-mix(in oklab, var(--color-danger) 40%, transparent);
  border-radius: 12px;
  background: color-mix(in oklab, var(--color-danger) 8%, transparent);
  padding: 12px 14px;
  color: var(--color-sand-200);
  font-size: 14px;
  line-height: 20px;
  animation: fade-in 220ms var(--ease-soft) both;
}
.form-error .icon {
  margin-top: 1px;
  color: var(--color-danger);
  stroke-width: 1.8;
}
.noscript-note {
  padding-top: 8px;
  color: var(--color-sand-300);
  font-size: 13px;
  line-height: 20px;
}

/* Po zapisie: potwierdzenie w miejscu pola. */
.joined {
  display: flex;
  flex-direction: column;
  gap: 8px;
  outline: none;
  animation: fade-in 420ms var(--ease-soft) both;
}
.joined-box {
  height: 58px;
  gap: 12px;
  padding: 0 6px 0 14px;
}
.joined-tick {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-gold);
  color: var(--color-night);
  animation: pop-in 360ms cubic-bezier(0.34, 1.56, 0.64, 1) 120ms both;
}
.joined-text {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}
.joined-text .eyebrow {
  line-height: 14px;
}
.joined-contact {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.text-button {
  min-height: 44px;
  flex: none;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0 12px;
  color: var(--color-gold);
  font: inherit;
  font-size: 14px;
}
.text-button:hover {
  color: var(--color-gold-light);
}
.joined-note {
  color: var(--color-sand-300);
  font-size: 13px;
  line-height: 20px;
}
.quiet-button {
  position: relative;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 2px 0;
  color: var(--color-sand-200);
  font: inherit;
  text-decoration: underline;
  text-decoration-color: var(--cream-30);
  text-underline-offset: 4px;
}
.quiet-button:hover {
  color: var(--color-cream);
}
/* Cel dotyku 44 px przy linku w tekście. */
.quiet-button::after {
  content: '';
  position: absolute;
  inset: -12px -6px;
}

.live-cta {
  width: 100%;
  height: 54px;
  font-size: 17px;
}

/* ───── Taśmy z hasłami ───── */

.marquee {
  position: relative;
  overflow: hidden;
  background: var(--color-night);
  padding: 10px 0 34px;
}
.tape-band {
  position: relative;
  overflow: hidden;
  margin: 0 -20px;
  border-top: 1px solid var(--cream-12);
  border-bottom: 1px solid var(--cream-12);
}
.tape-gold {
  z-index: 2;
  rotate: -2deg;
  background: var(--color-gold);
  color: var(--color-night);
}
.tape-under {
  display: none;
}
.tape-dark {
  z-index: 1;
  rotate: 1.4deg;
  background: var(--color-ink-800);
  color: var(--color-cream);
}
.tape {
  display: flex;
  width: max-content;
  padding: 12px 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tape-forward {
  animation: marquee 38s linear infinite;
}
.tape-reverse {
  animation: marquee-reverse 44s linear infinite;
}
.tape-set {
  display: flex;
}
.tape-item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding-right: 20px;
}
.tape-star {
  font-size: 14px;
}
.tape-dark .tape-star {
  color: var(--color-gold);
}
.tape-gold ::selection {
  background: var(--color-night);
  color: var(--color-gold);
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-33.333%);
  }
}
@keyframes marquee-reverse {
  from {
    transform: translateX(-33.333%);
  }
  to {
    transform: translateX(0);
  }
}

/* ───── Stopka ───── */

.footer {
  position: relative;
  overflow: hidden;
  border-radius: 30px 30px 0 0;
  background: var(--color-ink-800);
  padding: 40px 20px 0;
}
.footer-inner {
  position: relative;
  display: flex;
  max-width: 1280px;
  flex-direction: column;
  gap: 24px;
  margin: 0 auto;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer-logo {
  display: block;
  width: auto;
  height: 36px;
}
.socials {
  display: flex;
  gap: 10px;
}
.social {
  width: 44px;
  height: 44px;
}
.legal {
  max-width: 75ch;
  color: var(--color-sand-500);
  font-size: 12px;
  line-height: 20px;
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
  color: var(--color-sand-500);
  font-size: 13px;
  line-height: 20px;
}
.run-by {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
/* Logo Influtique: plik 570×84, wyświetlany w 1/4 (ostry na ekranach Retina). */
.run-by-logo {
  display: block;
  width: auto;
  height: 21px;
}
.footer-word {
  position: relative;
  margin-top: 22px;
  translate: 0 18%;
  font-size: clamp(120px, 21vw, 320px);
  font-style: italic;
  line-height: 0.78;
  text-align: center;
  white-space: nowrap;
  --outline-alpha: 9%;
}

/* Tryb DEMO (pusty `endpoint` w config.js): formularz niczego nie zapisuje. */
.demo-badge {
  position: fixed;
  bottom: 4px;
  left: 4px;
  z-index: 60;
  border-radius: 4px;
  background: color-mix(in oklab, var(--color-gold) 90%, transparent);
  padding: 2px 6px;
  color: var(--color-night);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.1em;
  pointer-events: none;
}

/* ───── Tablet: układ telefonu, ale kolumna i auto nie rozciągają się na całą szerokość ───── */

@media (min-width: 40rem) and (max-width: 63.999rem) {
  .stage {
    aspect-ratio: 920 / 470;
  }
  .car {
    bottom: 13%;
    width: min(92%, 700px);
  }
  .stage-date {
    right: 8%;
    font-size: 19cqw;
  }
  .tag {
    left: 9%;
  }
  .hero-copy {
    width: 100%;
    max-width: 600px;
    margin-right: auto;
    margin-left: auto;
  }
}

/* ───── Desktop ───── */

@media (min-width: 64rem) {
  .wrap {
    padding: 0 40px;
  }

  .site-header {
    position: static;
    border: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .header-row {
    height: 84px;
    border-bottom: 1px solid var(--cream-14);
    padding: 0;
  }
  .logo img {
    height: 40px;
  }
  .header-meta {
    display: flex;
    align-items: center;
    gap: 0.6em;
    color: var(--color-sand-500);
    font-family: var(--font-mono);
    font-size: 12px;
    line-height: 16px;
    letter-spacing: 0.16em;
    white-space: nowrap;
  }
  /* Zaczerniony fragment zamiast nazwy: strona nie zdradza, co jest pod pokrowcem. */
  .redacted {
    display: inline-block;
    width: 2.6em;
    height: 1.05em;
    border-radius: 2px;
    background: var(--color-sand-500);
  }
  .header-cta {
    display: none;
  }

  .hero-glow {
    position: absolute;
    inset: 0;
    display: block;
    background: radial-gradient(40% 45% at 92% 32%, color-mix(in oklab, var(--color-gold) 14%, transparent), transparent 70%);
    animation: lamp-on 1500ms linear 150ms both;
  }
  /* Scena zaczyna się za kolumną tekstu (40 px marginesu + kolumna + odstęp) i sięga prawej krawędzi. Gdy jest wąska,
     auto ma swoją najmniejszą szerokość i wychodzi poza prawą krawędź, zamiast wchodzić pod formularz. */
  .stage {
    --copy: 480px;
    position: absolute;
    top: 0;
    right: 24px;
    bottom: 0;
    left: calc(max(0px, (100vw - 1360px) / 2) + 40px + var(--copy) + 28px);
    aspect-ratio: auto;
    overflow: visible;
  }
  .stage-light {
    inset: 0 -24px 0 -80px;
    background:
      radial-gradient(52% 40% at 54% 52%, color-mix(in oklab, var(--color-gold) 30%, transparent), transparent 72%),
      radial-gradient(56% 8% at 52% 84%, color-mix(in oklab, var(--color-cream) 14%, transparent), transparent 76%);
  }
  .stage-date {
    top: 5%;
    right: 0;
    font-size: min(40cqw, 340px);
    --outline-alpha: 24%;
    --outline-width: 1.5px;
  }
  .car {
    bottom: 13%;
    left: 0;
    width: max(100%, 560px);
    max-width: 1100px;
    translate: none;
  }
  .car-dim {
    position: absolute;
    top: calc(100% + 26px);
    right: 0;
    left: 0;
    display: block;
    height: 1px;
    background: var(--cream-14);
  }
  /* Kreski na końcach wymiaru. */
  .car-dim::before,
  .car-dim::after {
    content: '';
    position: absolute;
    top: -5px;
    width: 1px;
    height: 11px;
    background: var(--cream-30);
  }
  .car-dim::before {
    left: 0;
  }
  .car-dim::after {
    right: 0;
  }
  .car-dim-label {
    position: absolute;
    top: -8px;
    left: 50%;
    display: flex;
    translate: -50% 0;
    align-items: center;
    gap: 0.7em;
    background: var(--color-night);
    padding: 0 12px;
    color: var(--color-sand-500);
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 16px;
    letter-spacing: 0.16em;
    white-space: nowrap;
  }
  .car-dim-label .redacted {
    width: 3.4em;
  }
  .tag {
    top: auto;
    bottom: 5%;
    left: 5%;
    gap: 2px;
    rotate: -6deg;
    border-radius: 4px;
    box-shadow: 0 50px 90px -20px rgb(0 0 0 / 85%);
    padding: 20px 20px 12px;
  }
  .tag-tape {
    top: -12px;
    width: 86px;
    height: 24px;
  }
  .tag-print {
    font-size: 9.5px;
    line-height: 14px;
    letter-spacing: 0.12em;
  }
  .tag-title {
    font-size: 30px;
    line-height: 32px;
  }
  .tag-hand {
    font-size: 26px;
    line-height: 28px;
  }
  html[data-phase='soon'] .tag:has(.tag-stamp:not([hidden])) {
    padding-bottom: 40px;
  }
  .tag-stamp {
    right: 16px;
    bottom: 9px;
    border-width: 2px;
    border-radius: 4px;
    padding: 6px 9px;
    font-size: 11px;
    line-height: 13px;
  }
  .tag-stamp::before {
    inset: 2px;
  }

  .hero-copy {
    max-width: 480px;
    min-height: min(650px, 46.5vw);
    gap: 17px;
    margin-top: 0;
    padding: 44px 0 54px;
  }
  .eyebrow {
    font-size: 12px;
    letter-spacing: 0.22em;
  }
  .hero-title {
    font-size: clamp(60px, 6.4vw, 92px);
    line-height: 0.9;
  }
  .lead {
    font-size: 24px;
    line-height: 30px;
    letter-spacing: -0.01em;
  }
  .byline {
    margin-top: -8px;
    font-size: 16px;
    line-height: 24px;
  }
  .field-label {
    margin-bottom: 10px;
    font-size: 14px;
  }

  .when {
    margin-top: 0;
  }
  .countdown {
    gap: 10px;
  }
  .cd-box {
    height: 78px;
    gap: 3px;
    border-radius: 12px;
  }
  .cd-value {
    font-size: 40px;
    line-height: 40px;
  }
  .cd-label {
    letter-spacing: 0.14em;
  }

  .join {
    margin-top: 0;
  }
  .join-head {
    margin-bottom: 10px;
  }
  .phone-field {
    border-radius: 12px;
  }
  .phone-prefix {
    height: 58px;
    gap: 10px;
    padding: 0 16px;
    font-size: 18px;
  }
  .phone-flag svg {
    width: 28px;
    height: 14px;
  }
  .phone-field input {
    height: 58px;
    padding: 0 14px;
  }
  .email-field input {
    font-size: 18px;
  }
  .valid-tick {
    margin-right: 16px;
  }
  .join-submit {
    height: 58px;
    margin-top: 12px;
    font-size: 19px;
  }
  .join-fine {
    max-width: 460px;
    padding-top: 12px;
  }
  .fine-check {
    gap: 10px;
    font-size: 13px;
    line-height: 19px;
  }
  .consent-error {
    padding-left: 28px;
  }
  .joined-box {
    padding-left: 16px;
  }
  .joined-contact {
    font-size: 17px;
  }
  .joined-note {
    font-size: 14px;
  }
  .live-cta {
    width: auto;
    height: 60px;
    align-self: flex-start;
    padding: 0 34px;
    font-size: 18px;
  }

  .marquee {
    padding: 30px 0 46px;
  }
  .tape-band {
    margin: 0 -40px;
  }
  .tape-gold {
    rotate: -1.6deg;
  }
  .tape-under {
    display: block;
    margin-top: -46px;
  }
  .tape {
    padding: 18px 0;
    font-size: 26px;
  }
  .tape-item {
    gap: 28px;
    padding-right: 28px;
  }
  .tape-star {
    font-size: 18px;
  }

  .footer {
    border-radius: 40px 40px 0 0;
    padding: 56px 40px 0;
  }
  .footer-inner {
    gap: 30px;
  }
  .footer-logo {
    height: 40px;
  }
}

/* Niskie okna laptopów (np. 1366×768 z paskami przeglądarki): ta sama kolumna, ciaśniej, przycisk zapisu na pierwszym ekranie. */
@media (min-width: 64rem) and (max-height: 740px) {
  .hero-copy {
    gap: 12px;
    padding-top: 28px;
  }
  .hero-title {
    font-size: clamp(56px, 5.4vw, 78px);
  }
  .lead {
    font-size: 21px;
    line-height: 27px;
  }
  .byline {
    margin-top: -4px;
  }
  .field-label {
    margin-bottom: 8px;
  }
  .cd-box {
    height: 68px;
  }
  .cd-value {
    font-size: 32px;
    line-height: 32px;
  }
  .join-head {
    margin-bottom: 8px;
  }
  .phone-prefix,
  .phone-field input {
    height: 52px;
  }
  .join-consent {
    padding-top: 8px;
  }
  .join-submit {
    height: 52px;
    margin-top: 10px;
  }
}

@media (min-width: 80rem) {
  .stage {
    --copy: 540px;
  }
  .hero-copy {
    max-width: 540px;
  }
  .phone-field:not(.email-field, .has-picker) input {
    padding: 0 16px;
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .rise,
  .fade-in,
  .pop-in,
  .car,
  .tag,
  .tag-stamp.is-new,
  .stage-light,
  .hero-glow,
  .car-light::before,
  .valid-tick,
  .joined,
  .joined-tick,
  .cd-value .tick,
  .field-error:not(:empty),
  .consent-error,
  .retry-note,
  .human-note,
  .form-error,
  .tape-forward,
  .tape-reverse {
    animation: none;
  }
  .car-light::after {
    display: none;
  }
  .switch::before,
  .btn-face {
    transition: none;
  }
  .btn-cream:hover,
  .btn-cream:active,
  .check:active {
    transform: none;
  }
}
