/* S GABY — Fourteen Paintings · The White Gallery */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --paper:      #FAF7F2;
  --paper-deep: #F1EBE1;
  --ink:        #201D18;
  --ink-soft:   #6B6357;
  --hairline:   #DFD8CC;
  --canvas-shadow: 0 24px 48px -24px rgba(32, 27, 18, 0.28);
  --canvas-shadow-deep: 0 32px 64px -26px rgba(32, 27, 18, 0.40);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --gap: 24px;
  --block-space: clamp(120px, 18vh, 220px);
  --room-space: clamp(140px, 28vh, 320px);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: var(--paper);
  color-scheme: light;
}
html, body { overflow-x: clip; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

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

::selection { background: var(--ink); color: var(--paper); }
figure.work ::selection { background: var(--accent-ink); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.svg-defs { position: absolute; width: 0; height: 0; }

.skip-link {
  position: fixed;
  left: -9999px;
  top: 16px;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  padding: 10px 18px;
  text-decoration: none;
}
.skip-link:focus-visible {
  left: 16px;
  outline-color: var(--ink);
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 6vw, 96px);
}

/* ---------- Type roles ---------- */
.wordmark {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.entry-line {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-variation-settings: "opsz" 144;
  font-size: clamp(44px, 6.5vw, 92px);
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
}

.entry-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 34ch;
  margin-top: 28px;
}

.room-heading {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.1;
  color: var(--ink);
  margin-top: 14px;
}

.room-intro {
  color: var(--ink-soft);
  margin-top: 16px;
  max-width: 46ch;
}

.room-rule {
  width: 64px;
  height: 1px;
  background: var(--hairline);
  margin-top: 28px;
}

/* ---------- Header ---------- */
.site-header { padding-block: 30px 10px; }
.header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.header-link {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 14px 2px;
}
.header-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Hero ---------- */
.hero-grid { display: block; }

.hero-copy { padding-block: 40px 8px; }

.scroll-cue {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 56px;
  text-decoration: none;
  padding: 4px;
}
.scroll-cue .eyebrow { transition: color 200ms var(--ease); }
.scroll-cue:hover .eyebrow { color: var(--ink); }
.cue-rule {
  width: 1px;
  height: 48px;
  background: var(--hairline);
}

.hero-figure { margin-top: 48px; }
.hero-figure img {
  width: min(86vw, 560px);
  box-shadow: var(--canvas-shadow);
}

/* ---------- Figures & placards ---------- */
.work-link {
  display: block;
  width: fit-content;
  position: relative;
  cursor: zoom-in;
  text-decoration: none;
}
.work-link img {
  position: relative;
  z-index: 1;
  box-shadow: var(--canvas-shadow);
  transition: box-shadow 200ms var(--ease);
}
.work:has(.work-link:hover) .work-link img,
.work:has(.work-link:focus-visible) .work-link img {
  box-shadow: var(--canvas-shadow-deep);
}

/* the quiet signature: wall takes the color */
.work-link::before {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%,
              color-mix(in srgb, var(--accent) var(--halo, 7%), transparent) 0%,
              transparent 100%);
  opacity: 0;
  transition: opacity 600ms ease;
}
.wall-block.lit .work-link::before {
  opacity: 1;
  transition: opacity 900ms ease;
}

.placard {
  margin-top: 22px;
  max-width: 340px;
}
.placard::before {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  background: var(--accent, var(--hairline));
  margin-bottom: 14px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 500ms var(--ease);
}
.wall-block.lit .placard::before {
  transform: scaleX(1);
  transition: transform 500ms var(--ease) 150ms;
}

.placard-no {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
}
.placard-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 23px;
  line-height: 1.25;
  color: var(--ink);
  margin-top: 6px;
  text-decoration-line: none;
  text-decoration-color: var(--accent-ink);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.work:has(.work-link:hover) .placard-title,
