/* ============================================================
   SchoolClaude Kids — Hologram Control Room (premium, playful)
   ============================================================ */

:root {
  /* Lighter, warmer base — not pitch-black. Purple-indigo twilight. */
  --kids-space-900:      #1b1246;   /* Twilight Indigo */
  --kids-space-800:      #271a6b;   /* Cosmic Violet */
  --kids-space-700:      #3a2896;   /* Electric Purple */
  --kids-space-600:      #5035c8;

  --kids-neon-green:     #3aff9c;
  --kids-electric-blue:  #38d8ff;
  --kids-magenta:        #ff4fd8;
  --kids-sun:            #ffd23f;
  --kids-sunset:         #ff8a3d;
  --kids-lime:           #b6ff4a;
  --kids-grape:          #c084fc;
  --kids-cyan:           #22d3ee;

  /* Station color pairs (c1 → c2) */
  --c-sunset-1: #ff4fd8; --c-sunset-2: #ffd23f;
  --c-lime-1:   #3aff9c; --c-lime-2:   #22d3ee;
  --c-grape-1:  #c084fc; --c-grape-2:  #ff4fd8;
  --c-sky-1:    #38d8ff; --c-sky-2:    #3aff9c;
  --c-sun-1:    #ffd23f; --c-sun-2:    #ff4fd8;
  --c-rose-1:   #ff6b9d; --c-rose-2:   #ff4fd8;
  --c-cyan-1:   #00e5ff; --c-cyan-2:   #3aff9c;
  --c-emerald-1:#22c55e; --c-emerald-2:#34d399;
  --c-violet-1: #a855f7; --c-violet-2: #c084fc;
  --c-aurora-1: #ffd23f; --c-aurora-2: #a855f7;
  --c-crimson-1: #ff3d3d; --c-crimson-2: #ff8a3d;
  --c-electric-1:#39ff14; --c-electric-2: #00e5ff;
  --c-coral-1:   #ff6b6b; --c-coral-2:   #ffd23f;
  --c-indigo-1:  #6366f1; --c-indigo-2:  #38d8ff;
  --c-rainbow-1: #ff4fd8; --c-rainbow-2: #ffd23f;

  --kids-text:           #f5f7ff;
  --kids-text-soft:      rgba(245, 247, 255, 0.85);
  --kids-muted:          rgba(245, 247, 255, 0.64);
  --kids-dim:            rgba(245, 247, 255, 0.42);

  /* Brighter glass — feels luminous, not pitch-black */
  --kids-glass-bg:       rgba(58, 40, 150, 0.38);
  --kids-glass-border:   rgba(255, 255, 255, 0.22);
  --kids-glass-hover:    rgba(255, 255, 255, 0.32);

  --kids-glow-green:     0 0 28px rgba(58, 255, 156, 0.45), 0 0 64px rgba(58, 255, 156, 0.20);
  --kids-glow-magenta:   0 0 28px rgba(255, 79, 216, 0.50), 0 0 64px rgba(255, 79, 216, 0.22);
  --kids-glow-sun:       0 0 28px rgba(255, 210, 63, 0.55);

  --kids-space-xs: 0.5rem;
  --kids-space-sm: 0.875rem;
  --kids-space-md: 1.25rem;
  --kids-space-lg: 2rem;
  --kids-space-xl: 3rem;
  --kids-space-2xl: 4.5rem;

  --kids-radius-sm: 12px;
  --kids-radius-md: 18px;
  --kids-radius-lg: 26px;
  --kids-radius-xl: 36px;

  --kids-font-display: 'Heebo', 'Rubik', system-ui, -apple-system, sans-serif;
  --kids-font-mono:    ui-monospace, 'Fira Code', 'Cascadia Code', 'Courier New', monospace;

  --kids-header-height: 64px;
}

/* Overflow guard */
html:has(body.kids-page) { overflow-x: hidden; background: var(--kids-space-900); }

/* Skip link */
.kids-page .skip-link {
  position: absolute;
  inset-inline-start: var(--kids-space-sm);
  top: -100px;
  z-index: 999;
  padding: 0.6rem 1rem;
  background: var(--kids-neon-green);
  color: var(--kids-space-900);
  font-weight: 800;
  border-radius: 10px;
  text-decoration: none;
  transition: top 160ms ease;
}
.kids-page .skip-link:focus { top: 8px; outline: 3px solid var(--kids-sun); outline-offset: 3px; }

/* ═══════════════════════════════════════════════════════════
   BODY + CANVAS STARFIELD
   ═══════════════════════════════════════════════════════════ */
