/* ============================================================
   Tandio landing page
   Palette from the app: lib/core/theme/app_palette.dart
   ============================================================ */

:root {
  /* Brand */
  --brand-100: #e6ebff;
  --brand-300: #93a5fa;
  --brand-500: #4c6ef5;
  --brand-700: #3550c7;

  /* Semantic */
  --green-100: #d7f5e3;
  --green-500: #25c06b;
  --green-700: #199a53;
  --red-100: #ffe0e0;
  --red-500: #ff4b4b;
  --red-700: #d03434;
  --gold-100: #fff1d6;
  --gold-500: #ffb020;
  --gold-700: #d98c00;

  /* Neutrals */
  --white: #ffffff;
  --grey-50: #f7f8fc;
  --grey-100: #eff1f7;
  --grey-200: #e1e5ee;
  --grey-300: #c9cfdd;
  --grey-500: #8a93a6;
  --grey-700: #4b5265;
  --grey-900: #1e2337;
  --dark-900: #11131c;
  --dark-800: #171a26;

  /* Theme tokens — light defaults, remapped in :root[data-theme="dark"] */
  --bg: var(--white);            /* page background */
  --surface: var(--white);       /* cards, chips, phone screen */
  --surface-2: var(--grey-50);   /* tinted sections & nested rows */
  --border: var(--grey-200);
  --border-soft: var(--grey-100);
  --text: var(--grey-900);
  --text-secondary: var(--grey-700);
  --text-muted: var(--grey-500);
  --link: var(--brand-500);
  --nav-bg: rgba(255, 255, 255, 0.92);
  --press-brand: #3550c7;        /* 3D press shadow under blue fills */
  --press-green: #199a53;        /* 3D press shadow under green fills */
  --shadow-card: 0 10px 30px rgba(30, 35, 55, 0.08);
  --shadow-lift: 0 16px 40px rgba(30, 35, 55, 0.14);
  --shadow-nav: 0 4px 16px rgba(30, 35, 55, 0.06);

  /* Dark values (applied via <html data-theme="dark">) */
  --bg-d: #12141d;
  --surface-d: #1b2032;
  --surface-2-d: #161a29;
  --border-d: #2b3148;
  --border-soft-d: #222741;
  --text-d: #edf0fb;
  --text-secondary-d: #c3cadf;
  --text-muted-d: #8c95ad;
  --link-d: #8ea6ff;
  --nav-bg-d: rgba(16, 18, 28, 0.88);
  --brand-100-d: rgba(99, 130, 255, 0.2);
  --brand-700-d: #a5b5ff;
  --green-100-d: rgba(37, 192, 107, 0.16);
  --green-700-d: #70e2a4;
  --red-100-d: rgba(255, 75, 75, 0.16);
  --red-700-d: #ff9d9d;
  --gold-100-d: rgba(255, 176, 32, 0.16);
  --gold-700-d: #ffcf70;
  --shadow-card-d: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lift-d: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-nav-d: 0 4px 16px rgba(0, 0, 0, 0.35);

  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --radius: 20px;
  --radius-sm: 14px;
  --container: 1120px;

  color-scheme: light;
}

