/* Cubelo Games home. Light + dark themes, shares the lane-grid language of the
   composermp3 landing (fonts are served from /composermp3/fonts). Strict CSP:
   no inline styles; dynamic values are written from home.js with setProperty. */

@font-face { font-family: "Anton"; src: url("/composermp3/fonts/Anton-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/composermp3/fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/composermp3/fonts/Inter-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/composermp3/fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/composermp3/fonts/Inter-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Tokens: light is the default, dark follows the system until the
   visitor picks one with the toggle (data-theme on <html>). ---------- */
:root {
  --bg: #f6f6fa;
  --bg-alt: #ecedf5;
  --surface: #ffffff;
  --fg: #0d0e14;
  --muted: rgba(13, 14, 20, 0.64);
  --rule: rgba(13, 14, 20, 0.16);
  --rail: rgba(13, 14, 20, 0.07);
  --accent: #002be2;
  --accent-fg: #ffffff;
  --btn-bg: #0d0e14;
  --btn-fg: #ffffff;
  --bar-bg: rgba(255, 255, 255, 0.72);
  --bar-border: rgba(13, 14, 20, 0.1);
  --shadow: 0 10px 30px rgba(13, 14, 20, 0.12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08090e; --bg-alt: #0d0f17; --surface: #131621; --fg: #f3f4f8;
    --muted: rgba(243, 244, 248, 0.66); --rule: rgba(255, 255, 255, 0.16); --rail: rgba(255, 255, 255, 0.06);
    --accent: #4a66ff; --accent-fg: #ffffff; --btn-bg: #f3f4f8; --btn-fg: #08090e;
    --bar-bg: rgba(19, 22, 33, 0.7); --bar-border: rgba(255, 255, 255, 0.12); --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08090e; --bg-alt: #0d0f17; --surface: #131621; --fg: #f3f4f8;
  --muted: rgba(243, 244, 248, 0.66); --rule: rgba(255, 255, 255, 0.16); --rail: rgba(255, 255, 255, 0.06);
  --accent: #4a66ff; --accent-fg: #ffffff; --btn-bg: #f3f4f8; --btn-fg: #08090e;
  --bar-bg: rgba(19, 22, 33, 0.7); --bar-border: rgba(255, 255, 255, 0.12); --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

:root {
  --blue: #002be2; --blue-deep: #0a1a5c; --chrome: #eceffb; --on-chrome: #002be2;
  --r-card: 16px; --r-md: 24px; --r-lg: 32px; --r-full: 9999px;
  --s-xs: 4px; --s-sm: 8px; --s-md: 12px; --s-lg: 20px; --s-xl: 32px;
  --s-section: clamp(88px, 12vw, 160px);
  --gutter: max(20px, 5vw);
  --shell: min(100% - 2 * var(--gutter), 1200px);
  --font-display: "Anton", "Arial Narrow", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --track-display: 0.02em; --track-action: 0.03em; --track-badge: 0.06em;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms; --t-base: 260ms; --t-slow: 700ms; --stagger: 70ms;
  --phone-w: clamp(200px, 54vw, 280px);
}
@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-base: 0ms; --t-slow: 0ms; --stagger: 0ms; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: var(--s-md); top: -80px; z-index: 100; padding: 12px 20px; border-radius: var(--r-full); background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; text-decoration: none; }
.skip:focus { top: var(--s-md); }
.shell { width: var(--shell); margin-inline: auto; }
.display { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: var(--track-display); line-height: 1; }

/* The four lanes of Composer run through the page as its grid. */
.ruled { position: relative; }
.ruled::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    linear-gradient(var(--rail), var(--rail)) 14% 0 / 1px 100% no-repeat,
    linear-gradient(var(--rail), var(--rail)) 38% 0 / 1px 100% no-repeat,
    linear-gradient(var(--rail), var(--rail)) 62% 0 / 1px 100% no-repeat,
    linear-gradient(var(--rail), var(--rail)) 86% 0 / 1px 100% no-repeat;
}
.ruled > .shell { position: relative; z-index: 1; }

.section { padding-block: var(--s-section); }
.section--alt { background: var(--bg-alt); }
.head { padding-top: var(--s-md); border-top: 1px solid var(--rule); display: grid; gap: var(--s-lg); }
.idx { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; color: var(--muted); }
.h2 { font-size: clamp(3rem, 11vw, 8.5rem); line-height: 0.92; text-wrap: balance; }

/* ---------- Wordmark (SVG used as a mask so it follows the text colour) ---------- */
.wm {
  display: block; aspect-ratio: 3428 / 500; background: currentColor;
  -webkit-mask: url("/assets/brand/logo-wordmark.svg") center / contain no-repeat;
  mask: url("/assets/brand/logo-wordmark.svg") center / contain no-repeat;
}

/* ---------- Top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: calc(var(--s-md) + env(safe-area-inset-top)) var(--gutter) 0;
  pointer-events: none; transition: transform var(--t-slow) var(--ease-out);
}
.bar.is-hidden { transform: translate3d(0, -140%, 0); }
.bar__inner {
  pointer-events: auto; width: min(100%, 1200px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-md);
  min-height: 56px; padding: 4px 6px 4px 22px;
  border-radius: var(--r-full); background: var(--bar-bg); border: 1px solid var(--bar-border); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
}
.brand { display: inline-flex; align-items: center; min-height: 48px; text-decoration: none; }
.brand .wm { width: 136px; }
.bar__links { display: none; align-items: center; gap: 2px; }
.bar__link { display: inline-flex; align-items: center; min-height: 48px; padding-inline: 14px; border-radius: var(--r-full); font-size: 0.9375rem; font-weight: 600; text-decoration: none; color: var(--muted); transition: color var(--t-fast); }
.bar__link:hover { color: var(--fg); }
.bar__end { display: flex; align-items: center; gap: var(--s-sm); }
.theme { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: var(--r-full); background: transparent; color: var(--fg); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background var(--t-fast); }
.theme:hover { background: var(--rail); }
.theme svg { width: 22px; height: 22px; grid-area: 1 / 1; }
.theme__sun { display: none; }
:root[data-theme="dark"] .theme__sun { display: block; }
:root[data-theme="dark"] .theme__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme__sun { display: block; }
  :root:not([data-theme="light"]) .theme__moon { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--r-full);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--font-display); font-size: 1.0625rem; letter-spacing: var(--track-action); text-transform: uppercase;
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-fast) var(--ease-out);
}
.btn:active { transform: scale(0.96); }
.btn--sm { white-space: nowrap; background: var(--accent); color: var(--accent-fg); }
.btn--ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--rule); }

/* ---------- Hero: the studio first, Composer as one compact strip ---------- */
.hero {
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh;
  padding-top: calc(104px + env(safe-area-inset-top)); padding-bottom: 0;
  overflow: hidden; isolation: isolate;
}
.hero__inner { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: var(--s-lg); }
.hero__main { container-type: inline-size; }
.hero__kind { font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-md); }
/* Sized from the container width, so the two lines can never be clipped */
.hero__title { font-size: min(21cqw, 24svh); line-height: 0.9; margin-left: -0.03em; }
.hero__title span { display: block; overflow: hidden; padding-block: 0.04em; }
.hero__title b { display: block; font-weight: 400; }
.hero__title span:nth-child(2) b { color: var(--accent); }
.hero__row { display: grid; gap: var(--s-lg); }
.hero__sub { max-width: 40ch; font-size: clamp(1.0625rem, 2.6vw, 1.3125rem); color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-md); margin-top: var(--s-lg); }

