/* ============================================================
   BITSI — Code • Create • Learn
   Bright, bouncy, space-flavoured design for kids (and parents)
   ============================================================ */

:root {
  --ink: #241a5e;          /* deep space navy — text & outlines */
  --space: #17103f;        /* darkest background */
  --space-2: #2b1b6b;      /* hero gradient end */
  --purple: #7b5cff;
  --pink: #ff4d9d;
  --cyan: #00e5ff;
  --yellow: #ffc93c;
  --green: #7ed957;
  --orange: #ff6b35;
  --paper: #fffdf7;        /* warm white */
  --lavender: #f1ecff;
  --radius: 24px;
  --shadow-pop: 0 6px 0 var(--ink);
  --font-head: 'Fredoka', 'Nunito', sans-serif;
  --font-body: 'Nunito', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; }

a { color: var(--purple); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

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

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: var(--shadow-pop);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }

.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: #ffd45e; }

.btn-secondary { background: var(--cyan); color: var(--ink); }
.btn-secondary:hover { background: #4deeff; }

.btn-ghost { background: transparent; color: #fff; border-color: #fff; box-shadow: 0 6px 0 rgba(255,255,255,.25); }
.btn-ghost:hover { background: rgba(255,255,255,.12); box-shadow: 0 9px 0 rgba(255,255,255,.25); }

.btn-book { background: var(--pink); color: #fff; padding: 9px 20px; font-size: 1rem; }
.btn-book:hover { background: #ff69ae; }
.btn-book .rocket-ico { display: inline-block; transition: transform .3s ease; }
.btn-book:hover .rocket-ico { transform: translate(3px, -3px) rotate(8deg); }

.btn-block { display: block; text-align: center; width: 100%; }

/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(23, 16, 63, .92);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--purple);
}
.nav-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-bot { width: 42px; height: 42px; transition: transform .3s ease; }
.nav-logo:hover .nav-logo-bot { transform: rotate(-10deg) scale(1.08); }
.nav-wordmark {
  font-family: var(--font-head); font-weight: 700; font-size: 1.9rem;
  color: #fff; letter-spacing: .5px;
}
/* multicoloured sticker letters, like the original Bitsi logo */
.nav-wordmark span, .footer-logo span {
  display: inline-block;
  text-shadow:
    2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff,
    1.4px 1.4px 0 #fff, -1.4px 1.4px 0 #fff, 1.4px -1.4px 0 #fff, -1.4px -1.4px 0 #fff,
    4px 4px 0 rgba(0, 0, 0, .35);
}
.nav-wordmark span:nth-child(1), .footer-logo span:nth-child(1) { color: #ff8a2b; }
.nav-wordmark span:nth-child(2), .footer-logo span:nth-child(2) { color: #8a5cf6; }
.nav-wordmark span:nth-child(3), .footer-logo span:nth-child(3) { color: #ff4d9d; }
.nav-wordmark span:nth-child(4), .footer-logo span:nth-child(4) { color: #ffb02e; }
.nav-wordmark span:nth-child(5), .footer-logo span:nth-child(5) { color: #35b5f0; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a:not(.btn) {
  color: #e7e1ff; text-decoration: none; font-weight: 700; font-size: 1rem;
  position: relative;
}
.nav-links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 100%; height: 3px; border-radius: 3px;
  background: var(--cyan); transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }

.nav-burger {
  display: none; background: none; border: none; cursor: pointer;
  width: 44px; height: 44px; padding: 10px;
  flex-direction: column; justify-content: space-between;
}
.nav-burger span {
  display: block; height: 4px; width: 100%; border-radius: 2px;
  background: #fff; transition: transform .25s ease, opacity .25s ease;
}
.nav-burger.open span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--space) 0%, var(--space-2) 55%, #45247e 100%);
  color: #fff;
  padding: 70px 0 120px;
  overflow: hidden;
}
.hero-inner {
  position: relative; z-index: 3;
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center;
}
.hero-kicker {
  display: inline-block;
  background: rgba(0, 229, 255, .15);
  border: 2px solid var(--cyan);
  color: var(--cyan);
  border-radius: 999px;
  padding: 6px 18px;
  font-weight: 800; font-size: .95rem;
  margin-bottom: 22px;
  animation: kicker-glow 2.5s ease-in-out infinite;
}
@keyframes kicker-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(0,229,255,.0); }
  50% { box-shadow: 0 0 22px rgba(0,229,255,.45); }
}
.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 4.3rem);
  font-weight: 700;
  margin-bottom: 22px;
}
.hero-title .line { display: block; opacity: 0; transform: translateY(30px); animation: line-in .6s cubic-bezier(.2,.9,.3,1.2) forwards; }
.hero-title .line:nth-child(1) { animation-delay: .1s; }
.hero-title .line:nth-child(2) { animation-delay: .3s; }
.hero-title .line:nth-child(3) { animation-delay: .5s; }
@keyframes line-in { to { opacity: 1; transform: translateY(0); } }
.line-pop {
  background: linear-gradient(90deg, var(--yellow), var(--pink), var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.sparkle { -webkit-text-fill-color: var(--yellow); color: var(--yellow); display: inline-block; animation: sparkle-spin 3s linear infinite; }
@keyframes sparkle-spin { from { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.3); } to { transform: rotate(360deg) scale(1); } }

.hero-sub { font-size: 1.2rem; max-width: 34rem; color: #e9e4ff; margin-bottom: 30px; }
.hero-sub strong { color: var(--yellow); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 26px; }
.hero-trust { font-size: .92rem; color: #beb3ea; font-weight: 700; }

/* --- starfield --- */
.stars, .stars::after {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    radial-gradient(2px 2px at 20px 30px, #fff, transparent),
    radial-gradient(2px 2px at 40% 70%, #ffd9f0, transparent),
    radial-gradient(1.5px 1.5px at 60% 20%, #fff, transparent),
    radial-gradient(2px 2px at 80% 55%, #bff9ff, transparent),
    radial-gradient(1.5px 1.5px at 15% 80%, #fff, transparent),
    radial-gradient(2px 2px at 90% 85%, #fff0c2, transparent),
    radial-gradient(1.5px 1.5px at 33% 40%, #fff, transparent),
    radial-gradient(2px 2px at 70% 90%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 50% 50%, #d8ccff, transparent),
    radial-gradient(2px 2px at 5% 15%, #fff, transparent);
  background-size: 550px 550px;
  animation: stars-twinkle 4s ease-in-out infinite;
}
.stars::after { content: ""; background-position: 275px 275px; animation-delay: 2s; }
@keyframes stars-twinkle { 0%, 100% { opacity: .9; } 50% { opacity: .35; } }

/* --- floating decorations --- */
.hero-deco { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.planet { position: absolute; border-radius: 50%; }
.planet-1 {
  width: 70px; height: 70px; top: 12%; right: 8%;
  background: radial-gradient(circle at 30% 30%, #ff9dc6, var(--pink));
  box-shadow: inset -12px -8px 0 rgba(0,0,0,.18);
  animation: drift 9s ease-in-out infinite;
}
.planet-2 {
  width: 46px; height: 46px; bottom: 26%; left: 4%;
  background: radial-gradient(circle at 30% 30%, #8ff0ff, #08b6cc);
  animation: drift 11s ease-in-out infinite reverse;
}
.planet-ring {
  position: absolute; top: 50%; left: 50%;
  width: 84px; height: 22px;
  border: 3px solid var(--yellow); border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
}
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-22px) rotate(6deg); } }

.float-code {
  position: absolute; font-family: var(--font-head); font-weight: 700;
  color: rgba(255,255,255,.22); animation: drift 8s ease-in-out infinite;
}
.fc-1 { font-size: 2.2rem; top: 18%; left: 44%; animation-delay: .5s; }
.fc-2 { font-size: 1.8rem; bottom: 20%; left: 30%; animation-delay: 1.4s; }
.fc-3 { font-size: 1.6rem; top: 60%; right: 6%; animation-delay: 2.2s; }
.fc-4 { font-size: 1.3rem; top: 8%; left: 8%; animation-delay: 3s; letter-spacing: 3px; }

.ufo { position: absolute; width: 90px; top: 6%; right: 30%; animation: ufo-fly 14s ease-in-out infinite; }
@keyframes ufo-fly {
  0%, 100% { transform: translate(0, 0) rotate(-4deg); }
  25% { transform: translate(-50px, 22px) rotate(4deg); }
  50% { transform: translate(-110px, -6px) rotate(-3deg); }
  75% { transform: translate(-40px, 14px) rotate(3deg); }
}

.section-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 90px; z-index: 4; }

/* ============ BITSI BOT ============ */
.hero-bot-zone { position: relative; display: flex; justify-content: center; z-index: 3; }
.bitsi-bot { width: min(320px, 70vw); cursor: pointer; outline: none; overflow: visible; }

.bot-float { animation: bot-hover 3.2s ease-in-out infinite; transform-origin: 160px 200px; }
@keyframes bot-hover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
.bot-shadow { animation: shadow-squash 3.2s ease-in-out infinite; transform-origin: 160px 400px; }
@keyframes shadow-squash {
  0%, 100% { transform: scaleX(1); opacity: .8; }
  50% { transform: scaleX(.72); opacity: .45; }
}
.bot-flame { animation: flame-flicker .32s ease-in-out infinite alternate, bot-hover 3.2s ease-in-out infinite; transform-origin: 160px 340px; }
@keyframes flame-flicker { from { transform: scaleY(1); } to { transform: scaleY(1.35) scaleX(.9); } }

.bot-antenna-tip { animation: antenna-blink 1.6s steps(1) infinite; }
@keyframes antenna-blink {
  0%, 100% { fill: #ff4d9d; }
  50% { fill: #00e5ff; }
}

.bot-arm-right { animation: arm-wave 2.6s ease-in-out infinite; transform-origin: 240px 205px; }
@keyframes arm-wave {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(-22deg); }
  20% { transform: rotate(8deg); }
  30% { transform: rotate(-22deg); }
  40% { transform: rotate(0deg); }
}

.eyelid { transform: translateY(-46px); animation: blink 4.5s infinite; }
@keyframes blink {
  0%, 94%, 100% { transform: translateY(-46px); }
  96%, 98% { transform: translateY(0); }
}

.chest-heart { animation: heart-beat 1.4s ease-in-out infinite; transform-origin: 160px 247px; }
@keyframes heart-beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.18); } 24% { transform: scale(1); } 36% { transform: scale(1.12); } 48% { transform: scale(1); } }

.bitsi-bot.dance .bot-float { animation: bot-dance .6s ease-in-out 3; }
@keyframes bot-dance {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-24px) rotate(-10deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-24px) rotate(10deg); }
}

.speech-bubble {
  position: absolute; top: -18px; right: 2%;
  background: #fff; color: var(--ink);
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  border: 3px solid var(--ink); border-radius: 18px;
  padding: 10px 16px; max-width: 230px; text-align: center;
  box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(10px) scale(.9);
  transition: opacity .25s ease, transform .25s cubic-bezier(.2,.9,.3,1.4);
  z-index: 5; pointer-events: none;
}
.speech-bubble::after {
  content: ""; position: absolute; bottom: -14px; left: 40px;
  border: 8px solid transparent; border-top-color: var(--ink);
}
.speech-bubble.show { opacity: 1; transform: translateY(0) scale(1); }

/* confetti bits (created by JS) */
.confetti {
  position: fixed; width: 12px; height: 12px; z-index: 999;
  pointer-events: none; border-radius: 3px;
  animation: confetti-fall 1.3s ease-in forwards;
}
@keyframes confetti-fall {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--cx), var(--cy)) rotate(720deg) scale(.4); opacity: 0; }
}

/* ============ MARQUEE ============ */
.marquee {
  background: var(--yellow);
  border-block: 4px solid var(--ink);
  overflow: hidden;
  padding: 14px 0;
  transform: rotate(-1deg) scale(1.02);
  position: relative; z-index: 5; margin-top: -30px;
}
.marquee-track {
  display: flex; white-space: nowrap; width: max-content;
  animation: marquee-scroll 22s linear infinite;
  font-family: var(--font-head); font-weight: 700; font-size: 1.25rem;
  color: var(--ink); letter-spacing: 1px;
}
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ SECTIONS ============ */
.section { padding: 96px 0; position: relative; }
.section-light { background: var(--paper); }
.section-lavender { background: var(--lavender); }
.section-space {
  background: linear-gradient(180deg, var(--space) 0%, var(--space-2) 100%);
  color: #fff; overflow: hidden;
}
.stars-small { opacity: .6; }

.section-kicker {
  display: inline-block; margin-bottom: 14px;
}
.sticker {
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  border: 3px solid var(--ink); border-radius: 999px;
  padding: 6px 18px; transform: rotate(-2deg);
  box-shadow: 3px 4px 0 var(--ink);
}
.sticker-pink { background: #ffd7e9; }
.sticker-purple { background: #e3daff; }
.sticker-yellow { background: var(--yellow); }
.sticker-cyan { background: #c8f8ff; }
.sticker-green { background: #dcf7cd; }

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 700; margin-bottom: 16px;
}
.section-title-light { color: #fff; }
.section-lead { font-size: 1.15rem; max-width: 42rem; margin-bottom: 48px; }
.section-lead-light { color: #d9d2f5; }
.wiggle-emoji { display: inline-block; animation: wiggle 2.4s ease-in-out infinite; }
@keyframes wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }

/* ============ TECH CARDS ============ */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.tech-card {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow-pop);
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative; overflow: hidden;
}
.tech-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: var(--accent);
}
.tech-card:hover { transform: translateY(-8px) rotate(-1deg); box-shadow: 0 14px 0 var(--ink); }
.tech-icon {
  width: 76px; height: 76px; margin-bottom: 16px;
  transition: transform .3s cubic-bezier(.2,.9,.3,1.6);
}
.tech-card:hover .tech-icon { transform: scale(1.15) rotate(6deg); }
.tech-card h3 { font-size: 1.4rem; margin-bottom: 8px; }
.tech-card p { font-size: 1rem; }

/* ============ MINI-GAME: CODE THE BOT ============ */
.game-shell {
  position: relative; z-index: 2;
  max-width: 940px;
  background: rgba(255, 255, 255, .06);
  border: 3px solid var(--purple);
  border-radius: var(--radius);
  padding: 22px;
}
.game-hud { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.game-level { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--yellow); }
.game-dots { display: flex; gap: 7px; }
.game-dot {
  width: 13px; height: 13px; border-radius: 50%;
  background: rgba(255,255,255,.18); border: 2px solid rgba(255,255,255,.4);
}
.game-dot.now { background: var(--cyan); border-color: var(--cyan); }
.game-dot.done { background: var(--green); border-color: var(--green); }
.game-sound {
  margin-left: auto;
  width: 42px; height: 42px; border-radius: 50%;
  background: none; border: 2px solid rgba(255,255,255,.45);
  font-size: 1.15rem; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.game-sound:hover { transform: scale(1.1); border-color: var(--cyan); }

.game-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }

.game-board-wrap { position: relative; }
.game-board {
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--space);
  border: 3px solid var(--purple); border-radius: 16px;
  overflow: hidden;
}
.game-tile {
  aspect-ratio: 1; display: grid; place-items: center;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  box-shadow: inset 0 0 0 1px rgba(123, 92, 255, .28);
}
.game-tile:nth-child(odd) { background: rgba(123, 92, 255, .08); }
.game-tile.t-start { background: rgba(0, 229, 255, .14); }
.game-tile.t-goal { background: rgba(255, 201, 60, .14); animation: goal-glow 2s ease-in-out infinite; }
@keyframes goal-glow {
  0%, 100% { box-shadow: inset 0 0 0 1px rgba(123,92,255,.28); }
  50% { box-shadow: inset 0 0 0 3px rgba(255, 201, 60, .55); }
}
.tile-star { display: inline-block; transition: transform .3s ease, opacity .3s ease; }
.tile-star.collected { transform: scale(0) rotate(180deg); opacity: 0; }

.game-bot {
  position: absolute; top: 0; left: 0;
  width: calc(100% / 5); aspect-ratio: 1;
  display: grid; place-items: center;
  pointer-events: none; z-index: 2;
  transform: translate(calc(var(--gx, 0) * 100%), calc(var(--gy, 0) * 100%));
  transition: transform .32s cubic-bezier(.3, .9, .4, 1.15);
}
.game-bot svg { width: 76%; height: 76%; filter: drop-shadow(0 3px 4px rgba(0,0,0,.4)); }
.game-bot.crash svg { animation: bot-shake .5s ease; }
@keyframes bot-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-5px) rotate(-14deg); }
  40% { transform: translateX(5px) rotate(11deg); }
  60% { transform: translateX(-4px) rotate(-8deg); }
  80% { transform: translateX(3px) rotate(5deg); }
}
.game-bot.cheer svg { animation: bot-cheer .5s ease 3; }
@keyframes bot-cheer {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-28%) scale(1.15) rotate(-8deg); }
}

