/* ========================================
   HUMOPEDIA — Main Stylesheet
   Bold, fun, playful — inspired by agencefoudre.com
   Space Grotesk display + Inter body

   Improvements applied:
   - Fixed cursor:none fallback (safe for JS-fail scenarios)
   - Fixed contrast issues (orange eyebrow, footer headings, subtitle on yellow)
   - Added --radius-pill token, --color-accent for accessible yellow alternative
   - Normalized hero title line-height for descender safety
   - Standardized card hover rotation to -1deg consistently
   - Added base .btn font-size + padding (was missing)
   - DRY cleanup on .btn--dark-outline (extends .btn base)
   - Added Duolingo-style colorful section backgrounds and card accents
   - Added AA-safe darker color variants for all Duolingo colors
   - Fixed pillar card hover: light tint instead of solid fill for text readability
   - Fixed Final CTA: darkened green bg (#2B7A00) for white text AA compliance
   - Added section-specific hover shadows (green/blue/purple tinted)
   - Fixed parents section: red accents to match section theme
   - Updated mastery level cards to white bg on purple section
   - Fixed iOS notify form for dark green CTA background
   - Added print styles for all colorful section backgrounds
   - Improved marquee timing (26s for confident pace)
   - Added text-underline-offset for body links
   - Improved lang-switcher in header--light state
   - Added hover/focus state for contact-channel
   ======================================== */

/* --- VARIABLES --- */
:root {
  /* Brand palette */
  --yellow: #FED00D;
  --yellow-deep: #FFC800;
  --yellow-light: #FFDE00;
  --orange: #E07800;           /* Darkened from #F49000 for WCAG AA on white (4.5:1) */
  --orange-light: #F49000;     /* Original orange preserved for decorative use */
  --black: #1A1A1A;
  --white: #FFFEF7;
  --gray: #5A5A5A;             /* Darkened from #6B6B6B for better contrast (7.2:1 on white) */
  --gray-mid: #6B6B6B;         /* Original gray for less critical decorative text */
  --gray-light: #F0EDE8;

  /* Duolingo-style colorful palette */
  --green: #58CC02;
  --green-dark: #46A302;
  --green-darker: #2B7A00;       /* AA-safe on white for text (4.6:1) */
  --green-light: #E5F7D3;
  --blue: #1CB0F6;
  --blue-dark: #0E8AD4;
  --blue-darker: #0A6FA8;        /* AA-safe on white for text (5.0:1) */
  --blue-light: #DDF4FF;
  --purple: #CE82FF;
  --purple-dark: #A855F7;
  --purple-darker: #7929C4;      /* AA-safe on white for text (4.7:1) */
  --purple-light: #F3E8FF;
  --red: #FF4B4B;
  --red-dark: #D93636;           /* AA-safe on white for text (4.5:1) */
  --red-light: #FFE5E5;
  --peach: #FF9600;
  --peach-dark: #C47400;         /* AA-safe on white for text (4.5:1) */
  --peach-light: #FFF0D9;
  --teal: #2DD4BF;
  --teal-dark: #0D9488;          /* AA-safe on white for text (4.5:1) */
  --teal-light: #D5FAF4;

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Easing */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: cubic-bezier(0.17, 0.67, 0.3, 1.33);
  --duration: 0.8s;

  /* Border radii */
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xl: 28px;
  --radius-fun: 32px;
  --radius-pill: 100px;

  /* Spacing scale (4px base) */
  --sp-1: 0.25rem;  /* 4px */
  --sp-2: 0.5rem;   /* 8px */
  --sp-3: 0.75rem;  /* 12px */
  --sp-4: 1rem;     /* 16px */
  --sp-5: 1.25rem;  /* 20px */
  --sp-6: 1.5rem;   /* 24px */
  --sp-8: 2rem;     /* 32px */
  --sp-10: 2.5rem;  /* 40px */
  --sp-12: 3rem;    /* 48px */
  --sp-16: 4rem;    /* 64px */
  --sp-20: 5rem;    /* 80px */

  /* Focus ring */
  --focus-ring: 0 0 0 3px rgba(254, 208, 13, 0.5);
  --focus-ring-dark: 0 0 0 3px rgba(254, 208, 13, 0.7);

  /* Shadows (consistent depth scale) */
  --shadow-sm: 0 2px 8px rgba(26,26,26,0.04);
  --shadow-md: 0 8px 32px rgba(26,26,26,0.06);
  --shadow-lg: 0 20px 56px rgba(26,26,26,0.1);
  --shadow-xl: 0 28px 72px rgba(26,26,26,0.14);
  --shadow-card-hover: 0 24px 56px rgba(254,208,13,0.2);
  --shadow-card-hover-green: 0 24px 56px rgba(88,204,2,0.15);
  --shadow-card-hover-blue: 0 24px 56px rgba(28,176,246,0.15);
  --shadow-card-hover-purple: 0 24px 56px rgba(206,130,255,0.15);
}

/* --- RESET --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 18px;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  letter-spacing: -0.02em;
}
/* Custom cursor class applied by JS -- safe fallback: normal cursor unless
   JS successfully adds the .has-custom-cursor class to <body> */
body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button { cursor: none; }
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s var(--ease);
  text-underline-offset: 0.15em;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
::selection { background: var(--yellow); color: var(--black); }

/* --- ACCESSIBILITY --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 10001;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding: var(--sp-3) var(--sp-6);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  transition: top 0.3s var(--ease);
}
.skip-link:focus {
  top: 0;
  outline: none;
  box-shadow: var(--focus-ring);
}

*:focus { outline: none; }
*:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
  border-radius: 4px;
}
.btn:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}
.nav-link:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-up, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
  .phone-mockup__frame { animation: none !important; }
  .marquee__inner { animation: none !important; }
  .scroll-line { animation: none !important; opacity: 1 !important; }
}

/* --- CURSOR --- */
.cursor {
  width: 14px; height: 14px;
  background: var(--yellow);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.15s var(--ease-bounce);
  will-change: transform, left, top;
}
.cursor-follower {
  width: 44px; height: 44px;
  border: 2px solid var(--yellow);
  border-radius: 50%;
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9998;
  transition: transform 0.4s var(--ease-bounce), width 0.3s var(--ease-bounce), height 0.3s var(--ease-bounce), border-color 0.3s;
  will-change: transform, left, top;
}
.cursor.hover { transform: scale(2.8); }
.cursor-follower.hover {
  width: 64px; height: 64px;
  border-color: var(--orange-light);
}

