/*
  DODO STORYLAND — STYLES
  Visual design only. You usually won't need to edit this file —
  see content.js for text/links and MAINTENANCE.md for common changes.

  No external fonts or libraries are loaded here on purpose, so the
  site works fully offline and never depends on any outside service.
*/

/*
  COLOR SYSTEM — chosen after looking at how the biggest kids' brands use
  color (PBS Kids' confident green/blue, Paw Patrol's punchy primaries,
  Bluey's harmonized-not-garish palette) plus basic color psychology:
  a warm cream "storybook page" background reads cozy to adults instead
  of a generic pale wash, a deep indigo ink feels a little more premium
  than a light tint, and every accent is pushed to a fuller, more
  confident saturation so the page has energy without turning neon.
*/
:root{
  --bg:#FFF6E8;
  --surface:#FFFFFF;
  --surface-alt:#FFE9C7;
  --ink:#221342;
  --ink-soft:#5B4C7A;
  --coral:#FF5247;
  --coral-ink:#C0231A;
  --green:#189E64;
  --purple:#7A46E0;
  --gold:#FFC22E;
  --blue:#1595DE;
  --line:rgba(34,19,66,0.12);
  --shadow:0 14px 30px -16px rgba(34,19,66,0.38);
  color-scheme: light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#160F2E;
    --surface:#241A47;
    --surface-alt:#2E2154;
    --ink:#FBF2E2;
    --ink-soft:#CDBEE9;
    --coral:#FF7B66;
    --coral-ink:#FFD3C4;
    --green:#3DD494;
    --purple:#B08CF0;
    --gold:#FFD666;
    --blue:#5FC4FF;
    --line:rgba(251,242,226,0.16);
    --shadow:0 14px 30px -16px rgba(0,0,0,0.55);
    color-scheme: dark;
  }
}

*{ box-sizing:border-box; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  /* System font stack: looks native everywhere, loads instantly,
     and never depends on an internet connection or third-party CDN. */
  font-family: "Segoe UI", "Trebuchet MS", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  font-weight:800;
  text-wrap:balance;
  margin:0;
}
a{ color:inherit; }
.wrap{ max-width:1120px; margin:0 auto; padding:0 24px; }
img{ max-width:100%; }

nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:20px 0; flex-wrap:wrap;
}
.logo{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:1.4rem; }
.logo-mark{ height:56px; width:auto; display:block; flex-shrink:0; }
/* Visually hidden but still readable by screen readers / search engines —
   the logo image above already carries the "Dodo Storyland" wordmark. */
.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;
}
.nav-links{ display:flex; gap:28px; list-style:none; padding:0; margin:0; font-weight:700; font-size:0.95rem; }
.nav-links a{ text-decoration:none; opacity:0.85; }
.nav-links a:hover, .nav-links a:focus-visible{ opacity:1; text-decoration:underline; text-underline-offset:4px; }

.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 22px; border-radius:999px; font-weight:800; font-size:0.95rem;
  text-decoration:none; border:2px solid transparent; cursor:pointer;
  transition:transform .15s ease, box-shadow .15s ease;
}
.btn:focus-visible{ outline:3px solid var(--blue); outline-offset:2px; }
/* A chunkier, "pressable badge" feel (borrowed from how PBS Kids and
   other kids' sites build their buttons) — a solid color ledge under the
   button via box-shadow, no layout shift, that lifts slightly on hover. */
