@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/PlusJakartaSans-var-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #0B1F3A;
  --navy-2: #0F2747;
  --navy-3: #16325A;
  --teal: #2DD4BF;      /* bright teal for dark backgrounds */
  --teal-deep: #14B8A6;
  --white: #FFFFFF;
  --ink-2: #C4CFDD;     /* secondary text, ~10:1 on navy */
  --ink-3: #93A3B8;     /* tertiary text, ~6:1 on navy */
  --danger: #FCA5A5;
  --radius: 14px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60rem 36rem at 50% -8%, rgba(45, 212, 191, .16), transparent 62%),
    radial-gradient(40rem 30rem at 100% 110%, rgba(20, 184, 166, .10), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, #0A1C35 100%);
}

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--teal); color: var(--navy); padding: .6rem 1rem; border-radius: 8px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 1rem; }

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

.wrap {
  position: relative; z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(3rem, 10vh, 7rem) 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.brand { margin-bottom: clamp(2.25rem, 6vh, 3.5rem); }
.wordmark {
  display: block;
  width: clamp(11.5rem, 46vw, 19rem);
  height: auto;
}

h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(2.35rem, 9vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.sub {
  margin: 1.1rem 0 0;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 3.6vw, 1.3rem);
  font-weight: 500;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.waitlist {
  width: 100%;
  max-width: 30rem;
  margin: clamp(2rem, 6vh, 2.75rem) auto 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

input[type="email"] {
  width: 100%;
  min-height: 3.25rem;
  padding: .85rem 1.05rem;
  font: inherit;
  font-size: 1rem;            /* ≥16px prevents iOS zoom */
  color: var(--white);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
input[type="email"]::placeholder { color: var(--ink-3); opacity: 1; }
input[type="email"]:hover { border-color: rgba(255, 255, 255, .28); }
input[type="email"]:focus-visible {
  border-color: var(--teal);
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, .22);
}
.waitlist[data-state="error"] input[type="email"] { border-color: var(--danger); }

button {
  min-height: 3.25rem;
  padding: .85rem 1.4rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--navy);
  background: var(--teal);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
button:hover { background: #5EEAD4; }
button:active { transform: translateY(1px); }
button:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
button[disabled] { opacity: .7; cursor: progress; }

.status {
  min-height: 1.5rem;
  margin: .85rem 0 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--teal);
}
.waitlist[data-state="error"] .status { color: var(--danger); }
.status:empty { min-height: 0; margin: 0; }
.note { margin: .9rem 0 0; font-size: .875rem; color: var(--ink-3); }

.waitlist[data-state="done"] .field { display: none; }
.waitlist[data-state="done"] .status { font-size: 1.05rem; }

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

.foot {
  position: relative; z-index: 1;
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  text-align: center;
  font-size: .875rem;
  color: var(--ink-3);
}
.foot p { margin: 0; }
.foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid rgba(196, 207, 221, .35); }
.foot a:hover { color: var(--white); border-color: var(--teal); }
.foot a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

/* Gentle entrance, disabled for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .brand, .hero > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero h1 { animation-delay: .06s; }
  .hero .sub { animation-delay: .12s; }
  .hero .waitlist { animation-delay: .18s; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Wider screens: inline input + button */
@media (min-width: 560px) {
  .field {
    flex-direction: row;
    gap: .4rem;
    padding: .4rem;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: calc(var(--radius) + 4px);
    transition: border-color .15s ease, box-shadow .15s ease;
  }
  .field:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(45, 212, 191, .2); }
  .field input[type="email"] { background: transparent; border-color: transparent; min-height: 3rem; }
  .field input[type="email"]:hover { border-color: transparent; }
  .field input[type="email"]:focus-visible { box-shadow: none; border-color: transparent; background: transparent; }
  .waitlist[data-state="error"] .field { border-color: var(--danger); }
  .waitlist[data-state="error"] .field input[type="email"] { border-color: transparent; }
  .field button { min-height: 3rem; }
}

@media (forced-colors: active) {
  button, input[type="email"], .field { border: 1px solid CanvasText; }
}

/* Secondary pages (thanks / error / 404) */
.h1-sm { font-size: clamp(2rem, 7vw, 3.25rem); }
.back { margin: 2rem 0 0; }
.back a {
  color: var(--teal); font-weight: 700; text-decoration: none;
  border-bottom: 1px solid rgba(45, 212, 191, .4);
}
.back a:hover { border-color: var(--teal); }
.back a:focus-visible, .brand a:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 4px; }
.waitlist[data-state="done"] .note { display: none; }
