/* UltraFlow Games — studio site v4
   Built like a dev tool: one frame, hairline grid, mono for metadata, real captures for imagery. */

:root {
  --bg: #0c0d0e;
  --bg-2: #121315;
  --bg-3: #18191c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --fg: #ecebe6;
  --fg-2: #a9a8a3;
  --mute: #74736f;
  --accent: #ff5a1f;
  --accent-ink: #160800;
  --ok: #4ade80;
  --warn: #ffc94a;

  --f-body: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --t-xs: 0.75rem;
  --t-sm: 0.875rem;
  --t-base: 1rem;
  --t-lg: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --t-xl: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  --t-2xl: clamp(2rem, 1.3rem + 2.6vw, 3.5rem);
  --t-hero: clamp(2.75rem, 1.2rem + 5.2vw, 5.75rem);

  --pad: clamp(1.25rem, 0.6rem + 2.4vw, 2.5rem);
  --max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 60px;
  --r: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--f-body); font-size: var(--t-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd { font-family: var(--f-mono); font-size: 0.9em; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 0.05rem 0.4rem; color: var(--fg); background: var(--bg-3); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }

/* The frame: content column with hairline rails on both sides */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }
.frame { max-width: var(--max); margin-inline: auto; border-inline: 1px solid var(--line); }
.mono { font-family: var(--f-mono); font-size: var(--t-xs); letter-spacing: 0.02em; }
.mute { color: var(--mute); }
.fg2 { color: var(--fg-2); }
.accent { color: var(--accent); }

/* ------------------------------------------------ header */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: rgba(12, 13, 14, 0.82); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); border-bottom: 1px solid var(--line); }
.nav { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: 1rem; letter-spacing: -0.02em; line-height: 1; }
.brand svg { width: 26px; height: 26px; flex: none; }
.brand .g { color: var(--mute); font-weight: 500; }
.nav-links { display: flex; gap: 0.15rem; margin-left: auto; font-family: var(--f-mono); font-size: 0.8125rem; }
.nav-links a { display: block; padding: 0.4rem 0.7rem; color: var(--fg-2); border-radius: 6px; transition: color .2s, background-color .2s; }
.nav-links a:hover { color: var(--fg); background: var(--bg-3); }
.nav-links a[aria-current="page"] { color: var(--fg); }
.nav-links a[aria-current="page"]::before { content: '/'; color: var(--accent); margin-right: 0.15rem; }
.status-chip { display: inline-flex; align-items: center; gap: 0.5rem; height: 32px; padding: 0 0.8rem; border: 1px solid var(--line-2); border-radius: 999px; font-family: var(--f-mono); font-size: 0.75rem; color: var(--fg-2); transition: border-color .2s, color .2s; white-space: nowrap; }
.status-chip:hover { border-color: var(--fg-2); color: var(--fg); }
.led { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15); flex: none; }
.led.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 201, 74, 0.15); }
.led.orange { background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.15); }
.menu-btn { display: none; margin-left: auto; width: 40px; height: 40px; border: 1px solid var(--line-2); background: transparent; border-radius: 8px; cursor: pointer; position: relative; }
.menu-btn span, .menu-btn span::before { position: absolute; left: 11px; right: 11px; height: 1.5px; background: var(--fg); transition: transform .3s var(--ease); content: ''; }
.menu-btn span { top: 16px; }
.menu-btn span::before { left: 0; right: 0; top: 7px; }
.menu-open .menu-btn span { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-btn span::before { transform: translateY(-7px) rotate(-90deg); }

/* ------------------------------------------------ buttons */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; gap: 0.6rem; height: var(--h); padding: 0 1.1rem;
  border-radius: 8px; font-weight: 500; font-size: var(--t-sm); white-space: nowrap;
  background: var(--fg); color: var(--bg); border: 1px solid var(--fg); cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn:hover svg { transform: translateX(2px); }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--bg-3); border-color: var(--fg-2); color: var(--fg); }
.btn-sm { --h: 34px; padding: 0 0.8rem; font-size: 0.8125rem; }
.btn .k { font-family: var(--f-mono); font-size: 0.6875rem; opacity: .6; border: 1px solid currentColor; border-radius: 4px; padding: 0 0.3rem; line-height: 1.4; }
.link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: text-decoration-color .2s, color .2s; }
.link:hover { color: var(--accent); text-decoration-color: var(--accent); }
.link svg { width: 14px; height: 14px; }

