/* ───────────── Fonts ───────────── */
@font-face { font-family: "Aeonik"; src: url("../fonts/Aeonik-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Aeonik"; src: url("../fonts/Aeonik-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Aeonik"; src: url("../fonts/Aeonik-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Aeonik"; src: url("../fonts/Aeonik-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }

/* ───────────── Tokens (from Figma) ───────────── */
:root {
  --bg: #171717;
  --surface: #1f1f1f;
  --field: #292929;
  --field-hover: #303030;
  --line: rgba(255, 255, 255, .08);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .64);
  --faint: rgba(255, 255, 255, .42);
  --amber-1: #f7b240;
  --amber-2: #e89b1c;
  --amber: #f2a52e;
  --on-amber: #141414;
  --wa: #25d366;

  --space-2: 8px;
  --space-3: 12px;
  --space-5: 20px;
  --space-6: 24px;
  --radius-pill: 9999px;
  --radius-card: 18px;

  --form-w: 422px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

/* ───────────── Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Aeonik", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ───────────── Background illustration ───────────── */
.bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.bg__stage {
  position: absolute;
  left: 50%; top: 50%;
  width: max(100vw, calc(100vh * 1440 / 1024));
  aspect-ratio: 1440 / 1024;
  translate: calc(-50% + var(--px, 0px)) calc(-50% + var(--py, 0px));
  transition: translate .6s var(--ease);
}
.wheat, .seed {
  position: absolute;
  left: calc(var(--x) / 1440 * 100%);
  top: calc(var(--y) / 1024 * 100%);
  height: auto;
  animation: sway 9s ease-in-out infinite alternate;
  animation-delay: var(--d, 0s);
}
.wheat {
  width: calc(157.34 / 1440 * 100% * var(--s));
  transform-origin: 0 0;
  transform: rotate(var(--r));
}
.seed {
  width: calc(29 / 1440 * 100% * var(--s));
  transform-origin: 50% 50%;
  transform: translate(-50%, -50%) rotate(var(--r));
}
@keyframes sway {
  from { translate: 0 0; }
  to   { translate: 0 -8px; }
}

/* ───────────── Preloader ───────────── */
.preloader {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  /* Safety net if scripts never run */
  animation: pl-out .6s ease 6s forwards;
}
.preloader__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform-origin: 50% 40%;
}
/* Portrait phones: show a square crop of the clip instead of a full-height zoom,
   so it stays sharp. Top and bottom fade into black. */
@media (max-aspect-ratio: 1/1) {
  .preloader__video {
    inset: 50% 0 auto;
    height: auto;
    aspect-ratio: 1 / 1.1;
    translate: 0 -50%;
    -webkit-mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
    mask-image: linear-gradient(transparent, #000 16%, #000 84%, transparent);
  }
}
.preloader__shade {
  position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 55%, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 70%);
  opacity: 0;
  pointer-events: none;
}
.preloader__text {
  position: relative;
  margin: 0; padding: 0 16px;
  text-align: center;
  font-size: clamp(44px, 9vw, 132px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  color: #fff;
  text-shadow: 0 6px 40px rgba(0, 0, 0, .6);
}
.preloader__text .w { display: inline-block; white-space: nowrap; perspective: 600px; }
.preloader__text .c { display: inline-block; opacity: 0; }
.preloader__text .w--accent .c {
  background: linear-gradient(180deg, #ffd977, var(--amber-1) 45%, var(--amber-2));
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 6px 30px rgba(0, 0, 0, .55));
}
.preloader.is-text .c { opacity: 1; transition: opacity .5s ease; }   /* no-GSAP fallback */
.preloader__skip {
  position: absolute;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  height: 32px; padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, .35); color: rgba(255, 255, 255, .8);
  font-size: 13px; letter-spacing: .04em;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.preloader__skip:hover { color: #fff; border-color: rgba(255, 255, 255, .5); }
.preloader.is-leaving { opacity: 0; transition: opacity .6s ease; }
@keyframes pl-out { to { opacity: 0; visibility: hidden; } }

/* ───────────── Language toggle ───────────── */
.lang {
  position: fixed; z-index: 5;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; padding: 3px; gap: 2px;
  background: rgba(31, 31, 31, .85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}
.lang__btn {
  min-width: 40px; height: 30px; padding: 0 10px;
  border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--muted);
  font-size: 13px; font-weight: 500; letter-spacing: .04em;
  transition: background .2s, color .2s;
}
.lang__btn:hover { color: var(--text); }
.lang__btn[aria-pressed="true"] { background: linear-gradient(180deg, var(--amber-1), var(--amber-2)); color: var(--on-amber); }

/* ───────────── Layout ───────────── */
main, .footer { position: relative; z-index: 1; }
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 72px 16px 64px;
}
.wordmark {
  margin: 0;
  font-weight: 700;
  font-size: clamp(56px, 11.2vw, 104px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.subhead {
  margin: 10px auto 0;
  max-width: 34em;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}
.subhead__lead {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 1.3em;
  font-weight: 500;
  line-height: 1.25;
  text-wrap: balance;
}

/* ───────────── Waitlist flow ───────────── */
.flow {
  width: 100%;
  max-width: var(--form-w);
  margin-top: 44px;
  text-align: left;
}
.flow:not([data-step="start"]) {
  max-width: 460px;
  padding: 22px 24px 26px;
  background: rgba(31, 31, 31, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7);
}
.step { display: flex; flex-direction: column; gap: var(--space-5); animation: step-in .45s var(--ease) both; }
.step--center { align-items: center; text-align: center; }
@keyframes step-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.step__q { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -.005em; outline: none; }
.step__q--lg { font-size: 26px; }
.step__note { margin: -8px 0 0; color: var(--faint); font-size: 13px; text-align: center; }
.step__hint { margin: -12px 0 0; color: var(--faint); font-size: 14px; }
.step__body { margin: -8px 0 0; color: var(--muted); }
.step__body + .step__body { margin-top: 4px; }
.step__body strong { color: var(--text); font-weight: 500; }
.big-emoji { margin: 0; font-size: 44px; line-height: 1; }

/* Progress */
.progress { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.progress__back {
  display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: var(--radius-pill);
  background: var(--field); color: var(--muted);
  transition: background .2s, color .2s;
}
.progress__back:hover { background: var(--field-hover); color: var(--text); }
.progress__back svg { width: 18px; height: 18px; }
.progress__back[data-hidden] { visibility: hidden; }
.flow[data-step="success"] .progress__back { display: none; }
.progress__label { font-size: 13px; color: var(--faint); letter-spacing: .02em; }
.glass { width: 22px; height: 28px; margin-left: auto; order: 3; }
.glass svg { width: 100%; height: 100%; overflow: visible; }
.glass__beer { fill: var(--amber); transform: translateY(calc(var(--fill, 0) * -33px)); transition: transform .7s var(--ease); }
.glass__foam { fill: #fff6e3; transform: translateY(calc(var(--fill, 0) * -33px)); transition: transform .7s var(--ease); }

/* Buttons (Figma: 48px pill, amber gradient) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 0 22px;
  border: 0; border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap;
  transition: transform .15s var(--ease), filter .2s, background .2s, opacity .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn--primary { background: linear-gradient(180deg, var(--amber-1), var(--amber-2)); color: var(--on-amber); }
.btn--primary:hover:not(:disabled) { filter: brightness(1.07); }
.btn--primary:disabled { opacity: .35; cursor: not-allowed; }
.btn--ghost { background: var(--field); color: var(--text); }
.btn--ghost:hover { background: var(--field-hover); }
.btn--whatsapp { background: var(--wa); color: #06210f; }
.btn--whatsapp:hover { filter: brightness(1.06); }
.step--start .btn { font-size: 17px; }
.step--start .btn span { transition: transform .2s var(--ease); }
.step--start .btn:hover span { transform: translateX(4px); }
.row { display: flex; flex-wrap: wrap; gap: var(--space-3); width: 100%; }
.row .btn { flex: 1 1 auto; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  background: var(--field); color: var(--text);
  font-size: 15px;
  transition: background .2s, border-color .2s, transform .15s var(--ease), color .2s;
}
.chip:hover { background: var(--field-hover); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] {
  background: rgba(242, 165, 46, .14);
  border-color: var(--amber);
  color: #ffd896;
}

/* Fields (Figma: label 14px, 44px pill input #292929) */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label { font-size: 14px; color: rgba(255, 255, 255, .86); }
.field__input {
  height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  background: var(--field);
  font-size: 15px;
  transition: border-color .2s, background .2s;
}
.field__input::placeholder { color: var(--faint); }
.field__input:hover { background: var(--field-hover); }
.field__input:focus { outline: none; border-color: var(--amber); }
.field__input[aria-invalid="true"] { border-color: #ff7a6b; }
.field__error { margin: -10px 0 0; color: #ff9d91; font-size: 14px; }
.other-city { display: flex; flex-direction: column; gap: var(--space-5); animation: step-in .35s var(--ease) both; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Success bubbles */
.step--center { position: relative; }
.bubbles { position: absolute; left: 0; right: 0; top: -70px; height: 70px; pointer-events: none; }
.bubbles i {
  position: absolute; bottom: 0;
  width: 8px; height: 8px; border-radius: 50%;
  border: 1.5px solid rgba(247, 178, 64, .7);
  opacity: 0;
  animation: rise 2.4s ease-out forwards;
}
.bubbles i:nth-child(1) { left: 12%; animation-delay: .05s; }
.bubbles i:nth-child(2) { left: 24%; width: 5px; height: 5px; animation-delay: .4s; }
.bubbles i:nth-child(3) { left: 38%; width: 11px; height: 11px; animation-delay: .2s; }
.bubbles i:nth-child(4) { left: 50%; animation-delay: .6s; }
.bubbles i:nth-child(5) { left: 62%; width: 6px; height: 6px; animation-delay: .1s; }
.bubbles i:nth-child(6) { left: 74%; width: 10px; height: 10px; animation-delay: .5s; }
.bubbles i:nth-child(7) { left: 86%; animation-delay: .3s; }
.bubbles i:nth-child(8) { left: 44%; width: 4px; height: 4px; animation-delay: .8s; }
@keyframes rise {
  0% { transform: translateY(40px); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-80px) translateX(6px); opacity: 0; }
}

/* ───────────── How it works ───────────── */
.how { max-width: 1120px; margin: 0 auto; padding: 48px 16px 88px; }
.section-title {
  margin: 0 0 28px;
  text-align: center;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -.01em;
}
.how__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.how__item {
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 190px; padding: 22px;
  background: rgba(31, 31, 31, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: transform .3s var(--ease), border-color .3s, background .3s;
}
.how__item:hover { transform: translateY(-4px); border-color: rgba(242, 165, 46, .45); }
.how__item p { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.2; letter-spacing: -.005em; text-wrap: balance; }
.how__num { font-size: 14px; font-weight: 500; color: var(--amber); letter-spacing: .06em; }
.how__item--crown { background: linear-gradient(160deg, rgba(247, 178, 64, .18), rgba(31, 31, 31, .78) 60%); border-color: rgba(242, 165, 46, .35); }

.reveal { transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s; }
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s; }
.js .reveal.is-in { opacity: 1; transform: none; }
.how__item.reveal.is-in:hover { transform: translateY(-4px); }

/* ───────────── Disclaimer & footer ───────────── */
.footer .disclaimer {
  grid-column: 1 / -1;
  max-width: 760px;
  margin: 0 0 12px;
  color: var(--faint); font-size: 12px; line-height: 1.6;
}
.disclaimer strong { color: var(--muted); font-weight: 500; }
.footer {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 24px;
  max-width: 1120px; margin: 0 auto; padding: 24px 16px 36px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 15px;
}
.footer p { margin: 0; }
.footer__tag { color: var(--text); font-weight: 500; }
.footer__copy { color: var(--faint); font-size: 13px; }

/* ───────────── Responsive ───────────── */
@media (max-width: 900px) {
  .how__list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .hero { padding-top: 56px; }
  .flow { margin-top: 32px; }
  .flow:not([data-step="start"]) { padding: 18px 16px 22px; border-radius: 20px; }
  .step__q { font-size: 20px; }
  .row { flex-direction: column; }
  .how__list { grid-template-columns: 1fr; }
  .how__item { min-height: 0; gap: 18px; flex-direction: row; align-items: baseline; justify-content: flex-start; }
  .how__item p { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
