/* ==========================================================================
   Rakun Interactive — studio design system
   Editorial palette with light + dark themes. Light tokens live on :root,
   dark tokens are redefined for the system preference and for an explicit
   [data-theme="dark"] choice. Each game adds one solid accent via [data-game].
   Motion is wired through data attributes in js/site.js and respects
   prefers-reduced-motion.
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f5f2ec;
  --bg-2: #ece8e0;
  --surface: #fbfaf7;
  --surface-2: #f1ede5;
  --line: rgba(28, 25, 23, 0.1);
  --line-strong: rgba(28, 25, 23, 0.2);
  --text: #1c1917;
  --text-2: #57534e;
  --text-3: #8a847c;
  --ink: #1c1917;
  --paper: #fbfaf7;

  --accent: #c2255c;
  --accent-soft: rgba(194, 37, 92, 0.1);
  --accent-ink: #ffffff;

  --ok: #15803d;
  --live: #b45309;
  --plan: #a8a29e;

  --shadow: 0 1px 2px rgba(28, 25, 23, 0.06), 0 12px 32px -18px rgba(28, 25, 23, 0.25);

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* page-level copies of the theme text/line tokens, computed on :root so they follow the active theme.
     Used by panels (the header Games menu) that sit inside areas which override --text for key art. */
  --page-text: var(--text);
  --page-text-2: var(--text-2);
  --page-text-3: var(--text-3);
  --page-line: var(--line);
  --page-line-strong: var(--line-strong);
}
[data-game="psl2"] { --accent: #c2255c; --accent-soft: rgba(194, 37, 92, 0.1); }
[data-game="psl"]  { --accent: #c2410c; --accent-soft: rgba(194, 65, 12, 0.1); }
[data-game="msl"]  { --accent: #15803d; --accent-soft: rgba(21, 128, 61, 0.1); }
[data-game="mb"]   { --accent: #b0197a; --accent-soft: rgba(176, 25, 122, 0.1); }
[data-game="hb"]   { --accent: #0057e6; --accent-soft: rgba(0, 87, 230, 0.1); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #131315;
    --bg-2: #18181b;
    --surface: #1c1c1f;
    --surface-2: #232326;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --text: #ecebe8;
    --text-2: #a8a6a1;
    --text-3: #75736e;
    --ink: #ecebe8;
    --paper: #131315;
    --ok: #4ade80;
    --live: #f5b945;
    --plan: #5f5d59;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.7);
  }
  :root:not([data-theme="light"]) [data-game="psl2"], :root:not([data-theme="light"])[data-game="psl2"] { --accent: #f0689a; --accent-soft: rgba(240, 104, 154, 0.12); --accent-ink: #1c1917; }
  :root:not([data-theme="light"]) [data-game="psl"] { --accent: #fb8a5c; --accent-soft: rgba(251, 138, 92, 0.12); --accent-ink: #1c1917; }
  :root:not([data-theme="light"]) [data-game="msl"] { --accent: #5ad48a; --accent-soft: rgba(90, 212, 138, 0.12); --accent-ink: #1c1917; }
  :root:not([data-theme="light"]) [data-game="mb"] { --accent: #ff6fa8; --accent-soft: rgba(255, 111, 168, 0.12); --accent-ink: #1c1917; }
  :root:not([data-theme="light"]) [data-game="hb"] { --accent: #5b9dff; --accent-soft: rgba(91, 157, 255, 0.12); --accent-ink: #1c1917; }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #131315;
  --bg-2: #18181b;
  --surface: #1c1c1f;
  --surface-2: #232326;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #ecebe8;
  --text-2: #a8a6a1;
  --text-3: #75736e;
  --ink: #ecebe8;
  --paper: #131315;
  --ok: #4ade80;
  --live: #f5b945;
  --plan: #5f5d59;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -20px rgba(0, 0, 0, 0.7);
}
:root[data-theme="dark"] [data-game="psl2"] { --accent: #f0689a; --accent-soft: rgba(240, 104, 154, 0.12); --accent-ink: #1c1917; }
:root[data-theme="dark"] [data-game="psl"] { --accent: #fb8a5c; --accent-soft: rgba(251, 138, 92, 0.12); --accent-ink: #1c1917; }
:root[data-theme="dark"] [data-game="msl"] { --accent: #5ad48a; --accent-soft: rgba(90, 212, 138, 0.12); --accent-ink: #1c1917; }
:root[data-theme="dark"] [data-game="mb"] { --accent: #ff6fa8; --accent-soft: rgba(255, 111, 168, 0.12); --accent-ink: #1c1917; }
:root[data-theme="dark"] [data-game="hb"] { --accent: #5b9dff; --accent-soft: rgba(91, 157, 255, 0.12); --accent-ink: #1c1917; }

/* Areas that sit on key art stay dark in both themes */
.on-image {
  color-scheme: dark;
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.8);
  --text-3: rgba(255, 255, 255, 0.6);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.28);
  --ok: #4ade80;
  --live: #f5b945;
  color: var(--text);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -0.02em; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: 8px; font-weight: 700; }
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 11vw, 136px); position: relative; }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }
.section--alt { background: var(--bg-2); }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 12px/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.h-xl { font-size: clamp(44px, 8vw, 112px); font-weight: 800; letter-spacing: -0.045em; }
.h-lg { font-size: clamp(34px, 5.2vw, 68px); font-weight: 800; letter-spacing: -0.035em; }
.h-md { font-size: clamp(25px, 3vw, 38px); font-weight: 700; }
.h-sm { font-size: clamp(19px, 1.8vw, 22px); font-weight: 700; letter-spacing: -0.01em; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--text-2); max-width: 62ch; }
.muted { color: var(--text-2); }
.mono { font-family: var(--font-mono); }
.accent-text { color: var(--accent); }
/* legacy name kept for markup; now a solid accent with a hand-drawn underline */
.grad-text {
  color: var(--accent);
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 92% / 0% 0.08em;
  transition: background-size 1.2s var(--ease) 0.3s;
}
.is-in .grad-text, [data-reveal].is-in .grad-text, .section-head .grad-text { background-size: 100% 0.08em; }

.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 72px); max-width: 780px; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  background: var(--ink); color: var(--paper);
  font: 600 15px/1 var(--font-body); white-space: nowrap;
  transition: transform 0.3s var(--ease), background-color 0.25s, color 0.25s, box-shadow 0.25s;
}
.btn:hover { transform: translateY(-2px); background: var(--accent); color: var(--accent-ink); }
.btn svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--ink); color: var(--paper); }
.btn--ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--ghost:hover { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.on-image .btn { background: #fff; color: #1c1917; }
.on-image .btn:hover { background: var(--accent); color: #fff; }
.on-image .btn--ghost { background: rgba(0, 0, 0, 0.25); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45); backdrop-filter: blur(8px); }
.on-image .btn--ghost:hover { box-shadow: inset 0 0 0 1.5px #fff; background: rgba(0, 0, 0, 0.4); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border-radius: 999px; width: max-content; max-width: 100%;
  font: 600 11px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text-2);
}
.chip--done { color: var(--ok); }
.chip--active { color: var(--live); }
.chip--planned { color: var(--text-3); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot--pulse { animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 90; height: var(--header-h);
  transition: background-color 0.35s, box-shadow 0.35s, transform 0.5s var(--ease), color 0.35s;
}
.site-header:not(.is-scrolled) { color-scheme: dark; --text: #fff; --text-2: rgba(255, 255, 255, 0.78); --line-strong: rgba(255, 255, 255, 0.35); }
.site-header.is-scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .wrap { max-width: 1400px; height: 100%; display: flex; align-items: center; gap: 20px; color: var(--text); }
.brand { display: flex; align-items: center; gap: 12px; font: 800 18px/1 var(--font-display); letter-spacing: -0.02em; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand small { display: block; font: 500 10px/1.2 var(--font-mono); letter-spacing: 0.18em; color: var(--text-3); text-transform: uppercase; margin-top: 4px; }
.site-header:not(.is-scrolled) .brand small { color: rgba(255, 255, 255, 0.6); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav > a:not(.btn), .nav-games__btn { position: relative; padding: 10px; font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; transition: color 0.2s; }
.nav > a:not(.btn)::after, .nav-games__btn::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 4px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.nav > a:not(.btn):hover, .nav > a[aria-current="page"], .nav-games__btn:hover, .nav-games.is-current .nav-games__btn, .nav-games__btn[aria-expanded="true"] { color: var(--text); }
.nav > a:not(.btn):hover::after, .nav > a[aria-current="page"]::after, .nav-games__btn:hover::after, .nav-games.is-current .nav-games__btn::after { transform: scaleX(1); }

/* "Games" disclosure menu (generated from GAMES in tools/build.mjs; behaviour in js/site.js) */
.nav-games { position: relative; }
.nav-games__btn { display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; }
.nav-games__btn svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.nav-games__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-games__menu {
  --text: var(--page-text); --text-2: var(--page-text-2); --text-3: var(--page-text-3); --line: var(--page-line); --line-strong: var(--page-line-strong);
  position: absolute; top: calc(100% + 10px); left: 50%; z-index: 5; width: 300px; margin: 0 0 0 -150px; padding: 8px; list-style: none;
  display: none; gap: 2px; border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow);
}
.nav-games__btn[aria-expanded="true"] + .nav-games__menu { display: grid; animation: fadeUp 0.3s var(--ease); }
.nav-games__menu a { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--text); transition: background-color 0.2s; }
.nav-games__menu a:hover { background: var(--surface-2); }
.nav-games__menu a:focus-visible { outline-offset: -2px; }
.nav-games__menu a[aria-current="page"] { background: var(--accent-soft); }
.nav-games__menu small { display: block; margin-top: 3px; font: 500 11px/1.3 var(--font-mono); letter-spacing: 0.04em; color: var(--text-3); }
.nav-games__swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 14px; margin-left: 8px; }
.site-header:not(.is-scrolled) .nav .btn { background: #fff; color: #1c1917; }
.site-header:not(.is-scrolled) .nav .btn:hover { background: var(--accent); color: #fff; }
.theme-toggle {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow 0.2s, transform 0.4s var(--ease);
}
.theme-toggle:hover { box-shadow: inset 0 0 0 1.5px var(--text); transform: rotate(-20deg); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); position: relative; flex: none; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { position: absolute; left: 11px; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.35s var(--ease), opacity 0.2s; content: ""; }
.nav-toggle span { top: 20px; }
.nav-toggle span::before { left: 0; top: -6px; }
.nav-toggle span::after { left: 0; top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* Studio · Games · Roadmaps · About + CTA need ~880px next to the brand; below that the nav becomes a menu */
@media (max-width: 959px) {
  .nav-toggle { display: block; }
  .theme-toggle { margin-left: auto; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) 28px; background: var(--bg); color: var(--text); box-shadow: 0 1px 0 var(--line), var(--shadow);
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
    clip-path: inset(0 0 100% 0); visibility: hidden; transition: clip-path 0.45s var(--ease), visibility 0s 0.45s;
  }
  .nav-open .site-header { background: var(--bg); }
  .nav-open .nav { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.45s var(--ease); }
  .nav > a:not(.btn), .nav-games__btn { padding: 14px 4px; font-size: 18px; border-bottom: 1px solid var(--line); }
  .nav > a:not(.btn)::after, .nav-games__btn::after { left: 0; right: auto; width: 24px; bottom: -1px; }
  .nav-games__btn { width: 100%; justify-content: space-between; }
  .nav-games__btn svg { width: 18px; height: 18px; }
  .nav-games__menu { position: static; width: auto; margin: 0; padding: 8px 0 10px; border-radius: 0; background: transparent; box-shadow: none; border-bottom: 1px solid var(--line); }
  .nav-games__menu a { font-size: 16px; }
  .nav .btn { margin: 18px 0 0; min-height: 50px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; overflow: hidden; background: #0f0f10;
  padding: calc(var(--header-h) + 60px) 0 clamp(56px, 8vw, 96px); isolation: isolate;
}
.hero--page { min-height: 72svh; }
.hero__bg { position: absolute; inset: -8% 0; z-index: -3; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: kenburns 28s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.06); } to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); } }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.55) 0%, rgba(12, 12, 13, 0.1) 35%, rgba(12, 12, 13, 0.55) 70%, rgba(12, 12, 13, 0.92) 100%),
              linear-gradient(90deg, rgba(12, 12, 13, 0.6) 0%, transparent 60%);
}
.hero__canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero__content { display: grid; gap: 24px; max-width: 960px; }
.hero__logo { width: clamp(130px, 16vw, 210px); filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.45)); }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--line-strong);
  font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
}
.hero__meta b { color: var(--text); font-weight: 600; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; width: 24px; height: 38px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4); transform: translateX(-50%); }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; border-radius: 2px; background: #fff; transform: translateX(-50%); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 12px); } }

