/* NextMove — main.css. Design system per design/system.md. Mobile-first, vanilla. */

/* ---------- Tokens ---------- */
:root {
  --navy-950: #0B1F3A;
  --navy-800: #14305A;
  --navy-600: #2A5AA8;
  --amber-500: #F5A623;
  --amber-400: #FFB84D;
  --gold-soft: #FDF3E1;
  --offwhite: #FAF8F4;
  --white: #FFFFFF;
  --ink: #1E2A3A;
  --muted: #5A6B80;
  --line: #E4DCCB;
  --success: #2E7D4F;
  --warn: #C97A1B;
  --alert: #C24E1F;
  --danger: #B3261E;
  --hero-sub: #D8E0EC;

  --radius: 20px;
  --radius-pill: 999px;
  --container: 1120px;
  --measure: 640px;
  --tap: 48px;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--offwhite);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy-800);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; }
h2 { font-size: clamp(32px, 4.5vw, 44px); font-weight: 700; }
h3 { font-size: 28px; font-weight: 600; }

p { margin: 0 0 1em; }
a { color: var(--navy-600); }

img, svg { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.measure { max-width: var(--measure); margin: 0 auto; }

section.section { padding: 96px 0; }
@media (max-width: 720px) {
  .lock-overlay .btn-primary { white-space: normal; } section.section { padding: 64px 0; } }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--amber-400);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 244, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy-950);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  min-height: var(--tap);
}
.brand svg { width: 32px; height: 32px; flex: none; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a.nav-link {
  color: var(--navy-800);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}
.site-nav a.nav-link:hover { color: var(--navy-600); text-decoration: underline; }
@media (max-width: 860px) { .site-nav a.nav-link { display: none; } }

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 32px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 0;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--amber-500);
  color: var(--navy-950);
  box-shadow: 0 4px 14px rgba(245, 166, 35, 0.35);
}
.btn-primary:hover { background: var(--amber-400); transform: translateY(-1px); }
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-secondary {
  background: var(--white);
  color: var(--navy-800);
  border: 2px solid var(--navy-800);
}
.btn-secondary:hover { background: var(--gold-soft); }
.btn-secondary.on-dark {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-secondary.on-dark:hover { background: rgba(255,255,255,0.12); }
.btn-ghost {
  background: transparent;
  color: var(--navy-600);
  padding: 0 12px;
  min-height: var(--tap);
  font-weight: 600;
}
.btn-ghost:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
#hero {
  background: var(--navy-950);
  color: #fff;
  padding: 104px 0 88px;
  position: relative;
  overflow: hidden;
}
#hero h1 { color: #fff; }
.hero-eyebrow {
  color: var(--amber-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 20px;
}
.hero-sub { color: var(--hero-sub); font-size: 20px; max-width: 640px; margin-bottom: 36px; }
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 36px; }
.trust-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  color: var(--hero-sub); font-size: 16px;
}
.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.trust-row .dot { color: var(--amber-500); }
.hero-art {
  position: absolute; right: -60px; top: 50%;
  transform: translateY(-50%);
  opacity: 0.14; pointer-events: none;
}
@media (max-width: 860px) { .hero-art { display: none; } }

/* ---------- Stat strip ---------- */
.stat-strip {
  background: var(--navy-800);
  color: #fff;
  padding: 48px 0;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: var(--amber-500);
  line-height: 1.1;
}
.stat-label { color: var(--hero-sub); font-size: 16px; margin-top: 8px; }
.stat-caption {
  text-align: center; color: var(--hero-sub);
  font-size: 14px; margin-top: 28px; opacity: 0.75;
}
@media (max-width: 720px) { .stat-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- How it works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.step-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
.step-marker {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--gold-soft);
  border: 2px solid var(--amber-500);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 24px;
  color: var(--navy-800); margin-bottom: 20px;
}
.step-card h3 { margin-bottom: 12px; }
.step-card p { color: var(--muted); margin: 0; }
@media (max-width: 720px) { .steps-grid { grid-template-columns: 1fr; } }

/* ---------- Sample teaser ---------- */
#sample-teaser { background: var(--gold-soft); }
.teaser-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.gauge-mock {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; text-align: center;
}
.gauge-caption { color: var(--muted); font-size: 16px; margin-top: 16px; }
@media (max-width: 720px) { .teaser-grid { grid-template-columns: 1fr; } }

