/* The Ember Mind — an etched plate on blue-black, paper where the work needs light. */

:root {
  --ink: #11151b;          /* page: blue-black */
  --ink-2: #181e26;        /* raised */
  --line: #2c3540;         /* rules on dark */
  --slate: #4a5866;        /* the avatar's mat */
  --ivory: #eee5d2;        /* type on dark, paper */
  --ivory-2: #b9b09d;      /* secondary type on dark */
  --paper: #ece3cf;
  --paper-line: #cdbf9f;
  --ink-on-paper: #1d1a15;
  --muted-on-paper: #5b5244;
  --ember: #c4652d;        /* Crow's scarf */
  --ember-deep: #93441a;   /* ember as text on paper */
  --ember-light: #f0a15e;  /* focus, glow */

  --display: "IM Fell English", "Iowan Old Style", Georgia, serif;
  --text: "Source Serif 4", "Iowan Old Style", Georgia, serif;

  --gutter: clamp(16px, 3.4vw, 48px);
  --wide: 1560px;
  --measure: 36rem;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font: 400 1.125rem/1.55 var(--text);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, video, picture { display: block; max-width: 100%; }
img { height: auto; }
p { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 0.95; letter-spacing: -0.01em; }

:focus-visible { outline: 2px solid var(--ember-light); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute !important; 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: var(--gutter); top: -100px; z-index: 10;
  background: var(--ivory); color: var(--ink); padding: 0.6em 1em; text-decoration: none;
}
.skip:focus { top: 12px; }

.ext { display: inline-block; margin-left: 0.2em; font-size: 0.85em; color: var(--ember-light); }

/* small caps labels instead of pills */
.label, .status dt {
  font-family: var(--text);
  font-variant-caps: all-small-caps;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  font-weight: 600;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  font: 600 1.15rem/1 var(--text); letter-spacing: 0.01em;
  padding: 1.05em 1.6em 1em;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.btn .ext { transition: transform 160ms ease; }
.btn:hover .ext, .btn-quiet:hover .ext { transform: translate(2px, -2px); }
.btn-primary {
  background: var(--ivory); color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 10px 24px -12px rgba(0, 0, 0, 0.8);
}
.btn-primary:hover { background: #fff8ea; transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset, 0 14px 28px -12px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(240, 161, 94, 0.5); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary .ext { color: var(--ember-deep); }
.btn-quiet {
  display: inline-flex; align-items: center; gap: 0.45em;
  font: 600 1.15rem/1 var(--text); letter-spacing: 0.01em;
  padding: 1.05em 1.5em 1em; border-radius: 3px;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, currentColor 38%, transparent);
  transition: border-color 160ms ease, background-color 160ms ease;
}
.btn-quiet:hover { border-color: currentColor; background: color-mix(in srgb, currentColor 7%, transparent); }
.link-btn {
  appearance: none; background: none; border: 0; padding: 0.35em 0; cursor: pointer;
  font: 600 0.95rem/1.2 var(--text); color: var(--ivory);
  text-decoration: underline; text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}
.link-btn:hover { text-decoration-color: currentColor; }

/* ---------- header ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: var(--wide); margin: 0 auto;
  padding: 18px var(--gutter);
}
.mark { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; font-family: var(--display); font-size: 1.3rem; }
.mark img { width: 36px; height: 36px; border-radius: 50%; }
.top ul { display: flex; gap: clamp(1rem, 2.4vw, 2rem); list-style: none; margin: 0; padding: 0; }
.top nav a { text-decoration: none; font-size: 1rem; padding: 0.4em 0; white-space: nowrap; }
.top nav a:hover { text-decoration: underline; }

/* ---------- hero ---------- */
.hero { padding: clamp(8px, 2vw, 28px) 0 0; }
.hero-words, .plate-caption { max-width: var(--wide); margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.hero-words {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 27rem);
  align-items: end; gap: 1.5rem 3rem;
  padding-bottom: clamp(20px, 2.6vw, 36px);
}
h1 { font-size: clamp(3.3rem, 8.2vw, 8rem); line-height: 0.9; }
.lede { font-size: clamp(1.15rem, 1.5vw, 1.3rem); line-height: 1.45; color: var(--ivory); max-width: 26em; }
.hero-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 0.9rem; margin-top: 1.6rem; }

/* the plate: an etching mounted on the dark */
.plate { margin: 0; }
.plate-stage {
  position: relative;
  aspect-ratio: 2172 / 724;
  overflow: hidden;
  background: #2a241c;
}
/* the plate runs edge to edge and dissolves into the page at its borders */
.plate-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 clamp(40px, 7vw, 120px) clamp(6px, 1.2vw, 18px) var(--ink);
}
/* the room in depth (room.js): a canvas replaces the picture; the HTML layers follow its parallax */
.room { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.deep .plate-stage:not(.is-deep):not(.is-flat) { background: #07080b; }
.deep .plate-stage:not(.is-deep):not(.is-flat) .plate-art,
.deep .plate-stage:not(.is-deep):not(.is-flat) .sheets,
.deep .plate-stage:not(.is-deep):not(.is-flat) .crow { opacity: 0; }
.plate-stage.is-deep .plate-art { visibility: hidden; }
.plate-stage.is-deep :is(.sheet, .crow, .crow-btn, .cup, .machine) { translate: var(--px, 0px) var(--py, 0px); scale: var(--pz, 1); }
.plate-stage.is-deep .ember { translate: calc(-50% + var(--px, 0px)) calc(-50% + var(--py, 0px)); scale: var(--pz, 1); }
.plate-stage.is-deep :is(.sheet img, .crow img) { filter: brightness(calc(0.1 + 0.9 * var(--lit, 1))); }
.h1-letters .w { display: inline-block; white-space: nowrap; }
.h1-letters .w > span { display: inline-block; }
.plate-art { width: 100%; height: 100%; object-fit: cover; }

.is-pixel { image-rendering: pixelated; }

/* the sheets pinned on the wall, each rocking on its tack in a light draught from the window */
.sheets { position: absolute; inset: 0; pointer-events: none; }
.sheet {
  position: absolute; height: auto; transform-origin: var(--ox) var(--oy);
  appearance: none; background: none; border: 0; padding: 0; cursor: pointer; pointer-events: auto;
}
.sheet img { width: 100%; height: auto; }
.sheet:focus-visible { outline: 2px solid var(--ember-light); outline-offset: 2px; }
.s-fern    { left: 4.834%;  top: 5.11%;   width: 6.584%; --ox: 48.2%; --oy: 5.5%; --a: 1;    --d: 7.5s;  --delay: -2s; }
.s-royal   { left: 11.924%; top: 8.149%;  width: 5.893%; --ox: 48.4%; --oy: 5.6%; --a: -0.8; --d: 8.5s;   --delay: -6s; }
.s-reactor { left: 8.886%;  top: 34.945%; width: 5.571%; --ox: 48.8%; --oy: 5.7%; --a: 0.7;  --d: 9.5s; --delay: -3.5s; }
.s-kepler  { left: 15.239%; top: 32.735%; width: 6.077%; --ox: 48.5%; --oy: 6.4%; --a: -1.1; --d: 8s;   --delay: -8s; }
@keyframes draught {
  0%, 100% { rotate: 0deg; }
  18% { rotate: calc(var(--a) * 1.4deg); }
  34% { rotate: calc(var(--a) * -0.45deg); }
  52% { rotate: calc(var(--a) * 0.9deg); }
  70% { rotate: calc(var(--a) * 0.1deg); }
  84% { rotate: calc(var(--a) * 0.5deg); }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: draught var(--d) ease-in-out var(--delay) infinite; }
}

.crow { position: absolute; left: 78.27%; top: 5.52%; width: 18.88%; }   /* px 1700,40 */
.crow img { width: 100%; height: auto; }

.crow-btn, .cup {
  position: absolute; appearance: none; background: transparent; border: 0; padding: 0; cursor: pointer;
  border-radius: 12px; -webkit-tap-highlight-color: transparent;
}
.crow-btn { left: 80%; top: 8%; width: 16%; height: 44%; }
.cup { left: 81.95%; top: 71.8%; width: 4.6%; height: 12.4%; }       /* px 1780,520 → 1880,610 */
.crow-btn:focus-visible, .cup:focus-visible { outline: 2px solid var(--ember-light); outline-offset: 2px; }
.steam {
  position: absolute; width: 1.1%; height: 7%; translate: -50% -100%;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 60%, rgba(245, 236, 220, 0.55), rgba(245, 236, 220, 0) 70%);
  filter: blur(2px);
}

