/* Neuronality, site stylesheet. No framework, no build step: edit and bump ASSET_VERSION in src/content/site.py.
   Map: 1 fonts & tokens, 2 base, 3 layout & type, 4 components, 5 header/footer, 6 home, 7 Neuronball,
   8 Starblast, 9 documents & 404, 10 motion, 11 responsive. Themes: body[data-theme=studio|nb|sb]. */

/* 1. Fonts & tokens ------------------------------------------------------ */
@font-face { font-family: "Tektur"; src: url(/assets/fonts/tektur-latin-wght-normal.woff2) format("woff2-variations"); font-weight: 400 900; font-stretch: 75% 100%; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tektur"; src: url(/assets/fonts/tektur-latin-ext-wght-normal.woff2) format("woff2-variations"); font-weight: 400 900; font-stretch: 75% 100%; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia Sans"; src: url(/assets/fonts/sofia-sans-latin-wght-normal.woff2) format("woff2-variations"); font-weight: 1 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans"; src: url(/assets/fonts/sofia-sans-latin-ext-wght-normal.woff2) format("woff2-variations"); font-weight: 1 1000; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #050d14;          /* page */
  --ink-2: #081621;        /* sunken: inputs, bands */
  --plate: #0b1c28;        /* raised plates */
  --plate-2: #10283a;
  --line: rgba(65, 192, 240, .16);
  --frame: rgba(65, 192, 240, .45);
  --text: #e4f1f7;
  --muted: #8ea6b4;
  --cyan: #41c0f0;         /* Neuronality logo blue */
  --ice: #c9f4ff;
  --led: #ffb21a;          /* stadium LED amber: numbers, years */
  --gold: #ffd700;         /* rewards (Neuronball) */
  --live: #ff5468;
  --accent: var(--cyan);
  --accent-2: var(--ice);
  --accent-ink: #03070a;
  --display: "Tektur", "Bahnschrift", "DIN Alternate", "Arial Narrow", sans-serif;
  --body: "Sofia Sans", "Segoe UI", system-ui, sans-serif;
  --cut: 14px;
  --wrap: 1240px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="nb"] { --ink: #03070a; --ink-2: #061018; --plate: #071118; --plate-2: #0d1e2a; --accent: #5bc0de; --accent-2: #b6ffff; --line: rgba(91, 192, 222, .2); --frame: rgba(91, 192, 222, .42); }
[data-theme="sb"] { --ink: #05060f; --ink-2: #0a0b1a; --plate: #0e1024; --plate-2: #151834; --accent: #ff7a59; --accent-2: #ffc9a8; --line: rgba(160, 176, 255, .14); --frame: rgba(255, 150, 120, .42); --led: #ffb21a; }

/* 2. Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 1.0625rem/1.55 var(--body); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: #fff; }
p { margin: 0 0 .65em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
main:focus { outline: none; }
::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 { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .7rem 1rem; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.skip:focus { top: 1rem; }

/* 3. Layout & type ------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.wrap--mid { max-width: 1040px; }
.wrap--narrow { max-width: 820px; }
.section { padding: clamp(3.75rem, 7.5vw, 6.25rem) 0; position: relative; }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-lead { color: var(--muted); font-size: 1.15rem; max-width: 40rem; }
.h1, .hero-title { font: 700 clamp(2.4rem, 1.1rem + 4.2vw, 4.6rem)/1.04 var(--display); font-stretch: 82%; letter-spacing: -.012em; text-wrap: balance; }
.h2 { font: 700 clamp(1.9rem, 1.2rem + 2.3vw, 3.1rem)/1.06 var(--display); font-stretch: 85%; letter-spacing: -.005em; text-wrap: balance; margin-bottom: .5em; }
.h3 { font: 600 1.3rem/1.2 var(--display); font-stretch: 94%; margin-bottom: .5em; }
.h4 { font: 600 1rem/1.3 var(--display); color: var(--muted); margin: 1.8em 0 .4em; }
.note { color: var(--muted); font-size: .95rem; margin-top: 1rem; }
.led { font-family: var(--display); font-weight: 800; font-stretch: 80%; color: var(--led); text-shadow: 0 0 18px rgba(255, 178, 26, .45); font-variant-numeric: tabular-nums; }

/* 4. Components ---------------------------------------------------------- */
.frame { --c: var(--cut); clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
figure.frame, .video-frame { position: relative; margin: 0; padding: 1px; background: linear-gradient(135deg, var(--frame), rgba(255,255,255,.06) 40%, var(--frame)); }
figure.frame > img, .video-frame > img, .video-frame > video, .video-frame > iframe { clip-path: inherit; width: 100%; }

.actions { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 1.6rem; }
.btn { --s: 12px; display: inline-flex; align-items: center; justify-content: center; gap: .6em; min-height: 3.1rem; padding: .7em 1.7em; font: 650 1rem/1 var(--display); font-stretch: 92%; letter-spacing: .01em; text-decoration: none; border: 0; cursor: pointer; clip-path: polygon(var(--s) 0, 100% 0, calc(100% - var(--s)) 100%, 0 100%); transition: transform .25s var(--ease), filter .25s, background-color .25s, color .25s; }
.btn--primary { color: var(--accent-ink); background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 100%); }
.btn--primary:hover { color: var(--accent-ink); filter: brightness(1.12); transform: translateX(3px); }
.btn--ghost { color: var(--text); background: rgba(255, 255, 255, .04); box-shadow: inset 0 1px 0 var(--frame), inset 0 -1px 0 var(--frame); }
.btn--ghost:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.btn--play { position: relative; overflow: hidden; }
.btn--play::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.7) 50%, transparent 70%); transform: translateX(-120%); animation: sheen 3.6s var(--ease) 1.6s infinite; }
.btn[disabled] { opacity: .6; cursor: progress; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.chips li { padding: .3em .8em; font: 600 .85rem/1.4 var(--display); font-stretch: 92%; color: var(--accent-2); background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--line); clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px); }

