/* ==========================================================================
   travispayne.me: Evergreen Gallery
   Design language: museum retrospective in daylight. Warm paper canvas,
   deep forest ink, strong evergreen wayfinding, Stack Sans Notch 300
   display over Instrument Sans body, mono placards, per-study accents
   darkened for contrast on the light ground.
   ========================================================================== */

:root {
  --bg: #f2efe6;
  --bg-elev: #faf8f1;
  --bg-panel: #e9e4d6;
  --ink: #182b20;
  --ink-dim: #4f5f53;
  --ink-faint: #66766a;
  --line: rgba(24, 43, 32, 0.14);
  --line-strong: rgba(24, 43, 32, 0.30);
  --evergreen: #1f7a4d;
  --accent: var(--evergreen);
  --font-display: "Stack Sans Notch", "Segoe UI", sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", sans-serif;
  --font-mono: "Spline Sans Mono", "Consolas", monospace;
  --w-content: 72rem;
  --w-text: 44rem;
  --w-wide: 94rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 10px;
  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  /* Motion scale: micro-feedback → choreographed entrances */
  --t-micro: 130ms;
  --t-quick: 220ms;
  --t-mid: 380ms;
  --t-slow: 620ms;
  --header-h: 4.25rem;
}

/* Per-study accents, darkened for contrast on paper */
[data-accent="prove"]  { --accent: #8b2fb8; }
[data-accent="casper"] { --accent: #c8371f; }
[data-accent="riot"]   { --accent: #8a6420; }
[data-accent="aarp"]   { --accent: #a5122b; }
[data-accent="xfire"]  { --accent: #2a6cb0; }

/* Reset-ish */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1.25rem); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--line-strong); transition: text-decoration-color var(--t-micro) var(--ease), color var(--t-micro) var(--ease); }
a:hover { text-decoration-color: var(--accent); }
/* Prose links carry the accent on hover; chrome links style themselves */
:is(p, li, figcaption, dd) a:not(.btn):hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.08; font-family: var(--font-display); font-weight: 300; letter-spacing: -0.005em; text-wrap: balance; }
h3, h4 { font-weight: 500; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
figure { margin: 0; }
::selection { background: var(--accent); color: var(--bg); }

/* Film grain — one fixed layer, very quiet */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 4;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.035;
  mix-blend-mode: multiply;
}

/* Type helpers */
.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0 0 1.1rem;
}
.kicker::before { content: ""; width: 2rem; height: 1px; background: var(--accent); flex: none; }
.display {
  font-weight: 300;
  font-size: clamp(2.4rem, 1.6rem + 4.2vw, 4.9rem);
  letter-spacing: -0.01em;
}
.lede { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); line-height: 1.55; color: var(--ink-dim); max-width: 46rem; }
.lede strong, .lede b { color: var(--ink); font-weight: 600; }

/* Layout */
.container { width: min(var(--w-content), 100% - 2 * var(--pad)); margin-inline: auto; }
.container--text { width: min(var(--w-text), 100% - 2 * var(--pad)); margin-inline: auto; }
.container--wide { width: min(var(--w-wide), 100% - 2 * var(--pad)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section + .section { border-top: 1px solid var(--line); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--bg);
  padding: 0.6rem 1rem; border-radius: 6px; font-weight: 600;
  transition: top 160ms var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease), box-shadow var(--t-mid) var(--ease);
}
.site-header__inner {
  width: min(var(--w-wide), 100% - 2 * var(--pad));
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h);
  transition: min-height var(--t-mid) var(--ease);
}
/* Once the page has left the top, the header settles: shorter, more opaque, grounded */
body[data-scrolled] { --header-h: 3.6rem; }
body[data-scrolled] .site-header {
  background: color-mix(in srgb, var(--bg) 93%, transparent);
  border-bottom-color: var(--line-strong);
  box-shadow: 0 14px 30px -28px rgba(24, 43, 32, 0.75);
}

/* Reading progress — a hairline of accent along the header's bottom edge (JS-injected) */
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent); pointer-events: none;
  transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  opacity: 0; transition: opacity var(--t-mid) var(--ease);
}
body[data-scrolled] .scroll-progress { opacity: 0.9; }

.wordmark {
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; font-size: 0.95rem; text-decoration: none;
}
.wordmark span { color: var(--accent); display: inline-block; transition: transform var(--t-quick) var(--ease-spring); }
.wordmark:hover span { transform: translateY(-1px) scale(1.45); }
.site-nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; }
.site-nav a {
  position: relative;
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-dim); padding: 0.5rem 0;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.2rem; height: 1px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform var(--t-quick) var(--ease-out);
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav-toggle { display: none; }