/* Latest release: full-bleed Composer blue band at the foot of the hero; the game rises out of it */
.latest {
  position: relative; display: block; isolation: isolate; flex: none;
  margin-top: var(--s-xl); background: var(--blue); color: #fff; text-decoration: none;
}
.latest__rails { position: absolute; inset: 0; z-index: -1; pointer-events: none; background:
  linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)) 14% 0 / 1px 100% no-repeat,
  linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)) 38% 0 / 1px 100% no-repeat,
  linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)) 62% 0 / 1px 100% no-repeat,
  linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)) 86% 0 / 1px 100% no-repeat; }
.latest__inner { position: relative; display: grid; gap: var(--s-lg); padding-block: var(--s-xl) 0; }
.latest__main { display: grid; gap: var(--s-sm); }
.latest__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }
.latest__idx { color: #fff; font-variant-numeric: tabular-nums; margin-right: 6px; }
.latest__name { display: block; font-size: clamp(3rem, 15.5vw, 6rem); line-height: 0.9; margin-left: -0.03em; transition: transform var(--t-base) var(--ease-out); }
.latest__tag { display: block; color: rgba(255, 255, 255, 0.86); }
.latest__side { display: grid; gap: var(--s-md); justify-items: start; }
.latest__facts { display: grid; gap: var(--s-sm); width: 100%; font-size: 0.9375rem; font-weight: 600; }
.latest__facts > span { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--s-sm); padding-bottom: var(--s-sm); border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.latest__facts i { font-style: normal; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.72); padding-top: 0.2em; }
.latest__cta { font-weight: 700; padding-bottom: 2px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; transition: background-size var(--t-base) var(--ease-out); }
.latest:hover .latest__cta { background-size: 0 1.5px; background-position: 100% 100%; }
.latest:hover .latest__name { transform: translate3d(6px, 0, 0); }
.latest__phone { display: flex; justify-content: center; height: 150px; overflow: hidden; }
.latest__tilt { display: block; transform: perspective(1400px) rotateY(-8deg) rotateX(4deg); transform-origin: 50% 100%; transition: transform var(--t-slow) var(--ease-out); }
.latest:hover .latest__tilt { transform: perspective(1400px) rotateY(-4deg) rotateX(2deg) translate3d(0, -14px, 0); }
.latest .phone, .latest .phone__screen, .latest .board__notes { display: block; }
.latest .hud__score { display: block; }
.latest .phone { --phone-w: clamp(190px, 52vw, 240px); }

