/* ==========================================================================
   Trivington — trivington.com
   Light-first marketing system with midnight product chapters.
   Palette grounded in the iOS app (Colors.swift): midnight #07131F,
   teal #1C7C80, champagne #D6C19A, gold #D4A64A, answer quartet.
   Display face: Bricolage Grotesque (self-hosted, SIL OFL — see fonts/).
   All non-essential motion sits behind prefers-reduced-motion: no-preference.
   ========================================================================== */

@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
}

:root {
  /* Base surfaces — midnight-first (the app's foundation) */
  --paper: #07131f;
  --surface: #0b1e2b;
  --surface-2: #103042;
  --ink: #f7faff;
  --ink-2: rgba(247, 250, 255, 0.76);
  --ink-3: rgba(247, 250, 255, 0.58);
  --line-l: rgba(235, 248, 248, 0.13);
  --line-l-strong: rgba(235, 248, 248, 0.24);

  /* Midnight chapters (app foundation) */
  --midnight-deep: #030a10;
  --midnight: #07131f;
  --petrol: #0d3b47;
  --card-dark: #0a1c28;
  --line-d: rgba(235, 248, 248, 0.13);
  --line-d-strong: rgba(235, 248, 248, 0.24);
  --text-d: #f7faff;
  --text-d2: rgba(247, 250, 255, 0.74);
  --text-d3: rgba(247, 250, 255, 0.56);

  /* Brand accents */
  --teal: #1c7c80;
  --teal-bright: #4db8b4;
  --teal-ink: #4db8b4; /* link/accent text on dark */
  --champagne: #d6c19a;
  --gold: #d4a64a;
  --gold-ink: #d6c19a;

  /* Answer quartet + states */
  --coral: #b95e51;
  --blue: #3d7fa3;
  --amber: #c7a13b;
  --mint: #2e886b;
  --green: #2fa277;
  --green-ink: #1e7d59;
  --red: #d15c5c;

  --card-border-dark: linear-gradient(
    165deg,
    rgba(235, 248, 248, 0.22),
    rgba(235, 248, 248, 0.06) 38%,
    rgba(28, 124, 128, 0.3) 82%,
    rgba(214, 193, 154, 0.22)
  );

  --shadow-s: 0 4px 16px rgba(1, 5, 9, 0.35), 0 12px 32px rgba(1, 5, 9, 0.3);
  --shadow-m: 0 8px 24px rgba(1, 5, 9, 0.45), 0 28px 70px rgba(1, 5, 9, 0.5);
  --shadow-dark: 0 24px 60px rgba(1, 5, 9, 0.5);

  --font-display: "Bricolage Grotesque", ui-rounded, "SF Pro Rounded",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, system-ui, sans-serif;

  --radius-s: 14px;
  --radius: 22px;
  --radius-l: 34px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.42, 1);
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background:
    radial-gradient(64rem 42rem at 85% -6%, rgba(28, 124, 128, 0.2), transparent 68%),
    radial-gradient(50rem 38rem at -12% 28%, rgba(214, 193, 154, 0.06), transparent 70%),
    radial-gradient(70rem 50rem at 50% 120%, rgba(13, 59, 71, 0.45), transparent 72%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Film grain — subtle material texture over the whole page */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  background: url("/assets/noise.png") repeat;
  background-size: 128px 128px;
  opacity: 0.05;
  mix-blend-mode: overlay;
}

body.menu-open {
  overflow: hidden;
}

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

a {
  color: var(--teal-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--champagne);
  color: var(--midnight);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p {
  margin: 0 0 1em;
}

.shell {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--gold);
  color: #07131f;
  font-weight: 700;
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 1rem;
  color: #07131f;
}

/* --------------------------------------------------------------------------
   Announcement bar
   -------------------------------------------------------------------------- */
.announce {
  background: var(--midnight-deep);
  border-bottom: 1px solid var(--line-d);
  color: var(--text-d2);
  font-size: 0.86rem;
  text-align: center;
}

.announce p {
  margin: 0;
  padding: 0.55rem 1rem;
}

.announce a {
  color: var(--champagne);
  font-weight: 700;
  margin-left: 0.35rem;
}

.announce a:hover {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(3, 10, 16, 0.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(3, 10, 16, 0.9);
  border-bottom-color: var(--line-l);
  box-shadow: 0 12px 40px rgba(1, 5, 9, 0.45);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  transition: padding 0.35s var(--ease);
}

.site-header.is-scrolled .site-nav {
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-crest {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(28, 124, 128, 0.35);
  transition: transform 0.5s var(--ease-spring);
}

.brand:hover .brand-crest {
  transform: rotate(-8deg) scale(1.06);
}

.brand-word {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2.2vw, 1.7rem);
  flex-wrap: wrap;
}

.nav-links a:not(.nav-cta) {
  position: relative;
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.35rem 0.1rem;
}

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.05rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-links a:not(.nav-cta):hover {
  color: var(--ink);
}

.nav-links a:not(.nav-cta):hover::after,
.nav-links a:not(.nav-cta):focus-visible::after {
  transform: scaleX(1);
}

.nav-cta {
  font-size: 0.9rem;
  padding: 0.55rem 1.15rem;
}

/* Mobile menu (JS enhances; without JS links simply wrap) */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-l-strong);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  min-height: 44px;
  cursor: pointer;
}

.menu-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.menu-toggle__bars i {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars i:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

@media (max-width: 860px) {
  .js .menu-toggle {
    display: inline-flex;
  }

  .js .nav-links {
    display: none;
  }

  .js .nav-links.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 120;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.4rem;
    background: var(--paper);
    padding: 5.2rem 1.4rem 2rem;
  }

  .js .nav-links.is-open a:not(.nav-cta) {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ink);
    padding: 0.75rem 0.4rem;
    border-bottom: 1px solid var(--line-l);
  }

  .js .nav-links.is-open .nav-cta {
    margin-top: 1.4rem;
    justify-content: center;
    font-size: 1.05rem;
    padding: 0.9rem 1.4rem;
  }

  .js .menu-toggle {
    position: relative;
    z-index: 130;
  }
}

/* --------------------------------------------------------------------------
   Buttons & kickers
   -------------------------------------------------------------------------- */
.button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.55rem;
  min-height: 44px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease),
    color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.button:active {
  transform: scale(0.97);
}

.button--lg {
  padding: 1rem 1.9rem;
  font-size: 1.06rem;
}