@media (max-width: 700px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; gap: 5px;
    background: none; border: 1px solid var(--line-strong); border-radius: 6px;
    padding: 0.65rem 0.7rem; cursor: pointer;
  }
  .nav-toggle span { width: 18px; height: 2px; background: var(--ink); transition: transform 200ms var(--ease), opacity 200ms; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--pad) 1rem;
    display: none;
  }
  .site-nav a { padding: 0.9rem 0; font-size: 0.9rem; border-bottom: 1px solid var(--line); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a::after { bottom: -1px; }
  body.nav-open .site-nav { display: flex; animation: nav-in var(--t-mid) var(--ease-out) both; }
  body.nav-open .site-nav a { animation: nav-link-in var(--t-mid) var(--ease-out) both; }
  body.nav-open .site-nav a:nth-child(2) { animation-delay: 55ms; }
  body.nav-open .site-nav a:nth-child(3) { animation-delay: 110ms; }
  @keyframes nav-in { from { opacity: 0; transform: translateY(-10px); } }
  @keyframes nav-link-in { from { opacity: 0; transform: translateY(-6px); } }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Hero */
.hero { position: relative; padding-block: clamp(5rem, 12vw, 10rem) clamp(4rem, 9vw, 7rem); overflow: clip; }
.hero__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(52rem 30rem at 12% -10%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 60%),
    radial-gradient(40rem 26rem at 95% 15%, rgba(31, 122, 77, 0.06), transparent 65%);
}
/* The light in the room follows you, a little. JS sets --mx/--my in the -1..1 range. */
.hero__glow.is-live {
  will-change: transform;
  transform: translate3d(calc(var(--mx, 0) * 16px), calc(var(--my, 0) * 10px), 0);
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero h1 { font-size: clamp(3rem, 2rem + 6.5vw, 7rem); font-weight: 300; letter-spacing: -0.025em; margin-bottom: 0.35em; }
.hero h1 .dim { color: var(--ink-faint); }
.hero .lede { margin-bottom: 2rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.85rem 1.5rem; color: var(--ink);
  transition: border-color var(--t-quick) var(--ease), background var(--t-quick) var(--ease), transform var(--t-quick) var(--ease-spring), box-shadow var(--t-quick) var(--ease);
}
.btn:hover, .btn:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.985); transition-duration: 90ms; }
.btn--solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--solid:hover, .btn--solid:focus-visible { background: var(--ink); filter: brightness(1.08); box-shadow: 0 10px 22px -14px rgba(24, 43, 32, 0.9); }
.btn .arrow { transition: transform var(--t-quick) var(--ease-spring); }
.btn:hover .arrow, .btn:focus-visible .arrow { transform: translateX(4px); }
.btn:active .arrow { transform: translateX(1px); }
/* Down-arrows travel down, not sideways */
.btn[href^="#"] .arrow { transition: transform var(--t-quick) var(--ease-spring); }
.btn[href^="#"]:hover .arrow, .btn[href^="#"]:focus-visible .arrow { transform: translateY(3px) translateX(0); }

/* Section heading with index */
.section-head { display: flex; align-items: baseline; gap: 1.25rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head .index { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent); flex: none; }
.section-head h2 { font-size: clamp(1.8rem, 1.4rem + 2.2vw, 3rem); margin: 0; }

/* Work cards — bare prints with plain text beneath, photography-portfolio style */
.work-grid { display: grid; gap: clamp(2.2rem, 4.5vw, 3.5rem) clamp(1.5rem, 3vw, 2.2rem); }
.work-card {
  position: relative; display: block; text-decoration: none;
  border: 0; border-radius: 0; overflow: visible; background: none;
}
.work-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 8px; }
.work-card__media { position: relative; aspect-ratio: 16 / 9; overflow: clip; background: var(--bg-elev); }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.work-card:hover .work-card__media img,
.work-card:focus-visible .work-card__media img { opacity: 0.94; transform: scale(1.02); }
.work-card__body { padding: 1.1rem 0 0; }
.work-card__body::before { content: ""; display: block; width: 2rem; height: 2px; background: var(--accent); margin-bottom: 0.8rem; transition: width var(--t-mid) var(--ease-out); }
.work-card:hover .work-card__body::before,
.work-card:focus-visible .work-card__body::before { width: 3.4rem; }
.work-card__meta { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim); display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.55rem; }
.work-card__meta .num { color: var(--accent); }
.work-card h3 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); margin-bottom: 0.35rem; transition: color var(--t-quick) var(--ease); }
.work-card:hover h3, .work-card:focus-visible h3 { color: var(--accent); }
.work-card p { color: var(--ink-dim); margin: 0; max-width: 52ch; }
@media (min-width: 860px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .work-card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; }
  .work-card--featured .work-card__media { aspect-ratio: auto; min-height: 100%; }
  .work-card--featured .work-card__body { padding: 0; align-self: center; }
  .work-card--featured h3 { font-size: 2.1rem; }
}

