/* =========================================================
   DREAMSPARK ACADEMY — standalone brand system
   Warm, friendly kids-academy identity (not the Chicle dark system).
   Reuses demo.js for nav scroll / burger / reveal / lightbox.
   ========================================================= */

:root {
  /* Palette */
  --bg:        #FFF7EF;   /* warm cream page */
  --surface:   #FFFFFF;
  --surface-2: #FFFCFA;
  --ink:       #221F2E;   /* primary text (deep plum-black) */
  --muted:     #6E6678;
  --line:      rgba(34,31,46,0.10);
  --coral:     #FF6B4A;   /* primary */
  --coral-d:   #E84A2B;
  --sun:       #FFC23D;   /* secondary */
  --sun-d:     #F0A91E;
  --sky:       #34B7E0;   /* accent */
  --mint:      #21BFA0;

  --on-coral:  #FFFFFF;
  --on-sun:    #221F2E;

  /* Type */
  --display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --body: "Nunito", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shape / motion */
  --r-lg: 30px;
  --r-md: 20px;
  --r-sm: 14px;
  --shadow:    0 18px 44px rgba(34,31,46,0.12);
  --shadow-sm: 0 8px 22px rgba(34,31,46,0.08);
  --shadow-coral: 0 14px 34px rgba(255,107,74,0.32);
  --ease-stick: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.05; letter-spacing: -0.01em; }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.skip-link { position: fixed; top: -120px; left: 16px; z-index: 300; background: var(--coral); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 800; transition: top .2s var(--ease-out); }
.skip-link:focus { top: 16px; }

/* ---------- Spark mark ---------- */
.ds-mark { color: var(--coral); flex: none; transition: transform .5s var(--ease-stick); }
.nav-logo:hover .ds-mark, .footer-logo:hover .ds-mark { transform: scale(1.15) rotate(12deg); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 1rem; padding: 13px 26px; border-radius: 999px; border: 0; transition: transform .35s var(--ease-stick), background-color .25s, color .25s, box-shadow .25s; will-change: transform; }
.btn-lg { padding: 16px 32px; font-size: 1.08rem; }
.btn-block { width: 100%; padding: 16px; font-size: 1.08rem; }
.btn-cta { background: var(--coral); color: var(--on-coral); box-shadow: var(--shadow-coral); }
.btn-cta:hover { background: var(--coral-d); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); }
.btn-lime { background: var(--sun); color: var(--on-sun); box-shadow: 0 12px 30px rgba(255,194,61,0.30); }
.btn-lime:hover { background: var(--sun-d); }