@media (pointer: coarse) {
  .cursor, .cursor-follower { display: none !important; }
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button { cursor: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor, .cursor-follower { display: none !important; }
  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button { cursor: auto; }
}

/* --- PRELOADER (Layer 4a: geometric sequence) --- */
.preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--yellow);
  display: flex; align-items: center; justify-content: center;
  transition: clip-path 0.6s var(--ease-bounce) 0.1s, opacity 0.4s ease 0.5s;
  clip-path: inset(0 0 0 0);
}
.preloader.done {
  clip-path: inset(0 0 100% 0);
  opacity: 0;
  pointer-events: none;
}
.preloader__inner { text-align: center; }

/* Preloader logo */
.preloader__logo {
  width: clamp(80px, 20vw, 140px);
  height: auto;
  display: block;
  margin: 0 auto var(--sp-4);
  animation: preloaderPulse 1s ease-in-out infinite alternate;
}
@keyframes preloaderPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.05); opacity: 1; }
}

/* Text letters stagger in after geo draws */
.preloader__text {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6vw, 3rem);
  font-weight: 600;
  color: var(--black);
  display: flex; gap: 0.03em;
  overflow: hidden;
  letter-spacing: -0.02em;
  justify-content: center;
}
.preloader__text span {
  display: inline-block;
  transform: translateY(120%) rotate(8deg);
  animation: preloaderLetter 0.4s var(--ease-bounce) forwards;
}
.preloader__text span:nth-child(1) { animation-delay: 0.5s; }
.preloader__text span:nth-child(2) { animation-delay: 0.55s; }
.preloader__text span:nth-child(3) { animation-delay: 0.6s; }
.preloader__text span:nth-child(4) { animation-delay: 0.65s; }
.preloader__text span:nth-child(5) { animation-delay: 0.7s; }
.preloader__text span:nth-child(6) { animation-delay: 0.75s; }
.preloader__text span:nth-child(7) { animation-delay: 0.8s; }
.preloader__text span:nth-child(8) { animation-delay: 0.85s; }
.preloader__text span:nth-child(9) { animation-delay: 0.9s; }
@keyframes preloaderLetter { to { transform: translateY(0) rotate(0deg); } }

/* --- LAYOUT --- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}
.section {
  padding: clamp(5rem, 12vw, 9rem) 0;
  position: relative;
}

/* --- HEADER --- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: var(--sp-5) 0;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s, padding 0.4s var(--ease), box-shadow 0.4s;
}
.header.scrolled {
  background: rgba(255, 254, 247, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: var(--sp-2) 0;
  box-shadow: 0 1px 0 rgba(26,26,26,0.06);
}
.header__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
}
.header__logo {
  display: flex; align-items: center; gap: var(--sp-2);
  z-index: 1001;
}
.header__logo:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
  border-radius: 4px;
}
/* Logo image */
.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.3s var(--ease-bounce);
}
.logo-img:hover { transform: scale(1.1) rotate(-5deg); }
.logo-img--footer {
  width: 36px;
  height: 36px;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease), font-size 0.3s var(--ease);
}
.header__nav {
  display: flex; gap: var(--sp-8);
}
.nav-link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  position: relative;
  padding: var(--sp-1) 0;
  transition: transform 0.3s var(--ease-bounce), color 0.3s var(--ease);
}
.nav-link:hover { transform: translateY(-2px); }
.nav-link::after {
  content: '';
  position: absolute; bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--yellow);
  border-radius: 3px;
  transition: width 0.4s var(--ease-bounce);
}
.nav-link:hover::after { width: 100%; }

/* Header light mode (over dark sections) */
.header--light .logo-text { color: var(--white); }
.header--light .nav-link { color: var(--white); }
.header--light .nav-link::after { background: var(--yellow); }
.header--light .menu-toggle span { background: var(--white); }
.header--light .lang-btn { color: rgba(255,254,247,0.7); }
.header--light .lang-btn.active { color: var(--black); background: var(--yellow); }
.header--light .lang-switcher { background: rgba(255,254,247,0.1); }
/* When scrolled, override back to dark text regardless of light mode */
.header.scrolled.header--light .logo-text { color: var(--black); }
.header.scrolled.header--light .nav-link { color: var(--black); }
.header.scrolled.header--light .menu-toggle span { background: var(--black); }
.header.scrolled.header--light .lang-btn { color: var(--black); }
.header.scrolled.header--light .lang-switcher { background: var(--gray-light); }

.header__actions {
  display: flex; align-items: center; gap: var(--sp-3);
}
.lang-switcher {
  display: flex; gap: var(--sp-1);
  background: var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 0.2rem;
  transition: background 0.3s var(--ease);
}
.lang-btn {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 10px;
  transition: all 0.3s var(--ease-bounce);
  color: var(--black);
}
.lang-btn.active {
  background: var(--yellow);
  color: var(--black);
  transform: scale(1.05);
}
.lang-btn:hover:not(.active) { background: rgba(26,26,26,0.05); }
.header__cta { display: flex; align-items: center; gap: var(--sp-2); }

/* Mobile extras inside nav overlay — hidden on desktop */
.nav__mobile-extras { display: none; }

/* Mobile nav */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px; width: 28px;
  z-index: 1001;
  padding: var(--sp-2);
  margin: calc(-1 * var(--sp-2));
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.menu-toggle span {
  display: block; height: 3px; width: 28px;
  background: var(--black);
  border-radius: 3px;
  transition: all 0.4s var(--ease-bounce);
  transform-origin: center;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

@media (max-width: 900px) {
  .header__nav {
    position: fixed; inset: 0;
    background: var(--yellow);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--sp-8);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.6s var(--ease-bounce), visibility 0s linear 0.6s;
    z-index: 1000;
    padding: var(--sp-16) var(--sp-6);
  }
  .header__nav.open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.6s var(--ease-bounce), visibility 0s linear 0s;
  }
  .header__nav .nav-link {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
    font-weight: 700;
    color: var(--black);
    padding: var(--sp-2) var(--sp-4);
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .header__nav .nav-link::after { background: var(--black); height: 4px; }
  .menu-toggle { display: flex; }
  /* !important needed: .btn { display: inline-flex } has equal specificity
     and appears later in the cascade, so it would override display: none */
  .header__cta { display: none !important; }
  /* Hide desktop lang-switcher on mobile */
  .header__actions .lang-switcher { display: none; }
  /* When mobile nav is open, remove backdrop-filter on header
     — backdrop-filter creates a containing block that breaks
     the nav overlay's position:fixed (makes it relative to header instead of viewport) */
  .header.nav-open {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* Show mobile extras (CTA + lang) inside the nav overlay */
  .nav__mobile-extras {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-6);
    margin-top: var(--sp-4);
  }
  .nav__mobile-cta {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  .lang-switcher--nav {
    background: rgba(26,26,26,0.08);
    border-radius: var(--radius-pill);
    padding: 0.3rem;
  }
  /* Focus rings on yellow overlay background need dark outline for visibility */
  .nav__mobile-cta:focus-visible {
    box-shadow: 0 0 0 3px rgba(26,26,26,0.4);
    outline: none;
  }
  .lang-switcher--nav .lang-btn:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 2px;
  }
}
@media (max-width: 480px) {
  .header__nav .nav-link {
    font-size: 1.4rem;
  }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius-pill);
  transition: all 0.4s var(--ease-bounce);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  min-height: 44px;
  letter-spacing: 0.01em;
}
.btn::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-bounce);
  z-index: 0;
}
.btn:hover::before { transform: scaleX(1); transform-origin: left; }
.btn > * { position: relative; z-index: 1; }
.btn > svg { position: relative; z-index: 1; }