.button--gold {
  background: linear-gradient(135deg, #e9d7b2, var(--gold) 60%, #c2953f);
  color: #241a05;
  box-shadow: 0 8px 26px rgba(212, 166, 74, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.button--gold:hover {
  color: #170f02;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(212, 166, 74, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.button--ghost {
  border-color: var(--line-l-strong);
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-s);
}

.button--ghost:hover {
  color: var(--teal-ink);
  border-color: var(--teal);
  transform: translateY(-2px);
}

.chapter--dark .button--ghost,
.chapter--deep .button--ghost {
  background: rgba(13, 59, 71, 0.28);
  border-color: var(--line-d-strong);
  color: var(--text-d);
  box-shadow: none;
}

@media (prefers-reduced-motion: no-preference) {
  .button::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-130%) skewX(-18deg);
    background: linear-gradient(
      105deg,
      transparent 32%,
      rgba(255, 255, 255, 0.4) 50%,
      transparent 68%
    );
  }

  .button:hover::after {
    transform: translateX(130%) skewX(-18deg);
    transition: transform 0.7s var(--ease);
  }
}

.text-link {
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--teal-ink);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.kicker::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.kicker--gold {
  color: var(--gold);
}

.chapter--dark .kicker,
.chapter--deep .kicker {
  color: var(--teal-bright);
}

.chapter--dark .kicker--gold,
.chapter--deep .kicker--gold {
  color: var(--gold);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] .kicker::before {
    width: 0;
    transition: width 0.6s var(--ease) 0.25s;
  }

  .reveal-ready [data-reveal].is-visible .kicker::before {
    width: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: clamp(2.8rem, 6vw, 5rem);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -18rem;
  left: 50%;
  transform: translateX(-50%);
  width: 72rem;
  height: 42rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(28, 124, 128, 0.24), transparent);
  filter: blur(40px);
  pointer-events: none;
}

.hero__copy {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__copy h1 {
  font-size: clamp(3rem, 8.2vw, 5.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.35em;
}

.hl {
  display: block;
  overflow: hidden;
  padding-block: 0.04em;
}

.hl-inner {
  display: block;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .hero__copy .hl-inner {
    transform: translateY(112%);
    transition: transform 0.9s var(--ease);
  }

  .reveal-ready .hero__copy.is-visible .hl:nth-child(1) .hl-inner {
    transform: none;
    transition-delay: 0.08s;
  }

  .reveal-ready .hero__copy.is-visible .hl:nth-child(2) .hl-inner {
    transform: none;
    transition-delay: 0.2s;
  }
}

.hero__copy h1 .accent .hl-inner {
  background: linear-gradient(100deg, var(--teal-bright) 10%, #9fd8d3 40%, var(--champagne) 70%, var(--gold) 95%);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .hero__copy h1 .accent .hl-inner {
    animation: shimmer 9s ease-in-out infinite alternate;
  }
}

@keyframes shimmer {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.hero__sub {
  font-size: clamp(1.05rem, 1.9vw, 1.25rem);
  color: var(--ink-2);
  max-width: 38em;
  text-wrap: balance;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-block: 1.6rem 1.9rem;
}

.hero__facts {
  display: flex;
  justify-content: center;
  gap: clamp(1.4rem, 4vw, 3.2rem);
  flex-wrap: wrap;
}

.hero__facts > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__facts strong {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.hero__facts span {
  color: var(--ink-3);
  font-size: 0.84rem;
}

/* Hero scene: phone + floating cards */
.hero-scene {
  position: relative;
  margin-top: clamp(2rem, 4.5vw, 3.4rem);
  display: flex;
  justify-content: center;
  perspective: 1300px;
}

.phone-wrap {
  position: relative;
  z-index: 2;
}

.float-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: clamp(240px, 25vw, 302px);
  background: var(--surface);
  border: 1px solid var(--line-l);
  border-radius: 18px;
  box-shadow: var(--shadow-m);
  padding: 0.72rem 1rem;
  font-size: 0.9rem;
}

.fc-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: -0.02em;
  color: #07131f;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.fc-icon--img {
  object-fit: cover;
  border: 2px solid var(--line-l-strong);
  box-shadow: none;
  background: var(--petrol);
}

.fc-body {
  min-width: 0;
}

.fc-body strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.96rem;
  line-height: 1.25;
  color: var(--ink);
}

.fc-body span {
  display: block;
  color: var(--ink-3);
  font-size: 0.82rem;
  line-height: 1.35;
}

.tone-teal .fc-icon { background: var(--teal-bright); }
.tone-blue .fc-icon { background: var(--blue); color: #f7faff; }
.tone-amber .fc-icon { background: var(--amber); }
.tone-green .fc-icon { background: var(--green); color: #03140c; }
.tone-gold .fc-icon { background: var(--gold); }
.tone-coral .fc-icon { background: var(--coral); color: #f7faff; }
.tone-mint .fc-icon { background: var(--mint); color: #f7faff; }

.pos-l1 { left: 2%; top: 4%; }
.pos-l2 { left: -3%; top: 29%; opacity: 0.6; }
.pos-l3 { left: 4%; top: 54%; }
.pos-l4 { left: 0; top: 79%; opacity: 0.85; }
.pos-r1 { right: 2%; top: 9%; }
.pos-r2 { right: -3%; top: 34%; opacity: 0.85; }
.pos-r3 { right: 4%; top: 59%; opacity: 0.6; }
.pos-r4 { right: 0; top: 84%; }

@media (prefers-reduced-motion: no-preference) {
  .float-card {
    animation: drift 7s ease-in-out infinite;
  }

  .pos-l2, .pos-r1 { animation-delay: 1.3s; animation-duration: 8s; }
  .pos-l3, .pos-r2 { animation-delay: 2.2s; animation-duration: 9s; }
  .pos-l4, .pos-r3 { animation-delay: 3s; animation-duration: 8.5s; }
  .pos-r4 { animation-delay: 3.8s; }
}

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

/* Knowledge Pulse stage pill */
.stage-pill {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 0.15rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  margin: -1.6rem auto 0;
  padding: 0.35rem;
  background: rgba(9, 32, 42, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-d-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-m);
  overflow-x: auto;
  scrollbar-width: none;
}

.stage-pill::-webkit-scrollbar {
  display: none;
}

.stage-pill.is-floating {
  position: fixed;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 80;
}

@media (prefers-reduced-motion: no-preference) {
  .stage-pill.is-floating {
    animation: pill-in 0.45s var(--ease);
  }
}

@keyframes pill-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.stage-pill a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  min-height: 40px;
  border-radius: 999px;
  color: var(--ink-2);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.stage-pill a i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--ink-3);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.stage-pill a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.stage-pill a.is-active {
  background: #f7faff;
  color: #07131f;
}

.stage-pill a.is-active i {
  background: var(--teal-bright);
  border-color: var(--teal-bright);
  transform: scale(1.15);
}

/* --------------------------------------------------------------------------
   Proof strip
   -------------------------------------------------------------------------- */
.proof-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(1180px, calc(100% - 2.5rem));
  margin: clamp(2.6rem, 6vw, 4.5rem) auto clamp(2.2rem, 5vw, 3.6rem);
  border: 1px solid var(--line-l);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-s);
  overflow: hidden;
}

.proof-strip > div {
  padding: 1.15rem 1.2rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-2);
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.proof-strip > div + div {
  border-left: 1px solid var(--line-l);
}

.proof-strip span {
  color: var(--gold-ink);
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Chapter system
   -------------------------------------------------------------------------- */
.chapter {
  padding-block: clamp(3.6rem, 9vw, 7rem);
}

.chapter--tight {
  padding-top: 0;
}

.chapter--dark {
  background:
    radial-gradient(60rem 36rem at 85% -10%, rgba(28, 124, 128, 0.18), transparent 70%),
    var(--midnight-deep);
  border-block: 1px solid var(--line-d);
  color: var(--text-d);
}

.chapter--dark + .chapter--dark {
  border-top: none;
}

.chapter--deep {
  background:
    radial-gradient(55rem 34rem at 12% 0%, rgba(28, 124, 128, 0.24), transparent 70%),
    radial-gradient(48rem 30rem at 95% 100%, rgba(212, 166, 74, 0.1), transparent 70%),
    linear-gradient(175deg, var(--midnight), #0a2530 60%, var(--midnight-deep));
  color: var(--text-d);
}

.chapter--light {
  background: transparent;
}

.chapter--dark + .chapter--dark,
.chapter--dark + .chapter--tight {
  padding-top: 0;
}

.chapter-heading {
  max-width: 52rem;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.2rem, 5vw, 3.6rem);
}

.chapter-heading h2 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
}

.chapter-sub {
  color: var(--ink-2);
  font-size: clamp(1rem, 1.7vw, 1.15rem);
  margin: 0 auto;
  max-width: 44em;
}

.chapter--dark .chapter-sub,
.chapter--deep .chapter-sub {
  color: var(--text-d2);
}

.chapter-sub--left {
  margin: 0;
  text-align: left;
}

/* --------------------------------------------------------------------------
   Statement (dark opener)
   -------------------------------------------------------------------------- */
.statement {
  padding-block: clamp(4rem, 10vw, 7.5rem);
}

.statement__inner {
  max-width: 56rem;
  text-align: center;
}

.statement h2 {
  font-size: clamp(2.2rem, 5.6vw, 3.8rem);
  font-weight: 800;
}

.statement h2 em {
  font-style: normal;
  display: block;
  background: linear-gradient(100deg, var(--teal-bright), var(--champagne));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.statement p {
  color: var(--text-d2);
  font-size: clamp(1.02rem, 1.8vw, 1.2rem);
  max-width: 44em;
  margin: 1.2rem auto 0;
}

/* --------------------------------------------------------------------------
   Walkthrough — Knowledge Pulse timeline
   -------------------------------------------------------------------------- */
.walk-steps {
  list-style: none;
  margin: 0 auto;
  padding: 1rem 0 0;
  position: relative;
  max-width: 60rem;
}

.walk-steps::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 2rem;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    rgba(77, 184, 180, 0.55),
    rgba(77, 184, 180, 0.16) 55%,
    rgba(212, 166, 74, 0.5)
  );
}

.walk-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  align-items: center;
  margin-bottom: clamp(1.4rem, 3vw, 2.4rem);
}