.work:has(.work-link:focus-visible) .placard-title {
  text-decoration-line: underline;
}
.placard-coll {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 8px;
}
.placard-note {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-top: 12px;
}
.placard-center {
  margin-inline: auto;
  text-align: center;
}
.placard-center::before { margin-inline: auto; }

/* ---------- Rooms & rhythm ---------- */
.room-header {
  padding-top: var(--room-space);
  padding-bottom: calc(var(--block-space) * 0.55);
}
#room-1 .room-header { padding-top: calc(var(--room-space) * 0.72); }

.wall-deep {
  background: var(--paper-deep);
  border-top: 1px solid var(--hairline);
}
#room-3 { border-top: 1px solid var(--hairline); }

.hang {
  margin-bottom: var(--block-space);
  min-height: 60vh;
}
.hang-small { margin-block: calc(var(--block-space) * 1.25); }

.hang img { box-shadow: var(--canvas-shadow); }

.closing-line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(24px, 2.6vw, 34px);
  color: var(--ink);
  text-align: center;
  padding-block: calc(var(--block-space) * 0.4) var(--block-space);
  text-wrap: balance;
}

/* room sections close with breathing space */
.room > .container { padding-bottom: 4vh; }

/* anchor offsets */
figure.work, section { scroll-margin-top: 48px; }

/* belt and braces with the width/height attributes: zero CLS */
#work-bouquet img          { aspect-ratio: 1432 / 1800; }
#work-lemons img           { aspect-ratio: 1422 / 1800; }
#work-peaches img          { aspect-ratio: 1381 / 1362; }
#work-black-eyed-susan img { aspect-ratio: 1792 / 1800; }
#work-zinnia img           { aspect-ratio: 1800 / 1421; }
#work-harvest img          { aspect-ratio: 1800 / 1798; }
#work-pumpkin-garden img   { aspect-ratio: 1751 / 1800; }
#work-roses-berries img    { aspect-ratio: 1170 / 1146; }
#work-bee-eaters img       { aspect-ratio: 1205 / 1458; }
#work-bluebird img         { aspect-ratio: 782 / 808; }
#work-warbler img          { aspect-ratio: 1073 / 794; }
#work-fawn img             { aspect-ratio: 1350 / 1800; }
#work-golden-fields img    { aspect-ratio: 1800 / 1444; }
#work-tower-one img        { aspect-ratio: 1368 / 1800; }

/* ---------- Mobile-first hang (single column) ---------- */
.work-link { margin-inline: auto; }
.hang .work-link img,
.pair .work-link img {
  width: min(86vw, 100%);
  margin-inline: auto;
}
/* portraits always fully visible */
#work-lemons img, #work-bee-eaters img, #work-fawn img, #work-tower-one img {
  max-height: 70vh;
  width: auto;
}
/* landscapes full width on mobile */
#work-zinnia img, #work-golden-fields img { width: 100%; }
/* small works stay small — curated */
#work-bluebird img { width: min(70vw, 360px); }
#work-warbler img { width: min(80vw, 480px); }
#work-roses-berries img { width: min(86vw, 520px); }

.pair figure { margin-bottom: calc(var(--block-space) * 0.7); }
.pair figure:last-child { margin-bottom: 0; }
.hang-small figure .placard { margin-inline: auto; }
.hang-small .work-link { margin-inline: auto; }