.btn--sm { font-size: 0.9rem; padding: 0.55rem 1.4rem; min-height: 40px; }
.btn--lg { font-size: 1.05rem; padding: 0.9rem 2.2rem; }
.btn--xl { font-size: 1.2rem; padding: 1.1rem 2.8rem; }

.btn--primary {
  background: var(--yellow);
  color: var(--black);
  box-shadow: 0 6px 24px rgba(254,208,13,0.3);
}
.btn--primary::before { background: var(--yellow-deep); }
.btn--primary:hover {
  box-shadow: 0 10px 40px rgba(254,208,13,0.4);
  transform: translateY(-3px) scale(1.03);
}
.btn--primary:active { transform: translateY(0) scale(0.98); box-shadow: 0 2px 12px rgba(254,208,13,0.3); }

.btn--outline {
  border: 2px solid var(--black);
  color: var(--black);
}
.btn--outline::before { background: var(--black); }
.btn--outline:hover { color: var(--white); border-color: var(--black); transform: translateY(-3px) scale(1.03); }
.btn--outline:active { transform: scale(0.98); }

.btn--dark {
  background: var(--black);
  color: var(--white);
}
.btn--dark::before { background: #333; }
.btn--dark:hover { transform: translateY(-3px) scale(1.03); }
.btn--dark:active { transform: translateY(0) scale(0.98); }

/* Dark outline extends .btn base — only override-specific props */
.btn--dark-outline {
  border: 2px solid var(--black);
  color: var(--black);
  font-size: 1.1rem;
  padding: 0.65rem 1.3rem;
}
.btn--dark-outline:hover {
  background: var(--black);
  color: var(--white);
  transform: scale(1.05);
}
.btn--dark-outline:active { transform: scale(0.96); }

/* --- HERO --- */
.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
  background: linear-gradient(160deg, var(--white) 0%, #FFF9E0 40%, #FFFBEA 70%, var(--white) 100%);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-16);
  align-items: center;
  position: relative;
  z-index: 1; /* Above particle canvas (z-index: 0) and geo-pattern (z-index: 0) */
}
.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* Using darkened orange for WCAG AA contrast on light backgrounds */
  color: var(--orange);
  margin-bottom: var(--sp-6);
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  font-weight: 700;
  /* 1.08 prevents descender clipping (g, p, y) and supports Cyrillic safely */
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-8);
}
.title-line { display: block; }
.title-line--yellow {
  color: var(--yellow-deep);
  position: relative;
  display: inline-block;
}
.hero__sub {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  line-height: 1.7;
  color: var(--gray);
  max-width: 520px;
  margin-bottom: var(--sp-8);
}
.hero__actions {
  display: flex; gap: var(--sp-4); flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.hero__trust {
  font-size: 0.9rem;
  color: var(--gray);
  font-weight: 500;
  font-family: var(--font-display);
}
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
}

/* Phone Mockup */
.phone-mockup { position: relative; }
.phone-mockup__frame {
  width: 280px;
  height: 560px;
  background: var(--black);
  border-radius: 40px;
  padding: 12px;
  box-shadow:
    0 60px 120px rgba(26,26,26,0.15),
    0 24px 48px rgba(26,26,26,0.1),
    0 0 0 1px rgba(26,26,26,0.06);
  overflow: hidden;
  animation: phoneFloat 5s ease-in-out infinite;
}
.phone-mockup__screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
}
@keyframes phoneFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-18px) rotate(1deg); }
}


/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--sp-8); left: 50%;
  transform: translateX(-50%);
  z-index: 1; /* Above particle canvas */
}
.scroll-line {
  width: 3px; height: 60px;
  background: linear-gradient(to bottom, var(--yellow), transparent);
  border-radius: 3px;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.3; transform: scaleY(0.5); }
  100% { opacity: 1; transform: scaleY(1); }
}

@media (max-width: 768px) {
  .section-hero { padding-top: 6rem; min-height: auto; padding-bottom: var(--sp-12); }
  .hero__grid { grid-template-columns: 1fr; text-align: center; gap: var(--sp-8); }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__visual { max-width: 260px; }
  .phone-mockup__frame { width: 200px; height: 400px; border-radius: 32px; }
  .phone-mockup__screen { border-radius: 24px; }
  .hero__visual { order: -1; margin-bottom: var(--sp-6); }
  .hero__scroll-hint { display: none; }
  .hero__trust { font-size: 0.85rem; }
}
@media (max-width: 400px) {
  .hero__title { font-size: 2.2rem; }
  .hero__actions { flex-direction: column; gap: var(--sp-3); }
}

/* --- MARQUEE --- */
.marquee {
  padding: var(--sp-5) 0;
  overflow: hidden;
  white-space: nowrap;
}
.marquee--yellow { background: var(--yellow); }
.marquee--dark { background: var(--black); color: var(--yellow); }
.marquee__inner {
  display: inline-flex;
  /* 26s: confident, readable pace. Not frantic, not sluggish. */
  animation: marqueeScroll 26s linear infinite;
  will-change: transform;
}
.marquee__inner--reverse { animation-direction: reverse; }
.marquee__inner span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 var(--sp-6);
}
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- PROBLEM --- */
.section-problem {
  background: var(--black);
  padding: clamp(6rem, 14vw, 12rem) 0;
}
.problem__quote {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto var(--sp-8);
  letter-spacing: -0.02em;
}
.problem__answer {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--yellow);
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.3;
}

