/*
 * 128 to Citizenship · coming soon
 * Palette taken from the logo: deep federal blue + flag red on a cool off-white.
 * Radius system: surfaces 24px, media 28px, interactive elements full pill.
 */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --sunken: #eaeef6;
  --line: #dde3ee;
  --ink: #0b1733;
  --ink-2: #364463;
  --ink-3: #56627e;
  --blue: #12357a;
  --blue-strong: #0d2a66;
  --blue-soft: #e7eefb;
  --red: #c4182b;
  --red-soft: #fdeced;
  --green: #127a3c;
  --green-soft: #e6f6ec;
  --on-blue: #ffffff;
  --shadow: 0 1px 0 rgb(11 23 51 / 0.04), 0 22px 48px -24px rgb(13 42 102 / 0.35);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08122a;
    --surface: #0f1d3d;
    --sunken: #0c1834;
    --line: #1d2d52;
    --ink: #eef2fa;
    --ink-2: #bcc6dd;
    --ink-3: #93a0bf;
    --blue: #8fb0ff;
    --blue-strong: #2f5fcf;
    --blue-soft: #14254b;
    --red: #ff6b78;
    --red-soft: #2a1324;
    --green: #5fd08c;
    --green-soft: #0f2b24;
    --shadow: 0 1px 0 rgb(0 0 0 / 0.2), 0 24px 50px -24px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
p { margin: 0; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 12px; }

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; padding: 10px 16px; border-radius: 999px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.skip:focus { top: 16px; }

/* ---------- Nav ---------- */
.nav { display: flex; align-items: center; justify-content: space-between; padding-top: calc(env(safe-area-inset-top, 0px) + 18px); }
.logo img { height: 64px; width: auto; }
@media (min-width: 768px) { .logo img { height: 76px; } }
@media (prefers-color-scheme: dark) { .logo img { content: url("/logo-224-dark.png"); } }
.lang { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--sunken); }
.lang button {
  min-width: 48px; min-height: 40px; border: 0; border-radius: 999px; background: transparent;
  color: var(--ink-3); font-weight: 600; font-size: 14px; letter-spacing: 0.02em; cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out);
}
.lang button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgb(11 23 51 / 0.12); }
.lang button:active { transform: scale(0.96); }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 40px; padding-top: 28px; padding-bottom: 72px; align-items: center; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.08fr 0.92fr; gap: 64px; padding-top: 40px; padding-bottom: 104px; } }
.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-weight: 600; font-size: 14px; }
h1 { font-size: clamp(40px, 6.4vw, 66px); line-height: 1.02; font-weight: 700; }
.sub { max-width: 34rem; font-size: 19px; color: var(--ink-2); }

