/* ═══════════════════════════════════════════
   MATHLY — styles.css
   Warm, trustworthy, professional edtech
   Fonts: Nunito (UI) + Lora (editorial)
═══════════════════════════════════════════ */

/* ── Reset & Variables ─────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:     #FBF8F3;
  --cream-mid: #F4EFE6;
  --cream-dark:#E8E0D2;

  --ink:       #1C1A18;
  --ink-mid:   #4A4540;
  --ink-light: #7A7268;

  --teal:      #1D8C72;
  --teal-light:#E4F5F0;
  --teal-mid:  #2AADA8;

  --amber:     #D97706;
  --amber-light:#FEF3C7;

  --coral:     #E05A3A;
  --coral-light:#FEE9E3;

  --blue:      #2563EB;
  --blue-light:#EFF6FF;

  --green:     #16A34A;
  --green-light:#F0FDF4;

  --purple:    #7C3AED;
  --purple-light:#F5F3FF;

  --white:     #FFFFFF;
  --shadow-sm: 0 2px 12px rgba(28,26,24,.07);
  --shadow-md: 0 6px 32px rgba(28,26,24,.11);
  --shadow-lg: 0 16px 64px rgba(28,26,24,.14);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 36px;

  --nav-h: 68px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Utility ────────────────────────────── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--teal-light);
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 1.1rem;
}

.section-title {
  font-family: 'Lora', serif;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 600;
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: 1rem;
}

.section-sub {
  max-width: 580px;
  font-size: 1.05rem;
  color: var(--ink-mid);
  margin-bottom: 3rem;
}

/* ── Buttons ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  border-radius: 99px;
  padding: 10px 22px;
  transition: all .22s ease;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
  box-shadow: 0 4px 18px rgba(29,140,114,.30);
}
.btn--primary:hover {
  background: #16705b;
  box-shadow: 0 6px 24px rgba(29,140,114,.40);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--ink-mid);
  border: 1.5px solid var(--cream-dark);
}
.btn--ghost:hover {
  border-color: var(--ink-mid);
  color: var(--ink);
}

.btn--ghost-dark {
  background: transparent;
  color: var(--ink-mid);
  font-size: 1rem;
  font-weight: 600;
}
.btn--ghost-dark:hover { color: var(--ink); }

.btn--hero {
  background: var(--teal);
  color: var(--white);
  font-size: 1.05rem;
  padding: 14px 30px;
  box-shadow: 0 6px 28px rgba(29,140,114,.35);
}
.btn--hero:hover {
  background: #16705b;
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(29,140,114,.40);
}

.btn--cta-white {
  background: var(--white);
  color: var(--teal);
  font-size: 1.05rem;
  padding: 14px 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,.10);
}
.btn--cta-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
}

.btn--cta-ghost {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.35);
  font-size: 1.05rem;
  padding: 14px 30px;
}
.btn--cta-ghost:hover {
  background: rgba(255,255,255,.22);
}

/* ── Navigation ─────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(251,248,243,.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
  height: var(--nav-h);
}
.nav--scrolled {
  border-color: var(--cream-dark);
  box-shadow: var(--shadow-sm);
}

.nav__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-mark {
  width: 36px; height: 36px;
  background: var(--teal);
  color: var(--white);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -.02em;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}

.nav__links {
  display: flex;
  gap: 1.8rem;
  margin-left: auto;
}
.nav__links a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-mid);
  transition: color .2s;
}
.nav__links a:hover { color: var(--teal); }

.nav__actions {
  display: flex;
  gap: .75rem;
  margin-left: 1rem;
  flex-shrink: 0;
}

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}
.nav__burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ── Hero ───────────────────────────────── */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  gap: 0 4rem;
  align-items: center;
  position: relative;
  overflow: visible;
}

