/* ==========================================================================
   Oxidizer Customs — design tokens
   Three colourways lifted from the stickers: Bone, Toxic, Oxblood.
   World: a cel-shaded, hand-inked wasteland (comic outlines, hatching,
   halftone, hard ink shadows).
   ========================================================================== */
:root {
  /* surfaces */
  --ink: #0e0c0a;
  --ink-deep: #0b0806;
  --ink-3: #201913;
  --line: #3a2c20;

  /* text */
  --bone: #ece4d2;
  --bone-dim: #c4baa6;
  --muted: #958b7d;

  /* paper (light panels) and its text */
  --paper: #ece4d2;
  --paper-ink: #1a1410;
  --paper-soft: #3b322a;
  --paper-muted: #5c5146;

  /* the three faces */
  --toxic: #ffd60a;
  --blood: #d1301f;
  --oxblood: #6b1820;

  /* corrosion */
  --rust: #8f3a14;
  --rust-hi: #e07f30;

  /* military surfaces: olive drab, khaki, gunmetal, waxed canvas */
  --olive-dark: #1f2016;
  --olive: #34331f;
  --khaki: #c2b07f;
  --gunmetal: #2a2c2b;
  --canvas: #23241b;

  /* dusk sky, cel bands top to horizon */
  --sky-1: #170c0a;
  --sky-2: #3a1013;
  --sky-3: #66181a;
  --sky-4: #9c3417;
  --sky-5: #d2671f;
  --sky-6: #f0a332;

  /* anodization spectrum (titanium, by voltage) */
  --ti-raw: #9aa0a6;
  --ti-15: #b2773a;
  --ti-20: #7b3fb3;
  --ti-28: #2d5bd1;
  --ti-40: #e3cf8a;
  --ti-55: #d9a62e;
  --ti-75: #c4607a;
  --ti-90: #2fa59a;

  /* loot tiers, named after the colour the metal took */
  --r-common: #b3aea4;
  --r-rare: #4a86ea;
  --r-epic: #a66bf0;
  --r-legendary: #f08a24;

  /* type */
  /* Georgian glyphs fall through to Noto (the Latin faces have none) */
  /* stencil display + labels, serif body */
  --f-display: "Big Shoulders Stencil", "Noto Sans Georgian", "Arial Narrow", sans-serif;
  --f-ui: "Big Shoulders Stencil", "Noto Sans Georgian", "Arial Narrow", sans-serif;
  --f-serif: "Cormorant Garamond", "Noto Serif Georgian", Georgia, serif;
  --f-mono: "IBM Plex Mono", "Noto Sans Georgian", ui-monospace, Consolas, monospace;
  --f-hand: "Permanent Marker", "Noto Sans Georgian", cursive;

  /* rhythm */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --section: clamp(96px, 14vw, 200px);
  --ground-h: clamp(190px, 34svh, 360px);

  /* ink */
  --ink-line: 3px solid var(--ink-deep);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* WEAR:start — generated by tools/wear.py, edit there (textures are baked to img/wear/) */
:root {
  --wear-title: url("img/wear/wear-title.webp");
  --wear-light: url("img/wear/wear-light.webp");
  --stain-a: url("img/wear/stain-a.webp");
  --stain-b: url("img/wear/stain-b.webp");
  --patina: url("img/wear/patina.webp");
}
/* WEAR:end */

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scrollbar-color: var(--rust) var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-serif);
  font-size: 1.125rem;
  line-height: 1.55;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
/* print grit over everything, kept light so the flat cel colour survives */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
em { font-style: italic; }

::selection { background: var(--toxic); color: var(--ink); }
:focus-visible { outline: 3px solid var(--toxic); outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--toxic); color: var(--ink); padding: 12px 16px; border: var(--ink-line);
  font-family: var(--f-ui); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* UI voice: the stencil face, tracked */
.btn, .nav a:not(.brand), .maker, .face-sub, .work-hint, .stage-static span, .footer-inner, .rarity, .stage-name {
  font-family: var(--f-ui); font-weight: 700;
  font-size: 1.05rem; letter-spacing: .12em; text-transform: uppercase;
}

/* headings carry a hard ink-red shadow: cel depth without a glow */
.section-title {
  font-family: var(--f-display); font-weight: 900;
  font-size: clamp(2.75rem, 7.4vw, 6.5rem);
  line-height: .86; letter-spacing: .005em; text-transform: uppercase;
  text-wrap: balance;
  text-shadow: .045em .045em 0 var(--oxblood);
}
.accent { color: var(--toxic); }

/* the sticker's own lettering, used as a margin note */
.hand-title {
  display: inline-block; margin-bottom: clamp(24px, 4vw, 44px);
  font-family: var(--f-hand); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  color: var(--toxic); transform: rotate(-3deg);
}

/* halftone: printed dots that fade out from a hot spot */
.halftone {
  background-image: radial-gradient(circle, var(--dot, var(--toxic)) 34%, transparent 36%);
  background-size: 11px 11px;
}

/* ==========================================================================
   Buttons: inked, with a hard offset shadow that presses in
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 8px 1.5rem; line-height: 1.15;
  text-decoration: none;
  border: var(--ink-line); border-radius: 0;
  box-shadow: 5px 5px 0 var(--shadow, var(--blood));
  transition: background-color .2s, color .2s, transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--shadow, var(--blood)); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--shadow, var(--blood)); }
.btn-primary { background: var(--toxic); color: var(--ink-deep); }
.btn-ghost { background: var(--ink-deep); color: var(--bone); border-color: var(--bone); --shadow: var(--ink-deep); }
.btn-ghost:hover { color: var(--toxic); border-color: var(--toxic); }
.btn-lg { min-height: 60px; padding: 0 2rem; font-size: 1.2rem; }

/* ==========================================================================
   Nav: transparent over the sky, solid ink once the page moves
   ========================================================================== */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px var(--gutter);
  border-bottom: 3px solid transparent;
  transition: background-color .3s, border-color .3s;
}
.nav.is-solid { background: var(--ink); border-bottom-color: var(--ink-deep); }
.brand { display: inline-flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none; min-height: 44px; min-width: 44px; }
.brand-mark { width: 40px; height: 40px; color: var(--toxic); }
.brand-word { font-family: var(--f-hand); font-size: 1.15rem; color: var(--toxic); letter-spacing: .04em; text-shadow: 2px 2px 0 var(--ink-deep); }
.nav ul { display: flex; align-items: center; gap: clamp(4px, 2vw, 24px); }
.nav a:not(.brand) {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
  text-decoration: none; color: var(--bone); text-shadow: 2px 2px 0 var(--ink-deep);
  transition: color .2s;
}
.nav a:not(.brand):hover { color: var(--toxic); }
.nav a.nav-cta {
  color: var(--ink-deep); background: var(--toxic); padding: 0 14px; text-shadow: none;
  border: var(--ink-line); box-shadow: 3px 3px 0 var(--ink-deep);
}
.nav a.nav-cta:hover { color: var(--ink-deep); background: var(--bone); }
.nav .lang { display: flex; align-items: center; }
.nav .lang a { min-width: 44px; justify-content: center; padding: 0 6px; color: var(--bone-dim); }
.nav .lang a[aria-current] { color: var(--toxic); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; }

/* ==========================================================================
   Hero: dusk over the wasteland, the mark as a setting sun
   ========================================================================== */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: 116px var(--gutter) calc(var(--ground-h) * .55);
  max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto;
}
.hero-sky {
  position: absolute; top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  z-index: -1; pointer-events: none; overflow: hidden;
  /* hard stops, no blends: cel-shaded bands */
  background: linear-gradient(180deg,
    var(--sky-1) 0 34%, var(--sky-2) 34% 50%, var(--sky-3) 50% 63%,
    var(--sky-4) 63% 74%, var(--sky-5) 74% 84%, var(--sky-6) 84% 100%);
}
/* an inked storm bank pressing down on the dusk */
.storm { position: absolute; top: 0; left: 0; width: 100%; height: 22%; }