/* the spark that leaves Bear's machine and keeps you company: a halo, a hot core, a turning glint, a tail */
.guide {
  position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 50;
  opacity: 0; transition: opacity 300ms ease;
}
.guide.is-on { opacity: 1; }
.guide > * { position: absolute; left: 0; top: 0; border-radius: 50%; translate: -50% -50%; }
.guide-halo {
  width: 34px; height: 34px;
  background: radial-gradient(circle, rgba(255, 170, 90, 0.34), rgba(255, 130, 50, 0.1) 45%, rgba(255, 120, 40, 0) 70%);
  animation: flicker 2.3s ease-in-out infinite;
}
.guide-core {
  width: 7px; height: 7px;
  background: radial-gradient(circle, #fff6e2 0 35%, #ffc27a 60%, #ff8a3a 100%);
  box-shadow: 0 0 6px 2px rgba(255, 160, 80, 0.7);
}
.guide-glint {
  width: 22px; height: 22px; border-radius: 0;
  background:
    linear-gradient(90deg, transparent 0 46%, rgba(255, 236, 200, 0.85) 50%, transparent 54% 100%),
    linear-gradient(0deg, transparent 0 46%, rgba(255, 236, 200, 0.85) 50%, transparent 54% 100%);
  -webkit-mask: radial-gradient(circle, #000 0 20%, transparent 70%);
          mask: radial-gradient(circle, #000 0 20%, transparent 70%);
  animation: glint 5s linear infinite;
}
.guide-tail {
  width: 30px; height: 6px; border-radius: 6px; translate: 0 -50%; transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(255, 180, 100, 0.75), rgba(255, 120, 40, 0));
  filter: blur(1px);
}
@keyframes flicker { 0%, 100% { scale: 1; opacity: 1; } 30% { scale: 1.12; opacity: 0.8; } 55% { scale: 0.94; opacity: 1; } 80% { scale: 1.06; opacity: 0.88; } }
@keyframes glint { from { rotate: 0deg; scale: 1; } 50% { scale: 0.7; } to { rotate: 360deg; scale: 1; } }
.guide-spark {
  position: fixed; left: 0; top: 0; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px;
  border-radius: 50%; pointer-events: none; z-index: 49;
  background: radial-gradient(circle, #ffe2b0 0 30%, #ff9a3c 55%, rgba(220, 90, 30, 0) 75%);
}
/* the machine's own ember dims while its spark is out with you */
.ember { --out: 0; }

.machine {
  position: absolute; left: 66.76%; top: 56.63%; width: 13.35%; height: 24.86%;
  appearance: none; background: transparent; border: 0; padding: 0; cursor: pointer;
  border-radius: 10px; -webkit-tap-highlight-color: transparent;
}
.machine:focus-visible { outline: 2px solid var(--ember-light); outline-offset: 2px; }
.machine:hover + .ember, .machine:focus-visible + .ember { filter: brightness(1.4); }
.spark {
  position: absolute; width: 0.42%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%;
  background: radial-gradient(circle, #ffe2b0 0 22%, #ff9a3c 46%, rgba(220, 90, 30, 0) 72%);
  mix-blend-mode: screen; pointer-events: none;
}

.ember {
  position: absolute; left: 73.85%; top: 69.48%;               /* the drum between the wheels */
  width: 6.4%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 140, 0.95) 0 7%, rgba(255, 138, 58, 0.6) 18%, rgba(214, 90, 32, 0.2) 42%, transparent 68%);
  mix-blend-mode: screen;
  pointer-events: none;
  opacity: calc(1 - var(--out) * 0.8);
  transition: filter 160ms ease;
}

.plate-caption {
  display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 0.4rem 2rem;
  padding-top: 18px;
  font-size: 0.98rem; color: var(--ivory-2);
}
.motto { font-family: var(--display); font-style: italic; font-size: 1.15rem; color: var(--ivory); }

.ideas { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 1.2rem; }
.ideas a { color: var(--ivory); }
#idea { display: inline-block; }
.ideas [hidden] { display: none; }

/* before the opening runs, the plate waits in its first state (a failsafe in <head> releases it) */
@media (prefers-reduced-motion: no-preference) {
  .js .plate:not(.is-ready) .crow, .js .plate:not(.is-ready) .ember { opacity: 0; }
}

/* ---------- featured: Cesena Walk on paper ---------- */
.featured {
  overflow-x: clip;                       /* the bicycle rides off the edge */
  margin-top: clamp(48px, 6vw, 80px);
  background: var(--paper);
  color: var(--ink-on-paper);
  color-scheme: light;
}
.featured-inner { max-width: var(--wide); margin: 0 auto; padding: clamp(48px, 7vw, 104px) var(--gutter) clamp(40px, 5vw, 72px); }
.featured :focus-visible { outline-color: var(--ember-deep); }
.featured .label { color: var(--ember-deep); }
.featured-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 30rem);
  align-items: end; gap: 0.6rem 3rem; margin-bottom: clamp(28px, 4vw, 48px);
}
.featured-head .label { grid-column: 1 / -1; }
.featured h2 { font-size: clamp(3.2rem, 8vw, 7.4rem); line-height: 0.88; }
.sentence { font-size: clamp(1.1rem, 1.35vw, 1.25rem); line-height: 1.5; max-width: var(--measure); }