/* ------------------------------------------------ section scaffolding */
.sec { border-top: 1px solid var(--line); }
.sec-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 44px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); }
.sec-bar b { color: var(--fg-2); font-weight: 500; }
main { counter-reset: sec; }
.sec-bar { counter-increment: sec; }
.sec-bar b::before { content: counter(sec, decimal-leading-zero) ' / '; color: var(--accent); }
.sec-body { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.h2 { font-size: var(--t-2xl); letter-spacing: -0.04em; }
.lead { font-size: var(--t-lg); color: var(--fg-2); max-width: 54ch; line-height: 1.55; }

/* ------------------------------------------------ hero */
.hero { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(3rem, 2rem + 4vw, 5.5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--f-mono); font-size: 0.75rem; color: var(--fg-2); margin-bottom: 1.75rem; }
.kicker .sep { color: var(--mute); }
.hero h1 { font-size: var(--t-hero); letter-spacing: -0.05em; line-height: 0.95; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--mute); }
.hero .lead { margin-top: 1.5rem; }
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 2.25rem; font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); }
.hero-meta span { display: inline-flex; align-items: center; gap: 0.45rem; }

/* window: a capture framed like an app window */
.win { display: block; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7); }
.win-bar { display: flex; align-items: center; gap: 0.75rem; height: 36px; padding: 0 0.85rem; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 0.6875rem; color: var(--mute); }
.win-bar .dots { display: flex; gap: 6px; }
.win-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-3); border: 1px solid var(--line-2); }
.win-bar .path { color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-bar .r { margin-left: auto; display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; }
.win-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.win-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
a.win:hover .win-media img { transform: scale(1.025); }
.win-foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.win-foot div { padding: 0.75rem 0.85rem; border-left: 1px solid var(--line); min-width: 0; }
.win-foot div:first-child { border-left: 0; }
.win-foot dt { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--mute); }
.win-foot dd { margin: 0.15rem 0 0; font-size: 0.8125rem; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------ feature (ragdoll clash on home) */
.feature { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.feature-copy h2 { font-size: var(--t-2xl); letter-spacing: -0.04em; }
.feature-copy .lead { margin-top: 1.25rem; }
.thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.6rem; }
.thumbs figure { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; background: #000; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.kv { margin: 1.75rem 0 0; border-top: 1px solid var(--line); }
.kv div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.kv dt { font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); padding-top: 0.1rem; }
.kv dd { margin: 0; color: var(--fg); }

/* ------------------------------------------------ workbench (issue-tracker list) */
.bench { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.bench-head, .bench li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) minmax(0, 1.3fr) 6.5rem; gap: 1.25rem; align-items: baseline; padding: 1rem 1.25rem; }
.bench-head { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--mute); background: var(--bg-2); border-bottom: 1px solid var(--line); padding-block: 0.6rem; }
.bench li { border-bottom: 1px solid var(--line); transition: background-color .2s; }
.bench li:last-child { border-bottom: 0; }
.bench li:hover { background: var(--bg-2); }
.bench h3 { font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.35; }
.bench p { font-size: var(--t-sm); color: var(--fg-2); }
.bench .area { font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); text-align: right; }
.tag { display: inline-flex; align-items: center; gap: 0.45rem; font-family: var(--f-mono); font-size: 0.75rem; color: var(--fg-2); white-space: nowrap; }

/* ------------------------------------------------ arcade cabinets */
.arcade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.cab { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-2); transition: border-color .25s; }
.cab:hover { border-color: var(--line-2); }
.cab-screen { position: relative; aspect-ratio: 16 / 10; background: #000; border-bottom: 1px solid var(--line); }
.cab-screen canvas { width: 100%; height: 100%; }
.cab-screen .live { position: absolute; top: 0.75rem; right: 0.75rem; }
.cab-body { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem 1.25rem; }
.cab h3 { font-size: var(--t-xl); letter-spacing: -0.03em; }
.cab p { color: var(--fg-2); font-size: var(--t-sm); margin-top: 0.35rem; max-width: 44ch; }
.cab .go { flex: none; width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line-2); transition: background-color .2s, border-color .2s, color .2s; }
.cab .go svg { width: 16px; height: 16px; }
.cab:hover .go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pill { display: inline-flex; align-items: center; gap: 0.45rem; height: 26px; padding: 0 0.6rem; border-radius: 6px; background: rgba(12, 13, 14, 0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid var(--line-2); font-family: var(--f-mono); font-size: 0.6875rem; color: var(--fg); white-space: nowrap; }

/* ------------------------------------------------ principles (three columns, code-comment headings) */
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); }
.cols3 > div { padding: 1.5rem 1.4rem 1.75rem; border-left: 1px solid var(--line); }
.cols3 > div:first-child { border-left: 0; }
.cols3 .c { font-family: var(--f-mono); font-size: 0.75rem; color: var(--accent); }
.cols3 h3 { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.015em; margin-top: 0.9rem; }
.cols3 p { font-size: var(--t-sm); color: var(--fg-2); margin-top: 0.5rem; }