body.kids-page {
  margin: 0;
  min-height: 100vh;
  background: #07091a;
  color: var(--kids-text);
  font-family: var(--kids-font-display);
  direction: rtl;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* Floating planets/shapes — decorative SVG art layer */
.kids-bg-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.kids-bg-scene > * { position: absolute; }
.kids-bg-planet {
  border-radius: 50%;
  filter: blur(0.5px) drop-shadow(0 0 40px currentColor);
  animation: kidsFloatPlanet 12s ease-in-out infinite;
}
@keyframes kidsFloatPlanet {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33%      { transform: translate(18px, -14px) rotate(8deg); }
  66%      { transform: translate(-14px, 10px) rotate(-6deg); }
}
.kids-bg-ring { animation: kidsFloatPlanet 16s ease-in-out infinite reverse; }
body.kids-page *,
body.kids-page *::before,
body.kids-page *::after { box-sizing: border-box; }

.kids-starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* Main/aside direct children stack above fixed bg. Topbar excluded — needs sticky+z-index:40. */
body.kids-page > *:not(.kids-starfield):not(.space-background):not(.kids-scene-stack):not(.kids-topbar) { position: relative; z-index: 1; }

/* ═══════════════════════════════════════════════════════════
   NAV LINK CHIP (main site nav)
   ═══════════════════════════════════════════════════════════ */
.nav-link-kids {
  color: var(--kids-sun) !important;
  background: linear-gradient(135deg, rgba(255, 79, 216, 0.14), rgba(255, 210, 63, 0.12)) !important;
  border: 1px solid rgba(255, 138, 61, 0.42);
  font-weight: 800 !important;
  transition: all 200ms ease;
}
.nav-link-kids:hover,
.nav-link-kids:focus-visible {
  color: #fff7d9 !important;
  background: linear-gradient(135deg, rgba(255, 79, 216, 0.30), rgba(255, 210, 63, 0.24)) !important;
  box-shadow: 0 0 22px rgba(255, 138, 61, 0.50);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════
   TOP BAR — holographic glass
   ═══════════════════════════════════════════════════════════ */
/* Unified top bar: nav + HUD in one luminous strip */
.kids-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--kids-header-height);
  display: grid;
  grid-template-columns: auto auto auto auto 1fr auto auto;
  align-items: center;
  gap: var(--kids-space-md);
  padding: 0.6rem var(--kids-space-md);
  background: linear-gradient(180deg, rgba(39, 26, 107, 0.78) 0%, rgba(27, 18, 70, 0.55) 100%);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255, 126, 236, 0.35);
  box-shadow: 0 1px 0 rgba(255, 126, 236, 0.18), 0 10px 36px rgba(0, 0, 0, 0.40);
}

/* Hide brand text on narrow screens — keep it only as visual accent on wide */
.kids-topbar .kids-brand { justify-self: start; }

@media (max-width: 1100px) {
  .kids-topbar { grid-template-columns: auto auto auto 1fr auto auto; }
  .kids-topbar .kids-brand { display: none; }
}
@media (max-width: 820px) {
  .kids-topbar { grid-template-columns: auto auto 1fr auto auto; padding: 0.5rem var(--kids-space-sm); gap: var(--kids-space-sm); }
  .kids-hud-rank { display: none; }
}
@media (max-width: 540px) {
  /* 3-column topbar: back | lessons (1fr) | mute — clean on 375px */
  .kids-topbar {
    grid-template-columns: auto 1fr auto;
    gap: var(--kids-space-xs);
    padding-inline: var(--kids-space-sm);
  }
  .kids-hud-badges { display: none; }
  .kids-hud-actions .kids-completion { display: none; }
  /* Hide XP bar — too wide for 375px topbar; XP shown in hero stats strip */
  .kids-xp { display: none; }
}

/* Hexagon-shaped CTA in topbar */
.kids-hex-btn {
  --hex-bg: rgba(255, 255, 255, 0.04);
  --hex-border: var(--kids-glass-border);
  --hex-color: var(--kids-text-soft);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  color: var(--hex-color);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  background: var(--hex-bg);
  border: 1px solid var(--hex-border);
  clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
  transition: all 200ms ease;
}
.kids-hex-btn:hover,
.kids-hex-btn:focus-visible {
  --hex-bg: rgba(58, 255, 156, 0.12);
  --hex-border: rgba(58, 255, 156, 0.55);
  --hex-color: var(--kids-text);
  box-shadow: 0 0 22px rgba(58, 255, 156, 0.40);
}
.kids-hex-btn--back::before { content: '←'; color: var(--kids-neon-green); font-weight: 900; }

