/* ============================================================
   LegacyRealm — Cinematic Design System v2
   Deep midnight navy, warm ivory, restrained metallic gold.
   Editorial typography, purposeful asymmetry, gold thread motif.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,900;1,400;1,500&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Palette */
  --black: #04080f;
  --navy-950: #060d1a;
  --navy-900: #0a1628;
  --navy-800: #0f1f3d;
  --navy-700: #16294d;
  --ivory: #f5f1e8;
  --ivory-dim: rgba(245, 241, 232, 0.72);
  --ivory-faint: rgba(245, 241, 232, 0.45);
  --ivory-line: rgba(245, 241, 232, 0.14);
  --gold: #c9a227;
  --gold-bright: #e3b94e;
  --gold-deep: #9a7a1c;
  --gold-glow: rgba(201, 162, 39, 0.35);

  /* Type */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Rhythm */
  --space-section: clamp(6rem, 12vw, 11rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-cine: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--navy-950);
  color: var(--ivory);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--navy-950); }

/* ---------- Typography ---------- */

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  display: block;
}

.lede {
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--ivory-dim);
  max-width: 38rem;
  font-weight: 300;
}

/* ---------- Layout ---------- */

.wrap {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

.wrap-narrow {
  width: min(760px, 92vw);
  margin: 0 auto;
}

section { position: relative; padding: var(--space-section) 0; }

/* Asymmetric editorial offset */
.offset-left { margin-left: clamp(0px, 8vw, 120px); }
.offset-right { margin-right: clamp(0px, 8vw, 120px); margin-left: auto; }

/* ---------- Gold thread (scroll progress) ---------- */

.thread {
  position: fixed;
  left: clamp(12px, 3vw, 36px);
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 50;
  pointer-events: none;
}
.thread-track {
  position: absolute;
  inset: 0;
  background: var(--ivory-line);
}
.thread-progress {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: linear-gradient(to bottom, var(--gold-deep), var(--gold), var(--gold-bright));
  transform-origin: top;
  transform: scaleY(0);
  box-shadow: 0 0 12px var(--gold-glow);
}
.thread-node {
  position: absolute;
  left: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--navy-950);
  border: 2px solid var(--gold);
  transform: translate(-50%, -50%);
  opacity: 0.35;
  transition: opacity 0.4s, box-shadow 0.4s;
}
.thread-node.lit {
  opacity: 1;
  box-shadow: 0 0 10px var(--gold-glow);
  background: var(--gold);
}

/* ---------- Opening sequence ---------- */