/* ------------------------------------------------ contact strip */
.strip { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: end; }
.strip h2 { font-size: var(--t-2xl); letter-spacing: -0.04em; }
.mailbox { border: 1px solid var(--line); border-radius: var(--r); }
.mailbox a, .mailbox div { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.95rem 1.1rem; border-bottom: 1px solid var(--line); font-size: var(--t-sm); transition: background-color .2s; }
.mailbox > :last-child { border-bottom: 0; }
.mailbox a:hover { background: var(--bg-2); }
.mailbox span:first-child { font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); white-space: nowrap; }
.mailbox b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }

/* ------------------------------------------------ page hero (inner pages) */
.page-hero { padding-block: clamp(2.5rem, 1.5rem + 3.5vw, 4.5rem) clamp(2rem, 1.5rem + 2vw, 3rem); }
.crumbs { display: flex; gap: 0.5rem; flex-wrap: wrap; font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); margin-bottom: 1.5rem; }
.crumbs a { color: var(--fg-2); }
.crumbs a:hover { color: var(--fg); }
.page-hero h1 { font-size: var(--t-hero); letter-spacing: -0.05em; line-height: 0.95; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: end; }

/* ------------------------------------------------ game page */
.app-id { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.5rem; }
.app-id img { width: 56px; height: 56px; border-radius: 13px; border: 1px solid var(--line-2); }
.app-id b { display: block; font-weight: 500; }
.app-id span { display: block; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; counter-reset: s; }
.steps li { border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; background: var(--bg-2); }
.steps .n { font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); }
.steps h3 { font-size: 1.25rem; margin-top: 2.5rem; letter-spacing: -0.02em; }
.steps p { color: var(--fg-2); font-size: var(--t-sm); margin-top: 0.5rem; }
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.75rem; }
.gallery figure { position: relative; margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #000; }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: 0.75rem; bottom: 0.75rem; }
.g-a { grid-column: span 4; aspect-ratio: 16 / 9; }
.g-b { grid-column: span 2; }
.g-c, .g-d, .g-e { grid-column: span 2; aspect-ratio: 16 / 10; }
.tech { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2.5rem; }
.code { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); overflow: hidden; }
.code pre { margin: 0; padding: 1.25rem 1.25rem 1.4rem; font-family: var(--f-mono); font-size: 0.8125rem; line-height: 1.75; color: var(--fg-2); overflow-x: auto; }
.code .k { color: var(--accent); }
.code .s { color: #9fd6a8; }
.code .c { color: var(--mute); }

/* ------------------------------------------------ split / forms / faq */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.25rem, 2.5vw, 2rem); }
.form { display: grid; gap: 1.1rem; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: 0.45rem; }
.field label { font-family: var(--f-mono); font-size: 0.75rem; color: var(--fg-2); }
.field input, .field select, .field textarea { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 0.75rem 0.85rem; font-size: 1rem; transition: border-color .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.form-status { font-size: var(--t-sm); min-height: 1.4em; color: var(--fg-2); }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #ff8a7a; }
.form-status a { text-decoration: underline; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; padding: 1.1rem 0; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { flex: none; font-style: normal; font-family: var(--f-mono); color: var(--mute); }
.faq summary i::before { content: '+'; }
.faq details[open] summary i::before { content: '−'; }
.faq p { color: var(--fg-2); padding-bottom: 1.2rem; max-width: 62ch; }

/* ------------------------------------------------ about */
.stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); }
.stack > div { padding: 1.4rem; border-left: 1px solid var(--line); }
.stack > div:first-child { border-left: 0; }
.stack ul { margin-top: 0.9rem; display: grid; gap: 0.4rem; }
.stack li { font-size: var(--t-sm); color: var(--fg-2); }
.stack li::before { content: '– '; color: var(--mute); }
.log { border-left: 1px solid var(--line-2); margin-left: 0.3rem; }
.log li { position: relative; padding: 0 0 2rem 1.5rem; }
.log li::before { content: ''; position: absolute; left: -4px; top: 0.45rem; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); border: 1px solid var(--fg-2); }
.log li:last-child::before { background: var(--accent); border-color: var(--accent); }
.log .when { font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); }
.log h3 { font-size: 1.0625rem; font-weight: 500; margin-top: 0.25rem; letter-spacing: -0.01em; }
.log p { font-size: var(--t-sm); color: var(--fg-2); margin-top: 0.3rem; }
.log a { text-decoration: underline; text-underline-offset: 3px; }
.quote { margin: 2rem 0 0; padding-left: 1.1rem; border-left: 2px solid var(--accent); font-size: var(--t-lg); color: var(--fg); }
.quote cite { display: block; margin-top: 0.6rem; font-style: normal; font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); }