/* Range strip — plain columns over hairlines */
.range-grid { display: grid; gap: 2rem; background: none; border: 0; border-radius: 0; overflow: visible; }
@media (min-width: 760px) { .range-grid { grid-template-columns: repeat(3, 1fr); } }
.range-cell { position: relative; background: none; padding: 1.4rem 0 0; }
.range-cell .kicker { margin-bottom: 0.8rem; }
/* The rule above each column draws itself in as the strip arrives */
.range-cell::before, .stat::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: var(--line-strong);
  transform-origin: 0 50%;
  transition: transform var(--t-slow) var(--ease-out) var(--rule-d, 0ms), background var(--t-quick) var(--ease);
}
.reveal:not(.in) .range-cell::before, .reveal:not(.in) .stat::before { transform: scaleX(0); }
.range-grid .range-cell:nth-child(2), .stats .stat:nth-child(2) { --rule-d: 110ms; }
.range-grid .range-cell:nth-child(3), .stats .stat:nth-child(3) { --rule-d: 220ms; }
.range-grid .range-cell:nth-child(4), .stats .stat:nth-child(4) { --rule-d: 330ms; }
@media (hover: hover) {
  .range-cell:hover::before, .stat:hover::before { background: var(--accent); }
}
.range-cell h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.range-cell p { color: var(--ink-dim); font-size: 0.95rem; margin: 0; }

/* Placard figure — bare prints on the paper, museum labels below */
.plate { margin-block: clamp(2.4rem, 5.5vw, 4rem); }
.plate__media { background: none; border: 0; padding: 0; box-shadow: none; overflow: clip; }
.plate__media img { width: 100%; border-radius: 0; transition: transform var(--t-slow) var(--ease); }
@media (hover: hover) {
  .plate:hover .plate__media img { transform: scale(1.012); }
}
.plate__media--bare { background: none; border: 0; padding: 0; box-shadow: none; }
.plate figcaption {
  display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.1rem;
  align-items: baseline; margin-top: 0.9rem; padding-left: 0.25rem;
}
.plate__no { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; color: var(--accent); white-space: nowrap; }
.plate figcaption p { margin: 0; color: var(--ink-dim); font-size: 0.95rem; max-width: 62ch; }
.plate figcaption strong { color: var(--ink); font-weight: 600; }

/* Plate pair/grid */
.plate-row { display: grid; gap: clamp(1.2rem, 3vw, 2rem); margin-block: clamp(2.2rem, 5vw, 3.6rem); }
.plate-row .plate { margin-block: 0; }
@media (min-width: 760px) {
  .plate-row--2 { grid-template-columns: 1fr 1fr; }
  .plate-row--3 { grid-template-columns: repeat(3, 1fr); }
  .plate-row--23 { grid-template-columns: 2fr 3fr; }
  .plate-row--32 { grid-template-columns: 3fr 2fr; }
}

/* Case study scaffolding */
.study-hero { padding-block: clamp(4rem, 9vw, 7rem) clamp(2.5rem, 6vw, 4rem); position: relative; overflow: clip; }
.study-hero h1 { font-size: clamp(2.6rem, 1.8rem + 4.5vw, 5.4rem); font-weight: 300; max-width: 20ch; }
.study-hero .lede { max-width: 52rem; }

.factbar { border-block: 1px solid var(--line); }
.factbar dl {
  width: min(var(--w-content), 100% - 2 * var(--pad)); margin-inline: auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0; margin-block: 0;
}
.factbar div { padding: 1.1rem 1.25rem; border-left: 1px solid var(--line); }
.factbar div:first-child { border-left: 0; padding-left: 0; }
.factbar dt { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.3rem; }
.factbar dd { margin: 0; font-size: 0.95rem; color: var(--ink); }
@media (max-width: 700px) {
  .factbar dl { grid-template-columns: 1fr 1fr; }
  .factbar div { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .factbar div:nth-child(-n+2) { border-top: 0; }
}

.study-section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.study-section > .container--text > h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.4rem); 
  margin-bottom: 1rem;
}
.study-section .container--text + .container--wide { margin-top: 2rem; }

/* Decision list — numbered thinking, hairline rows */
.decisions { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0; }
.decisions li { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding: 1.2rem 0.1rem; background: none; border: 0; border-top: 1px solid var(--line); transition: border-top-color var(--t-quick) var(--ease); }
.decisions .d-no { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); padding-top: 0.2rem; transition: transform var(--t-quick) var(--ease-spring); }
@media (hover: hover) {
  .decisions li:hover { border-top-color: var(--accent); }
  .decisions li:hover .d-no { transform: translateX(2px); }
}
.decisions p { margin: 0; color: var(--ink-dim); }
.decisions strong { color: var(--ink); display: block; margin-bottom: 0.15rem; font-weight: 650; }