.kids-brand {
  font-family: var(--kids-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  background: linear-gradient(90deg, var(--kids-neon-green), var(--kids-electric-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════
   CONTAINERS
   ═══════════════════════════════════════════════════════════ */
.kids-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--kids-space-lg) var(--kids-space-md);
  position: relative;
  z-index: 2;
}

/* ═══════════════════════════════════════════════════════════
   HERO — cinematic, robot + CTA
   ═══════════════════════════════════════════════════════════ */
.kids-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--kids-space-xl);
  align-items: center;
  min-height: calc(100vh - var(--kids-header-height));
  padding: var(--kids-space-2xl) 0 var(--kids-space-xl);
  position: relative;
}
/* Text-protection scrim: dark radial halo behind hero text column */
.kids-hero--protected::before {
  content: '';
  position: absolute;
  inset-inline-start: -8%;
  top: -10%;
  width: 90%;
  height: 130%;
  background: radial-gradient(ellipse 70% 80% at 35% 45%,
    rgba(4, 5, 18, 0.92) 0%,
    rgba(4, 5, 18, 0.70) 45%,
    transparent 75%);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
}
.kids-hero-text {
  text-align: start;
  position: relative;
  z-index: 1;
  padding: 0 var(--kids-space-xl) 0 0;
}
.kids-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ── New fal.ai robot mascot image ── */
.kids-robot-img {
  width: clamp(280px, 36vw, 460px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(255, 210, 63, 0.55)) drop-shadow(0 20px 60px rgba(255, 79, 216, 0.40));
  animation: kidsRobotBounce 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}
@keyframes kidsRobotBounce {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-14px) rotate(1deg); }
}

/* ── Robot images inside hex station cards ── */
.kids-hex-robot {
  position: absolute;
  width: 68px;
  height: 68px;
  object-fit: contain;
  border: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}
.kids-hero-visual::before {
  content: '';
  position: absolute;
  width: 80%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(58, 255, 156, 0.25) 0%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  animation: kidsHeroPulse 4s ease-in-out infinite;
}
@keyframes kidsHeroPulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50%      { transform: scale(1.12); opacity: 0.90; }
}

/* ── Orbital glow ring behind robot ── */
.kids-hero-visual::after {
  content: '';
  position: absolute;
  width: 85%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255,210,63,0.35);
  box-shadow: 0 0 40px rgba(255,210,63,0.25), inset 0 0 40px rgba(255,210,63,0.15);
  animation: kidsOrbitGlow 6s ease-in-out infinite;
  z-index: -1;
}
@keyframes kidsOrbitGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50%      { transform: scale(1.08); opacity: 1; }
}

.kids-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--kids-font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--kids-text);
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: rgba(20, 10, 60, 0.72);
  border: 1px solid rgba(255, 79, 216, 0.60);
  margin-bottom: var(--kids-space-md);
  font-weight: 700;
  text-shadow: 0 1px 12px rgba(0,0,0,0.9);
}
.kids-eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--kids-magenta);
  box-shadow: 0 0 12px var(--kids-magenta);
  animation: kidsPulseDot 1.6s ease-in-out infinite;
}
@keyframes kidsPulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.5); opacity: 0.5; }
}

.kids-title {
  font-family: 'Rubik', 'Heebo', sans-serif;
  font-size: clamp(2.8rem, 4.8vw + 0.8rem, 4.8rem);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 var(--kids-space-md);
  /* Clean white — shadow gives depth, no stroke swallowing the letterform */
  color: #ffffff;
  -webkit-text-stroke: 0;
  text-shadow:
    2px  2px 0   #0d0050,
    4px  4px 0   rgba(10, 0, 60, 0.60),
    0    0   28px rgba(140, 100, 255, 0.70),
    0    0   56px rgba(100,  60, 255, 0.35),
    0    2px 8px  rgba(0, 0, 0, 0.95);
}

.kids-subtitle {
  font-family: 'Rubik', 'Heebo', sans-serif;
  font-size: clamp(1.1rem, 1.2vw + 0.9rem, 1.38rem);
  line-height: 1.7;
  color: #e8e0ff;
  max-width: 540px;
  margin: 0 0 var(--kids-space-lg);
  text-shadow: 0 1px 6px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.7);
}
.kids-subtitle strong {
  color: #FFE600;
  font-weight: 800;
  text-shadow: 0 0 16px rgba(255, 220, 0, 0.70), 0 1px 4px rgba(0,0,0,0.9);
}

.kids-hero-ctas {
  display: flex;
  gap: var(--kids-space-sm);
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS — hexagonal pulse CTA
   ═══════════════════════════════════════════════════════════ */
.kids-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.05rem 2.2rem;
  font-family: var(--kids-font-display);
  font-size: 1.1rem;
  font-weight: 900;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform 220ms cubic-bezier(.34,1.56,.64,1), box-shadow 240ms ease, filter 200ms ease;
  min-height: 54px;
  letter-spacing: 0.02em;
  position: relative;
  color: #fff;
  border-radius: 999px;
}
.kids-btn:focus-visible { outline: 3px solid var(--kids-sun); outline-offset: 4px; }

