/* =============================================================
   TruLearn — Build Spec v1.0 — style.css
   Single source of truth: all values from spec §1
   ============================================================= */

/* ── 1. TOKENS ───────────────────────────────────────────────── */
:root {
  /* § 1.1 Colour */
  --color-primary:        #1A4FA0;
  --color-primary-deep:   #0F1B2D;
  --color-secondary:      #1F9D6B;
  --color-accent:         #E8821E;
  --color-blue-light:     #3D7DD8;
  --color-blue-tint:      #E8F0FB;
  --color-green-tint:     #E3F4EA;
  --color-amber-tint:     #FBEAD6;
  --color-error:          #C0392B;
  --color-surface:        #FFFFFF;
  --color-bg:             #F7F9FB;
  --color-border:         #E4E9EF;
  --color-text-body:      #52606D;
  --color-text-heading:   #0F1B2D;
  --color-text-muted:     #7B8794;
  --color-text-on-navy:   #9DB4D4;

  /* § 1.2 Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Type scale — fixed per spec table */
  --text-h1-desktop:  46px;
  --text-h1-mobile:   32px;
  --text-h2-desktop:  30px;
  --text-h2-mobile:   24px;
  --text-h3:          17px;
  --text-h3-mobile:   16px;
  --text-lead:        18px;
  --text-body:        16px;
  --text-body-mobile: 15px;
  --text-eyebrow:     12px;
  --text-caption:     13px;

  /* § 1.3 Spacing scale (4-base) */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:   12px;
  --sp-4:   16px;
  --sp-6:   24px;
  --sp-8:   32px;
  --sp-12:  48px;
  --sp-16:  64px;
  --sp-24:  96px;

  /* Section padding */
  --section-py:        80px;
  --section-py-mobile: 48px;

  /* Layout */
  --max-w:    1200px;
  --gutter:   48px;
  --gutter-m: 20px;

  /* § 1.3 Radii */
  --r-card:   16px;
  --r-btn:    999px;
  --r-input:  10px;
  --r-chip:   12px;

  /* § 1.4 Elevation */
  --shadow-card:  0 1px 4px rgba(15,27,45,.06), 0 0 0 1px var(--color-border);
  --shadow-hover: 0 6px 18px rgba(15,27,45,.10);

  /* Transitions */
  --trans: 150ms ease;
}

/* ── 2. RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-text-body);
  background: var(--color-bg);
}

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

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── 3. TYPOGRAPHY ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text-heading);
  line-height: 1.15;
  text-wrap: balance;
}

h1 { font-size: var(--text-h1-desktop); line-height: 1.1; }
h2 { font-size: var(--text-h2-desktop); }
h3 { font-size: var(--text-h3); }

p { margin: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.lead {
  font-size: var(--text-lead);
  line-height: 1.6;
  color: var(--color-text-body);
  max-width: 680px;
}

.caption {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

/* ── 4. LAYOUT UTILITIES ─────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-py) 0;
}

.section--white { background: var(--color-surface); }
.section--tint  { background: var(--color-blue-tint); }
.section--navy  { background: var(--color-primary-deep); }

/* ── 5. BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 28px;
  border-radius: var(--r-btn);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--trans), color var(--trans), border-color var(--trans), box-shadow var(--trans);
  min-height: 44px;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 3px solid var(--color-blue-light);
  outline-offset: 2px;
  text-decoration: none;
}

/* Primary — Trust Blue */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: #143F82;
  border-color: #143F82;
  text-decoration: none;
  color: #fff;
}

/* Secondary — outline */
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-blue-tint);
  text-decoration: none;
  color: var(--color-primary);
}

/* Critical CTA — Amber (one per page) */
.btn-cta {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-cta:hover {
  background: #C96E14;
  border-color: #C96E14;
  text-decoration: none;
  color: #fff;
}

/* Ghost — for dark backgrounds */
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
  text-decoration: none;
  color: #fff;
}

/* ── 6. NAVIGATION ───────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: var(--sp-8);
}

/* Logo */
.nav-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  text-decoration: none;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}
.logo-tru {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  color: var(--color-primary);
  line-height: 1;
}
.logo-learn {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 22px;
  color: var(--color-primary-deep);
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--color-primary-deep);
  text-decoration: none;
  transition: color var(--trans);
}
.nav-links a:hover { color: var(--color-primary); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--sp-2);
  color: var(--color-primary-deep);
}