/* Outcome stats — plain editorial columns */
.stats { display: grid; gap: 1.6rem; background: none; border: 0; border-radius: 0; overflow: visible; margin-block: 1.5rem; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(var(--stat-cols, 3), 1fr); } }
.stat { position: relative; background: none; padding: 1.2rem 0 0; }
.stat .n { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); letter-spacing: -0.01em; color: var(--ink); display: block; line-height: 1.05; }
.stat .n em { font-style: normal; color: var(--accent); }
.stat .l { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-dim); display: block; margin-top: 0.5rem; }

/* Compare slider */
.compare { position: relative; border-radius: 0; overflow: clip; border: 0; background: var(--bg-elev); touch-action: none; }
.compare img { width: 100%; height: auto; display: block; pointer-events: none; }
.compare__top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0); }
.compare__top img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px;
  background: var(--ink); transform: translateX(-1px); pointer-events: none;
}
.compare__handle::after {
  content: "↔"; position: absolute; top: 50%; left: 50%;
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center; font-size: 1rem; font-weight: 700;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -50%) scale(var(--handle-s, 1));
  transition: transform var(--t-quick) var(--ease-spring);
}
.compare:hover { --handle-s: 1.1; }
.compare.is-active { --handle-s: 0.92; cursor: ew-resize; }
/* Out of the way while you're actually dragging */
.compare.is-active .compare__tag { opacity: 0; }
/* One-time nudge when the slider first scrolls into view, so the affordance reads */
.compare.is-hinting { --handle-s: 1.12; }
.compare input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; margin: 0;
}
.compare input[type="range"]:focus-visible ~ .compare__handle::after { outline: 2px solid var(--accent); outline-offset: 3px; }
.compare__tag {
  position: absolute; bottom: 0.8rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  background: rgba(24, 43, 32, 0.8); color: #f6f3ea;
  padding: 0.35rem 0.7rem; border-radius: 4px; pointer-events: none;
  backdrop-filter: blur(6px);
  transition: opacity var(--t-quick) var(--ease);
}
.compare__tag--a { left: 0.8rem; }
.compare__tag--b { right: 0.8rem; }

/* Toggle (process viewer) */
.toggle-group { position: relative; display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; gap: 3px; margin-bottom: 1.2rem; }
.toggle-group button {
  position: relative; z-index: 1;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  background: none; border: 0; color: var(--ink-dim); border-radius: 999px;
  padding: 0.55rem 1.1rem; cursor: pointer; transition: background var(--t-quick) var(--ease), color var(--t-quick) var(--ease);
}
.toggle-group button:hover { color: var(--ink); }
.toggle-group button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.toggle-group button:active { transform: scale(0.97); }
/* With JS, the fill becomes one pill that slides between options */
.toggle-group.is-enhanced button[aria-pressed="true"] { background: none; }
.toggle-group.is-enhanced button[aria-pressed="true"], .toggle-group.is-enhanced button[aria-pressed="true"]:hover { color: var(--bg); }
.toggle-group.is-enhanced::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: var(--tw, 0); transform: translateX(var(--tx, 0));
  background: var(--ink); border-radius: 999px; pointer-events: none;
  transition: transform var(--t-mid) var(--ease-spring), width var(--t-mid) var(--ease);
}
.toggle-panels > * { display: none; }
.toggle-panels > .active { display: block; }
/* Only choreograph the swap once the visitor has actually asked for one */
.toggle-panels[data-swapped] > .active { animation: panel-in var(--t-mid) var(--ease-out) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }

/* Salon wall — clean photo grid: bare prints, even white gutters, quiet numbers */
.salon {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 120px;
  grid-auto-flow: dense;
  margin-block: clamp(1.6rem, 4vw, 2.4rem) 0.4rem;
}
@media (min-width: 760px) { .salon { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 108px; gap: clamp(16px, 2vw, 24px); } }
.salon .piece {
  position: relative;
  display: flex; flex-direction: column-reverse;
  grid-column: span 2; grid-row: span 2;
  overflow: clip; background: none; border: 0; border-radius: 0;
  cursor: zoom-in;
}
.salon .piece:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.salon .piece img { width: 100%; flex: 1; min-height: 0; object-fit: cover; object-position: top center; transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.salon .piece .no {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.16em;
  color: var(--ink-faint);
  padding-top: 0.4rem;
  transition: color var(--t-quick) var(--ease);
}
/* "Enlarge" badge, only while you're looking at that print. SVG rather than a
   glyph so the icon doesn't depend on what the mono stack happens to carry. */
.salon .piece::before {
  content: ""; position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2;
  width: 1.7rem; height: 1.7rem; border-radius: 50%;
  background-color: color-mix(in srgb, var(--bg-elev) 86%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23182b20' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center; background-size: 0.85rem;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 2px 10px -4px rgba(24, 43, 32, 0.5);
  opacity: 0; transform: translateY(-4px) scale(0.9); pointer-events: none;
  transition: opacity var(--t-quick) var(--ease), transform var(--t-quick) var(--ease-spring);
}
/* .is-lit is set from the label rail below, so pointing at a museum label
   picks out its print with the same treatment as hovering the print itself. */
.salon .piece:hover::before, .salon .piece:focus-visible::before, .salon .piece.is-lit::before { opacity: 1; transform: none; }
.salon .piece:hover .no, .salon .piece:focus-visible .no, .salon .piece.is-lit .no { color: var(--accent); }
.salon .piece:hover img, .salon .piece:focus-visible img, .salon .piece.is-lit img { transform: scale(1.035); }
@media (min-width: 760px) {
  .piece--w3 { grid-column: span 3; }
  .piece--w4 { grid-column: span 4; }
  .piece--w6 { grid-column: span 6; }
  .piece--h1 { grid-row: span 1; }
  .piece--h3 { grid-row: span 3; }
  .piece--h4 { grid-row: span 4; }
  .piece--h5 { grid-row: span 5; }
}
@media (max-width: 759px) {
  .piece--h1 { grid-row: span 1; }
  .piece--h3, .piece--h4, .piece--h5 { grid-row: span 3; }
}
.piece--fade::after {
  content: ""; position: absolute; inset: auto 0 1.4rem 0; height: 24%;
  background: linear-gradient(to top, color-mix(in srgb, var(--bg) 92%, transparent), transparent);
  pointer-events: none;
}

/* Wall labels — the gallery's label rail */
.wall-labels { margin-top: 1.1rem; }
@media (min-width: 760px) { .wall-labels { columns: 2; column-gap: 3.5rem; } }
.wall-labels ol { list-style: none; margin: 0; padding: 0; }
.wall-labels li {
  break-inside: avoid;
  display: grid; grid-template-columns: auto 1fr; gap: 0.9rem;
  padding: 0.55rem 0.1rem; border-top: 1px solid var(--line);
  font-size: 0.92rem; color: var(--ink-dim); line-height: 1.5;
  transition: border-top-color var(--t-quick) var(--ease), color var(--t-quick) var(--ease);
}
.wall-labels .no { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; color: var(--accent); padding-top: 0.2rem; transition: transform var(--t-quick) var(--ease-spring); }
.wall-labels li.is-lit { border-top-color: var(--accent); color: var(--ink); }
.wall-labels li.is-lit .no { transform: translateX(2px); }
.wall-labels strong { color: var(--ink); font-weight: 600; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 0.35rem; top: 0.4rem; bottom: 0.4rem; width: 1px; background: var(--line-strong); }
.timeline li { position: relative; padding: 0 0 2.2rem 2.2rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 0.42rem;
  width: 0.72rem; height: 0.72rem; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
  transition: background var(--t-quick) var(--ease), transform var(--t-quick) var(--ease-spring);
}
@media (hover: hover) {
  .timeline li:hover::before { background: var(--accent); transform: scale(1.3); }
}
.timeline .t-year { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; color: var(--accent); text-transform: uppercase; display: block; margin-bottom: 0.15rem; }
.timeline h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.timeline h3 .role { color: var(--ink-dim); font-weight: 500; }
.timeline p { color: var(--ink-dim); font-size: 0.95rem; margin: 0; max-width: 62ch; }
.timeline .t-link { font-family: var(--font-mono); font-size: 0.75rem; }

/* Logo strip */
.logo-strip { display: flex; flex-wrap: wrap; gap: 2.2rem 3rem; align-items: center; padding: 1.8rem 0; opacity: 0.85; }
.logo-strip img { height: 2rem; width: auto; filter: grayscale(1); opacity: 0.55; transition: opacity var(--t-quick) var(--ease), filter var(--t-quick) var(--ease), transform var(--t-quick) var(--ease-spring); }
.logo-strip img:hover { filter: grayscale(0) brightness(1); opacity: 1; transform: scale(1.07); }

/* Study footer nav */
.study-next { border-top: 1px solid var(--line); transition: background var(--t-mid) var(--ease); }
.study-next a {
  display: block; text-decoration: none;
  padding: clamp(3rem, 7vw, 5rem) 0;
}
.study-next .kicker { margin-bottom: 0.6rem; }
.study-next .next-title { font-family: var(--font-display); font-size: clamp(2rem, 1.5rem + 3vw, 3.6rem); font-weight: 300; display: flex; align-items: center; gap: 1rem; transition: color var(--t-quick) var(--ease); }
.study-next .next-title .arrow { transition: transform var(--t-mid) var(--ease-spring); color: var(--accent); }
.study-next a:hover .next-title .arrow, .study-next a:focus-visible .next-title .arrow { transform: translateX(10px); }
.study-next:has(a:hover), .study-next:has(a:focus-visible) { background: color-mix(in srgb, var(--accent) 5%, transparent); }

/* About */
.about-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (min-width: 860px) { .about-grid { grid-template-columns: 1fr 1.6fr; } .about-grid__media { position: sticky; top: 6rem; } }
.about-grid__media img { border-radius: 0; border: 0; }
.capabilities { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.capabilities li { border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; font-size: 0.95rem; color: var(--ink-dim); transition: border-color var(--t-quick) var(--ease), color var(--t-quick) var(--ease); }
@media (hover: hover) {
  .capabilities li:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--ink); }
}
.capabilities li::before { content: "— "; color: var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-elev); }
.site-footer__cta { padding: clamp(4rem, 10vw, 7rem) 0 clamp(2.5rem, 6vw, 4rem); }
.site-footer__cta h2 { font-size: clamp(2.4rem, 1.8rem + 4vw, 5rem); font-weight: 300; margin-bottom: 1rem; }
.site-footer__cta h2 em { font-style: normal; color: var(--accent); }
.site-footer__meta {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center;
  padding: 1.4rem 0 2rem; border-top: 1px solid var(--line); margin-top: clamp(2.5rem, 6vw, 4rem);
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint);
}
.site-footer__meta a { color: var(--ink-dim); display: inline-block; transition: color var(--t-micro) var(--ease), transform var(--t-quick) var(--ease-spring); }
.site-footer__meta a:hover { color: var(--ink); transform: translateY(-2px); }