/* ---------- Nav ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 0; transition: background-color .35s, box-shadow .35s, padding .35s, border-color .35s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(255,247,239,0.82); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); padding: 10px 0; box-shadow: var(--shadow-sm); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); display: flex; align-items: center; gap: 18px; }
.nav-logo { display: inline-flex; align-items: center; gap: 10px; }
.wordmark { font-family: var(--display); font-weight: 800; font-size: 1.5rem; letter-spacing: -0.01em; color: var(--ink); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font-weight: 700; font-size: 1rem; color: var(--muted); position: relative; padding: 6px 0; transition: color .25s; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--coral); border-radius: 999px; transition: width .3s var(--ease-out); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }
.nav-cta { padding: 11px 22px; }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; margin-left: auto; }
.nav-burger span { width: 26px; height: 3px; background: var(--ink); border-radius: 3px; transition: transform .3s, opacity .3s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.nav-mobile { display: none; flex-direction: column; gap: 6px; padding: 0 var(--pad); max-height: 0; overflow: hidden; transition: max-height .35s var(--ease-out), padding .35s; background: rgba(255,247,239,0.98); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-mobile.open { max-height: 520px; padding: 14px var(--pad) 22px; }
.nav-mobile a { padding: 12px 4px; font-weight: 700; color: var(--muted); }
.nav-mobile a.btn-cta { color: #fff; margin-top: 8px; justify-content: center; }

/* ---------- Layout ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(64px, 10vw, 130px) var(--pad); }
.section--tight { padding-top: clamp(40px,6vw,70px); padding-bottom: clamp(40px,6vw,70px); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 6vw, 60px); }
.kicker { font-weight: 800; text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.8rem; color: var(--coral); margin-bottom: 16px; }
.kicker-sun { color: var(--sun-d); }
.section-head h2 { font-size: clamp(2.2rem, 6vw, 4rem); color: var(--ink); }
.lead { color: var(--muted); font-size: 1.14rem; margin-top: 18px; max-width: 580px; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 150px var(--pad) 90px; overflow: hidden; background: radial-gradient(120% 90% at 85% 0%, rgba(255,194,61,0.18), transparent 55%), radial-gradient(90% 80% at 5% 100%, rgba(52,183,224,0.14), transparent 55%), var(--bg); }
.hero-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(40% 36% at 78% 18%, rgba(255,107,74,0.14), transparent 70%); }
.hero-grid { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px,5vw,70px); align-items: center; }
.eyebrow { display: inline-block; font-weight: 700; color: var(--coral-d); letter-spacing: 0.04em; font-size: 0.98rem; margin-bottom: 22px; padding: 8px 18px; border: 1.5px solid rgba(255,107,74,0.35); border-radius: 999px; background: rgba(255,107,74,0.06); }
.hero-title { font-size: clamp(3rem, 9vw, 6.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 0.96; color: var(--ink); }
.hero-title em { font-style: normal; color: var(--coral); position: relative; }
.hero-title em::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.06em; height: 0.14em; background: var(--sun); border-radius: 999px; transform: scaleX(0); transform-origin: left; animation: underline-pop 1s var(--ease-stick) .6s forwards; }
@keyframes underline-pop { to { transform: scaleX(1); } }
.hero-sub { margin: 28px 0 0; max-width: 540px; color: var(--muted); font-size: clamp(1.05rem,2.2vw,1.28rem); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.hero-media { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; }
.hero-media .badge { position: absolute; top: 16px; left: 16px; z-index: 3; background: rgba(255,247,239,0.85); backdrop-filter: blur(8px); color: var(--coral-d); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line); }

/* ---------- Stat strip ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 30px; }
.stat { border: 1px solid var(--line); border-radius: var(--r-md); padding: 26px 22px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .45s var(--ease-stick), border-color .3s; }
.stat:hover { transform: translateY(-6px); border-color: rgba(255,107,74,0.5); }
.stat-num { display: block; font-family: var(--display); font-weight: 800; font-size: clamp(2.2rem,5vw,3.2rem); color: var(--coral); letter-spacing: -0.02em; line-height: 1; }
.stat-label { display: block; margin-top: 10px; color: var(--muted); font-weight: 700; font-size: 0.92rem; }

/* ---------- Cards / bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px 26px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm); transition: transform .45s var(--ease-stick), border-color .3s, box-shadow .3s; will-change: transform; }
.card:hover { transform: translateY(-6px); border-color: rgba(255,107,74,0.5); box-shadow: var(--shadow); }
.card-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--coral); background: rgba(255,107,74,0.12); margin-bottom: 4px; transition: transform .5s var(--ease-stick); }
.card-icon svg { width: 28px; height: 28px; }
.card:hover .card-icon { transform: scale(1.12) rotate(-6deg); background: rgba(255,107,74,0.18); }
.card h3 { font-size: 1.4rem; color: var(--ink); }
.card p { color: var(--muted); font-size: 1rem; }
.card-tag { margin-top: auto; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 800; color: var(--sky); padding-top: 8px; }

/* ---------- Age tabs ---------- */
.age-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 30px; }
.age-tabs button { background: var(--surface); border: 2px solid var(--line); color: var(--ink); padding: 12px 24px; border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 1rem; transition: background-color .25s, color .25s, border-color .3s, transform .3s var(--ease-stick); }
.age-tabs button:hover { border-color: var(--coral); color: var(--coral); transform: translateY(-2px); }
.age-tabs button[aria-selected="true"] { background: var(--coral); color: #fff; border-color: var(--coral); box-shadow: var(--shadow-coral); }
.band { display: none; grid-template-columns: 0.92fr 1.08fr; gap: clamp(22px,4vw,52px); align-items: start; }
.band.active { display: grid; }
.band-media { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.band-media img { width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.band-media .chip { position: absolute; top: 14px; left: 14px; background: rgba(255,247,239,0.88); color: var(--coral-d); font-size: 0.78rem; font-weight: 800; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); }
.band-cards { display: grid; gap: 14px; }
.band-cards .card { background: var(--surface); }
.band-cards .card h3 { font-size: 1.3rem; }
.band-cards .card .age-note { color: var(--sun-d); font-weight: 800; font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Center finder (search-first) ---------- */
.finder { max-width: 760px; }
.finder input { width: 100%; font: inherit; font-weight: 700; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-md); padding: 17px 20px; transition: border-color .25s, box-shadow .25s; }
.finder input::placeholder { color: #b3a9b6; font-weight: 600; }
.finder input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 4px rgba(52,183,224,0.16); }
.finder-hint { color: var(--muted); margin: 12px 2px 0; font-size: 0.95rem; font-weight: 600; }
.finder-results { margin-top: 18px; display: grid; gap: 12px; }
.center { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease-stick), border-color .3s; }
.center:hover { transform: translateY(-3px); border-color: rgba(52,183,224,0.5); }
.center .c-name { font-family: var(--display); font-size: 1.4rem; color: var(--ink); font-weight: 700; }
.center .c-prov { color: var(--muted); font-weight: 600; font-size: 0.92rem; }
.center .c-go { background: var(--sky); color: #fff; font-weight: 800; padding: 10px 18px; border-radius: 999px; font-size: 0.9rem; transition: background-color .25s; }
.center .c-go:hover { background: #1f9ec4; }
.finder-empty { color: var(--muted); padding: 26px 2px; font-weight: 600; }

/* ---------- Split (franchise) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px,5vw,64px); align-items: center; }
.split .band-media { border-radius: var(--r-lg); }
.split h2 { font-size: clamp(2rem,4.5vw,3.4rem); color: var(--ink); }

/* ---------- Trial form ---------- */
.trial-form { max-width: 640px; display: grid; gap: 16px; }
.trial-form label { display: block; font-size: 0.85rem; font-weight: 800; letter-spacing: 0.04em; color: var(--muted); }
.trial-form input, .trial-form select, .trial-form textarea { width: 100%; font: inherit; font-weight: 600; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--r-sm); padding: 13px 15px; transition: border-color .25s, box-shadow .25s; }
.trial-form input:focus, .trial-form select:focus, .trial-form textarea:focus { outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255,107,74,0.15); }
.trial-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.trial-success { display: none; background: linear-gradient(160deg, var(--sky), #1f9ec4); color: #fff; border-radius: var(--r-md); padding: 28px; font-weight: 700; box-shadow: 0 16px 40px rgba(52,183,224,0.30); }
.trial-success strong { display: block; font-family: var(--display); font-size: 1.8rem; margin-bottom: 6px; }
.trial-success span { font-weight: 800; }

/* ---------- Gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 44px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); cursor: zoom-in; box-shadow: var(--shadow-sm); transition: transform .4s var(--ease-stick), border-color .3s; }
.gallery img:hover { transform: scale(1.04); border-color: rgba(255,107,74,0.5); }
.lightbox { position: fixed; inset: 0; z-index: 400; background: rgba(20,18,26,0.92); display: none; place-items: center; padding: 24px; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--r-md); box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.lightbox .lb-close { position: absolute; top: 22px; right: 26px; background: var(--sun); color: var(--ink); border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 1.4rem; font-weight: 800; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--line); background: var(--surface-2); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 56px var(--pad) 48px; display: grid; gap: 22px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-logo { display: inline-flex; align-items: center; gap: 10px; }
.footer-logo .wordmark { font-size: 1.35rem; }
.footer-cta { display: inline-flex; }
.footer-tag { color: var(--muted); font-size: 1.05rem; font-weight: 600; }
.footer-tag a { color: var(--coral); font-weight: 800; }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--muted); font-weight: 700; }
.footer-links a:hover { color: var(--ink); }
.footer-copy { color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); padding-top: 20px; font-weight: 600; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-mobile { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-media img { aspect-ratio: 16/10; }
  .bento, .gallery { grid-template-columns: repeat(2, 1fr); }
  .band { grid-template-columns: 1fr; }
  .band-media { order: -1; }
  .band-media img { aspect-ratio: 16/10; }
  .split { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .bento, .gallery, .stats-strip { grid-template-columns: 1fr; }
  .trial-form .row2 { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero-title em::after { transform: scaleX(1); }
}