.hero__bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .22;
}
.blob--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #2AADA8, transparent);
  top: -100px; right: -100px;
}
.blob--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #D97706, transparent);
  bottom: 0px; left: -100px;
  opacity: .14;
}
.blob--3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #E05A3A, transparent);
  top: 40%; right: 40%;
  opacity: .10;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(29,140,114,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29,140,114,.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero__content {
  grid-column: 1;
  padding: 4rem 0;
  animation: fadeInUp .8s ease both;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-light);
  color: var(--teal);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 6px 16px;
  border-radius: 99px;
  margin-bottom: 1.4rem;
  border: 1px solid rgba(29,140,114,.2);
}

.hero__title {
  font-family: 'Lora', serif;
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 1.3rem;
}
.hero__title em {
  font-style: italic;
  color: var(--teal);
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--ink-mid);
  max-width: 480px;
  margin-bottom: 2rem;
}

.hero__cta-row {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.hero__note {
  font-size: .85rem;
  color: var(--ink-light);
  font-weight: 600;
}

/* Practice card */
.hero__card-wrap {
  grid-column: 2;
  position: relative;
  display: flex;
  justify-content: center;
  animation: fadeInUp .8s .2s ease both;
}

.practice-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--cream-dark);
}

.practice-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.practice-card__avatar {
  width: 44px; height: 44px;
  background: var(--cream-mid);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.practice-card__name {
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
}
.practice-card__level {
  font-size: .78rem;
  color: var(--ink-light);
  font-weight: 600;
}

.practice-card__streak {
  margin-left: auto;
  background: var(--amber-light);
  color: var(--amber);
  font-size: .82rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
}

.practice-card__label {
  font-size: .82rem;
  color: var(--ink-light);
  font-weight: 600;
  margin-bottom: .5rem;
}

.practice-card__math {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.4rem;
}

.frac {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.1;
  gap: 1px;
  position: relative;
}
.frac .num { border-bottom: 2.5px solid var(--ink); padding-bottom: 2px; }
.frac .den { padding-top: 2px; }

.op {
  font-size: 1.6rem;
  color: var(--ink-mid);
}

.answer-box {
  width: 52px; height: 52px;
  border: 2.5px dashed var(--teal);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--teal);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { border-color: var(--teal); }
  50% { border-color: var(--teal-mid); }
}

.practice-card__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.4rem;
}

.opt {
  padding: 10px;
  border-radius: 10px;
  border: 1.5px solid var(--cream-dark);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-mid);
  background: var(--cream);
  transition: all .18s;
  font-family: inherit;
}
.opt:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }
.opt--correct {
  border-color: var(--teal) !important;
  background: var(--teal-light) !important;
  color: var(--teal) !important;
}

.practice-card__bar {
  height: 6px;
  background: var(--cream-mid);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: .5rem;
}
.practice-card__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-mid));
  border-radius: 99px;
  transition: width .4s ease;
}

.practice-card__progress-text {
  font-size: .78rem;
  color: var(--ink-light);
  font-weight: 600;
  text-align: right;
}

/* Floating badges */
.float-badge {
  position: absolute;
  background: var(--white);
  border-radius: 99px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--ink);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--cream-dark);
  white-space: nowrap;
}

.float-badge__emoji {
  color: var(--teal);
  font-weight: 900;
}

.float-badge--1 {
  top: -20px; right: -30px;
  animation: floatA 4s ease-in-out infinite;
}
.float-badge--2 {
  bottom: 40px; left: -30px;
  animation: floatB 4s 1.5s ease-in-out infinite;
}

@keyframes floatA {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ── Trust bar ──────────────────────────── */
.trust-bar {
  background: var(--white);
  border-top: 1px solid var(--cream-dark);
  border-bottom: 1px solid var(--cream-dark);
  padding: 1rem 0;
  overflow: hidden;
}

.trust-bar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.trust-item {
  font-size: .88rem;
  font-weight: 700;
  color: var(--ink-mid);
}
.trust-sep { color: var(--cream-dark); font-size: 1.2rem; }

/* ── How it works ───────────────────────── */
.how {
  padding: 7rem 0;
  background: var(--white);
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.step {
  flex: 1;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--cream);
  border: 1px solid var(--cream-dark);
  position: relative;
}

.step__num {
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  color: var(--ink-light);
  margin-bottom: .6rem;
}

.step__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: .9rem;
  background: var(--teal-light);
  color: var(--teal);
  border: 1.5px solid rgba(29,140,114,.2);
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .5rem;
}

