:root {
  --purple: #5b39a8; /* brand primary */
  --lav: #f5f1ff; /* soft lavender background */
  --gold: #f4d37a; /* warm gold */
  --gold-strong: #cfa441;
  --ink: #1f2430; /* headings */
  --text: #2e2e2e; /* body text */
  --muted: #6a6a75; /* secondary text */
  --card: #ffffff;
  --shadow: 0 10px 30px rgba(17, 12, 46, 0.08);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol", "Noto Color Emoji";
  color: var(--text);
  background: #fff;
  max-width: 100vw;
}

main {
  padding-top: 80px; /* adjust to match your header height */
}

/* Utilities */
.container {
  width: min(1120px, 90%);
  margin: 0 auto;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.1rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease,
    color 0.2s ease;
  box-shadow: var(--shadow);
}

.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn-primary {
  background: var(--purple);
  color: #fff;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  background: #4e2f95;
  transform: scale(1.03) translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  opacity: 0.95;
}
.btn-ghost {
  background: #fff;
  color: var(--purple);
  border: 2px solid var(--purple);
}
.btn-ghost:hover {
  background: #f8f5ff;
}
.btn-gold {
  background: var(--gold);
  color: #5b4200;
}
.btn-gold:hover {
  background: var(--gold-strong);
  color: #fff;
}

.section-head {
  text-align: center;
  margin-bottom: 1.5rem;
}
.section-head h2 {
  color: var(--ink);
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
}
.section-head p {
  color: var(--muted);
}

.bg-blob {
  position: absolute;
  inset: auto auto -80px -60px;
  width: 42vw;
  height: 42vw;
  max-width: 620px;
  max-height: 620px;
  background: radial-gradient(
    60% 60% at 50% 50%,
    #f6f0ff 0%,
    rgba(246, 240, 255, 0) 70%
  );
  z-index: -1;
  pointer-events: none;
}
.bg-blob.small {
  inset: auto -80px -100px auto;
  width: 34vw;
  height: 34vw;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #f1ecff;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.main-nav ul {
  display: flex;
  gap: 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
}
.main-nav a:hover {
  background: #f6f2ff;
  color: var(--purple);
}
.main-nav a.active {
  background: var(--purple);
  color: #fff;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 0.4rem 0.5rem;
  border: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
}

/* Nav stacking adjustments (requested) */
.nav-toggle {
  z-index: 1000; /* ensures it sits above nav links */
  position: relative; /* establishes stacking context */
}
.main-nav {
  position: relative;
  z-index: 10; /* sits below the toggle */
}
.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--lav) 0%, #fff 70%);
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 2rem 0 3rem;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 2rem;
}
.hero-copy h1 {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
  color: var(--ink);
  letter-spacing: 0.2px;
}
.hero-copy p {
  color: #4a4a56;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}
.trust-row {
  margin-top: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500; /* <-- adds a little emphasis */
  font-size: 0.95rem; /* <-- slightly more visible */
  color: var(--purple); /* <-- brand-aligned trust color */
}

.trust-row::before {
  content: "⭐"; /* <-- adds emotional icon */
  font-size: 1rem;
  margin-right: 0.2rem;
}

.trust-row .check {
  color: #28a745;
  font-weight: 800;
}
.hero-art img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* How it works */
.how {
  padding: 4rem 0 3rem;
  position: relative;
}
.steps-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
}
.card h3 {
  margin: 0.85rem 0 0.35rem;
  color: var(--ink);
  font-size: 1.05rem;
}
.card p {
  margin: 0;
  color: #58586a;
  font-size: 0.975rem;
  line-height: 1.55;
}
.center-actions {
  text-align: center;
  margin-top: 3.2rem;
}
.center-actions .footnote {
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Stories */
.stories {
  padding: 2rem 0 3rem;
  position: relative;
  background: linear-gradient(180deg, #fff, #fbfaff);
}
.stories-grid {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.story {
  background: #fff;
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.story-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.story .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow);
}
.initial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  background: var(--purple);
  box-shadow: var(--shadow);
  align-self: center;
}
.parent-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
}
.story blockquote {
  margin: 0;
  color: #47475b;
  line-height: 1.5;
  font-size: 0.95rem;
}
.story cite {
  color: var(--muted);
  font-style: normal;
  font-size: 0.85rem;
}

/* Math games CTA */
.games-cta {
  padding: 3.8rem 0;
}
.games-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.games-wrap img {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.games-copy h2 {
  color: var(--ink);
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}
.games-copy p {
  color: #4c4c60;
  margin: 0 0 0.9rem;
}

/* Footer */
.site-footer {
  background: var(--purple);
  color: #efe9ff;
  margin-top: 2rem;
  padding: 2.4rem 0 1.2rem;
  position: relative;
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 2rem;
}
.site-footer .brand {
  color: #fff;
}
.site-footer .brand-mark {
  box-shadow: none;
}
.site-footer p {
  color: #e3dbff;
}
.site-footer h4 {
  margin: 0.25rem 0 0.7rem;
  color: #fff;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}
.footer-links a {
  color: #e8e1ff;
  text-decoration: none;
}
.footer-links a:hover {
  text-decoration: underline;
}
.legal {
  text-align: center;
  font-size: 0.9rem;
  color: #e6ddff;
  padding-top: 1rem;
  opacity: 0.8;
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive */
@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: -1;
  }
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .games-wrap {
    grid-template-columns: 1fr;
  }
}
/* Mobile menu behavior */
/* Mobile menu behavior */
@media (max-width: 768px) {
  /* Show hamburger */
  .nav-toggle {
    display: flex;
  }

  /* Hide gold button on mobile */
  .nav-cta .btn-gold {
    display: none;
  }

  /* Make menu full-width and hidden initially */
  .main-nav {
    position: fixed;
    top: 64px; /* matches header height */
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-120%);
    transition: transform 0.25s ease;
    z-index: 1100;
    display: none;
  }

  .main-nav.open {
    transform: translateY(0);
    display: block;
  }

  /* Stack the links vertically */
  .main-nav ul {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.4rem;
  }

  .main-nav a {
    display: block;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    text-align: left;
  }

  /* Hero, grids, footer stack adjustments */
  .steps-grid,
  .stories-grid,
  .games-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy > p {
    display: none;
  }
  .main-nav {
    max-width: 100vw; /* prevent overflow */
  }

  .main-nav a {
    display: block;
    width: 100%;
    box-sizing: border-box; /* ensure padding doesn't overflow */
    padding: 0.9rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    text-align: left;
  }

  /* Restore hover/tap effect */
  .main-nav a:hover,
  .main-nav a:active {
    background: var(--gold);
    color: var(--purple);
  }
}

.why-online {
  padding: 3rem 0;
  background: #fbfaff;
}
.faq {
  padding: 3rem 0;
}

.faq-item {
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #fff;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  font-size: 1.05rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.faq-answer {
  display: none;
  padding: 0.8rem 1rem;
  background: #f9f7ff;
  color: var(--muted);
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  display: block;
}
