/**
 * kids.talkio.com — Talkio Kids landing page.
 *
 * Same tokens as the app's constants/theme.ts, deliberately: this page and the
 * first screen a parent sees after installing have to look like one product.
 * The two rules that carry the app carry the page too —
 *
 *   1. Depth is a HARD offset, never a blur. Raised things sit on a darker copy
 *      of themselves pushed straight down (0 6px 0 #C1901A). A blurred shadow is
 *      invisible on a ground this dark.
 *   2. Surfaces are washes, not slabs. rgba(255,255,255,.04) inside a 2px
 *      rgba(255,255,255,.08) edge, so the nebula shows through and the page
 *      stays one continuous space instead of a stack of cards.
 */

/* ------------------------------------------------------------------ tokens */

:root {
  /* The sky. --void-900 is the page ground; 300–600 are the nebula tops. */
  --void-950: #06081a;
  --void-900: #070a20;
  --void-800: #0d1234;
  --void-700: #141a3e;
  --void-600: #1b2461;
  --void-500: #22317a;
  --void-400: #2c2a78;
  --void-300: #3b2e86;

  /* Gold: go · you · reward. */
  --gold-100: #ffe7b0;
  --gold-300: #ffd98f;
  --gold-500: #ffd24a;
  --gold-700: #c1901a;
  --gold-ink: #10143a;

  /* Teal: correct · here, now. */
  --teal-100: #a9f0de;
  --teal-500: #58e1c0;
  --teal-700: #2e9e85;
  --teal-ink: #073a31;

  /* Rose: not quite. */
  --rose-500: #ff7ac8;

  /* Text, on one cool ramp from white down to the locked grey. */
  --frost-0: #ffffff;
  --frost-100: #c9d0ff;
  --frost-200: #b9c0f0;
  --frost-300: #9aa3d6;
  --frost-400: #8a93c8;
  --frost-500: #7b85bc;
  --frost-600: #6b75ae;

  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --body: Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --shell: 1200px;
  --gutter: 32px;
}

/* ------------------------------------------------------------------- reset */

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

html {
  scroll-behavior: smooth;
  /* The sticky header would otherwise land on top of a jumped-to heading. */
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--void-900);
  color: var(--frost-0);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--gold-500);
  text-decoration: none;
}

a:hover {
  color: var(--gold-100);
}

:focus-visible {
  outline: 3px solid var(--teal-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--gold-500);
  color: var(--gold-ink);
  font: 800 15px/1 var(--display);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 16px;
  color: var(--gold-ink);
}

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

/* ---------------------------------------------------------------- skeleton */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/**
 * The star field. A stack of tiny radial gradients rather than an image: it
 * costs nothing to load, scales to any viewport, and the three signal colours
 * appear in it so the sky belongs to the same palette as everything on it.
 */
