/* Mike Jensen 3D — public site
   Red header (the name set huge, a treated photo spanning the measure) → near-black portfolio → red footer.
   Heavy grotesk (Archivo) for structure, Cormorant Garamond for the elegant voice.
   The tunable look (Admin ▸ Design) arrives as custom properties on :root and data-* on <html>. */

:root {
  --red: #b01e28;             /* header & footer — tunable */
  --poster-ink: #0d0a0a;      /* text on the red — tunable */
  --ink: #0d0a0a;
  --ink-2: #161111;
  --ink-3: #221b1b;
  --cream: #efe7da;
  --cream-2: rgba(239, 231, 218, .66);
  --cream-3: rgba(239, 231, 218, .4);
  --line: rgba(239, 231, 218, .13);
  --gutter: clamp(16px, 3vw, 48px);
  --gap: clamp(10px, 1.2vw, 18px);
  --gap: 14px;                /* between grid pieces — tunable */
  /* hero treatment — tunable */
  --hero-sat: 0; --hero-con: 1.18; --hero-bri: 1.12; --hero-grain: .55; --grain-size: 160px; --hero-ratio: 2.2; --hero-w: 1;
  /* hover outline on grid pieces — tunable (colour defaults to the header red) */
  --hover-c: var(--red); --hover-w: 2px;
  /* line around each grid piece — tunable, off by default */
  --tb-c: #2b2525; --tb-w: 1px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --grot: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 17px/1.55 var(--grot);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* film grain over everything */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 100;
  background-image: var(--noise);
  opacity: .09; mix-blend-mode: overlay;
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
body.viewer-open { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cream); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }   /* sections an in-page link moved focus to */
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--cream); color: var(--ink); padding: 8px 14px; text-decoration: none; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the stamp: a single-tone mask that takes the current text colour */
.mk {
  display: inline-block; flex: none;
  background-color: currentColor;
  -webkit-mask: var(--mk-readable) center / contain no-repeat;
  mask: var(--mk-readable) center / contain no-repeat;
  aspect-ratio: 720 / 662;
}
.mk-grunge { -webkit-mask-image: var(--mk-grunge); mask-image: var(--mk-grunge); aspect-ratio: 1000 / 1274; }

/* ---------- Header ---------- */

.poster {
  position: relative;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100svh;
  padding: 0 var(--gutter) var(--gutter);
  background: var(--red);
  color: var(--poster-ink);
  isolation: isolate;
}
/* ink-on-paper texture on the red */
.poster::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: var(--noise); opacity: .35; mix-blend-mode: multiply;
}

.topbar {
  flex: none; display: flex; align-items: center; gap: 24px; height: 64px;
  border-bottom: var(--hair, 1px) solid color-mix(in srgb, var(--poster-ink) 28%, transparent);
}
.lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.lockup-mark { height: 32px; }
.lockup-word {
  font: 800 15px/1 var(--grot); font-stretch: 75%;
  letter-spacing: .06em; text-transform: uppercase;
}
.lockup-word i { font: italic 500 17px/1 var(--serif); letter-spacing: 0; text-transform: none; }
.topbar-links {
  display: flex; gap: clamp(16px, 2.2vw, 34px); margin: 0 0 0 auto; padding: 0; list-style: none;
}
.topbar-links a {
  font: 600 12px/1 var(--grot); letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: 6px 0; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .4s var(--ease);
}
.topbar-links a:hover { background-size: 100% 1px; }

/* The name: one line across the measure; site.js fits it to the exact width (the CSS size is the fallback). */
.name {
  flex: none;
  margin: clamp(18px, 2.8vw, 46px) 0 clamp(16px, 2.4vw, 38px);
  font: 900 var(--name-size, 15.4vw)/.8 var(--grot); font-stretch: 100%;
  text-transform: uppercase; letter-spacing: -.03em;
  white-space: nowrap; color: var(--poster-ink);
}
.name-fit { display: inline-block; margin-left: -.035em; } /* optical alignment of the M's stem to the margin */
.name-line { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .03em .03em 0; margin: -.08em -.03em -.03em 0; }
.name-line > span { display: inline-block; }

/* The photo spans the same measure as the name. Edges (clean / grunge / texture) are a mask drawn by site.js. */
.hero {
  /* --hero-w: 1 = the name's width; 1–1.2 spreads into the margins (1.2 = edge to edge) */
  --hero-wd: calc(100% * min(var(--hero-w), 1) + 2 * var(--gutter) * max(0, (var(--hero-w) - 1) * 5));
  position: relative; flex: 1 1 auto; display: flex; min-height: 240px;
  width: var(--hero-wd); margin-left: calc((100% - var(--hero-wd)) / 2);
}
/* a set height (Admin ▸ Design ▸ Height): site.js sizes the photo, and the red ends right under it */
.poster.hero-sized { min-height: 0; }
.poster.hero-sized .hero { flex: none; min-height: 0; height: var(--hero-h); }
[data-hero-fill="off"] .hero { flex: none; min-height: 0; aspect-ratio: var(--hero-ratio); }
.hero-frame {
  position: relative; flex: 1; display: block; overflow: hidden;
  background: #121010;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
/* Each slide is 8% taller than the frame (room for the parallax); site.js places its image by the slide's framing.
   A new slide fades in over the one before ("was"), which stays opaque underneath until it's covered. */
.hero-slide {
  position: absolute; left: 0; top: -4%; width: 100%; height: 108%; overflow: hidden;
  opacity: 0; z-index: 0; transition: opacity var(--hero-fade, 1.5s) ease;
}
.hero-slide.was { opacity: 1; z-index: 1; transition: none; }
.hero-slide.on { opacity: 1; z-index: 2; }
.hero-frame img, .hero-frame video {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(var(--hero-sat)) contrast(var(--hero-con)) brightness(var(--hero-bri));
  transform: translate3d(0, var(--py, 0px), 0);
  will-change: transform;
}
/* a video slide's clip covers its still once it plays (site.js adds .live) */
.hero-frame video { opacity: 0; pointer-events: none; }
.hero-frame video.live { opacity: 1; }
/* film grain on the photo: on each slide, since a slide can set its own (and it fades with it) */
.hero-slide::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background-image: var(--noise); background-size: var(--grain-size);
  opacity: var(--hero-grain); mix-blend-mode: overlay;
}

/* entrance: the name rises out of its masks, the photo settles in */
.js .name-line > span { transform: translate3d(0, 108%, 0); }
.js .topbar { opacity: 0; }
.js .hero { opacity: 0; }
.js .hero-frame img, .js .hero-frame video { scale: 1.08; }
.js.ready .name-line > span { transform: none; transition: transform 1.2s var(--ease); }
.js.ready .name-line + .name-line > span { transition-delay: .08s; }
.js.ready .topbar { opacity: 1; transition: opacity 1s .5s ease; }
.js.ready .hero { opacity: 1; transition: opacity .9s .25s ease; }
.js.ready .hero-frame img, .js.ready .hero-frame video { scale: 1; transition: scale 2.2s .25s var(--ease); }