.walk-marker {
  grid-column: 2;
  display: grid;
  place-items: center;
}

.walk-node {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--text-d3);
  background: var(--midnight);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease),
    box-shadow 0.4s var(--ease), transform 0.4s var(--ease-spring);
}

.walk-step.is-active .walk-node {
  border-color: var(--teal-bright);
  background: var(--teal-bright);
  box-shadow: 0 0 0 7px rgba(77, 184, 180, 0.18);
  transform: scale(1.15);
}

.walk-step:last-child.is-active .walk-node {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 7px rgba(212, 166, 74, 0.2);
}

.walk-card {
  grid-column: 3;
  grid-row: 1;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--card-dark), var(--card-dark)) padding-box,
    var(--card-border-dark) border-box;
  box-shadow: var(--shadow-dark);
  padding: 1.4rem 1.5rem 1.3rem;
  max-width: 27rem;
}

.walk-step:nth-child(even) .walk-card {
  grid-column: 1;
  justify-self: end;
}

.walk-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}

.walk-card h3 {
  font-size: 1.24rem;
  font-weight: 700;
  color: var(--text-d);
}

.walk-card p {
  color: var(--text-d2);
  margin: 0;
  font-size: 0.96rem;
}

/* Mini visuals inside walkthrough cards */
.mini {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.mini--chips span {
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line-d-strong);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-d2);
}

.mini--chips span:first-child {
  border-color: var(--teal);
  color: var(--teal-bright);
  background: rgba(28, 124, 128, 0.14);
}

.mini--avatars img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--line-d-strong);
}

.mini--avatars .vs-line {
  flex: 1;
  min-width: 3rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--champagne));
}

.ready-pill {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  border: 1px solid var(--green);
  color: var(--green);
  background: rgba(47, 162, 119, 0.12);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--teal-bright);
}

@media (prefers-reduced-motion: no-preference) {
  .pulse-dot {
    animation: pulse-fade 1.6s ease-in-out infinite;
  }
}

@keyframes pulse-fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.mini--timer {
  gap: 0.7rem;
}

.mini-track {
  flex: 1;
  min-width: 8rem;
  height: 7px;
  border-radius: 999px;
  background: rgba(247, 250, 255, 0.1);
  overflow: hidden;
}

.mini-track i {
  display: block;
  height: 100%;
  width: 66%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-bright), var(--champagne));
}

.mini--timer strong {
  font-family: var(--font-display);
  color: var(--champagne);
}

.mini--reveal {
  flex-direction: column;
  align-items: stretch;
}

