/* ============================================================
   CHIMPANZEE redesign stylesheet
   Three directions driven by [data-direction] on .app:
     midnight  (dark, premium)
     daylight  (light, Apple-marketing)
     editorial (warm cream + serif display)
   Accent passed via --accent (curated swatches).
   Per-game tint passed via --game inline on a scope.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }

:root {
  --accent: oklch(0.68 0.15 35);
  --maxw: 1200px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Direction: MIDNIGHT ---------- */
.app[data-direction="midnight"] {
  --bg: oklch(0.16 0.008 265);
  --bg-2: oklch(0.19 0.01 265);
  --surface: oklch(0.21 0.012 265);
  --surface-2: oklch(0.245 0.014 265);
  --border: oklch(1 0 0 / 0.10);
  --border-strong: oklch(1 0 0 / 0.18);
  --text: oklch(0.97 0.005 265);
  --text-2: oklch(0.72 0.01 265);
  /* 0.63 keeps this the faintest tier while clearing WCAG AA (4.5:1) for small
     text on bg / surface / surface-2. 0.55 fell short at ~3.3-4.0:1. */
  --text-3: oklch(0.63 0.01 265);
  --ink-on-accent: oklch(0.16 0.01 265);
  --shadow: 0 24px 60px -24px oklch(0 0 0 / 0.7);
  --shadow-sm: 0 4px 18px -8px oklch(0 0 0 / 0.6);
  --card-radius: 24px;
  --glass: oklch(0.2 0.01 265 / 0.6);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --display-weight: 700;
  --display-spacing: -0.03em;
  --hero-veil: oklch(0.16 0.008 265 / 0.0);
}

/* ---------- Direction: DAYLIGHT ---------- */
.app[data-direction="daylight"] {
  --bg: oklch(0.99 0.003 95);
  --bg-2: oklch(0.965 0.004 95);
  --surface: oklch(1 0 0);
  --surface-2: oklch(0.975 0.004 95);
  --border: oklch(0.2 0.01 265 / 0.10);
  --border-strong: oklch(0.2 0.01 265 / 0.16);
  --text: oklch(0.22 0.012 265);
  --text-2: oklch(0.46 0.01 265);
  --text-3: oklch(0.62 0.008 265);
  --ink-on-accent: oklch(1 0 0);
  --shadow: 0 30px 70px -30px oklch(0.3 0.02 265 / 0.28);
  --shadow-sm: 0 8px 26px -14px oklch(0.3 0.02 265 / 0.25);
  --card-radius: 24px;
  --glass: oklch(1 0 0 / 0.72);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --display-weight: 700;
  --display-spacing: -0.03em;
  --hero-veil: oklch(1 0 0 / 0.0);
}

/* ---------- Direction: EDITORIAL ---------- */
.app[data-direction="editorial"] {
  --bg: oklch(0.965 0.012 85);
  --bg-2: oklch(0.94 0.016 80);
  --surface: oklch(0.985 0.01 85);
  --surface-2: oklch(0.95 0.014 82);
  --border: oklch(0.35 0.03 60 / 0.16);
  --border-strong: oklch(0.35 0.03 60 / 0.28);
  --text: oklch(0.26 0.02 55);
  --text-2: oklch(0.46 0.025 55);
  --text-3: oklch(0.6 0.02 55);
  --ink-on-accent: oklch(0.99 0.01 85);
  --shadow: 0 30px 70px -32px oklch(0.4 0.04 60 / 0.3);
  --shadow-sm: 0 10px 28px -16px oklch(0.4 0.04 60 / 0.28);
  --card-radius: 18px;
  --glass: oklch(0.965 0.012 85 / 0.78);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --display-weight: 500;
  --display-spacing: -0.01em;
  --hero-veil: oklch(0.965 0.012 85 / 0.0);
}

/* ---------- Density ---------- */
.app[data-density="compact"] { --section-pad: 64px; --gap: 20px; }
.app[data-density="regular"] { --section-pad: 104px; --gap: 28px; }
.app[data-density="comfy"]   { --section-pad: 144px; --gap: 36px; }

/* ---------- Base ---------- */
.app {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
  overflow-x: clip;
}
.app :where(a) { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.wrap-wide { max-width: 1360px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-spacing); margin: 0; line-height: 1.05; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-spacing);
  line-height: 1.02;
  font-size: clamp(40px, 6.4vw, 84px);
}
.app[data-direction="editorial"] .display { font-weight: 500; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.app[data-direction="editorial"] .eyebrow { letter-spacing: 0.22em; }

.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--text-2); line-height: 1.55; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-size: 16px; font-weight: 600;
  padding: 14px 24px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-accent { background: var(--accent); color: var(--ink-on-accent); box-shadow: 0 10px 30px -12px var(--accent); }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -14px var(--accent); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--text-3); }
