:root {
  /* ----- neutral ramp (slate), matches the app ----- */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* ----- brand (blue) ----- */
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-tint: #f5f8ff;
  --brand-tint-2: #eef2ff;
  --brand-border: #c7d7fe;

  /* ----- accent (purple), AI tutoring / adaptive ----- */
  --purple: #7c3aed;
  --purple-deep: #6d28d9;
  --purple-tint: #f3e8ff;

  /* ----- semantic ----- */
  --good:      #16a34a;
  --good-ink:  #047857;
  --good-tint: #ecfdf5;
  --warn:      #d97706;
  --warn-ink:  #b45309;
  --warn-tint: #fef3c7;
  --bad:       #dc2626;
  --bad-ink:   #b91c1c;
  --bad-tint:  #fef2f2;

  /* ----- surfaces ----- */
  --bg:    var(--gray-50);
  --card:  #ffffff;
  --ink:   var(--gray-800);
  --muted: var(--gray-500);
  --line:  var(--gray-200);
  --inset: var(--gray-50);

  --gradient: linear-gradient(135deg, var(--brand), var(--purple));

  /* ----- layout ----- */
  --max: 1120px;
  --r-sm:   8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-pill: 999px;

  /* ----- elevation ----- */
  --shadow-card:       0 1px 2px rgba(15, 23, 42, .05);
  --shadow-card-hover: 0 8px 24px -6px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

p {
  margin: 0;
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

section { position: relative; }

/* ----- nav ----- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.01em;
  margin-right: auto;
  color: var(--ink);
}
.brand-mark {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--brand-tint-2);
  border: 1px solid var(--brand-border);
  color: var(--brand);
}
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px 24px 20px;
  background: var(--card);
  border-top: 1px solid var(--line);
}
.mobile-menu a {
  padding: 12px 4px;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.mobile-menu.is-open { display: flex; }

/* ----- hero ----- */
.hero {
  padding: 88px 24px 60px;
}
.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--brand-tint-2);
  border: 1px solid var(--brand-border);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 22px;
}
.eyebrow-light { background: var(--gray-100); border-color: var(--line); color: var(--muted); }
.hero-copy h1 {
  font-size: clamp(40px, 5.5vw, 58px);
  color: var(--ink);
  margin-bottom: 20px;
}
.hero-copy h2 {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 600;
  color: var(--gray-600);
  margin-top: -8px;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 18px;
  max-width: 480px;
}

/* ----- hero visual ----- */
.hero-visual {
  position: relative;
  height: 420px;
}
.float-card {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--shadow-card-hover);
}
.card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot-purple { background: var(--purple); }
.dot-blue { background: var(--brand); }
.dot-green { background: var(--good); }
.card-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }

.card-tutor {
  top: 0;
  left: 0;
  width: 290px;
  z-index: 2;
}
.card-score {
  top: 40px;
  right: 0;
  width: 170px;
  text-align: center;
  z-index: 1;
}
.card-drill {
  bottom: 0;
  left: 40px;
  width: 250px;
  z-index: 3;
}

.chat-bubble {
  font-size: 13.5px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: var(--r-md);
  margin-bottom: 8px;
  color: var(--ink);
}
.chat-bubble-them {
  background: var(--gray-100);
}
.chat-bubble-us {
  background: var(--purple-tint);
  margin-bottom: 0;
}
.chat-bubble em { color: var(--purple-deep); font-style: normal; font-weight: 600; }

.score-ring {
  width: 84px;
  height: 84px;
  margin: 6px auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--brand) calc(var(--pct) * 1%), var(--gray-100) 0);
  position: relative;
}
.score-ring::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--card);
}
.score-ring-num {
  position: relative;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
}
.score-trend {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--good);
}

.drill-type {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.drill-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 50px;
}
.drill-bars span {
  flex: 1;
  border-radius: 3px;
  background: var(--brand);
  opacity: 0.85;
}