.reel { display: grid; grid-template-columns: minmax(0, 1fr) clamp(15rem, 21vw, 19rem); gap: clamp(16px, 2vw, 28px); }
.reel-screen { position: relative; aspect-ratio: 16 / 9; background: #0e1116; overflow: hidden; box-shadow: 0 1px 0 var(--paper-line), 0 30px 60px -40px rgba(40, 30, 10, 0.6); }
.reel-screen video { width: 100%; height: 100%; object-fit: cover; }
.shutter { position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); pointer-events: none; }
.reel-toggle, .game-toggle {
  position: absolute; right: 12px; bottom: 12px;
  appearance: none; border: 0; cursor: pointer;
  background: rgba(17, 21, 27, 0.78); color: var(--ivory);
  font: 600 0.9rem/1 var(--text); padding: 0.65em 0.9em; border-radius: 2px;
  backdrop-filter: blur(4px);
}
.reel-toggle:hover, .game-toggle:hover { background: rgba(17, 21, 27, 0.95); }
.reel-toggle[hidden], .game-toggle[hidden] { display: none; }

.reel-views { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-rows: 1fr; gap: 6px; }
.view {
  display: grid; grid-template-columns: 44% 1fr; grid-template-rows: auto auto; align-content: center;
  column-gap: 14px; height: 100%;
  padding: 6px; text-decoration: none; border-radius: 2px;
  transition: background-color 140ms ease;
}
.view img { grid-row: 1 / 3; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; filter: saturate(0.75); transition: filter 140ms ease; }
.view-label { align-self: end; font-weight: 600; font-size: 1rem; line-height: 1.2; }
.view-note { align-self: start; font-size: 0.92rem; color: var(--muted-on-paper); line-height: 1.3; }
.view:hover { background: rgba(29, 26, 21, 0.06); }
.view:hover img, .view[aria-current="true"] img { filter: none; }
.view[aria-current="true"] { background: rgba(29, 26, 21, 0.09); box-shadow: inset 3px 0 0 var(--ember); }