/* split-letter title */
.split .char { display: inline-block; transform: translateY(0.8em); opacity: 0; transition: transform 0.9s var(--ease), opacity 0.7s; transition-delay: calc(var(--i) * 24ms + 120ms); }
.split .word { display: inline-block; white-space: nowrap; }
.split.is-in .char { transform: none; opacity: 1; }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0ms); }
[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="zoom"] { transform: scale(0.96); }
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal], .no-js .split .char { opacity: 1; transform: none; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg); padding-block: 18px; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; gap: 40px; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { display: flex; align-items: center; gap: 40px; font: 700 clamp(18px, 2.1vw, 26px)/1 var(--font-display); letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.marquee__item::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-top: 1px solid var(--line-strong); }
.stat { padding: clamp(20px, 2.6vw, 30px) clamp(12px, 1.6vw, 20px) 0 0; display: grid; gap: 6px; align-content: start; }
.stat__value { font: 800 clamp(34px, 4.2vw, 54px)/1 var(--font-display); letter-spacing: -0.04em; }
.stat__value em { font-style: normal; color: var(--accent); }
.stat__label { font: 500 12px/1.4 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }

/* ---------- cards ---------- */
.card {
  position: relative; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden; transition: transform 0.45s var(--ease), box-shadow 0.35s;
}
.card:hover { box-shadow: inset 0 0 0 1px var(--line-strong), var(--shadow); }
a.card:hover, .card[data-tilt]:hover { transform: translateY(-4px); }
.card__body { padding: clamp(22px, 2.6vw, 30px); display: grid; gap: 12px; align-content: start; }
.card__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.card__icon svg { width: 22px; height: 22px; }
.card p { color: var(--text-2); margin: 0; font-size: 15px; }
.grid { display: grid; gap: clamp(14px, 1.8vw, 20px); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }

/* game showcase card: always on image */
.game-card { display: grid; min-height: 540px; align-content: end; background: #111; box-shadow: none; }
.game-card__media { position: absolute; inset: 0; }
.game-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.game-card:hover .game-card__media img { transform: scale(1.05); }
.game-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 12, 13, 0.05) 0%, rgba(12, 12, 13, 0.45) 45%, rgba(12, 12, 13, 0.94) 100%); }
.game-card .card__body { position: relative; gap: 14px; padding: clamp(24px, 3vw, 36px); }
.game-card__logo { width: 104px; height: 104px; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5)); transition: transform 0.6s var(--ease); }
.game-card:hover .game-card__logo { transform: translateY(-4px) rotate(-3deg); }
.game-card__top { position: absolute; top: 20px; left: 20px; right: 20px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; z-index: 1; }
.game-card__cta { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--accent); }
.game-card.on-image .game-card__cta { color: #fff; }
.game-card__cta svg { width: 18px; transition: transform 0.3s var(--ease); }
.game-card:hover .game-card__cta svg, a.card:hover .game-card__cta svg { transform: translateX(5px); }
.on-image .chip { background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(8px); }
@media (min-width: 1000px) { .game-card--feature { grid-column: 1 / -1; min-height: 600px; } .game-card--feature .card__body { max-width: 620px; } }

[data-tilt] { will-change: transform; }

/* ---------- media / split layout ---------- */
.split-layout { display: grid; gap: clamp(32px, 6vw, 80px); align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .split-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } .split-layout--flip > :first-child { order: 2; } }
.frame { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line), var(--shadow); background: var(--surface); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; border-bottom: 1px solid var(--line); font: 500 11px/1 var(--font-mono); letter-spacing: 0.06em; color: var(--text-3); text-transform: uppercase; background: var(--surface); }
.frame__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.frame__bar span { margin-left: auto; }
.stack-shots { position: relative; padding-bottom: 12%; }
.stack-shots .frame + .frame { position: absolute; width: 56%; right: -3%; bottom: 0; }
@media (max-width: 700px) { .stack-shots { padding-bottom: 0; } .stack-shots .frame + .frame { position: relative; width: 100%; right: 0; margin-top: 14px; } }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { position: relative; padding-left: 28px; color: var(--text-2); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.42em; width: 16px; height: 16px; border-radius: 5px; background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/100% no-repeat;
}