.btn-primary{ background:var(--coral); color:#fff; box-shadow:0 4px 0 var(--coral-ink), var(--shadow); }
.btn-primary:hover{ transform:translateY(-2px); box-shadow:0 6px 0 var(--coral-ink), var(--shadow); }
.btn-ghost{ background:transparent; border-color:var(--line); color:var(--ink); box-shadow:0 4px 0 var(--line); }
.btn-ghost:hover{ border-color:var(--ink-soft); transform:translateY(-2px); }
.btn-sm{ padding:9px 16px; font-size:0.85rem; }
.btn[disabled], .btn.is-disabled{ opacity:0.55; cursor:default; pointer-events:none; }

.hero{ padding:48px 0 64px; display:grid; grid-template-columns:1.1fr 0.9fr; gap:40px; align-items:center; }
.eyebrow{
  display:inline-flex; align-items:center; gap:8px; font-weight:800; font-size:0.75rem;
  letter-spacing:0.08em; text-transform:uppercase; color:var(--coral-ink);
  background:color-mix(in srgb, var(--coral) 14%, transparent);
  padding:6px 14px; border-radius:999px; margin-bottom:18px;
}
.hero h1{ font-size:clamp(2.4rem,5.2vw,3.8rem); line-height:1.05; }
.hero h1 .accent{ color:var(--coral); }
.hero p{ font-size:1.15rem; color:var(--ink-soft); max-width:46ch; margin:18px 0 28px; line-height:1.55; }
.hero-ctas{ display:flex; gap:14px; flex-wrap:wrap; }

/* A bold, saturated backdrop (rather than a pale card with faint tints)
   is the single biggest lever from looking at PBS Kids / Kids World Fun:
   both put real color behind the hero art, not just around it. */
.hero-art{
  position:relative; aspect-ratio:1/0.95; border-radius:32px;
  background:linear-gradient(135deg, var(--purple), var(--blue) 58%, var(--coral));
  box-shadow:var(--shadow);
  overflow:hidden; display:flex; align-items:center; justify-content:center;
}
.hero-art::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(circle at 20% 18%, color-mix(in srgb, var(--gold) 65%, transparent), transparent 42%),
    radial-gradient(circle at 82% 78%, color-mix(in srgb, #fff 30%, transparent), transparent 48%);
}
.hero-crew{ position:relative; display:flex; gap:14px; flex-wrap:wrap; justify-content:center; padding:20px; }
.hero-crew .avatar-frame{ animation:bob 4.5s ease-in-out infinite; cursor:pointer; transition:transform .2s ease; }
.hero-crew .avatar-frame:hover{ transform:scale(1.08); }
.hero-crew .avatar-frame:nth-child(2){ animation-delay:.5s; }
.hero-crew .avatar-frame:nth-child(3){ animation-delay:1s; }
.hero-crew .avatar-frame:nth-child(4){ animation-delay:1.5s; }
@keyframes bob{ 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(-8px);} }
@media (prefers-reduced-motion:reduce){ .hero-crew .avatar-frame{ animation:none; } }

section{ padding:56px 0; }
.section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:32px; flex-wrap:wrap; }
.section-head h2{ font-size:clamp(1.6rem,3vw,2.1rem); }
.section-head p{ color:var(--ink-soft); margin:6px 0 0; max-width:52ch; }

.reveal{ opacity:0; transform:translateY(18px); transition:opacity .6s ease, transform .6s ease; }
.reveal.is-visible{ opacity:1; transform:translateY(0); }
@media (prefers-reduced-motion:reduce){ .reveal{ opacity:1; transform:none; transition:none; } }

.crew-row{ display:grid; grid-template-columns:repeat(5,1fr); gap:18px; }
.crew-card{
  background:var(--surface); border:1px solid var(--line); border-radius:20px;
  padding:20px 16px; text-align:center; display:flex; flex-direction:column; align-items:center; gap:10px;
  cursor:pointer; position:relative; transition:transform .2s ease, box-shadow .2s ease;
  /* Each card's own accent color gets a thicker top edge — a quick
     "badge" identity per character, the same idea as PBS Kids color-
     coding each show. */
  border-top-width:4px; border-top-color:var(--accent, var(--line));
}
.crew-card:hover, .crew-card:focus-visible{
  transform:translateY(-4px);
  box-shadow:0 18px 32px -16px color-mix(in srgb, var(--accent, var(--ink)) 55%, transparent);
  outline:none;
}
.crew-card.bounced .avatar-frame{ animation:crew-pop .5s ease; }
@keyframes crew-pop{
  0%{ transform:scale(1) rotate(0deg); }
  35%{ transform:scale(1.18) rotate(-6deg); }
  65%{ transform:scale(0.94) rotate(4deg); }
  100%{ transform:scale(1) rotate(0deg); }
}
@media (prefers-reduced-motion:reduce){ .crew-card.bounced .avatar-frame{ animation:none; } }
/* .avatar-frame is the fixed-size circular window; .avatar (the img or
   placeholder svg) fills it. Splitting them like this is what lets a
   photo be zoomed/panned (via --zoom and object-position, both optional,
   set per-character in content.js) without the circle itself changing
   size or overlapping neighboring cards. */
