/* Mezza Kids — design system for the hub and every non-game page.
   Games use shared/arcade.css (full-screen, no scrolling). This file is for pages that scroll.
   Tokens come from the Mezza visual identity guide plus one lemon yellow. */
:root {
  --purple: #54274c;
  --plum: #3b1735;
  --ink: #2a1026;
  --lpurple: #825474;
  --green: #90993d;
  --green-deep: #6e7630;
  --tan: #c49a6c;
  --tan-deep: #9e7548;
  --cream: #ede7e1;
  --cream-deep: #d9cfc3;
  --grey: #d1ced2;
  --lemon: #f2c94c;
  --red: #c8553d;
  --display: "League Gothic", Impact, "Arial Narrow", Oswald, sans-serif;
  --body: "Zilla Slab", Archer, Rockwell, Georgia, serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --radius: 20px;
  --shadow: 0 6px 0 var(--ink);
  --col: 520px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--purple); }
body {
  margin: 0; min-height: 100vh; background: var(--purple); color: var(--cream);
  font-family: var(--body); font-size: 17px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img, svg, canvas { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--lemon); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pixel starfield + faint scanlines, the same backdrop the games use */
.backdrop {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(var(--cream) 1.2px, transparent 1.6px), radial-gradient(var(--cream) 1px, transparent 1.4px);
  background-size: 64px 64px, 96px 96px; background-position: 0 0, 32px 48px; opacity: 0.14;
}
.backdrop::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 3px, rgba(0,0,0,0.10) 3px 4px); }
.page { position: relative; z-index: 1; width: min(var(--col), 100%); margin: 0 auto; padding: calc(var(--safe-top) + 18px) 20px calc(var(--safe-bottom) + 28px); }

/* Type */
.display { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.02em; line-height: 0.9; }
.title {
  font-family: var(--display); text-transform: uppercase; line-height: 0.86; color: var(--cream); text-align: center;
  text-shadow: 4px 4px 0 var(--tan), 7px 7px 0 var(--ink); white-space: nowrap;
}
.label { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); font-weight: 600; }
.lede { color: var(--cream-deep); font-size: 19px; text-align: center; line-height: 1.4; }
.lede b { color: var(--lemon); font-weight: 600; }
.muted { color: var(--grey); }