/* ---------- Sample report ---------- */
#sample-report { background: var(--white); }
.report-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start;
  margin-top: 48px;
}
.report-mock {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; background: var(--offwhite);
}
.report-mock .mock-title {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: var(--navy-800); margin-bottom: 16px;
}
.mock-path {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.mock-path .mock-path-name { font-weight: 600; margin-bottom: 8px; }
.mock-blur {
  filter: blur(6px); user-select: none; pointer-events: none;
  color: var(--muted); font-size: 15px; line-height: 1.5;
}
.feature-list { list-style: none; padding: 0; margin: 0 0 32px; }
.feature-list li {
  padding: 14px 0 14px 40px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-size: 18px;
}
.feature-list li::before {
  content: "✓";
  position: absolute; left: 8px; top: 14px;
  color: var(--success); font-weight: 700; font-size: 20px;
}
@media (max-width: 720px) { .report-grid { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
#pricing { background: var(--offwhite); }
.price-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  max-width: 880px; margin: 48px auto 0;
}
.price-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 40px 32px;
  position: relative; display: flex; flex-direction: column;
}
.price-card.featured {
  border: 2px solid var(--amber-500);
  box-shadow: 0 12px 32px rgba(245, 166, 35, 0.18);
}
.pop-badge {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  background: var(--amber-500); color: var(--navy-950);
  font-size: 14px; font-weight: 700; padding: 6px 18px;
  border-radius: var(--radius-pill); white-space: nowrap;
}
.price-name { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--navy-800); }
.price-amount { font-family: var(--font-display); font-size: 52px; font-weight: 700; color: var(--navy-950); margin: 8px 0; }
.price-amount small { font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 0 0 32px; flex: 1; }
.price-card li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px solid var(--line); }
.price-card li::before {
  content: "✓"; position: absolute; left: 4px; top: 10px;
  color: var(--success); font-weight: 700;
}
.price-note { text-align: center; color: var(--muted); margin-top: 24px; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ accordion ---------- */
#faq { background: var(--white); }
.faq-list { max-width: 760px; margin: 40px auto 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; background: none; border: 0; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 4px; min-height: 64px;
  font-family: var(--font-body); font-size: 20px; font-weight: 600;
  color: var(--navy-800); text-align: left;
}
.faq-q .marker {
  flex: none; width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--amber-500); color: var(--navy-800);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 400; line-height: 1;
}
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-a p { color: var(--muted); padding: 0 4px 24px; margin: 0; }
.faq-item.open .marker { background: var(--amber-500); color: var(--navy-950); border-color: var(--amber-500); }

/* ---------- Final CTA / footer ---------- */
.final-cta { background: var(--navy-950); color: #fff; text-align: center; padding: 88px 0; }
.final-cta h2 { color: #fff; margin-bottom: 16px; }
.final-cta p { color: var(--hero-sub); margin-bottom: 32px; }

#site-footer { background: var(--navy-950); color: var(--hero-sub); padding: 64px 0 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-tag { font-size: 16px; max-width: 320px; }
.footer-col h4 { color: #fff; font-size: 16px; margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-col a {
  display: block; color: var(--hero-sub); text-decoration: none;
  padding: 6px 0; font-size: 16px; min-height: 36px;
}
.footer-col a:hover { color: var(--amber-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 28px; font-size: 14px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.disclaimer { font-size: 14px; opacity: 0.8; max-width: 640px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Quiz ---------- */
.quiz-wrap {
  max-width: var(--measure); margin: 0 auto;
  padding: 64px 24px 96px; min-height: 70vh;
}
#quiz-intro { text-align: center; padding: 48px 0; }
#quiz-intro .compass-mark { margin: 0 auto 28px; }
#quiz-intro h1 { margin-bottom: 20px; }
#quiz-intro p { color: var(--muted); margin-bottom: 36px; }
.quiz-note { font-size: 14px; color: var(--muted); margin-top: 24px; }

#progress-label { font-size: 16px; color: var(--muted); margin-bottom: 12px; font-weight: 500; }
#progress-bar {
  height: 8px; background: var(--line); border-radius: var(--radius-pill);
  overflow: hidden; margin-bottom: 40px;
}
#progress-fill {
  height: 100%; width: 0%;
  background: var(--amber-500); border-radius: var(--radius-pill);
  transition: width 0.35s ease;
}
#question-title { font-size: clamp(24px, 4vw, 32px); margin-bottom: 28px; }
#answers { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.answer-card {
  width: 100%; text-align: left;
  background: var(--white); border: 2px solid var(--line);
  border-radius: var(--radius); min-height: 72px;
  padding: 16px 20px 16px 60px;
  font-family: var(--font-body); font-size: 18px; font-weight: 500;
  color: var(--ink); cursor: pointer; position: relative;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.answer-card:hover { border-color: var(--navy-600); }
.answer-card .radio-dot {
  position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--muted);
}
.answer-card[aria-checked="true"] {
  border-color: var(--amber-500); background: var(--gold-soft);
}
.answer-card[aria-checked="true"] .radio-dot {
  border-color: var(--amber-500);
  background: radial-gradient(circle, var(--amber-500) 45%, transparent 50%);
}
.quiz-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.quiz-fade { animation: fadeSlide 0.3s ease; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Results ---------- */
.results-wrap { max-width: 720px; margin: 0 auto; padding: 64px 24px 96px; }
.results-eyebrow {
  text-align: center; color: var(--amber-500); text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 16px; font-weight: 700; margin-bottom: 24px;
}
.gauge-block { text-align: center; margin-bottom: 48px; }
#score-gauge { width: 100%; max-width: 380px; height: auto; }
@media (max-width: 720px) { #score-gauge { max-width: 320px; } }
#score-number {
  font-family: var(--font-display); font-size: 72px; font-weight: 700;
  color: var(--navy-950); line-height: 1;
}
.score-out-of { color: var(--muted); font-size: 16px; margin-top: 4px; }
#tier-badge {
  display: inline-block; margin-top: 16px;
  padding: 10px 28px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 18px; color: #fff;
  background: var(--muted);
}
#tier-badge.tier-bedrock { background: var(--success); }
#tier-badge.tier-shifting { background: var(--warn); }
#tier-badge.tier-exposed { background: var(--alert); }
#tier-badge.tier-hotseat { background: var(--danger); }
#tier-name { margin: 12px 0 8px; }
#tier-copy { color: var(--muted); max-width: 560px; margin: 0 auto; }

.factors-section { margin-bottom: 64px; }
.factors-section h2, .paths-section h2, .plan-section h2 { margin-bottom: 8px; }
.section-sub { color: var(--muted); margin-bottom: 28px; }
.factor-row {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 16px;
}
.factor-num {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--gold-soft); border: 2px solid var(--amber-500);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--navy-800);
}
.factor-row p { margin: 4px 0 0; }