.game-msg {
  margin-top: 12px; min-height: 2.7em; text-align: center;
  font-family: var(--font-head); font-weight: 600; font-size: 1.02rem;
  color: var(--cyan);
}

.game-controls-label {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-head); font-weight: 600; color: #fff; margin-bottom: 8px;
}
.game-steps {
  font-family: var(--font-body); font-weight: 800; font-size: .85rem;
  background: rgba(255,255,255,.14); border-radius: 999px; padding: 2px 12px;
}
.game-program {
  display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px;
  min-height: 60px;
  background: rgba(23, 16, 63, .7);
  border: 2px dashed rgba(123, 92, 255, .7); border-radius: 14px;
  padding: 9px; margin-bottom: 8px;
}
.game-program:empty::after {
  content: 'Tap the arrows below to add steps…';
  color: rgba(255,255,255,.45); font-weight: 700; font-size: .9rem;
  align-self: center; padding-left: 6px;
}
.game-chip {
  width: 40px; height: 40px;
  background: #fff; border: 2px solid var(--ink); border-radius: 10px;
  font-size: 1.1rem; cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  touch-action: manipulation;
  transition: transform .12s ease, background .12s ease;
}
.game-chip:hover:not(:disabled) { background: #ffd7e9; transform: translateY(-2px); }
.game-chip.active { outline: 3px solid var(--cyan); transform: translateY(-2px); }
.game-tip { font-size: .85rem; font-weight: 700; color: rgba(255,255,255,.55); margin-bottom: 14px; }

.game-pad {
  display: grid; grid-template-columns: repeat(3, 62px); grid-auto-rows: 62px;
  gap: 10px; justify-content: center; margin-bottom: 18px;
}
.pad-up { grid-column: 2; grid-row: 1; }
.pad-left { grid-column: 1; grid-row: 2; }
.pad-down { grid-column: 2; grid-row: 2; }
.pad-right { grid-column: 3; grid-row: 2; }
.pad-btn {
  font-size: 1.5rem; cursor: pointer;
  background: var(--cyan); border: 3px solid var(--ink); border-radius: 16px;
  box-shadow: 0 4px 0 var(--ink);
  touch-action: manipulation;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.pad-btn:hover:not(:disabled) { background: #4deeff; transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.pad-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.pad-btn:disabled, .game-chip:disabled { opacity: .5; cursor: default; }

.game-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.game-actions .btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: var(--shadow-pop); }

.game-victory {
  position: absolute; inset: 0; z-index: 6;
  display: grid; place-items: center; text-align: center;
  background: rgba(23, 16, 63, .96);
  border: 3px solid var(--yellow); border-radius: 16px;
  padding: 24px;
}
.game-victory[hidden] { display: none; }
.game-victory-title {
  font-family: var(--font-head); font-weight: 700; font-size: 1.55rem;
  color: var(--yellow); margin-bottom: 10px;
}
.game-victory-sub { color: #e9e4ff; margin-bottom: 18px; max-width: 26rem; }
.game-victory-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 980px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-board-wrap { width: 100%; max-width: 430px; margin-inline: auto; }
}

/* ============ SQUADS ============ */
.squad-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-bottom: 42px; }
.squad-card {
  background: #fff; border: 3px solid var(--ink); border-radius: var(--radius);
  border-top: 12px solid var(--accent);
  padding: 30px 26px; text-align: center;
  box-shadow: var(--shadow-pop);
  transition: transform .2s ease, box-shadow .2s ease;
}
.squad-card:hover { transform: translateY(-8px); box-shadow: 0 14px 0 var(--ink); }
.squad-card-mid { transform: scale(1.03); }
.squad-card-mid:hover { transform: scale(1.03) translateY(-8px); }
.squad-emoji { font-size: 2.6rem; margin-bottom: 10px; }
.squad-card h3 { font-size: 1.5rem; margin-bottom: 4px; }
.squad-age {
  display: inline-block; font-weight: 800; font-size: .9rem;
  background: var(--lavender); border-radius: 999px; padding: 4px 14px;
  margin-bottom: 14px; color: var(--ink);
  border: 2px solid var(--accent);
}
.squad-cta { text-align: center; }
.squad-note { margin-top: 14px; font-size: .95rem; color: #5c5487; font-weight: 600; }

/* ============ CAMPS ============ */
.camp-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 460px)); gap: 30px;
  justify-content: center; position: relative; z-index: 2;
}
.camp-card {
  background: #fff; color: var(--ink);
  border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: 0 8px 0 rgba(0,0,0,.35);
  transition: transform .2s ease;
}
.camp-card:hover { transform: translateY(-6px) rotate(.5deg); }
.camp-badge {
  display: inline-block; font-family: var(--font-head); font-weight: 700;
  font-size: .85rem; letter-spacing: 1.5px;
  background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px;
  padding: 4px 14px; margin-bottom: 12px;
}
.camp-badge-pm { background: var(--cyan); }
.camp-card h3 { font-size: 1.7rem; margin-bottom: 14px; }
.camp-facts { list-style: none; margin-bottom: 22px; }
.camp-facts li { padding: 7px 0; font-weight: 700; border-bottom: 2px dashed #e4defc; }
.camp-facts li:last-child { border-bottom: none; }
.camp-smallprint {
  text-align: center; margin-top: 34px; color: #cec4f0; font-size: .95rem;
  max-width: 46rem; margin-inline: auto; position: relative; z-index: 2;
}

/* ============ STATS ============ */
.stats-strip {
  background: var(--pink);
  border-block: 4px solid var(--ink);
  padding: 46px 0 18px;
  color: var(--ink);
  text-align: center;
}
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-num, .stat-plus {
  font-family: var(--font-head); font-weight: 700; font-size: 3rem; color: #fff;
  text-shadow: 3px 3px 0 var(--ink);
}
.stat-label { display: block; font-weight: 800; font-size: .95rem; margin-top: 4px; }
.stats-footnote { margin-top: 18px; font-size: .8rem; font-weight: 700; opacity: .75; }

/* ============ VIDEOS ============ */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.video-card {
  position: relative; border: 3px solid var(--ink); border-radius: 20px;
  overflow: hidden; cursor: pointer; padding: 0; background: var(--space);
  box-shadow: var(--shadow-pop);
  transition: transform .2s ease, box-shadow .2s ease;
  text-align: left;
}
.video-card:hover { transform: translateY(-6px); box-shadow: 0 12px 0 var(--ink); }
.video-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; opacity: .92; }
.video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -70%);
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--pink); color: #fff; border: 3px solid #fff;
  display: grid; place-items: center; font-size: 1.3rem;
  transition: transform .2s cubic-bezier(.2,.9,.3,1.6), background .2s ease;
  padding-left: 4px;
}
.video-card:hover .video-play { transform: translate(-50%, -70%) scale(1.2); background: var(--purple); }
.video-title {
  display: block; padding: 12px 16px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: #fff;
}
.video-cta { text-align: center; margin-top: 40px; }