.launch-flag { display: inline-flex; align-items: center; gap: .6rem; margin: 2.2rem 0 0; padding: .45rem 1rem .45rem .8rem; font: 600 .95rem/1.2 var(--display); font-stretch: 90%; color: var(--text); text-decoration: none; background: rgba(5, 13, 20, .6); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(6px); }
a.launch-flag:hover { box-shadow: inset 0 0 0 1px var(--frame); color: #fff; }
.live-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(255, 84, 104, .7); animation: live 1.8s ease-out infinite; }
.launch-flag.is-before .live-dot { background: var(--led); animation: none; box-shadow: 0 0 10px var(--led); }

.icon { width: 48px; height: 48px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: square; }

/* LED scoreboard band */
.board { position: relative; padding: clamp(3.5rem, 7vw, 5.5rem) 0; background:
  radial-gradient(circle at 1px 1px, rgba(255, 178, 26, .09) 1px, transparent 1.6px) 0 0/7px 7px,
  linear-gradient(180deg, var(--ink-2), #020507 60%, var(--ink-2));
  border-block: 1px solid rgba(255, 178, 26, .18); }
.board-title { font: 600 1rem/1 var(--display); color: var(--muted); margin-bottom: 2rem; }
.board-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.board-cell { display: flex; flex-direction: column; gap: .5rem; padding-left: 1.25rem; border-left: 1px solid rgba(255, 178, 26, .25); }
.board-value { display: flex; align-items: baseline; gap: .15em; }
.board-value .led { font-size: clamp(3.2rem, 2rem + 4vw, 6rem); line-height: .9; -webkit-mask: radial-gradient(circle, #000 58%, transparent 66%) 0 0/4px 4px; mask: radial-gradient(circle, #000 58%, transparent 66%) 0 0/4px 4px; }
.board-value .led--unit { font-size: clamp(1.4rem, 1rem + 1.4vw, 2.4rem); }
.board-label { color: var(--muted); max-width: 16rem; line-height: 1.4; }
.board-note { margin: 2.5rem 0 0; font: 600 1.15rem/1.4 var(--display); font-stretch: 92%; color: var(--text); }

/* Video frame + YouTube placeholder */
.video-frame { aspect-ratio: 16 / 9; overflow: hidden; }
.video-frame > img, .video-frame > video, .video-frame > iframe { position: absolute; inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); object-fit: cover; border: 0; background: #000; }
.video-play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: inline-flex; align-items: center; gap: .9rem; padding: 1rem 1.6rem 1rem 1.1rem; font: 650 1.05rem/1 var(--display); color: var(--accent-ink); background: linear-gradient(100deg, var(--accent), var(--accent-2)); border: 0; cursor: pointer; clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); transition: transform .25s var(--ease); }
.video-play:hover { transform: scale(1.04); }
.video-play-icon { width: 0; height: 0; border-style: solid; border-width: .55rem 0 .55rem .9rem; border-color: transparent transparent transparent currentColor; }
.video-frame.is-soon .video-play { left: 1.2rem; top: 1.2rem; translate: none; padding: .8rem 1.2rem; font-size: .95rem; cursor: default; color: var(--text); background: rgba(3, 7, 10, .78); box-shadow: inset 0 0 0 1px var(--frame); }
.video-frame.is-soon .video-play:hover { transform: none; }
.video-frame.is-soon .video-play-icon { display: none; }

/* Forms */
.contact-form { --c: 18px; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; margin-bottom: .4rem; font-weight: 650; font-size: .95rem; }
.hint { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: .8rem .9rem; background: var(--ink-2); border: 1px solid var(--line); border-radius: 0; transition: border-color .2s, box-shadow .2s; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(-45deg, transparent 50%, var(--accent) 50%); background-position: calc(100% - 1.2rem) 55%, calc(100% - .85rem) 55%; background-size: .35rem .35rem; background-repeat: no-repeat; padding-right: 2.5rem; }
.field textarea { resize: vertical; min-height: 9rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(65, 192, 240, .18); }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-consent { font-size: .9rem; color: var(--muted); }
.form-status { margin: 1rem 0 0; min-height: 1.5em; font-weight: 600; }
.form-status.is-ok { color: #9be27a; }
.form-status.is-error { color: #ff8b8b; }

/* FAQ */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 0; cursor: pointer; list-style: none; font: 600 1.15rem/1.3 var(--display); font-stretch: 94%; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; flex: none; width: 14px; height: 14px; background: linear-gradient(var(--accent), var(--accent)) center/100% 2px no-repeat, linear-gradient(var(--accent), var(--accent)) center/2px 100% no-repeat; transition: transform .3s var(--ease); }
.faq-item[open] summary::after { transform: rotate(135deg); }
.faq-item summary:hover { color: var(--accent-2); }
.faq-item p { color: var(--muted); max-width: 62ch; margin: 0; padding-bottom: 1rem; }

/* Lightbox */
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(2, 5, 8, .92); backdrop-filter: blur(4px); }
.lightbox-in { position: relative; width: 100%; height: 100%; display: grid; place-items: center; padding: 4rem 4.5rem; }
.lightbox img { max-width: calc(100vw - 9rem); max-height: calc(100vh - 8rem); width: auto; height: auto; object-fit: contain; }
.lightbox-caption { position: absolute; left: 0; right: 0; bottom: 1rem; text-align: center; color: var(--muted); font-size: .95rem; padding: 0 1rem; }
.lb-btn { position: absolute; width: 3rem; height: 3rem; display: grid; place-items: center; background: rgba(255,255,255,.06); border: 0; color: var(--text); cursor: pointer; font: 600 1.4rem/1 var(--display); box-shadow: inset 0 0 0 1px var(--line); }
.lb-btn:hover { background: rgba(255,255,255,.14); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lb-next { right: 1rem; top: 50%; translate: 0 -50%; }

/* 5. Header / footer ----------------------------------------------------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); transition: background-color .3s, box-shadow .3s, backdrop-filter .3s; }
.site-header.is-scrolled { background: rgba(5, 13, 20, .78); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
[data-theme="sb"] .site-header.is-scrolled { background: rgba(5, 6, 15, .78); }
.header-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { position: relative; z-index: 2; display: block; width: 168px; color: var(--text); }
.site-nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.site-nav a { position: relative; color: var(--text); text-decoration: none; font: 600 .98rem/1 var(--display); font-stretch: 92%; padding: .6rem 0; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .15rem; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-lang a { padding: .45rem .8rem; box-shadow: inset 0 0 0 1px var(--line); }
.nav-lang a::after { display: none; }
.nav-lang a:hover { box-shadow: inset 0 0 0 1px var(--frame); }
.nav-toggle { display: none; align-items: center; gap: .6rem; background: none; border: 0; padding: .5rem; cursor: pointer; font: 600 .95rem/1 var(--display); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 22px; height: 2px; background: var(--text); transition: transform .3s var(--ease), background-color .2s; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -7px; } .nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.site-footer { border-top: 1px solid var(--line); background: var(--ink-2); padding: 4rem 0 2rem; color: var(--muted); }
.footer-in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer-brand .nl-logo { width: 190px; margin-bottom: 1.2rem; }
.footer-col h2 { font: 600 .95rem/1 var(--display); color: var(--text); margin-bottom: 1rem; }
.footer-col li { margin-bottom: .55rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .9rem; }
.footer-base p { margin: 0; }

/* Neuronality logo (inline SVG). Parts: .nl-letters .nl-ring.nl-r1/2/3 .nl-cross .nl-diamond */
.nl-logo { width: 100%; height: auto; overflow: visible; }
.nl-logo .l, .nl-logo .d { fill: #f2f7fa; }
.nl-logo .r { fill: var(--cyan); }
.nl-logo .x { stroke: var(--cyan); stroke-width: 1; }
.nl-logo .nl-ring, .nl-logo .nl-diamond, .nl-logo .nl-cross line { transform-box: view-box; transform-origin: 289.12px 72.3px; }
.nl-logo--small .nl-ring { animation: spin 14s linear infinite paused; }
.nl-logo--small .nl-r2 { animation-direction: reverse; animation-duration: 10s; }
.brand:hover .nl-ring, .brand:focus-visible .nl-ring { animation-play-state: running; }

/* 6. Home ---------------------------------------------------------------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 3rem) 0 5rem; overflow: hidden; isolation: isolate; }
.hero-in { position: relative; z-index: 2; }
.hero-lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); color: #c3d6e0; max-width: 38rem; margin-top: 1.1rem; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero--home::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, var(--ink)); z-index: -1; pointer-events: none; }
.hero--home .hero-in { max-width: var(--wrap); }
.hero--home .hero-title { max-width: 14ch; margin-top: clamp(2rem, 5vh, 3.5rem); }
.hero-logo { width: min(560px, 86vw); }
.hero-reticle { position: absolute; z-index: -1; right: -14vmin; top: 50%; width: min(118vmin, 1100px); aspect-ratio: 1; translate: var(--rx, 0) calc(-50% + var(--ry, 0px)); opacity: .2; pointer-events: none; transition: translate .9s var(--ease); }
.nl-reticle { width: 100%; height: 100%; transform-origin: 50% 50%; }
.hero-reticle.is-firing { animation: reticleFlash .45s ease-out; }
.hero-reticle.is-firing .nl-reticle { animation: recoil .35s var(--ease); }
.hero--home { cursor: url(/assets/img/brand/cursor.svg) 16 16, crosshair; }
.hero--home a, .hero--home button { cursor: pointer; }
.nl-reticle .r { fill: var(--cyan); }
.nl-reticle .x { stroke-width: .35; stroke-dasharray: 2 2; }
.nl-reticle .nl-r1 { animation: spin 60s linear infinite; }
.nl-reticle .nl-r2 { animation: spin 90s linear infinite reverse; }
.nl-reticle .nl-r3 { animation: spin 140s linear infinite; }
.nl-reticle .nl-diamond { fill: none; stroke: var(--cyan); stroke-width: .6; opacity: .7; }

.games { background: linear-gradient(var(--ink), var(--ink-2)); }
.game-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 3vw, 2.5rem); }
.game { --c: 22px; --tx: 0deg; --ty: 0deg; position: relative; display: flex; flex-direction: column; background: var(--plate); clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); transform: perspective(1200px) rotateX(var(--ty)) rotateY(var(--tx)); transition: transform .5s var(--ease); }
.game::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .07), transparent 45%); }
.game::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px var(--line); }
.game--nb { --accent: #5bc0de; --accent-2: #b6ffff; }
.game--sb { --accent: #ff7a59; --accent-2: #ffc9a8; }
.game-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000; --c: 0px; }
.game-media video, .game-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.game:hover .game-media video, .game:hover .game-media img { transform: scale(1.04); }
.game-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 55%, var(--plate)); }
.game-body { position: relative; padding: 0 clamp(1.4rem, 3vw, 2.4rem) clamp(1.8rem, 3vw, 2.6rem); margin-top: -3.5rem; z-index: 1; display: flex; flex-direction: column; flex: 1; }
.game-body .actions { margin-top: auto; padding-top: 2rem; }
.game-logo { display: block; height: auto; margin-bottom: 1rem; }
.game-logo--nb { width: min(280px, 70%); }
.game-logo--sb { width: min(250px, 66%); color: #fff; }
.game-kind { font: 600 1rem/1.2 var(--display); font-stretch: 92%; color: var(--accent); margin-bottom: .8rem; }

.craft-in { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.craft-head { position: sticky; top: calc(var(--header-h) + 2rem); }
.craft-item { display: flex; gap: 1.5rem; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.craft-item:last-child { border-bottom: 1px solid var(--line); }
.craft-item p { color: var(--muted); margin: 0; }

.timeline { background: radial-gradient(1000px 500px at 80% 0%, rgba(65, 192, 240, .07), transparent 70%); }
.tl { --p: 0; position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2rem; margin-top: 3rem; padding-top: 3.2rem; }
.tl::before, .tl::after { content: ""; position: absolute; left: 0; top: .55rem; height: 2px; }
.tl::before { right: 0; background: var(--line); }
.tl::after { width: calc(var(--p) * 100%); background: linear-gradient(90deg, var(--cyan), var(--led)); box-shadow: 0 0 12px rgba(255, 178, 26, .5); }
.tl-item { position: relative; }
.tl-item::before { content: ""; position: absolute; top: -3.2rem; left: 0; width: 1.15rem; height: 1.15rem; background: var(--ink); border: 2px solid var(--line); transform: rotate(45deg); transition: border-color .4s, background-color .4s, box-shadow .4s; }
.tl-item.is-lit::before { border-color: var(--led); background: var(--led); box-shadow: 0 0 14px var(--led); }
.tl-year { display: block; font-size: 2.6rem; line-height: 1; margin-bottom: .8rem; -webkit-mask: radial-gradient(circle, #000 58%, transparent 66%) 0 0/3px 3px; mask: radial-gradient(circle, #000 58%, transparent 66%) 0 0/3px 3px; }
.tl-item p { color: var(--muted); font-size: 1rem; }

.contact { background: var(--ink-2); border-top: 1px solid var(--line); }
.contact-in { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.link-big { font: 600 1.35rem/1.2 var(--display); font-stretch: 92%; }
address { font-style: normal; color: var(--muted); }

/* 7. Neuronball ---------------------------------------------------------- */
.hero--nb { align-items: flex-end; padding-bottom: clamp(4rem, 9vh, 7rem); }
.hero-video { position: absolute; inset: 0; z-index: -2; background: #03070a url(/assets/video/match-kickoff-poster.webp) center/cover; }
.hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.hero-video video.is-on { opacity: 1; }
.hero--nb::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3, 7, 10, .92) 0%, rgba(3, 7, 10, .7) 40%, rgba(3, 7, 10, .15) 75%), linear-gradient(transparent 50%, var(--ink)); }
.hero--nb .hero-in { max-width: var(--wrap); }
.hero--nb .launch-flag { margin: 0 0 2rem; }
.nb-hero-logo { width: min(440px, 78vw); margin-bottom: 1.5rem; }
.hero--nb .hero-title { max-width: 12ch; }

.veterans { background: linear-gradient(180deg, var(--ink), var(--plate) 50%, var(--ink)); }
.vet-in { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.vet-mark { position: relative; display: grid; justify-items: center; gap: .5rem; padding: 2.5rem 1rem; }
.vet-mark svg { width: min(220px, 60vw); fill: var(--gold); filter: drop-shadow(0 0 24px rgba(255, 215, 0, .35)); }
.vet-mark .led { font-size: 3rem; color: var(--gold); text-shadow: 0 0 18px rgba(255, 215, 0, .5); }
.vet-stamp { font: 700 .95rem/1 var(--display); color: var(--gold); padding: .4rem .8rem; box-shadow: inset 0 0 0 1px rgba(255, 215, 0, .5); }
.vet-text p { color: #c3d6e0; max-width: 62ch; }
.vet-text .btn { margin-top: 1rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: s; margin-top: 2.5rem; }
.step { position: relative; padding: 2rem 1.8rem; background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); }
.step-n { display: block; font-size: 3.4rem; line-height: 1; margin-bottom: 1rem; color: var(--accent-2); text-shadow: 0 0 18px rgba(91, 192, 222, .6); }
.step p { color: var(--muted); margin: 0; }

.features .h2 { margin-bottom: clamp(2rem, 4vw, 3rem); }
.feature { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center; margin-bottom: clamp(2.75rem, 6vw, 4.5rem); }
.feature--flip { grid-template-columns: 5fr 7fr; }
.feature--flip .shot { order: 2; }
.feature-text p { color: var(--muted); font-size: 1.1rem; max-width: 34rem; }
.feature-text .h3 { font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); font-stretch: 88%; }
.shot { box-shadow: 0 30px 80px -40px rgba(91, 192, 222, .5); }

.phones { overflow: hidden; }
.phones-in { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.phones-text p { color: var(--muted); }
.phones-text .h3 { margin-top: 2rem; }
.phone { position: relative; padding: 9px; background: linear-gradient(145deg, #1d3140, #0a141c); border-radius: 34px; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px -30px rgba(0,0,0,.9); }
.phone img { border-radius: 26px; width: 100%; }
.phone-fan { position: relative; height: clamp(440px, 52vw, 620px); }
.phone-fan .phone { position: absolute; top: 50%; left: 50%; width: clamp(180px, 21vw, 260px); transition: transform .8s var(--ease); }
.phone--1 { transform: translate(-125%, -46%) rotate(-9deg); }
.phone--2 { transform: translate(-50%, -54%); z-index: 2; }
.phone--3 { transform: translate(25%, -46%) rotate(9deg); }
.phone-fan:hover .phone--1 { transform: translate(-138%, -48%) rotate(-12deg); }
.phone-fan:hover .phone--3 { transform: translate(38%, -48%) rotate(12deg); }
.phone--landscape { max-width: 980px; margin: clamp(3rem, 6vw, 5rem) auto 0; border-radius: 30px; }
.phone--landscape img { border-radius: 22px; }

.mosaic { display: grid; grid-template-columns: 1.4fr 1fr; grid-auto-rows: auto; gap: 1rem; }
.mosaic li:first-child { grid-row: span 2; }
.mosaic li:nth-child(4) { grid-column: 1 / -1; aspect-ratio: 21 / 8; }
.mosaic a { display: block; height: 100%; overflow: hidden; position: relative; clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .5s; }
.mosaic a:hover img { transform: scale(1.05); filter: brightness(1.1); }

.final { position: relative; padding: clamp(6rem, 14vw, 11rem) 0; text-align: center; overflow: hidden; isolation: isolate; }
.final-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, rgba(3, 7, 10, .55), rgba(3, 7, 10, .95) 75%); }
.final .h1 { max-width: 16ch; margin: 0 auto; }
.final .hero-lead { margin-inline: auto; }
.final .actions { justify-content: center; }

/* 8. Starblast ----------------------------------------------------------- */
.hero--sb { text-align: left; background: var(--ink); }
.hero--sb::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(900px 600px at 85% 20%, rgba(255, 122, 89, .14), transparent 60%), radial-gradient(800px 600px at 10% 90%, rgba(90, 110, 255, .12), transparent 60%), linear-gradient(transparent 70%, var(--ink)); }
.sb-h1 { width: min(620px, 92vw); margin-bottom: 1.5rem; }
.sb-logo { width: 100%; height: auto; fill: #fff; overflow: visible; }
.sb-logo .sb-trail { filter: drop-shadow(0 0 14px rgba(127, 216, 255, .9)); }
.sb-logo .sb-ship { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .6)); }
.sb-tagline { font: 700 clamp(1.4rem, 1rem + 1.6vw, 2.2rem)/1.15 var(--display); font-stretch: 85%; max-width: 24ch; }