/* ----- shared section styles ----- */
.section-head {
  max-width: 640px;
  margin: 0 auto 52px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 38px);
  color: var(--ink);
  margin: 14px 0 12px;
}
.section-sub { font-size: 16.5px; }

.features, .how-it-works, .deep-dive {
  max-width: var(--max);
  margin: 0 auto;
  padding: 100px 24px;
}
.how-it-works { text-align: center; }

/* ----- feature grid ----- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.feature-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  margin-bottom: 18px;
}
.feature-icon svg { width: 22px; height: 22px; }
.icon-purple { background: var(--purple-tint); color: var(--purple); }
.icon-blue { background: var(--brand-tint-2); color: var(--brand); }
.icon-green { background: var(--good-tint); color: var(--good); }
.icon-amber { background: var(--warn-tint); color: var(--warn); }
.feature-card h3 { font-size: 18px; color: var(--ink); margin-bottom: 10px; }
.feature-card p { font-size: 14.5px; }

/* ----- how it works ----- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: left;
}
.step {
  position: relative;
  padding-top: 28px;
  border-top: 2px solid var(--line);
}
.step-num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-400);
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}
.step h3 { font-size: 18px; color: var(--ink); margin-bottom: 8px; }
.step p { font-size: 14.5px; }

/* ----- deep dive ----- */
.deep-dive-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 120px;
}
.deep-dive-row:last-child { margin-bottom: 0; }
.deep-dive-row-reverse .deep-dive-copy { order: 2; }
.deep-dive-row-reverse .deep-dive-visual { order: 1; }
.deep-dive-copy h2 {
  font-size: clamp(26px, 3.5vw, 32px);
  color: var(--ink);
  margin: 14px 0 14px;
}
.deep-dive-copy p { font-size: 16px; }

.mock-window {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card-hover);
}
.mock-window-bar {
  display: flex;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--gray-50);
}
.mock-window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-200);
}
.mock-window-body { padding: 24px; }
.step-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-tint);
  border: 1px solid var(--brand-border);
  padding: 5px 10px;
  border-radius: var(--r-pill);
  margin-bottom: 14px;
}
.mock-input {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--gray-50);
  color: var(--gray-400);
  font-size: 13.5px;
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.heat {
  display: block;
  height: 38px;
  border-radius: var(--r-sm);
  border-left: 3px solid transparent;
}
.heat-1 { background: var(--good-tint); border-left-color: var(--good); }
.heat-2 { background: var(--good-tint); border-left-color: var(--good); opacity: .6; }
.heat-3 { background: var(--warn-tint); border-left-color: var(--warn); }
.heat-4 { background: var(--bad-tint); border-left-color: var(--bad); }
.trend-line { height: 60px; }
.trend-line svg { width: 100%; height: 100%; }

/* ----- footer ----- */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 24px 28px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 14.5px;
  color: var(--muted);
}
.footer-links a:hover { color: var(--ink); }
.footer-copy {
  max-width: var(--max);
  margin: 36px auto 0;
  font-size: 13px;
  color: var(--muted);
}
.footer-disclaimer {
  max-width: var(--max);
  margin: 8px auto 0;
  font-size: 12px;
  color: var(--gray-400);
}

/* ----- reveal animation ----- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ----- responsive ----- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { height: 360px; margin-top: 20px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .deep-dive-row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 80px; }
  .deep-dive-row-reverse .deep-dive-copy { order: 1; }
  .deep-dive-row-reverse .deep-dive-visual { order: 2; }
}

@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 56px 20px 40px; }
  .features, .how-it-works, .deep-dive { padding: 64px 20px; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .card-tutor { width: 240px; position: relative; top: 0; left: 0; }
  .card-score { width: 140px; }
  .card-drill { width: 220px; left: 0; }
  .hero-visual { height: auto; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
  .card-score, .card-drill { position: relative; }
}