/* Locked teasers */
.path-teaser, #plan-teaser {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; margin-bottom: 24px;
  position: relative; overflow: hidden;
}
.path-teaser.locked .lockable, #plan-teaser.locked .lockable {
  filter: blur(7px); user-select: none; pointer-events: none;
}
.lock-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; text-align: center; padding: 32px;
  background: linear-gradient(to bottom, rgba(250,248,244,0.15) 0%, rgba(250,248,244,0.88) 55%, rgba(250,248,244,0.96) 100%);
  backdrop-filter: blur(1px);
}
.path-teaser:not(.locked) .lock-overlay,
#plan-teaser:not(.locked) .lock-overlay { display: none; }
.lock-overlay .lock-icon { font-size: 40px; }
.lock-overlay p { font-weight: 600; color: var(--navy-800); margin: 0; max-width: 420px; }
.path-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.path-rank {
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--amber-500);
}
.path-teaser h3 { margin: 4px 0 8px; }
.fit-meter { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.fit-track { flex: 1; height: 10px; background: var(--line); border-radius: var(--radius-pill); overflow: hidden; }
.fit-fill { height: 100%; background: var(--success); border-radius: var(--radius-pill); }
.fit-label { font-size: 14px; font-weight: 700; color: var(--navy-800); white-space: nowrap; }
.path-why { font-size: 16px; color: var(--muted); font-style: italic; margin-bottom: 0; }

.plan-phase { margin-bottom: 28px; }
.plan-phase:last-child { margin-bottom: 0; }
.plan-phase h4 {
  font-family: var(--font-display); font-size: 22px; color: var(--navy-800);
  margin: 0 0 4px;
}
.plan-phase .phase-goal { color: var(--muted); font-size: 16px; margin-bottom: 16px; }
.plan-week {
  border-left: 3px solid var(--amber-500); padding: 4px 0 4px 20px; margin-bottom: 16px;
}
.plan-week .week-label { font-weight: 700; color: var(--navy-800); margin-bottom: 6px; }
.plan-week ul { margin: 0; padding-left: 20px; color: var(--ink); }
.plan-week li { margin-bottom: 8px; font-size: 17px; }

.results-actions {
  display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
  margin: 64px 0 32px;
}
.results-disclaimer {
  background: var(--gold-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 28px;
  font-size: 15px; color: var(--muted); margin-bottom: 48px;
}

/* ---------- Paywall modal ---------- */
#paywall-modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
#paywall-modal.open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(11, 31, 58, 0.6);
}
.modal-card {
  position: relative; background: var(--white);
  border-radius: var(--radius); padding: 40px 36px;
  max-width: 480px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  animation: fadeSlide 0.25s ease;
}
.modal-card h3 { margin-bottom: 8px; }
.modal-price { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--navy-950); margin: 8px 0 16px; }
.modal-price small { font-family: var(--font-body); font-size: 15px; color: var(--muted); font-weight: 500; }
.modal-card ul { list-style: none; padding: 0; margin: 0 0 24px; }
.modal-card li { padding: 8px 0 8px 30px; position: relative; font-size: 16px; }
.modal-card li::before { content: "✓"; position: absolute; left: 4px; color: var(--success); font-weight: 700; }
.email-field { margin-bottom: 16px; }
.email-field label { display: block; font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.email-field input {
  width: 100%; min-height: 56px; padding: 12px 18px;
  border: 2px solid var(--line); border-radius: 12px;
  font-size: 18px; font-family: var(--font-body); color: var(--ink);
}
.email-field input:focus { border-color: var(--navy-600); outline: none; }
.modal-fine { font-size: 14px; color: var(--muted); text-align: center; margin: 16px 0 0; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 48px; height: 48px; border: 0; background: none;
  font-size: 28px; color: var(--muted); cursor: pointer; border-radius: 50%;
}
.modal-close:hover { color: var(--ink); background: var(--offwhite); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy-950); color: #fff;
  padding: 16px 28px; border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 500;
  opacity: 0; pointer-events: none; z-index: 200;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: calc(100vw - 48px); text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  #progress-fill { transition: none; }
}