/* Reveal on scroll — --d is the stagger delay, set per batch by main.js */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity var(--t-slow) var(--ease-out) var(--d, 0ms), transform var(--t-slow) var(--ease-out) var(--d, 0ms);
}
.reveal.in { opacity: 1; transform: none; }
/* Without scripting nothing would ever add .in, so hand the content back */
@media (scripting: none) {
  .reveal { opacity: 1; transform: none; }
  .reveal:not(.in) .range-cell::before, .reveal:not(.in) .stat::before { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .reveal:not(.in) .range-cell::before, .reveal:not(.in) .stat::before { transform: none; }
  body::after { display: none; }
  .hero__glow.is-live { transform: none; transition: none; }
  /* Keep state changes legible, drop the travel */
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

/* 404 */
.notfound { min-height: 55vh; display: grid; place-content: center; text-align: center; padding-block: 5rem; }
.notfound h1 { font-size: clamp(3rem, 8vw, 6rem); }
.notfound p { color: var(--ink-dim); margin-bottom: 2rem; }

/* Contact form */
.contact-form { display: grid; gap: 1.1rem; max-width: 40rem; margin-top: 2rem; }
.contact-form .field { display: grid; gap: 0.45rem; }
.contact-form label {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-dim);
  transition: color var(--t-quick) var(--ease);
}
.contact-form .field:focus-within label { color: var(--accent); }
.contact-form input, .contact-form textarea {
  background: var(--bg-elev); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px;
  padding: 0.85rem 1rem; font: inherit; width: 100%;
  transition: border-color var(--t-quick) var(--ease), background var(--t-quick) var(--ease), box-shadow var(--t-quick) var(--ease);
}
.contact-form .field:focus-within input, .contact-form .field:focus-within textarea {
  background: var(--bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 9%, transparent);
}
.contact-form input:hover, .contact-form textarea:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line-strong)); }
.contact-form input:focus-visible, .contact-form textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.contact-form textarea { min-height: 9rem; resize: vertical; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button[type="submit"] { justify-self: start; cursor: pointer; }
.contact-form button[disabled] { opacity: 0.55; cursor: wait; }
.form-status { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink-dim); min-height: 1.4em; margin: 0; }
.form-status.ok { color: #1f7a4d; }
.form-status.err { color: #b3362a; }
.form-status.is-new { animation: status-in var(--t-mid) var(--ease-out) both; }
@keyframes status-in { from { opacity: 0; transform: translateY(4px); } }
/* Sending: the button breathes so the wait reads as progress, not a dead click */
.contact-form button[disabled] { animation: pending 1.4s ease-in-out infinite; }
@keyframes pending { 50% { opacity: 0.38; } }

/* ==========================================================================
   Flywheel — the week drawn twice: a ring on wide screens, the same beats
   restacked vertically on narrow ones. Shared class names so one set of
   animation rules drives both. Each node links to its segment below.
   ========================================================================== */
.fw-figure { margin-block: clamp(1rem, 3vw, 2rem); }
.fw { display: block; width: 100%; height: auto; margin-inline: auto; }
.fw-wide { max-width: 58rem; }
.fw-tall { max-width: 24rem; display: none; }
@media (max-width: 760px) {
  .fw-wide { display: none; }
  .fw-tall { display: block; }
}

.fw-name  { font-family: var(--font-mono); font-size: 15px; font-weight: 500; fill: var(--ink); }
.fw-role  { font-family: var(--font-body); font-size: 12.5px; fill: var(--ink-dim); }
.fw-tool  { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.4px; fill: var(--accent); }
.fw-mid   { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 1.8px; text-transform: uppercase; fill: var(--ink-faint); }
.fw-day   { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; fill: var(--ink-faint); }
.fw-key   { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; fill: var(--ink-faint); }
.fw-arc   { stroke: var(--line-strong); stroke-width: 1.1; fill: none; }
.fw-band  { stroke: var(--line-strong); stroke-width: 1.1; fill: none; }
.fw-spoke { stroke: var(--line); stroke-width: 1; fill: none; stroke-dasharray: 3 5; }
/* Hollow node = the machine does it. Filled = a person does it. */
.fw-dot   { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.fw-dot--human { fill: var(--accent); stroke: var(--accent); }
.fw-ico   { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--accent); }
.fw-node--human .fw-ico, .fw-ico--onfill { color: var(--bg); }
.fw-node  { transform-box: fill-box; transform-origin: center; }

/* The wheel doubles as the contents page */
.fw a { cursor: pointer; }
.fw a .fw-name { transition: fill var(--t-quick) var(--ease); }
.fw a:hover .fw-name { fill: var(--accent); }
.fw a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.fw-stage, .fw-hub { opacity: 0; }
.fw-arc { opacity: 0; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.fw-orbit { opacity: 0; }

/* The beat: hub first, then each stage, each arc chasing the stage it leaves */
.reveal.in .fw-hub   { animation: fw-in 520ms var(--ease-out) both; }
.reveal.in .fw-stage { animation: fw-in 520ms var(--ease-out) both; animation-delay: calc(300ms + var(--i) * 220ms); }
.reveal.in .fw-arc   { animation: fw-draw 420ms var(--ease-out) both; animation-delay: calc(440ms + var(--i) * 220ms); }
@keyframes fw-in   { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fw-draw { 0% { stroke-dashoffset: var(--len); opacity: 0; } 14% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 1; } }

/* Once assembled, the wheel keeps turning */
.reveal.in .fw-wide .fw-orbit { transform-origin: 450px 300px; animation: fw-fade 700ms ease 1.9s both, fw-spin 17s linear 1.9s infinite; }
.reveal.in .fw-tall .fw-orbit { animation: fw-fade 700ms ease 1.9s both, fw-drop 5.6s linear 1.9s infinite; }
@keyframes fw-fade { to { opacity: 1; } }
@keyframes fw-spin { to { transform: rotate(360deg); } }
@keyframes fw-drop { 0% { transform: translateY(0); } 100% { transform: translateY(450px); } }

/* Each beat acknowledges the pulse as it arrives, timed off the same orbit */
@keyframes fw-ping      { 0%, 100% { transform: scale(1); } 1.2% { transform: scale(1.16); } 4.5% { transform: scale(1); } }
@keyframes fw-ping-fast { 0%, 100% { transform: scale(1); } 4%   { transform: scale(1.16); } 14%  { transform: scale(1); } }
.reveal.in .fw-wide .fw-node { animation: fw-ping 17s linear infinite; animation-delay: calc(1.9s + var(--i) * 2.8333s); }
.reveal.in .fw-tall .fw-node { animation: fw-ping-fast 5.6s linear infinite; animation-delay: calc(1.9s + var(--i) * 1.12s); }

@media (prefers-reduced-motion: reduce), (scripting: none) {
  .fw-stage, .fw-hub, .fw-arc, .fw-orbit, .fw-node { opacity: 1; animation: none !important; stroke-dashoffset: 0; transform: none; }
  .fw-orbit { display: none; }
}

/* Beat segments — one per stage of the wheel, in the order the week runs */
.beat { border-top: 1px solid var(--line); padding-block: clamp(2.2rem, 5.5vw, 3.6rem); scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.beat__head { display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 3vw, 1.6rem); align-items: start; }
.beat__mark { flex: none; }
.beat__when { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 0.5rem; }
.beat__when b { color: var(--accent); font-weight: 500; }
.beat h2 { font-size: clamp(1.4rem, 1.2rem + 1.2vw, 2rem); margin-bottom: 0.7rem; }
.beat__body { margin-top: 1.2rem; }
.beat__body p { color: var(--ink-dim); }
.beat__body strong { color: var(--ink); font-weight: 600; }
@media (min-width: 760px) { .beat__body { padding-left: calc(2.6rem + clamp(1rem, 3vw, 1.6rem)); } }
/* The line I drew — set apart from the prose that explains the machine */
.beat__rule { border-left: 2px solid var(--accent); padding: 0.15rem 0 0.15rem 1.1rem; margin-top: 1.4rem; }
.beat__rule span { display: block; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.3rem; }
.beat__rule p { margin: 0; color: var(--ink); }
.beat__media { margin-top: 1.8rem; }

/* ==========================================================================
   Lightbox — the print comes off the wall and the room goes dark.
   Built by main.js; without JS the piece links still open the file directly.
   ========================================================================== */
.lb {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: color-mix(in srgb, var(--ink) 92%, #000);
  --lb-accent: color-mix(in srgb, var(--accent) 68%, #fff);
  --lb-paper: #f2efe6;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-mid) var(--ease), visibility 0s linear var(--t-mid);
}
.lb.is-open { opacity: 1; visibility: visible; transition: opacity var(--t-mid) var(--ease), visibility 0s; }
.lb__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem clamp(0.9rem, 3vw, 1.6rem);
}
.lb__count { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.18em; color: rgba(242, 239, 230, 0.55); }
.lb__count b { color: var(--lb-paper); font-weight: 500; }

/* Chrome: hairline circles, quiet until you reach for them */
.lb button {
  display: grid; place-items: center; cursor: pointer;
  width: 2.6rem; height: 2.6rem; border-radius: 50%; padding: 0;
  background: none; border: 1px solid rgba(242, 239, 230, 0.22);
  color: var(--lb-paper); font-family: var(--font-mono); font-size: 1rem; line-height: 1;
  transition: background var(--t-quick) var(--ease), border-color var(--t-quick) var(--ease), transform var(--t-quick) var(--ease-spring);
}
.lb button:hover, .lb button:focus-visible { background: rgba(242, 239, 230, 0.12); border-color: rgba(242, 239, 230, 0.5); }
.lb button:active { transform: scale(0.92); }
.lb button:focus-visible { outline: 2px solid var(--lb-accent); outline-offset: 3px; }
.lb button[disabled] { opacity: 0.25; cursor: default; }
.lb button[disabled]:hover { background: none; border-color: rgba(242, 239, 230, 0.22); }

.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; }
.lb__nav:active { transform: translateY(-50%) scale(0.92); }
.lb__nav--prev { left: clamp(0.4rem, 2vw, 1.5rem); }
.lb__nav--next { right: clamp(0.4rem, 2vw, 1.5rem); }
/* On a phone, swipe is the interaction — the arrows would only crowd the print.
   Needs .lb .lb__nav to outweigh the .lb button display rule above. */
@media (max-width: 640px) {
  .lb .lb__nav { display: none; }
  .lb .lb__stage { padding-inline: 0.75rem; }
}

.lb__stage {
  position: relative; overflow: auto; overscroll-behavior: contain;
  display: grid; place-items: center;
  padding-inline: clamp(0.5rem, 10vw, 5rem);
  touch-action: pan-y pinch-zoom;
}
.lb__img {
  display: block; width: auto; height: auto;
  max-width: min(1600px, 100%); max-height: 100%;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none;
  transition: opacity var(--t-quick) var(--ease), transform var(--t-quick) var(--ease);
}
/* Full-page screenshots keep their length and scroll, the way opening the
   file used to let you. Everything else fits the frame. */
.lb__stage.is-tall { align-items: start; }
.lb__stage.is-tall .lb__img { max-height: none; max-width: min(1100px, 100%); }
.lb.is-dragging .lb__img { transition: none; }
.lb.is-swapping .lb__img { opacity: 0; }

.lb__caption {
  width: min(70rem, 100% - 2 * clamp(0.9rem, 3vw, 1.6rem)); margin-inline: auto;
  display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: baseline;
  padding-block: 0.9rem clamp(1rem, 3vw, 1.5rem);
  min-height: 3.6rem;
}
.lb__no { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em; color: var(--lb-accent); }
.lb__text { color: rgba(242, 239, 230, 0.72); font-size: 0.95rem; line-height: 1.5; margin: 0; }
.lb__text strong { color: var(--lb-paper); font-weight: 600; }
.lb__hint { display: block; margin-top: 0.35rem; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(242, 239, 230, 0.35); }

body.lb-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .lb, .lb__img, .lb button { transition: none; }
}

/* Utility */
.muted { color: var(--ink-dim); }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
