/* ==========================================================================
   LOADSCREEN: two-ink pixel system
   Butter paper, charcoal slabs, bitmap display, dithered olive imagery.
   Radius 0. Blur 0. Every depth cue is a hard pixel step or an ink inversion.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Micro+5&family=Chakra+Petch:wght@400;500;600;700&family=Kode+Mono:wght@400;500;700&display=swap");

:root {
  /* ---- Palette (the only six colours allowed) ---- */
  --butter: #F8E1A1;
  --charcoal: #262422;
  --olive: #6E5B1C;
  --wheat: #E9C97A;
  --ghost: #3B3834;
  --rivet: #8C7F5B;

  /* ---- Contextual roles (re-mapped by .slab--ink) ---- */
  --surface: var(--butter);
  --on-surface: var(--charcoal);
  --surface-raised: var(--wheat);
  --accent: var(--olive);
  --muted: var(--rivet);
  --rule: var(--rivet);
  --ghost-ink: var(--wheat);
  --text-step: var(--wheat);
  --button-step: var(--olive);
  --focus: var(--olive);

  /* ---- Typography ---- */
  --font-display: "Micro 5", "Silkscreen", "Courier New", monospace;
  --font-body: "Chakra Petch", "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Kode Mono", "JetBrains Mono", ui-monospace, "Courier New", monospace;

  --text-mega: clamp(120px, 22vw, 320px); /* ghost word */
  --text-display: clamp(80px, 12vw, 200px);
  --text-headline-lg: clamp(64px, 8vw, 112px);
  --text-headline-md: clamp(48px, 5vw, 72px);
  --text-headline-sm: 40px;               /* display floor is 32px */
  --text-lead: 20px;
  --text-tagline: 18px;
  --text-body: 16px;
  --text-body-sm: 14px;
  --text-label: 14px;
  --text-mono: 14px;
  --text-mono-sm: 13px;

  --leading-display: 0.85;
  --leading-body: 1.5;
  --tracking-button: 0.06em;

  /* ---- Spacing (8px pixel grid; 4px is the single half-step) ---- */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;

  --frame-inset: 24px;
  --container: 1200px;
  --measure: 56ch;

  /* ---- Shape ---- */
  --radius-none: 0;
  --notch-sm: 4px;
  --notch-md: 8px;
  --border-control: 2px;
  --border-frame: 1px;
  --rivet-size: 8px;

  /* ---- Elevation: hard pixel steps only ---- */
  --step-rest: 4px;
  --step-hover: 2px;
  --step-press: 0px;

  /* ---- Patterns ---- */
  --hatch: repeating-linear-gradient(60deg, currentColor 0 2px, transparent 2px 5px);
  --dither: repeating-conic-gradient(var(--charcoal) 0 25%, transparent 0 50%) 0 0 / 4px 4px;

  /* ---- Motion: stepped, never eased ---- */
  --step-fast: 80ms steps(2, end);
  --step-slow: 480ms steps(6, end);
}

/* ---- Ink inversion: the charcoal slab re-maps every contextual role ---- */
.slab--ink,
.is-ink {
  --surface: var(--charcoal);
  --on-surface: var(--butter);
  --surface-raised: var(--ghost);
  --accent: var(--wheat);
  --muted: var(--rivet);
  --rule: var(--rivet);
  --ghost-ink: var(--ghost);
  --text-step: var(--olive);
  --button-step: var(--olive);
  --focus: var(--wheat);
}

.slab--olive {
  --surface: var(--olive);
  --on-surface: var(--butter);
  --surface-raised: var(--charcoal);
  --accent: var(--wheat);
  --muted: var(--wheat);
  --rule: var(--wheat);
  --ghost-ink: var(--olive); /* ghost words are not used on olive slabs */
  --text-step: var(--charcoal);
  --button-step: var(--charcoal);
  --focus: var(--butter);
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  border-radius: 0;
}

html {
  background: var(--butter);
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  background: var(--surface);
  color: var(--on-surface);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

a:hover {
  background: var(--on-surface);
  color: var(--surface);
  text-decoration: none;
}

:focus-visible {
  outline: 2px dashed var(--focus);
  outline-offset: 4px;
}

::selection {
  background: var(--on-surface);
  color: var(--surface);
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.display,
.h1,
.h2,
.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-display);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-shadow: var(--step-rest) var(--step-rest) 0 var(--text-step);
}