/* ------------------------------------------------ play page */
.play-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.play-tabs { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; gap: 3px; }
.play-tabs button { border: 0; background: transparent; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; font-size: var(--t-sm); color: var(--fg-2); transition: background-color .2s, color .2s; }
.play-tabs button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.play-tabs button:not([aria-selected="true"]):hover { color: var(--fg); background: var(--bg-3); }
.sound { font-family: var(--f-mono); }
.sound svg { width: 15px; height: 15px; }
.game-shell { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.stage { position: relative; aspect-ratio: 16 / 10; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: #000; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.stage canvas { width: 100%; height: 100%; cursor: pointer; }
.stage canvas:focus-visible { outline: none; }
.stage:has(canvas:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem; background: rgba(12, 13, 14, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); text-align: center; transition: opacity .25s; }
.overlay.hide { opacity: 0; pointer-events: none; }
.overlay > div { max-width: 420px; }
.ov-kicker { font-family: var(--f-mono); font-size: 0.75rem; color: var(--accent); }
.overlay h2 { font-size: var(--t-2xl); letter-spacing: -0.04em; margin-top: 0.5rem; }
.ov-stars { font-size: 1.75rem; letter-spacing: 0.2em; color: var(--warn); margin-top: 0.6rem; }
.overlay p { color: var(--fg-2); margin-top: 0.75rem; font-size: var(--t-sm); }
.ov-actions { display: flex; gap: 0.5rem; justify-content: center; margin-top: 1.4rem; flex-wrap: wrap; }
.hud { display: grid; gap: 1rem; }
.hud-stats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.hud-stats div { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); }
.hud-stats div:nth-child(odd) { border-left: 0; }
.hud-stats div:nth-last-child(-n+2) { border-bottom: 0; }
.hud-stats b { display: block; font-family: var(--f-mono); font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.hud-stats span { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--mute); }
.levels-box { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.levels-box h3, .help h3 { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 0.75rem; font-weight: 500; color: var(--fg-2); letter-spacing: 0; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.levels { display: grid; max-height: 360px; overflow-y: auto; }
.lv { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; text-align: left; padding: 0.55rem 0.9rem; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 0.8125rem; color: var(--fg); transition: background-color .15s; }
.lv:last-child { border-bottom: 0; }
.lv:hover:not(:disabled) { background: var(--bg-3); }
.lv.on { background: var(--bg-3); box-shadow: inset 2px 0 0 var(--accent); }
.lv b { font-family: var(--f-mono); font-weight: 500; color: var(--mute); }
.lv span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv i { font-style: normal; color: var(--warn); letter-spacing: 0.08em; font-size: 0.75rem; }
.lv:disabled { cursor: not-allowed; color: var(--mute); }
.lv:disabled span { font-family: var(--f-mono); font-size: 0.75rem; }
.help { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.help ul { padding: 0.8rem 0.9rem; display: grid; gap: 0.45rem; font-size: 0.8125rem; color: var(--fg-2); }

/* ------------------------------------------------ legal */
.policy-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; }
.toc b { display: block; margin-bottom: 0.6rem; color: var(--mute); font-weight: 500; }
.toc ol { display: grid; gap: 0.35rem; font-size: var(--t-sm); color: var(--fg-2); }
.toc a:hover { color: var(--fg); }
.prose { max-width: 70ch; }
.prose h2 { font-size: var(--t-xl); margin: 2.75rem 0 0.9rem; letter-spacing: -0.025em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--fg-2); }
.prose p + p { margin-top: 0.9rem; }
.prose ul { margin: 0.9rem 0; display: grid; gap: 0.4rem; padding-left: 1.1rem; list-style: disc; }
.prose a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose b { color: var(--fg); font-weight: 500; }
.prose code { color: var(--fg); background: var(--bg-3); padding: 0.1rem 0.35rem; border-radius: 4px; }

/* ------------------------------------------------ 404 */
.lost { text-align: center; padding-block: clamp(5rem, 12vw, 10rem); }
.lost .big { display: block; font-family: var(--f-mono); font-size: clamp(5rem, 16vw, 11rem); font-weight: 500; letter-spacing: -0.06em; line-height: 1; color: var(--fg); }
.lost .big span { color: var(--accent); }
.lost .lead { margin-inline: auto; }
.lost .actions { justify-content: center; }

/* ------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 2rem; padding-block: 3rem 2.5rem; }
.foot-about p { margin-top: 1rem; color: var(--fg-2); font-size: var(--t-sm); max-width: 36ch; }
.site-footer h3 { font-family: var(--f-mono); font-size: 0.75rem; font-weight: 500; color: var(--mute); letter-spacing: 0; margin-bottom: 0.9rem; }
.site-footer ul { display: grid; gap: 0.45rem; font-size: var(--t-sm); color: var(--fg-2); }
.site-footer ul a:hover { color: var(--fg); }
.foot-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; padding-block: 1rem 1.25rem; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 0.75rem; color: var(--mute); }
.foot-bottom .sb { display: flex; gap: 1.25rem; flex-wrap: wrap; align-items: center; }
.foot-bottom .sb span { display: inline-flex; align-items: center; gap: 0.45rem; }

/* ------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .hero-grid, .feature, .tech { grid-template-columns: minmax(0, 1fr); }
  .game-shell { grid-template-columns: minmax(0, 1fr); }
  .hud { grid-template-columns: 1fr 1fr; }
  .hud-stats { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .hud-stats div { border-bottom: 0; border-left: 1px solid var(--line); }
  .hud-stats div:first-child { border-left: 0; }
  .bench-head { display: none; }
  .bench li { grid-template-columns: 7.5rem minmax(0, 1fr); row-gap: 0.35rem; }
  .bench li p { grid-column: 2; }
  .bench .area { display: none; }
}
@media (max-width: 860px) {
  .nav-links, .nav .status-chip { display: none; }
  .menu-btn { display: block; }
  .menu-open .nav-links { display: grid; position: fixed; top: var(--header-h); left: 0; right: 0; padding: 0.75rem var(--pad) 1.25rem; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 1rem; gap: 0.1rem; }
  .menu-open .nav-links a { padding: 0.75rem 0.5rem; }
  .sec-head, .page-hero-grid, .strip, .split { grid-template-columns: minmax(0, 1fr); }
  .arcade, .steps, .cols3, .stack { grid-template-columns: minmax(0, 1fr); }
  .cols3 > div, .stack > div { border-left: 0; border-top: 1px solid var(--line); }
  .cols3 > div:first-child, .stack > div:first-child { border-top: 0; }
  .steps h3 { margin-top: 1.25rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-a { grid-column: 1 / -1; }
  .g-b, .g-c, .g-d, .g-e { grid-column: span 1; aspect-ratio: 16 / 10; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
  .policy-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .win-foot { grid-template-columns: 1fr 1fr; }
  .win-foot div:nth-child(3) { border-left: 0; }
  .win-foot div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .hud { grid-template-columns: minmax(0, 1fr); }
  .hud-stats { grid-template-columns: 1fr 1fr; }
  .hud-stats div:nth-child(3) { border-left: 0; }
  .hud-stats div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .bench li { grid-template-columns: minmax(0, 1fr); }
  .bench li p { grid-column: 1; }
  .kv div { grid-template-columns: 7rem minmax(0, 1fr); }
  .form .two { grid-template-columns: minmax(0, 1fr); }
  .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.4rem; }
  .stage { aspect-ratio: 4 / 5; }
  .cab-screen { aspect-ratio: 4 / 3; }
  .win-bar .r { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------ level tiles + records (v5) */
.levels.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.35rem; padding: 0.75rem 0.9rem 0.9rem; max-height: none; }
.levels.tiles .lv-world { grid-column: 1 / -1; margin: 0.45rem 0 0.1rem; font-family: var(--f-mono); font-size: 0.6875rem; color: var(--mute); }
.levels.tiles .lv-world:first-child { margin-top: 0; }
.levels.tiles .lv { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; padding: 0.45rem 0.2rem; border: 1px solid var(--line); border-radius: 6px; min-height: 2.9rem; }
.levels.tiles .lv:last-child { border-bottom: 1px solid var(--line); }
.levels.tiles .lv b { color: var(--fg); font-size: 0.8125rem; }
.levels.tiles .lv i { font-size: 0.5625rem; letter-spacing: 0.02em; }
.levels.tiles .lv.on { border-color: var(--accent); box-shadow: none; }
.levels.tiles .lv:disabled b { color: var(--mute); }
.levels.tiles .lv:disabled::after { content: ""; width: 0.55rem; height: 0.4rem; border: 1.5px solid var(--mute); border-radius: 2px; opacity: 0.6; }
.records { display: grid; grid-template-columns: 1fr 1fr; }
.records div { padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--line); border-left: 1px solid var(--line); min-width: 0; }
.records div:nth-child(odd) { border-left: 0; }
.records div:nth-last-child(-n+2) { border-bottom: 0; }
.records dt { font-family: var(--f-mono); font-size: 0.6875rem; color: var(--mute); }
.records dd { margin-top: 0.2rem; font-family: var(--f-mono); font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- v5: media, ticker, modes, controls ---------- */
.win-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.rec { display: inline-flex; align-items: center; gap: .45rem; font-family: var(--f-mono); font-size: .7rem; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; }
.rec b { color: var(--fg-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.led.red { background: #ff3b3b; box-shadow: 0 0 0 3px rgba(255, 59, 59, .18); animation: blink 1.4s steps(2, start) infinite; }
@keyframes blink { to { opacity: .25; } }
.unmute { font: inherit; font-family: var(--f-mono); font-size: .7rem; color: var(--fg-2); background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 999px; padding: .2rem .65rem; cursor: pointer; transition: background-color .2s, color .2s; }
.unmute:hover, .unmute[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--bg-2); -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; align-items: center; gap: 1.6rem; padding: .95rem 0; animation: tick 38s linear infinite; font-family: var(--f-mono); font-size: .8rem; color: var(--fg-2); white-space: nowrap; text-transform: uppercase; letter-spacing: .08em; }
.ticker-track i { width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); flex: none; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }

.cols4 { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cols4 > div { padding: 1.6rem 1.4rem 1.8rem; border-right: 1px solid var(--line); background: var(--bg-2); position: relative; transition: background-color .3s; }
.cols4 > div:last-child { border-right: 0; }
.cols4 > div:hover { background: var(--bg-3); }
.cols4 .c { font-family: var(--f-mono); font-size: .75rem; color: var(--accent); }
.cols4 h3 { font-size: 1.15rem; margin: 2.2rem 0 .6rem; letter-spacing: -.02em; }
.cols4 p { color: var(--fg-2); font-size: .92rem; line-height: 1.55; }
.keys { border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-2); overflow: hidden; }
.keys dl { margin: 0; }
.keys dl div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; align-items: center; padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.keys dd { margin: 0; color: var(--fg-2); font-size: .92rem; }
kbd { display: inline-block; font-family: var(--f-mono); font-size: .75rem; color: var(--fg); background: var(--bg-3); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: .2rem .5rem; }
.loading-shot { margin-top: 2rem; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; aspect-ratio: 16/9; }
.loading-shot img { width: 100%; height: 100%; object-fit: cover; }
.foot-mail { margin-top: .8rem; font-family: var(--f-mono); font-size: .8rem; }
.foot-mail a { color: var(--fg-2); border-bottom: 1px solid var(--line-2); }
.foot-mail a:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 900px) {
  .cols4 { grid-template-columns: 1fr 1fr; }
  .cols4 > div:nth-child(2) { border-right: 0; }
  .cols4 > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .cols4 { grid-template-columns: 1fr; }
  .cols4 > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .keys dl div { grid-template-columns: 7.5rem 1fr; }
}

/* ---------- v5: motion ---------- */
.nav-links a { position: relative; }
.nav-links a::after { content: ''; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); }
.btn svg { transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.win, .cab { --mx: 50%; --my: 50%; }
.cab { position: relative; }
.cab::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 90, 31, .10), transparent 60%); }
.cab:hover::after { opacity: 1; }
.tilt { transition: transform .5s var(--ease); will-change: transform; }
.typing::after { content: '_'; color: var(--accent); animation: blink .8s steps(2, start) infinite; }
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
  .js .rv.in { opacity: 1; transform: none; }
  .js .hero h1 .ln { display: block; overflow: hidden; }
  .js .hero h1 .ln > span { display: block; transform: translateY(105%); animation: lineup 1s var(--ease) forwards; animation-delay: calc(.12s * var(--i, 0) + .1s); }
  .js .hero .lead, .js .hero .actions, .js .hero-meta { opacity: 0; animation: fadeup .9s var(--ease) .55s forwards; }
  @keyframes lineup { to { transform: none; } }
  @keyframes fadeup { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; padding-inline: 1rem; }
  .led.red, .typing::after { animation: none; }
}