/* ---------- Work ---------- */

.work { position: relative; display: flow-root; padding: 0 0 clamp(80px, 10vw, 160px); background: var(--ink); }
.work-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px;
  padding: clamp(48px, 7vw, 110px) var(--gutter) 0;
}
.work-head h2 {
  margin: 0;
  font: 900 clamp(54px, 10vw, 168px)/.84 var(--grot); font-stretch: 70%;
  text-transform: uppercase; letter-spacing: -.01em;
}
.work-head h2 em {
  font: italic 400 1.02em/.84 var(--serif); text-transform: none; letter-spacing: -.02em;
  color: var(--red); padding-left: .04em;
}
/* Design ▸ Filter bar ▸ Section line: "Section 2 of 8", on a line of its own over the heading */
.work-kicker {
  flex-basis: 100%; margin: 0 0 calc(var(--kg, 20px) - 6px);   /* --kg: from the heading (the row gap is 6px) */
  font: 600 clamp(11px, .9vw, 13px)/1 var(--grot); letter-spacing: .22em; text-transform: uppercase; color: var(--cream-2);
}
.work-kicker::before { content: ''; display: inline-block; width: 22px; height: 2px; margin-right: 10px; vertical-align: .3em; background: var(--red); }
.work-kicker[hidden] { display: none; }
.work-head[data-kicker-nodash] .work-kicker::before { display: none; }
/* below the heading: a line of its own after it (and after the piece count, which sits beside the heading) */
.work-head[data-kicker-place="below"] .work-kicker { order: 3; margin: calc(var(--kg, 20px) - 6px) 0 0; }
/* beside it: on the heading's last line, at its baseline, the piece count (if shown) still at the far right */
.work-head[data-kicker-place="beside"] { justify-content: flex-start; }
.work-head[data-kicker-place="beside"] .work-kicker { order: 1; flex-basis: auto; margin: 0 0 0 calc(var(--kg, 20px) - 24px); }
.work-head[data-kicker-place="beside"] .work-count { order: 2; margin-left: auto; }
/* a long filter name (or two filters) */
.work-head h2.long { font-size: clamp(44px, 6.4vw, 108px); }
.work-count { margin: 0; font: italic 400 clamp(20px, 1.8vw, 26px)/1 var(--serif); color: var(--cream-2); }
.work-count span { font: 600 .62em/1 var(--grot); font-style: normal; letter-spacing: .12em; color: var(--cream); margin-right: .3em; }

.filters {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: flex-start;
  margin-top: clamp(22px, 3vw, 40px);
  background: color-mix(in srgb, var(--ink) 90%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: transform .4s var(--ease);
}
/* unpinned: tucks away while scrolling down, comes back as soon as the visitor scrolls up */
.filters.tucked { transform: translateY(calc(-100% - 2px)); }
.filters.stuck { box-shadow: 0 18px 30px -24px #000; }
.filters-inner { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 0 40px; padding: 0 var(--gutter); }
/* pin: keep the bar at the top while scrolling, or let it scroll away (remembered per visitor) */
.fpin {
  flex: none; appearance: none; cursor: pointer; display: grid; place-items: center;
  width: 34px; height: 34px; margin: 6px calc(var(--gutter) - 8px) 0 -12px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--cream-3);
  transition: color .2s, background .2s;
}
.fpin[hidden] { display: none; }
.fpin svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.fpin:hover { color: var(--cream); background: var(--ink-3); }
.fpin[aria-pressed="true"] { color: var(--red); }
.fpin[aria-pressed="false"] svg { transform: rotate(45deg); }
.frow { display: flex; align-items: center; min-width: 0; padding: 11px 0; }
.frow-label { flex: none; font: 600 10.5px/1 var(--grot); letter-spacing: .18em; text-transform: uppercase; color: var(--cream-3); margin-right: 14px; }
.frow-chips { display: flex; gap: 2px; flex-wrap: wrap; }
.chip {
  appearance: none; border: 0; cursor: pointer; background: transparent; color: var(--cream-2);
  padding: 7px 11px 6px; border-radius: 1px;
  font: 600 12.5px/1 var(--grot); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  transition: background .2s, color .2s;
}
.chip:hover { color: var(--cream); background: var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.frow.is-filtered .chip[aria-pressed="true"] { background: var(--red); color: var(--cream); }
/* nothing matches it with the other filters; clicking it drops those */
.chip.empty { opacity: .35; }
.chip.empty:hover, .chip.empty:focus-visible { opacity: 1; }
.chip-n { font: italic 400 13px/1 var(--serif); letter-spacing: 0; text-transform: none; opacity: .7; margin-left: 5px; }
/* Admin ▸ Design ▸ Filter bar ▸ Piece counts off */
html[data-no-counts] .chip-n { display: none; }
/* ...and ▸ Piece count beside the heading off */
html[data-no-work-count] .work-count { display: none; }
/* ...and ▸ Row names off (phones never show them) */
html[data-no-row-labels] .frow-label { display: none; }
/* ...▸ Chips look like tabs: no blocks, an underline under the chosen one (red), a faint one on hover */
html[data-chip-tabs] .chip { border-radius: 0; padding: 9px 12px 8px; box-shadow: inset 0 -2px 0 transparent; transition: color .2s, box-shadow .2s; }
html[data-chip-tabs] .chip:hover { background: transparent; color: var(--cream); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--cream) 35%, transparent); }
html[data-chip-tabs] .chip[aria-pressed="true"],
html[data-chip-tabs] .frow.is-filtered .chip[aria-pressed="true"] { background: transparent; color: var(--cream); box-shadow: inset 0 -2px 0 var(--red); }
/* ...▸ First-visit nudge: the chips not chosen light up one after another (site.js sets each chip's
   --nudge-ms and --nudge-delay). html[data-nudge] picks the look. */