.display { font-size: var(--text-display); }
.h1 { font-size: var(--text-headline-lg); }
.h2 { font-size: var(--text-headline-md); }
.h3 { font-size: var(--text-headline-sm); text-shadow: 2px 2px 0 var(--text-step); }

.display--flat { text-shadow: none; }

.title {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lead {
  font-size: var(--text-lead);
  line-height: 1.45;
  max-width: var(--measure);
}

.tagline {
  font-size: var(--text-tagline);
  font-weight: 500;
  line-height: 1.4;
}

.body { font-size: var(--text-body); max-width: var(--measure); }
.body-sm { font-size: var(--text-body-sm); }
.muted { color: var(--muted); }

.numeral {
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: 0.8;
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.02em;
}

.kbd {
  display: inline-block;
  min-width: 24px;
  padding: 0 var(--space-2xs);
  border: var(--border-control) solid currentColor;
  box-shadow: 2px 2px 0 currentColor;
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  line-height: 20px;
  text-align: center;
}

/* ==========================================================================
   Layout: slabs, container, boot frame
   ========================================================================== */

.slab {
  position: relative;
  background: var(--surface);
  color: var(--on-surface);
  padding: var(--space-3xl) 0;
  overflow: hidden;
  isolation: isolate;
}

.slab--tight { padding: var(--space-2xl) 0; }
.slab--hero { min-height: 88vh; display: grid; align-items: center; }

.container {
  position: relative;
  width: min(100% - var(--space-2xl), var(--container));
  margin-inline: auto;
}

/* The Boot Frame: dashed 1px rule inset from the slab, four square rivets. */
.boot-frame {
  position: absolute;
  inset: var(--frame-inset);
  border: var(--border-frame) dashed var(--rule);
  pointer-events: none;
  z-index: 0;
}

.boot-frame::before {
  content: "";
  position: absolute;
  inset: calc(var(--rivet-size) / -2 - 0.5px);
  --r: var(--on-surface);
  background:
    linear-gradient(var(--r), var(--r)) left top / var(--rivet-size) var(--rivet-size) no-repeat,
    linear-gradient(var(--r), var(--r)) right top / var(--rivet-size) var(--rivet-size) no-repeat,
    linear-gradient(var(--r), var(--r)) left bottom / var(--rivet-size) var(--rivet-size) no-repeat,
    linear-gradient(var(--r), var(--r)) right bottom / var(--rivet-size) var(--rivet-size) no-repeat;
}

.boot-frame--muted::before { --r: var(--rivet); }

.slab > .container { z-index: 1; }

/* Ghost word: oversized bitmap type sitting behind content. */
.ghost-word {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: var(--text-mega);
  line-height: 0.8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ghost-ink);
  pointer-events: none;
  user-select: none;
  z-index: -1;
}

/* Asymmetric split: a heavy block on one side, a short text column on the other. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: var(--space-2xl);
  align-items: center;
}

.split--reverse { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); }
.split--reverse > :first-child { order: 2; }

.stack { display: grid; gap: var(--space-md); align-content: start; }
.stack--sm { gap: var(--space-sm); }
.stack--lg { gap: var(--space-xl); }

.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.push-end { justify-self: end; text-align: right; }

@media (max-width: 880px) {
  .split,
  .split--reverse { grid-template-columns: 1fr; gap: var(--space-xl); }
  .split--reverse > :first-child { order: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .slab { padding: var(--space-2xl) 0; }
  :root { --frame-inset: 12px; }
  .container { width: min(100% - var(--space-xl), var(--container)); }
}

/* ==========================================================================
   Hatch: slanted bars for signoffs, dividers and meters
   ========================================================================== */

.hatch {
  display: block;
  height: 8px;
  width: 128px;
  color: var(--on-surface);
  background: var(--hatch);
}

.hatch--wide { width: 100%; }
.hatch--accent { color: var(--accent); }
.hatch--tall { height: 16px; }

.hatch-meter {
  --value: 50%;
  position: relative;
  height: 16px;
  border: var(--border-control) solid var(--on-surface);
  background: var(--surface);
}