.hero-copy { position: relative; z-index: 3; }
.hero-title {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(3.4rem, 8.2vw, 8.5rem); line-height: .8; letter-spacing: -.005em;
  color: var(--bone);
}
/* a little room inside the reveal mask */
.hero-title .line { display: block; overflow: hidden; padding: .04em .12em .1em .04em; margin: -.04em -.12em -.06em -.04em; }
.hero-title .line > span { display: block; }
.hero-title em { font-style: normal; color: var(--toxic); }

/* the lede sits in a comic caption box */
.hero-lede {
  width: fit-content; max-width: 34ch; margin-top: 30px; padding: 14px 18px;
  background: var(--paper); color: var(--paper-ink); border: var(--ink-line);
  box-shadow: 6px 6px 0 var(--ink-deep);
  font-size: clamp(1.2rem, 1.7vw, 1.45rem); font-style: italic; line-height: 1.4;
  transform: rotate(-1deg);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.hero-mark {
  position: relative; z-index: 1; justify-self: center; align-self: end;
  width: min(100%, 440px);
  translate: 0 12%; /* sits low, its rim behind the mesas; GSAP adds the scroll sink */
}
.face-draw { width: 100%; height: auto; color: var(--blood); overflow: visible; }
.face-draw .disc { fill: var(--toxic); }
.face-draw .grit { color: var(--blood); }
.face-draw .rim { fill: none; stroke: var(--ink-deep); stroke-width: 6; }
.hand-note {
  position: absolute; left: 4%; top: -12%;
  display: flex; align-items: center; gap: 6px;
  font-family: var(--f-hand); font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--toxic);
  text-shadow: 2px 2px 0 var(--ink-deep);
  transform: rotate(-8deg);
}
.hand-note svg { width: 48px; height: 24px; flex: none; filter: drop-shadow(2px 2px 0 var(--ink-deep)); }

.hero-ground {
  position: absolute; z-index: 2; bottom: 0; left: calc(50% - 50vw);
  width: 100vw; height: var(--ground-h); pointer-events: none;
}