@keyframes rise { from { opacity: 0; transform: translate3d(0, 24px, 0); } to { opacity: 1; transform: none; } }
@keyframes mask-in { from { transform: translate3d(0, 108%, 0); } to { transform: none; } }
.hero__kind { animation: rise var(--t-slow) var(--ease-out) 60ms both; }
.hero__title b { animation: mask-in 1000ms var(--ease-out) 120ms both; }
.hero__title span:nth-child(2) b { animation-delay: 220ms; }
.hero__row { animation: rise var(--t-slow) var(--ease-out) 400ms both; }
.latest { animation: rise 1000ms var(--ease-out) 560ms both; }

/* ---------- Phone mockup + board (ported from the composermp3 landing) ---------- */
.phone {
  --canvas: #002be2; --canvas-deep: #0a1a5c; --card: rgba(92, 117, 237, 0.4); --card-subtle: rgba(255, 255, 255, 0.19);
  --card-border: rgba(255, 255, 255, 0.12); --on-muted: rgba(255, 255, 255, 0.78);
  position: relative; flex: none; width: var(--phone-w); aspect-ratio: 390 / 844;
  padding: calc(var(--phone-w) * 0.026); border-radius: calc(var(--phone-w) * 0.141);
  background: #14161f; color: #fff; text-align: left;
  box-shadow: inset 0 0 0 2px #8f95a8, inset 0 0 0 4px #2a2d3a, 0 40px 80px rgba(0, 20, 120, 0.45);
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; border-radius: 2px; background: #5d6376; }
.phone::before { left: -3px; top: 17%; height: 8%; box-shadow: 0 calc(var(--phone-w) * 0.19) 0 #5d6376; }
.phone::after { right: -3px; top: 24%; height: 13%; }
.phone__screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--phone-w) * 0.115); background: var(--canvas); container-type: size; }
.phone__screen::before { content: ""; position: absolute; z-index: 20; left: 50%; top: 2.2%; width: 30%; height: 3.6%; margin-left: -15%; border-radius: var(--r-full); background: #000; }
.phone__screen::after { content: ""; position: absolute; inset: 0; z-index: 19; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0) calc(var(--sh, 10%) - 28%), rgba(255, 255, 255, 0.13) var(--sh, 10%), rgba(255, 255, 255, 0) calc(var(--sh, 10%) + 22%)); }