/* ---------- Desktop hang geometry (12-col) ---------- */
@media (min-width: 1000px) {
  .hero-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gap);
    align-items: center;
    min-height: calc(100vh - 120px);
  }
  .hero-copy { grid-column: 1 / 7; padding-block: 0; }
  .hero-figure {
    grid-column: 7 / 13;
    margin-top: 0;
    align-self: start;
    padding-top: 2vh;
  }
  .hero-figure img { width: auto; max-width: min(38vw, 560px); max-height: 76vh; }
  .hero-figure .placard { margin-top: 26px; }

  .hang {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gap);
    align-items: start;
  }
  .hang .work-link { margin-inline: 0; }
  .hang .work-link img { width: auto; margin-inline: 0; }

  /* pairs: figures dissolve into the shared grid, canvases share a hang line */
  .pair figure { display: contents; }
  .pair figure:first-of-type .work-link { grid-column: 1 / 7; grid-row: 1; align-self: center; justify-self: center; }
  .pair figure:last-of-type  .work-link { grid-column: 7 / 13; grid-row: 1; align-self: center; justify-self: center; }
  .pair figure:first-of-type .placard   { grid-column: 1 / 7; grid-row: 2; justify-self: center; width: 100%; max-width: 380px; }
  .pair figure:last-of-type  .placard   { grid-column: 7 / 13; grid-row: 2; justify-self: center; width: 100%; max-width: 380px; }
  .pair .work-link img { width: 100%; max-width: 100%; }

  /* № 02 lemons — solo portrait, label beside */
  .hang-lemons .work-link { grid-column: 1 / 8; grid-row: 1; }
  .hang-lemons .work-link img { max-height: 78vh; width: auto; max-width: 100%; }
  .hang-lemons .placard { grid-column: 8 / 13; grid-row: 1; align-self: end; margin-top: 0; }

  /* № 05 zinnia — solo landscape */
  .hang-zinnia .work-link { grid-column: 3 / 12; grid-row: 1; }
  .hang-zinnia .work-link img { width: 100%; }
  .hang-zinnia .placard { grid-column: 3 / 7; grid-row: 2; }

  /* № 08 roses & berries — the framed object, modest scale */
  .hang-roses { align-items: end; }
  .hang-roses .work-link { grid-column: 4 / 10; grid-row: 1; justify-self: center; }
  .hang-roses .work-link img { width: 100%; max-width: 520px; }
  .hang-roses .placard { grid-column: 10 / 13; grid-row: 1; align-self: end; margin-top: 0; }

  /* № 09 bee-eaters — right side, label left */
  .hang-bee-eaters .placard { grid-column: 1 / 6; grid-row: 1; align-self: end; margin-top: 0; }
  .hang-bee-eaters .work-link { grid-column: 6 / 13; grid-row: 1; justify-self: end; }
  .hang-bee-eaters .work-link img { max-height: 78vh; width: auto; max-width: 100%; }

  /* № 10 + № 11 — the small-works wall */
  .hang-small figure:first-of-type .work-link { grid-column: 2 / 6; }
  .hang-small figure:last-of-type  .work-link { grid-column: 7 / 12; }
  .hang-small figure:first-of-type .work-link img { width: auto; max-width: 360px; }
  .hang-small figure:last-of-type  .work-link img { width: auto; max-width: 480px; }
  .hang-small figure:first-of-type .placard { grid-column: 2 / 6; }
  .hang-small figure:last-of-type  .placard { grid-column: 7 / 12; }
  .hang-small figure:first-of-type .placard,
  .hang-small figure:last-of-type  .placard { max-width: 320px; }

  /* № 12 fawn */
  .hang-fawn .work-link { grid-column: 2 / 9; grid-row: 1; justify-self: center; }
  .hang-fawn .work-link img { max-height: 78vh; width: auto; max-width: 100%; }
  .hang-fawn .placard { grid-column: 9 / 13; grid-row: 1; align-self: end; margin-top: 0; }

  /* № 13 golden fields — widest moment */
  .hang-fields .work-link { grid-column: 1 / 13; grid-row: 1; justify-self: center; }
  .hang-fields .work-link img { width: 100%; max-width: 1100px; }
  .hang-fields .placard { grid-column: 1 / 6; grid-row: 2; }

  /* № 14 tower one — the closing wall */
  .hang-tower .work-link { grid-column: 4 / 10; grid-row: 1; justify-self: center; }
  .hang-tower .work-link img { max-height: 80vh; width: auto; max-width: 100%; }
  .hang-tower .placard { grid-column: 4 / 10; grid-row: 2; justify-self: center; }

  /* № 15 red canoe — landscape room addition */
  .hang-canoe .work-link { grid-column: 1 / 13; grid-row: 1; justify-self: center; }
  .hang-canoe .work-link img { width: 100%; max-width: 800px; }
  .hang-canoe .placard { grid-column: 1 / 13; grid-row: 2; justify-self: center; }

  /* № 18 autumn berries — floral portrait */
  .hang-berries .work-link { grid-column: 2 / 9; grid-row: 1; justify-self: center; }
  .hang-berries .work-link img { max-height: 78vh; width: auto; max-width: 100%; }
  .hang-berries .placard { grid-column: 9 / 13; grid-row: 1; align-self: end; margin-top: 0; }

  /* № 19 black cat — portrait creature */
  .hang-cat .work-link { grid-column: 4 / 10; grid-row: 1; justify-self: center; }
  .hang-cat .work-link img { max-height: 80vh; width: auto; max-width: 100%; }
  .hang-cat .placard { grid-column: 4 / 10; grid-row: 2; justify-self: center; }
}