.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover { transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 14px; }

/* App Store badge (built, not hand-drawn art) */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 11px 20px 11px 18px; border-radius: 14px;
  background: var(--text); color: var(--bg);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  box-shadow: var(--shadow-sm);
}
.appstore:hover { transform: translateY(-2px); }
.appstore .apple { font-size: 26px; line-height: 1; margin-top: -3px; }
.appstore .as-txt { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.appstore .as-txt small { font-size: 10px; font-weight: 500; opacity: 0.8; letter-spacing: 0.02em; }
.appstore .as-txt strong { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: var(--glass);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a, .nav-links button { font-size: 15px; color: var(--text-2); font-weight: 500; transition: color 0.2s; background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; }
.nav-links a:hover, .nav-links button:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; }
.app[data-direction="editorial"] .brand { font-weight: 600; }
.brand-logo { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex: none; box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.15); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), oklch(from var(--accent) calc(l - 0.12) c calc(h + 28)));
  display: grid; place-items: center; color: var(--ink-on-accent);
  font-weight: 800; font-size: 16px; font-family: var(--font-body);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.3);
}

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section-pad { padding-block: var(--section-pad); }
.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head .display, .section-head h2 { font-size: clamp(30px, 3.8vw, 52px); }
.section-head .lead { margin-top: 18px; }
.alt-bg { background: var(--bg-2); }

/* ---------- HERO (new release) ---------- */
.hero { position: relative; overflow: hidden; padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(40px, 6vw, 88px); }
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 120%;
  background:
    radial-gradient(60% 70% at 78% 30%, oklch(from var(--game, var(--accent)) 0.62 0.17 h / 0.32), transparent 70%),
    radial-gradient(50% 60% at 18% 80%, oklch(from var(--game, var(--accent)) 0.62 0.17 h / 0.16), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero-copy { max-width: 560px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 72px); margin-top: 22px; }
.hero .lead { margin-top: 22px; max-width: 480px; }
.hero-cta { margin-top: 34px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.hero-meta { margin-top: 26px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; color: var(--text-2); font-size: 14px; }
.hero-stage { position: relative; display: grid; place-items: center; min-height: 540px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border-strong);
  font-size: 13px; font-weight: 600; color: var(--text);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px oklch(from var(--accent) l c h / 0.2); }

/* hero layout variant: centered */
.app[data-hero="centered"] .hero-grid { grid-template-columns: 1fr; text-align: center; justify-items: center; }
.app[data-hero="centered"] .hero-copy { max-width: 740px; }
.app[data-hero="centered"] .hero .lead { margin-left: auto; margin-right: auto; }
.app[data-hero="centered"] .hero-cta, .app[data-hero="centered"] .hero-meta { justify-content: center; }
.app[data-hero="centered"] .hero-stage { margin-top: 36px; min-height: 0; }

