/* ============================================================
   Alta Prep — Design System v1 (Session 3)
   Palette: calm, credible. Deep ink + indigo primary + warm amber accent.
   Mobile-first. All colors/type/spacing flow from these tokens.
   ============================================================ */

:root {
  /* Color tokens */
  --ink: #16213a;          /* headlines, body */
  --ink-soft: #5b657a;     /* secondary text */
  --primary: #2b4fd8;      /* actions, links */
  --primary-deep: #1e3aa8; /* hover */
  --primary-soft: #eef2fe; /* tinted backgrounds */
  --accent: #f5a623;       /* sparing highlights (badges, stars) */
  --success: #17804a;
  --success-soft: #e9f9f0;
  --locked: #9aa3b5;
  --bg: #ffffff;
  --bg-alt: #f7f8fb;
  --line: #e5e8ef;

  /* Type scale */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-xs: 0.8rem;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-lg: 1.15rem;
  --fs-xl: 1.45rem;
  --fs-2xl: 1.9rem;
  --fs-hero: clamp(2rem, 5vw, 2.9rem);

  /* Spacing & radius */
  --sp-1: 6px; --sp-2: 12px; --sp-3: 20px; --sp-4: 32px; --sp-5: 56px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 3px rgba(22, 33, 58, .07), 0 8px 24px rgba(22, 33, 58, .06);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--sp-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: var(--fs-base);
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s, transform .05s;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-ghost:hover { background: var(--primary-soft); }
.btn-lg { padding: 15px 28px; font-size: var(--fs-lg); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 62px; gap: var(--sp-3);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .peak { width: 26px; height: 26px; }
.nav-links { display: none; gap: var(--sp-3); align-items: center; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: var(--fs-sm); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: none; }
.nav-toggle {
  background: none; border: none; cursor: pointer; padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.mobile-menu { display: none; border-top: 1px solid var(--line); padding: var(--sp-2) 0 var(--sp-3); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 10px var(--sp-2); color: var(--ink); font-weight: 500; }
@media (min-width: 780px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-block; }
  .nav-toggle, .mobile-menu { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { background: linear-gradient(180deg, var(--primary-soft) 0%, #fff 90%); padding: var(--sp-5) 0; }
.hero-inner { max-width: 720px; }
.eyebrow {
  display: inline-block; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 14px; font-size: var(--fs-xs);
  font-weight: 600; color: var(--primary); letter-spacing: .02em;
  margin-bottom: var(--sp-3); box-shadow: var(--shadow);
}
.hero h1 { font-size: var(--fs-hero); line-height: 1.15; letter-spacing: -.015em; margin-bottom: var(--sp-2); }
.hero .sub { font-size: var(--fs-lg); color: var(--ink-soft); margin-bottom: var(--sp-4); max-width: 560px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.trust-line { font-size: var(--fs-sm); color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.trust-line .dot { color: var(--success); font-weight: 700; }

/* ---------- Sections ---------- */
section { padding: var(--sp-5) 0; }
section.alt { background: var(--bg-alt); }
.section-head { max-width: 620px; margin-bottom: var(--sp-4); }
.section-head h2 { font-size: var(--fs-2xl); letter-spacing: -.01em; margin-bottom: var(--sp-1); }
.section-head p { color: var(--ink-soft); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: var(--sp-3); }
@media (min-width: 700px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-3); box-shadow: var(--shadow);
}
.card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-1); }
.card p { color: var(--ink-soft); font-size: var(--fs-sm); }
.card .card-cta { display: inline-block; margin-top: var(--sp-2); font-weight: 600; font-size: var(--fs-sm); }
.card-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-2);
  color: var(--primary); font-size: 1.2rem;
}
.badge-free {
  display: inline-block; background: var(--success-soft); color: var(--success);
  font-size: var(--fs-xs); font-weight: 700; border-radius: 999px; padding: 2px 10px;
  letter-spacing: .03em;
}

/* ---------- Units list ---------- */
.units { display: grid; gap: var(--sp-2); }
@media (min-width: 700px) { .units { grid-template-columns: 1fr 1fr; } }
.unit-row {
  display: flex; align-items: center; gap: var(--sp-2);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.unit-row:hover { border-color: var(--primary); box-shadow: var(--shadow); color: var(--ink); }
.unit-num {
  flex: 0 0 34px; height: 34px; border-radius: 9px; background: var(--primary-soft);
  color: var(--primary); font-weight: 700; display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm);
}
.unit-row .unit-name { flex: 1; font-weight: 500; font-size: var(--fs-sm); }
.unit-row .unit-state { font-size: var(--fs-xs); font-weight: 700; }
.unit-row .unit-state.locked { color: var(--locked); }

/* ---------- Pricing ---------- */
.pricing-card {
  max-width: 460px; margin: 0 auto; text-align: center;
  background: #fff; border: 2px solid var(--primary); border-radius: var(--radius-lg);
  padding: var(--sp-4); box-shadow: var(--shadow);
}
.price { font-size: 3rem; font-weight: 800; letter-spacing: -.02em; }
.price .cents { font-size: 1.2rem; color: var(--ink-soft); font-weight: 500; }
.pricing-card ul { list-style: none; padding: 0; margin: var(--sp-3) 0; text-align: left; }
.pricing-card li { padding: 7px 0 7px 28px; position: relative; font-size: var(--fs-sm); }
.pricing-card li::before { content: "✓"; position: absolute; left: 4px; color: var(--success); font-weight: 700; }
.pricing-note { font-size: var(--fs-xs); color: var(--ink-soft); margin-top: var(--sp-2); }

/* ---------- Email capture ---------- */
.capture { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: var(--sp-4); }
.capture h2 { font-size: var(--fs-xl); margin-bottom: var(--sp-1); }
.capture p { color: #c3c9d6; font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.capture form { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.capture input[type="email"] {
  flex: 1 1 220px; padding: 12px 16px; border-radius: 10px; border: none;
  font-size: var(--fs-base); font-family: var(--font);
}
@media (min-width: 700px) { .capture { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); } .capture .capture-text { max-width: 46%; } .capture p { margin-bottom: 0; } .capture form { flex: 1; } }

/* ---------- FAQ ---------- */
details {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: 14px 18px; margin-bottom: var(--sp-2);
}
details summary { font-weight: 600; cursor: pointer; font-size: var(--fs-sm); }
details p { color: var(--ink-soft); font-size: var(--fs-sm); margin-top: var(--sp-2); }

/* ---------- Quiz engine ---------- */
.quiz-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-3); box-shadow: var(--shadow); max-width: 720px;
}
.quiz-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--sp-2); flex-wrap: wrap; gap: 6px; }
.quiz-progress-label { font-weight: 700; font-size: var(--fs-sm); }
.quiz-meta { font-size: var(--fs-xs); color: var(--ink-soft); }
.quiz-bar { height: 6px; background: var(--bg-alt); border-radius: 999px; margin-bottom: var(--sp-3); overflow: hidden; }
.quiz-bar-fill { height: 100%; background: var(--primary); border-radius: 999px; transition: width .3s; }
.quiz-stem { font-size: var(--fs-lg); margin-bottom: var(--sp-3); line-height: 1.5; }
.quiz-choices { display: grid; gap: var(--sp-2); }
.quiz-choice {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font-size: var(--fs-base); font-family: var(--font);
  cursor: pointer; transition: border-color .12s, background .12s; color: var(--ink);
}
.quiz-choice:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); }
.quiz-choice:disabled { cursor: default; }
.quiz-choice.correct { border-color: var(--success); background: var(--success-soft); }
.quiz-choice.incorrect { border-color: #c33; background: #fdf0f0; }
.quiz-letter {
  flex: 0 0 28px; height: 28px; border-radius: 7px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--fs-xs);
}
.quiz-choice.correct .quiz-letter { background: var(--success); color: #fff; }
.quiz-choice.incorrect .quiz-letter { background: #c33; color: #fff; }
.quiz-feedback { margin-top: var(--sp-3); font-weight: 700; }
.quiz-feedback.good { color: var(--success); }
.quiz-feedback.bad { color: #c33; }
.quiz-solution { margin-top: var(--sp-2); }
.quiz-solution ol { margin: var(--sp-2) 0 0 22px; }
.quiz-solution li { margin: 6px 0; color: var(--ink-soft); font-size: var(--fs-sm); }
.quiz-distractor-note { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--accent); font-weight: 600; }
.quiz-next { margin-top: var(--sp-3); }
.quiz-result-headline { font-size: var(--fs-xl); margin-bottom: var(--sp-3); }
.quiz-topic-table { width: 100%; border-collapse: collapse; margin-bottom: var(--sp-3); font-size: var(--fs-sm); }
.quiz-topic-table th { text-align: left; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.quiz-topic-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-transform: capitalize; }
.tag-good { color: var(--success); font-weight: 700; font-size: var(--fs-xs); }
.tag-review { color: var(--accent); font-weight: 700; font-size: var(--fs-xs); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: var(--sp-4) 0; margin-top: var(--sp-5); }
.footer-grid { display: grid; gap: var(--sp-3); }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: var(--sp-2); }
.site-footer a { display: block; color: var(--ink-soft); font-size: var(--fs-sm); padding: 3px 0; }
.site-footer a:hover { color: var(--ink); }
.disclaimer { font-size: var(--fs-xs); color: var(--ink-soft); margin-top: var(--sp-3); border-top: 1px solid var(--line); padding-top: var(--sp-3); line-height: 1.7; }