.step p {
  font-size: .92rem;
  color: var(--ink-mid);
}

.step__connector {
  width: 48px;
  flex-shrink: 0;
  height: 2px;
  background: var(--cream-dark);
  margin-top: 3.5rem;
  position: relative;
}
.step__connector::after {
  content: '▶';
  position: absolute;
  right: -10px;
  top: -9px;
  font-size: .6rem;
  color: var(--cream-dark);
}

/* ── Subjects ───────────────────────────── */
.subjects {
  padding: 7rem 0;
  background: var(--cream);
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.subject-card {
  border-radius: var(--radius-md);
  padding: 1.8rem 1.5rem;
  border: 1.5px solid transparent;
  transition: transform .22s, box-shadow .22s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.subject-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.subject-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 900;
  margin-bottom: .9rem;
  background: rgba(255,255,255,.65);
  border: 1.5px solid rgba(255,255,255,.85);
}

.subject-card h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: .4rem;
}

.subject-card p {
  font-size: .88rem;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.subject-card__ages {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(255,255,255,.6);
}

.subject-card--teal  { background: var(--teal-light);   border-color: rgba(29,140,114,.2); }
.subject-card--teal h3, .subject-card--teal .subject-card__ages, .subject-card--teal .subject-card__icon { color: var(--teal); }
.subject-card--teal p  { color: #2d5e52; }

.subject-card--amber { background: var(--amber-light);  border-color: rgba(217,119,6,.2); }
.subject-card--amber h3, .subject-card--amber .subject-card__ages, .subject-card--amber .subject-card__icon { color: var(--amber); }
.subject-card--amber p { color: #6b4a0f; }

.subject-card--coral { background: var(--coral-light);  border-color: rgba(224,90,58,.2); }
.subject-card--coral h3, .subject-card--coral .subject-card__ages, .subject-card--coral .subject-card__icon { color: var(--coral); }
.subject-card--coral p { color: #6a2c1a; }

.subject-card--blue  { background: var(--blue-light);   border-color: rgba(37,99,235,.2); }
.subject-card--blue h3, .subject-card--blue .subject-card__ages, .subject-card--blue .subject-card__icon { color: var(--blue); }
.subject-card--blue p  { color: #1e3a8a; }

.subject-card--green { background: var(--green-light);  border-color: rgba(22,163,74,.2); }
.subject-card--green h3, .subject-card--green .subject-card__ages, .subject-card--green .subject-card__icon { color: var(--green); }
.subject-card--green p { color: #14532d; }

.subject-card--purple { background: var(--purple-light); border-color: rgba(124,58,237,.2); }
.subject-card--purple h3, .subject-card--purple .subject-card__ages, .subject-card--purple .subject-card__icon { color: var(--purple); }
.subject-card--purple p { color: #4c1d95; }

/* ── Age tabs ───────────────────────────── */
.ages {
  padding: 7rem 0;
  background: var(--white);
}

.age-tabs {
  display: flex;
  gap: .6rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.age-tab {
  padding: 10px 22px;
  border-radius: 99px;
  font-family: 'Nunito', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-mid);
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  transition: all .2s;
}
.age-tab:hover { border-color: var(--teal); color: var(--teal); }
.age-tab--active {
  background: var(--teal);
  color: var(--white) !important;
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgba(29,140,114,.3);
}

.age-panel {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.age-panel--active { display: grid; animation: fadeInUp .4s ease both; }

.age-panel__visual {
  display: flex;
  justify-content: center;
}

.age-illustration {
  width: 240px; height: 240px;
  border-radius: var(--radius-lg);
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  padding: 20px;
  position: relative;
}

.ill-block {
  background: var(--white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--teal);
  border: 1.5px solid var(--cream-dark);
}

.ill-star {
  position: absolute;
  bottom: -16px; right: -16px;
  font-size: 2rem;
  animation: floatA 3s ease-in-out infinite;
}

.age-panel__text h3 {
  font-family: 'Lora', serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .8rem;
}

.age-panel__text p {
  color: var(--ink-mid);
  margin-bottom: 1.5rem;
}

.age-features {
  list-style: none;
  margin-bottom: 1.8rem;
}
.age-features li {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-mid);
  padding: .3rem 0;
}
.age-features li::first-letter { color: var(--teal); }

/* ── Stories ────────────────────────────── */
.stories {
  padding: 7rem 0;
  background: var(--cream);
}

.stories-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.story-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem 1.8rem;
  border: 1px solid var(--cream-dark);
  box-shadow: var(--shadow-sm);
}

.story-card--featured {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(29,140,114,.08), var(--shadow-md);
}

.story-card__quote {
  font-family: 'Lora', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.story-card__quote::before { content: '"'; }
.story-card__quote::after  { content: '"'; }

.story-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.story-card__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.story-card__name {
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink);
}
.story-card__meta {
  font-size: .78rem;
  color: var(--ink-light);
  font-weight: 600;
}

/* ── Stats ──────────────────────────────── */
.stats-section {
  padding: 5rem 0;
  background: var(--ink);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat__number {
  font-family: 'Lora', serif;
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: .3rem;
}

.stat__label {
  font-size: .88rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  max-width: 140px;
  margin: 0 auto;
}

/* ── CTA section ────────────────────────── */
.cta-section {
  padding: 6rem 0;
  background: var(--cream);
}

.cta-box {
  background: linear-gradient(135deg, #1D8C72 0%, #2AADA8 100%);
  border-radius: var(--radius-xl);
  padding: 5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box__deco {
  position: absolute;
  color: rgba(255,255,255,.12);
  font-size: 5rem;
  font-weight: 900;
  pointer-events: none;
}
.cta-box__deco--1 { top: -10px; left: 5%; font-size: 8rem; }
.cta-box__deco--2 { top: 30%; right: 3%; font-size: 6rem; }
.cta-box__deco--3 { bottom: -10px; left: 40%; font-size: 7rem; }

.cta-box .section-label {
  background: rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  border-color: transparent;
}

.cta-box__title {
  font-family: 'Lora', serif;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.15;
}

.cta-box__sub {
  color: rgba(255,255,255,.82);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 2.5rem;
}

.cta-box__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.cta-box__flags {
  font-size: 1.4rem;
  letter-spacing: .1em;
  opacity: .7;
}

/* ── Footer ─────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,.65);
  padding: 4rem 0 2rem;
}

.footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 4rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer__brand .nav__logo { margin-bottom: 1rem; }
.footer__brand .logo-text { color: var(--white); }
.footer__brand p { font-size: .88rem; line-height: 1.6; }

.footer__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.footer__col-title {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: .3rem;
}

.footer__col a {
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  transition: color .2s;
}
.footer__col a:hover { color: var(--white); }

.footer__bottom {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .82rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__lang select {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: .82rem;
  cursor: pointer;
}

/* ── Scroll animations ──────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s ease, transform .55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.steps .step:nth-child(1) { transition-delay: 0s; }
.steps .step:nth-child(3) { transition-delay: .1s; }
.steps .step:nth-child(5) { transition-delay: .2s; }

.subject-grid .subject-card:nth-child(1) { transition-delay: 0s; }
.subject-grid .subject-card:nth-child(2) { transition-delay: .06s; }
.subject-grid .subject-card:nth-child(3) { transition-delay: .12s; }
.subject-grid .subject-card:nth-child(4) { transition-delay: .18s; }
.subject-grid .subject-card:nth-child(5) { transition-delay: .24s; }
.subject-grid .subject-card:nth-child(6) { transition-delay: .30s; }

.stories-grid .story-card:nth-child(1) { transition-delay: 0s; }
.stories-grid .story-card:nth-child(2) { transition-delay: .1s; }
.stories-grid .story-card:nth-child(3) { transition-delay: .2s; }

/* ── Responsive ─────────────────────────── */
@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: calc(var(--nav-h) + 3rem);
    padding-bottom: 3rem;
    gap: 3rem;
  }
  .hero__card-wrap { grid-column: 1; }
  .hero__content { padding: 0; }

  .subject-grid { grid-template-columns: repeat(2, 1fr); }
  .stories-grid { grid-template-columns: 1fr 1fr; }
  .stories-grid .story-card:last-child { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .age-panel { grid-template-columns: 1fr; gap: 2rem; }
  .age-panel__visual { display: none; }
}

@media (max-width: 720px) {
  .nav__links, .nav__actions { display: none; }
  .nav__burger { display: flex; }

  .nav__links--open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--cream);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--cream-dark);
    gap: 1rem;
    box-shadow: var(--shadow-md);
  }

  .subject-grid { grid-template-columns: 1fr; }
  .stories-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { flex-direction: column; }
  .step__connector { display: none; }

  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer__links { grid-template-columns: repeat(2, 1fr); }
  .cta-box { padding: 3rem 1.5rem; }

  .hero { gap: 2rem; }
  .hero__card-wrap { margin: 0 -1rem; }
  .float-badge { display: none; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .stat__number { font-size: 2rem; }
  .age-tabs { gap: .4rem; }
  .age-tab { font-size: .8rem; padding: 8px 16px; }
  .footer__links { grid-template-columns: 1fr; }
}

/* ── Features section ───────────────────────────────── */
.features-section {
  padding: 6rem 0;
  background: #fff;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--cream);
  border: 1.5px solid var(--cream-dark);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: transform .2s, box-shadow .2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-card__icon--teal   { background: rgba(29,140,114,.12); }
.feature-card__icon--amber  { background: rgba(217,119,6,.12); }
.feature-card__icon--blue   { background: rgba(37,99,235,.12); }
.feature-card__icon--purple { background: rgba(124,58,237,.12); }

.feature-card__body h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: .4rem;
  font-family: var(--font-nunito);
}

.feature-card__body p {
  font-size: .9rem;
  line-height: 1.65;
  color: #555;
  margin: 0;
}

@media (max-width: 720px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ── Mobile nav auth links ───────────────────────────── */
@media (min-width: 721px) {
  .nav__links-auth { display: none; }
}
@media (max-width: 720px) {
  .nav__links-auth {
    font-weight: 700;
    padding-top: .25rem;
  }
  .nav__links-auth--primary { color: var(--teal); }
}

/* ── Pricing section ─────────────────────────── */
.pricing-section {
  padding: 6rem 0;
  background: var(--cream);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 780px;
  margin: 3rem auto 0;
}

.pricing-card {
  background: #fff;
  border: 2px solid var(--cream-dark);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.pricing-card--featured {
  border-color: var(--teal);
  box-shadow: 0 4px 24px rgba(29, 140, 114, .15);
  position: relative;
}

.pricing-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  padding: 4px 16px;
  border-radius: 99px;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pricing-card__title {
  font-family: var(--font-lora);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .5rem;
}

.pricing-card__price {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--teal);
  line-height: 1;
  margin: 1rem 0 .2rem;
  font-family: var(--font-nunito);
}

.pricing-card__period {
  font-size: .9rem;
  color: #888;
  margin-bottom: 1.75rem;
}

.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  text-align: left;
  flex: 1;
}

.pricing-card__features li {
  padding: .45rem 0;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .95rem;
  border-bottom: 1px solid var(--cream-dark);
}

.pricing-card__features li:last-child { border-bottom: none; }

.pricing-card__features li::before {
  content: '✓';
  color: var(--teal);
  font-weight: 800;
  flex-shrink: 0;
  margin-top: .05em;
}

.pricing-card__btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: auto;
}

/* ── Footer language buttons ─────────────────────────── */
.index-lang__btn {
  background: none;
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
  transition: background .15s, border-color .15s;
}

.index-lang__btn:hover,
.index-lang__btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

@media (max-width: 720px) {
  .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
}