.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.85;
  background-image:
    radial-gradient(1.8px 1.8px at 8% 12%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 22% 34%, #fff, transparent),
    radial-gradient(2.6px 2.6px at 42% 8%, var(--gold-500), transparent),
    radial-gradient(1.8px 1.8px at 63% 26%, #fff, transparent),
    radial-gradient(2.6px 2.6px at 78% 14%, var(--teal-500), transparent),
    radial-gradient(1.8px 1.8px at 91% 38%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 13% 62%, #fff, transparent),
    radial-gradient(2.6px 2.6px at 86% 72%, var(--rose-500), transparent),
    radial-gradient(1.8px 1.8px at 34% 84%, #fff, transparent);
}

.eyebrow {
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.eyebrow--teal {
  color: var(--teal-500);
}

.eyebrow--rose {
  color: var(--rose-500);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 640px;
}

.section-head h2 {
  font: 800 clamp(30px, 3.6vw, 44px) / 1.06 var(--display);
  text-wrap: balance;
}

.section-head p {
  font-size: 18px;
  color: var(--frost-300);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- buttons */

/**
 * Sentence case, not all-caps — same as the app. Starpath shouts with size,
 * weight and colour instead.
 */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.store-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: 18px;
  color: var(--frost-0);
  background: var(--surface-strong);
  border: 2px solid var(--border-strong);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease,
    background 0.15s ease;
}

.store-button:hover {
  color: var(--frost-0);
  background: rgba(255, 255, 255, 0.12);
}

.store-button--primary {
  background: var(--gold-500);
  color: var(--gold-ink);
  border: 0;
  box-shadow: 0 6px 0 var(--gold-700);
}

.store-button--primary:hover {
  background: var(--gold-300);
  color: var(--gold-ink);
}

/* Presses into its own lip rather than lifting off the page. */
.store-button--primary:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--gold-700);
}

.store-button__mark {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.store-button__mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.store-button__lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.store-button__kicker {
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.12em;
  color: var(--frost-300);
}

.store-button--primary .store-button__kicker {
  color: rgba(16, 20, 58, 0.75);
}

.store-button__store {
  font: 800 19px/1 var(--display);
}

.store-note {
  font-size: 13px;
  color: var(--frost-500);
}

/* ----------------------------------------------------------------- header */

/**
 * No `overflow: hidden` here, deliberately: it would make .top a scroll
 * container and the sticky masthead inside it would unstick the moment the
 * hero left the viewport. Body already clips horizontally, which is all the
 * tilted back phone needs.
 */
.top {
  position: relative;
  background: radial-gradient(
    90% 60% at 50% -10%,
    var(--void-400) 0%,
    var(--void-700) 45%,
    var(--void-900) 100%
  );
}

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  /* The sticky bar crosses the nebula, so it needs its own ground once the
     page scrolls under it. A blur alone leaves the gold wordmark unreadable
     over the bright top of the gradient. */
  background: rgba(7, 10, 32, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 2px solid transparent;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--frost-0);
}

.wordmark:hover {
  color: var(--frost-0);
}

/**
 * The real app icon, so the thing a parent taps on their home screen and the
 * thing at the top of this page are the same object. Rounded here rather than
 * baked into the PNG, because the stores apply their own mask to the square.
 */
.wordmark__badge {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex-shrink: 0;
  /* A subtle keyline keeps the yellow tile crisp against bright sections too. */
  border: 2px solid rgba(255, 255, 255, 0.12);
}

.wordmark__text {
  font: 800 24px/1 var(--display);
  white-space: nowrap;
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.masthead__nav a {
  font: 700 15px/1 var(--body);
  color: var(--frost-200);
}

.masthead__nav a:hover {
  color: var(--frost-0);
}

.masthead__cta {
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--gold-500);
  color: var(--gold-ink) !important;
  font: 800 15px/1 var(--display) !important;
  box-shadow: 0 4px 0 var(--gold-700);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
}

.masthead__cta:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--gold-700);
}

/* ------------------------------------------------------------------- hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-block: 44px 96px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 560px;
}

.hero__badge {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(88, 225, 192, 0.14);
  border: 2px solid rgba(88, 225, 192, 0.4);
  font: 800 13px/1 var(--display);
  color: var(--teal-500);
}

.hero__badge::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--teal-500);
}

.hero h1 {
  font: 800 clamp(38px, 5vw, 62px) / 1.02 var(--display);
  text-wrap: balance;
}

.hero__blurb {
  font-size: 20px;
  color: var(--frost-200);
  text-wrap: pretty;
}

.hero__promises {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: 700 14px/1.3 var(--body);
  color: var(--frost-400);
}

.hero__promises li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__promises li::before {
  content: "✓";
  color: var(--teal-500);
}

/* ------------------------------------------------------- phone mock-ups */

/**
 * Two phones, the front one overlapping the back one. Absolute positioning
 * only above 1080px, where there is room for the overlap; below that they
 * stack in flow so nothing gets clipped or covered.
 */
.hero__phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 560px;
  width: 100%;
}

.phone {
  border-radius: 44px;
  background: #000;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.18);
  padding: 10px;
  animation: drift 9s ease-in-out infinite;
}

.phone__screen {
  border-radius: 35px;
  overflow: hidden;
  background: radial-gradient(
    110% 60% at 50% 0%,
    var(--void-500) 0%,
    var(--void-800) 45%,
    var(--void-900) 100%
  );
  padding: 24px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.phone--back {
  position: absolute;
  top: 96px;
  left: 50%;
  margin-left: -300px;
  width: 268px;
  transform: rotate(-7deg);
  border-radius: 36px;
  padding: 9px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.14);
  animation-duration: 7s;
}

.phone--back .phone__screen {
  border-radius: 28px;
  padding: 22px 16px 26px;
  background: radial-gradient(
    110% 70% at 50% 0%,
    var(--void-600) 0%,
    var(--void-800) 60%,
    var(--void-900) 100%
  );
}

.phone--front {
  position: relative;
  z-index: 2;
  width: 310px;
  margin-left: 118px;
}