/* ---------- production pipeline ---------- */
.pipeline { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; counter-reset: step; }
.pipeline__step { position: relative; padding: 22px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); counter-increment: step; overflow: hidden; }
.pipeline__step::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 26px; font: 600 12px/1 var(--font-mono); letter-spacing: 0.12em; color: var(--text-3); }
.pipeline__step::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease); transition-delay: var(--d, 0ms); }
.pipeline__step.is-in::after { transform: scaleX(1); }
.pipeline__step h3 { font-size: 18px; margin-bottom: 8px; }
.pipeline__step p { color: var(--text-2); font-size: 14px; margin: 0; }

/* ---------- timeline / roadmap ---------- */
.timeline { position: relative; display: grid; gap: 18px; padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line-strong); border-radius: 2px; }
.timeline__progress { position: absolute; left: 11px; top: 8px; width: 2px; height: 0; border-radius: 2px; background: var(--accent); }
.tl-item { position: relative; }
.tl-item__node { position: absolute; left: -40px; top: 22px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line-strong); display: grid; place-items: center; }
.section--alt .tl-item__node { background: var(--bg-2); }
.tl-item__node::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--plan); }
.tl-item.is-done .tl-item__node { box-shadow: inset 0 0 0 2px var(--ok); }
.tl-item.is-done .tl-item__node::after { background: var(--ok); }
.tl-item.is-active .tl-item__node { box-shadow: inset 0 0 0 2px var(--live); }
.tl-item.is-active .tl-item__node::after { background: var(--live); animation: pulse 2s ease-in-out infinite; }
.tl-card { padding: clamp(20px, 2.4vw, 26px); border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 10px; }
.tl-item.is-active .tl-card { box-shadow: inset 0 0 0 1px var(--live), inset 4px 0 0 var(--live); }
.tl-item.is-planned .tl-card { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.tl-card__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tl-card__window { font: 600 13px/1 var(--font-mono); letter-spacing: 0.04em; color: var(--text); }
.tl-card h3 { font-size: clamp(19px, 2vw, 24px); }
.tl-card p { color: var(--text-2); margin: 0; }
.tl-card ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tl-card li { font-size: 13px; padding: 5px 10px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); }
.tl-item.is-planned .tl-card li { background: var(--surface); }
@media (min-width: 1000px) {
  .timeline--wide { padding-left: 0; grid-template-columns: 1fr 1fr; column-gap: 88px; }
  .timeline--wide::before, .timeline--wide .timeline__progress { left: 50%; transform: translateX(-1px); }
  .timeline--wide .tl-item:nth-child(even) { grid-column: 1; }
  .timeline--wide .tl-item:nth-child(odd) { grid-column: 2; margin-top: 90px; }
  .timeline--wide .tl-item:nth-child(even) .tl-item__node { left: auto; right: -56px; }
  .timeline--wide .tl-item:nth-child(odd) .tl-item__node { left: -56px; }
}
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }

.bar { height: 6px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width 1.6s var(--ease); }
.bar.is-in > i, .is-in .bar > i { width: var(--v); }

/* ---------- EA updates (horizontal scroller) ---------- */
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: min(84vw, 340px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 18px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.scroller > * { scroll-snap-align: start; }
.update-card { padding: 24px; display: grid; gap: 12px; align-content: start; }
.update-card__n { font: 800 56px/0.8 var(--font-display); color: var(--line-strong); letter-spacing: -0.04em; transition: color 0.3s; }
.update-card:hover .update-card__n { color: var(--accent); }

/* ---------- tabs ---------- */
.tabs__list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.tabs__tab { border: 0; padding: 9px 15px; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line-strong); font-size: 14px; font-weight: 600; color: var(--text-2); transition: all 0.25s var(--ease); }
.tabs__tab:hover { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.tabs__tab[aria-selected="true"] { background: var(--ink); color: var(--paper); box-shadow: none; }
.tabs__panel { animation: fadeUp 0.5s var(--ease); }
.tabs__panel[hidden] { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- interactive map ---------- */
.map { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line-strong), var(--shadow); background: #2e6f97; }
.map img { width: 100%; image-rendering: pixelated; filter: saturate(0.85); }
.map__scan { display: none; }
.map__pin {
  position: absolute; z-index: 2; left: var(--x); top: var(--y); width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 0; border-radius: 50%;
  background: #1c1917; color: #fff; box-shadow: 0 0 0 3px #fff, 0 6px 14px rgba(0, 0, 0, 0.35);
  font: 700 12px/30px var(--font-mono); transition: transform 0.3s var(--ease), background-color 0.2s;
}
.map__pin::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; opacity: 0; }
.map__pin[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); transform: scale(1.2); }
.map__pin[aria-pressed="true"]::before { animation: ring 1.8s var(--ease) infinite; }
.map__pin:hover { transform: scale(1.2); }
@keyframes ring { 0% { opacity: 0.9; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1.6); } }
.map-layout { display: grid; gap: 24px; }
@media (min-width: 1000px) { .map-layout { grid-template-columns: 1.2fr 1fr; align-items: start; } }
.district-list { display: grid; gap: 8px; }
.district { width: 100%; text-align: left; border: 0; padding: 14px 16px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; grid-template-columns: 32px 1fr; gap: 2px 14px; transition: box-shadow 0.25s, background-color 0.25s; color: var(--text); }
.district:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.district b { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 12px/1 var(--font-mono); background: var(--surface-2); }
.district strong { font: 700 16px/1.3 var(--font-display); }
.district span { font-size: 14px; color: var(--text-2); }
.district[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.district[aria-pressed="true"] b { background: var(--accent); color: var(--accent-ink); }

/* ---------- character pipeline steps ---------- */
.steps { display: grid; gap: 10px; counter-reset: s; padding: 0; margin: 0; }
.steps li { list-style: none; counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 16px 18px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font: 800 20px/1 var(--font-display); background: var(--accent-soft); color: var(--accent); }
.steps h3 { font-size: 17px; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--text-2); font-size: 14px; }
.tool-tag { display: inline-block; margin: 8px 6px 0 0; font: 600 11px/1 var(--font-mono); padding: 5px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); letter-spacing: 0.02em; }