/* ---------- Phone frame ---------- */
.phone {
  position: relative;
  width: var(--pw, 280px);
  aspect-ratio: 9 / 19.5;
  border-radius: calc(var(--pw, 280px) * 0.155);
  background: linear-gradient(160deg, oklch(0.28 0.01 265), oklch(0.12 0.005 265));
  padding: calc(var(--pw, 280px) * 0.032);
  box-shadow: var(--shadow), inset 0 0 0 2px oklch(1 0 0 / 0.06);
}
.phone-screen {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  border-radius: calc(var(--pw, 280px) * 0.125);
  background: var(--scr, oklch(0.3 0.05 35));
  display: flex; flex-direction: column; isolation: isolate;
}
.phone-island {
  position: absolute; top: calc(var(--pw, 280px) * 0.03); left: 50%; transform: translateX(-50%);
  width: 32%; height: calc(var(--pw, 280px) * 0.05); border-radius: 999px;
  background: oklch(0 0 0 / 0.82); z-index: 5;
}
/* placeholder screenshot inside the screen */
.scr-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center; z-index: 1;
}
.scr-iconimg {
  width: calc(var(--pw, 280px) * 0.2); aspect-ratio: 1; border-radius: 24%;
  box-shadow: 0 8px 20px -8px oklch(0 0 0 / 0.5);
}
.scr-fill {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(135deg, oklch(1 0 0 / 0.06) 0 12px, transparent 12px 24px),
    linear-gradient(165deg, oklch(from var(--game, var(--accent)) 0.55 0.16 h), oklch(from var(--game, var(--accent)) 0.34 0.12 h));
}
.scr-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; letter-spacing: 0.02em; color: oklch(1 0 0 / 0.92);
  background: linear-gradient(to top, oklch(0 0 0 / 0.55), transparent);
  display: flex; align-items: center; gap: 7px;
}
.scr-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: oklch(1 0 0 / 0.9); }
.scr-top {
  position: absolute; top: calc(var(--pw, 280px) * 0.09); left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0 20px;
}
.scr-icon {
  width: calc(var(--pw, 280px) * 0.2); aspect-ratio: 1; border-radius: 24%;
  background: linear-gradient(150deg, oklch(1 0 0 / 0.95), oklch(1 0 0 / 0.7));
  display: grid; place-items: center; color: oklch(from var(--game, var(--accent)) 0.45 0.16 h);
  font-weight: 800; font-size: calc(var(--pw, 280px) * 0.09); font-family: var(--font-body);
  box-shadow: 0 8px 20px -8px oklch(0 0 0 / 0.5);
}
.scr-name { color: oklch(1 0 0 / 0.96); font-weight: 700; font-size: calc(var(--pw, 280px) * 0.05); letter-spacing: -0.01em; }

/* ---------- App icon (real artwork or squircle placeholder) ---------- */
.appicon-img {
  flex: none; border-radius: 23%; object-fit: cover;
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.12), var(--shadow-sm);
}
.appicon {
  position: relative; flex: none;
  width: var(--s, 64px); height: var(--s, 64px);
  border-radius: 23%;
  background: linear-gradient(150deg, oklch(from var(--game, var(--accent)) 0.66 0.16 h), oklch(from var(--game, var(--accent)) 0.42 0.13 h));
  display: grid; place-items: center;
  color: oklch(1 0 0 / 0.96);
  font-family: var(--font-body); font-weight: 800;
  font-size: calc(var(--s, 64px) * 0.4); letter-spacing: -0.02em;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.35), var(--shadow-sm);
  overflow: hidden;
}
.appicon::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(125deg, oklch(1 0 0 / 0.07) 0 8px, transparent 8px 18px);
  mix-blend-mode: overlay;
}

/* ---------- Trust strip ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--border); border-radius: var(--card-radius); overflow: hidden; background: var(--border); }
.trust > div { background: var(--bg); padding: 26px 24px; }
.trust b { display: block; font-family: var(--font-display); font-weight: var(--display-weight); font-size: 17px; letter-spacing: -0.01em; }
.trust span { font-size: 14px; color: var(--text-2); margin-top: 4px; display: block; }
.trust .ico { width: 22px; height: 22px; margin-bottom: 14px; color: var(--accent); }

/* ---------- Catalog grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.app[data-density="compact"] .cat-grid { grid-template-columns: repeat(4, 1fr); }
.gcard {
  position: relative; text-align: left; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--card-radius); padding: 22px;
  display: flex; flex-direction: column; gap: 16px;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  overflow: hidden;
}
.gcard:hover { transform: translateY(-6px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.gcard-top { display: flex; align-items: center; gap: 15px; }
.gcard-titles { min-width: 0; }
.gcard h3 { font-size: 19px; letter-spacing: -0.02em; }
.gcard .cat { font-size: 12.5px; color: var(--text-3); font-weight: 600; letter-spacing: 0.02em; margin-top: 3px; }
.gcard p { font-size: 14.5px; color: var(--text-2); line-height: 1.45; flex: 1; }
.gcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.newtag { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.getbtn { font-size: 13px; font-weight: 700; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.getbtn svg { width: 16px; height: 16px; }
.gcard:hover .getbtn .arrow { transform: translateX(4px); }

/* ---------- Stars ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--accent); }
.stars.gold { color: oklch(0.78 0.15 75); }
.stars svg { width: 15px; height: 15px; }
.rating-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.rating-inline b { color: var(--text); font-weight: 700; }

/* ---------- Ratings band + reviews ---------- */
.ratings-hero { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: center; }
.bignum { display: inline-flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(60px, 8vw, 104px); line-height: 0.9; letter-spacing: -0.04em; white-space: nowrap; }
.bignum span { font-size: 0.4em; color: var(--text-3); }
.review-rail { display: flex; gap: var(--gap); overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.review-rail::-webkit-scrollbar { display: none; }
.rcard {
  flex: 0 0 clamp(290px, 30vw, 380px); scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--card-radius); padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.rcard .quote { font-family: var(--font-display); font-weight: var(--display-weight); font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; flex: 1; }
.app[data-direction="editorial"] .rcard .quote { font-style: italic; font-weight: 500; }
.rcard-foot { display: flex; align-items: center; gap: 12px; }
.rcard-foot .who { font-size: 13.5px; }
.rcard-foot .who b { display: block; font-weight: 600; }
.rcard-foot .who span { color: var(--text-3); font-size: 12px; }
.realtag { margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--border); padding: 4px 8px; border-radius: 999px; }
.rail-nav { display: flex; gap: 10px; }
.rail-nav button {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); color: var(--text);
  display: grid; place-items: center; transition: background 0.2s, transform 0.2s;
}
.rail-nav button:hover { background: var(--surface-2); }
.rail-nav button:active { transform: scale(0.92); }