.award { padding: 2.5rem 0; background: linear-gradient(90deg, rgba(255, 122, 89, .14), rgba(255, 178, 26, .06) 60%, transparent); border-block: 1px solid rgba(255, 150, 120, .25); }
.award-in { display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3rem); }
.award-figure { font-size: clamp(3.5rem, 2rem + 5vw, 6rem); line-height: .9; -webkit-mask: radial-gradient(circle, #000 58%, transparent 66%) 0 0/4px 4px; mask: radial-gradient(circle, #000 58%, transparent 66%) 0 0/4px 4px; }
.award p { margin: 0; color: #d9cfe0; max-width: 46rem; }

.about-in, .history-in { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.sb-about p, .history p { color: #c9cde0; }
.facts { --c: 18px; padding: 1.8rem; background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); }
.facts .h4 { margin-top: 0; color: var(--accent); }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .7rem 1.2rem; }
.facts dt { font: 600 .95rem/1.4 var(--display); color: var(--muted); }
.facts dd { margin: 0; }

.mode-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.mode { position: relative; padding: 1.8rem 1.6rem; background: linear-gradient(180deg, var(--plate), var(--ink)); box-shadow: inset 0 0 0 1px var(--line); }
.mode::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--m, var(--accent)); box-shadow: 0 0 16px var(--m, var(--accent)); }
.mode--1 { --m: #ffb21a; } .mode--2 { --m: #7fd8ff; } .mode--3 { --m: #ff7a59; } .mode--4 { --m: #b48cff; }
.mode p { color: var(--muted); margin: 0; }

.custom-in { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 4rem; }
.custom-in .h2 { grid-column: 1 / -1; }
.custom-item { padding-top: 1.5rem; border-top: 1px solid var(--line); }
.custom-item p { color: var(--muted); }

.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.shots a { display: block; overflow: hidden; aspect-ratio: 16 / 9; }
.shots img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), filter .4s; filter: saturate(.85); }
.shots a:hover img { transform: scale(1.06); filter: saturate(1.1); }