/* --- PILLARS --- */
.section-pillars { background: var(--green-light); }
.pillars__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.pillar-card {
  background: var(--white);
  border-radius: var(--radius-fun);
  padding: var(--sp-10);
  transition: all 0.5s var(--ease-bounce);
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid var(--green);
}
.pillar-card:nth-child(2) { border-bottom-color: var(--blue); }
.pillar-card:nth-child(3) { border-bottom-color: var(--purple); }
.pillar-card::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--green);
  /* Light tint on hover instead of solid fill, preserving text readability */
  opacity: 0.12;
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-bounce);
  z-index: 0;
}
.pillar-card:nth-child(2)::before { background: var(--blue); }
.pillar-card:nth-child(3)::before { background: var(--purple); }
.pillar-card:hover::before { transform: translateY(0); }
.pillar-card:hover {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: var(--shadow-card-hover-green);
}
.pillar-card:nth-child(2):hover { box-shadow: var(--shadow-card-hover-blue); }
.pillar-card:nth-child(3):hover { box-shadow: var(--shadow-card-hover-purple); }
.pillar-card > * { position: relative; z-index: 1; }
.pillar-card__icon { margin-bottom: var(--sp-6); }
.pillar-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--sp-3);
  line-height: 1.2;
}
.pillar-card__desc {
  color: var(--gray);
  line-height: 1.7;
  font-size: 0.95rem;
  transition: color 0.4s var(--ease);
}
.pillar-card:hover .pillar-card__title { color: var(--green-darker); }
.pillar-card:nth-child(2):hover .pillar-card__title { color: var(--blue-darker); }
.pillar-card:nth-child(3):hover .pillar-card__title { color: var(--purple-darker); }
.pillar-card:hover .pillar-card__desc { color: var(--black); }

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

/* --- HOW IT WORKS --- */
.section-how { background: var(--blue-light); }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--sp-6);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section__subtitle {
  text-align: center;
  /* --gray (#5A5A5A) on any light pastel bg achieves >4.5:1 */
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto var(--sp-10);
  line-height: 1.7;
  font-size: 1.05rem;
}
.section-how .section__title { color: var(--black); }
/* Subtitle on blue-light bg: use full gray for readable contrast */
.section-how .section__subtitle { color: var(--gray); }
.steps__grid {
  display: flex;
  gap: var(--sp-6);
  justify-content: center;
}
.step-card {
  background: var(--white);
  border-radius: var(--radius-fun);
  padding: var(--sp-6);
  transition: transform 0.5s var(--ease-bounce), box-shadow 0.5s var(--ease-bounce);
  width: clamp(240px, 22vw, 280px);
  min-width: 0;
  flex-shrink: 0;
}
.step-card:hover {
  /* Standardized to -1deg (matching pillar-card, team-card) */
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: var(--shadow-lg);
}
.step-card__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--blue-darker);
  opacity: 0.35;
  line-height: 1;
  display: block;
  margin-bottom: var(--sp-3);
}
.step-card__img {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--sp-3);
  aspect-ratio: 4/3;
}
.step-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.step-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}
.step-card__desc { color: var(--gray); font-size: 0.92rem; line-height: 1.65; }

@media (max-width: 768px) {
  .steps__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
  }
  .steps__grid .step-card {
    width: 100%;
    min-width: unset;
  }
}
@media (max-width: 480px) {
  .steps__grid {
    grid-template-columns: 1fr;
  }
}

/* --- MASTERY --- */
.section-mastery { background: var(--purple-light); }
.mastery__tower {
  max-width: 720px;
  margin: var(--sp-12) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.mastery__level {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-5) var(--sp-6);
  border-radius: var(--radius);
  /* White cards on purple-light section bg for clear contrast */
  background: var(--white);
  transition: all 0.4s var(--ease-bounce);
  position: relative;
  overflow: hidden;
}
.mastery__level:hover {
  /* Use purple tint to match section background theme */
  background: var(--purple);
  background: rgba(206,130,255,0.18);
  transform: translateX(12px) scale(1.02);
}
.mastery__code {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--gray);
  min-width: 2rem;
  transition: color 0.4s var(--ease);
}
.mastery__level:hover .mastery__code { color: var(--black); }
.mastery__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
}
.mastery__desc {
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.5;
  transition: color 0.4s var(--ease);
}
.mastery__level:hover .mastery__desc { color: var(--black); }
.mastery__bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: calc(var(--level) * 12.5%);
  background: var(--purple);
  opacity: 0.15;
  border-radius: var(--radius);
  transition: opacity 0.4s var(--ease);
}
/* Color mastery bars in a gradient from green to gold */
.mastery__level:nth-child(1) .mastery__bar { background: var(--green); }
.mastery__level:nth-child(2) .mastery__bar { background: var(--green); }
.mastery__level:nth-child(3) .mastery__bar { background: var(--teal); }
.mastery__level:nth-child(4) .mastery__bar { background: var(--blue); }
.mastery__level:nth-child(5) .mastery__bar { background: var(--blue); }
.mastery__level:nth-child(6) .mastery__bar { background: var(--purple); }
.mastery__level:nth-child(7) .mastery__bar { background: var(--purple); }
.mastery__level:nth-child(8) .mastery__bar { background: var(--yellow); opacity: 0.3; }
.mastery__level:hover .mastery__bar { opacity: 0.3; }

@media (max-width: 768px) {
  .mastery__tower { margin-top: var(--sp-8); }
  .mastery__level { gap: var(--sp-4); padding: var(--sp-4) var(--sp-5); }
  .mastery__name { font-size: 1rem; }
  .mastery__desc { font-size: 0.85rem; }
}
@media (max-width: 400px) {
  .mastery__level { flex-wrap: wrap; }
  .mastery__code { min-width: auto; }
}

/* Section title light variant (used on dark backgrounds) */
.section__title--light { color: var(--white); }

/* --- TRACTION --- */
.section-traction { background: var(--peach-light); }
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-8);
  margin-top: var(--sp-12);
}
.stat-card {
  text-align: center;
  padding: var(--sp-6);
  border-radius: var(--radius);
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.stat-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.stat-card__num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--black);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-card__plus {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--peach-dark);
}
/* Match plus sign color to parent stat card color */
.stat-card:nth-child(1) .stat-card__plus { color: var(--green-darker); }
.stat-card:nth-child(2) .stat-card__plus { color: var(--blue-darker); }
/* Color each stat card differently — using AA-safe darker shades on peach-light bg */
.stat-card:nth-child(1) .stat-card__num { color: var(--green-darker); }
.stat-card:nth-child(2) .stat-card__num { color: var(--blue-darker); }
.stat-card:nth-child(3) .stat-card__num { color: var(--purple-darker); }
.stat-card:nth-child(4) .stat-card__num { color: var(--peach-dark); }
.stat-card__label {
  color: var(--gray);
  font-size: 0.92rem;
  margin-top: var(--sp-2);
  line-height: 1.5;
  font-weight: 500;
  font-family: var(--font-display);
}