/* ---------- Why Chimpanzee ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.pillar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-radius); padding: 32px; }
.pillar .pico { width: 30px; height: 30px; color: var(--accent); margin-bottom: 20px; }
.pillar h3 { font-size: 21px; letter-spacing: -0.02em; }
.pillar p { margin-top: 12px; color: var(--text-2); font-size: 15.5px; line-height: 1.5; }
.maker {
  background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--card-radius) + 6px);
  padding: clamp(32px, 5vw, 64px); display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.maker blockquote { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(22px, 2.6vw, 32px); line-height: 1.25; letter-spacing: -0.02em; }
.app[data-direction="editorial"] .maker blockquote { font-weight: 500; }
.maker .sig { margin-top: 24px; display: flex; align-items: center; gap: 14px; }
.maker .sig .who b { display: block; }
.maker .sig .who span { color: var(--text-3); font-size: 14px; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: calc(var(--card-radius) + 8px); padding: clamp(48px, 7vw, 92px); text-align: center; background: var(--surface); border: 1px solid var(--border); }
.cta-band .glow2 { position: absolute; inset: 0; background: radial-gradient(60% 120% at 50% 0%, oklch(from var(--accent) l c h / 0.22), transparent 70%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(32px, 4.6vw, 60px); }
.cta-band .lead { margin: 20px auto 34px; max-width: 560px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--border); padding-block: 64px 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; margin-bottom: 48px; }
.foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); margin: 0 0 18px; font-family: var(--font-body); font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.foot ul a, .foot ul button { color: var(--text-2); font-size: 15px; transition: color 0.2s; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit; text-align: left; }
.foot ul a:hover, .foot ul button:hover { color: var(--text); }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 28px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 13.5px; flex-wrap: wrap; }
.foot-blurb { color: var(--text-2); font-size: 15px; line-height: 1.55; max-width: 300px; margin-top: 16px; }

/* ---------- Game detail page ---------- */
.gp-hero { position: relative; overflow: hidden; padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(40px, 6vw, 72px); }
.gp-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 0.85fr; gap: 56px; align-items: center; }
.gp-back { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; font-weight: 500; cursor: pointer; margin-bottom: 28px; transition: color 0.2s, gap 0.2s; background: none; border: 0; padding: 0; font-family: inherit; }
.gp-back:hover { color: var(--text); gap: 12px; }
.gp-head { display: flex; align-items: center; gap: 20px; }
.gp-head h1 { font-size: clamp(34px, 4.6vw, 58px); }
.gp-cat { font-size: 14px; color: var(--text-3); font-weight: 600; margin-top: 6px; }
.gp-tag { font-size: clamp(20px, 2.4vw, 28px); font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: -0.02em; margin-top: 26px; line-height: 1.2; }
.app[data-direction="editorial"] .gp-tag { font-weight: 500; }
.gp-desc { margin-top: 20px; font-size: 17px; color: var(--text-2); line-height: 1.6; max-width: 520px; }
.gp-cta { margin-top: 32px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.gp-stage { display: grid; place-items: center; }
/* When a game has no real App Store screenshots, the phone is omitted and the
   hero runs as a single column instead of leaving an empty right-hand slot. */
.gp-grid-solo { grid-template-columns: 1fr; }
.gp-grid-solo > div { max-width: 760px; }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feat {
  display: flex; align-items: flex-start; gap: 14px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
}
.feat .ck { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: oklch(from var(--game, var(--accent)) 0.66 0.16 h / 0.16); color: oklch(from var(--game, var(--accent)) 0.6 0.16 h); margin-top: 1px; }
.app[data-direction="midnight"] .feat .ck { color: oklch(from var(--game, var(--accent)) 0.78 0.14 h); }
.feat span { font-size: 15.5px; line-height: 1.4; }
.morelist { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }

/* ---------- Legal pages ---------- */
.legal { padding-block: clamp(40px, 6vw, 72px) clamp(64px, 8vw, 110px); }
.legal .wrap { max-width: 1080px; }
.legal-head { max-width: 760px; padding-bottom: 40px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.legal-head h1 { font-size: clamp(36px, 5vw, 60px); margin-top: 16px; }
.legal-eff { margin-top: 14px; color: var(--text-3); font-size: 14px; font-weight: 500; }
.legal-intro { margin-top: 22px; font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; color: var(--text-2); }
.legal-body { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; padding-top: 48px; }
.legal-toc { position: sticky; top: 88px; }
.legal-toc h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); margin: 0 0 16px; font-family: var(--font-body); font-weight: 600; }
.legal-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.legal-toc a, .legal-toc button { color: var(--text-2); font-size: 14px; line-height: 1.35; cursor: pointer; transition: color 0.2s; display: block; background: none; border: 0; padding: 0; font-family: inherit; text-align: left; width: 100%; }
.legal-toc a:hover, .legal-toc button:hover { color: var(--accent); }
.legal-content { max-width: 720px; }
.legal-sec { margin-bottom: 40px; scroll-margin-top: 88px; }
.legal-sec h2 { font-size: clamp(21px, 2.2vw, 26px); letter-spacing: -0.02em; margin-bottom: 16px; }
.legal-content p { font-size: 16px; line-height: 1.65; color: var(--text-2); margin-bottom: 14px; }
.legal-content p:last-child { margin-bottom: 0; }
.legal-sub { color: var(--text); font-weight: 600; }
.legal-list { margin: 4px 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.legal-list li { position: relative; padding-left: 24px; font-size: 16px; line-height: 1.6; color: var(--text-2); }
.legal-list li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.legal-content a { color: var(--accent); font-weight: 500; }
.legal-content a:hover { text-decoration: underline; }
.legal-foot-note { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--border); }
.legal-foot-note p { font-size: 15px; }