.nav-mobile-panel {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-surface);
  z-index: 200;
  flex-direction: column;
  padding: var(--sp-6) var(--gutter-m);
  gap: var(--sp-6);
  overflow-y: auto;
}
.nav-mobile-panel.open { display: flex; }

.nav-mobile-close {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 28px;
  color: var(--color-primary-deep);
  line-height: 1;
  padding: var(--sp-2);
}

.nav-mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}
.nav-mobile-links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 18px;
  color: var(--color-primary-deep);
  text-decoration: none;
}

.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: auto;
  padding-top: var(--sp-6);
  border-top: 1px solid var(--color-border);
}
.nav-mobile-actions .btn { justify-content: center; width: 100%; }

/* ── 7. HERO ─────────────────────────────────────────────────── */
.hero {
  background: var(--color-bg);
  padding: var(--sp-16) 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: var(--sp-16);
  align-items: center;
}

.hero-eyebrow-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--color-blue-tint);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--r-btn);
  margin-bottom: var(--sp-6);
}

.hero-headline {
  font-size: var(--text-h1-desktop);
  line-height: 1.1;
  color: var(--color-text-heading);
  margin-bottom: var(--sp-6);
}

.hero-lead {
  font-size: var(--text-lead);
  line-height: 1.6;
  color: var(--color-text-body);
  max-width: 600px;
  margin-bottom: var(--sp-8);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* Dashboard mock visual */
.dashboard-card {
  background: var(--color-primary-deep);
  border-radius: 20px;
  padding: var(--sp-8);
  color: #fff;
  box-shadow: 0 24px 64px rgba(15,27,45,.28);
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dashboard-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-btn);
}
.badge-green {
  background: var(--color-green-tint);
  color: #166534;
}
.badge-amber {
  background: var(--color-amber-tint);
  color: #92400E;
}

.dashboard-stats {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.stat-row {
  background: rgba(255,255,255,0.05);
  border-radius: var(--r-chip);
  padding: var(--sp-4) var(--sp-4);
}
.stat-row--amber {
  border-left: 3px solid var(--color-accent);
  background: rgba(232,130,30,0.08);
  padding-left: 13px;
}

.stat-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-on-navy);
  margin-bottom: var(--sp-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  color: #fff;
  margin-bottom: var(--sp-2);
}

.stat-sub {
  font-size: 12px;
  color: var(--color-text-on-navy);
}

.progress-bar-track {
  background: rgba(255,255,255,0.1);
  border-radius: var(--r-btn);
  height: 6px;
  margin-top: var(--sp-2);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--r-btn);
  background: var(--color-secondary);
}

/* ── 8. TRUST STRIP ──────────────────────────────────────────── */
.trust-strip {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--sp-6) 0;
}

.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-12);
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-caption);
  color: var(--color-text-heading);
}

.trust-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  background: var(--color-green-tint);
  border-radius: 50%;
  flex-shrink: 0;
}
.trust-check svg { color: var(--color-secondary); }

/* ── 9. VALUE SECTION ────────────────────────────────────────── */
.value-section { background: var(--color-bg); }

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--sp-12);
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--sp-3);
}

.section-title {
  font-size: var(--text-h2-desktop);
  color: var(--color-text-heading);
  margin-bottom: var(--sp-4);
}

.section-sub {
  font-size: var(--text-body);
  color: var(--color-text-body);
  line-height: 1.6;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

/* Card */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-card);
  padding: 26px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: box-shadow var(--trans), transform var(--trans);
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-chip);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.card-icon--blue { background: var(--color-blue-tint); color: var(--color-primary); }
.card-icon--amber { background: var(--color-amber-tint); color: var(--color-accent); }
.card-icon--green { background: var(--color-green-tint); color: var(--color-secondary); }

.card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-h3);
  color: var(--color-text-heading);
  line-height: 1.3;
}

.card-desc {
  font-size: var(--text-body);
  color: var(--color-text-body);
  line-height: 1.6;
  flex: 1;
}