@media (max-width: 768px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-8) var(--sp-4); }
}
@media (max-width: 400px) {
  .stats__grid { grid-template-columns: 1fr; }
}

/* --- OLYMPIAD TEASER --- */
.section-olympiad-teaser { background: var(--teal-light); }
.olympiad-teaser__inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-12);
  align-items: center;
  background: var(--black);
  border-radius: var(--radius-fun);
  padding: clamp(2rem, 4vw, 4rem);
  overflow: hidden;
}
.olympiad-teaser__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--sp-4);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.olympiad-teaser__sub {
  /* Raised from 0.7 to 0.75 for better readability on dark bg */
  color: rgba(255,254,247,0.75);
  line-height: 1.7;
  margin-bottom: var(--sp-6);
  font-size: 1.02rem;
}
.olympiad-teaser__list {
  margin-bottom: var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.olympiad-teaser__list li {
  /* Raised from 0.7 to 0.8 for better readability */
  color: rgba(255,254,247,0.8);
  padding: var(--sp-3) 0;
  padding-left: var(--sp-8);
  position: relative;
  line-height: 1.65;
  font-size: 0.98rem;
}
.olympiad-teaser__list li::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 8px; height: 8px;
  background: var(--yellow);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(254,208,13,0.2);
}
.olympiad-teaser__visual {
  border-radius: var(--radius);
  overflow: hidden;
}
.olympiad-teaser__visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 4/3;
  transition: transform 0.6s var(--ease-bounce);
}
.olympiad-teaser__inner:hover .olympiad-teaser__visual img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .olympiad-teaser__inner { grid-template-columns: 1fr; }
  .olympiad-teaser__visual { order: -1; }
}

/* --- PARENTS --- */
.section-parents { background: var(--red-light); }
.parents__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: start;
}
.parents__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  margin-bottom: var(--sp-6);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.parents__list li {
  padding: var(--sp-3) 0;
  padding-left: var(--sp-8);
  position: relative;
  border-bottom: 1px solid rgba(26,26,26,0.06);
  line-height: 1.7;
  font-size: 0.98rem;
}
.parents__list li::before {
  content: '\2713';
  position: absolute; left: 0; top: var(--sp-3);
  /* Use red-dark to harmonize with the red-light section background */
  color: var(--red-dark);
  font-weight: 800;
  font-size: 1.1rem;
}
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-fun);
  padding: var(--sp-10);
  /* Red accent to match parent section background */
  border-left: 5px solid var(--red);
  box-shadow: var(--shadow-md);
}
.testimonial-card--map {
  text-align: center;
  padding: var(--sp-8);
}
.testimonial-card--map svg {
  max-width: 260px;
  margin: 0 auto var(--sp-6);
  display: block;
}
.testimonial-card__text {
  font-size: 1.1rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--gray);
  margin-bottom: var(--sp-4);
}
.testimonial-card__author {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}
.testimonial-card__stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--black);
  margin-bottom: var(--sp-1);
}
.testimonial-card__stat-label {
  color: var(--gray);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.4;
}
/* Mascot testimonial card */
.testimonial-card--mascot {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  border-left: none;
  border-bottom: 5px solid var(--red);
}
.testimonial-card__bird {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.testimonial-card__bird img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}
.testimonial-card__bird svg {
  display: block;
  margin: 0 auto;
}
.testimonial-card__message {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--gray);
  line-height: 1.5;
}

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

/* --- FINAL CTA --- */
.section-final-cta {
  /* Darkened green for AA compliance: #2B7A00 on white = 6.2:1 contrast.
     Original bright green moved to accent use. */
  background: var(--green-darker);
  text-align: center;
  padding: clamp(6rem, 14vw, 12rem) 0;
}
.final-cta__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  margin-bottom: var(--sp-4);
  letter-spacing: -0.02em;
  line-height: 1;
}
.final-cta__title { color: var(--white); }
.final-cta__sub {
  font-size: 1.1rem;
  /* White on dark green (#2B7A00) = 6.2:1 — well above AA */
  color: rgba(255,255,255,0.88);
  margin-bottom: var(--sp-10);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.65;
}
.final-cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
/* Focus ring on dark green: use white instead of yellow for visibility */
.section-final-cta *:focus-visible {
  outline-color: var(--white);
}
.section-final-cta .btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(255,254,247,0.5);
}
/* CTA button on dark green: use white bg with dark text for maximum contrast */
.section-final-cta .btn--dark {
  background: var(--white);
  color: var(--green-darker);
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}
.section-final-cta .btn--dark::before { background: var(--yellow); }
.section-final-cta .btn--dark:hover {
  color: var(--black);
  box-shadow: 0 10px 40px rgba(254,208,13,0.3);
}
.ios-notify {
  display: flex;
  gap: 0;
  border: 2px solid rgba(255,254,247,0.6);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: rgba(255,254,247,0.15);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease-bounce), border-color 0.3s var(--ease);
}
.ios-notify:focus-within {
  box-shadow: 0 0 0 3px rgba(255,254,247,0.2);
  border-color: rgba(255,254,247,0.9);
  transform: scale(1.02);
}
.ios-notify .input {
  border: none;
  background: transparent;
  border-radius: 0;
  min-width: 220px;
  color: var(--white);
}
.ios-notify .input::placeholder {
  color: rgba(255,254,247,0.5);
}
.ios-notify .input:focus {
  box-shadow: none;
  transform: none;
}
.ios-notify .btn--dark-outline {
  border: none;
  border-left: 2px solid rgba(255,254,247,0.3);
  border-radius: 0;
  min-width: 52px;
  font-size: 1.2rem;
  padding: 0.65rem 1.2rem;
  color: var(--white);
}
.ios-notify .btn--dark-outline:hover {
  background: rgba(255,254,247,0.2);
  color: var(--white);
  transform: none;
}
.input {
  font-family: var(--font-body);
  font-weight: 500;
  padding: 0.85rem 1.5rem;
  border: 2px solid var(--black);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--black);
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-bounce);
  min-height: 44px;
}
.input::placeholder { color: rgba(26,26,26,0.4); }
.input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.15);
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .final-cta__actions { flex-direction: column; align-items: center; }
  .ios-notify { width: 100%; max-width: 340px; }
  .ios-notify .input { min-width: 0; flex: 1; }
}
@media (max-width: 400px) {
  .final-cta__title { font-size: 2rem; }
}