@media (max-width: 820px) {
  .legal-body { grid-template-columns: 1fr; gap: 32px; }
  .legal-toc { position: static; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--card-radius); }
  .legal-toc ul { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
}

/* ---------- entrance ---------- */
/* Base state is VISIBLE so content is never stuck hidden (print, reduced-motion,
   slow capture, or React wiping an imperatively-added class). Animation plays only
   when .in is added and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .reveal.in { animation: revealIn 0.7s var(--ease) both; }
  @keyframes revealIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .gp-grid, .ratings-hero, .maker { grid-template-columns: 1fr; }
  .hero-stage { min-height: 0; margin-top: 30px; }
  .hero-copy { max-width: none; }
  .cat-grid, .app[data-density="compact"] .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: 1fr; }
  .trust { grid-template-columns: repeat(2, 1fr); }
  .gallery, .morelist { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .wrap, .wrap-wide { padding: 0 18px; }
  .cat-grid, .app[data-density="compact"] .cat-grid, .feat-grid { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr 1fr; }
  .hero-cta, .gp-cta { width: 100%; }
}

/* ============================================================
   Accessibility: focus visibility, skip link, motion
   ============================================================ */

/* Visible keyboard focus for every interactive element. Pointer users don't
   see it (:focus-visible), keyboard users always do (WCAG 2.4.7). */
:where(.app) :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* On accent-filled controls the accent outline would disappear; switch to the
   ink color that already contrasts against the accent. */
.btn-accent:focus-visible { outline-color: var(--ink-on-accent); }
/* Containers focused only as a scroll/skip target shouldn't show a ring. */
.app [tabindex="-1"]:focus { outline: none; }

/* Skip link: parked off-screen until focused, then slides into view. */
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  transform: translateY(-160%);
  background: var(--accent); color: var(--ink-on-accent);
  padding: 12px 18px; border-radius: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; outline: 2px solid var(--ink-on-accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  /* Kill CSS transitions/animations for users who ask for less motion. The
     programmatic scrolls are already gated in JS via scrollBehavior(). */
  .app *, .skip-link { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