/* =============================================================== v6 */
/* scroll progress + back to top */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; pointer-events: none; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--accent), #ffc94a); }
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 55; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: rgba(18, 19, 21, .9); border: 1px solid var(--line-2); color: var(--fg); cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .3s var(--ease), background-color .2s; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.to-top svg { width: 18px; height: 18px; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* hero background: drifting glow + masked grid */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-fx .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.hero-fx .o1 { width: 460px; height: 460px; left: var(--gx, 60%); top: var(--gy, 20%); translate: -50% -50%; background: radial-gradient(circle, rgba(255, 90, 31, .55), transparent 65%); transition: left 1.2s var(--ease), top 1.2s var(--ease); }
.hero-fx .o2 { width: 380px; height: 380px; left: -120px; bottom: -160px; background: radial-gradient(circle, rgba(47, 111, 224, .45), transparent 65%); animation: drift 14s ease-in-out infinite alternate; }
.grid-fx { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%); mask: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%); opacity: .7; }
@keyframes drift { to { transform: translate(120px, -60px) scale(1.15); } }
.hero .win { position: relative; }
.hero .win::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: conic-gradient(from var(--ang, 0deg), transparent 0 70%, var(--accent) 85%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; z-index: 2; animation: spinb 6s linear infinite; }
@property --ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spinb { to { --ang: 360deg; } }