.featured-foot {
  display: grid; grid-template-columns: minmax(12rem, 1fr) minmax(0, 1.6fr) auto; align-items: start; gap: 1.2rem 3rem;
  margin-top: clamp(28px, 4vw, 44px); padding-top: 24px; border-top: 1px solid var(--paper-line);
}
.status { margin: 0; }
.status dt { color: inherit; margin-bottom: 0.15rem; }
.featured .status dt { color: var(--ember-deep); }
.status dd { margin: 0; }
.facts { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.facts li { padding-left: 1.1em; position: relative; }
.facts li::before { content: "·"; position: absolute; left: 0.2em; color: var(--ember-deep); font-weight: 600; }
.featured .btn-primary { background: var(--ink-on-paper); color: var(--paper); font-size: 1.3rem; padding: 1.1em 1.8em 1.05em; box-shadow: 0 14px 28px -14px rgba(40, 25, 5, 0.7); }
.featured .btn-primary:hover { background: #000; }
.featured .btn-primary .ext { color: var(--ember-light); }
.credit { margin-top: 28px; font-size: 0.85rem; color: var(--muted-on-paper); }

/* ---------- more work: Twin Peaks ---------- */
.game {
  max-width: var(--wide); margin: 0 auto;
  padding: clamp(64px, 9vw, 128px) var(--gutter) clamp(48px, 6vw, 96px);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 80px); align-items: start;
}
.game .label { color: var(--ember-light); margin-bottom: 0.8rem; }
.game h2 { font-size: clamp(2.8rem, 5.4vw, 5rem); }
.kicker { font-family: var(--display); font-style: italic; font-size: 1.35rem; color: var(--ivory-2); margin: 0.5rem 0 1.4rem; }
.game .sentence { margin-bottom: 1.6rem; }
.game .status { padding-top: 1rem; border-top: 1px solid var(--line); }
.game .status dt { color: var(--ember-light); }
.note { margin-top: 0.9rem; font-size: 0.95rem; color: var(--ivory-2); max-width: var(--measure); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 0.9rem; }
.game .actions { margin-top: 1.8rem; }
.game-words { position: sticky; top: 32px; }

.cartridge { position: relative; background: #0b0e12; border: 1px solid var(--line); padding: clamp(10px, 1.6vw, 22px); }
.cartridge video { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #000; }
.game-stills { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(10px, 1.4vw, 18px); margin-top: clamp(10px, 1.4vw, 18px); }
.game-stills img { width: 100%; height: auto; border: 1px solid var(--line); }

/* websites: the page on a laptop-width screen, the phone version overlapping its corner */
.game.is-flipped { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); padding-top: 0; }
.game.is-flipped .game-media { order: 2; }
.site-shots { position: relative; padding-bottom: 12%; }
.site-desktop { width: 100%; border: 1px solid var(--line); }
.site-mobile {
  position: absolute; left: -3%; bottom: 0; width: 24%;
  border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 24px 40px -18px rgba(0, 0, 0, 0.7);
}

/* small things to press around the page */
.count {
  appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer;
  font-variant-numeric: tabular-nums; font-weight: 600;
  text-decoration: underline dotted; text-decoration-color: var(--ember-deep); text-underline-offset: 0.2em;
}
.count:focus-visible { outline: 2px solid var(--ember-deep); outline-offset: 2px; }
.still { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; display: block; transition: translate 160ms ease; }
.still:hover { translate: 0 -3px; }
.still img { width: 100%; }
.cartridge .shown-still { position: absolute; inset: clamp(10px, 1.6vw, 22px); width: auto; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: #000; }
.site-shots[data-shuffle] { cursor: pointer; }
.site-shots[data-shuffle]:focus-visible { outline: 2px solid var(--ember-light); outline-offset: 6px; }
.site-shots.is-swapped .site-mobile { left: 78%; }

/* hint + the one-time glint that shows what can be pressed */
.glint {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%;
  border: 1.5px solid rgba(255, 190, 120, 0.9); box-shadow: 0 0 12px rgba(255, 150, 70, 0.5);
  pointer-events: none; z-index: 5;
}

/* toys along the page */
.toy { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; color: inherit; line-height: 0; }
.toy:focus-visible { outline: 2px solid var(--ember-light); outline-offset: 3px; border-radius: 4px; }
.toy svg { display: block; overflow: visible; }
.featured-inner { position: relative; }
.featured-head { position: relative; }
.bike { position: absolute; right: clamp(0px, 6vw, 120px); top: -14px; }
.bike:hover svg { animation: nudge 0.5s ease-in-out; }
@keyframes nudge { 50% { transform: translateX(3px); } }
.mug8 { margin: -0.3rem 0 0.6rem; }
.mug8 svg { image-rendering: pixelated; }
.mug8-steam { opacity: 0; }
.thermo { display: inline-flex; align-items: flex-end; gap: 6px; margin: -0.3rem 0 0.6rem; color: var(--ivory-2); }
.thermo-deg { font: 600 1rem/1 var(--text); color: var(--ivory); font-variant-numeric: tabular-nums; }
.thermo-mercury { transition: y 900ms cubic-bezier(.3,.7,.3,1), height 900ms cubic-bezier(.3,.7,.3,1), fill 900ms ease; }
.thermo.is-cool .thermo-mercury { y: 28px; height: 12px; fill: #3f8f8a; }
.thermo.is-cool circle { fill: #3f8f8a; transition: fill 900ms ease; }
.foot { position: relative; }
.foot-crow { position: absolute; right: var(--gutter); top: -44px; width: 58px; }
.foot-crow img { width: 100%; height: auto; }
.collab {
  margin-top: 1.2rem !important; padding: 0.9rem 1.1rem; font-weight: 600;
  border-left: 3px solid var(--ember); background: rgba(196, 101, 45, 0.08);
}

/* ---------- from the workshop: its own band, so it never reads as part of Twin Peaks ---------- */
.bench { background: var(--ink-2); border-top: 1px solid var(--line); }
.bench-inner { max-width: var(--wide); margin: 0 auto; padding: clamp(56px, 7vw, 96px) var(--gutter) clamp(64px, 8vw, 112px); }
.bench-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(14rem, 22rem) auto; align-items: end; gap: 0.6rem 3rem; margin-bottom: clamp(28px, 4vw, 48px); }
.kepler-fig { margin: 0; display: grid; justify-items: center; gap: 0.4rem; }
.kepler-fig figcaption { font-size: 0.85rem; color: var(--ivory-2); font-style: italic; }
.kepler {
  appearance: none; background: none; border: 0; padding: 0; cursor: grab; touch-action: none;
  width: clamp(180px, 17vw, 240px); aspect-ratio: 1; border-radius: 50%;
}
.kepler:active { cursor: grabbing; }
.kepler canvas { width: 100%; height: 100%; display: block; }
html:not(.js) .kepler-fig { display: none; }
.bench-head h2 { font-size: clamp(2.6rem, 5vw, 4.4rem); }
.bench-head p { color: var(--ivory-2); max-width: var(--measure); }
.bench-list { list-style: none; margin: 0; padding: 0; }
.bench-item { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(0, 2.4fr) minmax(12rem, 1.1fr) auto; gap: 0.5rem 2.5rem; align-items: baseline; padding-top: 24px; border-top: 1px solid var(--line); }
.bench-item h3 { font-size: 2.1rem; }
.bench-item p { max-width: var(--measure); }
.bench-status { color: var(--ivory-2); font-size: 0.95rem; }

/* ---------- about ---------- */
.about {
  background: var(--paper); color: var(--ink-on-paper); color-scheme: light;
  padding: clamp(56px, 8vw, 112px) var(--gutter);
  display: grid; grid-template-columns: minmax(160px, 300px) minmax(0, 38rem); justify-content: center; align-items: center; gap: clamp(28px, 6vw, 96px);
}
.about :focus-visible { outline-color: var(--ember-deep); }
.portrait { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; display: block; width: 100%; position: relative; }
.portrait:focus-visible { outline: 2px solid var(--ember-deep); outline-offset: 4px; }
.about-portrait { width: 100%; height: auto; }
.about h2 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); margin-bottom: 1.2rem; }
.about p + p { margin-top: 0.9rem; }
.follow { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: 0.8rem 0.9rem; }
.about .btn-primary { background: var(--ink-on-paper); color: var(--paper); }
.about .btn-primary:hover { background: #000; }
.about .btn-primary .handle { color: #d8ccb2; }
.follow li:first-child { flex-basis: 100%; }
.follow a { white-space: nowrap; }
@media (max-width: 480px) { .follow .btn-primary { flex-direction: column; align-items: flex-start; gap: 0.4em; } }
.follow .handle { font-weight: 400; font-size: 0.9em; color: var(--muted-on-paper); }
.follow .ext { color: var(--ember-deep); }

.foot {
  max-width: var(--wide); margin: 0 auto; padding: 28px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem;
  font-size: 0.9rem; color: var(--ivory-2);
}

/* ---------- tablet & phone: a different composition, not a smaller one ---------- */
@media (max-width: 1100px) {
  .reel { grid-template-columns: 1fr; }
  .reel-views { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .reel-views li { flex: 0 0 clamp(150px, 26vw, 220px); scroll-snap-align: start; }
  .view { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 4px; padding: 0 0 6px; }
  .view img { grid-row: auto; }
  .view[aria-current="true"] { box-shadow: inset 0 -3px 0 var(--ember); background: none; }
  .view:hover { background: none; }
  .featured-foot { grid-template-columns: 1fr 1fr; }
  .featured-foot .actions { grid-column: 1 / -1; }
  .game { grid-template-columns: 1fr; }
  .game-words { position: static; order: -1; }
  .game.is-flipped { grid-template-columns: 1fr; }
  .game.is-flipped .game-media { order: 0; }
  .site-mobile { left: auto; right: 4%; width: 30%; }
  .site-shots.is-swapped .site-mobile { left: 4%; right: auto; }
  .bench-item { grid-template-columns: 1fr; }
  .bench-head { grid-template-columns: 1fr; }
  .kepler-fig { justify-self: start; }
}

@media (max-width: 820px) {
  .hide-s { display: none; }
  .hero-words { grid-template-columns: 1fr; }
  .hero { padding-left: 0; padding-right: 0; }

  /* the portrait plate: Bear at the machine, the window tall beside him */
  .plate-stage { aspect-ratio: 1122 / 1402; }
  .sheets { display: none; }
  .crow { left: 59.71%; top: 12.13%; width: 37.43%; }                       /* px 670,170 */
  .ember { left: 58.11%; top: 63.69%; width: 11%; }
  .machine { left: 44.56%; top: 56.35%; width: 24.96%; height: 14.98%; }
  .crow-btn { left: 62%; top: 13%; width: 34%; height: 27%; }
  .cup { left: 74.87%; top: 64.55%; width: 10.7%; height: 7.49%; }     /* px 840,905 → 960,1010 of 1122×1402 */
  .steam { width: 2.4%; height: 5%; }
  .plate-caption { flex-direction: column; gap: 0.5rem; }
  .featured-head { grid-template-columns: 1fr; }
  .featured-foot { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; justify-items: start; }
  .portrait { width: 180px; }
}

@media (max-width: 480px) {
  .mark span { font-size: 1.15rem; }
  .mark span:not(.visually-hidden) { display: none; }
  .hero-links { flex-wrap: nowrap; gap: 0.6rem; margin-top: 1.2rem; }
  .hero-links > * { padding-left: 0.95em; padding-right: 0.95em; font-size: 0.98rem; white-space: nowrap; }
  .top { padding-top: 14px; padding-bottom: 14px; }
  .top ul { gap: 1rem; }
  body { font-size: 1.0625rem; }
}
