/* ===========================================================================
   Hey Eva — waitlist landing
   Brand system: EVA Manual de marca 1.0. Only the palette declared in :root
   is used. Gradients are freeform/mesh only (layered radial nodes over the
   Eva Dark base) — never a plain linear/angular/diamond gradient.
   =========================================================================== */

/* --- Self-hosted type. Eva Sans = Rethink Sans (display), Raleway (body). --- */
@font-face {
  font-family: 'Eva Sans';
  src: url('assets/fonts/rethinksans-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Eva Sans';
  src: url('assets/fonts/rethinksans-extrabold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Raleway';
  src: url('assets/fonts/raleway-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Raleway';
  src: url('assets/fonts/raleway-semibold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Primary */
  --eva-dark: #0A040C;
  --eva-light: #ECF7F8;
  --tech-blue: #1E1DA1;
  --sunset: #FF8538;
  --wild-pink: #DB4DFC;
  /* Secondary */
  --magenta: #E20789;
  --wisteria: #D1B4EA;
  --clarity: #B4F0F8;
  /* Permitted tints */
  --sunset-hover: #FE680A;
  --sunset-active: #F45E00;
  --error: #F94DB3;

  --font-display: 'Eva Sans', sans-serif;
  --font-body: 'Raleway', sans-serif;
}

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

[hidden] { display: none !important; }

/* The decorative shape bleeds past the column on purpose, so something has to
   contain it. <html> keeps `hidden`: its overflow propagates to the viewport,
   which is what stops the page scrolling sideways in every engine. <body> is the
   box that does the actual clipping, and there the value must be `clip`, never
   `hidden` — body's overflow no longer propagates once the root has claimed it,
   so `hidden` would compute its `overflow-y` to `auto` and turn body into a
   second scroll container, i.e. the second scrollbar. `clip` never creates one
   and leaves `overflow-y: visible` alone. The `hidden` line before it is the
   fallback for engines predating `clip` (Safari < 16); it is safe there only
   because nothing in the page overflows body vertically — see .deco--petal. */
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--eva-dark);
  color: var(--eva-light);
  font-family: var(--font-body);
  font-weight: 400;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Mesh atmosphere ------------------------------------------------------
   Seven nodes, tuned to the vivid sunset meshes of the manual's own poster and
   social applications: two pure-light ones (Eva Light, Eva Clarity) pinned to
   the margins, warm Sunset/Wild Pink glows in the far corners, and the broad
   Tech Blue field painted on top so the central column — where the copy lives —
   stays deep. Every alpha here is bounded by the contrast audit: text is free
   to scroll over any part of this (the layer is fixed), so the brightest point
   the copy column can reach must still clear AA. */
.mesh {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* Sized to the LARGE viewport, not inset:0 — while the mobile URL bar
     collapses mid-scroll the visual viewport outgrows a bottom-anchored fixed
     layer for a moment, flashing an unpainted band at the fold. 100lvh covers
     the collapsed-chrome height from the start (100vh is the closest legacy
     approximation, kept as fallback). */
  height: 100vh;
  height: 100lvh;
  z-index: -2;
  pointer-events: none;
  background-color: var(--eva-dark);
  background-image:
    radial-gradient(88% 64% at 50% 55%, rgba(30, 29, 161, .46) 0%, rgba(30, 29, 161, .26) 46%, rgba(30, 29, 161, 0) 80%),
    radial-gradient(46% 34% at 100% -10%, rgba(236, 247, 248, .30) 0%, rgba(236, 247, 248, 0) 70%),
    radial-gradient(42% 34% at -8% 32%, rgba(180, 240, 248, .26) 0%, rgba(180, 240, 248, 0) 72%),
    radial-gradient(54% 40% at 106% 88%, rgba(219, 77, 252, .30) 0%, rgba(219, 77, 252, 0) 74%),
    radial-gradient(52% 40% at -6% 100%, rgba(255, 133, 56, .30) 0%, rgba(255, 133, 56, 0) 74%),
    radial-gradient(30% 22% at 6% -6%, rgba(226, 7, 137, .22) 0%, rgba(226, 7, 137, 0) 76%),
    radial-gradient(26% 22% at 98% 50%, rgba(209, 180, 234, .14) 0%, rgba(209, 180, 234, 0) 78%);
}

/* --- Layout --------------------------------------------------------------- */
.page {
  position: relative;
  max-width: 460px;
  margin: 0 auto;
  padding: 36px 20px;
  padding-top: max(36px, env(safe-area-inset-top));
  padding-bottom: max(36px, env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Modular brand shapes: edge-anchored, whisper-level opacity, away from the CTA. */
.deco {
  position: absolute;
  z-index: 0;
  color: var(--eva-light);
  opacity: .06;
  pointer-events: none;
}
/* Mostly off-canvas: only a sliver survives at each side margin, so the copy
   column never has a shape behind it. Both bleed sideways only — a negative
   `top`/`bottom` (or a rotation deep enough to push the transformed box past
   the page) would spill out of the page box and add phantom vertical scroll. */
.deco--petal { width: 200px; bottom: 0; right: -84px; opacity: .09; }
/* The orb owns the top corner below the split, so the second petal frames the
   page foot from the left, mirroring its sibling; on desktop it goes back up
   to the form column's shoulder. */
.deco--petal-top {
  width: 150px;
  bottom: 40px;
  left: -66px;
  opacity: .09;
  transform: rotate(132deg);
}

.h1,
.sub,
.card,
.legal { position: relative; z-index: 1; }

.logo { position: relative; z-index: 2; }


/* --- Hero -----------------------------------------------------------------
   Eva herself carries the page: the loop bleeds behind the wordmark above and
   under the H1 below, and the copy is set flush left against it, the way the
   manual's poster pieces set display type. The clip's black floor is removed
   at encode time, so `screen` composites the glow alone — no frame to hide,
   no mask needed. The overlap depths (.h1 negative margin, .orb offsets) are
   bounded by the contrast audit against the WORST instant of the loop
   (orb-max composite), not against a lucky frame: deepening any overlap means
   re-running that audit.

   CRITICAL: no ancestor of the <video> may create a stacking context (no
   z-index here, no opacity/transform/filter/mask up the chain) — a stacking
   context is an isolated group, and the video's `screen` blend would stop at
   it instead of reaching the fixed .mesh, leaving an opaque black rectangle. */
.hero {
  position: relative;
}

.orb {
  position: relative;
  display: flex;
  justify-content: center;
  margin: -44px 0 0;
  pointer-events: none;
}
.orb__media {
  width: min(118vw, 520px);
  height: auto;
  aspect-ratio: 1;
  mix-blend-mode: screen;
}
/* Below the split the H1 climbs onto the orb, so a DARK node of the same
   freeform grammar sits over the loop's lower band: it deepens the Centro
   Seguro under the title without any hard edge, and fades to nothing before
   the box ends. Painted over the video (later sibling), under the copy (z1).
   Its stops are mirrored in audit_orb.py (SCRIM) — keep both in sync. */
.orb::after {
  content: '';
  position: absolute;
  inset: 0;
  /* The radii keep the gradient's zero INSIDE the box on every side
     (0.76 x 55% / 34% from 50%,74% stays within 0..100%): if the fade ever
     met the box edge, the cut would print a rectangle over the mesh. */
  background: radial-gradient(55% 34% at 50% 74%,
    rgba(10, 4, 12, .78) 0%, rgba(10, 4, 12, .45) 48%, rgba(10, 4, 12, 0) 76%);
}

/* Logo: never deformed, recoloured or shadowed. The orb's upper glow reaches
   behind it (z-index above), like the brand's social pieces set it over light. */
.logo {
  display: block;
  width: 164px;
  height: auto;
  margin: 0 auto;
}

.h1 {
  margin: -97px 0 14px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.125rem, 9vw, 2.625rem);
  line-height: 1.05;
  letter-spacing: -.025em;
  text-align: left;
  text-wrap: balance;
}

.sub {
  margin: 0 0 28px;
  font-size: .96875rem;
  line-height: 1.55;
  text-align: left;
  text-wrap: balance;
  color: rgba(236, 247, 248, .76);
}

/* Single tinted phrase, the way the brand's social pieces highlight the offer.
   One accent only — the palette is not a rainbow. */
.sub__hl {
  color: var(--clarity);
  font-weight: 600;
}

.card {
  background: rgba(7, 3, 9, .66);
  border: 1px solid rgba(236, 247, 248, .13);
  border-radius: 28px;
  padding: 26px 22px 28px;
  /* Depth shadow plus a deep Tech Blue halo, so the card lifts off the mesh. */
  box-shadow:
    0 22px 52px rgba(4, 2, 6, .55),
    0 0 64px rgba(30, 29, 161, .38);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.card__title {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -.01em;
}

/* --- Fields --------------------------------------------------------------- */
.field { margin: 0 0 18px; }

.field--set {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
  min-width: 0;
}

.label {
  display: block;
  float: none;
  width: 100%;
  margin: 0 0 9px;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .8125rem;
  letter-spacing: .012em;
  color: rgba(236, 247, 248, .88);
}

.opt {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border: 1px solid rgba(209, 180, 234, .42);
  border-radius: 999px;
  font-size: .625rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wisteria);
}

.input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem; /* 16px keeps iOS from zooming on focus */
  line-height: 1.35;
  color: var(--eva-light);
  background: rgba(236, 247, 248, .05);
  border: 1px solid rgba(236, 247, 248, .20);
  border-radius: 16px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.input::placeholder { color: rgba(236, 247, 248, .55); opacity: 1; }
.input:focus { border-color: rgba(180, 240, 248, .55); background: rgba(236, 247, 248, .08); }
.input[aria-invalid='true'] { border-color: var(--error); background: rgba(249, 77, 179, .07); }

.select-wrap { position: relative; }
.select { padding-right: 40px; cursor: pointer; }
/* Dark option list where the platform honours author styling (Android, desktop). */
.select option { background: #14101C; color: var(--eva-light); }

.select-caret {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 8px;
  color: rgba(236, 247, 248, .60);
  pointer-events: none;
}

/* --- Segmented radio groups ----------------------------------------------- */
.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.seg--3 { grid-template-columns: repeat(3, 1fr); }

.seg__opt {
  position: relative;
  display: block;
}
/* The radio stays in the a11y tree and keeps native arrow-key behaviour; it is
   simply transparent and stretched over its own pill. */
.seg__opt input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.seg__face {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .875rem;
  text-align: center;
  color: rgba(236, 247, 248, .82);
  background: rgba(236, 247, 248, .05);
  border: 1px solid rgba(236, 247, 248, .20);
  border-radius: 999px;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.seg--3 .seg__face { min-height: 48px; font-size: .8125rem; }

.seg__opt input:checked + .seg__face {
  background: var(--tech-blue);
  border-color: rgba(180, 240, 248, .55);
  color: var(--eva-light);
}

/* --- Messages ------------------------------------------------------------- */
.msg {
  margin: 9px 0 0;
  font-size: .78125rem;
  line-height: 1.45;
}
.msg--err { color: var(--error); }
.msg--hint { color: rgba(236, 247, 248, .66); }
.msg--note { color: var(--clarity); }

.form-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(249, 77, 179, .42);
  border-radius: 14px;
  background: rgba(249, 77, 179, .08);
}

/* --- CTA ------------------------------------------------------------------ */
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -.005em;
  color: var(--eva-dark);
  background: var(--sunset);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .15s ease, transform .08s ease;
}
@media (hover: hover) {
  .cta:hover { background: var(--sunset-hover); }
}
.cta:active { background: var(--sunset-active); transform: translateY(1px); }
.cta[disabled] {
  background: var(--sunset-active);
  cursor: progress;
  transform: none;
}

/* --- Legal ---------------------------------------------------------------- */
.legal {
  margin: 22px 0 0;
  font-size: .75rem;
  line-height: 1.55;
  text-align: center;
  color: rgba(236, 247, 248, .62);
}
.legal a {
  color: rgba(236, 247, 248, .86);
  text-decoration: underline;
  text-decoration-color: rgba(180, 240, 248, .55);
  text-underline-offset: 2px;
}

/* --- Success state -------------------------------------------------------- */
.success {
  text-align: center;
  padding: 10px 2px 8px;
}
.success:focus { outline: none; }
.success__icon {
  display: block;
  width: 52px;
  height: 52px;
  margin: 2px auto 20px;
  color: var(--clarity);
}
.success__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.success__body {
  margin: 0;
  font-size: .9375rem;
  line-height: 1.55;
  color: rgba(236, 247, 248, .78);
}

/* --- Honeypot: off-screen, never display:none (bots skip hidden inputs). --- */
.hp {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Focus ----------------------------------------------------------------
   No radius is forced here: the ring follows each control's own corner, which
   is what keeps the pills (CTA, segmented options) round while focused. Only
   the elements that have no radius of their own get one. */
.input:focus-visible,
.cta:focus-visible,
.legal a:focus-visible,
.success:focus-visible,
.seg__opt input:focus-visible + .seg__face {
  outline: 2px solid var(--clarity);
  outline-offset: 2px;
}
.legal a:focus-visible { border-radius: 3px; }
.success:focus-visible { border-radius: 20px; outline-offset: 6px; }

@supports not selector(:focus-visible) {
  .input:focus,
  .cta:focus,
  .legal a:focus,
  .seg__opt input:focus + .seg__face {
    outline: 2px solid var(--clarity);
    outline-offset: 2px;
  }
}

/* --- Tablet ---------------------------------------------------------------- */
@media (min-width: 600px) {
  .page {
    padding-top: max(44px, env(safe-area-inset-top));
    padding-bottom: max(44px, env(safe-area-inset-bottom));
  }
  .card { padding: 32px 28px 34px; border-radius: 30px; }
  /* The orb is larger here, so the same slight climb onto the ball needs a
     deeper pull (the rim-to-frame distance scales with the clip). */
  .h1 { margin-top: -110px; }
}

/* --- Desktop split ---------------------------------------------------------
   The orb takes the left half of the screen, the form the right — the copy
   sits flush left at the hero's foot, overlapping only the loop's lower glow
   (audited, see .hero). */
/* The split is built on explicit references — every position answers to one:
   1. The FRAME: the page box (max 1240px, 48px side / 44px vertical padding).
   2. Row 1: the logo, in flow, on the frame's top line; its left edge is grid
      line 1, shared with the orb column and the title.
   3. Row 2: both column units are centred in the remaining frame, and their
      heights are matched by construction (the form's larger metrics below),
      so their edges land co-linear: the orb's frame starts on the card's top
      line, and the sub's last line ends on the legal's bottom line.
   4. The orb: centred on its column's axis; the title hangs from its glow
      (fixed -20px tuck), flush left on grid line 1. */
@media (min-width: 980px) {
  .page {
    max-width: 1240px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
    grid-template-rows: auto 1fr;
    column-gap: 56px;
    align-items: center;
    padding-left: 48px;
    padding-right: 48px;
  }
  .logo {
    grid-row: 1;
    grid-column: 1 / -1;
    justify-self: start;
    margin: 0;
  }
  .hero {
    grid-row: 2;
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .side {
    grid-row: 2;
    grid-column: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .orb { margin: 0; }
  .orb__media { width: min(50vw, 660px); }
  /* On the split the H1 stays off the ball, in the glow tail: no dark node. */
  .orb::after { content: none; }
  .h1 {
    /* -80px is not arbitrary: it is what makes orb + title equal the card +
       legal unit in height at the capped orb size, locking the shared lines. */
    margin: -80px 0 16px;
    max-width: 560px;
    font-size: clamp(2.5rem, 3.9vw, 3.125rem);
  }
  .sub {
    margin: 0;
    max-width: 520px;
    font-size: 1.0625rem;
  }
  /* The larger form: metrics chosen so card + legal matches the hero unit's
     height (orb + tucked title) — the equality is what locks the alignment. */
  .card { padding: 40px 36px 42px; }
  .card__title { margin-bottom: 24px; }
  .field,
  .field--set { margin-bottom: 22px; }
  .cta { min-height: 58px; margin-top: 14px; }
  .deco--petal { width: 250px; bottom: 0; right: -120px; }
  .deco--petal-top { width: 226px; top: 0; bottom: auto; left: auto; right: -140px; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
  }
}