#overture {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#overture.done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s var(--ease-cine);
}
.overture-stage {
  text-align: center;
  padding: 2rem;
  position: relative;
  width: 100%;
  height: 40vh;
}
.overture-line {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 600;
  color: var(--ivory);
  opacity: 0;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.overture-line em { color: var(--gold); font-style: italic; }
.overture-line.show {
  opacity: 1;
  transition: opacity 0.7s var(--ease-out);
}
.overture-line.hide {
  opacity: 0;
  transition: opacity 0.5s var(--ease-cine);
}
#overture-skip {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  background: transparent;
  border: 1px solid var(--ivory-line);
  color: var(--ivory-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
  z-index: 201;
}
#overture-skip:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 13, 26, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--ivory-line);
}
.nav-inner {
  width: min(1280px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ivory);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.brand-mark {
  width: 34px; height: 34px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--gold);
  position: relative;
}
.brand-mark::after {
  content: '';
  position: absolute;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  top: -2.5px;
  left: 50%;
  transform: translateX(-50%);
}
.nav-links { display: flex; align-items: center; gap: 1.8rem; }
.nav-links a:not(.btn) {
  color: var(--ivory-dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.3s;
}
.nav-links a:not(.btn):hover { color: var(--ivory); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem 2.1rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--gold);
  color: var(--navy-950);
}
.btn-primary:hover {
  background: var(--gold-bright);
  box-shadow: 0 8px 32px var(--gold-glow);
  transform: translateY(-2px);
}
.btn-outline {
  border-color: var(--ivory-line);
  color: var(--ivory);
  background: transparent;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 0.65rem 1.4rem; font-size: 0.9rem; }

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-thread-svg {
  position: absolute;
  top: 0; bottom: 0;
  left: clamp(40px, 12vw, 180px);
  width: 120px;
  opacity: 0.5;
}
.hero h1 {
  font-size: clamp(3rem, 8.5vw, 7rem);
  max-width: 16ch;
  margin-bottom: 1.8rem;
}
.hero h1 .gold { color: var(--gold); font-style: italic; font-weight: 500; }
.hero .lede { margin-bottom: 2.6rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.hero-note {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory-faint);
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-d1 { transition-delay: 0.12s; }
.reveal-d2 { transition-delay: 0.24s; }
.reveal-d3 { transition-delay: 0.36s; }

/* ---------- Self-recognition (light section) ---------- */

.recognize {
  background: var(--ivory);
  color: var(--navy-950);
  border-radius: 28px;
  margin: 0 clamp(8px, 2vw, 32px);
  padding: clamp(4rem, 8vw, 7rem) 0;
}
.recognize .kicker { color: var(--gold-deep); }
.recognize h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  max-width: 20ch;
  margin-bottom: 1rem;
  color: var(--navy-950);
}
.recognize .lede { color: rgba(6, 13, 26, 0.68); }
.recognize-lines { margin: 3rem 0; }
.recognize-line {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.6vw, 2.8rem);
  font-style: italic;
  color: rgba(6, 13, 26, 0.32);
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(6, 13, 26, 0.1);
  transition: color 0.4s, padding-left 0.4s var(--ease-out);
}
.recognize-line.lit { color: var(--navy-950); padding-left: 1.2rem; }
.recognize-line.lit::before {
  content: '—';
  color: var(--gold-deep);
  margin-right: 0.6rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
  margin: 2.5rem 0;
}
.choice-card {
  border: 1.5px solid rgba(6, 13, 26, 0.14);
  border-radius: 16px;
  padding: 1.3rem 1.4rem;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s var(--ease-out);
}
.choice-card:hover {
  border-color: var(--gold-deep);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(6, 13, 26, 0.1);
}
.choice-card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 12px 28px rgba(201, 162, 39, 0.18);
}
.choice-card .choice-title { font-weight: 600; font-size: 1.02rem; color: var(--navy-950); margin-bottom: 0.25rem; }
.choice-card .choice-sub { font-size: 0.88rem; color: rgba(6, 13, 26, 0.6); }
.choice-card .choice-check {
  display: none;
  font-size: 0.75rem;
  color: var(--gold-deep);
  font-weight: 600;
  margin-top: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.choice-card.selected .choice-check { display: block; }

.goal-note {
  width: 100%;
  border: 1.5px solid rgba(6, 13, 26, 0.14);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--navy-950);
  resize: vertical;
  min-height: 96px;
  margin-bottom: 1.8rem;
}
.goal-note:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15); }

/* ---------- Journey steps (editorial, asymmetric) ---------- */

.step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 3.2rem 0;
  border-top: 1px solid var(--ivory-line);
  position: relative;
}
@media (min-width: 860px) {
  .step {
    grid-template-columns: 120px 1fr 1fr;
    gap: 2.5rem;
    align-items: baseline;
  }
  .step:nth-child(even) .step-body { grid-column: 3; }
  .step:nth-child(even) .step-num { grid-column: 1; }
  .step:nth-child(odd) .step-body { grid-column: 2; }
}
.step-num {
  font-family: var(--font-display);
  font-size: 4.2rem;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  line-height: 1;
}
.step h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 0.8rem; }
.step p { color: var(--ivory-dim); max-width: 34rem; }
.step-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.9rem;
}

/* ---------- Agents ---------- */

.agents-head { margin-bottom: 3rem; }
.agents-head h2 { font-size: clamp(2.2rem, 5vw, 3.8rem); max-width: 18ch; }
.agent-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.agent-tab {
  border: 1px solid var(--ivory-line);
  background: transparent;
  color: var(--ivory-dim);
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}
.agent-tab:hover { border-color: var(--gold); color: var(--ivory); }
.agent-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-950);
}
.agent-panel {
  display: none;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  border: 1px solid var(--ivory-line);
  border-radius: 24px;
  padding: clamp(1.8rem, 4vw, 3.2rem);
  background: linear-gradient(135deg, rgba(201,162,39,0.06), transparent 55%);
}
.agent-panel.active { display: grid; animation: panelIn 0.5s var(--ease-out); }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@media (min-width: 860px) {
  .agent-panel { grid-template-columns: 1fr 1.2fr; }
}
.agent-portrait {
  aspect-ratio: 4/5;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--navy-700), var(--navy-950));
  border: 1px solid var(--ivory-line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.agent-portrait .sigil {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.9;
}
.agent-portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(201,162,39,0.14), transparent 60%);
}
.agent-panel h3 { font-size: 2rem; margin-bottom: 0.4rem; }
.agent-role {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: block;
}
.agent-panel p { color: var(--ivory-dim); margin-bottom: 1.4rem; }
.agent-example {
  border-left: 2px solid var(--gold);
  padding: 1rem 1.3rem;
  background: rgba(201, 162, 39, 0.05);
  border-radius: 0 12px 12px 0;
  margin-bottom: 1.6rem;
}
.agent-example .ex-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}
.agent-example p { font-style: italic; margin: 0; color: var(--ivory); }