/* ---------- Dark theme ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: var(--bg-d);
  --surface: var(--surface-d);
  --surface-2: var(--surface-2-d);
  --border: var(--border-d);
  --border-soft: var(--border-soft-d);
  --text: var(--text-d);
  --text-secondary: var(--text-secondary-d);
  --text-muted: var(--text-muted-d);
  --link: var(--link-d);
  --nav-bg: var(--nav-bg-d);
  --shadow-card: var(--shadow-card-d);
  --shadow-lift: var(--shadow-lift-d);
  --shadow-nav: var(--shadow-nav-d);

  /* Tint scales: translucent fills + lightened text colors */
  --brand-100: var(--brand-100-d);
  --brand-700: var(--brand-700-d);
  --green-100: var(--green-100-d);
  --green-700: var(--green-700-d);
  --red-100: var(--red-100-d);
  --red-700: var(--red-700-d);
  --gold-100: var(--gold-100-d);
  --gold-700: var(--gold-700-d);

  /* Footer & CTA become deeper wells than the page background */
  --dark-900: #0c0e16;
  --dark-800: #171b2b;
}
:root[data-theme="dark"] .store-badge { border-color: #3d4560; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
html, body { overflow-x: hidden; overflow-x: clip; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 900; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; }

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

/* ---------- Highlight marks ---------- */
.mark {
  position: relative;
  white-space: nowrap;
  background-repeat: no-repeat;
  background-size: 100% 0.38em;
  background-position: 0 88%;
}
.mark--blue { background-image: linear-gradient(var(--brand-100), var(--brand-100)); color: var(--brand-700); }
.mark--green { background-image: linear-gradient(var(--green-100), var(--green-100)); color: var(--green-700); }
.mark--gold { background-image: linear-gradient(var(--gold-100), var(--gold-100)); color: var(--gold-700); }

/* ---------- Pills & badges ---------- */
.pill {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--brand-100);
  color: var(--brand-700);
  font-weight: 800;
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.badge {
  padding: 5px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  white-space: nowrap;
}
.badge--green { background: var(--green-100); color: var(--green-700); }
.badge--gold { background: var(--gold-100); color: var(--gold-700); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn--primary {
  background: var(--brand-500);
  color: var(--white);
  box-shadow: 0 4px 0 var(--press-brand);
}
.btn--primary:hover { filter: brightness(1.06); text-decoration: none; }
.btn--primary:active { transform: translateY(4px); box-shadow: 0 0 0 var(--press-brand); }
.btn--ghost {
  background: var(--surface);
  color: var(--brand-700);
  box-shadow: inset 0 0 0 2px var(--brand-300);
}
.btn--ghost:active { transform: translateY(2px); }
.btn--sm { padding: 10px 20px; font-size: 0.9rem; }

/* ---------- Store badges ---------- */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--grey-900);
  background: var(--grey-900);
  color: var(--white);
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease;
}
.store-badge span { display: flex; flex-direction: column; line-height: 1.15; font-weight: 800; font-size: 1.05rem; text-align: left; }
.store-badge small { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; opacity: 0.85; }
.store-badge:hover { transform: translateY(-2px); }
.store-badge:active { transform: translateY(0); }
.store-badge--onDark { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.08); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--nav-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.nav.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-nav); }
.nav__inner { display: flex; align-items: center; height: 72px; }
.nav__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; font-size: 1.35rem; font-weight: 900; color: var(--text); }
.nav__brand:hover { text-decoration: none; }
.nav__logo { border-radius: 12px; box-shadow: 0 3px 0 var(--press-brand); }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links > a:not(.btn) { color: var(--text-secondary); font-weight: 700; font-size: 0.95rem; }
.nav__links > a:not(.btn):hover { color: var(--brand-500); text-decoration: none; }
.nav__cta { margin-left: 8px; }
.nav__end { display: flex; align-items: center; gap: 10px; margin-left: 16px; }