.chip.nudge { animation: var(--nudge-ms, .9s) var(--ease) var(--nudge-delay, 0s) both; }
html[data-nudge="glow"] .chip.nudge { animation-name: nudge-glow; }
html[data-nudge="fill"] .chip.nudge { animation-name: nudge-fill; }
html[data-nudge="lift"] .chip.nudge { animation-name: nudge-lift; animation-timing-function: cubic-bezier(.3, 0, .3, 1); }
@keyframes nudge-glow {
  0%, 100% { background: transparent; }
  40% { color: var(--cream); background: var(--ink-3); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--red) 70%, transparent); }
}
@keyframes nudge-fill {
  0%, 100% { background: transparent; }
  30%, 60% { color: var(--cream); background: var(--red); }
}
@keyframes nudge-lift {
  0%, 100% { transform: none; }
  40% { transform: translateY(-6px); color: var(--cream); }
}
/* sweep: a red line draws in under the chip from the left, then leaves to the right */
html[data-nudge="sweep"] .chip { position: relative; }
html[data-nudge="sweep"] .chip.nudge { animation: none; }
html[data-nudge="sweep"] .chip.nudge::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--red);
  transform: scaleX(0); transform-origin: left;
  animation: nudge-sweep var(--nudge-ms, .9s) var(--ease) var(--nudge-delay, 0s) both;
}
@keyframes nudge-sweep {
  0% { transform: scaleX(0); transform-origin: left; }
  50% { transform: scaleX(1); transform-origin: left; }
  50.01% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ...▸ The other sections after the work: a red band like the header, black type, and the pictures in the
   header's treatment (black & white, grain, torn edges drawn by site.js). Rows that aren't full are centred. */
.more {
  --mg: clamp(18px, 2.6vw, 44px);
  position: relative; isolation: isolate;
  padding: var(--more-top, clamp(56px, 7vw, 120px)) var(--gutter) var(--more-bottom, clamp(64px, 8vw, 130px));
  background: var(--red); color: var(--poster-ink);
}
/* ...▸ Separator: the header's thin line (under its top bar), where the band meets About */
.more[data-divider]::after { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: var(--hair, 1px); background: color-mix(in srgb, var(--poster-ink) 28%, transparent); }
.more::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--noise); opacity: .35; mix-blend-mode: multiply; }
.more[hidden] { display: none; }
.more-title {
  margin: 0 0 clamp(30px, 4vw, 64px);
  font: 900 clamp(52px, 9.4vw, 170px)/.8 var(--grot); letter-spacing: -.03em; text-transform: uppercase;
  color: var(--poster-ink);
}
.more-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: calc(var(--mg) * 1.4) var(--mg); }
.more-card { flex: 0 0 calc((100% - (var(--cols, 3) - 1) * var(--mg)) / var(--cols, 3)); min-width: 0; display: block; color: inherit; text-decoration: none; text-align: center; }
.more-frame {
  position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden;
  background: #121010 center / cover no-repeat;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
}
.more-lqip { position: absolute; inset: 0; background: center / cover no-repeat; filter: saturate(var(--hero-sat)) contrast(var(--hero-con)) brightness(var(--hero-bri)); }
.more-frame img {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(var(--hero-sat)) contrast(var(--hero-con)) brightness(var(--hero-bri));
  transition: transform .7s var(--ease);
}
.more-frame::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: var(--noise); background-size: var(--grain-size); opacity: var(--hero-grain); mix-blend-mode: overlay;
}
.more[data-zoom="on"] .more-card:hover .more-frame img, .more[data-zoom="on"] .more-card:focus-visible .more-frame img { transform: scale(1.04); }
/* Design ▸ Sections ▸ Title: medium, or small, a quiet label as the section line over the heading */
.more[data-title="medium"] .more-title { font-size: clamp(34px, 4.6vw, 80px); margin-bottom: clamp(24px, 3vw, 44px); }
.more[data-title="hidden"] .more-title { display: none; }
/* ...▸ Title centred: over the cards (the small label keeps its dash, before the words) */
.more[data-title-center] .more-title { text-align: center; }
.more[data-title="small"] .more-title { font: 600 clamp(12px, 1vw, 14px)/1 var(--grot); letter-spacing: .24em; margin-bottom: clamp(20px, 2.4vw, 34px); }
.more[data-title="small"] .more-title::before { content: ''; display: inline-block; width: 26px; height: 2px; margin-right: 12px; vertical-align: .3em; background: currentColor; }
/* centred under the picture, one line, every name at the size site.js fits the longest to (--name-size); the gap
   is Design ▸ Sections' (below 0 it overlaps the picture's bottom edge) */
.more-name {
  position: relative; z-index: 2; display: block; margin-top: var(--name-gap, 16px); white-space: nowrap;
  font: 900 var(--name-size, clamp(22px, 2.5vw, 40px))/.86 var(--grot); letter-spacing: -.02em; text-transform: uppercase;
  transition: color .25s;
}
.more-name-t { display: inline-block; margin-right: -.02em; }   /* the last letter's tracking, so it centres true */
.more-card:hover .more-name, .more-card:focus-visible .more-name { color: var(--cream); }
.more-n { display: block; margin-top: 8px; font: italic 400 clamp(15px, 1.2vw, 18px)/1 var(--serif); opacity: .75; }
.more-card:focus-visible { outline: 2px solid var(--poster-ink); outline-offset: 6px; }

.grid { position: relative; margin: clamp(22px, 3vw, 40px) var(--gutter) 0; min-height: 200px; transition: height .5s var(--ease); }
.grid-empty { text-align: center; color: var(--cream-3); padding: 60px 0; font: italic 22px var(--serif); }

.tile {
  position: absolute; top: 0; left: 0; display: block; text-decoration: none;
  will-change: transform; transition: transform .6s var(--ease), opacity .4s;
}
.tile.no-anim { transition: none; }
.tile.leaving { opacity: 0; pointer-events: none; }
.tile.entering { opacity: 0; }
/* Tiles rise and fade in whole, the first time they're seen: on the tile, so the picture and the titles laid over it
   can't drift apart (the hover fade-in used to outrun the rise). Its end is marked .risen (site.js), so a tile shown
   again after a filter doesn't rise again. */
.js .tile:not(.seen) { opacity: 0; translate: 0 26px; }
.js .tile.seen:not(.risen):not(.leaving) { animation: tile-rise .9s var(--ease); }
@keyframes tile-rise { from { opacity: 0; translate: 0 26px; } }
[data-caption="hover"] .tile:not(.seen) .tile-cap { opacity: 0; }
.tile-frame {
  position: relative; display: block; overflow: hidden;
  background: var(--ink-2);
  transform: translateZ(0);   /* its own layer: the zoom below is composited, not repainted */
}
/* optional line around every piece (Admin ▸ Design ▸ Grid) */
[data-tile-border="on"] .tile-frame { box-shadow: 0 0 0 var(--tb-w) var(--tb-c); }
/* tiny blurred preview shown until the real image arrives. It stays solid under the image while that fades in
   (.7s, below) and only then goes: fading both at once let the dark frame show through, a dip of every tile. */