.kids-btn-primary {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8a3d 50%, #ffd23f 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(255, 107, 107, 0.55), 0 4px 0 rgba(180, 60, 30, 0.4);
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
  animation: kidsCtaPulse 2.4s ease-in-out infinite;
}
@keyframes kidsCtaPulse {
  0%, 100% { box-shadow: 0 8px 28px rgba(255, 107, 107, 0.55), 0 4px 0 rgba(180,60,30,0.4); }
  50%      { box-shadow: 0 12px 40px rgba(255, 210, 63, 0.60), 0 4px 0 rgba(180,60,30,0.4); }
}
.kids-btn-primary:hover  { transform: translateY(-4px) scale(1.04); animation: none; filter: brightness(1.07); box-shadow: 0 14px 36px rgba(255,107,107,0.65), 0 4px 0 rgba(180,60,30,0.4); }
.kids-btn-primary:active { transform: translateY(-1px) scale(1.0); }

.kids-btn-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 2.5px solid rgba(255,255,255,0.7);
  box-shadow: 0 4px 18px rgba(0,0,0,0.2);
  backdrop-filter: blur(8px);
}
.kids-btn-ghost:hover { background: rgba(255,255,255,0.28); transform: translateY(-3px) scale(1.03); box-shadow: 0 8px 28px rgba(255,255,255,0.25); }

/* ═══════════════════════════════════════════════════════════
   SAFETY BANNER
   ═══════════════════════════════════════════════════════════ */
.kids-safety {
  display: flex;
  gap: var(--kids-space-md);
  align-items: flex-start;
  padding: var(--kids-space-md) var(--kids-space-lg);
  margin: 0 auto var(--kids-space-xl);
  max-width: 860px;
  background: linear-gradient(135deg, rgba(255, 210, 63, 0.08), rgba(255, 79, 216, 0.08)), rgba(12, 16, 48, 0.88);
  border: 1.5px solid rgba(255, 210, 63, 0.50);
  border-radius: var(--kids-radius-lg);
  color: var(--kids-text);
  font-size: 0.98rem;
  line-height: 1.55;
  box-shadow: 0 0 24px rgba(255, 210, 63, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-shadow: 0 1px 8px rgba(0,0,0,0.7);
}
.kids-safety-icon { font-size: 1.8rem; flex-shrink: 0; filter: drop-shadow(0 0 10px rgba(255, 210, 63, 0.65)); }
.kids-safety strong { color: var(--kids-sun); font-weight: 800; display: block; margin-bottom: 0.25rem; }

/* ═══════════════════════════════════════════════════════════
   MAP SECTION HEADING
   ═══════════════════════════════════════════════════════════ */
.kids-section-h {
  font-size: clamp(1.5rem, 2vw + 1rem, 2.25rem);
  font-weight: 900;
  margin: var(--kids-space-xl) 0 var(--kids-space-md);
  text-align: center;
  color: var(--kids-text);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 20px rgba(0,0,0,0.8), 0 4px 40px rgba(0,0,0,0.6);
}
.kids-section-h::after {
  content: '';
  display: block;
  width: 72px;
  height: 4px;
  margin: 0.6rem auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--kids-magenta), var(--kids-sun), var(--kids-neon-green));
}
.kids-section-sub {
  text-align: center;
  color: var(--kids-text-soft);
  max-width: 640px;
  margin: 0 auto var(--kids-space-lg);
  text-shadow: 0 1px 12px rgba(0,0,0,0.9);
}

/* ═══════════════════════════════════════════════════════════
   "HOW IT WORKS" (3 steps)
   ═══════════════════════════════════════════════════════════ */
