/* ============ Design tokens (from the TalkCo app's own theme) ============ */
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-light: #eef2ff;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-alt: #f1f5f9;
  --green: #16a34a;
  --amber: #d97706;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 48px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);

  --container: 1160px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ============ Reset ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
section { padding: 96px 0; }
@media (max-width: 768px) { section { padding: 64px 0; } }

.section-alt { background: var(--surface); }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 640px;
}

.section-title.center { max-width: 100%; text-align: center; margin: 0 auto; }

.section-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 560px;
  margin-top: 16px;
}
.section-sub.center { max-width: 620px; margin-left: auto; margin-right: auto; text-align: center; }

.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; display: flex; flex-direction: column; align-items: center; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: white; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); transform: translateY(-1px); }
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 14px;
  background: var(--text);
  color: white;
  border: none;
  cursor: not-allowed;
  opacity: 0.55;
}
.btn-store .store-icon { font-size: 20px; line-height: 1; }
.btn-store .store-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.btn-store .store-text small { font-size: 11px; font-weight: 400; opacity: 0.85; }
.btn-store .store-text strong { font-size: 15px; font-weight: 700; }
.btn-store .badge {
  margin-left: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.18);
  padding: 3px 8px;
  border-radius: 999px;
}
.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.nav-brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { font-size: 15px; font-weight: 600; color: var(--text-secondary); transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.nav-cta { display: none; }
@media (min-width: 1024px) { .nav-cta { display: inline-flex; } }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
@media (max-width: 1023px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.mobile-menu.open { display: flex; }
.mobile-menu a { padding: 12px 4px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--surface-alt); }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu .btn { margin-top: 12px; width: 100%; }

/* ============ Hero ============ */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-grid .cta-row { justify-content: center; }
  .hero-copy { order: 2; }
  .hero-visual { order: 1; }
}
.hero h1 {
  font-size: clamp(36px, 5.4vw, 60px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--text);
}
.hero .section-sub { font-size: 19px; margin-top: 20px; margin-bottom: 32px; max-width: 480px; }
@media (max-width: 900px) { .hero .section-sub { margin-left: auto; margin-right: auto; } }
.hero-visual { display: flex; justify-content: center; }

/* ============ Phone mockup (used to recreate real screens honestly) ============ */
.phone {
  width: 280px;
  border-radius: 40px;
  background: #0f172a;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.phone::before {
  content: "";
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 90px; height: 22px;
  background: #0f172a;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone-screen {
  background: var(--bg);
  border-radius: 30px;
  overflow: hidden;
  height: 580px;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
}
.phone-float {
  animation: phoneFloat 6s ease-in-out infinite;
}
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .phone-float { animation: none; } }

.mock-header {
  background: var(--blue);
  color: white;
  padding: 20px 18px 14px;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.mock-body { padding: 16px; overflow: hidden; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.mock-tabbar {
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.mock-tabbar span { font-size: 10px; color: var(--text-muted); font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mock-tabbar span.active { color: var(--blue); }
.mock-tabbar .dot { width: 18px; height: 18px; border-radius: 6px; background: var(--surface-alt); }
.mock-tabbar span.active .dot { background: var(--blue-light); }

/* Hero mockup: idle speaking screen */
.mock-waveform { display: flex; align-items: center; justify-content: center; gap: 5px; height: 60px; }
.mock-waveform span { width: 5px; border-radius: 3px; background: var(--blue); opacity: 0.85; }
.mock-waveform span:nth-child(1) { height: 14px; } .mock-waveform span:nth-child(2) { height: 26px; }
.mock-waveform span:nth-child(3) { height: 40px; } .mock-waveform span:nth-child(4) { height: 22px; }
.mock-waveform span:nth-child(5) { height: 32px; } .mock-waveform span:nth-child(6) { height: 16px; }
.mock-hint { text-align: center; color: var(--text-secondary); font-size: 13px; padding: 0 12px; line-height: 1.5; }
.mock-speak-btn {
  margin-top: auto;
  background: var(--blue);
  color: white;
  text-align: center;
  padding: 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}
.mock-end { text-align: center; color: #dc2626; font-size: 12px; font-weight: 700; margin-top: 8px; }

/* ============ Steps ============ */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 800px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.step-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num { font-size: 14px; font-weight: 800; color: var(--blue); letter-spacing: 0.04em; margin-bottom: 16px; }
.step-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}
.step-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.step-card p { color: var(--text-secondary); font-size: 15px; line-height: 1.6; }

/* ============ Feature split (AI tutor) ============ */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .feature-split { grid-template-columns: 1fr; text-align: center; } .feature-split .section-title, .feature-split .section-sub { margin-left: auto; margin-right: auto; } }
.feature-split .visual-col { display: flex; justify-content: center; }
.feature-list { margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 900px) { .feature-list { align-items: center; } }
.feature-item { display: flex; align-items: center; gap: 12px; font-size: 15px; font-weight: 600; color: var(--text); }
.feature-item .check {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* Conversation mockup bubbles */
.mock-bubble { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 12.5px; line-height: 1.45; }
.mock-bubble.assistant { background: var(--surface-alt); align-self: flex-start; border-bottom-left-radius: 4px; }
.mock-bubble.user { background: var(--blue); color: white; align-self: flex-end; border-bottom-right-radius: 4px; }

/* ============ Topic cards ============ */
.topics-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .topics-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .topics-grid { grid-template-columns: 1fr; } }
.topic-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.topic-emoji { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-light); display: flex; align-items: center; justify-content: center; font-size: 21px; margin-bottom: 14px; }
.topic-level { font-size: 11px; font-weight: 800; color: var(--blue); letter-spacing: 0.04em; margin-bottom: 6px; }
.topic-card h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.topic-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }

/* ============ Level progression ============ */
.level-track { display: flex; align-items: center; justify-content: center; gap: 0; margin: 0 auto; max-width: 640px; flex-wrap: wrap; }
.level-pill {
  width: 68px; height: 68px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 17px;
  background: var(--surface-alt);
  color: var(--text-secondary);
  border: 2px solid var(--border);
  flex-shrink: 0;
}
.level-pill.highlight { background: var(--blue); color: white; border-color: var(--blue); box-shadow: var(--shadow-md); }
.level-arrow { color: var(--text-muted); font-size: 20px; margin: 0 10px; }
@media (max-width: 560px) { .level-arrow { margin: 0 4px; } .level-pill { width: 54px; height: 54px; font-size: 14px; } }

/* ============ Feedback mockup ============ */
.feedback-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .feedback-grid { grid-template-columns: 1fr; } }
.feedback-cards { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.feedback-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.feedback-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.feedback-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.55; }