.mini-answer {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line-d);
  background: rgba(7, 19, 31, 0.65);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-d);
}

.mini-answer b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--blue);
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: #fff;
}

.mini-answer em {
  margin-left: auto;
  font-style: normal;
  font-weight: 900;
  color: var(--green);
}

.mini-answer.is-correct {
  border-color: var(--green);
  background: rgba(47, 162, 119, 0.15);
}

.mini-answer.is-quiet {
  opacity: 0.55;
}

.mini-answer.is-quiet b {
  background: var(--amber);
}

.mini-answer.is-locked b {
  background: var(--petrol);
  color: var(--teal-bright);
}

.mini--result {
  gap: 0.5rem;
  font-family: var(--font-display);
}

.mini--result strong {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-d);
}

.mini--result strong.lose {
  color: var(--text-d3);
}

.mini--result span {
  color: var(--text-d3);
}

.win-tag {
  font-style: normal;
  margin-left: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(212, 166, 74, 0.16);
  border: 1px solid rgba(212, 166, 74, 0.45);
  color: var(--gold);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}

.rematch-btn {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line-d-strong);
  background: rgba(13, 59, 71, 0.45);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--champagne);
}

/* --------------------------------------------------------------------------
   Bento
   -------------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.bento-card {
  border: 1px solid transparent;
  border-radius: var(--radius-l);
  background:
    linear-gradient(var(--card-dark), var(--card-dark)) padding-box,
    var(--card-border-dark) border-box;
  box-shadow: var(--shadow-dark);
  padding: 1.7rem 1.6rem 1.5rem;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.bento-card:hover {
  transform: translateY(-5px);
}

.bento-card h3 {
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-d);
}

.bento-card p {
  color: var(--text-d2);
  margin: 0;
  font-size: 0.96rem;
}

.bento-card .text-link {
  display: inline-block;
  margin-top: 0.8rem;
  color: var(--teal-bright);
}

.bento-primary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  background:
    radial-gradient(40rem 22rem at 100% 0%, rgba(28, 124, 128, 0.22), transparent 70%),
    linear-gradient(var(--card-dark), var(--card-dark)) padding-box;
  border: 1px solid rgba(28, 124, 128, 0.45);
  padding: clamp(1.7rem, 4vw, 2.8rem);
}

.bento-primary h3 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
}

.bento-primary p {
  font-size: 1.02rem;
}

.bento-primary__demo .question-card {
  margin-bottom: 0.7rem;
}

.bento-primary__demo .answer-grid .demo-answer {
  cursor: default;
}

.b-art {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  min-height: 3.2rem;
}

.b-art--hidden,
.b-art--flow {
  flex-direction: column;
  align-items: stretch;
}

.b-art--flow span {
  padding: 0.4rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--line-d);
  background: rgba(7, 19, 31, 0.6);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-d2);
}

.truth-node {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(47, 162, 119, 0.16);
  border: 1px solid var(--green);
  color: var(--green);
  font-weight: 900;
  font-size: 1.1rem;
}

.truth-row {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line-d);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-d2);
}

.b-art--sudden i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--teal-bright);
  background: var(--teal-bright);
}

.b-art--sudden i:nth-child(n + 5) {
  background: transparent;
}

.b-art--sudden b {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 0.95rem;
}

.b-art--media img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line-d-strong);
  box-shadow: 0 6px 16px rgba(1, 5, 9, 0.45);
}

.b-art--media img:nth-child(2) {
  transform: rotate(-4deg) translateY(-3px);
}

.b-art--media img:nth-child(3) {
  transform: rotate(3deg);
}

.b-art--avatars img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--petrol);
  background: var(--petrol);
  box-shadow: 0 6px 16px rgba(1, 5, 9, 0.45);
}

.b-art--avatars img + img {
  margin-left: -0.9rem;
}

.b-art--avatars img:nth-child(2) {
  transform: translateY(-4px);
  z-index: 1;
  position: relative;
  border-color: var(--teal);
}

.cloud-dot {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--teal-bright);
  background: rgba(28, 124, 128, 0.16);
  color: var(--teal-bright);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
}

.p2p-phone {
  width: 26px;
  height: 44px;
  border-radius: 8px;
  border: 2px solid var(--teal-bright);
  background: rgba(28, 124, 128, 0.15);
}

.p2p-line {
  flex: 1;
  min-width: 3rem;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--teal-bright) 0 9px, transparent 9px 16px);
}

@media (prefers-reduced-motion: no-preference) {
  .p2p-line {
    animation: dash-flow 1.4s linear infinite;
  }
}

@keyframes dash-flow {
  from { background-position: 0 0; }
  to { background-position: 16px 0; }
}

/* --------------------------------------------------------------------------
   Matchmaking
   -------------------------------------------------------------------------- */
.matchmaking__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.matchmaking h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--text-d);
}

.queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.queue-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.9rem;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background:
    linear-gradient(var(--card-dark), var(--card-dark)) padding-box,
    var(--card-border-dark) border-box;
  padding: 1rem 1.2rem;
}

.queue-dot {
  grid-row: 1 / 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--text-d3);
  justify-self: center;
}

.queue-step.is-live .queue-dot {
  border-color: var(--teal-bright);
  background: var(--teal-bright);
}

@media (prefers-reduced-motion: no-preference) {
  .queue-step.is-live .queue-dot {
    animation: pulse-fade 1.6s ease-in-out infinite;
  }
}

.queue-step strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-d);
}

.queue-step span {
  color: var(--text-d3);
  font-size: 0.86rem;
}

