/* MushroomSquad tester landing — matches the Squad game-UI style spec
   (docs/superpowers/specs/2026-07-15-game-ui-style-spec.md). Light-only. */

/* ---------- Fonts (self-hosted, no external requests) ---------- */
@font-face {
  font-family: "Baloo 2";
  src: url("fonts/Baloo2-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("fonts/Baloo2-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("fonts/Nunito-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --canvas: #FBF3E2;
  --surface: #FFFDF6;
  --ink: #4A3B2A;
  --ink-soft: #786B56;
  --border: #E8DCC3;
  --primary: #A3C940;
  --primary-deep: #7FA32C;
  --hero: #6C5BB9;
  --info: #5B8DEF;
  --accent: #E8607A;
  --serious-surface: #F4EEE4;
  --serious-accent: #AD513D;

  /* Baloo 2 / Nunito carry no CJK or Hangul glyphs — per-locale system
     fallbacks, switched via :lang() below. */
  --cjk-fallback: sans-serif;
  --display-font: "Baloo 2", var(--cjk-fallback);
  --body-font: "Nunito", var(--cjk-fallback);
}
:root:lang(ja) {
  --cjk-fallback: "Hiragino Maru Gothic ProN", "Yu Gothic Medium", "Meiryo", sans-serif;
}
:root:lang(zh-Hant) {
  --cjk-fallback: "PingFang TC", "Microsoft JhengHei", sans-serif;
}
:root:lang(ko) {
  --cjk-fallback: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 32px; /* screen gutter 16 */
}

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

/* Darker than --info: the outline needs >=3:1 (WCAG 1.4.11) on canvas and
   surface; #3D6FD4 is ~4.2:1 on #FBF3E2 and ~4.6:1 on #FFFDF6. */
:focus-visible {
  outline: 3px solid #3D6FD4;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Type roles ---------- */
.hero-title {
  font-family: var(--display-font);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.card-title {
  font-family: var(--display-font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
}
.body-text { font-size: 16px; color: var(--ink); }
.body-secondary { font-size: 14px; color: var(--ink-soft); }
.caption { font-size: 12px; color: var(--ink-soft); }

/* ---------- Language switcher ---------- */
.lang-switch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 8px 0 16px;
}
.lang-pill {
  font-family: var(--display-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}
.lang-pill[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary-deep);
}
.lang-pill:active { transform: scale(0.96); }
/* JS-off: the switcher can't do anything, so hide it. script.js removes this. */
html.no-js .lang-switch { display: none; }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 8px 0 24px;
}
.hero-art {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 8px;
}
.shroom-left { transform: rotate(-8deg); }
.shroom-right { transform: rotate(8deg); }
.tagline {
  font-size: 16px;
  color: var(--ink);
  max-width: 32em;
  margin: 4px auto 12px;
}
.badge {
  display: inline-block;
  font-family: var(--display-font);
  font-size: 14px;
  font-weight: 600;
  color: var(--surface);
  background: var(--hero);
  border-radius: 999px;
  padding: 4px 14px;
}

/* ---------- Cards ("stacked paper") ---------- */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 24px;
  padding: 16px;
  box-shadow: 0 4px 0 rgba(74, 59, 42, 0.14); /* hard offset, no blur */
  margin-bottom: 16px; /* card gap 12 + shadow height 4 */
}

.intro-card .card-title { margin-bottom: 8px; }

/* ---------- Step cards ---------- */
.steps {
  list-style: none;
  counter-reset: step;
}
.step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.step-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary);
  border: 2px solid var(--primary-deep);
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.step .body-secondary { margin-bottom: 12px; }
.step-note { margin-bottom: 0; }

/* ---------- Pill buttons (game-feel press) ---------- */
.pill {
  display: inline-block;
  font-family: var(--display-font);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  border-radius: 999px;
  padding: 10px 20px;
}
.pill-primary {
  color: var(--ink);
  background: var(--primary);
  border: 2px solid var(--primary-deep);
  box-shadow: 0 3px 0 var(--primary-deep); /* bottom edge */
  transition: transform 150ms, box-shadow 150ms;
}
.pill-primary:active {
  transform: translateY(3px) scale(0.98); /* edge collapses on press */
  box-shadow: 0 0 0 var(--primary-deep);
}
@media (max-width: 480px) {
  .pill { display: block; } /* full-width tap target on phones */
}

/* ---------- Serious register (still, muted, body font only) ---------- */
.serious-card {
  background: var(--serious-surface);
}
.serious-title {
  font-family: var(--body-font); /* serious copy never uses the display face */
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--serious-accent);
  margin-bottom: 8px;
}
.serious-card .body-secondary { margin-bottom: 0; }
.serious-card:active,
.serious-card * { transition: none !important; animation: none !important; }

/* ---------- Troubleshooting ---------- */
.trouble {
  padding: 4px 16px 0;
}
.trouble-summary {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 4px 0;
}
.trouble[open] .trouble-summary { margin-bottom: 4px; }
.trouble .body-secondary { padding-bottom: 8px; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 2px solid var(--border);
  text-align: center;
}
.footer .caption { margin-bottom: 8px; }
.footer a { color: var(--ink-soft); }
.dot { padding: 0 4px; }