.mock-score-row { display: flex; gap: 10px; }
.mock-score { flex: 1; background: var(--surface-alt); border-radius: 10px; padding: 10px 8px; text-align: center; }
.mock-score .num { font-size: 18px; font-weight: 800; color: var(--blue); }
.mock-score .label { font-size: 9px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }
.mock-mistake { background: var(--surface-alt); border-radius: 10px; padding: 10px 12px; font-size: 11px; line-height: 1.5; }
.mock-mistake .said { color: #dc2626; text-decoration: line-through; display: block; margin-bottom: 3px; }
.mock-mistake .fixed { color: var(--green); font-weight: 700; display: block; }

/* ============ Activities ============ */
.activities-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
@media (max-width: 1000px) { .activities-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .activities-grid { grid-template-columns: repeat(2, 1fr); } }
.activity-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.activity-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.activity-icon { font-size: 26px; margin-bottom: 10px; }
.activity-card h4 { font-size: 13.5px; font-weight: 700; }
.support-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 28px;
}
.support-note strong { color: var(--text); }

/* ============ Progress mockup ============ */
.progress-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
@media (max-width: 900px) { .progress-grid { grid-template-columns: 1fr; text-align: center; } .progress-grid .section-title, .progress-grid .section-sub { margin-left: auto; margin-right: auto; } .progress-grid .visual-col { order: -1; } }
.stat-pills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.stat-pill { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.stat-pill .num { font-size: 22px; font-weight: 800; color: var(--text); }
.stat-pill .label { font-size: 12px; color: var(--text-secondary); font-weight: 600; margin-top: 2px; }

.mock-stat-card { background: var(--surface-alt); border-radius: 12px; padding: 14px; display: flex; justify-content: space-between; align-items: center; }
.mock-stat-card .num { font-size: 20px; font-weight: 800; }
.mock-stat-card .label { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; }
.mock-bar-row { display: flex; align-items: flex-end; gap: 6px; height: 60px; }
.mock-bar { flex: 1; background: var(--blue); border-radius: 4px 4px 0 0; opacity: 0.85; }
.mock-goal-ring {
  width: 56px; height: 56px;
  border-radius: 999px;
  border: 5px solid var(--blue-light);
  border-top-color: var(--blue);
  border-right-color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--blue);
  transform: rotate(-45deg);
}
.mock-goal-ring span { transform: rotate(45deg); }

/* ============ Final CTA ============ */
.final-cta { text-align: center; background: var(--text); color: white; border-radius: 28px; padding: 72px 32px; margin: 0 24px; }
.final-cta-inner { max-width: 640px; margin: 0 auto; }
.final-cta h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.final-cta p { color: rgba(255,255,255,0.75); font-size: 17px; margin-top: 14px; margin-bottom: 32px; }
.final-cta .cta-row { justify-content: center; }
.final-cta .btn-store { background: white; color: var(--text); opacity: 0.9; }

/* ============ Footer ============ */
footer { padding: 56px 0 32px; }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col span { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.footer-col a { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.footer-col a:hover { color: var(--text); }
.footer-copy { text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 24px; }

/* ============ Reveal-on-scroll ============ */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============ Skip link (a11y) ============ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue);
  color: white;
  padding: 12px 20px;
  border-radius: 0 0 8px 0;
  z-index: 200;
  font-weight: 700;
}
.skip-link:focus { left: 0; }