/* Waitlist form */
.waitlist { display: flex; flex-direction: column; gap: 10px; max-width: 30rem; margin-top: 6px; }
.field { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 520px) {
  .field { flex-direction: row; padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
  .field input[type="email"] { box-shadow: none !important; background: transparent !important; }
}
.field input[type="email"] {
  flex: 1; min-width: 0; min-height: 52px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: 17px;
  box-shadow: inset 0 0 0 1px var(--line);
}
.field input[type="email"]::placeholder { color: var(--ink-3); }
.field input[type="email"]:focus { outline: none; }
.field:focus-within { box-shadow: inset 0 0 0 2px var(--blue), var(--shadow); }
@media (max-width: 519px) { .field:focus-within { box-shadow: none; } .field input[type="email"]:focus { box-shadow: inset 0 0 0 2px var(--blue); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px;
  border: 0; border-radius: 999px; background: var(--blue-strong); color: var(--on-blue);
  font-weight: 600; font-size: 16px; white-space: nowrap; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 180ms ease;
}
@media (prefers-color-scheme: light) { .btn { background: #12357a; } }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #0b2152; } .btn:hover i { transform: translateX(2px); } }
.btn i { transition: transform 180ms var(--ease-out); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.7; cursor: progress; }
.form-msg { padding-left: 20px; font-size: 14px; color: var(--ink-3); min-height: 1.5em; }
.form-msg[data-state="ok"] { color: var(--green); font-weight: 600; }
.form-msg[data-state="error"] { color: var(--red); font-weight: 600; }

/* Interview stage */
.stage {
  position: relative; margin: 0; overflow: hidden; border-radius: 28px; background: #0b1a3a;
  box-shadow: var(--shadow); aspect-ratio: 4 / 4.6; max-height: 660px; width: 100%;
}
.stage img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }
.stage[data-step="1"] img { animation: breathe 6s ease-in-out infinite; }
.stage-shade { position: absolute; inset: 40% 0 0 0; background: linear-gradient(to top, rgb(8 18 42 / 0.92), rgb(8 18 42 / 0)); pointer-events: none; }
.convo { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 900px) { .convo { left: 22px; right: 22px; bottom: 22px; } }
.bubble {
  max-width: 88%; padding: 12px 16px; border-radius: 20px; font-size: 16px; line-height: 1.35; font-weight: 500;
  opacity: 0; transform: translateY(8px) scale(0.98);
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
.who { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; opacity: 0.72; }
.officer { background: rgb(255 255 255 / 0.96); color: #0b1733; border-bottom-left-radius: 8px; transform-origin: bottom left; }
.you { margin-left: auto; background: #1f4aa8; color: #fff; border-bottom-right-radius: 8px; transform-origin: bottom right; }
.verdict {
  display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; font-weight: 600; color: #a8f0c4;
  opacity: 0; transform: translateY(4px); transition: opacity 260ms var(--ease-out) 260ms, transform 260ms var(--ease-out) 260ms;
}
.listen {
  align-self: flex-end; display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px;
  background: rgb(255 255 255 / 0.12); color: #fff; font-size: 14px; font-weight: 600;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(6px); transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out);
}
.mic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #d42a3c; }
.bars { display: inline-flex; align-items: center; gap: 3px; height: 18px; }
.bars i { width: 3px; height: 100%; border-radius: 3px; background: currentColor; transform: scaleY(0.3); }
.stage[data-step="2"] .bars i { animation: talk 900ms ease-in-out infinite; }
.bars i:nth-child(2n) { animation-delay: 120ms !important; }
.bars i:nth-child(3n) { animation-delay: 240ms !important; }
.bars i:nth-child(4n) { animation-delay: 360ms !important; }

.stage[data-step="1"] .officer,
.stage[data-step="2"] .officer,
.stage[data-step="3"] .officer { opacity: 1; transform: none; }
.stage[data-step="2"] .listen { opacity: 1; transform: none; }
.stage[data-step="3"] .you { opacity: 1; transform: none; }
.stage[data-step="3"] .verdict { opacity: 1; transform: none; }
.stage[data-step="0"] .bubble { transition-duration: 200ms; }

@keyframes talk { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }

/* Entrance */
.reveal { animation: rise 700ms var(--ease-out) both; animation-delay: calc(var(--d, 0) * 80ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Section heads ---------- */
section h2 { font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; font-weight: 700; }
.lede { margin-top: 14px; max-width: 38rem; font-size: 18px; color: var(--ink-2); }

/* ---------- The road ---------- */
.road { display: grid; gap: 40px; padding-block: 72px; border-top: 1px solid var(--line); }
@media (min-width: 900px) {
  .road { grid-template-columns: 0.9fr 1.1fr; gap: 64px; padding-block: 112px; }
  .road h2 { position: sticky; top: 48px; align-self: start; }
}
.stops { position: relative; list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 40px; }
/* The road: a blue lane with white dashes, like the "1" and "2" in the logo */
.stops::before {
  content: ""; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 14px; border-radius: 7px;
  background:
    repeating-linear-gradient(to bottom, rgb(255 255 255 / 0.9) 0 10px, transparent 10px 22px) center / 2px 100% no-repeat,
    #12357a;
  transform-origin: top;
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .stops::before { animation: draw linear both; animation-timeline: view(); animation-range: entry 10% cover 55%; }
  }
}
@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.stop { position: relative; display: grid; grid-template-columns: 62px 1fr; gap: 20px; align-items: start; }
.marker {
  position: relative; z-index: 1; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  background: var(--surface); color: var(--blue); font-size: 26px; box-shadow: inset 0 0 0 2px var(--line), var(--shadow);
}
.marker.star { background: #c4182b; color: #fff; box-shadow: 0 12px 28px -12px rgb(196 24 43 / 0.7); }
.stop h3 { font-size: 23px; font-weight: 600; line-height: 1.2; padding-top: 4px; }
.stop p { margin-top: 8px; color: var(--ink-2); max-width: 32rem; }
.stop.finish h3 { padding-top: 16px; }

/* ---------- Memory bento ---------- */
.memory { padding-block: 72px; }
@media (min-width: 900px) { .memory { padding-block: 112px; } }
.bento { display: grid; gap: 16px; margin-top: 40px; }
@media (min-width: 900px) {
  .bento { grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto; }
  .t-almond { grid-row: span 2; }
}
.tile { position: relative; overflow: hidden; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 768px) { .tile { padding: 36px; } }
.tile .big { font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 5.2vw, 64px); line-height: 1; letter-spacing: -0.03em; }
.tile .note { margin-top: auto; padding-top: 16px; font-size: 17px; max-width: 26rem; }
.t-almond { background: #12357a; color: #fff; min-height: 300px; }
@media (min-width: 900px) { .t-almond { min-height: 440px; } }
.t-almond .note { color: rgb(255 255 255 / 0.82); }
.t-almond .hl { color: #ff8f9a; }
.t-almond .eq { font-family: var(--font-display); font-size: 40px; line-height: 1; color: rgb(255 255 255 / 0.5); }
.t-almond::after {
  content: ""; position: absolute; right: -60px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: repeating-linear-gradient(-28deg, #c4182b 0 18px, transparent 18px 36px); opacity: 0.22;
}
.t-flag { background: var(--red-soft); color: var(--ink); }
.t-flag .big { color: var(--red); }
.eq-inline { color: var(--ink-3); font-weight: 500; }
.t-flag .note { color: var(--ink-2); }
.t-say { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.small-q { font-size: 15px; color: var(--ink-3); }
.t-say .big { color: var(--ink); }
.ipa { font-family: var(--font-display); font-size: 22px; font-weight: 500; color: var(--blue); }
.play {
  align-self: flex-start; margin-top: 12px; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px 0 8px;
  border: 0; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-weight: 600; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 180ms ease;
}
.play i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); }
.play:active { transform: scale(0.97); }

/* ---------- Levels ---------- */
.levels { padding-block: 72px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .levels { padding-block: 104px; } }
.tracks { margin-top: 32px; display: grid; }
.track { display: grid; gap: 6px; padding-block: 22px; border-top: 1px solid var(--line); }
.track:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .track { grid-template-columns: 240px 1fr; gap: 32px; align-items: baseline; padding-block: 28px; } }
.track-name { font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--blue); }
.track p:not(.track-name) { color: var(--ink-2); max-width: 36rem; }

/* ---------- Final ---------- */
.final { display: grid; gap: 24px; align-items: center; padding-block: 72px 96px; }
@media (min-width: 900px) { .final { grid-template-columns: auto 1fr; gap: 64px; padding-block: 112px 128px; } }
.twelve {
  position: relative; font-family: var(--font-display); font-weight: 700; font-size: clamp(150px, 26vw, 300px);
  line-height: 0.82; letter-spacing: -0.06em; color: #12357a; padding-bottom: 28px;
}
@media (prefers-color-scheme: dark) { .twelve { color: #8fb0ff; } }
.twelve::after {
  content: ""; position: absolute; left: 4%; right: 6%; bottom: 0; height: 22px; border-radius: 22px;
  background: linear-gradient(#c4182b 0 7px, transparent 7px 13px, #c4182b 13px 20px, transparent 20px);
  transform: rotate(-3deg);
}
.final-copy { display: flex; flex-direction: column; gap: 0; }
.final .waitlist { margin-top: 28px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 24px 0 calc(env(safe-area-inset-bottom, 0px) + 28px); font-size: 14px; color: var(--ink-3); }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot a { color: var(--ink-2); font-weight: 600; text-decoration: none; }
@media (hover: hover) { .foot a:hover { text-decoration: underline; text-underline-offset: 3px; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
  .stage img, .bars i { animation: none !important; }
  .bubble, .listen, .verdict { transition-duration: 1ms !important; }
}