/* --------------------------------------------------------------------------
   Category mosaic (light chapter)
   -------------------------------------------------------------------------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 10.5rem;
  grid-auto-flow: dense;
  gap: 0.9rem;
}

.mosaic-tile {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-l);
  background: var(--card-dark);
  box-shadow: var(--shadow-s);
  transition: box-shadow 0.45s var(--ease), transform 0.45s var(--ease);
}

.mosaic-tile:hover {
  box-shadow: var(--shadow-m);
  transform: translateY(-3px);
}

.t-hero {
  grid-column: span 2;
  grid-row: span 2;
}

.t-wide {
  grid-column: span 2;
}

.t-tall {
  grid-row: span 2;
}

.mosaic-tile picture,
.mosaic-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mosaic-tile img {
  transition: transform 0.8s var(--ease);
}

.mosaic-tile:hover img {
  transform: scale(1.06);
}

.mosaic-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(3, 10, 16, 0.08) 0%,
    rgba(3, 10, 16, 0) 30%,
    rgba(3, 10, 16, 0.5) 66%,
    rgba(3, 10, 16, 0.94) 100%
  );
}

@media (prefers-reduced-motion: no-preference) {
  .mosaic-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    transform: translateX(-130%) skewX(-16deg);
    background: linear-gradient(
      100deg,
      transparent 35%,
      rgba(247, 250, 255, 0.13) 50%,
      transparent 65%
    );
    pointer-events: none;
  }

  .mosaic-tile:hover::after {
    transform: translateX(130%) skewX(-16deg);
    transition: transform 0.85s var(--ease);
  }
}

.mosaic-tile figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 3;
  padding: 0.9rem 1rem;
  color: var(--text-d);
}

.mosaic-tile figcaption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 2px 10px rgba(1, 5, 9, 0.7);
}

.mosaic-tile figcaption span {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--champagne);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 8px rgba(1, 5, 9, 0.8);
}

.mosaic-tile figcaption p {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  color: var(--text-d2);
  max-width: 30em;
  display: none;
}

.t-hero figcaption,
.t-wide figcaption {
  padding: 1.2rem 1.3rem;
}

.t-hero figcaption strong {
  font-size: 1.7rem;
}

.t-wide figcaption strong {
  font-size: 1.3rem;
}

.t-hero figcaption span,
.t-wide figcaption span {
  font-size: 0.85rem;
}

.t-hero figcaption p,
.t-wide figcaption p {
  display: block;
}

.t-random {
  border-color: rgba(212, 166, 74, 0.55);
  box-shadow: 0 6px 24px rgba(212, 166, 74, 0.18);
}

.t-random figcaption strong {
  color: var(--champagne);
}

.t-random::before {
  background: linear-gradient(
    180deg,
    rgba(3, 10, 16, 0.3) 0%,
    rgba(3, 10, 16, 0.45) 55%,
    rgba(3, 10, 16, 0.95) 100%
  );
}

.category-note {
  margin: 1.7rem auto 0;
  color: var(--ink-2);
  max-width: 62em;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Progression (deep chapter)
   -------------------------------------------------------------------------- */
.sample-note {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-d);
  color: var(--text-d3);
  font-size: 0.78rem;
}

.prog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.prog-card {
  border: 1px solid transparent;
  border-radius: var(--radius-l);
  background:
    linear-gradient(var(--card-dark), var(--card-dark)) padding-box,
    var(--card-border-dark) border-box;
  box-shadow: var(--shadow-dark);
  padding: 1.7rem 1.6rem;
  transition: transform 0.45s var(--ease);
}

.prog-card:hover {
  transform: translateY(-5px);
}

.prog-card h3 {
  font-size: 1.26rem;
  font-weight: 700;
  color: var(--text-d);
}

.prog-card p {
  color: var(--text-d2);
  font-size: 0.95rem;
}

.prog-card--xp {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.xp-ring {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--teal-bright) 0 72%, rgba(247, 250, 255, 0.1) 72% 100%);
  margin-bottom: 1rem;
  position: relative;
}

.xp-ring::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 50%;
  background: var(--card-dark);
}

.xp-ring b {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--champagne);
}

.prog-card--xp p strong {
  color: var(--teal-bright);
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums;
}

.board-rows {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.board-rows > div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line-d);
  border-radius: var(--radius-s);
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-d);
  background: rgba(7, 19, 31, 0.5);
}

.board-rows .medal {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--gold);
  width: 1.6em;
}

.board-rows .metric {
  margin-left: auto;
  color: var(--teal-bright);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  text-align: right;
}

.prog-foot {
  margin: 0.9rem 0 0;
  color: var(--text-d3);
  font-size: 0.84rem;
}

.mastery-bars {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.4rem;
}

.mastery-bars label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-d);
  margin-bottom: 0.3rem;
}

.mastery-bars label small {
  color: var(--champagne);
  font-weight: 600;
}

.bar {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(247, 250, 255, 0.09);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--teal-bright) 70%, var(--champagne));
}

.bar .w-84 { width: 84%; }
.bar .w-72 { width: 72%; }
.bar .w-58 { width: 58%; }

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] .bar i {
    transition: width 1.1s var(--ease) 0.35s;
  }

  .reveal-ready [data-reveal]:not(.is-visible) .bar i {
    width: 0;
  }
}

.title-ladder {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.title-rung {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid var(--line-d);
  border-radius: var(--radius-s);
  background: rgba(7, 19, 31, 0.5);
  padding: 0.5rem 0.8rem;
}

.title-rung strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--champagne);
  white-space: nowrap;
}

.title-rung span {
  color: var(--text-d3);
  font-size: 0.78rem;
  text-align: right;
}

.streak-rows {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.4rem;
}

.streak-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line-d);
  border-radius: var(--radius-s);
  background: rgba(7, 19, 31, 0.5);
  padding: 0.5rem 0.8rem;
  font-size: 0.88rem;
}

.streak-row b {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--gold);
  width: 2.4em;
}

.streak-row strong {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-d);
}

.streak-row span {
  margin-left: auto;
  color: var(--teal-bright);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
}

.prog-card--dossier p {
  margin: 0;
}

.prog-card--history {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.4rem, 3.5vw, 2.6rem);
  align-items: center;
}

.hist-rows {
  display: grid;
  gap: 0.5rem;
}

.hist-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--line-d);
  border-radius: var(--radius-s);
  background: rgba(7, 19, 31, 0.5);
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  color: var(--text-d2);
}

.hist-row strong {
  font-family: var(--font-display);
  color: var(--text-d);
  font-variant-numeric: tabular-nums;
}

.hist-result {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
}

.hist-result--w {
  background: rgba(47, 162, 119, 0.18);
  color: var(--green);
  border: 1px solid var(--green);
}

.hist-result--l {
  background: rgba(209, 92, 92, 0.14);
  color: var(--red);
  border: 1px solid var(--red);
}

.stat-trio {
  display: flex;
  gap: 1.6rem;
  margin-top: 1.1rem;
}

.stat-trio > div {
  display: flex;
  flex-direction: column;
}

.stat-trio strong {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--champagne);
}

.stat-trio span {
  color: var(--text-d3);
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Mid-page conversion moment
   -------------------------------------------------------------------------- */
.midcta {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.6rem, 8vw, 6.5rem);
}

.midcta__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.midcta h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  font-weight: 800;
  color: var(--text-d);
}