.board { position: absolute; inset: 0; background: var(--canvas); overflow: hidden; }
.board__rail { position: absolute; top: 0; bottom: 0; left: var(--x); width: max(1.5px, 0.64cqw); margin-left: calc(max(1.5px, 0.64cqw) / -2); background: linear-gradient(to bottom, transparent 0, #fff 30%); }
.board__rail:nth-of-type(1) { --x: 14%; } .board__rail:nth-of-type(2) { --x: 38%; }
.board__rail:nth-of-type(3) { --x: 62%; } .board__rail:nth-of-type(4) { --x: 86%; }
.board__hit { position: absolute; left: 0; right: 0; top: 70%; height: max(1.5px, 0.64cqw); background: var(--card-border); }
.board__fade { position: absolute; inset: 0 0 70% 0; z-index: 3; background: linear-gradient(to bottom, var(--canvas), transparent); }
.note { position: absolute; top: 0; left: var(--x); z-index: 1; width: 15.4cqw; height: 15.4cqw; margin-left: -7.7cqw; border-radius: var(--r-full); background: #f0f0f0; transform: translate3d(0, -40cqh, 0); will-change: transform; transition: opacity var(--t-fast) linear; }
.note--hold { height: calc(var(--len) * 1cqh); }
.note.is-hit { opacity: 0; }
.hud { position: absolute; z-index: 5; left: 5cqw; right: 5cqw; top: 8cqh; display: flex; align-items: center; justify-content: space-between; }
.hud__btn { width: 9.5cqw; height: 9.5cqw; border-radius: var(--r-full); background: var(--card); display: grid; place-items: center; color: #fff; }
.hud__btn svg { width: 5.2cqw; height: 5.2cqw; }
.hud__score { text-align: center; }
.hud__score b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 15cqw; line-height: 1; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.hud__score small { display: block; margin-top: 1cqw; font-size: 3.3cqw; font-weight: 700; letter-spacing: 0.12em; color: var(--on-muted); }
.fb { position: absolute; z-index: 4; left: 50%; top: 63%; opacity: 0; pointer-events: none; font-family: var(--font-display); font-size: 6.2cqw; letter-spacing: var(--track-badge); text-transform: uppercase; transform: translateX(-50%); }

/* ---------- Studio ---------- */
.studio { display: grid; gap: var(--s-xl); margin-top: var(--s-xl); }
.studio__lead { font-size: clamp(1.4rem, 3.6vw, 2.4rem); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; max-width: 30ch; text-wrap: balance; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.stats li { padding: var(--s-lg) var(--s-sm) 0 0; }
.stats li + li { padding-left: var(--s-md); border-left: 1px solid var(--rule); }
.stats b { display: block; font-weight: 400; font-size: clamp(3rem, 12vw, 6.5rem); color: var(--accent); font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: var(--s-sm); font-size: 0.8125rem; font-weight: 600; color: var(--muted); max-width: 18ch; }

.rows { margin-top: var(--s-xl); }
.row { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s-lg); padding-block: var(--s-xl); border-top: 1px solid var(--rule); }
.row__n { font-size: 1rem; letter-spacing: var(--track-badge); color: var(--muted); padding-top: 0.5em; transition: color var(--t-base); }
.row__t h3 { font-size: clamp(2.1rem, 7vw, 3.4rem); line-height: 1; }
.row__t p { margin-top: var(--s-sm); max-width: 44ch; color: var(--muted); font-size: 1.0625rem; }
@media (hover: hover) { .row:hover .row__n { color: var(--accent); } }

/* ---------- Games ---------- */
/* Featured band: full-bleed Composer blue, the lane grid, the game rising from the bottom edge */
.spot {
  position: relative; overflow: hidden; isolation: isolate; display: block;
  margin: var(--s-xl) calc(50% - 50vw) 0; padding-inline: var(--gutter);
  background: var(--blue); color: #fff; text-decoration: none;
}
.spot__rails { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)) 14% 0 / 1px 100% no-repeat,
  linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)) 38% 0 / 1px 100% no-repeat,
  linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)) 62% 0 / 1px 100% no-repeat,
  linear-gradient(rgba(255,255,255,.14), rgba(255,255,255,.14)) 86% 0 / 1px 100% no-repeat; }
