:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #eef2e8;
  --muted: #94a38d;
  --signal: #b7ff58;
  --rule: #20351c;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100svh; background: var(--bg); color: var(--fg); font-family: var(--sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--signal); text-decoration: none; }
a:hover { text-decoration: underline; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--signal); outline-offset: 5px; }
::selection { background: var(--signal); color: #000; }
.landing { overflow-x: hidden; }
.landing-main { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 48px; padding: 24px; }
.ascii-logo { width: max-content; max-width: 100%; margin: 0; color: var(--fg); font: 700 clamp(5px, 2vw, 24px)/.95 var(--mono); letter-spacing: -.055em; white-space: pre; }
#showcase { display: none; position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.showcase-active #showcase { display: block; }
.showcase-active:not(.showcase-reduced) .landing-main { touch-action: pinch-zoom; user-select: none; }
.showcase-active .ascii-logo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.landing-links { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 4vw, 48px); font: 12px var(--mono); }
.landing-links a { position: relative; color: #b9c5b2; padding: 14px 0; transition: color .2s; }
.landing-links a::before, .landing-links a::after { position: absolute; color: var(--signal); opacity: 0; transition: opacity .2s, transform .2s; }
.landing-links a::before { content: '['; left: -14px; transform: translateX(4px); }
.landing-links a::after { content: ']'; right: -14px; transform: translateX(-4px); }
.landing-links a:hover, .landing-links a:focus-visible { color: var(--signal); text-decoration: none; }
.landing-links a:hover::before, .landing-links a:hover::after, .landing-links a:focus-visible::before, .landing-links a:focus-visible::after { opacity: 1; transform: translateX(0); }
.showcase-active .landing-links { position: fixed; top: calc(43svh + min(15vw, 105px) + 66px); left: 0; width: 100%; z-index: 2; opacity: 0; visibility: hidden; transition: opacity .8s; }
.showcase-active[data-phase="ambient"] .landing-links { opacity: 1; visibility: visible; }
.showcase-controls { position: fixed; top: 22px; right: 28px; display: flex; gap: 4px; z-index: 3; }
.showcase-controls[hidden] { display: none; }
.showcase-controls button { min-width: 54px; min-height: 44px; padding: 8px 10px; border: 0; background: transparent; color: #8fa087; font: 11px var(--mono); cursor: pointer; transition: color .2s; }
.showcase-controls button:hover, .showcase-controls button:focus-visible { color: var(--signal); }
.showcase-controls button + button { margin-left: 5px; }
.loadout-controls { position: fixed; top: 22px; left: 28px; z-index: 4; }
.loadout-controls[hidden], #loadout-menu[hidden] { display: none; }
.brand { min-height: 44px; border: 0; padding: 0; background: none; color: var(--fg); font: 700 14px var(--mono); letter-spacing: -.02em; cursor: pointer; }
.brand > span { color: var(--signal); }
#loadout-menu { width: 160px; margin-top: 8px; padding: 5px; background: rgba(0,0,0,.96); border: 1px solid #263721; }
#loadout-menu button { display: block; width: 100%; min-height: 52px; padding: 9px 10px; border: 0; background: none; color: #a1af98; text-align: left; font: 11px var(--mono); cursor: pointer; }
#loadout-menu button:hover, #loadout-menu button[aria-pressed="true"] { background: #0e170b; color: var(--signal); }
#loadout-menu button > span { display: inline-block; width: 18px; }
#loadout-menu small { display: block; padding: 5px 0 0 23px; font-size: 9px; color: #687b5f; }
.showcase-reduced .landing-links { top: calc(43svh + min(7vw, 90px) + 64px); }
@media (max-width: 540px) {
  .showcase-controls { top: 10px; right: 12px; }
  .loadout-controls { top: 10px; left: 18px; }
  .landing-links { font-size: 11px; gap: 32px; }
}
@media (max-height: 450px) {
  .showcase-active .landing-links { top: auto; bottom: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Simple content pages */
body:not(.landing) {
  max-width: 46rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
  background: #090b0d;
}
body:not(.landing) h1 { margin: 0 0 .4rem; font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: -.05em; }
body:not(.landing) h2 { margin: 2.2rem 0 .5rem; font-size: 1.1rem; }
body:not(.landing) .tagline { color: var(--muted); margin-top: 0; font-family: var(--mono); font-size: .8rem; }
body:not(.landing) section { margin-top: 2rem; color: #c7cdc3; }
body:not(.landing) footer { margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .85rem; }