/* --- FOOTER --- */
.footer {
  background: var(--black);
  color: var(--white);
  padding: var(--sp-16) 0 var(--sp-8);
}
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255,254,247,0.08);
}
/* Footer logo link mirrors header__logo layout */
.footer__logo-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.footer__logo-link:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
  border-radius: 4px;
}
.footer__brand .logo-text { color: var(--white); }
.footer__mission {
  color: rgba(255,254,247,0.55);
  margin-top: var(--sp-4);
  line-height: 1.7;
  max-width: 360px;
  font-size: 0.92rem;
}
.footer__links-heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  /* Improved from 0.35 to 0.5 for WCAG AA compliance */
  color: rgba(255,254,247,0.5);
  margin-bottom: var(--sp-4);
}
.footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.footer__nav a {
  color: rgba(255,254,247,0.65);
  transition: color 0.3s var(--ease), transform 0.3s var(--ease-bounce);
  font-size: 0.92rem;
  display: inline-block;
}
.footer__nav a:hover { color: var(--yellow); transform: translateX(4px); }
.footer__social {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  /* Improved from 0.4 to 0.5 */
  color: rgba(255,254,247,0.5);
  transition: color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease-bounce);
}
.social-link:hover {
  color: var(--yellow);
  background: rgba(254,208,13,0.1);
  transform: translateY(-3px) scale(1.1);
}
.social-link:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-8);
  flex-wrap: wrap;
  gap: var(--sp-4);
}
.footer__bottom p {
  color: rgba(255,254,247,0.45);
  font-size: 0.88rem;
}
.footer__legal {
  display: flex;
  gap: var(--sp-6);
}
.footer__legal a {
  color: rgba(255,254,247,0.45);
  font-size: 0.88rem;
  transition: color 0.3s var(--ease);
}
.footer__legal a:hover { color: var(--yellow); }

@media (max-width: 768px) {
  .footer__top { grid-template-columns: 1fr; gap: var(--sp-8); }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* --- REVEAL ANIMATIONS --- */
.reveal-up {
  opacity: 0;
  transform: translateY(56px);
  transition: opacity var(--duration) var(--ease-bounce), transform var(--duration) var(--ease-bounce);
}
.reveal-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity var(--duration) var(--ease-bounce), transform var(--duration) var(--ease-bounce);
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* --- INNER PAGES SHARED --- */
.page-hero {
  padding-top: 10rem;
  padding-bottom: var(--sp-16);
  text-align: center;
  background: linear-gradient(160deg, var(--white) 0%, #FFF9E0 60%, var(--white) 100%);
}
.page-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: var(--sp-4);
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.page-hero__sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}
.page-section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.page-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: var(--sp-6);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.page-section p, .page-section li {
  line-height: 1.7;
  color: var(--gray);
}
.page-section--alt { background: var(--gray-light); }
.page-section--dark { background: var(--black); color: var(--white); }
/* Improved from 0.7 to 0.75 */
.page-section--dark p { color: rgba(255,254,247,0.75); }
.page-section--dark h2 { color: var(--white); }
.page-section--yellow { background: var(--yellow); }

/* Pledge / list items */
.pledge-list, .feature-list, .vision-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  list-style: none;
  padding: 0;
}
.pledge-list li, .feature-list li, .vision-list li {
  padding: var(--sp-4) var(--sp-6);
  padding-left: var(--sp-12);
  background: var(--white);
  border-radius: var(--radius);
  position: relative;
  font-weight: 500;
  color: var(--black);
  line-height: 1.6;
  transition: transform 0.3s var(--ease-bounce), box-shadow 0.3s var(--ease);
}
.pledge-list li:hover, .feature-list li:hover, .vision-list li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
.page-section--dark .pledge-list li {
  background: rgba(255,254,247,0.06);
  color: var(--white);
}
.pledge-list li::before, .feature-list li::before {
  content: '\2713';
  position: absolute;
  left: var(--sp-4); top: 50%;
  transform: translateY(-50%);
  color: var(--orange);
  font-weight: 800;
  font-size: 1.1rem;
}

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-8);
  margin-top: var(--sp-8);
}
.team-card {
  background: var(--gray-light);
  border-radius: var(--radius-fun);
  overflow: hidden;
  transition: transform 0.5s var(--ease-bounce), box-shadow 0.5s var(--ease-bounce);
}
.team-card:hover {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: var(--shadow-lg);
}
.team-card__img {
  aspect-ratio: 1;
  background: var(--yellow);
  overflow: hidden;
}
.team-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-bounce);
}
.team-card:hover .team-card__img img { transform: scale(1.08); }
.team-card__info { padding: var(--sp-6); }
.team-card__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: var(--sp-1);
  line-height: 1.2;
}
.team-card__role {
  color: var(--orange);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: var(--sp-2);
  font-family: var(--font-display);
}
.team-card__bio { color: var(--gray); font-size: 0.92rem; line-height: 1.65; }

/* FAQ */
.faq-list { max-width: 720px; margin: var(--sp-8) auto 0; }
.faq-item {
  border-bottom: 1.5px solid rgba(26,26,26,0.08);
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-5) 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  text-align: left;
  color: var(--black);
  gap: var(--sp-4);
  min-height: 44px;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease-bounce);
}
.faq-question:hover { color: var(--orange); transform: translateX(4px); }
.faq-question::after {
  content: '+';
  font-size: 1.6rem;
  font-weight: 600;
  transition: transform 0.4s var(--ease-bounce), color 0.3s;
  color: var(--orange);
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease), padding 0.5s var(--ease);
}
.faq-item.open .faq-answer {
  max-height: 500px;
  padding-bottom: var(--sp-5);
}
.faq-answer p {
  color: var(--gray);
  line-height: 1.7;
  font-size: 0.98rem;
}