.hatch-meter::after {
  content: "";
  position: absolute;
  inset: 2px auto 2px 2px;
  width: calc(var(--value) - 4px);
  color: var(--on-surface);
  background: var(--hatch);
}

/* Segmented pixel progress: <div class="blocks"><span class="is-on"></span>…</div> */
.blocks {
  display: flex;
  gap: var(--space-2xs);
}

.blocks > span {
  width: 16px;
  height: 24px;
  border: var(--border-control) solid var(--on-surface);
}

.blocks > span.is-on { background: var(--on-surface); }
.blocks > span.is-next { animation: blink 960ms steps(1, end) infinite; background: var(--on-surface); }

@keyframes blink { 50% { background: transparent; } }

/* ==========================================================================
   Brand mark: CSS 3x3 block glyph + bitmap wordmark
   ========================================================================== */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 0.8;
  text-transform: uppercase;
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--text-step);
}

.wordmark:hover { background: none; color: inherit; }

.glyph {
  --px: 6px;
  position: relative;
  width: calc(var(--px) * 3);
  height: calc(var(--px) * 3);
  flex: none;
}

.glyph::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: var(--px);
  height: var(--px);
  background: currentColor;
  color: var(--on-surface);
  box-shadow:
    calc(var(--px) * 1) 0 0 currentColor,
    calc(var(--px) * 2) 0 0 currentColor,
    0 calc(var(--px) * 1) 0 currentColor,
    calc(var(--px) * 2) calc(var(--px) * 2) 0 currentColor,
    calc(var(--px) * 1) calc(var(--px) * 2) 0 currentColor;
}

.glyph--lg { --px: 16px; }

/* ==========================================================================
   Navigation
   ========================================================================== */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
}

.nav__links {
  display: flex;
  gap: var(--space-2xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  display: block;
  padding: var(--space-xs) var(--space-sm);
  font-weight: 600;
  font-size: var(--text-label);
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  text-decoration: none;
}

.nav__link[aria-current="page"] {
  background: var(--on-surface);
  color: var(--surface);
}

/* ==========================================================================
   Buttons
   Layered pseudo-elements so the notched face and the hard step survive
   clip-path. ::before = face, ::after = step.
   ========================================================================== */

.btn {
  --face: var(--on-surface);
  --ink: var(--surface);
  --step: var(--button-step);
  --notch: var(--notch-sm);
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: 0 var(--space-md);
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--step-fast);
}

.btn::before,
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(
    var(--notch) 0, calc(100% - var(--notch)) 0,
    calc(100% - var(--notch)) var(--notch), 100% var(--notch),
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)),
    calc(100% - var(--notch)) 100%, var(--notch) 100%,
    var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch)),
    0 var(--notch), var(--notch) var(--notch)
  );
  transition: transform var(--step-fast);
}

.btn::before { background: var(--face); z-index: -1; }
.btn::after {
  background: var(--step);
  z-index: -2;
  transform: translate(var(--step-rest), var(--step-rest));
}

.btn:hover { background: none; color: var(--ink); transform: translate(var(--step-hover), var(--step-hover)); }
.btn:hover::after { transform: translate(var(--step-hover), var(--step-hover)); }
.btn:active { transform: translate(var(--step-rest), var(--step-rest)); }
.btn:active::after { transform: translate(var(--step-press), var(--step-press)); }

.btn i { font-size: 18px; line-height: 1; }

.btn--secondary {
  --face: var(--surface);
  --ink: var(--on-surface);
  --step: var(--on-surface);
}

/* 2px outline drawn inside the notched face */
.btn--secondary::before {
  background:
    linear-gradient(var(--on-surface), var(--on-surface)) top / 100% 2px no-repeat,
    linear-gradient(var(--on-surface), var(--on-surface)) bottom / 100% 2px no-repeat,
    linear-gradient(var(--on-surface), var(--on-surface)) left / 2px 100% no-repeat,
    linear-gradient(var(--on-surface), var(--on-surface)) right / 2px 100% no-repeat,
    var(--surface);
  clip-path: none;
}

.btn--secondary::after { clip-path: none; }

.btn--ghost {
  min-height: 40px;
  padding: 0 0 var(--space-xs);
  color: var(--on-surface);
}

