/* ===========================================================================
   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 orb video is wider than small viewports on purpose (118vw), 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 overflows body vertically — the orb bleeds
   sideways only. */
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;
}

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

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


/* --- Hero -----------------------------------------------------------------
   Eva herself carries the page: the loop's glow reaches behind the wordmark
   above and the title hangs below the ball, 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. Text placement is bounded by the
   contrast audit against the WORST instant of the loop (orb-max composite),
   not against a lucky frame: moving text onto the ball means re-running it.

   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;
}
/* 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 {
  /* Symmetric breathing around the ball (design, 2026-08-01): the gap from
     the ball's visible bottom edge to the title equals the gap from the logo
     to the ball's top edge. With the ball's calibrated geometry (centre y
     341.5, radius 210 in the 700px frame) and the orb's -44px pull, equal
     gaps solve to margin-top = -(17/700)·orbWidth - 44px, where orbWidth =
     min(118vw, 520px) → the min() below. One rule, exact at every width
     under the 980px split. */
  margin: calc(-44px - min(2.87vw, 12.6px)) 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;
}

/* --- Consent (CLO: both boxes are mandatory) -------------------------------
   Native checkboxes restyled in place: they keep their a11y role and keyboard
   behaviour, the pill grammar of the segmented controls carries over to the
   checked state. The document links open the CLO's PDFs from /legal/. */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}
.consent + .consent { margin-top: 11px; }

.consent__box {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(236, 247, 248, .05);
  border: 1px solid rgba(236, 247, 248, .30);
  border-radius: 6px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.consent__box:checked {
  background: var(--tech-blue);
  border-color: rgba(180, 240, 248, .55);
}
.consent__box:checked::after {
  content: '';
  width: 11px;
  height: 9px;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.4 4.6 8.4 10.5 1.6' fill='none' stroke='%23ECF7F8' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.consent__box[aria-invalid='true'] {
  border-color: var(--error);
  background: rgba(249, 77, 179, .07);
}

.consent__text {
  font-size: .75rem;
  line-height: 1.5;
  color: rgba(236, 247, 248, .72);
  cursor: pointer;
}
.consent__text a {
  color: rgba(236, 247, 248, .90);
  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,
.consent__box:focus-visible,
.consent__text a:focus-visible,
.success:focus-visible,
.seg__opt input:focus-visible + .seg__face {
  outline: 2px solid var(--clarity);
  outline-offset: 2px;
}
.consent__text a:focus-visible { border-radius: 3px; }
.success:focus-visible { border-radius: 20px; outline-offset: 6px; }

@supports not selector(:focus-visible) {
  .input:focus,
  .cta:focus,
  .consent__box:focus,
  .consent__text 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; }
}

/* --- 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 card's bottom line.
   4. The orb: centred on its column's axis; the title hangs from its glow
      (the equalizer tuck below), 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); }
  .h1 {
    /* -54px is not arbitrary: it is what makes orb + title + sub equal the
       card unit in height at the capped orb size (1440x900 reference),
       locking the shared lines. Re-measure via rects.json if the card's
       metrics change (the consent rows are part of that height). */
    margin: -54px 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; }
}

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