.kids-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--kids-space-md);
  margin: var(--kids-space-lg) 0;
}
.kids-step {
  padding: var(--kids-space-lg);
  background: rgba(10, 8, 40, 0.80);
  border: 1.5px solid var(--kids-glass-border);
  border-radius: var(--kids-radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  transition: border-color 220ms ease, box-shadow 240ms ease, transform 220ms ease;
}
.kids-step:hover { border-color: rgba(58, 255, 156, 0.40); box-shadow: var(--kids-glow-green); transform: translateY(-3px); }
.kids-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 54px;
  margin-bottom: var(--kids-space-sm);
  font-family: var(--kids-font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--kids-space-900);
  background: linear-gradient(135deg, var(--kids-neon-green), var(--kids-electric-blue));
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.kids-step h3 { margin: 0 0 0.5rem; font-size: 1.15rem; color: var(--kids-text); text-shadow: 0 1px 8px rgba(0,0,0,0.7); }
.kids-step p  { margin: 0; color: var(--kids-text-soft); line-height: 1.55; font-size: 0.96rem; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }

/* ═══════════════════════════════════════════════════════════
   "SKILLS" (4 skill cards)
   ═══════════════════════════════════════════════════════════ */
.kids-skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--kids-space-md);
  margin: var(--kids-space-lg) 0 var(--kids-space-xl);
}
.kids-skill {
  padding: var(--kids-space-md);
  background:
    linear-gradient(145deg, rgba(58, 255, 156, 0.06), transparent 70%),
    rgba(10, 8, 40, 0.80);
  border: 1.5px solid var(--kids-glass-border);
  border-radius: var(--kids-radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.kids-skill-emoji { font-size: 2rem; margin-bottom: 0.5rem; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35)); }
.kids-skill h4 { margin: 0 0 0.35rem; font-size: 1.05rem; color: var(--kids-text); text-shadow: 0 1px 8px rgba(0,0,0,0.7); }
.kids-skill p  { margin: 0; color: var(--kids-text-soft); font-size: 0.92rem; line-height: 1.5; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }

/* ═══════════════════════════════════════════════════════════
   PARENT NOTE
   ═══════════════════════════════════════════════════════════ */
.kids-parent {
  padding: var(--kids-space-lg);
  background:
    radial-gradient(circle at top left, rgba(56, 216, 255, 0.10), transparent 60%),
    rgba(10, 14, 50, 0.88);
  border: 1.5px solid rgba(56, 216, 255, 0.50);
  border-radius: var(--kids-radius-lg);
  color: var(--kids-text);
  line-height: 1.65;
  margin: var(--kids-space-xl) 0;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}
.kids-parent h3 {
  margin: 0 0 var(--kids-space-sm);
  font-size: 1.25rem;
  color: var(--kids-electric-blue);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kids-parent strong { color: var(--kids-sun); }

/* ═══════════════════════════════════════════════════════════
   FOCUS RING
   ═══════════════════════════════════════════════════════════ */
body.kids-page a:focus-visible,
body.kids-page button:focus-visible,
body.kids-page input:focus-visible,
body.kids-page textarea:focus-visible,
body.kids-page [tabindex]:focus-visible {
  outline: 3px solid var(--kids-sun);
  outline-offset: 3px;
  border-radius: 10px;
}

/* ═══════════════════════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  body.kids-page *,
  body.kids-page *::before,
  body.kids-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .kids-hero { grid-template-columns: 1fr; gap: var(--kids-space-lg); text-align: center; }
  .kids-hero-text { text-align: center; }
  .kids-hero-ctas { justify-content: center; }
  .kids-hero-visual { order: -1; }
}
@media (max-width: 480px) {
  .kids-container { padding: var(--kids-space-md) var(--kids-space-sm); }
  .kids-hero { padding: var(--kids-space-lg) 0; }
  .kids-safety { padding: var(--kids-space-sm) var(--kids-space-md); font-size: 0.92rem; }
  .kids-btn { padding: 0.9rem 1.5rem; font-size: 1rem; }
}
@media (min-width: 768px) { .kids-topbar { padding: 0 var(--kids-space-lg); } }

/* ═══════════════════════════════════════════════════════════
   CINEMATIC SPACE BACKGROUND — layered depth system
   space-background
   ├── space-nebula   (far, blurred color overlay)
   ├── space-hero-bg  (photorealistic fal.ai generated image)
   └── space-overlay  (top vignette for readability)
   ═══════════════════════════════════════════════════════════ */
.space-background {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: #07091a;
  will-change: transform;
}
.space-background > * { position: absolute; }

/* ── Nebula: subtle color wash over the photo ── */
.space-nebula {
  top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 60% 40% at 15% 25%, rgba(168, 85, 247, 0.18), transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 20%, rgba(255, 126, 236, 0.1), transparent 60%),
    radial-gradient(ellipse 45% 30% at 25% 75%, rgba(120, 80, 255, 0.12), transparent 60%);
  filter: blur(30px);
  opacity: 0.7;
  animation: spaceNebulaPulse 18s ease-in-out infinite;
}
@keyframes spaceNebulaPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.04); }
}

/* ── Hero background: photo, cover, no parallax, no animation ── */
.space-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
}