/* ---------- Diagnostic (guided experience) ---------- */

.diag {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 6rem;
}
.diag-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(720px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.diag-progress { margin-bottom: 2.5rem; }
.diag-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory-faint);
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.diag-track {
  height: 2px;
  background: var(--ivory-line);
  border-radius: 2px;
  overflow: hidden;
}
.diag-fill {
  height: 100%;
  background: linear-gradient(to right, var(--gold-deep), var(--gold-bright));
  border-radius: 2px;
  transition: width 0.6s var(--ease-out);
  box-shadow: 0 0 10px var(--gold-glow);
}
.diag-q {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.25;
  margin-bottom: 2.2rem;
  animation: qIn 0.55s var(--ease-out);
}
@keyframes qIn {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
.diag-options { display: flex; flex-direction: column; gap: 0.85rem; }
.diag-opt {
  text-align: left;
  background: rgba(245, 241, 232, 0.03);
  border: 1.5px solid var(--ivory-line);
  border-radius: 16px;
  padding: 1.25rem 1.5rem 1.25rem 4rem;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.5;
  cursor: pointer;
  position: relative;
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease-out);
  animation: qIn 0.55s var(--ease-out backwards);
}
.diag-opt:nth-child(2) { animation-delay: 0.07s; }
.diag-opt:nth-child(3) { animation-delay: 0.14s; }
.diag-opt:nth-child(4) { animation-delay: 0.21s; }
.diag-opt:hover {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.06);
  transform: translateX(6px);
}
.diag-opt:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.diag-opt .opt-key {
  position: absolute;
  left: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem; height: 2rem;
  border: 1px solid var(--ivory-line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
}
.diag-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.4rem;
}
.diag-back {
  background: none;
  border: none;
  color: var(--ivory-faint);
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
}
.diag-back:hover { color: var(--ivory); }
.diag-back:disabled { opacity: 0.25; cursor: default; }
.diag-skip {
  color: var(--ivory-faint);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.diag-skip:hover { color: var(--ivory); border-color: var(--ivory-faint); }

/* Results reveal */
.result-sequence { display: flex; flex-direction: column; gap: 0; }
.result-beat {
  padding: 3rem 0;
  border-top: 1px solid var(--ivory-line);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.result-beat.in { opacity: 1; transform: none; }
.result-beat:first-child { border-top: none; }
.result-beat .kicker { margin-bottom: 0.8rem; }
.result-beat h3 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  margin-bottom: 1rem;
}
.result-beat h3 em { color: var(--gold); font-style: italic; }
.result-beat p { color: var(--ivory-dim); max-width: 40rem; }
.result-beat .sig {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--ivory);
  border-left: 2px solid var(--gold);
  padding-left: 1.4rem;
  margin: 1.2rem 0;
  max-width: 38rem;
}
#reveal-all {
  align-self: flex-start;
  margin-bottom: 2rem;
}

/* ---------- Chat ---------- */

.chat-shell {
  width: min(780px, 94vw);
  margin: 0 auto;
  padding: 6rem 0 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  padding: 1rem 0 2rem;
}
.msg { max-width: 82%; line-height: 1.6; }
.msg.user {
  align-self: flex-end;
  background: var(--gold);
  color: var(--navy-950);
  border-radius: 20px 20px 6px 20px;
  padding: 1rem 1.4rem;
}
.msg.agent {
  align-self: flex-start;
  background: rgba(245, 241, 232, 0.05);
  border: 1px solid var(--ivory-line);
  border-radius: 20px 20px 20px 6px;
  padding: 1.2rem 1.5rem;
}
.msg.agent .who {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.6rem;
}
.chat-input-row {
  display: flex;
  gap: 0.8rem;
  position: sticky;
  bottom: 1.2rem;
  background: rgba(6, 13, 26, 0.9);
  backdrop-filter: blur(12px);
  padding: 0.8rem;
  border: 1px solid var(--ivory-line);
  border-radius: 999px;
}
.chat-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ivory);
  font-size: 1rem;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
}
.chat-input-row input:focus { outline: none; }
.typing { display: flex; gap: 6px; padding: 0.4rem 0; }
.typing span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: blink 1.2s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* ---------- Roadmap ---------- */