.midcta p {
  color: var(--text-d2);
  max-width: 40em;
  margin-bottom: 1.6rem;
}

/* --------------------------------------------------------------------------
   Friends chapter
   -------------------------------------------------------------------------- */
.chapter-heading--left {
  text-align: left;
  margin-inline: 0;
  max-width: 46rem;
}

.friend-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
  border: 1px solid var(--line-l);
  border-radius: var(--radius-l);
  background:
    radial-gradient(36rem 20rem at 100% 0%, rgba(28, 124, 128, 0.14), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-m);
  padding: clamp(1.7rem, 4vw, 2.8rem);
  margin-bottom: 1.4rem;
}

.friend-feature__copy h3 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  color: var(--teal-bright);
}

.friend-feature__copy p {
  color: var(--ink-2);
  margin: 0;
}

.notif-trio {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  position: relative;
}

.notif-trio::before {
  content: "";
  position: absolute;
  left: 2.05rem;
  top: 1.4rem;
  bottom: 1.4rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(77, 184, 180, 0.4), rgba(212, 166, 74, 0.4));
}

.notif-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--line-l);
  border-radius: 18px;
  box-shadow: var(--shadow-s);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .friend-feature .notif-card {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  }

  .reveal-ready .friend-feature.is-visible .notif-card {
    opacity: 1;
    transform: none;
  }

  .reveal-ready .friend-feature.is-visible .notif-card:nth-child(2) {
    transition-delay: 0.25s;
  }

  .reveal-ready .friend-feature.is-visible .notif-card:nth-child(3) {
    transition-delay: 0.5s;
  }
}

.friend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
}

.friend-card {
  border: 1px solid var(--line-l);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-s);
  padding: 1.5rem 1.4rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.friend-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
}

.friend-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
}

.friend-card p {
  color: var(--ink-2);
  font-size: 0.93rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Quote wall (renders only with real testimonials)
   -------------------------------------------------------------------------- */
.quote-wall {
  columns: 3;
  column-gap: 1.1rem;
}

.quote-card {
  break-inside: avoid;
  margin: 0 0 1.1rem;
  border: 1px solid var(--line-l);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-s);
  padding: 1.4rem;
}

.quote-card blockquote {
  margin: 0 0 0.7rem;
  color: var(--ink);
}

.quote-card figcaption {
  color: var(--ink-3);
  font-weight: 600;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   FAQ (light)
   -------------------------------------------------------------------------- */
.faq-wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.faq-heading h2 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
}

.faq-list {
  display: grid;
  gap: 0.7rem;
}

.faq-item {
  border: 1px solid var(--line-l);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-s);
  overflow: hidden;
}

.faq-item summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.05rem 1.2rem;
  min-height: 44px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  list-style: none;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

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

.faq-item summary:hover {
  color: var(--teal-ink);
  background: var(--surface-2);
}

.faq-item summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.35rem;
  color: var(--teal-ink);
  transition: transform 0.35s var(--ease);
}

.faq-item[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}

.faq-item .faq-num {
  color: var(--gold-ink);
  font-size: 0.8rem;
}

.faq-item > div {
  padding: 0 1.2rem 1.15rem 3.1rem;
  color: var(--ink-2);
}

.faq-item > div p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item > div p {
    animation: faq-in 0.45s var(--ease);
  }
}

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Final CTA (light)
   -------------------------------------------------------------------------- */
.final-cta {
  position: relative;
  text-align: center;
  border-radius: var(--radius-l);
  border: 1px solid var(--line-l);
  background:
    radial-gradient(46rem 26rem at 50% -30%, rgba(28, 124, 128, 0.1), transparent 75%),
    var(--surface);
  box-shadow: var(--shadow-m);
  padding: clamp(2.6rem, 6vw, 4.6rem) clamp(1.4rem, 4vw, 3rem);
  overflow: hidden;
}

.final-cta img {
  width: 96px;
  height: 96px;
  margin: 0 auto 1.3rem;
  border-radius: 50%;
  box-shadow: 0 14px 40px rgba(28, 124, 128, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .final-cta img {
    animation: drift 6s ease-in-out infinite;
  }
}

.final-cta h2 {
  font-size: clamp(2rem, 4.8vw, 3.2rem);
  font-weight: 800;
}

.final-cta p {
  color: var(--ink-2);
  max-width: 36em;
  margin-inline: auto;
}

.final-cta .hero-actions {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Footer (light)
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line-l);
  background: var(--surface);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  padding-block: 2.8rem 1.8rem;
}

.footer-brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.footer-brand img {
  border-radius: 50%;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 700;
}

.footer-brand p {
  color: var(--ink-3);
  margin: 0.3rem 0 0;
  font-size: 0.92rem;
}

.footer-col {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.footer-col strong {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-bottom: 0.3rem;
}

.footer-col a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.95rem;
  width: fit-content;
  transition: color 0.25s var(--ease), transform 0.25s var(--ease);
}

.footer-col a:hover {
  color: var(--teal-ink);
  transform: translateX(3px);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.6rem;
  padding-block: 1.1rem 1.6rem;
  border-top: 1px solid var(--line-l);
  color: var(--ink-3);
  font-size: 0.82rem;
}

.footer-trademarks {
  flex-basis: 100%;
}

/* --------------------------------------------------------------------------
   Demo phone (midnight interior — authentic to the app)
   -------------------------------------------------------------------------- */
.game-phone {
  width: min(392px, 100%);
  border-radius: 46px;
  border: 1px solid transparent;
  background:
    linear-gradient(165deg, #0b1d2b, #071018 62%) padding-box,
    linear-gradient(160deg, rgba(11, 22, 34, 0.35), rgba(11, 22, 34, 0.12) 30%, rgba(28, 124, 128, 0.5) 75%, rgba(214, 193, 154, 0.45)) border-box;
  box-shadow:
    0 46px 90px rgba(1, 5, 9, 0.6),
    inset 0 1px 0 rgba(247, 250, 255, 0.1);
  padding: 1.05rem 1.05rem 1.25rem;
  transform-style: preserve-3d;
}

@media (prefers-reduced-motion: no-preference) and (pointer: fine) {
  .game-phone {
    will-change: transform;
  }
}

.game-phone__notch {
  width: 118px;
  height: 7px;
  margin: 0 auto 0.9rem;
  border-radius: 999px;
  background: rgba(247, 250, 255, 0.14);
}

.game-screen {
  position: relative;
  color: var(--text-d);
}

.game-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 0.8rem;
}