.btn--ghost::before {
  inset: auto 0 0 0;
  height: 6px;
  clip-path: none;
  color: var(--on-surface);
  background: var(--hatch);
}

.btn--ghost::after { display: none; }
.btn--ghost:hover { color: var(--on-surface); transform: none; }
.btn--ghost:hover::before { height: 100%; opacity: 0.18; }

.btn--lg { min-height: 64px; padding: 0 var(--space-lg); font-size: 16px; --notch: var(--notch-md); }
.btn--sm { min-height: 40px; padding: 0 var(--space-sm); }
.btn--icon { width: 48px; padding: 0; }

.btn:disabled,
.btn[aria-disabled="true"] {
  --face: var(--muted);
  --step: transparent;
  --ink: var(--surface);
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Form fields
   ========================================================================== */

.field { display: grid; gap: var(--space-xs); }

.field__label {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field__hint { font-size: var(--text-body-sm); color: var(--muted); }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-xs) var(--space-sm);
  border: var(--border-control) solid var(--on-surface);
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: var(--text-body);
  caret-color: var(--on-surface);
  box-shadow: var(--step-rest) var(--step-rest) 0 var(--surface-raised);
  transition: background var(--step-fast), color var(--step-fast);
  appearance: none;
}

.textarea { min-height: 128px; resize: vertical; }

.input::placeholder,
.textarea::placeholder { color: var(--muted); opacity: 1; }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  background: var(--on-surface);
  color: var(--surface);
  caret-color: var(--surface);
  box-shadow: var(--step-rest) var(--step-rest) 0 var(--accent);
}

.input:focus::placeholder { color: var(--rivet); }

.select {
  padding-right: var(--space-xl);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(-45deg, transparent 50%, currentColor 50%);
  background-size: 6px 6px, 6px 6px;
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-repeat: no-repeat;
}

.input[aria-invalid="true"] {
  border-style: dashed;
  box-shadow: var(--step-rest) var(--step-rest) 0 var(--on-surface);
}

.field__error {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
  width: fit-content;
  padding: 2px var(--space-xs);
  background: var(--on-surface);
  color: var(--surface);
  font-size: var(--text-body-sm);
  font-weight: 600;
}

/* Blinking block caret used after live terminal-like input values */
.caret {
  display: inline-block;
  width: 0.6em;
  height: 1em;
  vertical-align: -0.12em;
  background: currentColor;
  animation: caret 960ms steps(1, end) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

/* ==========================================================================
   Checkbox, radio, switch: all square
   ========================================================================== */

.check {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 500;
  cursor: pointer;
}

.check input {
  appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: var(--border-control) solid var(--on-surface);
  background: var(--surface);
  box-shadow: 2px 2px 0 var(--surface-raised);
  cursor: pointer;
  display: grid;
  place-content: center;
}

.check input::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--on-surface);
  transform: scale(0);
  transition: transform var(--step-fast);
}

.check input[type="radio"]::before { width: 8px; height: 8px; }
.check input:checked::before { transform: scale(1); }
.check input:checked { box-shadow: 2px 2px 0 var(--accent); }
.check input:disabled { border-color: var(--muted); box-shadow: none; }
.check input:disabled + span { color: var(--muted); }

.switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 500;
  cursor: pointer;
}

.switch input {
  appearance: none;
  width: 56px;
  height: 28px;
  margin: 0;
  border: var(--border-control) solid var(--on-surface);
  background:
    linear-gradient(var(--on-surface), var(--on-surface)) 2px 50% / 20px 20px no-repeat,
    var(--surface);
  cursor: pointer;
  transition: background-position var(--step-fast);
}

.switch input:checked {
  background:
    linear-gradient(var(--surface), var(--surface)) calc(100% - 2px) 50% / 20px 20px no-repeat,
    var(--on-surface);
}

/* ==========================================================================
   Tabs / segmented control: active block is inverted
   ========================================================================== */

.tabs {
  display: inline-flex;
  border: var(--border-control) solid var(--on-surface);
  box-shadow: var(--step-rest) var(--step-rest) 0 var(--surface-raised);
}

.tab {
  min-height: 40px;
  padding: 0 var(--space-md);
  border: 0;
  border-right: var(--border-control) solid var(--on-surface);
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: var(--tracking-button);
  text-transform: uppercase;
  cursor: pointer;
}