.spot__inner { display: block; width: var(--shell); margin-inline: auto; padding-top: var(--s-xl); container-type: inline-size; }
.spot__top { display: grid; gap: var(--s-md); }
.spot__label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }
.spot__name { display: block; font-size: 17.2cqw; line-height: 0.88; margin-left: -0.03em; white-space: nowrap; }
.spot__cols { display: grid; gap: var(--s-xl); margin-top: var(--s-xl); }
.spot__main { display: grid; gap: var(--s-lg); align-content: start; justify-items: start; }
.spot__text { display: block; max-width: 34ch; font-size: clamp(1.0625rem, 2.4vw, 1.3125rem); color: rgba(255, 255, 255, 0.88); }
.spot__go { font-weight: 700; padding-bottom: 2px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; transition: background-size var(--t-base) var(--ease-out); }
.spot:hover .spot__go { background-size: 0 1.5px; background-position: 100% 100%; }
.spot__phone { display: flex; justify-content: center; height: clamp(300px, 80vw, 420px); overflow: hidden; }
.spot__tilt { display: block; transform: perspective(1400px) rotateY(-8deg) rotateX(3deg); transform-origin: 50% 100%; will-change: transform; }
.spot .phone, .spot .phone__screen, .spot .board__notes { display: block; }
.spot .hud__score { display: block; }

/* ---------- Games: an editorial index, not a card grid ---------- */
.games { margin-top: var(--s-xl); border-bottom: 1px solid var(--rule); }
.game { display: grid; grid-template-columns: 3rem 1fr; column-gap: var(--s-md); row-gap: var(--s-md); padding-block: var(--s-xl); border-top: 1px solid var(--rule); }
.game > :not(.game__n) { grid-column: 2; }
.game__n { font-size: 1rem; letter-spacing: var(--track-badge); color: var(--muted); padding-top: 0.45em; transition: color var(--t-base); }
.game__top { display: flex; align-items: center; gap: var(--s-md); }
.game__icon { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.game__name { font-size: clamp(2rem, 7vw, 3rem); }
.game__genre { margin-top: 4px; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.game__text { max-width: 44ch; color: var(--muted); font-size: 1.0625rem; }
.game__side { display: grid; gap: var(--s-sm); align-content: start; justify-items: start; }
.game__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-sm); }
.store { display: block; border-radius: 8px; }
.store--soon { opacity: 0.4; }
.game__soon { flex-basis: 100%; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.game__legal { font-size: 0.8125rem; color: var(--muted); }
.game__legal a:hover { color: var(--fg); }
.game__next { color: var(--accent); }
.game__mail { font-weight: 700; text-underline-offset: 3px; }
@media (hover: hover) { .game:hover .game__n { color: var(--accent); } }

/* ---------- Process ---------- */
.steps { display: grid; margin-top: var(--s-xl); border-top: 1px solid var(--rule); }
.step { padding-block: var(--s-xl); border-bottom: 1px solid var(--rule); }
.step__n { font-size: 1rem; letter-spacing: var(--track-badge); color: var(--accent); }
.step h3 { font-size: clamp(2.6rem, 11vw, 4.2rem); margin-top: var(--s-sm); }
.step p { margin-top: var(--s-md); max-width: 32ch; color: var(--muted); font-size: 1.0625rem; }

/* ---------- Contact ---------- */
.contact { padding-block: var(--s-section); background: var(--bg-alt); }
.contact__lead { margin-top: var(--s-xl); max-width: 34ch; font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 600; line-height: 1.3; }
.topics { display: flex; flex-wrap: wrap; gap: var(--s-sm); margin-top: var(--s-lg); }
.topics a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: var(--r-full); box-shadow: inset 0 0 0 1.5px var(--rule); font-weight: 600; text-decoration: none; transition: background var(--t-fast), color var(--t-fast); }
.topics a:hover { background: var(--accent); color: var(--accent-fg); box-shadow: none; }
.contact__mail { display: inline-block; margin-top: var(--s-xl); font-size: clamp(1.5rem, 6.4vw, 4.6rem); text-decoration: none; color: var(--accent); overflow-wrap: anywhere; text-transform: none; letter-spacing: 0; }
.contact__mail:hover { text-decoration: underline; text-underline-offset: 0.12em; }