.game-topbar [data-demo-status] {
  color: var(--champagne);
  text-align: right;
}

.player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.player {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.player img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--line-d-strong);
  background: var(--petrol);
}

.player small {
  display: block;
  color: var(--text-d3);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.player strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text-d);
}

.player--you {
  position: relative;
}

.player--rival {
  text-align: right;
}

.score-pop {
  position: absolute;
  left: 3.4rem;
  top: -0.4rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gold);
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .score-pop.is-live {
    animation: score-pop 1s var(--ease) forwards;
  }
}

@keyframes score-pop {
  0% { opacity: 0; transform: translateY(6px) scale(0.8); }
  20% { opacity: 1; transform: translateY(-2px) scale(1.15); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-16px) scale(1); }
}

.avatar-wrap {
  position: relative;
}

.lock-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #04140d;
  font-size: 0.62rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease-spring);
}

.lock-dot.is-on {
  opacity: 1;
  transform: scale(1);
}

.versus {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--text-d3);
  text-align: center;
}

.versus small {
  display: block;
  font-size: 0.62rem;
  color: var(--gold);
  letter-spacing: 0.08em;
}

.timer-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.timer-track {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: rgba(247, 250, 255, 0.1);
  overflow: hidden;
}

.timer-fill {
  display: block;
  height: 100%;
  width: 62%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal-bright), var(--champagne));
  transition: width 0.9s linear;
}

.timer-row strong {
  font-family: var(--font-display);
  font-size: 0.92rem;
  min-width: 2.4em;
  text-align: right;
  color: var(--champagne);
  font-variant-numeric: tabular-nums;
}

.question-card {
  background: rgba(13, 59, 71, 0.42);
  border: 1px solid var(--line-d);
  border-radius: 18px;
  padding: 0.95rem 1.05rem;
  margin-bottom: 0.9rem;
  box-shadow: inset 0 1px 0 rgba(247, 250, 255, 0.06);
}

.question-card span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-d3);
}

.question-card p.demo-q {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0.3rem 0 0;
  color: var(--text-d);
}

.answer-grid {
  display: grid;
  gap: 0.55rem;
}

.demo-answer {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.68rem 0.8rem;
  border-radius: 14px;
  border: 1px solid var(--line-d);
  background: rgba(7, 19, 31, 0.65);
  color: var(--text-d);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease),
    transform 0.25s var(--ease-spring), opacity 0.3s var(--ease);
}

.demo-answer:hover:not(:disabled) {
  border-color: var(--teal-bright);
  background: rgba(13, 59, 71, 0.55);
  transform: translateX(3px);
}

.demo-answer:active:not(:disabled) {
  transform: translateX(3px) scale(0.98);
}

.demo-answer:disabled {
  cursor: default;
}

.demo-answer .letter {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
  color: #f9fbff;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22);
}

.demo-answer:nth-of-type(1) .letter { background: var(--coral); }
.demo-answer:nth-of-type(2) .letter { background: var(--blue); }
.demo-answer:nth-of-type(3) .letter { background: var(--amber); }
.demo-answer:nth-of-type(4) .letter { background: var(--mint); }

.demo-answer .mark {
  margin-left: auto;
  font-weight: 900;
}

.demo-answer.is-correct {
  border-color: var(--green);
  background: rgba(47, 162, 119, 0.16);
}

@media (prefers-reduced-motion: no-preference) {
  .demo-answer.is-correct {
    animation: correct-glow 0.9s var(--ease);
  }
}

@keyframes correct-glow {
  0% { box-shadow: 0 0 0 0 rgba(47, 162, 119, 0.55); }
  100% { box-shadow: 0 0 0 14px rgba(47, 162, 119, 0); }
}

.demo-answer.is-correct .mark { color: var(--green); }

.demo-answer.is-wrong {
  border-color: var(--red);
  background: rgba(209, 92, 92, 0.14);
}

@media (prefers-reduced-motion: no-preference) {
  .demo-answer.is-wrong {
    animation: shake 0.45s var(--ease);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  55% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}

.demo-answer.is-wrong .mark { color: var(--red); }

.demo-answer.is-quiet {
  opacity: 0.5;
}

.demo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.9rem;
  min-height: 2.2rem;
  font-size: 0.85rem;
  color: var(--text-d2);
}

.speed-pill {
  flex: none;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(212, 166, 74, 0.16);
  border: 1px solid rgba(212, 166, 74, 0.4);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.78rem;
}

.demo-next {
  flex: none;
  padding: 0.45rem 1rem;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-d-strong);
  background: rgba(13, 59, 71, 0.45);
  color: var(--text-d);
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
    transform 0.3s var(--ease-spring);
}

.demo-next:hover {
  border-color: var(--champagne);
  color: var(--champagne);
  transform: translateX(2px);
}

.confetti {
  position: absolute;
  width: 7px;
  height: 11px;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  background: var(--clr, var(--gold));
  left: var(--x, 50%);
  top: var(--y, 50%);
  z-index: 5;
}

@media (prefers-reduced-motion: no-preference) {
  .confetti {
    animation: confetti-pop 0.9s var(--ease) forwards;
  }
}

@keyframes confetti-pop {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.6);
  }
  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -60px)))
      rotate(var(--rot, 200deg)) scale(1);
  }
}

/* --------------------------------------------------------------------------
   Legal & support pages (light theme)
   -------------------------------------------------------------------------- */
.page-hero {
  padding-block: clamp(2.8rem, 6vw, 4.4rem) clamp(1.4rem, 3vw, 2rem);
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  font-weight: 800;
}

.page-hero .date {
  color: var(--ink-3);
  font-size: 0.92rem;
}

.page-hero .lede {
  color: var(--ink-2);
  max-width: 46em;
  font-size: 1.05rem;
}

.legal-wrap {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.6rem);
  align-items: start;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.legal-toc {
  position: sticky;
  top: 5.2rem;
  border: 1px solid var(--line-l);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-s);
  padding: 1.1rem 1.2rem;
}

.legal-toc strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-bottom: 0.7rem;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.35rem;
}

.legal-toc a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.88rem;
}

.legal-toc a:hover {
  color: var(--teal-ink);
}

.legal-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  scroll-margin-top: 5.5rem;
}

.legal-body h2:first-of-type {
  margin-top: 0.6rem;
}

.legal-body p,
.legal-body li {
  color: var(--ink-2);
}

.legal-body strong {
  color: var(--ink);
}