/* Google Play badge */
.hero-badge { margin-top: 1.5rem; }
.gp-badge { display: inline-flex; align-items: center; gap: .7rem; height: 52px; padding: 0 1.1rem 0 .9rem; border-radius: 10px; background: #000; border: 1px solid var(--line-2); color: #fff; transition: border-color .2s, transform .3s var(--ease), box-shadow .3s; }
.gp-badge:hover { border-color: var(--fg-2); transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(255, 90, 31, .5); }
.gp-ico { width: 26px; height: 26px; }
.gp-badge span { display: grid; line-height: 1.05; }
.gp-badge small { font-family: var(--f-mono); font-size: .6rem; letter-spacing: .08em; color: var(--fg-2); }
.gp-badge b { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.gp-badge.soon small { color: var(--warn); }

/* stats strip */
.stats { border-top: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-grid > div { padding: clamp(1.5rem, 3vw, 2.4rem) 1.25rem; border-left: 1px solid var(--line); }
.stats-grid > div:first-child { border-left: 0; padding-left: 0; }
.stats-grid b { display: block; font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.75rem); font-weight: 600; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stats-grid b span { color: var(--fg); }
.stats-grid b { color: var(--accent); }
.stats-grid > div > span { display: block; margin-top: .6rem; font-family: var(--f-mono); font-size: .75rem; color: var(--mute); }


/* hero roster */
.roster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.hero-card { position: relative; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); overflow: hidden; transition: border-color .3s, transform .4s var(--ease); }
.hero-card:hover { border-color: var(--line-2); transform: translateY(-4px); }
.hero-card:first-child { grid-column: span 1; }
.hc-art { aspect-ratio: 4 / 3; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, rgba(141, 199, 63, .22), transparent 60%), linear-gradient(#17202b, #121315); border-bottom: 1px solid var(--line); }
.hc-art svg { width: 62%; height: auto; overflow: visible; }
.hc-art .fig { transition: transform .5s var(--ease); }
.hero-card:hover .fig { animation: wobble .9s var(--ease); }
@keyframes wobble { 20% { rotate: -9deg; } 45% { rotate: 7deg; } 70% { rotate: -3deg; } 100% { rotate: 0deg; } }
.hc-body { padding: 1rem 1.1rem 1.2rem; }
.hc-tag { font-family: var(--f-mono); font-size: .6875rem; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.hc-tag.prem { color: var(--warn); }
.hc-tag.prem::before { content: '\2605  '; }
.hero-card h3 { font-size: 1.2rem; letter-spacing: -.02em; margin-top: .35rem; }
.hero-card p { color: var(--fg-2); font-size: var(--t-sm); margin-top: .4rem; }

/* road to google play */
.road { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; --fill: 0; }
.road::before, .road::after { content: ''; position: absolute; left: 7px; right: 7px; top: 7px; height: 2px; background: var(--line-2); }
.road::after { background: linear-gradient(90deg, var(--ok), var(--accent)); transform-origin: left; transform: scaleX(var(--fill)); transition: transform 1.6s var(--ease); }
.road li { position: relative; z-index: 1; padding-top: 2rem; }
.rd-dot { position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-2); }
.rd-done .rd-dot { background: var(--ok); border-color: var(--ok); }
.rd-now .rd-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 0 rgba(255, 90, 31, .6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 12px rgba(255, 90, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, 0); } }
.rd-st { font-family: var(--f-mono); font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.rd-done .rd-st { color: var(--ok); }
.rd-now .rd-st { color: var(--accent); }
.road h3 { font-size: 1.15rem; letter-spacing: -.02em; margin-top: .4rem; }
.road p { color: var(--fg-2); font-size: var(--t-sm); margin-top: .4rem; max-width: 34ch; }
.road-cta { margin-top: clamp(2rem, 4vw, 3rem); display: flex; justify-content: space-between; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding: 1.25rem 1.4rem; border: 1px solid rgba(255, 90, 31, .35); border-radius: var(--r); background: linear-gradient(90deg, rgba(255, 90, 31, .1), transparent 70%); }
.road-cta p { max-width: 60ch; color: var(--fg); }

/* data safety */
.safety { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.safety li { padding: 1.4rem 1.4rem 1.6rem; border-left: 1px solid var(--line); border-top: 1px solid var(--line); background: var(--bg-2); transition: background-color .3s; }
.safety li:nth-child(3n+1) { border-left: 0; }
.safety li:nth-child(-n+3) { border-top: 0; }
.safety li:hover { background: var(--bg-3); }
.sf-ico { display: block; width: 22px; height: 22px; border-radius: 6px; background: rgba(74, 222, 128, .14); position: relative; }
.sf-ico::after { content: ''; position: absolute; left: 7px; top: 4px; width: 6px; height: 10px; border: solid var(--ok); border-width: 0 2px 2px 0; rotate: 45deg; }
.safety h3 { font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; margin-top: .9rem; }
.safety p { color: var(--fg-2); font-size: var(--t-sm); margin-top: .35rem; }

/* gallery lightbox */
[data-lightbox] figure { cursor: zoom-in; }
[data-lightbox] figure img { transition: transform .8s var(--ease), filter .4s; }
[data-lightbox] figure:hover img { transform: scale(1.04); }
.lb { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 4vmin; background: rgba(6, 6, 7, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.lb.open { opacity: 1; pointer-events: auto; }
.lb img { max-width: min(1400px, 100%); max-height: 82vh; width: auto; border-radius: var(--r); border: 1px solid var(--line-2); transform: scale(.96); transition: transform .4s var(--ease); }
.lb.open img { transform: none; }
.lb-cap { margin-top: .9rem; font-family: var(--f-mono); font-size: .75rem; color: var(--fg-2); text-align: center; }
.lb button { position: absolute; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line-2); background: rgba(18, 19, 21, .9); color: var(--fg); cursor: pointer; font-size: 1.1rem; }
.lb button:hover { background: var(--accent); color: var(--accent-ink); }
.lb .x { top: 16px; right: 16px; }
.lb .pv { left: 16px; top: 50%; translate: 0 -50%; }
.lb .nx { right: 16px; top: 50%; translate: 0 -50%; }

/* inner page hero intro + image reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .page-hero h1, .js .page-hero .lead, .js .page-hero .actions, .js .page-hero .app-id, .js .page-hero .hero-badge { opacity: 0; animation: fadeup .9s var(--ease) forwards; }
  .js .page-hero .app-id { animation-delay: .05s; }
  .js .page-hero h1 { animation-delay: .12s; }
  .js .page-hero .lead { animation-delay: .25s; }
  .js .page-hero .actions, .js .page-hero .hero-badge { animation-delay: .38s; }
  .js .hero .hero-badge { opacity: 0; animation: fadeup .9s var(--ease) .7s forwards; }
  .js .gallery figure.rv, .js .thumbs figure.rv, .js .loading-shot.rv { clip-path: inset(0 0 100% 0 round var(--r)); transform: none; transition: clip-path 1.1s var(--ease), opacity .6s; transition-delay: var(--d, 0s); }
  .js .gallery figure.rv.in, .js .thumbs figure.rv.in, .js .loading-shot.rv.in { clip-path: inset(0 0 0 0 round var(--r)); }
  .js .stats-grid > div { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
  .js .stats-grid.in > div { opacity: 1; transform: none; }
}

@media (max-width: 1080px) {
  .roster { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .road { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2rem; }
  .road::before, .road::after { display: none; }
}
@media (max-width: 860px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats-grid > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .safety { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .safety li { border-left: 1px solid var(--line) !important; border-top: 1px solid var(--line) !important; }
  .safety li:nth-child(2n+1) { border-left: 0 !important; }
  .safety li:nth-child(-n+2) { border-top: 0 !important; }
}
@media (max-width: 560px) {
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .hc-body { padding: .8rem .85rem 1rem; }
  .hero-card h3 { font-size: 1.05rem; }
  .road { grid-template-columns: minmax(0, 1fr); }
  .safety { grid-template-columns: minmax(0, 1fr); }
  .safety li { border-left: 0 !important; border-top: 1px solid var(--line) !important; }
  .safety li:first-child { border-top: 0 !important; }
  .stats-grid > div { padding-inline: .9rem; }
  .stats-grid > div:nth-child(odd) { padding-left: 0; }
  .to-top { right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-fx .o2, .hero .win::before, .rd-now .rd-dot { animation: none; }
}