/* ---------- cast roster + wardrobe ---------- */
.cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.cast li { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); aspect-ratio: 1; transition: transform 0.45s var(--ease), box-shadow 0.3s; }
.cast li:nth-child(4n+1) { background: #efd9df; }
.cast li:nth-child(4n+2) { background: #dfe3ec; }
.cast li:nth-child(4n+3) { background: #e7e1d3; }
.cast li:nth-child(4n) { background: #dbe7de; }
:root[data-theme="dark"] .cast li:nth-child(n) { background: var(--surface); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cast li:nth-child(n) { background: var(--surface); } }
.cast img { width: 100%; height: 100%; object-fit: contain; transform: translateY(8%) scale(1.06); transition: transform 0.5s var(--ease); }
.cast span { position: absolute; inset: auto 0 0; padding: 16px 8px 8px; font: 600 11px/1.2 var(--font-mono); text-align: center; color: #fff; background: linear-gradient(transparent, rgba(12, 12, 13, 0.85)); opacity: 0; transition: opacity 0.25s; }
.cast li:hover { transform: translateY(-5px); box-shadow: inset 0 0 0 1.5px var(--accent); }
.cast li:hover img { transform: translateY(3%) scale(1.12); }
.cast li:hover span { opacity: 1; }
.cast-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cast-marquee .cast { display: flex; width: max-content; gap: 10px; animation: marquee 80s linear infinite; padding-block: 6px; }
.cast-marquee .cast li { width: 120px; flex: none; }
.cast-marquee--rev .cast { animation-direction: reverse; }
.cast-marquee:hover .cast { animation-play-state: paused; }
.wardrobe { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.wardrobe li { aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; animation: bob 5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -0.4s); }
.wardrobe li:nth-child(odd) { --i: 3; } .wardrobe li:nth-child(3n) { --i: 7; } .wardrobe li:nth-child(4n) { --i: 5; }
.wardrobe img { width: 86%; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25)); transition: transform 0.35s var(--ease); }
.wardrobe li:hover img { transform: scale(1.15) rotate(-4deg); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.creator-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.creator-tabs span { padding: 6px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text-2); }
.creator-tabs span:first-child { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.pose-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pose-compare figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.pose-compare figcaption { position: absolute; left: 10px; top: 10px; }
.opening-beats { display: grid; counter-reset: beat; }
.beat { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 20px 0; border-top: 1px solid var(--line-strong); counter-increment: beat; }
.beat::before { content: counter(beat, decimal-leading-zero); font: 700 14px/1.6 var(--font-mono); color: var(--accent); }
.beat h3 { font-size: 20px; margin-bottom: 6px; }
.beat p { margin: 0; color: var(--text-2); }

/* ---------- gallery + lightbox ---------- */
.gallery { columns: 3 300px; column-gap: 12px; }
.gallery figure { margin: 0 0 12px; break-inside: avoid; border-radius: 12px; overflow: hidden; position: relative; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.gallery img { width: 100%; transition: transform 0.7s var(--ease); }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; inset: auto 0 0; padding: 28px 14px 12px; font-size: 13px; color: #fff; background: linear-gradient(transparent, rgba(12, 12, 13, 0.85)); opacity: 0; transform: translateY(6px); transition: all 0.35s var(--ease); pointer-events: none; }
.gallery figure:hover figcaption, .gallery figure:focus-within figcaption { opacity: 1; transform: none; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }

.lightbox { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(12, 12, 13, 0.94); opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0s 0.3s; color: #fff; }
.lightbox.is-open { opacity: 1; visibility: visible; transition: opacity 0.3s; }
.lightbox img { max-height: 84vh; width: auto; border-radius: 10px; transform: scale(0.97); transition: transform 0.45s var(--ease); }
.lightbox.is-open img { transform: none; }
.lightbox p { margin: 14px 0 0; color: rgba(255, 255, 255, 0.75); text-align: center; font-size: 14px; }
.lightbox__btn { position: absolute; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 22px; display: grid; place-items: center; }
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- FAQ ---------- */
.faq { display: grid; border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 48px 20px 0; position: relative; font: 700 17px/1.35 var(--font-display); transition: color 0.2s; }
.faq summary:hover { color: var(--accent); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px; margin-top: -8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.35s var(--ease); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details > div { padding: 0 0 22px; color: var(--text-2); max-width: 70ch; }

/* ---------- CTA band + newsletter ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: calc(var(--radius) + 6px); padding: clamp(32px, 6vw, 72px); background: var(--ink); color: var(--paper); display: grid; gap: 20px;
  --text: var(--paper); --text-2: color-mix(in srgb, var(--paper) 72%, transparent); --text-3: color-mix(in srgb, var(--paper) 55%, transparent); --line-strong: color-mix(in srgb, var(--paper) 30%, transparent); }
.cta-band::after { content: ""; position: absolute; right: clamp(-120px, -8vw, -40px); top: 50%; width: clamp(200px, 30vw, 380px); aspect-ratio: 1; border-radius: 50%; background: var(--accent); transform: translateY(-50%); opacity: 0.95; }
.cta-band > * { position: relative; z-index: 1; max-width: 640px; }
.cta-band .btn { background: var(--accent); color: var(--accent-ink); }
.cta-band .btn:hover { background: var(--paper); color: var(--ink); }
@media (max-width: 700px) { .cta-band::after { width: 180px; right: -80px; top: 0; transform: none; opacity: 0.5; } }
.news-form { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.news-form input { flex: 1 1 240px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 0; background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); font: inherit; }
.news-form input::placeholder { color: var(--text-3); }
.news-form input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 64px 32px; background: var(--bg); }
.footer-grid { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer-grid h3 { font: 600 12px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text-2); transition: color 0.2s; }
.footer-grid a:hover { color: var(--accent); }
.socials { display: flex; gap: 8px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: all 0.25s var(--ease); color: var(--text); }
.socials a:hover { background: var(--ink); color: var(--paper); box-shadow: none; transform: translateY(-2px); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 13px; color: var(--text-3); }
.footer-bottom a:hover { color: var(--text); }

/* ---------- misc ---------- */
.progress-top { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 95; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.subnav { position: sticky; top: var(--header-h); z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav a { flex: none; padding: 14px 12px; font-size: 13px; font-weight: 600; color: var(--text-3); border-bottom: 2px solid transparent; transition: color 0.2s, border-color 0.2s; }
.subnav a:hover, .subnav a.is-active { color: var(--text); border-color: var(--accent); }
.badge-status { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); color: #fff; font: 600 12px/1.35 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; width: fit-content; max-width: 100%; }
.badge-status .dot { color: #f5b945; }
.quote { font: 700 clamp(22px, 3vw, 38px)/1.2 var(--font-display); letter-spacing: -0.02em; max-width: 30ch; margin: 0; padding-left: 20px; border-left: 3px solid var(--accent); }
.quote span { color: var(--accent); }
.prose { max-width: 72ch; }
.prose h2 { font-size: clamp(24px, 3vw, 34px); margin: 48px 0 16px; }
.prose p, .prose li { color: var(--text-2); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0; font-size: 14px; margin: 8px 0 0; }
.kv dt, .kv dd { padding: 10px 0; border-bottom: 1px solid var(--line); }
.kv dt { font: 500 12px/1.6 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-3); padding-right: 20px; }
.kv dd { margin: 0; color: var(--text); font-weight: 500; }
.sticky-col { position: static; }
@media (min-width: 960px) { .sticky-col { position: sticky; top: calc(var(--header-h) + 70px); } }

@media (max-width: 600px) {
  .btn { min-height: 46px; padding: 0 18px; }
  .game-card { min-height: 480px; }
  .brand small { display: none; }
}

/* ==========================================================================
   Game-page extensions (first used by Midnight Bloom; generic and token-based)
   ========================================================================== */

/* typeset hero title for games without a logo file; the last word becomes a tracked sub-line */
.hero__title { font-family: "Bowlby One SC", var(--font-display); font-weight: 400; font-size: clamp(40px, 9vw, 124px); line-height: 0.92; letter-spacing: 0; }
.hero__title .word:last-child { display: block; margin-top: 0.55em; font-size: 0.34em; letter-spacing: 0.34em; color: var(--text-2); }
.hero__rule { display: block; width: 72px; height: 4px; border-radius: 4px; background: var(--accent); }

/* icon button (reel arrows) */
.icon-btn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow 0.2s, opacity 0.2s; }
.icon-btn:hover { box-shadow: inset 0 0 0 1.5px var(--text); }
.icon-btn:disabled { opacity: 0.35; cursor: default; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.head-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.head-row .section-head { margin: 0; }
.head-row__nav { display: flex; gap: 8px; }

/* before/after (day/night) comparison: drag, click or use the arrow keys */
@property --pos { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.compare { --pos: 50%; position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0f0f10; box-shadow: 0 0 0 1px var(--line), var(--shadow); touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare__top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos)); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.compare__knob { position: absolute; top: 50%; left: 50%; width: 46px; height: 46px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; color: #1c1917; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4); }
.compare__knob svg { width: 22px; height: 22px; }
.compare__label { position: absolute; top: 14px; z-index: 1; pointer-events: none; }
.compare__label--a { left: 14px; }
.compare__label--b { right: 14px; }
.compare__range { position: absolute; inset: auto 0 0; width: 100%; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.compare:has(.compare__range:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare.is-in:not(.is-touched) { animation: compare-hint 2.6s var(--ease) 0.4s 1 both; }
@keyframes compare-hint { 0% { --pos: 50%; } 35% { --pos: 66%; } 72% { --pos: 36%; } 100% { --pos: 50%; } }
.compare-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; margin-top: 12px; font-size: 14px; color: var(--text-2); }
.compare-caption .mono { font-size: 12px; color: var(--text-3); }

/* horizontal aerial reel: bleeds to the viewport edge but starts aligned with .wrap */
.reel__track {
  --reel-pad: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
  display: grid; grid-auto-flow: column; grid-auto-columns: min(84vw, 780px); gap: clamp(12px, 1.6vw, 18px);
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--reel-pad) 18px; scroll-padding-inline: var(--reel-pad);
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; overscroll-behavior-x: contain;
}
.reel__track > * { scroll-snap-align: start; }
.aerial { position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #0f0f10; box-shadow: 0 0 0 1px var(--line); }
.aerial button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.aerial img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.aerial:hover img, .aerial:focus-within img { transform: scale(1.04); }
.aerial__chips { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.aerial figcaption { position: absolute; inset: auto 0 0; display: grid; gap: 6px; padding: 64px clamp(16px, 2vw, 24px) clamp(14px, 1.8vw, 20px); background: linear-gradient(transparent, rgba(12, 12, 13, 0.88)); pointer-events: none; }
.aerial figcaption strong { font: 700 clamp(18px, 2vw, 24px)/1.15 var(--font-display); letter-spacing: -0.01em; }
.aerial figcaption span { font-size: 14px; color: var(--text-2); max-width: 60ch; }
@media (max-width: 600px) { .aerial figcaption span { display: none; } .aerial figcaption { padding-top: 40px; } }

/* dense hotspot map (many places, filterable) */
.map--photo img { image-rendering: auto; filter: none; }
.map-layout--dense .map__pin { width: 26px; height: 26px; margin: -13px 0 0 -13px; font-size: 11px; line-height: 26px; }
.map__pin--day, .map__pin--home { background: #fff; color: #1c1917; box-shadow: 0 0 0 2.5px #1c1917, 0 6px 14px rgba(0, 0, 0, 0.35); }
.map__pin[aria-pressed="true"] { z-index: 3; }
[data-map] [hidden] { display: none !important; }
.map-col .filter-bar { margin-bottom: 14px; }
.map-note { margin: 10px 0 0; font-size: 12px; }
.district-list__inner { display: grid; gap: 8px; align-content: start; }
.district__side { margin-left: 6px; font: 600 10px/1 var(--font-mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; vertical-align: 2px; }
.district__side--night { color: var(--accent); }
/* below the two-column layout, only the selected place shows its description */
@media (max-width: 999px) {
  .district-list--scroll .district { padding-block: 10px; }
  .district-list--scroll .district:not([aria-pressed="true"]) b { grid-row: auto; }
  .district-list--scroll .district:not([aria-pressed="true"]) > span { display: none; }
}
@media (min-width: 1000px) {
  .district-list--scroll { position: relative; min-height: 420px; }
  .district-list--scroll .district-list__inner { position: absolute; inset: 0; overflow-y: auto; padding: 2px 8px 2px 2px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
}

/* compact district cards */
.district-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.district-grid li { display: grid; gap: 6px; align-content: start; padding: 18px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.district-grid__n { font: 600 12px/1 var(--font-mono); color: var(--accent); }
.district-grid h4 { font-size: 17px; }
.district-grid__kind { font: 600 10px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.district-grid p { margin: 0; font-size: 14px; color: var(--text-2); }

/* walking-time bars */
.walk { display: grid; gap: 14px; margin: 0; }
.walk__row { display: grid; grid-template-columns: minmax(110px, 36%) minmax(0, 1fr) 5ch; gap: 14px; align-items: center; }
.walk dt { font-size: 15px; font-weight: 600; }
.walk dd { margin: 0; }
.walk .walk__s { font: 600 12px/1 var(--font-mono); color: var(--text-2); text-align: right; }

/* image cards that are not links (story duo) */
.duo .game-card { min-height: 500px; }
@media (max-width: 600px) { .duo .game-card { min-height: 0; padding-top: 200px; } }

/* people roster */
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.roster li { display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 16px 10px 10px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.roster__avatar { width: 60px; height: 60px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 800 22px/1 var(--font-display); }
.roster__avatar img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 6%; transform: scale(2.1); }
.roster h4 { font-size: 17px; margin-bottom: 2px; }
.roster p { margin: 0; font-size: 14px; color: var(--text-2); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 6px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text-2); }
.player-card { display: grid; grid-template-columns: minmax(0, 190px) minmax(0, 1fr); gap: clamp(18px, 2.4vw, 28px); align-items: center; padding: clamp(20px, 2.6vw, 30px); }
.player-card__img { width: 100%; aspect-ratio: 1; border-radius: 14px; background: var(--accent-soft); object-fit: contain; }
@media (max-width: 560px) { .player-card { grid-template-columns: minmax(0, 1fr); } .player-card__img { max-width: 190px; } }
.lineup { padding: clamp(16px, 2.4vw, 28px) clamp(10px, 2vw, 24px) 0; background: var(--surface); }
.lineup img { width: 100%; height: auto; object-fit: contain; }

/* labelled parts grid (flowers, fixtures, furniture) */
.wardrobe--labelled { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.wardrobe--labelled li { aspect-ratio: auto; align-content: start; gap: 2px; padding: 8px 6px 12px; }
.wardrobe--labelled img { width: 80%; aspect-ratio: 1; }
.wardrobe--labelled span { font: 600 11px/1.25 var(--font-mono); text-align: center; color: var(--text-2); }
.parts-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; }
.parts-head h3 { font-size: 18px; }
.parts-head p { margin: 0; font: 600 12px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }

/* option-chip builder (bouquet bench) */
.builder { display: grid; gap: clamp(24px, 3vw, 40px); padding: clamp(20px, 3vw, 36px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .builder { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center; } }
.builder fieldset { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.builder fieldset:last-of-type { margin-bottom: 0; }
.builder legend { margin-bottom: 10px; padding: 0; font: 600 12px/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opt { position: relative; display: inline-flex; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt span { display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-2); box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: background-color 0.25s, color 0.25s, box-shadow 0.25s; }
.opt:hover span { color: var(--text); box-shadow: inset 0 0 0 1.5px var(--text); }
.opt input:checked + span { background: var(--accent); color: var(--accent-ink); box-shadow: none; }
.opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.builder__preview { display: grid; justify-items: center; gap: 10px; padding: clamp(20px, 3vw, 32px); border-radius: var(--radius); background: var(--surface-2); text-align: center; }
.builder__img { width: clamp(150px, 18vw, 210px); aspect-ratio: 1; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.22)); animation: bob 5s ease-in-out infinite; }
.builder .builder__out { font: 700 clamp(20px, 2.2vw, 26px)/1.2 var(--font-display); letter-spacing: -0.01em; }
.builder .builder__meta { margin: 0; font: 500 13px/1.5 var(--font-mono); color: var(--text-2); }
.builder .builder__price { font: 800 clamp(34px, 4vw, 48px)/1 var(--font-display); letter-spacing: -0.03em; color: var(--accent); }

/* capacity ladders (homes / operation spaces) */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ladder li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; margin-left: calc(var(--step, 0) * min(1.6vw, 12px)); padding: 12px 16px 12px 12px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ladder__code { width: 48px; height: 40px; border-radius: 10px; display: grid; place-items: center; font: 700 13px/1 var(--font-mono); background: var(--accent-soft); color: var(--accent); }
.ladder h4 { font-size: 16px; margin-bottom: 2px; }
.ladder p { margin: 0; font-size: 13px; color: var(--text-2); }
.ladder__price { font: 600 12px/1.3 var(--font-mono); color: var(--text); text-align: right; white-space: nowrap; }
.ladder li.is-planned { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); }
.ladder li.is-planned .ladder__code { background: var(--surface-2); color: var(--text-3); }
@media (max-width: 520px) { .ladder li { grid-template-columns: 44px minmax(0, 1fr); } .ladder__price { grid-column: 2; text-align: left; white-space: normal; } }

.dot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dot-list li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 15px; }
.dot-list li::before { content: ""; position: absolute; left: 1px; top: 0.6em; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--text-3); }
.card .check-list li { font-size: 15px; }

/* ==========================================================================
   Game-page extensions (first used by HelloBnb; generic and token-based)
   ========================================================================== */

/* hero whose title is a wide logo image (the h1 wraps the logo, a display tagline follows) */
.hero__brand { margin: 0; line-height: 0; }
.hero__logo--wide { width: clamp(230px, 30vw, 400px); }
.hero__tagline { margin: 0; font: 800 clamp(30px, 4.8vw, 62px)/1.02 var(--font-display); letter-spacing: -0.035em; max-width: 17ch; }

/* five roadmap summary cards: 5 across on wide screens, 3 + 2 in between, stacked on phones */
.grid--5 { display: flex; flex-wrap: wrap; gap: clamp(14px, 1.8vw, 20px); }
.grid--5 > * { flex: 1 1 200px; min-width: 0; }
@media (max-width: 1199px) { .grid--5 > * { flex-basis: 260px; } }

/* six-step flow: one row on wide screens, then 3 + 3, 2 + 2 + 2, stacked */
.pipeline--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1099px) { .pipeline--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .pipeline--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .pipeline--6 { grid-template-columns: minmax(0, 1fr); } }

/* wide aerial (island overview) */
.aerial--wide { aspect-ratio: 21 / 9; }
@media (max-width: 700px) { .aerial--wide { aspect-ratio: 4 / 3; } }

/* frames holding UI captures (1920 x 1035) that sit next to 16:9 art */
.frame--169 > img, .frame--169 > button img { aspect-ratio: 16 / 9; object-fit: cover; }
.frame > figcaption { padding: 12px 16px 14px; font-size: 14px; color: var(--text-2); border-top: 1px solid var(--line); }
.frame > figcaption strong { display: block; margin-bottom: 2px; font: 700 16px/1.3 var(--font-display); color: var(--text); }
figure.frame { margin: 0; }
/* inside stretched grid cells, keep the image at its own ratio so the caption stays visible */
figure.frame > img { height: auto; }

/* numbered quest chain */
.chain { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: q; }
.chain li { counter-increment: q; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: center; padding: 7px 12px 7px 7px; border-radius: 10px; background: var(--surface-2); font-size: 15px; font-weight: 600; }
.chain li::before { content: counter(q, decimal-leading-zero); display: grid; place-items: center; height: 28px; border-radius: 8px; font: 700 12px/1 var(--font-mono); background: var(--accent-soft); color: var(--accent); }

/* full-body outfit renders */
.lookbook { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.lookbook li { display: grid; grid-template-rows: auto 1fr; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.lookbook img { width: 100%; aspect-ratio: 3 / 7; object-fit: contain; padding: 14px 10px 4px; background: var(--surface-2); transition: transform 0.6s var(--ease); }
.lookbook li:hover img { transform: translateY(-4px); }
.lookbook span { padding: 10px 12px 12px; font-size: 13px; line-height: 1.4; color: var(--text-2); }
.lookbook b { display: block; font: 600 11px/1.3 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
@media (max-width: 999px) { .lookbook { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 480px) { .lookbook { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* category table with inline bars (wardrobe counts) */
.btable { width: 100%; border-collapse: collapse; font-size: 15px; }
.btable caption { text-align: left; margin-bottom: 10px; font: 600 12px/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.btable th, .btable td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 500; }
.btable thead th { font: 600 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.btable tbody th { padding-right: 14px; color: var(--text); }
.btable td { width: 34%; padding-left: 10px; }
.btable__cell { display: grid; grid-template-columns: minmax(0, 1fr) 3ch; gap: 10px; align-items: center; font: 600 13px/1 var(--font-mono); color: var(--text-2); text-align: right; }
.btable tfoot th, .btable tfoot td { border-bottom: 0; font-weight: 700; color: var(--text); }

/* summer / winter pairs */
.season-pairs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.season-pairs li { display: grid; gap: 8px; padding: 10px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.season-pairs div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.season-pairs img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 10px; background: var(--surface-2); }
.season-pairs span { font: 600 11px/1.3 var(--font-mono); letter-spacing: 0.04em; color: var(--text-2); text-align: center; }
@media (max-width: 480px) { .season-pairs { grid-template-columns: minmax(0, 1fr); } .season-pairs li { max-width: 280px; } }

/* hotspot pins that stay light on the map photo */
.map__pin--stay, .map__pin--beach { background: #fff; color: #1c1917; box-shadow: 0 0 0 2.5px #1c1917, 0 6px 14px rgba(0, 0, 0, 0.35); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  [data-reveal], .split .char { opacity: 1 !important; transform: none !important; }
  .marquee__track, .cast-marquee .cast { animation: none; }
  .compare, .wardrobe li, .builder__img { animation: none !important; }
  .reel__track { scroll-behavior: auto; }
}
