/* Zazoo Studios site — logo direction A (Toybox). One stylesheet for all pages.
   The font is the games' own Baloo 2; for the live site, copy the font file
   next to this stylesheet and shorten the path. */
@font-face {
  font-family: "Baloo 2";
  src: url("../fonts/Baloo2-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --cream: #fff8ea; --sand: #f4ead2; --edge: #e7d6b0;
  --ink: #22304a; --slate: #5b6578; --night: #1a2438;
  --tomato: #e84a2f; --tangerine: #ff9a1f; --sun: #ffd84d; --lime: #9cc43b; --pool: #2f80d1;
  --coral: #ff7a59; --bee: #ffd84d; --hen: #c23b22; --sea: #13707f; --sky: #8fd3f4;
  --accent: var(--pool);            /* each game page sets its own */
  --accent-ink: #fff8ea;
  --display: "Baloo 2", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Baloo 2", ui-rounded, -apple-system, system-ui, "Segoe UI", Roboto,
    "Noto Sans", "Noto Sans Arabic", "Noto Sans Hebrew", "Noto Sans Devanagari",
    "Hiragino Sans", "PingFang SC", "Apple SD Gothic Neo", sans-serif;
  --r: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 18px/1.55 var(--body); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0 0 .4em; }
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 800; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0 0 .8em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { padding: 56px 0; }
.muted { color: var(--slate); }

/* ---- Header ---- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 248, 234, .94); backdrop-filter: blur(8px); border-bottom: 2px solid var(--edge); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 68px; }
.logo { display: block; width: 118px; flex: none; }
.logo svg { display: block; width: 100%; height: auto; }
.top nav { display: flex; gap: 18px; margin-inline-start: auto; font-weight: 700; }
.top nav a { text-decoration: none; }
.top nav a:hover { color: var(--pool); }
.lang { font: 600 15px var(--body); color: var(--ink); background: #fff; border: 2px solid var(--edge); border-radius: 12px; padding: 6px 10px; max-width: 150px; }
@media (max-width: 640px) { .top nav { display: none; } .lang { margin-inline-start: auto; } }

/* ---- Buttons ---- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font: 800 18px var(--display); text-decoration: none; border: 0; cursor: pointer; }
.btn.buy { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 #c99a12; }
.btn.ghost { background: #fff; border: 2px solid var(--edge); }

/* ---- Hero ---- */
.hero { padding: 48px 0 32px; }
.hero .wrap { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .hero .wrap { grid-template-columns: 1fr 1.15fr; } }
.kicker { display: inline-block; font: 800 15px var(--display); letter-spacing: .06em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.lead { font-size: 21px; color: var(--slate); max-width: 34em; }
.shot { border-radius: var(--r); overflow: hidden; border: 3px solid #fff; box-shadow: 0 10px 30px rgba(34, 48, 74, .16); background: var(--sand); }
.shot img { width: 100%; height: auto; }

/* ---- Point grid (why) ---- */
.points { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.point { background: #fff; border: 2px solid var(--edge); border-radius: var(--r); padding: 20px; }
.point .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; margin-bottom: 10px; }
.point h3 { margin-bottom: .2em; }
.point p { margin: 0; color: var(--slate); }

/* ---- Levels ---- */
.levels { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.level { border-radius: var(--r); padding: 18px 20px; border: 2px solid var(--edge); background: #fff; }
.level .age { font: 800 14px var(--display); color: var(--slate); }
.level h3 { margin: 2px 0 8px; }
.level dl { margin: 0; display: grid; gap: 6px; }
.level dt { font: 700 13px var(--display); text-transform: uppercase; letter-spacing: .05em; color: var(--slate); }
.level dd { margin: 0 0 4px; }
.level.l1 { background: #ffe3f1; } .level.l2 { background: #dcf8e8; } .level.l3 { background: #dcefff; } .level.l4 { background: #ece3ff; }

/* ---- Game cards ---- */
.games { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.game { display: block; text-decoration: none; background: #fff; border: 2px solid var(--edge); border-radius: var(--r); overflow: hidden; }
.game:hover { border-color: var(--g, var(--pool)); }
.game img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.game .body { padding: 14px 18px 18px; }
.game .tag { font: 800 13px var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--g, var(--pool)); }
.game h3 { margin: 2px 0 4px; }
.game p { margin: 0; color: var(--slate); }
.game .price { display: block; margin-top: 10px; font-weight: 800; }

/* ---- Game page: shots, feature, strip ---- */
.shots { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.shots figure { margin: 0; }
.shots figcaption { font-size: 15px; color: var(--slate); margin-top: 8px; }
.feature { background: var(--accent); color: var(--accent-ink); border-radius: 28px; padding: 32px; }
.feature p { max-width: 42em; }
.feature .say { font: 800 22px var(--display); }
.strip { display: flex; flex-wrap: wrap; gap: 10px; }
.strip a { text-decoration: none; background: #fff; border: 2px solid var(--edge); border-radius: 999px; padding: 6px 14px; font-weight: 700; }
.list { margin: 0; padding-inline-start: 1.2em; }
.list li { margin-bottom: 6px; }
.split { display: grid; gap: 24px; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } }

/* ---- Footer ---- */
footer { background: var(--night); color: var(--cream); padding: 36px 0 48px; margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
footer a { color: var(--sun); }
footer small { color: #aab3c4; }

/* ---- Translation placeholders ----
   A line with no translation yet shows the English, marked, so the pages
   double as the to-do list for the copy team. */
.i18n-todo { outline: 2px dashed var(--tangerine); outline-offset: 2px; border-radius: 4px; }
.todo-bar { background: var(--tangerine); color: var(--ink); font-weight: 700; text-align: center; padding: 8px 16px; font-size: 15px; }
.todo-bar[hidden] { display: none; }
.placeholder { background: repeating-linear-gradient(45deg, #fff, #fff 10px, var(--sand) 10px, var(--sand) 20px); border: 2px dashed var(--edge); border-radius: var(--r); display: grid; place-items: center; min-height: 220px; color: var(--slate); font-weight: 700; text-align: center; padding: 16px; }

/* ---- Review table (?review) ---- */
.review { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
.review th, .review td { border: 1px solid var(--edge); padding: 6px 8px; vertical-align: top; text-align: start; }
.review .miss { color: var(--tomato); font-weight: 700; }
.review .ok { color: var(--sea); }

[dir="rtl"] .btn, [dir="rtl"] .strip a { direction: rtl; }

/* ---- Level cards (the game's band picker, ui.css .bui-band) ---- */
#levels h3 { margin: 40px 0 0; }

/* ---- How it works: the equation row ---- */
.equation { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1.4fr; align-items: center; gap: 14px; margin-top: 24px; }
.step-label { font: 800 15px var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--slate); margin-bottom: 6px; }
.term { font: 700 clamp(22px, 2.6vw, 30px)/1.2 var(--display); color: var(--ink); }
.op { font: 800 clamp(40px, 5vw, 56px)/1 var(--display); color: var(--ink); }
@media (max-width: 760px) { .equation { grid-template-columns: 1fr; gap: 10px; } .op { text-align: left; } }
.band-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
@media (max-width: 820px) { .band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .band-grid { grid-template-columns: 1fr; } }
.band { --tint: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 200px; padding: 16px 14px 20px; border-radius: 30px; border: 4px solid #fff; background: linear-gradient(180deg, #fff 0%, var(--tint) 100%); color: #4a3410; text-align: center; box-shadow: 0 6px 0 rgba(120, 90, 20, .18); }
.band-name { font-weight: 800; font-size: 22px; line-height: 1.15; color: #8a5a00; }
.band-ages { font-weight: 800; font-size: 15px; padding: 0 12px; border-radius: 999px; background: #fff; color: #7a6438; box-shadow: 0 2px 0 rgba(120, 90, 20, .18); }
.band-pyramid { display: flex; flex-direction: column; align-items: center; gap: 3px; margin: 4px 0; }
.pyr-row { display: flex; gap: 4px; }
.pyr-sq { width: 12px; height: 12px; border-radius: 4px; border: 2.5px solid #7a6438; background: transparent; }
.pyr-sq.on { background: #8a5a00; border-color: #8a5a00; }
.band-desc { font-weight: 600; font-size: 15px; line-height: 1.28; color: #7a6438; }

/* ---- Living-room scene (assets/scene.js) ---- */
.smooth-limb { transition: all 0.28s cubic-bezier(0.34, 1.45, 0.64, 1); }
@keyframes dashFlow { to { stroke-dashoffset: -48; } }
.animate-dash-flow { animation: dashFlow 1.2s linear infinite; }
@keyframes dashFlowReverse { to { stroke-dashoffset: 48; } }
.animate-dash-reverse { animation: dashFlowReverse 1.1s linear infinite; }