.tile-lqip { position: absolute; inset: -8%; background-size: cover; background-position: center; filter: blur(14px); }
.tile-frame .loaded ~ .tile-lqip, .tile-frame .loaded + .tile-lqip { opacity: 0; transition: opacity 0s .7s; }
.tile-frame::after { content: ""; position: absolute; inset: 0; z-index: 2; box-shadow: inset 0 0 0 var(--hover-w) transparent; transition: box-shadow .35s; pointer-events: none; }
.tile-frame img, .tile-frame video {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transform: scale(1); backface-visibility: hidden; will-change: transform;
  transition: opacity .7s ease, transform 1.1s cubic-bezier(.22, .61, .36, 1);
}
.tile-frame .loaded { opacity: 1; }
/* a video tile's poster, behind its frames (site.js setPoster) */
.tile-frame video { background: center / cover no-repeat; }
/* hover outline (Admin ▸ Design): inside the image's edge, or a ring just outside it */
[data-hover="inside"] .tile:hover .tile-frame::after, .tile:focus-visible .tile-frame::after { box-shadow: inset 0 0 0 var(--hover-w) var(--hover-c); }
/* Titles laid over the image would cover the outline's bottom edge (and on phones, where the two are
   separate layers, leave a flickering 1px seam): there the outline is drawn on the tile, above them. */
[data-caption="overlay"] .tile-frame::after, [data-caption="hover"] .tile-frame::after { content: none; }
[data-caption="overlay"] .tile::after, [data-caption="hover"] .tile::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  box-shadow: inset 0 0 0 var(--hover-w) transparent; transition: box-shadow .35s;
}
[data-hover="inside"][data-caption="overlay"] .tile:hover::after, [data-hover="inside"][data-caption="hover"] .tile:hover::after,
[data-caption="overlay"] .tile:focus-visible::after, [data-caption="hover"] .tile:focus-visible::after { box-shadow: inset 0 0 0 var(--hover-w) var(--hover-c); }
.tile-frame { outline: 0 solid transparent; transition: outline-color .35s; }
[data-hover="outside"] .tile:hover .tile-frame { outline: var(--hover-w) solid var(--hover-c); }
[data-zoom="on"] .tile:hover .tile-frame img, [data-zoom="on"] .tile:hover .tile-frame video { transform: scale(1.035); }
.tile:focus-visible { outline: none; }
.tile-badge {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(13, 10, 10, .78); color: var(--cream);
  font: 600 11px/1 var(--grot); letter-spacing: .06em;
  padding: 6px 8px;
}
.tile-badge svg { width: 12px; height: 12px; }
/* top left of a tile: the AI mark, and in the admin's preview how the piece opens */
.tile-tl { position: absolute; left: 10px; top: 10px; z-index: 3; display: flex; align-items: flex-start; gap: 6px; }

/* ---------- AI marks: a robot and three rising bars, one lit per level (low · medium · high) ---------- */
.ai-mark, .ai-glyph { display: inline-flex; align-items: center; gap: 6px; }
.ai-robot, .ai-tex { width: 13px; height: 13px; flex: none; }
.ai-bars { width: 12px; height: 10px; flex: none; }
.ai-bars rect { fill: currentColor; opacity: .28; }
.ai-bars rect.on { opacity: 1; }
.ai-mark { cursor: help; color: var(--cream); transition: background .2s, border-color .2s; }
.tile-ai, .legend-ai { background: rgba(13, 10, 10, .78); padding: 6px 8px; }
.tile-ai:hover { background: var(--red); }
.legend-ai:hover { background: var(--ink); }   /* the legend sits on the red footer */
.bar-ai { flex: none; padding: 9px 11px; border: 1px solid var(--line); }
.bar-ai:hover { border-color: var(--cream); }
/* an image or video with its own AI level (not its piece's): its mark, top left of the picture */
.vm-ai { position: absolute; left: 12px; top: 12px; z-index: 2; background: rgba(13, 10, 10, .78); padding: 6px 8px; }
.vm-ai:hover { background: var(--red); }
.vm:has(.vm-cover) .vm-ai { top: 44px; }   /* under the preview's Cover label */
.viewer-media.sorting .vm-ai { display: none; }
.ai-tip-h.none b::before { content: none; }
.lb-mark { flex: none; display: flex; }
.lb-mark[hidden] { display: none; }
.lb-ai {
  pointer-events: auto; padding: 9px 11px;
  border: 1px solid rgba(239, 231, 218, .22); background: rgba(13, 10, 10, .55);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.lb-ai:hover { border-color: var(--cream); }
.lb.idle .lb-ai { pointer-events: none; }
/* what a mark means: one box for every mark, under it (or above it near the bottom of the screen) */
.ai-tip {
  position: fixed; left: 0; top: 0; z-index: 120; width: max-content; max-width: min(330px, calc(100vw - 20px));
  padding: 14px 16px 15px; pointer-events: none;
  background: var(--ink-2); color: var(--cream); border: 1px solid var(--line); border-top: 2px solid var(--red);
  box-shadow: 0 20px 44px -14px rgba(0, 0, 0, .8);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .18s ease, transform .3s var(--ease), visibility 0s .18s;
}
.ai-tip.above { transform: translateY(-4px); }
.ai-tip.on { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .3s var(--ease); }
.ai-tip p { margin: 0; }
.ai-tip-h, .viewer-ai-h {
  display: flex; align-items: center; gap: 9px;
  font: 600 10.5px/1 var(--grot); letter-spacing: .18em; text-transform: uppercase; color: var(--cream-3);
}
.ai-tip-h .ai-glyph, .viewer-ai-h .ai-glyph { color: var(--cream); margin-right: 2px; }
.ai-tip-h b, .viewer-ai-h b { font-weight: 600; color: var(--cream); }
.ai-tip-h b::before, .viewer-ai-h b::before { content: "·"; margin-right: 9px; color: var(--cream-3); }
.ai-tip-t { margin-top: 10px !important; font: 400 17px/1.4 var(--serif); }
.ai-tip-n, .viewer-ai-n { white-space: pre-line; font: italic 400 17px/1.4 var(--serif); color: var(--cream-2); }
/* **bold** in the piece's own words */
.ai-tip-n b, .viewer-ai-n b { font-weight: 600; color: var(--cream); }
.ai-tip-n { margin-top: 11px !important; padding-top: 10px; border-top: 1px solid var(--line); }
.ai-tip-n small, .viewer-ai-n small {
  display: block; margin-bottom: 6px; font: normal 600 10px/1 var(--grot); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-3);
}
/* the piece page spells it out under the title */
.viewer-ai { margin: 22px 0 0; padding: 3px 0 3px 16px; border-left: 2px solid var(--red); max-width: 46ch; }
/* simple marks (Design ▸ AI use): the level and nothing to hover */
.viewer-ai.simple { padding: 0; border-left: 0; }
html[data-ai-simple] .ai-mark { cursor: inherit; }
html[data-ai-simple] .tile-ai:hover, html[data-ai-simple] .legend-ai:hover, html[data-ai-simple] .vm-ai:hover { background: rgba(13, 10, 10, .78); }
html[data-ai-simple] .bar-ai:hover { border-color: var(--line); }
html[data-ai-simple] .lb-ai:hover { border-color: rgba(239, 231, 218, .22); }
.ai-word { display: inline-flex; align-items: center; gap: 9px; margin-left: 3px; font: 600 10.5px/1 var(--grot); letter-spacing: .18em; text-transform: uppercase; color: var(--cream-3); }
.ai-word b { font-weight: 600; color: var(--cream); }
.ai-word b:not(:first-child)::before { content: "·"; margin-right: 9px; color: var(--cream-3); }
/* Design ▸ Downloads: a long press on a phone offers no "save image" */
html[data-guard-images] img, html[data-guard-videos] video, html[data-guard-videos] .vm-video img, html[data-guard-videos] .tile:has(video) img {
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none;
}
.viewer-ai-h .ai-robot, .viewer-ai-h .ai-tex { width: 15px; height: 15px; }
.viewer-ai-h .ai-bars { width: 14px; height: 12px; }
.viewer-ai-t { margin: 10px 0 0; font: 400 18px/1.45 var(--serif); color: var(--cream-2); }
.viewer-ai-n { margin: 12px 0 0; font-size: 18px; }
/* visitors' switch beside the filter bar's pin: AI-assisted work shown (on) or hidden */
.fai { flex: none; display: flex; align-items: center; height: 34px; margin: 6px 18px 0 0; }
.fai[hidden] { display: none; }
/* no pin button after it (Admin ▸ Design ▸ Filter bar): the page margin instead */
.filters:has(> .fpin[hidden]) .fai { margin-right: var(--gutter); }
.ai-switch {
  appearance: none; border: 0; background: transparent; cursor: pointer; color: var(--cream-2);
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 2px; transition: color .2s;
}
.ai-switch:hover { color: var(--cream); }
.ai-switch-icon { display: flex; }
.ai-switch-icon svg { width: 14px; height: 14px; }
.ai-switch-label { font: 600 10.5px/1 var(--grot); letter-spacing: .18em; text-transform: uppercase; }
.ai-switch-track {
  position: relative; flex: none; width: 30px; height: 16px; border-radius: 8px;
  border: 1px solid var(--cream-3); transition: background .25s, border-color .25s;
}
.ai-switch-track::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--cream-2); transition: transform .3s var(--ease), background .25s;
}
.ai-switch[aria-checked="true"] .ai-switch-track { background: var(--red); border-color: var(--red); }
.ai-switch[aria-checked="true"] .ai-switch-track::after { transform: translateX(14px); background: var(--cream); }
.ai-switch[aria-checked="false"] { color: var(--cream-3); }
.ai-switch[aria-checked="false"]:hover { color: var(--cream); }