.tab:last-child { border-right: 0; }
.tab:hover { background: var(--surface-raised); }

.tab[aria-selected="true"],
.tab.is-active {
  background: var(--on-surface);
  color: var(--surface);
}

/* ==========================================================================
   Panels: notched, used at most twice per section
   ========================================================================== */

.panel {
  --face: var(--on-surface);
  --notch: var(--notch-md);
  position: relative;
  isolation: isolate;
  padding: var(--space-xl);
  color: var(--surface);
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: polygon(
    var(--notch) 0, calc(100% - var(--notch)) 0,
    calc(100% - var(--notch)) var(--notch), 100% var(--notch),
    100% calc(100% - var(--notch)), calc(100% - var(--notch)) calc(100% - var(--notch)),
    calc(100% - var(--notch)) 100%, var(--notch) 100%,
    var(--notch) calc(100% - var(--notch)), 0 calc(100% - var(--notch)),
    0 var(--notch), var(--notch) var(--notch)
  );
}

.panel::before { background: var(--face); z-index: -1; }
.panel::after {
  background: var(--button-step);
  z-index: -2;
  transform: translate(8px, 8px);
}

.panel--flat::after { display: none; }

.panel--olive { --face: var(--olive); color: var(--butter); }
.panel--raised { --face: var(--surface-raised); color: var(--on-surface); }

/* Stepped left edge, like a cartridge label */
.panel--cartridge::before {
  clip-path: polygon(
    16px 0, 100% 0, 100% 100%, 16px 100%,
    16px 80%, 0 80%, 0 64%, 16px 64%,
    16px 36%, 0 36%, 0 20%, 16px 20%
  );
}

.panel--cartridge { padding-left: calc(var(--space-xl) + 16px); }

/* ==========================================================================
   Readout: Kode Mono key/value list for live data only
   ========================================================================== */

.readout {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--space-2xs) var(--space-md);
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  line-height: 1.6;
  text-transform: uppercase;
}

.readout dt {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--muted);
}

.readout dt::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--on-surface);
}

.readout dd { margin: 0; color: var(--on-surface); }

/* Status chip: bound to real state only */
.status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 2px var(--space-xs);
  border: var(--border-control) solid var(--on-surface);
  font-family: var(--font-mono);
  font-size: var(--text-mono-sm);
  text-transform: uppercase;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  background: currentColor;
}

.status--live::before { animation: caret 960ms steps(1, end) infinite; }
.status--alert { background: var(--on-surface); color: var(--surface); }

/* ==========================================================================
   Dithered media: olive duotone + checker mask + pixelated rendering
   ========================================================================== */

.dither {
  position: relative;
  overflow: hidden;
  background: var(--olive);
  aspect-ratio: 3 / 4;
}

.dither img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: grayscale(1) contrast(1.6) brightness(1.05);
  mix-blend-mode: multiply;
}

.dither::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--butter);
  mix-blend-mode: screen;
  opacity: 0.55;
  z-index: 1;
  pointer-events: none;
}

.dither::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--dither);
  opacity: 0.28;
  z-index: 2;
  pointer-events: none;
}

.dither--wide { aspect-ratio: 16 / 9; }
.dither--square { aspect-ratio: 1; }

.media-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
}

.media-strip > :last-child { display: grid; gap: var(--space-xs); }

@media (max-width: 880px) {
  .media-strip { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   Stat block: giant bitmap numeral in an inverted square
   ========================================================================== */

.stat-block {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: var(--space-xl);
  background: var(--on-surface);
  color: var(--wheat);
}

.stat-block .numeral { text-shadow: none; }

/* ==========================================================================
   Band: full-bleed charcoal stripe with scan rules (wordmark lockups)
   ========================================================================== */

.band {
  position: relative;
  padding: var(--space-xl) 0;
  background: var(--charcoal);
  color: var(--butter);
}

.band::before,
.band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 10px;
  background:
    linear-gradient(var(--butter), var(--butter)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--butter), var(--butter)) 0 8px / 100% 2px no-repeat;
}

.band::before { top: var(--space-sm); }
.band::after { bottom: var(--space-sm); }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: var(--space-lg);
  font-size: var(--text-body-sm);
}

/* ==========================================================================
   Reduced motion: freeze blinks and steps
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