.phone__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.8;
  background-image:
    radial-gradient(1.6px 1.6px at 14% 16%, #fff, transparent),
    radial-gradient(2.2px 2.2px at 62% 10%, var(--gold-500), transparent),
    radial-gradient(1.6px 1.6px at 88% 44%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 26% 72%, #fff, transparent);
}

/* --- the exercise screen (back phone) --- */

.mock-row {
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
}

.mock-quit {
  font: 800 16px/1 var(--body);
  color: var(--frost-600);
}

.mock-progress {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.mock-progress span {
  display: block;
  height: 100%;
  background: var(--teal-500);
}

.mock-xp {
  font: 800 11px/1 var(--display);
  color: var(--gold-500);
}

.mock-question {
  font: 800 17px/1.2 var(--display);
}

.mock-question em {
  font-style: normal;
  color: var(--gold-500);
}

.mock-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.mock-choice {
  padding: 8px;
  border-radius: 15px;
  background: var(--surface-strong);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/**
 * The sunken well the sprite sits in, copied from OptionCard's `well`: it gives
 * every sprite the same frame whatever its silhouette, which is what stops four
 * differently-shaped drawings reading as a ransom note.
 */
.mock-choice__well {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 62px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.mock-choice__well img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.mock-choice--chosen {
  background: rgba(255, 210, 74, 0.16);
  border-color: var(--gold-500);
}

.mock-choice--chosen .mock-choice__well {
  background: rgba(255, 255, 255, 0.08);
}

.mock-check {
  height: 40px;
  border-radius: 14px;
  background: var(--teal-500);
  color: var(--teal-ink);
  font: 800 15px/40px var(--display);
  text-align: center;
  box-shadow: 0 4px 0 var(--teal-700);
}

/* --- the star trail (front phone) --- */

.mock-level {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 210, 74, 0.16);
  border: 2px solid rgba(255, 210, 74, 0.5);
  font: 800 12px/1 var(--display);
  color: var(--gold-500);
}

.mock-level::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--gold-500);
  transform: rotate(45deg);
}

.mock-xpbar {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.mock-xpbar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500), var(--rose-500));
}

.mock-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.mock-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mock-unit {
  position: relative;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    rgba(88, 225, 192, 0.22),
    rgba(88, 225, 192, 0.06)
  );
  border: 2px solid rgba(88, 225, 192, 0.4);
}

.mock-unit__eyebrow {
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.14em;
  color: var(--teal-500);
}

.mock-unit__title {
  font: 800 17px/1.1 var(--display);
  margin-top: 5px;
}

.mock-unit__meta {
  font: 600 11px/1 var(--body);
  color: var(--teal-100);
  margin-top: 5px;
}

.mock-trail {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 6px;
}

.mock-stop {
  display: flex;
  align-items: center;
  gap: 11px;
}

/* The serpentine: each stop sits at its own indent, so the trail reads as a
   route across a map rather than a column of buttons. */
.mock-stop--a {
  margin-left: 112px;
}
.mock-stop--b {
  margin-left: 62px;
}
.mock-stop--c {
  margin-left: 24px;
}

.mock-node {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--gold-500);
  box-shadow: 0 5px 0 var(--gold-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* One gold diamond for every finished stop — the app draws no per-kind glyphs. */
.mock-node::after {
  content: "";
  width: 19px;
  height: 19px;
  background: var(--gold-ink);
  transform: rotate(45deg);
  border-radius: 4px;
}

.mock-stop__title {
  font: 800 11px/1.2 var(--display);
  color: var(--gold-300);
}

.mock-dots {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 7px 0;
}

.mock-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 210, 74, 0.45);
}

.mock-dots--a {
  margin-left: 132px;
}
.mock-dots--b {
  margin-left: 86px;
}

.mock-dots span:nth-child(2) {
  margin-left: -12px;
  opacity: 0.75;
}

.mock-dots span:nth-child(3) {
  margin-left: -26px;
  opacity: 0.55;
}

.mock-current {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
}

.mock-current__node {
  position: relative;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
}

.mock-current__pulse {
  position: absolute;
  inset: -5px;
  border-radius: 999px;
  border: 3px solid var(--teal-500);
  animation: starpulse 2s ease-out infinite;
}