.legal-body ul {
  padding-left: 1.4rem;
}

.legal-body li {
  margin-bottom: 0.55rem;
}

.legal-callout {
  border: 1px solid rgba(28, 124, 128, 0.35);
  border-radius: var(--radius);
  background: rgba(28, 124, 128, 0.07);
  padding: 1.1rem 1.3rem;
  color: var(--ink-2);
  margin-bottom: 1.6rem;
}

.legal-callout strong {
  color: var(--teal-ink);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  padding-bottom: 1rem;
}

.support-card {
  border: 1px solid var(--line-l);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-s);
  padding: 1.7rem 1.6rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.support-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-m);
}

.support-card h2,
.support-card h3 {
  font-size: 1.24rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.support-card h2 .dot,
.support-card h3 .dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot--teal { background: var(--teal); }
.dot--gold { background: var(--gold); }
.dot--coral { background: var(--coral); }
.dot--mint { background: var(--green); }
.dot--blue { background: var(--blue); }

.support-card p,
.support-card li {
  color: var(--ink-2);
  font-size: 0.96rem;
}

.support-card ul,
.support-card ol {
  padding-left: 1.3rem;
  margin: 0.4rem 0 0;
}

.support-card li {
  margin-bottom: 0.5rem;
}

.support-card li:last-child {
  margin-bottom: 0;
}

.support-contact {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(212, 166, 74, 0.4);
  border-radius: var(--radius-l);
  background:
    radial-gradient(30rem 16rem at 85% -30%, rgba(212, 166, 74, 0.12), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow-m);
  padding: clamp(1.7rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
}

.support-contact h2 {
  font-weight: 800;
}

.support-contact .email {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 800;
  color: var(--gold-ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.support-contact .email:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.support-never {
  margin-top: 0.6rem;
}

.support-legal-links {
  color: var(--ink-3);
  padding-bottom: 1rem;
}

.kv-list {
  columns: 2;
  column-gap: 2rem;
  padding-left: 1.3rem;
  margin: 0.5rem 0 0;
}

.kv-list li {
  color: var(--ink-2);
  margin-bottom: 0.45rem;
  break-inside: avoid;
}

.notfound {
  min-height: 58vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding-block: 4rem;
}

.notfound img {
  width: 112px;
  height: 112px;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  box-shadow: 0 14px 40px rgba(28, 124, 128, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .notfound img {
    animation: drift 5s ease-in-out infinite;
  }
}

.notfound h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 800;
}

.notfound p {
  color: var(--ink-2);
  max-width: 30em;
}

/* --------------------------------------------------------------------------
   Reveal-on-scroll
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
    transition-delay: var(--reveal-delay, 0s);
  }

  .reveal-ready [data-reveal].is-visible {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1240px) {
  .pos-l2 { left: 0; }
  .pos-r2 { right: 0; }
}

@media (max-width: 1000px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }

  .bento-primary {
    grid-template-columns: 1fr;
  }

  .matchmaking__grid {
    grid-template-columns: 1fr;
  }

  .prog-grid {
    grid-template-columns: 1fr;
  }

  .prog-card--history {
    grid-template-columns: 1fr;
  }

  .friend-grid {
    grid-template-columns: 1fr 1fr;
  }

  .faq-wrap {
    grid-template-columns: 1fr;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .legal-wrap {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }

  .quote-wall {
    columns: 2;
  }

  .mosaic {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 9.5rem;
  }

  /* Float cards: recompose into a chip rail above the phone */
  .hero-scene {
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
  }

  .float-rail {
    position: static;
    display: flex;
    gap: 0.7rem;
    overflow-x: auto;
    padding: 0.4rem 0.2rem 0.8rem;
    max-width: 100%;
    pointer-events: auto;
    -webkit-overflow-scrolling: touch;
  }

  .float-card {
    position: static;
    flex: none;
    width: auto;
    min-width: 200px;
    opacity: 1 !important;
    animation: none;
  }

  .walk-steps::before {
    left: 31px;
    transform: none;
  }

  .walk-step {
    grid-template-columns: 64px 1fr;
    margin-bottom: 1.2rem;
  }

  .walk-marker {
    grid-column: 1;
    align-self: start;
    padding-top: 1.4rem;
  }

  .walk-card,
  .walk-step:nth-child(even) .walk-card {
    grid-column: 2;
    grid-row: 1;
    max-width: none;
    justify-self: stretch;
  }
}

@media (max-width: 720px) {
  .proof-strip {
    grid-template-columns: 1fr 1fr;
  }

  .proof-strip > div:nth-child(3) {
    border-left: none;
  }

  .proof-strip > div:nth-child(n + 3) {
    border-top: 1px solid var(--line-l);
  }

  .mosaic {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 8rem;
    gap: 0.7rem;
  }

  .t-hero figcaption strong {
    font-size: 1.35rem;
  }

  .mosaic-tile figcaption {
    padding: 0.7rem 0.8rem;
  }

  .bento {
    grid-template-columns: 1fr;
  }

  .friend-grid {
    grid-template-columns: 1fr;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .quote-wall {
    columns: 1;
  }

  .stat-trio {
    gap: 1.1rem;
    flex-wrap: wrap;
  }

  .stage-pill.is-floating {
    display: none;
  }
}

@media (max-width: 430px) {
  .hero-actions .button {
    width: 100%;
  }

  .hero__facts {
    gap: 1.1rem;
  }

  .float-card {
    min-width: 178px;
    font-size: 0.84rem;
  }

  .kv-list {
    columns: 1;
  }
}

/* --------------------------------------------------------------------------
   Print (legal pages must print cleanly)
   -------------------------------------------------------------------------- */
@media print {
  html,
  body {
    background: #fff;
  }

  body {
    color: #111;
    font-size: 11pt;
  }

  body::after {
    display: none;
  }

  .site-header,
  .site-footer,
  .skip-link,
  .announce,
  .legal-toc,
  .stage-pill {
    display: none;
  }

  .legal-wrap {
    display: block;
    padding-bottom: 0;
  }

  .legal-body h2 {
    color: #111;
    page-break-after: avoid;
  }

  .legal-body p,
  .legal-body li,
  .page-hero .lede,
  .page-hero .date {
    color: #222;
  }

  .legal-callout {
    border: 1px solid #999;
    background: none;
    color: #222;
  }

  a {
    color: #111;
  }

  .legal-body a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #444;
  }

  h1,
  h2,
  h3 {
    color: #000;
  }
}