/* ── Readability overlay — strengthened for WCAG AA text contrast ── */
.space-overlay {
  top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom,
    rgba(7, 9, 26, 0.55) 0%,
    rgba(7, 9, 26, 0.30) 30%,
    rgba(7, 9, 26, 0.25) 60%,
    rgba(3, 8, 25, 0.55) 100%);
  pointer-events: none;
}

/* ── Backwards compat: legacy .kids-bg-scene still works ── */
.kids-bg-scene { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .space-nebula { filter: blur(18px); opacity: 0.5; }
  /* Portrait mobile: show full image height, don't crop sides into a tiny strip */
  .space-hero-bg {
    background-size: auto 100%;
    background-position: center top;
  }
}
@media (prefers-reduced-motion: reduce) {
  .space-nebula { animation: none; }
}

/* ═══════════════════════════════════════════════════════════
   LESSONS NAV DROPDOWN
   ═══════════════════════════════════════════════════════════ */
.kids-lessons-nav {
  position: relative;
  z-index: 50;
}
.kids-lessons-nav summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.kids-lessons-nav summary::-webkit-details-marker { display: none; }
.kids-lessons-nav[open] .kids-hex-btn--lessons {
  background: rgba(255, 210, 63, 0.18);
  border-color: rgba(255, 210, 63, 0.55);
  color: var(--kids-sun);
}
.kids-lessons-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 280px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  z-index: 9999;
  background: rgba(10, 8, 40, 0.97);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1.5px solid rgba(255, 210, 63, 0.35);
  border-radius: 1rem;
  padding: 0.75rem 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(255,210,63,0.15);
  animation: kidsDropIn 180ms cubic-bezier(0.22,1,0.36,1) both;
}
@keyframes kidsDropIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.kids-lessons-dropdown a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: var(--kids-text-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--kids-font-display);
  direction: rtl;
  transition: background 150ms, color 150ms;
}
.kids-lessons-dropdown a:hover,
.kids-lessons-dropdown a:focus-visible {
  background: rgba(255, 210, 63, 0.12);
  color: var(--kids-sun);
}
.kids-lessons-dropdown__home {
  color: var(--kids-neon-green) !important;
  font-weight: 800 !important;
}
.kids-lessons-dropdown__divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 0.4rem 0;
}
/* Close dropdown when clicking outside — use :focus-within trick */
.kids-lessons-nav:not(:focus-within) .kids-lessons-dropdown { display: none; }

@media (max-width: 540px) {
  .kids-lessons-dropdown { right: -60px; min-width: 260px; }
}

/* ═══════════════════════════════════════════════════════════
   HERO V2 — RESEARCH-BASED CHILDREN'S DESIGN (AGES 6-12)
   Color science: high-saturation electric palette for max
   excitement. Motion: 3 layers of floating/bouncing animation.
   Gamification: XP/mission stats shown BEFORE commitment.
   ═══════════════════════════════════════════════════════════ */

/* ── Floating sparkle particles (CSS-only, decorative) ── */
.hero-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.hero-spark {
  position: absolute;
  animation: heroSparkFloat var(--spark-dur, 6s) ease-in-out infinite var(--spark-delay, 0s);
  will-change: transform;
  user-select: none;
}
.hero-spark--1 { top:  8%; left:  6%; font-size: 1.7rem; --spark-dur: 5.2s; --spark-delay:  0s; }
.hero-spark--2 { top: 18%; left: 52%; font-size: 1.2rem; --spark-dur: 7.1s; --spark-delay: -1.3s; }
.hero-spark--3 { top: 66%; left: 70%; font-size: 1.9rem; --spark-dur: 5.8s; --spark-delay: -2.1s; }
.hero-spark--4 { top: 80%; left: 14%; font-size: 1.4rem; --spark-dur: 8.0s; --spark-delay: -3.5s; }
.hero-spark--5 { top: 10%; left: 88%; font-size: 1.3rem; --spark-dur: 6.3s; --spark-delay: -0.8s; }
.hero-spark--6 { top: 44%; left: 42%; font-size: 2.2rem; --spark-dur: 9.0s; --spark-delay: -4.2s; }
.hero-spark--7 { top: 56%; left: 90%; font-size: 1.1rem; --spark-dur: 4.8s; --spark-delay: -2.8s; }
@keyframes heroSparkFloat {
  0%, 100% { transform: translateY(0) rotate(0deg) scale(1); opacity: 0.9; }
  25%       { transform: translateY(-22px) rotate(14deg) scale(1.28); opacity: 1; }
  75%       { transform: translateY(12px) rotate(-10deg) scale(0.82); opacity: 0.6; }
}