/* --accent is set inline per character (from their "color" in content.js)
   so every avatar gets its own two-tone ring — a white inner ring so the
   photo edge stays clean, then a color ring that's that character's own
   badge color. That's what gives each crew member visual personality
   instead of every card looking identical apart from the photo. */
.avatar-frame{
  width:76px; height:76px; border-radius:50%; overflow:hidden; display:block; background:var(--surface);
  box-shadow:0 0 0 3px var(--surface), 0 0 0 6px var(--accent, var(--line));
}
.avatar{ width:100%; height:100%; display:block; object-fit:cover; transform:scale(var(--zoom,1)); transform-origin:50% 50%; }
.crew-card h3{ font-size:1.05rem; }
/* Blended toward --ink rather than the raw accent: a couple of crew
   colors (Sunny's yellow, for one) are too light to read as text on
   their own, but still read as "that character's color" once darkened. */
.crew-tag{ font-size:0.78rem; font-weight:800; color:color-mix(in srgb, var(--accent, var(--ink-soft)) 60%, var(--ink) 40%); }
.age-pill{ font-size:0.7rem; font-weight:800; letter-spacing:0.03em; background:var(--surface-alt); padding:3px 10px; border-radius:999px; color:var(--ink-soft); }

.speech-bubble{
  position:absolute; top:6px; left:50%; transform:translate(-50%,-14px) scale(0.85);
  background:var(--surface); border:1px solid var(--line); padding:6px 12px; border-radius:999px;
  font-weight:700; font-size:0.85rem; white-space:nowrap; opacity:0; pointer-events:none;
  box-shadow:var(--shadow); transition:opacity .18s ease, transform .18s ease; z-index:2;
}
.speech-bubble.show{ opacity:1; transform:translate(-50%,-30px) scale(1); }