.community { --c: 18px; padding: 1.8rem; background: var(--plate); box-shadow: inset 0 0 0 1px var(--line); }
.link-list { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1rem; }
.link-list a { font: 600 1.05rem/2 var(--display); font-stretch: 92%; }

/* 9. Documents & 404 ----------------------------------------------------- */
.doc { padding-top: calc(var(--header-h) + 4rem); }
.doc .h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); margin-bottom: 2rem; }
.doc .h3 { margin-top: 1.8rem; }
.doc p, .doc dd { color: #c3d6e0; }
.doc-dl { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); overflow-wrap: anywhere; gap: .5rem 1.5rem; margin: 0; }
.doc-dl dt { color: var(--muted); }
.doc-dl dd { margin: 0; }
.missing { color: var(--live); font-weight: 700; }
code { font-size: .92em; padding: .1em .35em; background: var(--plate); }
.lost { min-height: 100vh; display: grid; align-content: center; justify-items: center; gap: 3rem; padding: 4rem var(--pad); text-align: center; }
.lost-logo { width: min(440px, 80vw); display: block; }
.lost-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 900px; }
.lost-cols p { color: var(--muted); }
.lost-code { font-size: 3rem; margin: 0; }
.lost-actions { justify-content: center; }

/* 10. Motion ------------------------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes live { 70% { box-shadow: 0 0 0 .6rem rgba(255, 84, 104, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 84, 104, 0); } }
@keyframes sheen { 0% { transform: translateX(-120%); } 30%, 100% { transform: translateX(120%); } }
@keyframes ringIn1 { from { transform: rotate(-150deg) scale(.4); opacity: 0; } }
@keyframes ringIn2 { from { transform: rotate(160deg) scale(.7); opacity: 0; } }
@keyframes ringIn3 { from { transform: rotate(-220deg) scale(1.35); opacity: 0; } }
@keyframes diamondIn { 0% { transform: scale(0) rotate(-90deg); opacity: 0; } 70% { transform: scale(1.2) rotate(8deg); opacity: 1; } }
@keyframes crossIn { from { transform: scale(0); opacity: 0; } }
@keyframes lettersIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes appear { to { opacity: 1; } }
@keyframes thrust { 50% { opacity: .72; } }
@keyframes planetIn { from { opacity: 0; transform: scale(.85); } }
@keyframes recoil { 0% { transform: scale(.93); filter: drop-shadow(0 0 30px rgba(255, 178, 26, .9)) brightness(1.8); } 100% { transform: scale(1); } }
@keyframes reticleFlash { 0% { opacity: .55; } 100% { opacity: .2; } }
@keyframes scanline { from { left: 0; opacity: 1; } 90% { opacity: 1; } to { left: 100%; opacity: 0; } }

/* Hero logo assembles once, then the rings keep turning slowly */
.nl-logo--hero .nl-r1 { animation: ringIn1 1.3s var(--ease) .15s both, spin 36s linear 1.45s infinite; }
.nl-logo--hero .nl-r2 { animation: ringIn2 1.3s var(--ease) .3s both, spin 52s linear 1.6s infinite reverse; }
.nl-logo--hero .nl-r3 { animation: ringIn3 1.5s var(--ease) .05s both, spin 80s linear 1.55s infinite; }
.nl-logo--hero .nl-diamond { animation: diamondIn .9s var(--ease) .9s both; }
.nl-logo--hero .nl-cross line { animation: crossIn .8s var(--ease) 1.1s both; }
.nl-logo--hero .nl-letters { animation: lettersIn 1s var(--ease) .7s both; }
.hero--home .hero-title, .hero--home .hero-lead, .hero--home .actions, .hero--home .launch-flag { animation: rise .9s var(--ease) both; }
.hero--home .hero-title { animation-delay: 1.15s; } .hero--home .hero-lead { animation-delay: 1.3s; } .hero--home .actions { animation-delay: 1.45s; } .hero--home .launch-flag { animation-delay: 1.6s; }
.hero--nb .hero-in > * { animation: rise .9s var(--ease) both; }
.hero--nb .hero-in > *:nth-child(2) { animation-delay: .15s; } .hero--nb .hero-in > *:nth-child(3) { animation-delay: .3s; } .hero--nb .hero-in > *:nth-child(4) { animation-delay: .45s; } .hero--nb .hero-in > *:nth-child(n+5) { animation-delay: .6s; }