.mock-current__disc {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: var(--teal-500);
  box-shadow: 0 6px 0 var(--teal-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-current__disc::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 19px solid var(--teal-ink);
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 5px;
}

.mock-current__copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mock-start {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--teal-500);
  color: var(--teal-ink);
  font: 800 10px/1 var(--display);
  letter-spacing: 0.08em;
}

.mock-current__title {
  font: 800 13px/1.15 var(--display);
}

.mock-current__meta {
  font: 700 10px/1 var(--mono);
  color: var(--frost-300);
}

/* ------------------------------------------------------------ how it works */

.steps {
  padding-block: 96px 24px;
  display: flex;
  flex-direction: column;
  gap: 52px;
}

/**
 * `min(260px, 100%)` rather than a bare 260px: auto-fit still collapses to one
 * column on a phone, but that last column can then be narrower than its own
 * minimum instead of pushing the whole document wider than the viewport.
 */
.steps__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 24px;
}

.step {
  padding: 32px;
  border-radius: 28px;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step__number {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 16px;
  font: 800 22px/1 var(--display);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 210, 74, 0.16);
  border: 2px solid rgba(255, 210, 74, 0.5);
  color: var(--gold-500);
}

.step:nth-child(2) .step__number {
  background: rgba(88, 225, 192, 0.16);
  border-color: rgba(88, 225, 192, 0.5);
  color: var(--teal-500);
}

.step:nth-child(3) .step__number {
  background: rgba(255, 122, 200, 0.16);
  border-color: rgba(255, 122, 200, 0.5);
  color: var(--rose-500);
}

.step h3 {
  font: 800 24px/1.15 var(--display);
}

.step p {
  font-size: 16px;
  color: var(--frost-300);
  text-wrap: pretty;
}

/* ------------------------------------------------------------------- Nox */

.crew {
  padding-block: 96px;
}

.crew__panel {
  position: relative;
  border-radius: 40px;
  overflow: hidden;
  background: radial-gradient(
    80% 90% at 15% 20%,
    var(--void-300) 0%,
    var(--void-700) 55%,
    var(--void-800) 100%
  );
  border: 2px solid rgba(88, 225, 192, 0.25);
  padding: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 48px;
  align-items: center;
}

