/* Night city: dark asphalt ground, one energy colour per class, condensed signage type for headings */
@font-face { font-family: "Big Shoulders Display"; src: url("fonts/big-shoulders.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;
  --ground: #0a0c13;
  --ground-2: #10131d;
  --panel: #161a27;
  --line: #262b3d;
  --ink: #e8eaf2;
  --ink-2: #a3a9bd;
  --ink-3: #7a8098;
  --rune: #4aa8ff;
  --techno: #b77cff;
  --sanktor: #5fe3c6;
  --street: #ff8d42;
  --shadow: #8f9bb8;
  --aether: #8b8cff;
  --stable: #5fe3a1;
  --unstable: #ffc14d;
  --critical: #ff5f6d;
  --f-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --wrap: 1180px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1.0625rem/1.65 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--rune); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--rune); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 800; line-height: 1; letter-spacing: .01em; text-wrap: balance; margin: 0; text-transform: uppercase; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h3 { font-size: 1.6rem; }
p { margin: 0; }
b { font-weight: 600; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--ground); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.stack { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ground) 82%, transparent); backdrop-filter: blur(12px) saturate(1.3); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-size: 1.45rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.brand b { font-weight: 800; }
.brand-mark { width: 28px; height: 28px; color: var(--ink); }
.nav { display: flex; gap: .25rem 1.4rem; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; font-family: var(--f-mono); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; padding: .4rem 0; }
.nav a:hover { color: var(--ink); }
@media (max-width: 640px) { .nav { width: 100%; justify-content: space-between; padding-bottom: .5rem; gap: .25rem .8rem; } }

/* hero */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(86vh, 780px); display: flex; align-items: flex-end; border-bottom: 1px solid var(--line); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; z-index: -2; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(90deg, var(--ground) 0%, color-mix(in srgb, var(--ground) 86%, transparent) 38%, color-mix(in srgb, var(--ground) 20%, transparent) 75%),
  linear-gradient(0deg, var(--ground) 0%, transparent 45%); }