/* Header: wordmark left, small tag right */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark svg { width: 38px; height: 38px; }
.wordmark span { font-family: var(--display); font-size: 30px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; color: var(--cream); }
.wordmark span b { color: var(--lemon); font-weight: 400; }
.env-tag { background: var(--lemon); color: var(--ink); border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.env-tag[hidden] { display: none; }

/* Hero: EAT. PLAY. LEARN. */
.hero { text-align: center; padding: 28px 0 6px; }
.hero .title { font-size: min(88px, 21vw); }
.hero .title .dot { color: var(--lemon); text-shadow: 4px 4px 0 var(--tan-deep), 7px 7px 0 var(--ink); }
.hero .title .w2 { color: var(--lemon); }
.hero .title .w3 { color: var(--tan); text-shadow: 4px 4px 0 var(--lpurple), 7px 7px 0 var(--ink); }
.hero .lede { margin: 22px auto 0; max-width: 34ch; }
.ingredients { display: flex; justify-content: center; gap: 10px; margin: 26px 0 6px; }
.ingredients span { width: 52px; height: 52px; display: block; }
.ingredients span svg { width: 100%; height: 100%; }
@keyframes slant-in {
  0% { transform: translateX(-60px) skewX(-14deg); opacity: 0; }
  60% { transform: translateX(6px) skewX(-6deg); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.title-word { display: block; animation: slant-in 0.55s cubic-bezier(.2,.9,.3,1.2) both; }
.title-word:nth-child(2) { animation-delay: 0.10s; }
.title-word:nth-child(3) { animation-delay: 0.20s; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-6px); } }
.ingredients span:nth-child(odd) { animation: bob 1.6s ease-in-out infinite alternate; }
.ingredients span:nth-child(even) { animation: bob 1.6s ease-in-out 0.8s infinite alternate; }
@media (prefers-reduced-motion: reduce) { .title-word, .ingredients span { animation: none; } }

/* Sections */
.section { margin-top: 34px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 0 2px; }
.section-head h2 { font-family: var(--display); font-size: 40px; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; color: var(--cream); }
.section-head h2 .dot { color: var(--lemon); }
.section-head .label { text-align: right; }

/* Game cards */
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.card {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: var(--radius);
  background: var(--plum); box-shadow: var(--shadow); text-decoration: none; color: inherit;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
a.card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.card .art {
  flex: none; width: 96px; height: 96px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
  background: var(--purple); overflow: hidden;
}
.card .art svg, .card .art canvas { width: 72px; height: 72px; }
.card.art-green .art { background: var(--green-deep); }
.card.art-tan .art { background: var(--tan-deep); }
.card.art-lemon .art { background: var(--lemon); }
.card.art-red .art { background: var(--red); }
.card.art-lpurple .art { background: var(--lpurple); }
.card .body { min-width: 0; flex: 1; }
.card h3 { font-family: var(--display); font-size: 36px; text-transform: uppercase; letter-spacing: 0.02em; line-height: 0.9; color: var(--cream); }
.card p { margin-top: 6px; font-size: 16px; color: var(--cream-deep); line-height: 1.3; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 10px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--grey); }
.card .meta .play { color: var(--lemon); }
.card .badge {
  position: absolute; top: -10px; right: 14px; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: var(--lemon); color: var(--ink);
}
.card.soon { box-shadow: inset 0 0 0 3px var(--lpurple); background: transparent; padding: 12px 14px; gap: 12px; }
.card.soon .art { background: var(--plum); width: 64px; height: 64px; border-radius: 16px; }
.card.soon .art svg { width: 48px; height: 48px; opacity: 0.75; }
.card.soon h3 { color: var(--grey); font-size: 28px; }
.card.soon p { font-size: 14px; margin-top: 3px; }
.card.soon .meta { margin-top: 6px; }
.card.soon .badge { background: var(--lpurple); color: var(--cream); top: -9px; right: 12px; }
.soon-head { margin: 22px 0 10px; }
.card .go {
  flex: none; width: 44px; height: 44px; border-radius: 14px; background: var(--green); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 0 var(--ink);
}
.card .go svg { width: 22px; height: 22px; }
.card .go.locked { background: transparent; box-shadow: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 200px; height: 62px; padding: 0 26px; border-radius: 16px;
  font-family: var(--display); font-size: 34px; text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none;
  box-shadow: var(--shadow); transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn-primary { background: var(--green); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 3px var(--lpurple); height: 50px; font-size: 24px; }
.btn-ghost:active { transform: none; box-shadow: inset 0 0 0 3px var(--cream); }

/* Learn teaser */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { border-radius: 16px; background: var(--plum); padding: 14px 10px 12px; text-align: center; box-shadow: inset 0 0 0 3px var(--plum); }
.tile .ico { width: 40px; height: 40px; margin: 0 auto 8px; }
.tile .ico svg { width: 100%; height: 100%; }
.tile h3 { font-family: var(--display); font-size: 22px; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; color: var(--cream); }
.tile p { margin-top: 6px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--grey); }

/* Promise strip + footer */
.promise {
  margin-top: 34px; padding: 18px 20px; border-radius: var(--radius); background: var(--plum); border-top: 4px solid var(--tan);
  display: flex; gap: 16px; align-items: flex-start;
}
.promise .ico { flex: none; width: 44px; height: 44px; }
.promise .ico svg { width: 100%; height: 100%; }
.promise h3 { font-family: var(--display); font-size: 26px; text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; }
.promise p { margin-top: 6px; font-size: 15px; color: var(--cream-deep); line-height: 1.4; }
.promise a { color: var(--lemon); text-decoration-thickness: 2px; text-underline-offset: 3px; }
footer { margin-top: 30px; text-align: center; color: var(--grey); font-size: 13px; line-height: 1.6; }
footer .eat { font-family: var(--display); font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--cream); line-height: 1; margin-bottom: 8px; }
footer .eat b { color: var(--lemon); font-weight: 400; }
footer a { color: var(--cream-deep); }

/* Stand-alone message pages (404) */
.center { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; }
.center .title { font-size: min(110px, 26vw); }