.crew__stars {
  opacity: 0.7;
  background-image:
    radial-gradient(1.8px 1.8px at 18% 22%, #fff, transparent),
    radial-gradient(2.6px 2.6px at 70% 12%, var(--gold-500), transparent),
    radial-gradient(1.8px 1.8px at 88% 60%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 40% 82%, #fff, transparent);
}

.crew__portrait {
  position: relative;
  display: flex;
  justify-content: center;
}

.crew__portrait img {
  width: 300px;
  height: 300px;
  max-width: 100%;
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid rgba(88, 225, 192, 0.55);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
}

.crew__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.crew__copy h2 {
  font: 800 clamp(30px, 3.4vw, 42px) / 1.06 var(--display);
  text-wrap: balance;
}

.crew__copy > p {
  font-size: 18px;
  color: var(--frost-200);
  text-wrap: pretty;
}

.crew__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.crew__facts li {
  flex: 1 1 min(220px, 100%);
  padding: 18px;
  border-radius: 20px;
  background: var(--surface-strong);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.crew__facts b {
  display: block;
  font: 800 17px/1.15 var(--display);
}

.crew__facts span {
  display: block;
  font-size: 14px;
  line-height: 1.45;
  color: var(--frost-300);
  margin-top: 6px;
}

/* ---------------------------------------------------------------- questions */

.faq {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px var(--gutter) 96px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/**
 * A real <details>, so a parent scanning on a phone sees seven questions rather
 * than seven answers, and the browser handles the state.
 */
.faq details {
  border-radius: 24px;
  background: var(--surface);
  border: 2px solid var(--border);
  overflow: hidden;
}

.faq summary {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  font: 800 21px/1.25 var(--display);
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-right: 3px solid var(--gold-500);
  border-bottom: 3px solid var(--gold-500);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.18s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-3px, -3px);
}

.faq summary:hover {
  color: var(--gold-100);
}

.faq details p {
  padding: 0 28px 26px;
  font-size: 16px;
  color: var(--frost-300);
  text-wrap: pretty;
}

/* ------------------------------------------------------------- closing CTA */

.closing {
  position: relative;
  overflow: hidden;
  background: radial-gradient(
    70% 100% at 50% 0%,
    var(--void-400) 0%,
    var(--void-800) 60%,
    var(--void-900) 100%
  );
  border-top: 2px solid rgba(255, 255, 255, 0.07);
}

.closing__stars {
  opacity: 0.8;
  background-image:
    radial-gradient(1.8px 1.8px at 12% 26%, #fff, transparent),
    radial-gradient(2.6px 2.6px at 48% 14%, var(--gold-500), transparent),
    radial-gradient(1.8px 1.8px at 82% 34%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 66% 74%, var(--teal-500), transparent);
}

.closing__inner {
  position: relative;
  padding-block: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.closing h2 {
  font: 800 clamp(32px, 4vw, 48px) / 1.05 var(--display);
  max-width: 680px;
  text-wrap: balance;
}

.closing p {
  font-size: 19px;
  color: var(--frost-200);
  max-width: 540px;
  text-wrap: pretty;
}

.closing .store-buttons {
  justify-content: center;
}

/* ----------------------------------------------------------------- footer */

.footer {
  position: relative;
  border-top: 2px solid rgba(255, 255, 255, 0.07);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-block: 28px;
}

.footer .wordmark__badge {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.footer .wordmark__text {
  font-size: 19px;
}

.footer__links {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  align-items: center;
  font: 600 14px/1 var(--body);
  color: var(--frost-500);
}

.footer__links a {
  color: var(--frost-500);
}

.footer__links a:hover {
  color: var(--frost-100);
}

/* ------------------------------------------------------------- animations */

@keyframes starpulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.26);
    opacity: 0;
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

/* The back phone is rotated, so its drift has to carry the rotation too or the
   animation snaps it upright on the first frame. */
@keyframes drift-tilted {
  0%,
  100% {
    transform: rotate(-7deg) translateY(0);
  }
  50% {
    transform: rotate(-7deg) translateY(-14px);
  }
}

.phone--back {
  animation-name: drift-tilted;
}

/* ------------------------------------------------------------- responsive */

/**
 * How far the front phone sits over the back one. The draft overlapped them by
 * ~40%, which cut the exercise question mid-word; this leaves the whole
 * question and the first column of answers readable, which is the only reason
 * the second phone is there at all.
 */

/* Below this the two phones can no longer overlap without the back one
   leaving the viewport, so they stack in flow instead. */
@media (max-width: 1080px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    gap: 40px;
  }

  .hero__copy {
    max-width: 640px;
  }

  .hero__phones {
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    min-height: 0;
  }

  /* Stacked, trail first: the star trail is the screen worth showing, and the
     exercise below it is the detail. */
  .phone--back {
    position: static;
    margin-left: 0;
    max-width: 100%;
    order: 2;
  }

  .phone--front {
    margin-left: 0;
    max-width: 100%;
    order: 1;
  }
}

/**
 * Below ~400px the phone mock is wider than the gutters allow, so it shrinks —
 * and the star trail's serpentine indents have to shrink with it, or the stop
 * captions run off the side of a screen that is now narrower than the offsets
 * were drawn for.
 */
@media (max-width: 400px) {
  .mock-stop--a {
    margin-left: 64px;
  }
  .mock-stop--b {
    margin-left: 34px;
  }
  .mock-stop--c {
    margin-left: 8px;
  }
  .mock-dots--a {
    margin-left: 84px;
  }
  .mock-dots--b {
    margin-left: 52px;
  }
}

@media (max-width: 720px) {
  :root {
    --gutter: 20px;
  }

  .masthead__nav a:not(.masthead__cta) {
    display: none;
  }

  .hero {
    padding-block: 24px 64px;
  }

  .steps {
    padding-block: 64px 16px;
    gap: 36px;
  }

  .crew {
    padding-block: 64px;
  }

  .crew__panel {
    padding: 32px 24px;
    gap: 32px;
    border-radius: 32px;
  }

  .faq {
    padding-bottom: 64px;
  }

  .faq summary {
    padding: 20px 22px;
    font-size: 18px;
  }

  .faq details p {
    padding: 0 22px 22px;
  }

  .closing__inner {
    padding-block: 64px;
  }

  .footer__inner {
    justify-content: center;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
    gap: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .phone,
  .mock-current__pulse {
    animation: none;
  }

  /* The rotation is layout, not motion — keep it when the drift is switched off. */
  .phone--back {
    transform: rotate(-7deg);
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================ legal pages */

/**
 * Privacy Policy and Terms of Use. Same masthead, footer and palette as the
 * landing page, but a measure built for reading rather than scanning: one
 * column, ~70 characters, and a quieter ground with no drifting anything.
 *
 * These are documents a parent may need to read carefully, print, or send to
 * someone. Everything here serves that and nothing else.
 */

.legal-top {
  position: relative;
  background: radial-gradient(
    120% 40% at 50% -20%,
    var(--void-400) 0%,
    var(--void-700) 40%,
    var(--void-900) 100%
  );
}

.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px var(--gutter) 96px;
}

.legal-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 36px;
  border-bottom: 2px solid var(--border);
}

.legal-head h1 {
  font: 800 clamp(32px, 4.4vw, 46px) / 1.06 var(--display);
  text-wrap: balance;
}

.legal-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font: 700 12px/1.4 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--frost-400);
}

.legal-dates b {
  color: var(--frost-200);
  font-weight: 700;
}

/**
 * The plain-language summary. It is explicitly not the policy — saying so is
 * the point, because a summary a parent mistakes for the agreement is worse
 * than no summary at all.
 */
.legal-brief {
  margin-top: 36px;
  padding: 28px 30px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(88, 225, 192, 0.16),
    rgba(88, 225, 192, 0.04)
  );
  border: 2px solid rgba(88, 225, 192, 0.35);
}

.legal-brief h2 {
  font: 800 20px/1.2 var(--display);
  margin-bottom: 14px;
}

.legal-brief ul {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--frost-100);
  font-size: 16px;
}

.legal-brief ul::marker,
.legal-brief li::marker {
  color: var(--teal-500);
}

.legal-brief p {
  margin-top: 14px;
  font-size: 14px;
  color: var(--teal-100);
}

.legal-toc {
  margin-top: 36px;
  padding: 24px 28px;
  border-radius: 22px;
  background: var(--surface);
  border: 2px solid var(--border);
}

.legal-toc h2 {
  font: 700 12px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 14px;
}

.legal-toc ol {
  margin: 0;
  padding-left: 24px;
  columns: 2;
  column-gap: 32px;
  font-size: 15px;
  color: var(--frost-300);
}

.legal-toc li {
  margin-bottom: 7px;
  break-inside: avoid;
}

.legal-toc a {
  color: var(--frost-200);
}

.legal-toc a:hover {
  color: var(--gold-500);
}

.legal-body {
  margin-top: 12px;
}

.legal-body section {
  margin-top: 44px;
  scroll-margin-top: 100px;
}

.legal-body h2 {
  font: 800 25px/1.2 var(--display);
  margin-bottom: 14px;
  text-wrap: balance;
}

.legal-body h3 {
  font: 800 18px/1.25 var(--display);
  margin: 26px 0 10px;
}

.legal-body p,
.legal-body li {
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--frost-200);
  text-wrap: pretty;
}