/* Theme toggle (light / dark / system) */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.08s ease;
}
.theme-toggle:hover { border-color: var(--brand-300); color: var(--link); }
.theme-toggle:active { transform: translateY(2px); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle__icon { display: none; }
html[data-theme-pref="light"] .theme-toggle__icon--sun { display: block; }
html[data-theme-pref="dark"] .theme-toggle__icon--moon { display: block; }
html[data-theme-pref="system"] .theme-toggle__icon--system { display: block; }
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav__burger span { width: 24px; height: 3px; border-radius: 2px; background: var(--text); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 40px;
  background:
    radial-gradient(1000px 500px at 85% -10%, var(--brand-100) 0%, transparent 60%),
    radial-gradient(700px 400px at -10% 30%, var(--gold-100) 0%, transparent 55%),
    var(--bg);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero__grid > * { min-width: 0; }
.hero__sub { font-size: 1.15rem; color: var(--text-secondary); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 22px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; padding: 0; margin: 0; color: var(--text-secondary); font-weight: 700; font-size: 0.9rem; }

.hero__visual { position: relative; display: flex; justify-content: flex-start; padding: 30px 0 10px; }

/* Floating chips */
.chip {
  position: absolute;
  z-index: 3;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: var(--shadow-card);
  animation: float 4s ease-in-out infinite;
}
.chip--streak { top: 2%; left: 4%; animation-delay: 0.4s; }
.chip--xp { top: 16%; right: 2%; }
.chip--energy { bottom: 12%; left: 0; animation-delay: 0.9s; color: var(--gold-700); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Phone mockup */
.phone {
  position: relative;
  z-index: 1;
  width: min(320px, 82vw);
  border-radius: 44px;
  background: var(--grey-900);
  padding: 12px;
  box-shadow: 0 30px 60px rgba(30, 35, 55, 0.25), 0 8px 20px rgba(30, 35, 55, 0.15);
}
.phone__screen {
  background: var(--surface);
  border-radius: 34px;
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lesson-top { display: flex; align-items: center; gap: 10px; }
.lesson-top__energy { color: var(--gold-700); font-size: 0.85rem; }
.lesson-top__bar { flex: 1; height: 14px; border-radius: 999px; background: var(--border); overflow: hidden; display: block; }
.lesson-top__bar i { display: block; height: 100%; border-radius: 999px; background: var(--green-500); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12); }
.lesson-top__streak { font-size: 0.85rem; font-weight: 800; }
.lesson-q { font-size: 0.92rem; line-height: 1.5; margin: 0; color: var(--text); }

/* Payoff matrix */
.matrix {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 6px;
  align-items: stretch;
  font-size: 0.78rem;
}
.matrix__corner { font-size: 0.62rem; color: var(--text-muted); align-self: end; padding-bottom: 2px; }
.matrix__colhead { text-align: center; font-weight: 800; color: var(--text-secondary); }
.matrix__rowhead { display: flex; align-items: center; font-weight: 800; color: var(--text-secondary); padding-right: 4px; }
.matrix__cell {
  border: 2px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 6px;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.matrix__cell--best {
  border-color: var(--green-500);
  background: var(--green-100);
  color: var(--green-700);
  box-shadow: 0 3px 0 var(--green-500);
}
.lesson-feedback {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--green-100);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.82rem;
  line-height: 1.45;
}
.lesson-check {
  border: 0;
  border-radius: 12px;
  padding: 12px;
  font-weight: 900;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--green-500);
  box-shadow: 0 4px 0 var(--press-green);
  cursor: pointer;
}
.lesson-check:active { transform: translateY(4px); box-shadow: none; }

.hero__mascot {
  position: absolute;
  bottom: -8px;
  right: 0;
  width: clamp(150px, 20vw, 200px);
  height: auto;
  z-index: 0; /* stands beside the phone; only its far edge tucks behind */
  pointer-events: none;
  filter: drop-shadow(0 14px 24px rgba(30, 35, 55, 0.18));
  animation: float 5s ease-in-out infinite;
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 56px 0 0;
  padding: 26px 32px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.stats div { text-align: center; }
.stats dt { font-size: 1.9rem; font-weight: 900; color: var(--link); }
.stats dd { margin: 0; color: var(--text-secondary); font-weight: 700; font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--tint { background: var(--surface-2); }
.section__head { text-align: center; max-width: 720px; margin-bottom: 56px; }
.section__head p { color: var(--text-secondary); font-size: 1.08rem; margin: 0; }

/* ---------- Demo ---------- */
.demo {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 32px;
}
.demo__mascot {
  position: absolute;
  right: -180px;
  top: 50%;
  transform: translateY(-50%);
  width: 150px;
}
@media (max-width: 1180px) {
  .demo__mascot { display: none; }
}
.demo__scenario { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 20px; }
.demo__emoji { font-size: 2.2rem; line-height: 1; }
.demo__scenario h3 { margin-bottom: 4px; }
.demo__scenario p { margin: 0; color: var(--text-secondary); font-size: 0.98rem; }
.demo__prompt { font-weight: 900; font-size: 1.1rem; margin-bottom: 14px; }
.demo__options { display: flex; flex-direction: column; gap: 12px; }
.option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease;
}
.option:hover { border-color: var(--brand-300); background: var(--brand-100); color: var(--brand-700); }
.option:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.option.is-picked { border-color: var(--brand-500); background: var(--brand-100); color: var(--brand-700); }
.option.is-optimal { border-color: var(--green-500); background: var(--green-100); color: var(--green-700); }
.option.is-viable { border-color: var(--gold-500); background: var(--gold-100); color: var(--gold-700); }
.option.is-costly { border-color: var(--red-500); background: var(--red-100); color: var(--red-700); }
.option.is-optimal::after { content: "✓ Best move"; float: right; font-weight: 900; font-size: 0.8rem; }
.option.is-viable::after { content: "△ Works — barely"; float: right; font-weight: 900; font-size: 0.8rem; }
.option.is-costly::after { content: "✗ Costly"; float: right; font-weight: 900; font-size: 0.8rem; }

.demo__result {
  margin-top: 22px;
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  border: 2px solid var(--border);
  background: var(--surface-2);
  animation: pop 0.3s ease;
}
.demo__result.v--optimal { border-color: var(--green-500); background: var(--green-100); }
.demo__result.v--viable { border-color: var(--gold-500); background: var(--gold-100); }
.demo__result.v--costly { border-color: var(--red-500); background: var(--red-100); }
.demo__verdict { font-weight: 900; font-size: 1.05rem; margin-bottom: 6px; }
.demo__result p { margin: 0 0 8px; font-size: 0.95rem; }
.demo__opponent { font-style: italic; color: var(--text-secondary); }
.demo__payoff { font-weight: 900; font-size: 1rem; }
@keyframes pop {
  0% { transform: scale(0.97); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.demo__takeaway {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px dashed var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  animation: pop 0.3s ease;
}
.demo__takeaway p { margin: 0; flex: 1 1 320px; font-size: 0.95rem; color: var(--text-secondary); }

/* Confetti */
.confetti-bit {
  position: fixed;
  width: 10px;
  height: 14px;
  top: 0;
  z-index: 100;
  pointer-events: none;
  animation: confetti-fall 1.6s ease-in forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(70vh) rotate(540deg); opacity: 0; }
}

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: var(--brand-300); }
.card__icon { font-size: 2rem; display: inline-block; margin-bottom: 10px; }
.card p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px 24px;
  text-align: center;
}
.step__num {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-500);
  color: var(--white);
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 0 var(--press-brand);
}
.step__icon { font-size: 2.2rem; display: inline-block; margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- Courses ---------- */
.courses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  align-items: start;
}
.course {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.course:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.course__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.course__emoji { font-size: 2.4rem; line-height: 1; }
.course__head h3 { margin: 0; }
.course__head p { margin: 2px 0 0; color: var(--text-muted); font-size: 0.85rem; font-weight: 700; }
.course__head > div { flex: 1; }
.course__chapters { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.course__chapters li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.course__chapters span { font-size: 1.3rem; line-height: 1.3; }
.course__chapters strong { display: block; font-size: 0.98rem; }
.course__chapters small { color: var(--text-muted); font-size: 0.82rem; font-weight: 600; }
.course__soon { opacity: 0.65; border-style: dashed !important; }
.course__note { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

/* ---------- CTA ---------- */
.cta {
  display: flex;
  align-items: center;
  gap: 36px;
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(76, 110, 245, 0.35) 0%, transparent 60%),
    linear-gradient(120deg, var(--dark-900), var(--dark-800));
  border-radius: 28px;
  padding: 48px 52px;
  color: var(--white);
  overflow: hidden;
}
.cta__mascot { width: 170px; flex-shrink: 0; filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.4)); }
.cta__copy h2 { color: var(--white); margin-bottom: 8px; }
.cta__copy p { color: var(--grey-300); margin-bottom: 20px; }

/* ---------- FAQ ---------- */
.faq { display: flex; gap: 32px; align-items: flex-start; justify-content: center; }
.faq__mascot { border-radius: 24px; }
.faq__list { max-width: 720px; width: 100%; display: flex; flex-direction: column; gap: 12px; }
.faq__list details {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 22px;
  transition: border-color 0.15s ease;
}
.faq__list details[open] { border-color: var(--brand-300); }
.faq__list summary {
  cursor: pointer;
  font-weight: 800;
  padding: 14px 0;
  list-style: none;
  position: relative;
  padding-right: 36px;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--link);
  transition: transform 0.2s ease;
}
.faq__list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__list details p { color: var(--text-secondary); font-size: 0.97rem; }