/* voltage strip: moves only when the reader scrolls (see main.js) */
.ticker {
  position: absolute; z-index: 4; left: calc(50% - 50vw); right: calc(50% - 50vw); bottom: 0;
  overflow: hidden; border-top: var(--ink-line);
  padding: 12px 0; background: var(--ink-deep);
}
.ticker-track { display: flex; width: max-content; }
.ticker-track span {
  display: inline-flex; align-items: center; gap: 56px;
  font-family: var(--f-mono); font-size: .875rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--bone-dim); padding-inline: 28px; white-space: nowrap;
}
.ticker-track span::after {
  /* a drawn stitch between readings */
  content: ""; width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2 2l10 10M12 2L2 12' stroke='%23e07f30' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ==========================================================================
   Philosophy
   ========================================================================== */
.manifesto { padding-block: var(--section) calc(var(--section) * .5); }
.manifesto-text {
  /* one size for the whole Philosophy: between the old body and the old opening */
  max-width: 48ch;
  font-size: clamp(1.5rem, 2.8vw, 2.5rem); line-height: 1.36; font-weight: 400;
}
/* the one interference word shimmers through the oxide chart */
/* (the gradient sits on the word itself: the reveal wraps it in a fading span, which wouldn't show a parent's clipped background) */
.manifesto-text em, .manifesto-text em .w { background: linear-gradient(90deg, var(--ti-15), var(--ti-20), var(--ti-28), var(--ti-90)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.manifesto-body {
  max-width: 48ch; margin-top: .9em;
  font-size: clamp(1.5rem, 2.8vw, 2.5rem); line-height: 1.36; color: var(--bone);
}
.manifesto-body p + p { margin-top: .9em; }
.manifesto-body .manifesto-pull {
  margin-block: 1.4em; color: var(--bone);
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: .98; letter-spacing: .01em;
  text-shadow: .045em .045em 0 var(--oxblood);
}

/* ==========================================================================
   About: the owner's own words, in a paper caption like the hero lede
   ========================================================================== */
.about { padding-top: var(--section); }
.about-text {
  max-width: 62ch; padding: clamp(22px, 4vw, 44px);
  background: var(--paper); color: var(--paper-ink); border: var(--ink-line);
  box-shadow: 8px 8px 0 var(--ink-deep); transform: rotate(-.6deg);
  font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.55;
}
.about-text p + p { margin-top: .9em; }
.about-text .about-lead { font-size: 1.3em; font-style: italic; line-height: 1.3; }
.about-text .about-sign { font-style: italic; }
.about-text .accent { color: #b02a1b; /* 5.2:1 on paper (--blood was 4.0) */ font-family: var(--f-hand); font-style: normal; }

/* ==========================================================================
   Before / after: a comic panel on a paper mount
   ========================================================================== */
.transform { position: relative; }
.transform-inner {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(28px, 4vw, 48px);
  max-width: var(--max); margin-inline: auto; padding: 96px var(--gutter) 0;
}
.stage { display: none; grid-template-columns: 1.7fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.stage-frame {
  --mount: 10px;
  position: relative; aspect-ratio: 590 / 280;
  background: var(--paper); border: var(--ink-line);
  box-shadow: 10px 10px 0 var(--toxic);
  transform: rotate(-.6deg);
}
.layer { position: absolute; inset: var(--mount); width: calc(100% - 2 * var(--mount)); height: calc(100% - 2 * var(--mount)); object-fit: cover; }
.stage-frame::after {
  /* ink border around the photo inside the mount */
  content: ""; position: absolute; inset: var(--mount); border: var(--ink-line); pointer-events: none; z-index: 2;
}
.stage-clip { position: absolute; inset: var(--mount); overflow: hidden; pointer-events: none; z-index: 1; }
/* the current front: a feathered band of light passing through the metal */
.wipe {
  position: absolute; top: 0; bottom: 0; left: -60px; width: 120px; opacity: 0;
  mix-blend-mode: screen;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--rust-hi) 18%, transparent) 30%,
    color-mix(in srgb, var(--toxic) 85%, white) 50%,
    color-mix(in srgb, var(--rust-hi) 18%, transparent) 70%,
    transparent 100%);
}

.volts { display: flex; align-items: baseline; font-family: var(--f-mono); font-weight: 500; line-height: .9; font-variant-numeric: tabular-nums; }
.volts-num { font-size: clamp(4.5rem, 10vw, 8.5rem); color: var(--bone); text-shadow: .04em .04em 0 var(--oxblood); }
.volts-unit { font-size: clamp(1.6rem, 3vw, 2.6rem); color: var(--toxic); margin-left: 6px; }
.stage-name {
  display: inline-block; margin-top: 14px; padding: 6px 12px;
  background: var(--toxic); color: var(--ink-deep); border: var(--ink-line);
  box-shadow: 4px 4px 0 var(--blood); transform: rotate(-1.5deg);
}
.spectrum { position: relative; margin-top: 30px; }
.spectrum-bar {
  display: block; height: 14px; border: 2px solid var(--bone);
  background: linear-gradient(90deg, var(--ti-raw) 0%, var(--ti-15) 35%, var(--ti-20) 66%, var(--ti-28) 100%);
}
.spectrum-marker {
  position: absolute; top: -8px; left: 0; width: 4px; height: 30px; background: var(--bone);
  box-shadow: 0 0 0 3px var(--ink-deep);
}
.spectrum-ticks {
  display: flex; justify-content: space-between; margin-top: 12px;
  font-family: var(--f-mono); font-size: .875rem; color: var(--muted);
}

.stage-static { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.stage-static img { width: 100%; aspect-ratio: 1440 / 684; object-fit: cover; border: var(--ink-line); outline: 8px solid var(--paper); outline-offset: 0; }
.stage-static span { display: block; margin-top: 16px; color: var(--bone-dim); }
.fine { font-style: italic; font-size: 1.25rem; line-height: 1.45; color: var(--bone-dim); max-width: 60ch; }

/* motion on: show the scrubbed stage, keep the static list for screen readers only */
.motion .stage { display: grid; }
.motion .stage-static {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.motion .layer-1, .motion .layer-2, .motion .layer-3 { clip-path: inset(0 100% 0 0); }

/* ==========================================================================
   Work: loot cards
   ========================================================================== */
.work { padding-top: 0; }
.work-pin { display: flex; flex-direction: column; justify-content: center; gap: clamp(32px, 5vw, 64px); }
.work-head { display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 24px; }
.work-hint { display: none; align-items: center; gap: 10px; color: var(--muted); }
.work-hint svg { width: 40px; height: 16px; color: var(--toxic); }
.work-count { margin-right: 14px; font-family: var(--f-mono); font-weight: 500; letter-spacing: .2em; color: var(--toxic); }
/* phones: a swipe row that snaps card by card, the next card peeking in; desktop pins it (below) */
.track-clip {
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-block: 12px 24px;
}
.track-clip::-webkit-scrollbar { display: none; }
.track { display: flex; gap: 20px; width: max-content; padding: 0 var(--gutter) 24px; }
.piece { width: min(68vw, 300px); flex: none; scroll-snap-align: center; }

.t-common { --tier: var(--r-common); }
.t-rare { --tier: var(--r-rare); }
.t-epic { --tier: var(--r-epic); }
.t-legendary { --tier: var(--r-legendary); }

.piece figure {
  margin: 0; padding: 12px 12px 20px;
  background: var(--paper); color: var(--paper-ink);
  border: var(--ink-line); box-shadow: 9px 9px 0 var(--tier);
  transform: rotate(var(--tilt, -.7deg));
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.piece:nth-child(even) { --tilt: .8deg; }
.piece:hover figure { transform: rotate(0) translate(-3px, -3px); box-shadow: 12px 12px 0 var(--tier); }
.rarity {
  display: inline-block; margin-bottom: 10px; padding: 4px 10px;
  background: var(--ink-deep); color: var(--tier); font-weight: 900; letter-spacing: .18em;
}
/* 9:16 plates: the owner's clips are vertical phone video, shown whole (poster still, then a short loop) */
.plate { position: relative; overflow: hidden; aspect-ratio: 9 / 16; border: var(--ink-line); background: var(--ink-3); }
.plate-media { display: block; width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%; }
figcaption {
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 2px;
  padding-top: 16px; margin-top: 16px; border-top: 2px dashed color-mix(in srgb, var(--paper-ink) 35%, transparent);
}
.lot { font-family: var(--f-mono); font-size: .875rem; color: var(--oxblood); grid-row: span 2; padding-top: 4px; }
.maker { color: var(--paper-muted); }
.model { font-family: var(--f-display); font-weight: 900; font-size: clamp(2rem, 3vw, 2.6rem); line-height: .95; text-transform: uppercase; color: var(--paper-ink); }
.note { grid-column: 2; margin-top: 8px; font-style: italic; font-size: 1.3rem; line-height: 1.35; color: var(--paper-soft); }

@media (min-width: 900px) {
  .work-pin { min-height: 100svh; padding-block: 76px 20px; }
  /* the pinned gallery only when motion is on; without it the row stays a native scroller */
  .motion .work-hint { display: inline-flex; }
  .motion .track-clip { overflow: hidden; scroll-snap-type: none; }
  .track { align-items: center; gap: clamp(36px, 4vw, 64px); padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
  /* a sideways loot card: portrait plate on the left, its stats on the right, sized to fit the pinned screen */
  .piece { --plate-h: min(51svh, 560px); width: auto; scroll-snap-align: none; }
  .work .section-title { font-size: clamp(2.2rem, 3.6vw, 3.4rem); }
  .work-pin { gap: 24px; }
  .piece figure { display: grid; grid-template-columns: calc(var(--plate-h) * .5625) 11.5rem; column-gap: 22px; padding: 12px 18px 16px 12px; }
  .rarity { grid-column: 1 / -1; justify-self: start; }
  .plate { height: var(--plate-h); }
  .piece figcaption { align-self: end; grid-template-columns: auto 1fr; margin-top: 0; padding-top: 0; border-top: 0; }
}

/* ==========================================================================
   Loader: three faces taking turns to spin
   ========================================================================== */
.loader {
  position: fixed; inset: 0; z-index: 300;
  display: grid; place-content: center; justify-items: center; gap: 28px;
  background: var(--ink);
  transition: opacity .6s var(--ease-out), visibility .6s;
  animation: loader-failsafe .01s 6s forwards; /* never strands the page if a script fails */
}
.loaded .loader { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
.loader-faces { display: flex; gap: 20px; }
.lf {
  width: clamp(60px, 10vw, 96px); height: auto; overflow: visible;
  filter: drop-shadow(4px 4px 0 var(--blood));
  animation: lf-spin 1.5s cubic-bezier(.6, 0, .3, 1) infinite;
}
.lf .disc { stroke: var(--ink-deep); stroke-width: 6px; }
.lf-bone { color: #141210; } .lf-bone .disc { fill: #fbf7ec; }
.lf-toxic { color: var(--blood); animation-delay: .18s; } .lf-toxic .disc { fill: var(--toxic); }
.lf-oxblood { color: var(--toxic); animation-delay: .36s; } .lf-oxblood .disc { fill: var(--oxblood); }
@keyframes lf-spin {
  0%   { transform: translateY(0) rotate(0); }
  25%  { transform: translateY(-18px) rotate(-30deg); }
  60%  { transform: translateY(0) rotate(360deg); }
  70%  { transform: translateY(0) rotate(352deg); }
  100% { transform: translateY(0) rotate(360deg); }
}
.loader-word { font-family: var(--f-hand); font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--toxic); transform: rotate(-3deg); }
.loader-word::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: lf-dots 1.2s steps(4) infinite; }
@keyframes lf-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75%, 100% { content: "..."; } }

/* ==========================================================================
   The action: an inked folder that turns, opens, takes colour, closes
   ========================================================================== */
.action { position: relative; overflow: hidden; }
.action-inner {
  min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center;
  gap: clamp(24px, 4vw, 64px); padding-block: 96px 64px;
}
.action-lede { margin-top: 24px; max-width: 30ch; font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-style: italic; line-height: 1.4; color: var(--bone-dim); }
.action-chip {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 28px; padding: 8px 14px 8px 8px;
  background: var(--ink-deep); border: 2px solid var(--bone);
  font-family: var(--f-mono); font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bone);
}
.action-swatch { width: 28px; height: 28px; border: var(--ink-line); outline: 2px solid var(--bone); background: var(--ti-28); }
.action-stage { position: relative; perspective: 1400px; display: grid; place-items: center; }
.knife-turn { width: 100%; transform-style: preserve-3d; }
.knife { width: 100%; height: auto; overflow: visible; filter: drop-shadow(10px 10px 0 var(--oxblood)); }
.knife-shadow {
  display: block; width: 60%; height: 18px; margin-top: 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent);
}

/* ==========================================================================
   The mark: a torn sheet of sticker paper
   ========================================================================== */
.faces {
  position: relative; isolation: isolate;
  margin-block: 0;
  padding-block: calc(var(--section) * .8);
  background: var(--paper); color: var(--paper-ink);
}
/* torn sticker paper: page ink outside the rip, a pale fibre line along it */
.tear { position: absolute; left: 0; z-index: 1; width: 100%; height: 26px; pointer-events: none; }
.tear-top { top: -1px; }
.tear-bottom { bottom: -1px; transform: scaleY(-1); }
.tear-out { fill: var(--ink); }
.tear-fibre { fill: none; stroke: #fffaf0; stroke-width: 3px; vector-effect: non-scaling-stroke; transform: translateY(3px); }
.faces::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .16;
  background-image: radial-gradient(circle, var(--oxblood) 32%, transparent 35%);
  background-size: 10px 10px;
  -webkit-mask-image: radial-gradient(120% 90% at 100% 0, #000, transparent 55%);
          mask-image: radial-gradient(120% 90% at 100% 0, #000, transparent 55%);
}
.faces .section-title { color: var(--paper-ink); text-shadow: .045em .045em 0 var(--toxic); }
.faces .accent { color: var(--oxblood); }
.face-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 40px); margin-top: clamp(40px, 6vw, 72px); }
.face-card { display: flex; flex-direction: column; align-items: flex-start; }
.face-card svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(7px 7px 0 var(--ink-deep)); transition: transform .6s var(--ease-out); }
.face-card .disc { stroke: var(--ink-deep); stroke-width: 5px; }
.face-card:hover svg { transform: rotate(-8deg) scale(1.03); }
.face-name { margin-top: 24px; font-family: var(--f-display); font-weight: 900; font-size: clamp(1.8rem, 3vw, 2.6rem); text-transform: uppercase; line-height: 1; }
.face-sub { color: var(--paper-muted); margin-top: 6px; }
.face-bone svg { color: #141210; } .face-bone .disc { fill: #fbf7ec; }
.face-toxic svg { color: var(--blood); } .face-toxic .disc { fill: var(--toxic); }
.face-oxblood svg { color: var(--toxic); } .face-oxblood .disc { fill: var(--oxblood); }

/* ==========================================================================
   Process
   ========================================================================== */
.process { padding-block: var(--section); }
.process .section-title { margin-bottom: clamp(40px, 6vw, 72px); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); }
.step { border-top: 2px dashed var(--line); padding-top: 24px; position: relative; }
.step::before {
  content: ""; position: absolute; top: -2px; left: 0; height: 3px; width: 100%;
  background: var(--step-charge, var(--toxic)); transform: scaleX(var(--p, 1)); transform-origin: 0 50%;
}
.step-n {
  display: block; font-family: var(--f-display); font-weight: 900; font-size: clamp(3.4rem, 6vw, 5rem); line-height: 1;
  color: var(--rust-hi); text-shadow: .05em .05em 0 var(--oxblood);
}
.step h3 { margin-top: 8px; font-family: var(--f-display); font-weight: 700; font-size: 1.9rem; text-transform: uppercase; letter-spacing: .02em; }
.step p { margin-top: 10px; color: var(--bone-dim); font-size: 1.35rem; line-height: 1.45; max-width: 30ch; }

/* ==========================================================================
   Commission: torn yellow, halftone, the mark grinning through
   ========================================================================== */
.commission {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--toxic); color: var(--ink-deep);
  /* little room under the scene: at the very end of the page the dog, rat and footer share one screen */
  padding-block: calc(var(--section) + 16px) clamp(20px, 3vw, 36px);
}
.commission::before {
  content: ""; position: absolute; inset: 0; z-index: -2; opacity: .28;
  background-image: radial-gradient(circle, var(--blood) 32%, transparent 35%);
  background-size: 12px 12px;
  -webkit-mask-image: radial-gradient(70% 90% at 85% 50%, #000, transparent 70%);
          mask-image: radial-gradient(70% 90% at 85% 50%, #000, transparent 70%);
}
.commission-mark {
  position: absolute; z-index: -1; right: -8%; top: 50%; width: min(70vw, 760px); height: auto;
  color: var(--oxblood); opacity: .3; transform: translateY(-50%) rotate(-12deg);
}
.commission-title {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase;
  font-size: clamp(3.6rem, 11vw, 10rem); line-height: .82;
  text-shadow: .04em .04em 0 var(--blood);
}
.commission-lede { max-width: 26ch; margin: 28px 0 40px; font-size: clamp(1.6rem, 2.8vw, 2.3rem); font-style: italic; line-height: 1.4; color: color-mix(in srgb, var(--ink) 82%, var(--oxblood)); }
.commission .btn-primary { background: var(--ink-deep); color: var(--toxic); --shadow: var(--blood); }
.commission .btn-primary:hover { background: var(--oxblood); color: var(--bone); }
/* the yellow ring vanishes on paper and on yellow: ink there */
.commission :focus-visible, .postcard :focus-visible, .lightbox :focus-visible, .about-text :focus-visible, .piece :focus-visible { outline-color: var(--ink-deep); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer { padding-block: 32px; background: var(--ink-deep); }
.footer-inner { display: flex; align-items: center; gap: 16px; color: var(--muted); }
.footer-mark { width: 32px; height: 32px; flex: none; color: var(--toxic); }
.footer-inner p { flex: 1; font-family: var(--f-serif); font-style: italic; font-size: 1rem; letter-spacing: 0; text-transform: none; }
.footer-inner a { display: inline-flex; align-items: center; min-height: 44px; color: var(--bone-dim); text-underline-offset: 4px; }
.footer-inner a:hover { color: var(--toxic); }

/* ==========================================================================
   Georgian: longer words, condensed Noto, looser leading
   ========================================================================== */
:root[lang="ka"] .hero-title,
:root[lang="ka"] .section-title,
:root[lang="ka"] .commission-title,
:root[lang="ka"] .model,
:root[lang="ka"] .face-name,
:root[lang="ka"] .step h3,
:root[lang="ka"] .btn,
:root[lang="ka"] .nav a:not(.brand),
:root[lang="ka"] .rarity,
:root[lang="ka"] .stage-name,
:root[lang="ka"] .maker,
:root[lang="ka"] .face-sub,
:root[lang="ka"] .work-hint { font-stretch: 72%; letter-spacing: .04em; overflow-wrap: break-word; }
:root[lang="ka"] .hero-title { font-size: clamp(2.6rem, 6.4vw, 6.8rem); line-height: .98; }
:root[lang="ka"] .section-title { font-size: clamp(2.1rem, 5.4vw, 4.9rem); line-height: 1; }
:root[lang="ka"] .commission-title { font-size: clamp(2.3rem, 7.6vw, 7.2rem); line-height: 1; }
:root[lang="ka"] .model { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.05; }
:root[lang="ka"] .face-name { font-size: clamp(1.2rem, 2.2vw, 2rem); }
:root[lang="ka"] .step h3 { font-size: 1.5rem; }
:root[lang="ka"] .manifesto-text { font-size: clamp(1.3rem, 2.6vw, 2.3rem); line-height: 1.5; max-width: 40ch; }
:root[lang="ka"] .hero-lede,
:root[lang="ka"] .action-lede,
:root[lang="ka"] .commission-lede,
:root[lang="ka"] .note,
:root[lang="ka"] .step p,
:root[lang="ka"] .fine { font-style: normal; line-height: 1.55; }
:root[lang="ka"] .hero-lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); }
:root[lang="ka"] .hand-title,
:root[lang="ka"] .hand-note { font-weight: 800; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 699px) {
  .hero { grid-template-columns: 1fr; align-content: center; padding-top: 100px; padding-bottom: calc(var(--ground-h) * .5); }
  .hero-mark { order: -1; width: min(44vw, 200px); justify-self: start; align-self: auto; translate: none; }
  .hand-note { left: 100%; top: 30%; flex-direction: row-reverse; }
  .hand-note svg { transform: scaleX(-1); } /* the arrow points back at the face */
  .storm { height: 14%; }
}
@media (max-width: 899px) {
  .action-inner { grid-template-columns: 1fr; align-content: center; }
  .stage { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .brand-word { display: none; }
  .nav a.nav-sec:not(.brand) { display: none; } /* section links; the Artwork page and Commission stay */
  .face-row { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; }
  .face-name { font-size: 1.35rem; margin-top: 16px; }
  .face-sub { font-size: .875rem; letter-spacing: .06em; }
  .face-card svg { filter: drop-shadow(4px 4px 0 var(--ink-deep)); }
  .steps { grid-template-columns: 1fr; }
  .stage-static { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .btn-lg { width: 100%; padding: 0 1rem; font-size: 1.05rem; letter-spacing: .06em; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .lf, .loader-word::after { animation: none; }
  .loader { transition: none; }
  .btn, .piece figure, .face-card svg, .nav, .nav a { transition: none; }
  .btn:hover, .btn:active, .face-card:hover svg { transform: none; }
  .piece:hover figure { transform: rotate(var(--tilt, -.7deg)); }
}

/* ==========================================================================
   Wear: the owner keeps the marks the process leaves, so the page does too.
   Textures come from tools/wear.py. Dials: --grain 0 kills the grit; any of
   --wear-title / --wear-light / --stain-a / --stain-b / --patina set to none
   switches that layer off.
   ========================================================================== */
:root { --grain: .07; }
body::after { opacity: var(--grain); }

/* worn stencil: the paint skipped in places. The tile is sized in em so every title wears in
   proportion; the padding keeps the hard shadow inside the mask box. */
.section-title, .commission-title, .manifesto-pull {
  padding: 0 .07em .1em 0;
  -webkit-mask: var(--wear-title) 0 0 / 2em 2em repeat;
          mask: var(--wear-title) 0 0 / 2em 2em repeat;
}
/* the hero title gets a lighter hand; the mask rides on the line so it travels with the intro */
.hero-title .line > span {
  -webkit-mask: var(--wear-light) 0 0 / 2em 2em repeat;
          mask: var(--wear-light) 0 0 / 2em 2em repeat;
}

/* paper: rust blooms and foxing, never twice in the same place */
.hero-lede { background: var(--stain-a) right -150px top -170px / 300px no-repeat, var(--paper); }
.about-text {
  background:
    var(--stain-b) right -140px bottom -150px / 360px no-repeat,
    var(--stain-a) left -140px top -155px / 300px no-repeat,
    var(--paper);
}
.piece:nth-child(4n+1) figure { background: var(--stain-a) right -170px bottom -150px / 300px no-repeat, var(--paper); }
.piece:nth-child(4n+2) figure { background: var(--stain-b) left -190px top -160px / 340px no-repeat, var(--paper); }
.piece:nth-child(4n+3) figure { background: var(--stain-b) right -160px top -180px / 280px no-repeat, var(--paper); }
.piece:nth-child(4n+4) figure { background: var(--stain-a) left -150px bottom -190px / 320px no-repeat, var(--paper); }
.faces { background: var(--stain-b) left -260px bottom -300px / 640px no-repeat, var(--paper); }

/* dark sections: hard-edged rust patina creeping in from one edge (never in the hero) */
.manifesto, .process { position: relative; isolation: isolate; }
.manifesto::before, .process::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--patina) right -300px top -120px / 640px no-repeat;
}
.process::before { background-position: left -320px bottom -260px; }

/* MORSE:start — generated by tools/morse.py, edit there */
/* the nav mark's open eye blinks "YOU NEED A KNIFE" in Morse, then rests and repeats */
@keyframes morse {
  0% { transform: scaleY(1); }
  0% { transform: scaleY(1); }
  0.118%, 2.013% { transform: scaleY(.15); }
  2.132% { transform: scaleY(1); }
  2.685% { transform: scaleY(1); }
  2.803%, 3.356% { transform: scaleY(.15); }
  3.474% { transform: scaleY(1); }
  4.027% { transform: scaleY(1); }
  4.145%, 6.04% { transform: scaleY(.15); }
  6.159% { transform: scaleY(1); }
  6.711% { transform: scaleY(1); }
  6.83%, 8.725% { transform: scaleY(.15); }
  8.843% { transform: scaleY(1); }
  10.738% { transform: scaleY(1); }
  10.857%, 12.752% { transform: scaleY(.15); }
  12.87% { transform: scaleY(1); }
  13.423% { transform: scaleY(1); }
  13.541%, 15.436% { transform: scaleY(.15); }
  15.555% { transform: scaleY(1); }
  16.107% { transform: scaleY(1); }
  16.226%, 18.121% { transform: scaleY(.15); }
  18.239% { transform: scaleY(1); }
  20.134% { transform: scaleY(1); }
  20.253%, 20.805% { transform: scaleY(.15); }
  20.924% { transform: scaleY(1); }
  21.477% { transform: scaleY(1); }
  21.595%, 22.148% { transform: scaleY(.15); }
  22.266% { transform: scaleY(1); }
  22.819% { transform: scaleY(1); }
  22.937%, 24.832% { transform: scaleY(.15); }
  24.951% { transform: scaleY(1); }
  29.53% { transform: scaleY(1); }
  29.649%, 31.544% { transform: scaleY(.15); }
  31.662% { transform: scaleY(1); }
  32.215% { transform: scaleY(1); }
  32.333%, 32.886% { transform: scaleY(.15); }
  33.004% { transform: scaleY(1); }
  34.899% { transform: scaleY(1); }
  35.018%, 35.57% { transform: scaleY(.15); }
  35.689% { transform: scaleY(1); }
  37.584% { transform: scaleY(1); }
  37.702%, 38.255% { transform: scaleY(.15); }
  38.373% { transform: scaleY(1); }
  40.268% { transform: scaleY(1); }
  40.387%, 42.282% { transform: scaleY(.15); }
  42.4% { transform: scaleY(1); }
  42.953% { transform: scaleY(1); }
  43.071%, 43.624% { transform: scaleY(.15); }
  43.743% { transform: scaleY(1); }
  44.295% { transform: scaleY(1); }
  44.414%, 44.966% { transform: scaleY(.15); }
  45.085% { transform: scaleY(1); }
  49.664% { transform: scaleY(1); }
  49.783%, 50.336% { transform: scaleY(.15); }
  50.454% { transform: scaleY(1); }
  51.007% { transform: scaleY(1); }
  51.125%, 53.02% { transform: scaleY(.15); }
  53.139% { transform: scaleY(1); }
  57.718% { transform: scaleY(1); }
  57.837%, 59.732% { transform: scaleY(.15); }
  59.85% { transform: scaleY(1); }
  60.403% { transform: scaleY(1); }
  60.521%, 61.074% { transform: scaleY(.15); }
  61.192% { transform: scaleY(1); }
  61.745% { transform: scaleY(1); }
  61.863%, 63.758% { transform: scaleY(.15); }
  63.877% { transform: scaleY(1); }
  65.772% { transform: scaleY(1); }
  65.89%, 67.785% { transform: scaleY(.15); }
  67.904% { transform: scaleY(1); }
  68.456% { transform: scaleY(1); }
  68.575%, 69.128% { transform: scaleY(.15); }
  69.246% { transform: scaleY(1); }
  71.141% { transform: scaleY(1); }
  71.259%, 71.812% { transform: scaleY(.15); }
  71.931% { transform: scaleY(1); }
  72.483% { transform: scaleY(1); }
  72.602%, 73.154% { transform: scaleY(.15); }
  73.273% { transform: scaleY(1); }
  75.168% { transform: scaleY(1); }
  75.286%, 75.839% { transform: scaleY(.15); }
  75.957% { transform: scaleY(1); }
  76.51% { transform: scaleY(1); }
  76.629%, 77.181% { transform: scaleY(.15); }
  77.3% { transform: scaleY(1); }
  77.852% { transform: scaleY(1); }
  77.971%, 79.866% { transform: scaleY(.15); }
  79.984% { transform: scaleY(1); }
  80.537% { transform: scaleY(1); }
  80.655%, 81.208% { transform: scaleY(.15); }
  81.326% { transform: scaleY(1); }
  83.221% { transform: scaleY(1); }
  83.34%, 83.893% { transform: scaleY(.15); }
  84.011% { transform: scaleY(1); }
  100% { transform: scaleY(1); }
}
.brand-mark .eye-open { transform-box: fill-box; transform-origin: 50% 60%; animation: morse 25.33s linear 2s infinite; }
@media (prefers-reduced-motion: reduce) { .brand-mark .eye-open { animation: none; } }
/* MORSE:end */

/* ==========================================================================
   The battle badge: the crew's loyalty card, drawn as the real dog tag
   ========================================================================== */
.about-grid { display: grid; gap: clamp(48px, 7vw, 96px); align-items: center; }
.badge { margin: 0; display: grid; gap: 28px; justify-items: start; }
.badge-art { position: relative; isolation: isolate; width: min(100%, 285px); margin-bottom: 26%; transform: rotate(-5deg); }
.badge-tag { display: block; width: 100%; height: auto; filter: drop-shadow(8px 10px 0 var(--ink-deep)); }
.chain { position: absolute; z-index: -1; inset: 0 auto auto 0; width: 100%; height: auto; overflow: visible; filter: drop-shadow(4px 5px 0 var(--ink-deep)); }
.badge-copy { display: block; max-width: 40ch; margin: 0; padding: 0; border: 0; } /* not the loot-card caption grid */
.badge-copy .hand-title { margin-bottom: 16px; }
.badge-copy p { font-size: clamp(1.25rem, 1.8vw, 1.55rem); line-height: 1.45; color: var(--bone); }
.badge-copy strong { font-weight: 500; color: var(--toxic); }
.badge-copy p + p { margin-top: .7em; }
@media (min-width: 1000px) {
  .about-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
}

/* ==========================================================================
   The workshop guardian: the artist's bulldog as a die-cut sticker, keeping watch over the blades
   ========================================================================== */
.guardian {
  margin: 48px 0 0; width: min(100%, 540px); justify-self: end;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: ". bubble" "thief dog" ". cap";
  column-gap: 6px; align-items: end;
}
.guard-dog { grid-area: dog; justify-self: center; width: auto; max-width: 100%; max-height: min(46svh, 430px); height: auto; transform: rotate(3deg); filter: drop-shadow(7px 9px 0 var(--ink-deep)); }
/* the thief: the artist's rat, legging it with a knife off the bench */
/* smaller than the dog and keeping its distance; isolate so the knife can sit behind its paws */
.thief { grid-area: thief; position: relative; isolation: isolate; justify-self: start; width: 72%; margin: 0 0 3% -38%; }
.thief img { display: block; width: 100%; height: auto; transform: rotate(-5deg); filter: drop-shadow(5px 7px 0 var(--ink-deep)); }
.loot { position: absolute; z-index: -1; left: -14%; top: 47%; width: 56%; height: auto; transform: rotate(-21deg); transform-origin: 80% 50%; filter: drop-shadow(3px 4px 0 var(--ink-deep)); }
.guardian figcaption {
  display: block; border-top: 0; padding-top: 0; /* not the loot-card caption grid */
  grid-area: cap; margin-top: 18px; font-family: var(--f-hand); font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  color: var(--ink-deep); transform: rotate(-2deg); text-align: center;
}
/* comic speech bubble: bone paper, ink line, hard shadow, a tail down to the dog's head */
.bubble {
  position: relative; z-index: 1; max-width: 15em; margin: 0;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .2s;
  padding: 14px 18px; background: var(--paper); color: var(--paper-ink);
  border: var(--ink-line); border-radius: 22px; box-shadow: 5px 5px 0 var(--ink-deep);
  font-family: var(--f-hand); font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.32; transform: rotate(-3deg);
}
.bubble::before, .bubble::after { content: ""; position: absolute; left: 54%; width: 0; height: 0; border-style: solid; }
.bubble::before { bottom: -26px; border-width: 26px 6px 0 20px; border-color: var(--ink-deep) transparent transparent transparent; }
.bubble::after { bottom: -18px; left: calc(54% + 5px); border-width: 19px 4px 0 13px; border-color: var(--paper) transparent transparent transparent; }
@media (min-width: 900px) {
  .commission-inner { display: grid; grid-template-columns: 1fr auto; grid-template-rows: 1fr 1fr; column-gap: 48px; }
  .commission-lede { align-self: end; }
  .commission-title { grid-column: 1 / -1; }
  .commission-lede, .contact-actions { grid-column: 1; align-self: start; justify-self: start; }
  .commission-lede { grid-row: 1; }
  .contact-actions { grid-row: 2; align-self: start !important; }
  .guardian { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; align-self: end; width: clamp(440px, 38vw, 580px); translate: clamp(0px, 3vw, 60px) 0; }
  .commission-mark { right: auto; left: -16%; }
}
@media (max-width: 899px) {
  .bubble-wrap { margin-left: 0; }
  /* no spare room on the left here: the rat keeps to its own column, still smaller than the dog */
  .thief { margin-left: 0; width: 92%; }
}

/* ==========================================================================
   Artwork: the workshop wall, the artist's paintings pinned up as postcards
   ========================================================================== */
.wall {
  position: relative; isolation: isolate; min-height: 100svh;
  padding: calc(var(--section) * .85) 0 var(--section); background: #18110d;
}
.wall::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    var(--patina) right -280px top -60px / 680px no-repeat,
    var(--patina) left -340px bottom -220px / 760px no-repeat;
}
.wall-lede { max-width: 40ch; margin-top: 22px; font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-style: italic; color: var(--bone-dim); }
.board {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start;
  gap: clamp(64px, 8vw, 120px) clamp(36px, 6vw, 96px); margin-top: clamp(64px, 9vw, 120px);
}
.postcard { position: relative; --rot: -2deg; }
.pc-1 { --rot: -2.5deg; }
.pc-2 { --rot: 2deg; margin-top: 80px; }
.pc-3 { --rot: 1.4deg; }
.pc-4 { --rot: -1.8deg; margin-top: 60px; }
.postcard figure {
  margin: 0; padding: 14px 14px 18px; background: var(--paper); color: var(--paper-ink);
  border: var(--ink-line); box-shadow: 10px 12px 0 var(--ink-deep);
  /* hung on one pin at top centre: every turn pivots there */
  transform: rotate(var(--rot)); transform-origin: 50% 6px;
}
.postcard:nth-child(odd) figure { background: var(--stain-a) right -150px bottom -160px / 300px no-repeat, var(--paper); }
.postcard:nth-child(even) figure { background: var(--stain-b) left -170px top -150px / 320px no-repeat, var(--paper); }
/* taped cards stay put; pinned ones swing on the pin when nudged */
.pinned:hover figure { animation: swing 1.6s cubic-bezier(.3, .6, .4, 1); }
/* a nudge sets it swinging on the pin, and it settles back where it hung */
@keyframes swing {
  0% { transform: rotate(var(--rot)); }
  18% { transform: rotate(calc(var(--rot) + 6deg)); }
  40% { transform: rotate(calc(var(--rot) - 4deg)); }
  62% { transform: rotate(calc(var(--rot) + 2deg)); }
  82% { transform: rotate(calc(var(--rot) - .8deg)); }
  100% { transform: rotate(var(--rot)); }
}
.postcard-open { display: block; width: 100%; padding: 0; border: var(--ink-line); background: var(--ink-3); cursor: zoom-in; }
.postcard-open img { display: block; width: 100%; height: auto; }
.pc-no { font-family: var(--f-mono); font-size: .875rem; color: var(--oxblood); grid-row: span 2; padding-top: 4px; }
.pc-title { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: .95; text-transform: uppercase; }
.pc-note { grid-column: 2; margin-top: 6px; font-family: var(--f-hand); font-size: 1.1rem; line-height: 1.35; color: var(--paper-soft); }
/* how they're stuck up: masking tape across the top corners, or one red pushpin at top centre */
.tape {
  position: absolute; z-index: 2; top: -16px; left: 10%; width: 112px; height: 34px;
  background: rgba(236, 228, 210, .74); box-shadow: 0 2px 0 rgba(11, 8, 6, .3); transform: rotate(-9deg);
  clip-path: polygon(3% 0, 97% 5%, 100% 52%, 96% 100%, 2% 95%, 0 46%);
}
.tape-b { left: auto; right: 9%; transform: rotate(8deg); }
.pin { position: absolute; z-index: 2; top: -26px; left: 50%; width: 46px; height: 46px; translate: -50% 0; pointer-events: none; }
/* the larger view */
.lightbox {
  width: fit-content; max-width: min(92vw, 700px); max-height: 92svh; padding: 16px; overflow: auto;
  background: var(--paper); color: var(--paper-ink); border: var(--ink-line); box-shadow: 12px 14px 0 var(--ink-deep);
}
.lightbox::backdrop { background: rgba(11, 8, 6, .86); }
.lightbox-img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(92svh - 120px); margin-inline: auto; border: var(--ink-line); }
.lightbox-title { margin-top: 12px; font-family: var(--f-display); font-weight: 900; font-size: 1.8rem; text-transform: uppercase; }
.lightbox-close {
  position: absolute; top: 8px; right: 8px; z-index: 1; width: 44px; height: 44px; border-radius: 50%;
  border: var(--ink-line); background: var(--toxic); color: var(--ink-deep); font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.lightbox form { margin: 0; }
@media (max-width: 760px) {
  .board { grid-template-columns: 1fr; }
  .pc-2, .pc-4 { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pinned:hover figure { animation: none; }
}

/* the bark: the bubble pops, a comic burst shouts, the bubble comes back (timing in main.js) */
.bubble-wrap { grid-area: bubble; position: relative; justify-self: start; margin: 0 0 22px -30%; }
.bark {
  position: absolute; z-index: 2; left: 50%; top: 46%; width: 132%; pointer-events: none;
  translate: -50% -50%; opacity: 0; transform: scale(.3) rotate(-14deg);
  transition: transform .18s ease-in, opacity .15s;
}
.bark svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(5px 5px 0 var(--ink-deep)); }
.bark polygon { fill: var(--paper); stroke: var(--ink-deep); stroke-width: 5; stroke-linejoin: miter; }
.woof {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(1.9rem, 3.2vw, 2.8rem); line-height: 1;
  text-transform: uppercase; color: var(--blood); text-shadow: 3px 3px 0 var(--ink-deep); letter-spacing: .02em;
  transform: rotate(-8deg) translate(-16%, -58%); opacity: 0;
}
.woof-2 { transform: rotate(5deg) translate(20%, 42%) scale(.82); }
.barking .bubble { opacity: 0; transform: scale(.7) rotate(-6deg); transition: transform .15s ease-in, opacity .12s; }
.barking .bark {
  opacity: 1; transform: scale(1) rotate(-4deg);
  transition: transform .35s cubic-bezier(.34, 1.7, .64, 1), opacity .1s;
  animation: bark-shake .09s steps(2) .3s 6;
}
.barking .woof { opacity: 1; transition: opacity .05s .1s; }
.barking .woof-2 { transition-delay: .55s; }
@keyframes bark-shake { 50% { translate: calc(-50% + 3px) calc(-50% - 2px); } }

/* the page you're on, in the nav */
.nav a[aria-current="page"] { color: var(--toxic); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 7px; }

/* a piece that has found its owner: a rubber stamp in the card's top-right corner, worn like the titles */
.piece figure { position: relative; }
.piece .stamp {
  position: absolute; z-index: 2; top: 14px; right: 16px; rotate: 9deg;
  padding: .14em .4em .08em; white-space: nowrap;
  font-family: var(--f-display); font-weight: 900; font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1;
  letter-spacing: .12em; text-transform: uppercase; color: #b02a1b;
  border: 3px solid currentColor; outline: 2px solid currentColor; outline-offset: 3px;
  -webkit-mask: var(--wear-title) 0 0 / 2.4em 2.4em repeat;
          mask: var(--wear-title) 0 0 / 2.4em 2.4em repeat;
  pointer-events: none;
}

/* Instagram and YouTube as inked marks: quiet in the footer, sticker-buttons in the contact section */
.social { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.social a { display: inline-grid; place-items: center; width: 44px; height: 44px; color: var(--bone-dim); transition: color .2s, transform .2s var(--ease-out), box-shadow .2s var(--ease-out); }
.social svg { width: 20px; height: 20px; }
.social a:hover { color: var(--toxic); }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.social-lg a { width: 44px; height: 44px; color: var(--toxic); background: var(--ink-deep); border: var(--ink-line); box-shadow: 3px 3px 0 var(--blood); }
.social-lg svg { width: 20px; height: 20px; }
.social-lg a:hover { color: var(--bone); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--blood); }
@media (prefers-reduced-motion: reduce) { .social a { transition: none; } .social-lg a:hover { transform: none; } }

/* ==========================================================================
   Loot-card clips as a worn transmission (Fallout / ECHO feed). The card in focus (centre of the
   screen, .is-focus from main.js) plays clean; the ones either side carry scanlines and now and
   then a white-lightning static flicker with a sideways jolt. Overlays and transforms only.
   ========================================================================== */
.plate::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(11, 8, 6, .22) 0 1px, transparent 1px 3px);
  transition: opacity .35s;
}
.plate::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(transparent 0 16%, rgba(255, 255, 255, .9) 16% 16.8%, transparent 16.8% 38%,
    rgba(255, 255, 255, .55) 38% 38.4%, transparent 38.4% 63%, rgba(255, 255, 255, .95) 63% 64.6%,
    transparent 64.6% 81%, rgba(255, 255, 255, .6) 81% 81.5%, transparent 81.5%);
}
.piece.is-focus .plate::after { opacity: 0; }
.motion .piece:not(.is-focus) .plate::before { animation: tv-zap 5.5s steps(1) infinite; }
.motion .piece:not(.is-focus) .plate-media { animation: tv-jolt 5.5s steps(1) infinite; }
.piece:nth-child(3n+2) .plate::before, .piece:nth-child(3n+2) .plate-media { animation-delay: -1.9s; }
.piece:nth-child(3n) .plate::before, .piece:nth-child(3n) .plate-media { animation-delay: -3.6s; }
@keyframes tv-zap {
  0%, 90% { opacity: 0; transform: none; }
  91% { opacity: .95; transform: translateX(-7px) scaleY(1.04); }
  92% { opacity: 0; }
  93.5% { opacity: .7; transform: translateX(5px) translateY(6%); }
  94.5%, 100% { opacity: 0; transform: none; }
}
@keyframes tv-jolt {
  0%, 90%, 95%, 100% { transform: none; }
  91% { transform: translateX(-6px) skewX(-3deg); }
  93.5% { transform: translateX(4px); }
}