.legal-body p + p {
  margin-top: 14px;
}

.legal-body ul {
  margin: 14px 0 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.legal-body li::marker {
  color: var(--frost-500);
}

.legal-body strong {
  color: var(--frost-0);
  font-weight: 800;
}

/* The contact block, and anything else that is a record rather than prose. */
.legal-card {
  margin-top: 18px;
  padding: 22px 26px;
  border-radius: 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  font-size: 16px;
  line-height: 1.7;
  color: var(--frost-200);
}

.legal-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
}

.legal-card dt {
  font: 700 12px/1.7 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--frost-400);
}

.legal-card dd {
  margin: 0;
  color: var(--frost-100);
}

.legal-updated {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 2px solid var(--border);
  font-size: 14px;
  color: var(--frost-500);
}

@media (max-width: 720px) {
  .legal-page {
    padding: 36px var(--gutter) 64px;
  }

  .legal-toc ol {
    columns: 1;
  }

  .legal-brief,
  .legal-toc {
    padding: 22px;
  }

  .legal-card {
    padding: 18px 20px;
  }

  .legal-card dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .legal-card dd {
    margin-bottom: 10px;
  }
}

/* Printed and posted to someone is a real way these get read. */
@media print {
  .masthead,
  .footer,
  .skip-link,
  .legal-toc {
    display: none;
  }

  body,
  .legal-top {
    background: #fff;
    color: #000;
  }

  .legal-body p,
  .legal-body li,
  .legal-body strong,
  .legal-head h1,
  .legal-body h2,
  .legal-body h3,
  .legal-card,
  .legal-card dd,
  .legal-card dt,
  .legal-dates,
  .legal-dates b {
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