/* ---------- Footer ---------- */
.footer { background: var(--dark-900); color: var(--grey-300); padding: 64px 0 28px; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--dark-800);
}
.footer__brand { display: flex; gap: 14px; align-items: flex-start; }
.footer__brand img { border-radius: 16px; }
.footer__brand strong { font-size: 1.2rem; color: var(--white); }
.footer__brand p { margin: 4px 0 0; font-size: 0.9rem; color: var(--grey-500); }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { color: var(--white); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.footer__col a, .footer__link {
  color: var(--grey-300);
  font-size: 0.95rem;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}
.footer__col a:hover, .footer__link:hover { color: var(--brand-300); }
.footer__legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--grey-500);
}
.footer__legal p { margin: 0; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grey-900);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow-lift);
  z-index: 200;
  animation: toast-in 0.25s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .hero__visual { order: -1; margin-top: 10px; }
  .hero { padding-top: 40px; }
  .phone { margin-right: 0; }
  .hero__mascot { width: 150px; right: auto; left: 334px; bottom: -10px; }
  .chip--streak { left: 0; }
  .chip--energy { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 30px; max-width: 480px; margin: 0 auto; }
  .courses { grid-template-columns: 1fr; }
  .cta { flex-direction: column; text-align: center; padding: 40px 28px; }
  .cta .hero__actions { justify-content: center; }
  .faq__mascot { display: none; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .section { padding: 72px 0; }
  .features { grid-template-columns: 1fr; }
  .stats { padding: 20px; }
  .phone { margin-right: 0; width: min(300px, 80vw); }
  .hero__mascot {
    width: 100px;
    right: auto;
    left: calc(min(300px, 80vw) / 2);
    margin-left: -50px;
    bottom: -92px; /* stands below the phone, feet landing on the stats strip */
    z-index: 2; /* in front; only overlaps the phone's bottom bezel, never lesson content */
  }
  .chip--xp { right: 0; }
  .chip--streak { top: 0; }

  .nav__links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 16px 30px rgba(30, 35, 55, 0.12);
    padding: 12px 24px 20px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links > a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--border-soft); }
  .nav__cta { margin: 12px 0 0; }
  .nav__burger { display: flex; }

  .demo { padding: 24px 18px; }
  .cta__mascot { width: 130px; }
}