/* video modal */
.video-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; }
.video-modal[hidden] { display: none; }
.video-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 10, 40, .85); }
.video-modal-box {
  position: relative; width: min(900px, 92vw);
  background: var(--space); border: 3px solid var(--purple); border-radius: 18px;
  padding: 10px; z-index: 1;
}
.video-modal-frame { aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; }
.video-modal-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-modal-close {
  position: absolute; top: -18px; right: -18px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pink); color: #fff; border: 3px solid #fff;
  font-size: 1.1rem; font-weight: 900; cursor: pointer;
  transition: transform .15s ease;
}
.video-modal-close:hover { transform: scale(1.12) rotate(90deg); }

/* ============ PARENTS ============ */
.parent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-bottom: 64px; }
.parent-card {
  background: #fff; border: 3px solid var(--ink); border-radius: 20px;
  padding: 24px 20px; box-shadow: var(--shadow-pop);
  transition: transform .2s ease;
}
.parent-card:hover { transform: translateY(-5px); }
.parent-ico { font-size: 2.2rem; display: block; margin-bottom: 10px; }
.parent-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.parent-card p { font-size: .95rem; }

.faq-heading { font-size: 1.7rem; margin-bottom: 22px; }
.faq { display: grid; gap: 14px; max-width: 780px; }
.faq-item {
  background: #fff; border: 3px solid var(--ink); border-radius: 18px;
  overflow: hidden; box-shadow: 4px 4px 0 var(--ink);
}
.faq-item summary {
  cursor: pointer; list-style: none;
  font-family: var(--font-head); font-weight: 600; font-size: 1.1rem;
  padding: 18px 52px 18px 22px; position: relative;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--yellow); border: 2px solid var(--ink);
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.2rem; line-height: 1;
  transition: transform .25s ease, background .25s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); background: var(--pink); }