.card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.card-link:hover { text-decoration: underline; }

/* ── 10. HOW IT WORKS ────────────────────────────────────────── */
.how-it-works { background: var(--color-surface); }

.steps-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
  position: relative;
}

/* Connecting line */
.steps-row::before {
  content: '';
  position: absolute;
  top: 24px;
  left: calc(12.5% + 24px);
  right: calc(12.5% + 24px);
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-4);
  position: relative;
  z-index: 1;
}

.step-node {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 0 0 6px var(--color-blue-tint);
}

.step-label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text-heading);
}

.step-desc {
  font-size: 14px;
  color: var(--color-text-body);
  line-height: 1.5;
}

/* ── 11. OUTCOMES STRIP ──────────────────────────────────────── */
.outcomes-strip {
  background: var(--color-primary-deep);
  padding: var(--sp-12) 0;
}

.outcomes-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
  text-align: center;
}

.outcome-number {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 48px;
  color: #fff;
  line-height: 1;
  margin-bottom: var(--sp-2);
}
.outcome-number span {
  color: var(--color-accent);
}

.outcome-label {
  font-size: 15px;
  color: var(--color-text-on-navy);
  line-height: 1.5;
}

/* ── 12. CTA BAND ────────────────────────────────────────────── */
.cta-band {
  background: var(--color-primary);
  border-radius: 20px;
  padding: var(--sp-16) var(--sp-12);
  text-align: center;
  margin: var(--sp-16) 0;
}

.cta-band-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--sp-4);
}

.cta-band-headline {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-h2-desktop);
  color: #fff;
  margin-bottom: var(--sp-4);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-band-sub {
  font-size: var(--text-body);
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin: 0 auto var(--sp-8);
  line-height: 1.6;
}

.cta-band-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* ── 13. FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--color-primary-deep);
  padding: var(--sp-16) 0 var(--sp-8);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.footer-logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.footer-logo .logo-tru {
  color: #fff;
  font-size: 20px;
}
.footer-logo .logo-learn {
  color: var(--color-text-on-navy);
  font-size: 20px;
}

.footer-descriptor {
  font-size: 13px;
  color: var(--color-text-on-navy);
  line-height: 1.5;
  max-width: 260px;
}

.footer-col-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fff;
  margin-bottom: var(--sp-4);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-links a {
  font-size: 14px;
  color: var(--color-text-on-navy);
  text-decoration: none;
  transition: color var(--trans);
}
.footer-links a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-6);
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.footer-copy {
  font-size: var(--text-caption);
  color: var(--color-text-on-navy);
}

.footer-legal {
  display: flex;
  gap: var(--sp-6);
  list-style: none;
}
.footer-legal a {
  font-size: var(--text-caption);
  color: var(--color-text-on-navy);
}
.footer-legal a:hover { color: #fff; }

/* ── 14. RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --gutter: 32px;
  }
  .steps-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-row::before { display: none; }
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
  .dashboard-card { order: -1; }
  .cards-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .footer-brand { grid-column: 1 / -1; }
  .outcomes-inner { grid-template-columns: 1fr; gap: var(--sp-6); }
  .trust-items { gap: var(--sp-6); }
  .cta-band { padding: var(--sp-12) var(--sp-6); border-radius: var(--r-card); }
}

@media (max-width: 640px) {
  :root {
    --section-py: var(--section-py-mobile);
    --gutter: var(--gutter-m);
  }
  h1 { font-size: var(--text-h1-mobile); }
  h2 { font-size: var(--text-h2-mobile); }
  h3 { font-size: var(--text-h3-mobile); }
  .lead { font-size: 16px; }

  .hero { padding: var(--sp-12) 0; }
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-8); }

  .nav-links, .nav-actions { display: none; }
  .nav-toggle { display: block; }

  .steps-row { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .cta-band-actions { flex-direction: column; align-items: center; }
  .cta-band-actions .btn { width: 100%; max-width: 320px; }
}

/* ── 15. FOCUS STATES ────────────────────────────────────────── */
:focus-visible {
  outline: 3px solid var(--color-blue-light);
  outline-offset: 2px;
}