/* ── Floating stat badges around robot ── */
.hero-badge {
  position: absolute;
  z-index: 4;
  padding: 0.45rem 1rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 800;
  font-family: var(--kids-font-display);
  white-space: nowrap;
  user-select: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-badge--xp {
  top: 8%; inset-inline-end: 2%;
  background: linear-gradient(135deg, rgba(255,215,0,0.93), rgba(255,140,0,0.93));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,165,0,0.65), inset 0 1px 0 rgba(255,255,255,0.35);
  animation: heroBadgeFloat 3.2s ease-in-out infinite;
}
.hero-badge--missions {
  bottom: 18%; inset-inline-end: 0%;
  background: linear-gradient(135deg, rgba(0,255,170,0.93), rgba(0,170,255,0.93));
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,255,170,0.55), inset 0 1px 0 rgba(255,255,255,0.35);
  animation: heroBadgeFloat 4.0s ease-in-out infinite 1.1s;
}
.hero-badge--ai {
  top: 48%; inset-inline-start: 0%;
  background: linear-gradient(135deg, rgba(255,0,170,0.93), rgba(139,0,255,0.93));
  color: #fff;
  box-shadow: 0 4px 20px rgba(255,0,170,0.55), inset 0 1px 0 rgba(255,255,255,0.35);
  animation: heroBadgeFloat 3.7s ease-in-out infinite 0.6s;
}
@keyframes heroBadgeFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-10px) scale(1.07); }
}

/* ── Spinning orbital ring with rocket ── */
.hero-orbital-ring {
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(255, 210, 63, 0.45);
  animation: heroOrbitalSpin 14s linear infinite;
  z-index: 0;
  pointer-events: none;
}
.hero-orbital-ring::before {
  content: '🚀';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  filter: drop-shadow(0 0 10px rgba(255,165,0,0.9));
}
@keyframes heroOrbitalSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Eyebrow: FUN version (kids-v2) ── */
.kids-eyebrow--fun {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--kids-font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #FF9FE0;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  background: rgba(255, 0, 170, 0.18);
  border: 1.5px solid rgba(255, 0, 170, 0.55);
  margin-bottom: var(--kids-space-md);
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
  animation: eyebrowKidsPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes eyebrowKidsPop {
  from { transform: scale(0.7) translateY(-8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── Title second-line accent — Varela Round, sticker badge style ── */
.kids-title-accent {
  display: inline-block;
  white-space: nowrap; /* never wrap — badge must be one line */
  font-family: 'Varela Round', 'Rubik', sans-serif;
  font-size: 0.75em;
  font-weight: 400;
  /* Sticker/badge: dark text on electric yellow — guaranteed contrast on ANY bg */
  color: #1a0050;
  background: #FFE600;
  -webkit-text-stroke: 0;
  text-shadow: none;
  padding: 0.06em 0.35em 0.12em;
  border-radius: 0.18em;
  /* 3D sticker effect */
  box-shadow:
    4px  4px 0   #B89B00,
    8px  8px 0   rgba(80, 60, 0, 0.35),
    0    0   30px rgba(255, 220, 0, 0.55);
  transform: rotate(-1.2deg);
  animation: accentBrighten 3s ease-in-out infinite;
}
@keyframes accentBrighten {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 12px rgba(255,220,0,0.5));  }
  50%       { filter: brightness(1.1) drop-shadow(0 0 24px rgba(255,220,0,0.9)); }
}

/* ── MEGA Launch Button ── */
.kids-btn-mega {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.1rem 2.8rem;
  min-height: 72px;
  font-size: 1.35rem;
  font-weight: 900;
  font-family: var(--kids-font-display);
  background: linear-gradient(135deg, #FF4500 0%, #FF8C00 50%, #FFD700 100%);
  background-size: 200% auto;
  border-radius: 60px;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow:
    0 8px 32px rgba(255, 100, 0, 0.65),
    0 0 60px rgba(255, 165, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: megaBtnPulse 2.5s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
  letter-spacing: 0.02em;
  transition: transform 180ms cubic-bezier(0.34,1.56,0.64,1), filter 180ms ease;
}
.kids-btn-mega::before {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.38), transparent);
  animation: megaBtnShine 3.5s ease-in-out infinite 1.5s;
  pointer-events: none;
}
@keyframes megaBtnPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(255,100,0,0.65), 0 0 60px rgba(255,165,0,0.28), inset 0 1px 0 rgba(255,255,255,0.35);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 14px 48px rgba(255,100,0,0.82), 0 0 80px rgba(255,165,0,0.50), inset 0 1px 0 rgba(255,255,255,0.35);
  }
}
@keyframes megaBtnShine {
  from { left: -120%; }
  to   { left: 200%; }
}
.kids-btn-mega:hover  { transform: translateY(-4px) scale(1.07) !important; filter: brightness(1.08); animation: none; }
.kids-btn-mega:active { transform: scale(0.97) !important; transition-duration: 80ms; }
.kids-btn-mega:focus-visible { outline: 4px solid #FFD700; outline-offset: 4px; }

.btn-rocket {
  font-size: 1.75rem;
  animation: rocketWiggle 1.2s ease-in-out infinite;
  display: inline-block;
}
@keyframes rocketWiggle {
  0%, 100% { transform: rotate(-12deg) translateX(0); }
  50%       { transform: rotate(12deg) translateX(-4px); }
}
.btn-label { flex: 1; }
.btn-xp {
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(0,0,0,0.28);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ── Hero stats strip (gamification hooks) ── */
.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--kids-space-md);
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  width: fit-content;
  margin-top: var(--kids-space-md);
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}
.hero-stat-num {
  font-size: 1.5rem;
  font-weight: 900;
  font-family: var(--kids-font-display);
  color: #FFD700;
  line-height: 1;
  text-shadow: 0 0 20px rgba(255,210,0,0.7);
}
.hero-stat-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(245, 247, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-stat-sep {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.2);
  line-height: 1;
}