.faq-item p { padding: 0 22px 20px; }

/* ============ CONTACT ============ */
.section-contact {
  background:
    radial-gradient(circle at 90% 10%, rgba(123, 92, 255, .16), transparent 40%),
    radial-gradient(circle at 5% 90%, rgba(0, 229, 255, .14), transparent 40%),
    var(--paper);
}
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 54px; align-items: start; }
.contact-details { list-style: none; margin: 6px 0 34px; }
.contact-details li { padding: 8px 0; font-weight: 700; font-size: 1.05rem; }
.contact-details a { color: var(--ink); text-decoration-color: var(--pink); text-decoration-thickness: 2px; }
.contact-details a:hover { color: var(--pink); }

.newsletter {
  background: var(--lavender); border: 3px dashed var(--purple); border-radius: 20px;
  padding: 24px;
}
.newsletter h3 { font-size: 1.25rem; margin-bottom: 6px; }
.newsletter p { font-size: .98rem; margin-bottom: 14px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1; min-width: 200px;
  border: 3px solid var(--ink); border-radius: 999px;
  padding: 12px 18px; font-family: var(--font-body); font-size: 1rem; font-weight: 600;
}

.contact-form {
  background: #fff; border: 3px solid var(--ink); border-radius: var(--radius);
  padding: 34px 30px; box-shadow: 8px 8px 0 var(--purple);
}
.form-row { margin-bottom: 18px; }
.form-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label {
  display: block; font-family: var(--font-head); font-weight: 600;
  margin-bottom: 6px; font-size: 1rem;
}
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; border: 3px solid var(--ink); border-radius: 14px;
  padding: 12px 14px; font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  background: var(--paper);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus,