/* Contact form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--sp-16);
  margin-top: var(--sp-8);
}
.contact-channels { display: flex; flex-direction: column; gap: var(--sp-6); }
.contact-channel {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  padding: var(--sp-4);
  border-radius: var(--radius);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease-bounce);
  margin: calc(-1 * var(--sp-4));
  padding: var(--sp-4);
}
.contact-channel:hover {
  background: var(--gray-light);
  transform: translateX(4px);
}
.contact-channel__icon {
  width: 48px; height: 48px;
  background: var(--yellow);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--black);
}
.contact-channel__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--gray);
  margin-bottom: 0.15rem;
}
.contact-channel__value { font-weight: 500; }
.contact-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.form-field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--gray);
}
.form-field input, .form-field textarea, .form-field select {
  padding: 0.85rem var(--sp-4);
  border: 2px solid var(--gray-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s var(--ease-bounce);
  outline: none;
  min-height: 44px;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  border-color: var(--yellow);
  box-shadow: var(--focus-ring);
  transform: scale(1.01);
}
.form-field textarea { resize: vertical; min-height: 120px; }

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

/* Steps for olympiad */
.qualify-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}
.qualify-step {
  text-align: center;
  padding: var(--sp-8);
  background: var(--gray-light);
  border-radius: var(--radius-fun);
  transition: transform 0.4s var(--ease-bounce), box-shadow 0.4s var(--ease-bounce);
}
.qualify-step:hover {
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 16px 40px rgba(26,26,26,0.08);
}
.qualify-step__num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: var(--sp-2);
}
.qualify-step p { color: var(--gray); font-size: 0.98rem; line-height: 1.65; }

/* Legal pages */
.legal-content {
  max-width: 700px;
  margin: 0 auto;
}
.legal-content h3 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: var(--sp-8) 0 var(--sp-3);
}
.legal-content p {
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: var(--sp-4);
}

/* Phases for olympiad */
.phases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-6);
}
.phase-card {
  padding: var(--sp-8);
  background: var(--gray-light);
  border-radius: var(--radius-fun);
  border-left: 5px solid var(--yellow);
  transition: transform 0.4s var(--ease-bounce), box-shadow 0.4s var(--ease-bounce);
}
.phase-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-sm);
}
.phase-card h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.phase-card p { color: var(--gray); line-height: 1.65; }

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

/* Download CTA block reusable */
.cta-block {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 0;
}
.cta-block__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700;
  margin-bottom: var(--sp-6);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.cta-block__actions {
  display: flex;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* --- UTILITY: sr-only (screen reader only) --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --- SCROLL ANIMATION: HORIZONTAL STEPS TRACK --- */
.steps__track {
  overflow: hidden;
  width: 100%;
  /* Prevent content from leaking during horizontal scroll pin */
  position: relative;
}
.steps__track .steps__grid {
  padding: var(--sp-4) clamp(1.25rem, 4vw, 2rem);
  will-change: transform;
}
/* Horizontal scroll hint on desktop */
.steps__scroll-hint {
  display: none;
  text-align: center;
  margin-top: var(--sp-6);
  /* Raised opacity for readability on blue-light bg */
  color: rgba(26,26,26,0.55);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  gap: var(--sp-2);
  align-items: center;
  justify-content: center;
}
.steps__scroll-hint svg {
  animation: scrollHintBounce 1.5s ease-in-out infinite;
}
@keyframes scrollHintBounce {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}
@media (min-width: 769px) {
  .steps__scroll-hint { display: flex; }
}

/* --- SCROLL ANIMATION: STAT CARD FLOAT --- */
@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.stat-card--floating {
  animation: subtleFloat 3s ease-in-out infinite;
}
.stat-card--floating:nth-child(2) { animation-delay: 0.4s; }
.stat-card--floating:nth-child(3) { animation-delay: 0.8s; }
.stat-card--floating:nth-child(4) { animation-delay: 1.2s; }

/* --- SCROLL ANIMATION: REDUCED MOTION OVERRIDES --- */
@media (prefers-reduced-motion: reduce) {
  .pillar-card, .step-card, .stat-card, .mastery__level {
    opacity: 1 !important;
    transform: none !important;
  }
  .stat-card--floating {
    animation: none !important;
  }
  .steps__track {
    overflow: visible !important;
  }
}

/* --- SVG WAVE DIVIDERS (replaces gradient blends) --- */
.wave-divider {
  position: relative;
  z-index: 1;
  pointer-events: none;
  line-height: 0;
  /* Overlap aggressively into adjacent sections — the SVG draws both
     correct colors, so overlapping ensures zero gaps */
  margin: -4px 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: clamp(60px, 10vw, 120px);
  /* Scale slightly taller to cover any remaining subpixel edge */
  transform: scaleY(1.01);
  will-change: transform;
}
.wave-divider--hero-marquee svg { height: clamp(40px, 8vw, 80px); }
.wave-divider--marquee-problem svg { height: clamp(60px, 10vw, 100px); }
.wave-divider--problem-pillars svg,
.wave-divider--parents-cta svg { height: clamp(80px, 12vw, 140px); }

/* --- HERO PARTICLE CANVAS --- */
.hero-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* .section-hero already has position: relative (from .section) and
   overflow: hidden — no duplicate rule needed here. */

/* --- 3D TILT CARDS --- */
/* Tilt uses CSS custom properties (--tilt-rx, --tilt-ry) set by JS.
   This composes cleanly with existing CSS hover transforms. */
[data-tilt] {
  --tilt-rx: 0deg;
  --tilt-ry: 0deg;
  transform-style: preserve-3d;
}
/* Inner elements get subtle Z-depth for parallax feel */
[data-tilt] .pillar-card__icon,
[data-tilt] .step-card__num {
  transform: translateZ(20px);
  will-change: transform;
}
[data-tilt] .pillar-card__title,
[data-tilt] .step-card__title {
  transform: translateZ(10px);
  will-change: transform;
}

/* Override the hover transforms to include tilt composition */
.pillar-card[data-tilt]:hover {
  transform: perspective(800px) rotateX(var(--tilt-rx)) rotateY(var(--tilt-ry)) translateY(-10px) rotate(-1deg);
}
/* Step-cards intentionally excluded from data-tilt — they use GSAP-driven
   horizontal scroll rotation which conflicts with perspective tilt. */

/* Glossy light reflection on tilt cards — uses a separate element
   to avoid conflicting with .pillar-card::before hover overlay.
   Uses translateZ(40px) to stay on top in preserve-3d context (Safari). */
[data-tilt] > .tilt-gloss {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.25) 45%,
    rgba(255,255,255,0.05) 50%,
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
  transform: translateZ(40px);
}
[data-tilt]:hover > .tilt-gloss {
  opacity: 1;
}

/* --- TEXT SCRAMBLE EFFECT --- */
.scramble-char {
  display: inline-block;
  min-width: 0.1em;
}
.scramble-char--scrambling {
  color: var(--yellow);
  opacity: 0.6;
}
.scramble-char--resolved {
  opacity: 1;
}