.tile-cap {
  display: flex; align-items: baseline; gap: 10px;
  height: 46px; padding-top: 11px; white-space: nowrap; overflow: hidden;
}
.tile-no { font: 600 10.5px/1 var(--grot); letter-spacing: .1em; color: var(--red); flex: none; }
.tile-title { font: 500 21px/1.1 var(--serif); overflow: hidden; text-overflow: ellipsis; }
.tile-prod { font: 600 10px/1 var(--grot); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-3); margin-left: auto; flex: none; padding-left: 8px; }
.tile:hover .tile-title { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* captions inside the image, on a gradient (always, or only on hover) — or no captions at all */
[data-caption="overlay"] .tile-cap, [data-caption="hover"] .tile-cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: auto;
  padding: 48px 14px 13px; pointer-events: none;
  background: linear-gradient(to top, rgba(8, 6, 6, .86), rgba(8, 6, 6, .5) 45%, transparent);
}
[data-caption="overlay"] .tile-prod, [data-caption="hover"] .tile-prod { color: var(--cream-2); }
[data-caption="overlay"] .tile:hover .tile-title, [data-caption="hover"] .tile:hover .tile-title { text-decoration: none; }
[data-caption="hover"] .tile.seen .tile-cap { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .5s var(--ease); }
[data-caption="hover"] .tile.seen:hover .tile-cap, [data-caption="hover"] .tile.seen:focus-visible .tile-cap { opacity: 1; transform: none; }
[data-caption="none"] .tile-cap { display: none; }
/* While a tile rises, the picture's edge and the gradient's are smoothed apart between pixels and a line of picture
   showed below and beside the gradient: until it's in place the gradient reaches 1px past the picture (the padding
   keeps the titles still). */
[data-caption="overlay"] .tile:not(.risen) .tile-cap, [data-caption="hover"] .tile:not(.risen) .tile-cap {
  left: -1px; right: -1px; bottom: -1px; padding: 48px 15px 14px;
}

.noscript-list { padding: 0 var(--gutter); columns: 3 220px; }

/* ---------- Viewer ---------- */

.viewer {
  position: fixed; inset: 0; z-index: 50;
  background: var(--ink); color: var(--cream);
  overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; transform: translateY(24px);
  transition: opacity .35s ease, transform .55s var(--ease);
}
.viewer.open { opacity: 1; transform: none; }
.viewer[hidden] { display: none; }
.viewer-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: 12px var(--gutter);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.viewer-bar .mk { height: 30px; color: var(--cream); }
.viewer-crumb { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 600 11px/1 var(--grot); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-3); margin-left: 6px; }
.vbtn {
  appearance: none; cursor: pointer; flex: none;
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--cream);
  transition: background .2s, border-color .2s, color .2s;
}
.vbtn:hover { border-color: var(--cream); }
.vbtn svg { width: 18px; height: 18px; }
.vbtn.close { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.vbtn.close:hover { background: var(--red); border-color: var(--red); color: var(--cream); }
.vbtn[disabled] { opacity: .25; pointer-events: none; }

.viewer-body { display: grid; grid-template-columns: 1fr; gap: 30px; padding: 26px var(--gutter) 90px; }
.viewer-prod { margin: 0 0 12px; font: 600 11px/1 var(--grot); letter-spacing: .2em; text-transform: uppercase; color: var(--red); }
.viewer-info h1 { margin: 0; font: 500 clamp(40px, 4.4vw, 70px)/.98 var(--serif); letter-spacing: -.01em; }
.viewer-desc { margin-top: 20px; font: 400 20px/1.5 var(--serif); color: var(--cream-2); max-width: 46ch; }
.viewer-desc p { margin: 0 0 .7em; }
.viewer-desc a { color: var(--cream); text-decoration-color: var(--red); }
.viewer-credits { margin: 14px 0 0; font: 600 11px/1.6 var(--grot); letter-spacing: .12em; text-transform: uppercase; color: var(--cream-3); }
.viewer-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 22px 0 0; padding: 0; list-style: none; }
.viewer-tags button, .viewer-tags span {
  appearance: none; cursor: pointer; background: transparent; color: var(--cream-2);
  border: 1px solid var(--line); padding: 7px 10px 6px;
  font: 600 11px/1 var(--grot); letter-spacing: .12em; text-transform: uppercase;
}
.viewer-tags button:hover { border-color: var(--red); color: var(--cream); }
.viewer-tags span { display: inline-block; cursor: default; }
.viewer-count { margin-top: 24px; font: italic 400 17px/1 var(--serif); color: var(--cream-3); }