.newsletter-form input:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 4px rgba(123, 92, 255, .25);
}
.contact-form textarea { resize: vertical; }
.form-note { margin-top: 14px; font-size: .9rem; text-align: center; color: #5c5487; font-weight: 600; }

/* ============ FOOTER ============ */
.footer { background: var(--space); color: #cfc7f2; }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 34px;
  padding-top: 64px; padding-bottom: 44px;
}
.footer-logo {
  font-family: var(--font-head); font-weight: 700; font-size: 2.2rem; color: #fff;
  display: block; margin-bottom: 8px;
}
.dot-orange { color: #ff8a2b; }
.dot-pink { color: #ff4d9d; }
.footer-col h4 {
  color: var(--yellow); font-size: 1.05rem; margin-bottom: 14px;
  text-transform: uppercase; letter-spacing: 1px;
}
.footer-col a {
  display: block; color: #cfc7f2; text-decoration: none;
  padding: 4px 0; font-weight: 700;
}
.footer-col a:hover { color: var(--cyan); }
.footer p { font-size: .95rem; }
.footer-bottom {
  border-top: 2px solid rgba(255,255,255,.12);
  text-align: center; padding: 20px 24px; font-size: .9rem;
}
.footer-binary { color: var(--cyan); cursor: help; letter-spacing: 1px; }

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--purple); border: 3px solid var(--ink);
  display: grid; place-items: center;
  font-size: 1.5rem; text-decoration: none;
  box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none; transform: translateY(20px);
  transition: opacity .3s ease, transform .3s ease;
}
.back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

/* ============ SCROLL REVEAL ============ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.9,.3,1.1); }
.reveal.visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .hero-sub { max-width: 38rem; }
  .hero-ctas { justify-content: center; }
  .card-grid, .video-grid { grid-template-columns: repeat(2, 1fr); }
  .squad-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .squad-card-mid { transform: none; }
  .squad-card-mid:hover { transform: translateY(-8px); }
  .camp-grid { grid-template-columns: 1fr; max-width: 500px; margin-inline: auto; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .parent-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; top: 65px; right: 0; left: 0;
    background: var(--space);
    flex-direction: column; align-items: center; gap: 8px;
    padding: 20px 24px 26px;
    border-bottom: 3px solid var(--purple);
    transform: translateY(-130%); transition: transform .3s ease;
    z-index: 99;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a:not(.btn) { padding: 10px; font-size: 1.15rem; }
  .nav-burger { display: flex; }
}

@media (max-width: 620px) {
  .section { padding: 70px 0; }
  .card-grid, .video-grid, .parent-grid, .form-row-split { grid-template-columns: 1fr; }
  .stats-inner { grid-template-columns: 1fr 1fr; gap: 18px; }
  .stat-num, .stat-plus { font-size: 2.3rem; }
  .hero { padding-top: 50px; }
  .speech-bubble { right: 50%; transform: translateX(50%) translateY(10px) scale(.9); }
  .speech-bubble.show { transform: translateX(50%) translateY(0) scale(1); }
  .speech-bubble::after { left: 50%; margin-left: -8px; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line { opacity: 1; transform: none; }
}