.hero-body { width: 100%; padding-block: 7rem 4.5rem; display: flex; flex-direction: column; gap: 1.4rem; align-items: flex-start; }
.status { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); background: color-mix(in srgb, var(--ground) 70%, transparent); padding: .35rem .8rem; border-radius: 999px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--unstable); box-shadow: 0 0 10px var(--unstable); }
.hero-title { font-size: clamp(4rem, 13vw, 9.5rem); line-height: .82; letter-spacing: .005em; }
.hero-title span { display: block; font-weight: 600; font-size: .42em; letter-spacing: .32em; color: var(--ink-2); margin-bottom: .1em; }
.hero-claim { font-family: var(--f-display); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: clamp(1.3rem, 2.6vw, 1.9rem); color: var(--rune); }
.hero-lead { max-width: 56ch; color: var(--ink-2); font-size: 1.1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: .4rem; }
.wip-tag { position: absolute; right: var(--gutter-r); bottom: 1rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.3rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font: 600 .95rem var(--f-body); cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn-main { background: var(--rune); border-color: var(--rune); color: #04101e; }
.btn-main:hover { background: #6db9ff; border-color: #6db9ff; }
.btn-quiet { background: transparent; }

/* sections */
.band { padding-block: clamp(4rem, 9vw, 7rem); }
.band-alt { background: var(--ground-2); border-block: 1px solid var(--line); }
.eyebrow { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 3rem; max-width: 760px; }
.lead { color: var(--ink-2); font-size: 1.12rem; max-width: 62ch; }
.note { color: var(--ink-3); font-size: .95rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* 70/30 bar */
.mix { display: flex; flex-direction: column; gap: 1.4rem; min-width: 0; }
.mix-bar { display: flex; gap: 4px; height: 14px; }
.mix-a { background: var(--rune); border-radius: 3px 0 0 3px; }
.mix-b { background: var(--street); border-radius: 0 3px 3px 0; }
.mix-legend { display: grid; grid-template-columns: 7fr 3fr; gap: 1.2rem; }
@media (max-width: 520px) { .mix-legend { grid-template-columns: 1fr; } }
.mix-legend > div { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.mix-legend p { color: var(--ink-2); font-size: .95rem; }
.num { font-family: var(--f-display); font-weight: 800; font-size: 3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.key { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.key-a { color: var(--rune); }
.key-b { color: var(--street); }

/* world */
.world { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 860px) { .world { grid-template-columns: minmax(0, 1fr); } }
.world-img { margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.world-img img { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
figcaption, .shot-cap { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.st { font-family: var(--f-mono); font-size: .85em; font-weight: 500; padding: 0 .35em; border-radius: 3px; }
.st-stable { color: var(--stable); background: color-mix(in srgb, var(--stable) 12%, transparent); }
.st-unstable { color: var(--unstable); background: color-mix(in srgb, var(--unstable) 12%, transparent); }
.st-critical { color: var(--critical); background: color-mix(in srgb, var(--critical) 12%, transparent); }
.districts { list-style: none; margin: .4rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.districts li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: .3rem 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.d-name { font-family: var(--f-display); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .03em; }
.d-text { color: var(--ink-2); font-size: .97rem; }
.districts .later .d-name, .districts .later .d-text { color: var(--ink-3); }
.tag { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); border-radius: 3px; padding: .1rem .4rem; }
@media (max-width: 560px) { .districts li { grid-template-columns: minmax(0, 1fr) auto; } .d-text { grid-column: 1 / -1; grid-row: 2; } }

/* classes */
.classes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 960px) { .classes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .classes { grid-template-columns: minmax(0, 1fr); } }
.cls { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; border-top: 3px solid var(--c); transition: border-color .2s; }
.cls:hover { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); border-top-color: var(--c); }
.cls img, .cls-ph { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; object-position: center 25%; border-bottom: 1px solid var(--line); }
.cls-ph { display: grid; place-items: center; background:
  repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 10%, transparent) 0 2px, transparent 2px 14px), var(--ground-2); }
.cls-ph span { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.cls-body { padding: 1.2rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; }
.cls-role { font-family: var(--f-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--c); display: flex; flex-wrap: wrap; gap: .4rem .7rem; align-items: center; }
.mvp { color: var(--ink-2); border: 1px solid var(--line); border-radius: 3px; padding: .05rem .4rem; letter-spacing: .06em; }
.cls h3 { font-size: 2rem; }
.cls-body p:last-child { color: var(--ink-2); font-size: .98rem; }

/* gameplay */
.loop { list-style: none; margin: 0 0 3rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; counter-reset: step; }
.loop li { counter-increment: step; display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .95rem; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem .45rem .5rem; }
.loop li::before { content: counter(step); font-family: var(--f-mono); font-size: .72rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--ground); color: var(--rune); }
.loop li:not(:last-child)::after { content: "→"; color: var(--ink-3); margin-left: .35rem; margin-right: -.4rem; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feat { padding: 1.6rem 1.5rem 1.8rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .6rem; }
.feat h3 { font-size: 1.45rem; }
.feat p { color: var(--ink-2); font-size: .98rem; }

/* phases */
.phases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; border-left: 2px solid var(--line); }
.phases li { position: relative; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .15rem 1rem; padding: .85rem 0 .85rem 1.4rem; }
.phases li::before { content: ""; position: absolute; left: -7px; top: 1.2rem; width: 12px; height: 12px; border-radius: 50%; background: var(--ground); border: 2px solid var(--ink-3); }
.phases .done::before { background: var(--stable); border-color: var(--stable); }
.phases .now::before { background: var(--unstable); border-color: var(--unstable); box-shadow: 0 0 12px var(--unstable); }
.ph-state { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: .3rem; }
.done .ph-state { color: var(--stable); }
.now .ph-state { color: var(--unstable); }
.ph-name { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; }
.ph-text { grid-column: 2; color: var(--ink-2); font-size: .95rem; }

/* gallery */
.gallery { columns: 3 280px; column-gap: 1rem; }
.shot { display: block; width: 100%; margin: 0 0 1rem; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); cursor: zoom-in; break-inside: avoid; transition: border-color .2s, transform .2s; }
.shot:hover { border-color: var(--ink-3); }
@media (prefers-reduced-motion: no-preference) { .shot:hover { transform: translateY(-2px); } }

.lightbox { max-width: min(1100px, 94vw); max-height: 94vh; width: auto; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ground-2); color: var(--ink); }
.lightbox::backdrop { background: rgba(4, 5, 10, .86); }
.lightbox img { max-height: 80vh; width: auto; margin: 0 auto; }
.lightbox p { padding: .8rem 1rem 0; color: var(--ink-2); font-size: .95rem; }
.lightbox form { display: flex; justify-content: flex-end; padding: .8rem 1rem 1rem; }

/* footer */
.foot { border-top: 1px solid var(--line); padding-block: 2.2rem calc(2.2rem + env(safe-area-inset-bottom, 0px)); }
.foot-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.foot p { color: var(--ink-3); font-size: .9rem; max-width: 70ch; }
.foot p b { color: var(--ink-2); }
.foot nav { display: flex; gap: 1.4rem; }
.foot a { color: var(--ink-2); font-size: .9rem; }

/* legal pages */
.legal { max-width: 760px; padding-block: 4rem 5rem; display: flex; flex-direction: column; gap: 1rem; }
.legal h1 { font-size: clamp(2.6rem, 6vw, 3.8rem); margin-bottom: .6rem; }
.legal h2 { font-size: 1.5rem; margin-top: 1.4rem; }
.legal p, .legal li { color: var(--ink-2); }
@media (max-width: 640px) {
  .hero-shade { background: linear-gradient(0deg, var(--ground) 0%, color-mix(in srgb, var(--ground) 78%, transparent) 55%, color-mix(in srgb, var(--ground) 45%, transparent) 100%); }
  .hero-body { padding-block: 5rem 3.5rem; }
}