.roadmap-card {
  border: 1px solid var(--ivory-line);
  border-radius: 24px;
  padding: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(135deg, rgba(201,162,39,0.07), transparent 50%);
  margin-bottom: 2rem;
}
.roadmap-card h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.next-step {
  border-left: 3px solid var(--gold);
  padding: 1.4rem 1.8rem;
  background: rgba(201, 162, 39, 0.06);
  border-radius: 0 16px 16px 0;
  margin: 2rem 0;
}
.next-step p { font-size: 1.15rem; }

/* ---------- Pricing / waitlist ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin: 2.5rem 0;
}
@media (min-width: 760px) { .pricing-grid { grid-template-columns: 1fr 1fr; } }
.price-card {
  border: 1px solid var(--ivory-line);
  border-radius: 20px;
  padding: 2.2rem;
  background: rgba(245, 241, 232, 0.02);
}
.price-card.featured { border-color: var(--gold); background: rgba(201,162,39,0.05); }
.price-card h3 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.price-card .amount { font-family: var(--font-display); font-size: 2.6rem; color: var(--gold); }
.price-card .per { color: var(--ivory-faint); font-size: 0.95rem; }
.waitlist-row { display: flex; gap: 0.7rem; margin-top: 1.6rem; flex-wrap: wrap; }
.waitlist-row input {
  flex: 1;
  min-width: 220px;
  background: rgba(245,241,232,0.05);
  border: 1px solid var(--ivory-line);
  border-radius: 999px;
  padding: 0.95rem 1.4rem;
  color: var(--ivory);
  font-size: 1rem;
  font-family: var(--font-body);
}
.waitlist-row input:focus { outline: none; border-color: var(--gold); }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--ivory-line);
  padding: 3.5rem 0 2.5rem;
  margin-top: 2rem;
}
.foot-inner {
  width: min(1200px, 92vw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.foot-inner p { color: var(--ivory-faint); font-size: 0.9rem; }
.foot-links { display: flex; gap: 1.6rem; }
.foot-links a { color: var(--ivory-faint); text-decoration: none; font-size: 0.9rem; }
.foot-links a:hover { color: var(--gold); }

/* ---------- Auth modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 8, 15, 0.78);
  backdrop-filter: blur(8px);
  z-index: 150;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--navy-900);
  border: 1px solid var(--ivory-line);
  border-radius: 24px;
  padding: 2.8rem;
  width: min(440px, 94vw);
  animation: panelIn 0.4s var(--ease-out);
  position: relative;
}
.modal h3 { font-size: 1.7rem; margin-bottom: 0.6rem; }
.modal p { color: var(--ivory-dim); font-size: 0.95rem; margin-bottom: 1.6rem; }
.modal .btn { width: 100%; margin-bottom: 0.8rem; }
.modal input[type="email"] {
  width: 100%;
  background: rgba(245,241,232,0.05);
  border: 1px solid var(--ivory-line);
  border-radius: 12px;
  padding: 0.95rem 1.2rem;
  color: var(--ivory);
  font-size: 1rem;
  margin-bottom: 0.8rem;
  font-family: var(--font-body);
}
.modal input[type="email"]:focus { outline: none; border-color: var(--gold); }
.modal-close {
  position: absolute;
  top: 1.1rem; right: 1.3rem;
  background: none; border: none;
  color: var(--ivory-faint);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ---------- Utilities ---------- */

.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.6rem; } .mt-4 { margin-top: 2.5rem; }
.center { text-align: center; }
.gold { color: var(--gold); }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: var(--navy-950);
  padding: 0.8rem 1.4rem;
  z-index: 300;
  border-radius: 0 0 12px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  #overture { display: none; }
  .thread { display: none; }
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  .nav-links a:not(.btn):not([data-auth-nav]) { display: none; }
  .thread { display: none; }
  .hero { padding-top: 5.5rem; }
  .step { padding: 2.4rem 0; }
  .diag-opt { font-size: 1rem; padding: 1.1rem 1.2rem 1.1rem 3.4rem; }
  .choice-grid { grid-template-columns: 1fr; }
  .recognize { border-radius: 20px; }
}