/* Starblast logo: the ship flies in along its trail */
.sb-logo .sb-ship, .sb-logo .sb-trail, .sb-logo .sb-planet { transform-box: view-box; }
.hero--sb .sb-logo .sb-planet { transform-origin: 1450px 1100px; animation: planetIn 1.4s var(--ease) both; }
/* Trail and ship are animated by site.js (sbLogo): the ship follows the trail's centre line while a clip
   rectangle reveals the trail behind it. Without JS they simply fade in. */
.hero--sb .sb-logo .sb-trail, .hero--sb .sb-logo .sb-ship { opacity: 0; animation: appear .6s ease 2.6s forwards; }
.hero--sb .sb-logo.is-landed .sb-trail > path { animation: thrust 2.4s ease-in-out infinite; }
.hero--sb .sb-logo .sb-letters { animation: lettersIn 1s var(--ease) 1.2s both; }
.hero--sb .sb-tagline, .hero--sb .hero-lead, .hero--sb .actions { animation: rise .9s var(--ease) both; }
.hero--sb .sb-tagline { animation-delay: 1.4s; } .hero--sb .hero-lead { animation-delay: 1.55s; } .hero--sb .actions { animation-delay: 1.7s; }

/* Screens scan in once when they enter the viewport (only with JS, see site.js) */
.js [data-scan] { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease); }
.js [data-scan].is-in { clip-path: inset(0 0 0 0); }
.js figure.frame[data-scan].is-in { clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c)); }
[data-scan]::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--accent-2); box-shadow: 0 0 18px 4px var(--accent); opacity: 0; pointer-events: none; }
.js [data-scan].is-in::after { animation: scanline 1.1s var(--ease) both; }
.js .phone--landscape[data-scan].is-in { clip-path: inset(0 0 0 0 round 30px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .game { transform: none !important; }
}

/* 11. Responsive --------------------------------------------------------- */
@media (max-width: 1100px) {
  .tl { grid-template-columns: 1fr; gap: 2.2rem; padding-top: 0; padding-left: 2.6rem; }
  .tl::before, .tl::after { top: 0; left: .5rem; width: 2px; height: auto; bottom: 0; }
  .tl::after { height: calc(var(--p) * 100%); bottom: auto; background: linear-gradient(180deg, var(--cyan), var(--led)); }
  .tl-item::before { top: .6rem; left: -2.6rem; }
  .mode-list { grid-template-columns: repeat(2, 1fr); }
  .board-grid { grid-template-columns: repeat(2, 1fr); row-gap: 2.5rem; }
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; position: relative; z-index: 2; }
  .site-nav { position: fixed; inset: 0; background: rgba(5, 13, 20, .97); backdrop-filter: blur(10px); display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  [data-theme="sb"] .site-nav { background: rgba(5, 6, 15, .97); }
  .site-nav.is-open { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 1.6rem; text-align: center; }
  .site-nav a { font-size: 1.6rem; }
  .game-grid, .craft-in, .contact-in, .vet-in, .phones-in, .about-in, .history-in, .feature, .custom-in { grid-template-columns: 1fr; }
  .craft-head { position: static; }
  .feature--flip .shot { order: 0; }
  .steps { grid-template-columns: 1fr; }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .hero-reticle { right: -40vw; opacity: .14; }
  .shots { grid-template-columns: repeat(2, 1fr); }
  .lost-cols { grid-template-columns: 1fr; }
  .vet-mark { padding: 0; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  .brand { width: 140px; }
  .mosaic { grid-template-columns: 1fr; }
  .mosaic li:first-child { grid-row: auto; }
  .mosaic li:nth-child(4) { aspect-ratio: auto; }
  .mode-list { grid-template-columns: 1fr; }
  .board-grid { gap: 2rem 1rem; }
  .board-cell { padding-left: .9rem; }
  .phone-fan { height: 360px; }
  .phone-fan .phone { width: 136px; padding: 6px; border-radius: 24px; }
  .phone-fan .phone img { border-radius: 18px; }
  .doc-dl { grid-template-columns: 1fr; gap: .1rem; }
  .doc-dl dd { margin-bottom: .8rem; }
  .lightbox-in { padding: 4rem .5rem; }
  .lightbox img { max-width: calc(100vw - 1rem); }
  .actions .btn { flex: 1 1 auto; }
}