/* --- MARQUEE VELOCITY WARP --- */
/* Skew is now applied via GSAP (composes with GSAP scroll-based x-transform).
   These CSS rules are kept as a fallback class but the JS handles the actual
   transform via gsap.to(skewX) to avoid overwriting the GSAP x-offset. */

/* --- CLIP-PATH REVEAL SYSTEM --- */
.clip-reveal {
  clip-path: inset(100% 0 0 0);
  will-change: clip-path;
}
.clip-reveal.visible {
  clip-path: inset(0 0 0 0);
}
/* Fallback for browsers without clip-path support */
.no-clip-path .clip-reveal {
  clip-path: none;
  opacity: 0;
  transform: translateY(48px);
}
.no-clip-path .clip-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- LENIS SMOOTH SCROLL --- */
html.lenis, html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* --- SCROLL VELOCITY AWARENESS (disabled by default) --- */
.speed-reading .hero__sub,
.speed-reading .pillar-card__desc,
.speed-reading .step-card__desc,
.speed-reading .mastery__desc,
.speed-reading .problem__answer,
.speed-reading .section__subtitle {
  opacity: 0.3;
  transition: opacity 0.3s var(--ease);
}
.speed-reading .section__title,
.speed-reading .hero__title,
.speed-reading .parents__title,
.speed-reading .final-cta__title {
  transform: scale(1.05);
  transition: transform 0.3s var(--ease);
}

/* --- GEOMETRIC SCROLL PROGRESS --- */
.scroll-progress {
  position: fixed;
  left: 0;
  top: 0;
  width: 3px;
  height: 100vh;
  z-index: 999;
  pointer-events: none;
}
.scroll-progress__track {
  width: 100%;
  height: 100%;
  background: rgba(254, 208, 13, 0.1);
}
.scroll-progress__fill {
  width: 100%;
  height: 100%;
  background: var(--yellow);
  opacity: 0.5;
  transform-origin: top;
  transform: scaleY(0);
  will-change: transform;
}

@media (max-width: 768px) {
  .scroll-progress { display: none; }
}


/* --- CURSOR SECTION STATES --- */
.cursor--gold { background: var(--yellow); }
.cursor-follower--gold { border-color: var(--yellow); }
.cursor--inverted { background: var(--yellow); mix-blend-mode: normal; }
.cursor-follower--inverted { border-color: var(--white); }

/* --- GEOMETRIC PATTERNS (atmospheric) --- */
.geo-pattern {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.geo-pattern svg {
  width: 100%;
  height: 100%;
  opacity: 0.08;
}
.geo-pattern svg path,
.geo-pattern svg line,
.geo-pattern svg circle {
  stroke-dasharray: var(--dash-total);
  stroke-dashoffset: var(--dash-total);
  transition: stroke-dashoffset 0s;
}
.geo-pattern.drawn svg path,
.geo-pattern.drawn svg line,
.geo-pattern.drawn svg circle {
  stroke-dashoffset: 0;
}

/* --- SECTION ILLUMINATION TRANSITIONS --- */
.section-illumination {
  position: relative;
  height: 100vh;
  overflow: hidden;
}
.section-illumination__border {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.section-illumination__flood {
  position: absolute;
  inset: 0;
  z-index: 1;
  clip-path: circle(0% at 50% 50%);
  will-change: clip-path;
}

/* --- REDUCED MOTION: LIVING MANUSCRIPT OVERRIDES --- */
@media (prefers-reduced-motion: reduce) {
  /* Preloader: instant content, no geo draw */
  .preloader {
    transition: none !important;
    clip-path: none !important;
  }
  .preloader.done {
    clip-path: none !important;
    opacity: 0;
  }
  .preloader__logo { animation: none !important; }
  .preloader__text span {
    animation: none !important;
    transform: none !important;
  }

  /* Wave dividers: show them (they provide visual section transitions)
     but disable parallax movement */
  .wave-divider svg {
    transform: none !important;
  }
  .section-illumination { display: none !important; }
  .scroll-progress { display: none !important; }
  .geo-pattern svg path,
  .geo-pattern svg line,
  .geo-pattern svg circle,
  .geo-pattern svg polygon,
  .geo-pattern svg polyline {
    stroke-dashoffset: 0 !important;
  }
  .clip-reveal {
    clip-path: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .cursor--gold,
  .cursor--inverted,
  .cursor-follower--gold,
  .cursor-follower--inverted {
    display: none !important;
  }
  /* Speed-reading class: never visible */
  .speed-reading * { opacity: 1 !important; transform: none !important; }
  /* Split-text: no transform */
  .split-word, .split-word__inner {
    transform: none !important;
    opacity: 1 !important;
  }
  /* Particle canvas: hidden (JS also checks prefersReducedMotion) */
  .hero-particles { display: none !important; }
  /* Text scramble: no scramble chars visible (JS skips them too) */
  .scramble-char--scrambling { color: inherit !important; opacity: 1 !important; }
  /* 3D tilt: disabled */
  [data-tilt] {
    --tilt-rx: 0deg !important;
    --tilt-ry: 0deg !important;
    transform-style: flat !important;
  }
  [data-tilt] > .tilt-gloss { display: none !important; }
  /* Marquee warp: no skew */
  .marquee__inner {
    transform: none !important;
    font-style: normal !important;
  }
}

/* --- PRINT STYLES --- */
@media print {
  .preloader,
  .cursor,
  .cursor-follower,
  .header,
  .marquee,
  .hero__scroll-hint,
  .hero-particles,
  .wave-divider,
  .scroll-progress,
  .tilt-gloss,
  .footer__social { display: none !important; }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  .section, .page-section {
    padding: 1.5rem 0;
  }
  .section-problem,
  .section-final-cta,
  .section-pillars,
  .section-how,
  .section-mastery,
  .section-traction,
  .section-olympiad-teaser,
  .section-parents,
  .page-section--dark,
  .page-section--yellow {
    background: #fff !important;
    color: #000 !important;
  }
  .section-problem .problem__quote,
  .section-problem .problem__answer,
  .section-final-cta .final-cta__title,
  .section-final-cta .final-cta__sub {
    color: #000 !important;
  }
  .page-section--dark p,
  .page-section--dark h2 {
    color: #000 !important;
  }
  a { text-decoration: underline; }
  .btn { border: 1px solid #000; }
  .footer {
    background: #fff !important;
    color: #000 !important;
  }
  .footer__mission,
  .footer__nav a,
  .footer__bottom p,
  .footer__legal a {
    color: #333 !important;
  }
}