.viewer-media { display: flex; flex-direction: column; gap: clamp(10px, 1.4vw, 22px); min-width: 0; }
.vm { --ar: 4 / 3; position: relative; margin: 0; width: 100%; display: flex; justify-content: center; }
.vm-pic, .vm video {
  width: min(100%, calc((100vh - 100px) * var(--ar)));
  width: min(100%, calc((100svh - 100px) * var(--ar)));
  height: auto; aspect-ratio: var(--ar); background: var(--ink-2) center / cover no-repeat;
}
/* a picture fades in whole over its stand-in (the grid tile's copy, else its blur), which stays solid under it
   until the fade is done (site.js whenWhole / standIn) */
.vm-pic { display: block; position: relative; overflow: hidden; }
.vm-pic img { display: block; position: relative; width: 100%; height: 100%; opacity: 0; transition: opacity .5s ease; }
.vm-pic.loaded img { opacity: 1; }
.vm-ph { position: absolute; inset: -8%; background: center / cover no-repeat; filter: blur(14px); }
.vm-ph.sharp { inset: 0; filter: none; }
.vm-pic.loaded .vm-ph { opacity: 0; transition: opacity 0s .5s; }
/* a video is covered until its first frame is on screen (site.js onFirstFrame): its stand-in (the tile's
   picture or frame, else its blur), with its poster fading in over that once whole */
.vm-poster { position: absolute; inset: 0; overflow: hidden; pointer-events: none; transition: opacity .3s ease; }
.vm-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.vm-poster.loaded img { opacity: 1; }
.vm-ph > canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.vm.live .vm-poster { opacity: 0; }
.vm-video { width: min(100%, calc((100svh - 100px) * var(--ar))); margin: 0 auto; }
.vm-video video { width: 100%; cursor: pointer; }
.vm-sound {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  appearance: none; border: 0; cursor: pointer;
  background: rgba(13, 10, 10, .82); color: var(--cream);
  padding: 9px 12px; font: 600 11px/1 var(--grot); letter-spacing: .14em; text-transform: uppercase;
}
.vm-sound:hover { background: var(--red); }
.vm-sound svg { width: 16px; height: 16px; }
.vm-state {
  position: absolute; right: 12px; bottom: 12px; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(13, 10, 10, .75); display: grid; place-items: center; pointer-events: none;
  opacity: 0; transition: opacity .3s;
}
.vm.paused .vm-state { opacity: 1; }
.vm-state svg { width: 14px; height: 14px; }
/* opened from a link where the browser won't start it with sound: it waits for this (site.js gate) */
.vm-gate, .lb-gate {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: inline-flex; align-items: center; gap: 12px;
  appearance: none; border: 0; cursor: pointer;
  background: rgba(13, 10, 10, .86); color: var(--cream);
  padding: 16px 22px; font: 600 13px/1 var(--grot); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(239, 231, 218, .3); transition: background .2s ease;
}
.vm-gate:hover, .lb-gate:hover, .vm-gate:focus-visible, .lb-gate:focus-visible { background: var(--red); }
.vm-gate svg, .lb-gate svg { width: 18px; height: 18px; }
.vm.gated .vm-sound, .vm.gated .vm-state { display: none; }

.viewer-next { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); }
.viewer-next button { appearance: none; border: 0; background: none; cursor: pointer; padding: 0; text-align: left; max-width: 48%; color: var(--cream); }
.viewer-next button:last-child { text-align: right; margin-left: auto; }
.viewer-next small { display: block; font: 600 10.5px/1 var(--grot); letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin-bottom: 8px; }
.viewer-next span { font: 500 clamp(20px, 2vw, 28px)/1.1 var(--serif); }
.viewer-next button:hover span { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }

/* text beside the images: wide enough screens, unless Admin ▸ Design puts it always on top (site.js sets .side) */
.viewer.side .viewer-body { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: clamp(36px, 4.5vw, 80px); padding-top: 40px; }
.viewer.side .viewer-body.no-text { grid-template-columns: minmax(0, 1fr); }
.viewer.side .viewer-info { position: sticky; top: 100px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: none; }

/* piece-page pictures open full screen */
.vm-image img { cursor: zoom-in; }

/* ---------- Full screen (assets/js/lightbox.js) ---------- */