/* ---------- Signed ---------- */
.signed .container {
  padding-block: calc(var(--block-space) * 0.8);
  text-align: center;
}
.section-eyebrow { display: block; }
.signed-text {
  max-width: 560px;
  margin: 28px auto 0;
  color: var(--ink);
}
.signature-figure {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.signature-figure img {
  width: 180px;
  aspect-ratio: 414 / 163;
  box-shadow: 0 12px 24px -12px rgba(32, 27, 18, 0.14);
}
.signature-caption {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
}
.honesty-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 36px;
}

/* ---------- Footer / index ---------- */
.site-footer { border-top: none; }
.site-footer .container {
  padding-block: calc(var(--block-space) * 0.5) 72px;
  border-top: 1px solid var(--hairline);
}
.site-footer .section-eyebrow { padding-top: 24px; }

.daub-index {
  list-style: none;
  margin-top: 29px;
  columns: 1;
  column-gap: 64px;
}
@media (min-width: 700px) {
  .daub-index { columns: 2; }
}
.daub-index li {
  break-inside: avoid;
  margin-bottom: 0;
}
.daub-index a {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--ink);
  padding: 9px 4px;
  width: fit-content;
}
.daub {
  flex: none;
  width: 18px;
  height: 15px;
}
.daub.r1 { transform: rotate(140deg); }
.daub.r2 { transform: rotate(-70deg); }
.daub.r3 { transform: rotate(40deg); }
.daub.r4 { transform: rotate(200deg); }
.daub.r5 { transform: rotate(-25deg); }
/* the blob silhouette rotates; the wet-paint gleam keeps one light source (top-left) */
.daub ellipse { transform-box: view-box; transform-origin: center; }
.daub.r1 ellipse { transform: rotate(-140deg); }
.daub.r2 ellipse { transform: rotate(70deg); }
.daub.r3 ellipse { transform: rotate(-40deg); }
.daub.r4 ellipse { transform: rotate(-200deg); }
.daub.r5 ellipse { transform: rotate(25deg); }
.daub-label {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  line-height: 1.4;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}
.daub-index a:hover .daub-label,
.daub-index a:focus-visible .daub-label {
  text-decoration: underline;
  text-decoration-color: var(--accent-ink);
}
.footer-line {
  margin-top: 48px;
  color: var(--ink);
}
.colophon {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 10px;
}

/* ---------- Viewer (lightbox) ---------- */
.viewer {
  border: 0;
  padding: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  background: var(--paper-deep);
  color: var(--ink);
  overflow: hidden;
}
.viewer::backdrop { background: transparent; }

html.viewer-open { overflow: hidden; }

.viewer[open] { opacity: 0; }
.viewer[open].is-open { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .viewer[open] { transition: opacity 250ms var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  .viewer[open] { transition: opacity 150ms linear; }
}

.viewer-chrome-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
}
.viewer-counter {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  padding-left: 8px;
}
.viewer-close,
.viewer-nav {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.viewer-close:hover, .viewer-nav:hover { color: var(--ink); background: rgba(32, 29, 24, 0.06); }

.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
}
.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }

.nav-hint {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}
.viewer-prev .nav-hint { left: calc(100% + 6px); }
.viewer-next .nav-hint { right: calc(100% + 6px); }
.viewer-nav:hover .nav-hint,
.viewer-nav:focus-visible .nav-hint { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .nav-hint { transition: opacity 200ms var(--ease); }
}
@media (max-width: 760px) {
  .nav-hint { display: none; }
}

.viewer-main {
  position: absolute;
  inset: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .viewer-main { transition: opacity 100ms linear; }
}
.viewer-main.swapping { opacity: 0; }

.viewer-stage-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 96px 176px;
}
.viewer-stage { position: relative; }
.stage-base {
  max-height: min(78vh, 100%);
  max-width: min(88vw, 1400px);
  width: auto;
  height: auto;
  box-shadow: var(--canvas-shadow-deep);
}
.viewer-stage-wrap .stage-base { max-height: calc(100dvh - 236px); }
.viewer[data-slug="bluebird"] .stage-base { max-width: 391px; }
.viewer[data-slug="warbler"] .stage-base { max-width: 536px; }
.stage-full {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
}
.stage-full.on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .stage-full { transition: opacity 200ms linear; }
}

.viewer-placard {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 16px;
  z-index: 5;
}
.viewer-no {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent-ink, var(--ink-soft));
}
.viewer-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  color: var(--ink);
  margin-top: 2px;
}
.viewer-coll {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}
.viewer-note {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-top: 6px;
  max-width: 56ch;
}

/* the palette dab row — the overt signature moment */
.dab-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 14px;
}
.dab-row li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.dab-blob { width: 26px; height: 21px; flex: none; }
.dab-word {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) {
  .viewer.dabs-live .dab-row li {
    animation: dab-press 160ms var(--ease) both;
    animation-delay: calc(var(--dab-base, 350ms) + var(--i) * 60ms);
  }
}
@keyframes dab-press {
  0%   { transform: scale(0) rotate(var(--r0, -4deg)); }
  70%  { transform: scale(1.06) rotate(var(--r1, 2deg)); }
  100% { transform: none; }
}

.viewer-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  z-index: 7;
  background: var(--ink-soft);
}
@media (prefers-reduced-motion: no-preference) {
  .viewer-progress { transition: width 300ms var(--ease); }
}

/* viewer — mobile */
@media (max-width: 760px) {
  .viewer-stage-wrap {
    position: static;
    padding: 68px 16px 0;
    min-height: 52dvh;
  }
  .viewer-main {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .stage-base { max-width: calc(100vw - 32px); max-height: 52dvh; }
  .viewer-stage-wrap .stage-base { max-height: 52dvh; }
  .viewer[data-slug="bluebird"] .stage-base { max-width: min(391px, calc(100vw - 32px)); }
  .viewer[data-slug="warbler"] .stage-base { max-width: min(536px, calc(100vw - 32px)); }
  .viewer-placard {
    position: static;
    padding: 22px 20px 40px;
  }
  .viewer-nav { top: 34dvh; background: rgba(241, 235, 225, 0.9); }
  .viewer-prev { left: 4px; }
  .viewer-next { right: 4px; }
}

/* ---------- Entry choreography & scroll reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-figure .work-link { animation: settle 700ms var(--ease) 250ms backwards; }
  .hero-figure .placard   { animation: settle 700ms var(--ease) 450ms backwards; }
  @keyframes settle {
    from { opacity: 0; transform: translateY(8px); }
  }

  html.js .reveal {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 650ms var(--ease), transform 650ms var(--ease);
  }
  html.js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Reduced motion: everything present, nothing animates ---------- */
@media (prefers-reduced-motion: reduce) {
  .work-link::before { opacity: 1 !important; transition: none !important; }
  .placard::before { transform: none !important; transition: none !important; }
  .work-link img { transition: none !important; }
  .viewer-main { transition: none !important; }
  .viewer-progress { transition: none !important; }
}