/* ── Responsive for v2 hero elements ── */
@media (max-width: 860px) {
  .hero-badge { display: none; }
  .hero-orbital-ring { display: none; }
  .hero-spark { font-size: 1rem; }
  .kids-btn-mega { font-size: 1.15rem; min-height: 60px; padding: 0.9rem 2rem; }
  .hero-stats { gap: var(--kids-space-sm); padding: 0.6rem 1rem; }
  .hero-stat-num { font-size: 1.2rem; }
}
@media (max-width: 540px) {
  .kids-btn-mega { width: 100%; justify-content: center; }
  .hero-stats { width: 100%; justify-content: space-around; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-spark, .hero-badge, .hero-orbital-ring,
  .kids-btn-mega, .kids-btn-mega::before,
  .btn-rocket, .kids-title-accent { animation: none !important; }
  .kids-btn-mega { transform: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   MOBILE COMPREHENSIVE FIX v2
   1. iOS: overflow-x: hidden breaks position:fixed → use clip
   2. Robot image: min clamp too wide for small screens
   3. Hero text: inline-end padding wastes space on single col
   4. Hero height: remove forced 100vh on mobile
   ═══════════════════════════════════════════════════════════ */

/* ── iOS Safari fix: clip does NOT create fixed-pos containing block ── */
@supports (overflow-x: clip) {
  html:has(body.kids-page) { overflow-x: clip; }
  body.kids-page           { overflow-x: clip; }
}

/* ── Tablet + large mobile (≤860px = single-column hero) ── */
@media (max-width: 860px) {
  /* Remove ALL horizontal padding — desktop had physical padding-right:3rem which in RTL
     shifts content left. Reset to zero so single-column grid centers properly. */
  .kids-hero-text { padding: 0; width: 100%; }

  /* Hero: no forced full-viewport height on mobile */
  .kids-hero {
    min-height: unset;
    padding-block: var(--kids-space-xl) var(--kids-space-lg);
  }

  /* Remove dark ellipse scrim — not needed in single column, looks wrong on mobile */
  .kids-hero--protected::before { display: none; }

  /* Robot: cap visual column height, allow proper centering */
  .kids-hero-visual {
    max-height: 340px;
  }

  /* Robot image: smaller minimum for mobile, respects vw */
  .kids-robot-img {
    width: clamp(160px, 50vw, 300px);
    max-width: 100%;
  }

  /* Subtitle: uncap at full width for single column */
  .kids-subtitle { max-width: 100%; }
}

/* ── Small mobile (≤540px) ── */
@media (max-width: 540px) {
  /* Title: tighter on phones */
  .kids-title {
    font-size: clamp(2rem, 8.5vw, 2.8rem);
    line-height: 1.1;
  }

  /* CTAs: stack vertically, full width */
  .kids-hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .kids-hero-ctas .kids-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  /* Stats: wrap on very small screens */
  .hero-stats {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Section headings: scale down */
  .kids-section-h {
    font-size: clamp(1.35rem, 6.5vw, 2rem);
  }
}

/* ── Very small (≤380px: iPhone SE, Galaxy A series) ── */
@media (max-width: 380px) {
  .kids-container { padding-inline: var(--kids-space-xs); }
  .kids-robot-img { width: clamp(140px, 46vw, 220px); }
  .kids-title     { font-size: clamp(1.75rem, 8vw, 2.2rem); }
  .kids-eyebrow, .kids-eyebrow--fun { font-size: 0.82rem; padding: 0.4rem 0.9rem; }
}