/* ---------- Footer ---------- */
.foot { background: var(--bg); padding: var(--s-section) 0 var(--s-xl); border-top: 1px solid var(--rule); }
.foot__logo { width: min(100%, 560px); margin-inline: auto; color: var(--fg); }
.foot__row { margin-top: var(--s-xl); display: flex; flex-direction: column; align-items: center; gap: var(--s-md); text-align: center; color: var(--muted); font-size: 0.9375rem; }
.foot__row nav { display: flex; flex-wrap: wrap; justify-content: center; }
.foot__row a { display: inline-flex; align-items: center; min-height: 48px; padding-inline: 14px; font-weight: 600; text-decoration: none; }
.foot__row a:hover { color: var(--fg); text-decoration: underline; }

/* ---------- Reveal on scroll (hidden only once the script runs) ---------- */
.js .reveal { opacity: 0; transform: translate3d(0, 32px, 0); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * var(--stagger)); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Breakpoints ---------- */
@media (min-width: 40rem) {
  :root { --phone-w: clamp(220px, 34vw, 280px); }
  .hero__title { font-size: min(15.4cqw, 17.5svh); }
  .hero__title b { white-space: nowrap; }
  .row { grid-template-columns: 3.5rem 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: var(--s-xl); }
  .hero__row { grid-template-columns: 1fr auto; align-items: end; column-gap: var(--s-xl); }
}
@media (min-width: 52rem) {
  .bar__links { display: flex; }
}
@media (min-width: 64rem) {
  :root { --phone-w: clamp(240px, 22vw, 300px); }
  .hero { padding-top: 112px; }
  .latest__inner { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-lg); align-items: start; padding-block: var(--s-xl) var(--s-xl); min-height: 210px; }
  .latest__main { grid-column: 1 / 7; }
  .latest__name { font-size: min(6.1vw, 5.2rem); }
  .latest__side { grid-column: 7 / 10; align-self: end; }
  .latest__phone { position: absolute; top: -44px; right: 2%; width: auto; height: auto; display: block; overflow: visible; }
  .latest .phone { --phone-w: clamp(210px, 17vw, 250px); }
  .spot { padding-bottom: 0; }
  .spot__cols { grid-template-columns: 5fr 4fr; align-items: stretch; }
  .spot__main { align-content: center; padding-bottom: var(--s-xl); }
  .spot__phone { align-self: end; }
  .spot__phone { height: clamp(360px, 36vw, 520px); justify-content: flex-end; margin-right: 6%; }
  .game { grid-template-columns: 5rem minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 0.9fr); column-gap: var(--s-lg); align-items: start; }
  .game > :not(.game__n) { grid-column: auto; }
  .head { grid-template-columns: 1fr 3fr; align-items: start; gap: var(--s-xl); }
  .idx { padding-top: 0.6em; }
  .studio { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s-lg); align-items: end; }
  .studio__lead { grid-column: 1 / 7; }
  .stats { grid-column: 8 / 13; }
  .row { grid-template-columns: 5rem minmax(0, 1fr); padding-block: 40px; }
  .steps { grid-template-columns: repeat(4, 1fr); border-top: 0; }
  .step { padding-right: var(--s-lg); border-top: 1px solid var(--rule); border-bottom: 0; }
  .contact .head, .contact__lead, .topics, .contact__mail { position: relative; }
}
@media (max-width: 30rem) {
  .bar__inner { padding-left: 16px; gap: var(--s-sm); }
  .brand .wm { width: 108px; }
  .bar__end { gap: 2px; }
  .btn--sm { padding-inline: 14px; font-size: 0.9375rem; }
}

section[id] { scroll-margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  .hero__kind, .hero__title b, .hero__row, .latest { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .bar { transition: none; }
}