/* ==========================================================================
   Final polish (design round 2)
   ========================================================================== */
/* desktop loot cards: the lot number fills the caption column as a big stencil numeral */
@media (min-width: 900px) {
  .piece figcaption { align-self: stretch; grid-template-columns: 1fr; grid-template-rows: 1fr auto auto auto; padding-top: 64px; }
  .piece .lot { grid-row: 1; grid-column: 1; align-self: start; padding-top: 0;
    font: 900 3.2rem/1 var(--f-display); color: color-mix(in srgb, var(--tier) 65%, var(--paper-ink)); }
  .piece .model { font-size: clamp(1.6rem, 2.2vw, 2rem); }
  .piece .note { font-size: 1.1rem; }
  .piece .maker, .piece .model, .piece .note { grid-column: 1; }
}
@media (max-width: 899px) {
  /* one card at a time on phones: the card is most of the screen, the clip fits its height, centred */
  .piece { width: min(86vw, 360px); }
  .plate { height: min(56svh, 520px); width: auto; max-width: 100%; margin-inline: auto; }
  .knife-turn { width: 88%; margin-right: 12%; }
}
/* each CLAIMED stamp lands a little differently, like it was pressed by hand */
.piece:nth-child(3n+2) .stamp { rotate: -5deg; top: 20px; right: 22px; -webkit-mask-position: .7em .3em; mask-position: .7em .3em; }
.piece:nth-child(3n) .stamp { rotate: 13deg; top: 10px; right: 12px; -webkit-mask-position: .2em 1.1em; mask-position: .2em 1.1em; }
.piece:nth-child(4n) .stamp { opacity: .82; }
/* each process step charges to its own voltage colour */
.step:nth-child(1) { --step-charge: var(--ti-raw); }
.step:nth-child(2) { --step-charge: var(--ti-15); }
.step:nth-child(3) { --step-charge: linear-gradient(90deg, var(--ti-20), var(--ti-28), var(--ti-90)); }
.step:nth-child(4) { --step-charge: var(--ti-55); }
/* the knife turns above a bench line */
.action-stage::after { content: ""; width: 100%; height: 3px; margin-top: -6px; background: var(--ink-deep); box-shadow: 0 2px 0 var(--rust-hi); }
/* the dog and the rat share a floor */
.guardian { position: relative; }
.guardian::before {
  content: ""; position: absolute; z-index: -1; left: -30%; right: 0; bottom: 3.2em; height: 4px; pointer-events: none;
  background: var(--ink-deep); clip-path: polygon(0 40%, 30% 0, 62% 60%, 100% 20%, 100% 100%, 0 100%);
}
@media (max-width: 899px) { .guardian::before { left: 0; } }
/* the Artwork wall as a workshop pegboard */
.board {
  padding: clamp(28px, 4vw, 56px); border: var(--ink-line); box-shadow: 12px 12px 0 var(--ink-deep);
  background: radial-gradient(circle, #0b0806 2.5px, transparent 3px) 0 0 / 30px 30px, #3a2a1f;
}

/* the fourth face: raw titanium on a bench power-supply dial */
.face-ti svg { color: #141210; }
.face-ti .disc { fill: var(--ti-raw); }
.face-ti.flash svg { animation: ti-flash .14s steps(1); }
@keyframes ti-flash { 0% { filter: brightness(2.3) drop-shadow(7px 7px 0 var(--ink-deep)); } }
.dial { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; margin-top: 14px; background: transparent; cursor: pointer; }
.dial::-webkit-slider-runnable-track { height: 14px; border: var(--ink-line); background: var(--chart, linear-gradient(90deg, var(--ti-raw), var(--ti-28), var(--ti-55), var(--ti-90))); }
.dial::-moz-range-track { height: 14px; border: var(--ink-line); background: var(--chart, linear-gradient(90deg, var(--ti-raw), var(--ti-28), var(--ti-55), var(--ti-90))); }
.dial::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -11px; border: var(--ink-line); border-radius: 0;
  background: repeating-linear-gradient(90deg, #1a1410 0 2px, var(--toxic) 2px 5px); box-shadow: 3px 3px 0 var(--ink-deep); }
.dial::-moz-range-thumb { width: 26px; height: 26px; border: var(--ink-line); border-radius: 0;
  background: repeating-linear-gradient(90deg, #1a1410 0 2px, var(--toxic) 2px 5px); box-shadow: 3px 3px 0 var(--ink-deep); }
.dial:focus-visible { outline: 3px solid var(--ink-deep); outline-offset: 4px; }
.face-ti output { font-family: var(--f-mono); letter-spacing: .12em; }
/* Artwork: a postcard never outgrows the screen; the card shrinks to its painting */
.postcard figure { width: fit-content; max-width: 100%; margin-inline: auto; }
.postcard-open img { width: auto; max-width: 100%; max-height: min(64svh, 600px); margin-inline: auto; }

/* No. 12, the next piece: a blueprint sketch, measurements still question marks */
.plate .blueprint { display: block; width: 100%; height: 100%; }
.t-mystery { --tier: var(--muted); }
.plate-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.plate .cover { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.stamp-bench { color: var(--ti-28) !important; }
.piece .note a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Artwork: the closing band, torn like the home page's contact section */
.wall-end { position: relative; background: var(--toxic); color: var(--ink-deep); padding-block: calc(var(--section) * .8 + 16px) calc(var(--section) * .8); }
.wall-end .tear-out { fill: #18110d; }
.wall-end .section-title { color: var(--ink-deep); text-shadow: .045em .045em 0 var(--blood); }
.wall-end .accent { color: var(--oxblood); }
.wall-end-lede { max-width: 30ch; margin: 24px 0 36px; font-size: clamp(1.4rem, 2.4vw, 2rem); font-style: italic; line-height: 1.35; }
.wall-end .btn-primary { background: var(--ink-deep); color: var(--toxic); --shadow: var(--blood); }
.wall-end .btn-primary:hover { background: var(--oxblood); color: var(--bone); }
.wall-end :focus-visible { outline-color: var(--ink-deep); }

/* the texture slider stands upright beside the face */
.ti-stage { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; }
.dial-v { writing-mode: vertical-lr; direction: rtl; width: 34px; height: 70%; margin: 0; justify-self: center; }
.dial-v::-webkit-slider-runnable-track { width: 14px; height: auto; background: repeating-linear-gradient(180deg, var(--paper-soft) 0 3px, var(--paper) 3px 7px); }
.dial-v::-moz-range-track { width: 14px; height: 100%; background: repeating-linear-gradient(180deg, var(--paper-soft) 0 3px, var(--paper) 3px 7px); }
.dial-v::-webkit-slider-thumb { margin-top: 0; margin-left: -11px; }
.face-ti .tex { pointer-events: none; }

/* desktop: the dial face is the same size as its neighbours, the texture slider stands in the margin */
@media (min-width: 900px) {
  .face-ti .ti-stage { display: block; position: relative; }
  /* in the page margin, clear of the face and its shadow */
  .face-ti .dial-v { position: absolute; top: 15%; right: calc(-1 * min(var(--gutter), 46px)); width: 26px; height: 70%; }
}
.face-ti .dial:not(.dial-v) { margin-top: 18px; }

/* the Philosophy label carries the section, a size up from the other margin notes */
.manifesto .hand-title { font-size: clamp(2.1rem, 3.8vw, 3.2rem); }

/* the dial face's text changes as the levers move; reserve its space so the section below never jumps */
.face-ti .face-name { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.face-ti output { display: block; white-space: pre; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; height: 2.6em; font-variant-numeric: tabular-nums; }
.face-ti .grooves { pointer-events: none; mix-blend-mode: overlay; }