html.lb-open, html.lb-open body { overflow: hidden; }
html.lb-open body::after { opacity: 0; }   /* no film grain over the work itself */
.lb { position: fixed; inset: 0; z-index: 90; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.lb[hidden] { display: none; }
.lb-bg { position: absolute; inset: 0; background: #070505; opacity: 0; transition: opacity .32s ease; }
.lb.open .lb-bg { opacity: .97; }
.lb-stage { position: absolute; inset: 0; overflow: hidden; }
.lb-slide { position: absolute; inset: 0; transform-origin: 0 0; }
.lb-slide-anim { transition: transform .32s var(--ease), opacity .32s ease; }
.lb.closing .lb-ui { opacity: 0; }
.lb-item, .lb-ph {
  position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0;
  background: center / 100% 100% no-repeat; cursor: zoom-in;
}
/* a picture fades in whole over its stand-in (lightbox.js makeSlide), which goes once that's done */
img.lb-item { opacity: 0; transition: opacity .35s ease; }
img.lb-item.loaded { opacity: 1; }
img.lb-item.lb-glide { transition: opacity .35s ease, transform .32s var(--ease), width .32s var(--ease), height .32s var(--ease); }
.lb-ph { pointer-events: none; }
.lb-ph:has(+ .loaded) { opacity: 0; transition: opacity 0s .35s; }
.lb.zoomed .lb-item { cursor: grab; }
.lb.grabbing .lb-item { cursor: grabbing; }
.lb-video { cursor: default; background-color: #000; }
/* over a video until its first frame is on screen (lightbox.js makeSlide): the frame or picture that was
   clicked, else its blur, with its poster fading in over that once whole */
.lb-cover { overflow: hidden; transition: opacity .25s ease; }
.lb-cover > canvas, .lb-cover > img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.lb-cover > img { opacity: 0; transition: opacity .35s ease; }
.lb-cover > img.on { opacity: 1; }
.lb-cover.gone { opacity: 0; }
.lb-glide { transition: transform .32s var(--ease), width .32s var(--ease), height .32s var(--ease); }

.lb-ui { position: absolute; inset: 0; pointer-events: none; transition: opacity .35s ease; }
.lb.idle .lb-ui { opacity: 0; }
.lb.idle .lb-ui .lb-btn { pointer-events: none; }
.lb-top {
  position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 16px;
  padding: 14px var(--gutter) 30px;
  background: linear-gradient(to bottom, rgba(7, 5, 5, .7), transparent);
}
.lb-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font: 500 clamp(18px, 1.6vw, 24px)/1.1 var(--serif); color: var(--cream); }
.lb-count { flex: none; font: 600 11px/1 var(--grot); letter-spacing: .16em; color: var(--cream-2); font-variant-numeric: tabular-nums; }
.lb-btn {
  pointer-events: auto; appearance: none; cursor: pointer; flex: none;
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; padding: 0;
  border: 1px solid rgba(239, 231, 218, .22); background: rgba(13, 10, 10, .55); color: var(--cream);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s, color .2s, opacity .2s;
}
.lb-btn:hover { border-color: var(--cream); }
.lb-btn svg { width: 18px; height: 18px; }
.lb-close { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.lb-close:hover { background: var(--red); border-color: var(--red); color: var(--cream); }
.lb-prev, .lb-next { position: absolute; top: 50%; margin-top: -23px; }
.lb-prev { left: var(--gutter); }
.lb-next { right: var(--gutter); }
.lb-btn[hidden] { display: none; }
/* a video's own controls sit at the bottom: keep the arrows clear of them */
.lb.is-video .lb-prev, .lb.is-video .lb-next { margin-top: -60px; }
.lb-zoom, .lb-flash {
  position: absolute; left: 50%; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity .3s;
  background: rgba(13, 10, 10, .8); color: var(--cream); padding: 8px 12px;
  font: 600 12px/1 var(--grot); letter-spacing: .1em; text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.lb-zoom { bottom: 22px; }
.lb-zoom.on { opacity: 1; transition-duration: .1s; }
.lb-flash { top: 50%; }
.lb.idle .lb-flash, .lb.idle .lb-zoom { opacity: 0; }
.lb-flash.on { opacity: 1 !important; animation: tile-flash 1.3s ease forwards; }
@media (max-width: 720px) {
  .lb-prev, .lb-next { display: none; }   /* swipe instead */
  .lb-btn { width: 40px; height: 40px; }
  .lb-top { padding-top: max(10px, env(safe-area-inset-top)); }
}

/* ---------- Colophon ---------- */

.colophon { position: relative; display: flow-root; background: var(--red); color: var(--cream); isolation: isolate; }
.colophon::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: var(--noise); opacity: .35; mix-blend-mode: multiply; pointer-events: none; }
.colophon-grid {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 6vw, 110px); align-items: start;
  padding: clamp(50px, 7vw, 110px) var(--gutter) clamp(40px, 6vw, 90px);
}
.colophon-stamp { width: clamp(150px, 26vw, 400px); color: var(--ink); }
.colophon h2 { margin: 0 0 18px; font: 600 11px/1 var(--grot); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.about-text { font: 500 clamp(22px, 2.3vw, 34px)/1.3 var(--serif); max-width: 32ch; }
.about-text p { margin: 0 0 .6em; }
.about-text a { color: var(--cream); }
.about-photo { width: 120px; aspect-ratio: 4/5; object-fit: cover; filter: grayscale(1) contrast(1.2); mix-blend-mode: multiply; margin-bottom: 18px; }
.contact { margin-top: clamp(30px, 4vw, 56px); }
.contact-label { margin: 0 0 10px; font: 600 11px/1 var(--grot); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.contact-email {
  display: inline-block; text-decoration: none; overflow-wrap: anywhere;
  font: 900 clamp(30px, 5vw, 84px)/.95 var(--grot); font-stretch: 72%; letter-spacing: -.005em;
  background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 4px no-repeat;
  transition: background-size .5s var(--ease);
}
.contact-email:hover { background-size: 100% 4px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 22px 0 0; padding: 0; }
.contact-links a {
  display: inline-block; text-decoration: none; border: 1px solid rgba(239, 231, 218, .5); padding: 10px 14px 9px;
  font: 600 11.5px/1 var(--grot); letter-spacing: .16em; text-transform: uppercase;
  transition: background .2s, color .2s, border-color .2s;
}
.contact-links a:hover { background: var(--ink); border-color: var(--ink); }
/* what the AI marks mean (site.js fills it while the site marks pieces) */
.ai-legend { margin-top: clamp(30px, 4vw, 56px); max-width: 52ch; }
.ai-legend[hidden] { display: none; }
.ai-legend-t { margin: 0 0 16px; font: 500 clamp(18px, 1.7vw, 23px)/1.4 var(--serif); }
.ai-legend-key { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 0; padding: 0; list-style: none; }
.ai-legend-key li { display: flex; align-items: center; gap: 10px; font: 600 11px/1 var(--grot); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); }
.colophon-foot {
  display: flex; align-items: center; gap: 16px;
  margin: 0 var(--gutter); padding: 18px 0 22px; border-top: var(--hair, 1px) solid rgba(13, 10, 10, .35);
  font: 600 11px/1 var(--grot); letter-spacing: .16em; text-transform: uppercase; color: var(--ink);
}
.colophon-foot a { margin-left: auto; text-decoration: none; }
/* Design ▸ Footer ▸ Stamp on the line: two columns. The stamp runs from the About label down to the line under it
   (its flat bottom on the line), scaled to that height and anchored left; its cut left edge dissolves into specks
   (mark-grunge-dissolve.png). The text takes the right part. On phones: the text first, the stamp under it on the line. */
html[data-stamp-line] .colophon-grid {
  --cb: clamp(40px, 6vw, 90px);
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr); align-items: stretch; padding-bottom: var(--cb);
}
html[data-stamp-line] .colophon-stamp {
  width: 100%; height: auto; aspect-ratio: auto; min-height: 0; margin-bottom: calc(-1 * var(--cb));
  -webkit-mask-image: var(--mk-grunge-dissolve); mask-image: var(--mk-grunge-dissolve);
  -webkit-mask-position: left bottom; mask-position: left bottom;
}
html[data-stamp-line] .about-text { max-width: 38ch; }

/* ---------- Phones & small tablets ---------- */

@media (max-width: 860px) {
  body { font-size: 16px; }
  .lockup-word { display: none; }
  .topbar { height: 58px; }
  .lockup-mark { height: 30px; }
  .topbar-links { gap: 16px; }
  .topbar-links a { font-size: 11px; letter-spacing: .12em; }

  .work-head h2 { font-size: clamp(50px, 15vw, 90px); }
  /* filter rows wrap instead of scrolling sideways */
  .filters-inner { display: block; padding: 4px var(--gutter); }
  .frow { padding: 6px 0; align-items: flex-start; }
  .frow-label { padding-top: 8px; }
  .tile-cap { height: 38px; padding-top: 8px; }
  .tile-title { font-size: 17px; }
  .tile-prod { display: none; }
  .tile-badge { top: 6px; right: 6px; padding: 5px 6px; font-size: 10px; }
  .tile-tl { top: 6px; left: 6px; gap: 4px; }
  .tile-ai { padding: 5px 6px; gap: 5px; }
  .tile-ai .ai-robot { width: 12px; height: 12px; }
  .tile-ai .ai-bars { width: 11px; height: 9px; }
  .bar-ai { padding: 8px 9px; }
  .vbtn { width: 38px; height: 38px; }
  .colophon-grid { grid-template-columns: 1fr; }
  .colophon-stamp { width: min(56vw, 260px); }
  /* stamp on the line: tablets keep the two columns (the text beside the stamp), only phones stack */
  html[data-stamp-line] .colophon-grid { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); }
  html[data-stamp-line] .colophon-stamp { width: 100%; }
}

@media (max-width: 720px) {
  /* the name stacks into two fitted lines */
  .name-line { display: block; width: max-content; }
  .name { line-height: .82; }
  .hero { min-height: 52svh; }

  /* compact, multi-row chips; no row labels when space is tight */
  .filters-inner { padding: 6px var(--gutter) 7px; }
  .frow { padding: 0; }
  .frow + .frow { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); }
  .frow-label { display: none; }
  .frow-chips { gap: 3px; }
  .fpin { width: 30px; height: 30px; margin: 4px calc(var(--gutter) - 8px) 0 -10px; }
  .fai { height: 30px; margin: 4px 14px 0 0; }
  .ai-switch { gap: 7px; }
  .ai-switch-label { display: none; }
  .chip { padding: 6px 7px 5px; font-size: 10.5px; letter-spacing: .05em; }
  html[data-chip-tabs] .chip { padding: 7px 7px 6px; }
  .chip-n { font-size: 11.5px; margin-left: 3px; }
  [data-caption="overlay"] .tile-cap, [data-caption="hover"] .tile-cap { padding: 36px 9px 8px; }
  [data-caption="overlay"] .tile:not(.risen) .tile-cap, [data-caption="hover"] .tile:not(.risen) .tile-cap { padding: 36px 10px 9px; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .name-line { display: inline-block; width: auto; }
}

@media (hover: none) {
  .tile:hover .tile-frame img, .tile:hover .tile-frame video { transform: none !important; }
  [data-caption="hover"] .tile.seen .tile-cap { opacity: 1; transform: none; }
}

/* ---------- Admin live preview: chips can be dragged to reorder ---------- */

[data-preview] .chip[data-sort] { cursor: grab; touch-action: none; }
[data-preview] .chip.sort-dragging { opacity: .35; }
.chip-ghost { position: fixed; z-index: 300; pointer-events: none; box-shadow: 0 10px 24px -8px #000; }
/* …and pieces can be dragged, resized and reframed (assets/js/tile-edit.js) */
[data-preview] .tile { cursor: grab; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
[data-preview] .tile.sort-dragging { opacity: .3; }
.tile-ghost { position: fixed; z-index: 300; pointer-events: none; opacity: .85; box-shadow: 0 18px 40px -12px #000; }
.tile-ghost .grp-count { position: absolute; right: -10px; top: -10px; z-index: 5; min-width: 26px; height: 26px; padding: 0 7px; border-radius: 13px; background: var(--red); color: #fff; font: 600 12px/26px var(--grot); text-align: center; }
/* the piece a dragged one would swap with (the admin's Move / Swap switch) */
[data-preview] .tile.swap-target { outline: 3px dashed var(--red); outline-offset: 3px; }
/* the preview's selection (Ctrl / Shift-click) */
[data-preview] .tile.picked { outline: 3px solid var(--red); outline-offset: 3px; }
[data-preview] .tile.picked .tile-frame::before { content: "✓"; position: absolute; top: 8px; right: 8px; z-index: 4; width: 22px; height: 22px; border-radius: 3px; background: var(--red); color: #fff; font: 600 13px/22px var(--grot); text-align: center; }
.tile.te-active { z-index: 5; }
.te-dragging, .te-dragging * { cursor: move !important; user-select: none; }
.te-zoom, .te-zoom *, .te-shape, .te-shape * { cursor: ns-resize !important; }
.te-ghost { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
.te-ghost .te-pic { position: fixed; background-size: 100% 100%; opacity: .42; }
.te-ghost .te-box { position: fixed; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .9); }
.tile-flash {
  position: absolute; left: 50%; top: 50%; z-index: 6; transform: translate(-50%, -50%);
  background: var(--ink); color: var(--cream); padding: 8px 12px; white-space: nowrap; pointer-events: none;
  font: 600 13px/1 var(--grot); letter-spacing: .08em; text-transform: uppercase;
  animation: tile-flash 1.3s ease forwards;
}
/* …and on a piece page, Shift+C picks the cover and its pictures can be dragged into a new order */
.viewer-flash { position: fixed; }
.tile-direct {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: rgba(13, 10, 10, .78); color: var(--cream);
}
.tile-direct svg { width: 13px; height: 13px; }
/* when every piece opens full screen, the preview marks the ones that open their page instead */
.tile-direct.page { width: auto; padding: 0 8px; font: 600 10.5px/1 var(--grot); letter-spacing: .14em; text-transform: uppercase; }
.vm-cover {
  position: absolute; left: 12px; top: 12px; z-index: 2; background: var(--red); color: var(--cream); pointer-events: none;
  padding: 6px 9px; font: 600 10.5px/1 var(--grot); letter-spacing: .14em; text-transform: uppercase;
}
[data-preview] .viewer-media .vm { cursor: grab; }
[data-preview] .viewer-media .vm img { cursor: grab; }
.viewer-media.sorting { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.viewer-media.sorting .vm { width: auto; }
.viewer-media.sorting .vm-pic, .viewer-media.sorting .vm video { width: auto; height: 150px; }
.viewer-media.sorting .vm-sound, .viewer-media.sorting .vm-state, .viewer-media.sorting .vm-poster { display: none; }
.viewer-media .vm.sort-dragging { opacity: .25; }
.vm-ghost { position: fixed; z-index: 300; pointer-events: none; transform: translate(-50%, -50%); box-shadow: 0 18px 40px -12px #000; }
.vm-ghost img { height: 120px; width: auto; opacity: .9; }
@keyframes tile-flash { 0% { opacity: 0; } 12%, 70% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after { animation: none; }
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation-duration: .01ms !important; }
  .js .name-line > span, .js .topbar, .js .hero { opacity: 1; transform: none; }
  .js .hero-frame img, .js .hero-frame video { scale: none; transform: none; }
  .js .tile:not(.seen) { translate: none; }
  .js .tile:not(.seen):not(.leaving) { opacity: 1; }
}

/* Footer ▸ stamp on the line, phones: one column, the text first and the stamp under it on the line */
@media (max-width: 600px) {
  html[data-stamp-line] .colophon-grid { grid-template-columns: 1fr; }
  html[data-stamp-line] .colophon-stamp { order: 2; width: min(70vw, 320px); aspect-ratio: 1000 / 1274; height: auto; }
}