.quiz-card{ background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:32px; box-shadow:var(--shadow); max-width:720px; margin:0 auto; }
.quiz-progress{ display:flex; gap:8px; justify-content:center; margin-bottom:24px; }
.quiz-progress .dot{ width:10px; height:10px; border-radius:50%; background:var(--line); transition:background .2s ease; }
.quiz-progress .dot.active{ background:var(--coral); }
.quiz-progress .dot.done{ background:var(--green); }
.quiz-question h3{ font-size:1.3rem; text-align:center; margin:0 0 20px; text-wrap:balance; }
.quiz-options{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.quiz-option{
  display:flex; align-items:center; gap:10px; padding:16px 18px; border-radius:16px; border:2px solid var(--line);
  background:var(--bg); font-weight:700; font-size:1rem; cursor:pointer; text-align:left; color:var(--ink);
  transition:transform .15s ease, border-color .15s ease;
}
.quiz-option:hover, .quiz-option:focus-visible{ border-color:var(--coral); transform:translateY(-2px); outline:none; }
.quiz-result{ text-align:center; }
.quiz-result .avatar-frame{ width:110px; height:110px; margin:0 auto 16px; }
.quiz-result h3{ font-size:1.6rem; margin:0 0 8px; }
.quiz-result p{ color:var(--ink-soft); max-width:44ch; margin:0 auto 24px; }
.quiz-result-actions{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

.episode{ display:grid; grid-template-columns:220px 1fr auto; gap:24px; align-items:center; background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:20px; box-shadow:var(--shadow); }
.episode-thumb{
  position:relative; aspect-ratio:16/9; border-radius:14px;
  background:linear-gradient(140deg,var(--blue),var(--purple));
  display:flex; flex-direction:column; align-items:flex-start; justify-content:flex-end;
  color:#fff; padding:14px; gap:8px; overflow:hidden;
}
/* Real crew faces peeking into the corner read as an actual episode
   still rather than a text label sitting on an empty gradient. */
.episode-thumb-cast{ display:flex; }
.episode-thumb-cast .avatar-frame{ width:42px; height:42px; margin-right:-14px; box-shadow:0 0 0 3px #fff; }
.episode-thumb-title{ font-weight:800; font-size:0.9rem; text-align:left; text-shadow:0 2px 6px rgba(0,0,0,0.35); }
.episode-eyebrow{ font-size:0.75rem; font-weight:800; letter-spacing:0.06em; text-transform:uppercase; color:var(--green); }
.episode h3{ font-size:1.3rem; margin:6px 0 8px; }
.episode p{ color:var(--ink-soft); margin:0; max-width:52ch; }

.shop-grid{ display:grid; grid-template-columns:1.1fr 0.9fr; gap:22px; }
.product{ background:var(--surface); border:1px solid var(--line); border-radius:24px; padding:26px; display:flex; flex-direction:column; gap:14px; position:relative; box-shadow:var(--shadow); }
.product-badge{ position:absolute; top:20px; right:20px; font-size:0.7rem; font-weight:800; letter-spacing:0.04em; text-transform:uppercase; padding:5px 12px; border-radius:999px; }
.badge-loved{ background:color-mix(in srgb, var(--coral) 16%, transparent); color:var(--coral-ink); }
.badge-start{ background:color-mix(in srgb, var(--green) 18%, transparent); color:var(--green); }
.product-visual{ aspect-ratio:16/10; border-radius:16px; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:1.1rem; text-align:center; padding:16px; }
.visual-kit{ background:linear-gradient(150deg,var(--gold),var(--coral)); color:#fff; }
.visual-color{ background:linear-gradient(150deg,var(--green),var(--blue)); color:#fff; }
.product h3{ font-size:1.25rem; }
.product p{ color:var(--ink-soft); margin:0; font-size:0.95rem; line-height:1.5; }
.price-row{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; }
.price{ font-weight:800; font-size:1.4rem; }

/* Affiliate picks: each card just frames whatever embed snippet Amazon/
   Flipkart's own affiliate tool provided — we only add the card edges,
   not the product content itself. */
.picks-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:18px; }
.pick-card{
  position:relative; background:var(--surface); border:1px solid var(--line); border-radius:18px;
  padding:14px; box-shadow:var(--shadow); overflow:hidden;
  display:flex; align-items:center; justify-content:center; min-height:220px;
}
.pick-platform{
  position:absolute; top:12px; left:12px; font-size:0.68rem; font-weight:800; letter-spacing:0.04em;
  text-transform:uppercase; background:var(--surface-alt); color:var(--ink-soft); padding:4px 10px; border-radius:999px;
}

.banner{ background:linear-gradient(120deg, var(--surface-alt), var(--surface)); border:1px solid var(--line); border-radius:28px; padding:40px; display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; }
.banner h2{ font-size:clamp(1.4rem,2.6vw,1.9rem); max-width:32ch; }
.banner p{ color:var(--ink-soft); margin:8px 0 0; max-width:44ch; }

footer{ border-top:1px solid var(--line); padding:36px 0 40px; }
.footer-row{ display:flex; justify-content:space-between; align-items:center; gap:16px; flex-wrap:wrap; }
.social{ display:flex; gap:14px; }
.social a{ width:40px; height:40px; border-radius:50%; background:var(--surface-alt); border:1px solid var(--line); display:flex; align-items:center; justify-content:center; text-decoration:none; }
.foot-note{ color:var(--ink-soft); font-size:0.85rem; margin-top:18px; }

@media (max-width:860px){
  .hero{ grid-template-columns:1fr; }
  .hero-art{ order:-1; }
  .crew-row{ grid-template-columns:repeat(3,1fr); }
  .episode{ grid-template-columns:1fr; }
  .shop-grid{ grid-template-columns:1fr; }
  .nav-links{ order:3; width:100%; justify-content:center; }
}
@media (max-width:560px){
  .quiz-options{ grid-template-columns:1fr; }
  .quiz-card{ padding:22px; }
}
@media (max-width:520px){
  .crew-row{ grid-template-columns:repeat(2,1fr); }
}
