/* ==========================================================================
   SITE — base voice, masthead, shared interface elements.
   Chapter layouts live in chapters.css. Tokens come from tokens.css.

   Breakpoints (restated from tokens.css): sm 480 · md 768 · lg 1024 · xl 1440
   ========================================================================== */

/* DejaVu Sans Mono — the measuring voice. Freely licensed, self-hosted. */
@font-face {
  font-family: "DejaVu Sans Mono";
  src: url("../fonts/dejavu-sans-mono/dejavu-sans-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Sans Mono";
  src: url("../fonts/dejavu-sans-mono/dejavu-sans-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }

/* No CSS smooth scrolling: it turns every programmatic scrollTop into an
 * animation, which fights ScrollTrigger's pin refresh and drifts the page.
 * Anchor navigation is smoothed in JS instead, where motion can be gated. */
html {
  -webkit-text-size-adjust: 100%;
}

/* Interface tokens that extend the transcribed brand set. One radius for
 * every photographic and rendered image on the page — subtle enough to
 * disappear at page scale. UI elements (lines, tabs, buttons, markers,
 * metadata) stay sharp; the contrast is intentional. */
:root {
  --image-radius: 10px;
  /* The closing field: a deep technical blue, one step above black. The only
   * surface on the page that is neither a brand neutral nor the signal. */
  --color-deep: #0B111F;
  /* Pale mineral sand: derived from the approved brand pair (sand over
   * off-white), never an invented beige — the quiet environmental tone of
   * the system chapters. */
  --surface-sand: color-mix(in srgb, var(--color-sand) 30%, var(--color-off-white));
}

/* Screen-reader-only text (hotspot button descriptions). */
.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Standalone imagery: the same corner everywhere. */
.making__item img,
.archive__grid img,
.beyond__row img,
.series__figure img,
.ownership__figure img,
.setting__figure img,
.setting__aside img,
.evolution__figure img,
.series-dialog__grid img {
  border-radius: var(--image-radius);
}

/* Animated image containers: the radius clips the container, so zooms,
 * crossfades, scrubs and rotations never escape the corner. The hero is
 * deliberately absent — it runs to the viewport edge. */
.inspect,
.object__crop,
.nature__stage,
.anatomy__stage,
.blueprint__stage,
.panel__media {
  border-radius: var(--image-radius);
  overflow: hidden;
}

/* The page never scrolls sideways: `clip` (not `hidden`) cuts horizontal
 * ink overflow at the viewport without creating a scroll container, so
 * sticky and pinned elements keep working. The `hidden` line is the
 * fallback for engines without `clip`. */
html, body { overflow-x: hidden; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--type-base);
  line-height: 1.45;
  font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
dl, dt, dd, ul, ol, p, h1, h2, h3 { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

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

::selection { background: var(--signal); color: var(--color-off-white); }

/* --- the measuring voice ------------------------------------------------- */

.mono {
  font-family: var(--font-mono);
  font-size: var(--mono-size);
  letter-spacing: var(--mono-tracking);
  text-transform: var(--mono-transform);
  font-weight: 400;
  line-height: 1.6;
}

/* --- shared layout ------------------------------------------------------- */

.shell {
  width: min(100% - clamp(32px, 6vw, 112px), 1520px);
  margin-inline: auto;
}

.chapter { padding-block: clamp(88px, 12vh, 160px); }

.chapter--ink {
  background: var(--color-ink);
  color: var(--color-off-white);
  --line: color-mix(in srgb, #F8F7F6 22%, transparent);
}
.chapter--mist { background: var(--surface); }

/* --- typography ---------------------------------------------------------- */

.statement {
  font-weight: 400;
  font-size: clamp(1.8rem, 1.05rem + 2.85vw, 3.4rem);
  line-height: 1.0;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 14em;
}

.statement--lg {
  font-size: clamp(2.25rem, 1.15rem + 4.3vw, 5.05rem);
  max-width: 11em;
}

.prose {
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.3rem);
  line-height: 1.5;
  max-width: 34em;
  color: var(--ink-70);
}
.chapter--ink .prose { color: color-mix(in srgb, #F8F7F6 72%, var(--color-ink)); }

.prose--ledger { line-height: 1.7; }

/* --- chapter marker ------------------------------------------------------ */

.marker {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 6vh, 72px);
  color: var(--ink-70);
}
.chapter--ink .marker { color: color-mix(in srgb, #F8F7F6 65%, var(--color-ink)); }
.marker > span:first-child {
  font-weight: 700;
  color: var(--signal);
}

/* --- dots, buttons, callouts --------------------------------------------- */

.dot {
  display: inline-block;
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--ink-28);
  margin-inline-end: var(--space-2);
  vertical-align: 1px;
}
.dot--active { background: var(--signal); }

.button {
  display: inline-block;
  padding: 14px 22px 12px;
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
  text-decoration: none;
  transition: background var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard);
}
.button:hover { background: var(--text); color: var(--canvas); }

/* The series entry: the same button voice, one step louder. */
.button--series {
  font-size: 0.75rem;
  padding: 17px 30px 15px;
}

/* --- horizontal gallery ---------------------------------------------------
 * A documentation carousel: native scroll-snap does the motion (so touch
 * swipe is free); the controls live INSIDE the image so photograph and
 * navigation read as one product-photography module. */
.carousel { position: relative; }
.carousel__viewport {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--image-radius);
  overscroll-behavior-x: contain;
}
.carousel__viewport::-webkit-scrollbar { display: none; }
.carousel__viewport:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.carousel__slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.carousel__slide img { inline-size: 100%; border-radius: 0; }

/* Edge controls: small translucent instruments, vertically centred, slightly
 * inset — legible over light and dark photography without shouting. */
.carousel__arrow {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  inline-size: 38px;
  block-size: 38px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--color-ink) 18%, transparent);
  background: var(--color-off-white);
  color: var(--text);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--color-ink) 10%, transparent);
  transition: background var(--dur-fast) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard),
              opacity var(--dur-base) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
}
.carousel__arrow svg { transition: translate var(--dur-fast) var(--ease-standard); }
.carousel__arrow--prev { left: 14px; }
.carousel__arrow--next { right: 14px; }
/* Hover: a fast, precise acknowledgement — slight growth, firmer border,
 * the arrow leaning a pixel into its direction. */
.carousel__arrow:hover:not(:disabled) {
  background: var(--canvas);
  border-color: var(--ink-45);
  transform: scale(1.06);
}
.carousel__arrow--prev:hover:not(:disabled) svg { translate: -1.5px 0; }
.carousel__arrow--next:hover:not(:disabled) svg { translate: 1.5px 0; }
.carousel__arrow:disabled { opacity: 0.22; cursor: default; }
html.reduced-motion .carousel__arrow,
html.reduced-motion .carousel__arrow svg { transition: none; }
/* The touch target extends past the drawn circle. */
.carousel__arrow::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
}

/* Pagination inside the image, bottom centre: tiny dots plus the record
 * count in one quiet chip. */
.carousel__pager {
  position: absolute;
  bottom: 14px;
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 7px 12px 5px;
  border-radius: 999px;
  border: 1px solid var(--ink-14);
  background: color-mix(in srgb, var(--canvas) 62%, transparent);
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.carousel__dots {
  display: flex;
  gap: 7px;
  align-items: center;
}
.carousel__dots li {
  inline-size: 4px;
  block-size: 4px;
  border-radius: 50%;
  background: var(--ink-28);
  transition: background var(--dur-base) var(--ease-standard),
              transform var(--dur-base) var(--ease-standard);
}
.carousel__dots li.is-active {
  background: var(--signal);
  transform: scale(1.4);
}
.carousel__count { color: var(--ink-70); }

/* Measurement callouts over evidence imagery. Anchored by --x/--y fractions
   of the figure; the hairline runs from the label toward the anchor. */
.callout {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  color: var(--text);
  padding: 5px 8px 3px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.callout i {
  display: inline-block;
  inline-size: 6px;
  block-size: 6px;
  border: 1px solid var(--signal);
  border-radius: 50%;
  margin-inline-end: 6px;
  vertical-align: 1px;
}

/* One instrumentation pulse for every inspection point on the page — a
 * single slow tempo so no two markers ever pulse at different speeds. The
 * inner ring breathes in place; the outer ring expands and dissolves like a
 * very patient sonar. Radar patience, not notification. */
@keyframes pulse-breathe {
  0%, 100% { opacity: 0.12; transform: scale(0.96); }
  50%      { opacity: 0.30; transform: scale(1); }
}
@keyframes pulse-sonar {
  0%       { opacity: 0.28; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.32); }
}
/* The hero's even quieter variant: a ~7px breath once every few seconds,
 * almost invisible unless you are looking for it. */
@keyframes pulse-sonar-quiet {
  0%       { opacity: 0.2; transform: scale(1); }
  55%, 100% { opacity: 0; transform: scale(1.16); }
}

/* Zoom frame: clips a subtle pointer-driven scale so imagery feels tactile
 * without shifting layout. */
.zoomframe {
  border-radius: var(--image-radius);
  overflow: hidden;
}
.zoomframe img { transition: transform 900ms var(--ease-standard); }
@media (hover: hover) and (pointer: fine) {
  .making__item:hover .zoomframe img,
  .archive figure:hover .zoomframe img { transform: scale(1.015); }
  .archive figure:hover figcaption { color: var(--ink-70); }
}
html.reduced-motion .zoomframe img { transition: none; }

/* Registered frame: crop marks in the corners, an archival plate. */
.frame-registered { position: relative; }
.frame-registered::before,
.frame-registered::after {
  content: "";
  position: absolute;
  inline-size: 14px;
  block-size: 14px;
  pointer-events: none;
}
.frame-registered::before {
  top: -7px; left: -7px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.frame-registered::after {
  bottom: -7px; right: -7px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

/* --- skip + masthead ------------------------------------------------------ */

.skip {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 40;
  padding: 10px 14px;
  background: var(--text);
  color: var(--canvas);
  text-decoration: none;
  translate: 0 -300%;
}
.skip:focus-visible { translate: 0 0; }

.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: 14px clamp(16px, 3vw, 56px);
  transition: background var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard);
}
.masthead.is-scrolled {
  background: color-mix(in srgb, var(--canvas) 92%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
}
.masthead__brand { display: block; }
.masthead__brand img { inline-size: clamp(96px, 9vw, 124px); block-size: auto; }

.masthead__nav {
  display: flex;
  gap: clamp(16px, 2.6vw, 40px);
}
.masthead__nav a {
  text-decoration: none;
  color: var(--ink-70);
  transition: color var(--dur-fast) var(--ease-standard);
}
.masthead__nav a:hover, .masthead__nav a.is-current { color: var(--text); }

.masthead__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.masthead__tick {
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--signal);
}

@media (max-width: 767px) {
  .masthead__nav { display: none; }
}

/* --- blueprint / anatomy detail panel ------------------------------------ */

/* Mobile-only scrim behind the component popup. */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 34;
  background: color-mix(in srgb, var(--color-ink) 38%, transparent);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-standard);
}
.scrim.is-open { opacity: 1; }
@media (min-width: 768px) {
  .scrim { display: none; }
}

/* A floating piece of documentation, not a web card: translucent warm
 * white with a soft blur, hairline border, quiet shadow. */
.panel {
  position: fixed;
  z-index: 35;
  background: color-mix(in srgb, var(--canvas) 80%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 14px;
  box-shadow: 0 14px 36px -16px color-mix(in srgb, var(--color-ink) 30%, transparent);
  opacity: 0;
  transition: translate 220ms var(--ease-enter),
              opacity 220ms var(--ease-enter);
  max-block-size: 86dvh;
  overflow: auto;
  overscroll-behavior: contain;
}
.panel.is-open { opacity: 1; }

/* Content crossfades while stepping between components; the footer with
 * the sequence controls stays put under the pointer. */
.panel__inner > :not(.panel__foot) {
  transition: opacity 150ms var(--ease-standard);
}
.panel.is-swapping .panel__inner > :not(.panel__foot) { opacity: 0; }

/* Mobile: ONE information layer for every technical popup — a near-
 * fullscreen sheet (94vw, up to the viewport minus a breathing edge),
 * rising gently from below over the dimmed page. The header row stays
 * sticky so the orange close is always reachable while content scrolls. */
@media (max-width: 767px) {
  .panel {
    inset: auto 3vw 10px 3vw;
    translate: 0 20px;
    border: 1px solid var(--line);
    border-radius: 16px 16px 14px 14px;
    max-block-size: calc(100dvh - 56px);
    box-shadow: none;
  }
  .panel.is-open { translate: 0 0; }
}

/* Header row: reference code left, close right. The × exists only on
 * mobile — desktop keeps the quiet footer close. */
.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}
.panel__x { display: none; }
@media (max-width: 767px) {
  .panel__head {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: calc(-1 * var(--space-6)) calc(-1 * var(--space-6)) 0;
    padding: 12px var(--space-6) 10px;
    background: var(--canvas);
    border-bottom: 1px solid var(--line);
  }
  .panel__x {
    display: grid;
    place-items: center;
    min-inline-size: 44px;
    min-block-size: 44px;
    margin: -6px -14px -6px 0;
    color: var(--signal);
    font-size: 0.85rem;
    transition: color var(--dur-fast) var(--ease-standard);
  }
  .panel__x:active { color: var(--color-ink); }
  /* The footer keeps only the sequence control; closing lives above. */
  .panel__foot .panel__close { display: none; }
  .panel__foot { justify-content: center; }
}

/* Background scroll locks while the mobile sheet is open; the page returns
 * to the exact position on close. */
html.panel-lock,
html.panel-lock body { overflow: hidden; }

/* Desktop + tablet: a compact technical annotation anchored to the LEFT —
 * instrumentation, not a modal. Every interactive figure (hero object,
 * exploded anatomy, blueprint) sits in the right column, so the panel reads
 * beside the evidence, never over it, and sits high enough that hotspot and
 * information feel like one gesture. */
@media (min-width: 768px) {
  .panel {
    inset: auto auto clamp(72px, 12vh, 132px) clamp(16px, 4vw, 64px);
    inline-size: min(320px, calc(100vw - 32px));
    border: 1px solid var(--line);
    translate: 0 12px;
  }
  .panel.is-open { translate: 0 0; }
  .panel__inner {
    padding: 20px 20px 24px;
    gap: var(--space-3);
  }
  .panel__title { font-size: var(--type-lg); }
  .panel__text { font-size: var(--type-sm); line-height: 1.5; }
}
/* Tablet and narrow desktop: the left column is narrower still — the panel
 * hugs the edge and slims so it can never reach the figure. */
@media (min-width: 768px) and (max-width: 1199px) {
  .panel {
    inset-inline-start: 16px;
    inline-size: min(300px, 38vw);
  }
}

/* Anatomy + blueprint panels dock at the figure's vertical centre on
 * desktop and tablet — a stable, predictable anchor beside the image,
 * physically associated with what is being inspected. */
@media (min-width: 768px) {
  .panel--dock {
    inset: 50% auto auto clamp(16px, 4vw, 64px);
    translate: 0 calc(-50% + 10px);
  }
  .panel--dock.is-open { translate: 0 -50%; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .panel--dock { inset-inline-start: 16px; }
}

/* The hero's annotation docks against the image column on wide screens:
 * vertically centred, its right edge held 28px off the media boundary, so
 * it reads as part of the composition — never over the product, and the
 * headline keeps its opening words. It arrives from slightly left/below. */
@media (min-width: 1200px) {
  .panel--hero {
    inset: 50% calc(56% + 28px) auto auto;
    translate: -14px calc(-50% + 10px);
  }
  .panel--hero.is-open { translate: 0 -50%; }
}

/* Markers in one group share the pulse tempo but not the phase — a quiet
 * offset keeps the field of instruments from blinking in unison. */
[data-spot-group] .mark:nth-child(3n+2) .mark__pulse::before,
[data-spot-group] .mark:nth-child(3n+2) .mark__pulse::after { animation-delay: 1.05s; }
[data-spot-group] .mark:nth-child(3n) .mark__pulse::before,
[data-spot-group] .mark:nth-child(3n) .mark__pulse::after { animation-delay: 2.1s; }

.panel__inner {
  padding: var(--space-6) var(--space-6) var(--space-8);
  display: grid;
  gap: var(--space-3);
}

/* The 4:5 component plate: the technical drawing almost becomes part of
 * the sheet — hairline frame only, no registration chrome, and a barely
 * perceptible settle-in (1.5% zoom) as the panel opens. The mono span is
 * the fallback for any spot without a plate. */
.panel__media img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  background: #fff;
  opacity: 0;
  transform: scale(1);
  transition: opacity 260ms var(--ease-standard) 70ms,
              transform 700ms var(--ease-standard) 70ms;
}
.panel.is-open .panel__media img {
  opacity: 1;
  transform: scale(1.015);
}
html.reduced-motion .panel__media img {
  transition: none;
  opacity: 1;
  transform: none;
}
.panel__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: color-mix(in srgb, #ffffff 55%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--ink-45);
  margin-block: var(--space-2);
}
.panel__ref { color: var(--ink-45); }
.panel__title { font-weight: 400; font-size: var(--type-xl); line-height: 1.1; }
.panel__text { color: var(--ink-70); max-width: 40em; }
.panel__meta {
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
}
.panel__meta div { display: flex; justify-content: space-between; gap: var(--space-4); }
.panel__meta dt { color: var(--ink-45); }
/* The sequence footer: prev / index / next on the left, close on the right —
 * one quiet row, so a whole hotspot group reads without hunting markers. */
.panel__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
}
.panel__nav {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-45);
}
.panel__step {
  padding: 6px 8px 4px;
  color: var(--ink-70);
  transition: color var(--dur-fast) var(--ease-standard);
}
.panel__step:hover { color: var(--signal); }

/* The close control is orange — the action colour — but stays text-scale:
 * flat, no shadow, no block. */
.panel__close {
  background: transparent;
  color: var(--signal);
  font-weight: 700;
  padding: 8px 10px 6px;
  transition: color var(--dur-fast) var(--ease-standard);
}
.panel__close:hover { color: var(--color-ink); }

/* (Mobile closing moved to the sticky header's orange ×.) */

/* --- series overlay ------------------------------------------------------- */

.series-dialog {
  inline-size: 100vw;
  block-size: 100dvh;
  max-inline-size: none;
  max-block-size: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--canvas);
  color: var(--text);
}
.series-dialog::backdrop { background: color-mix(in srgb, var(--color-ink) 40%, transparent); }

/* The index is RELEASED from underneath the masthead: the sheet starts
 * held (clipped shut, 24px high), then reveals downward; the grid follows
 * a beat later. Closing runs the same mechanics in reverse. Transform,
 * opacity and clip-path only. */
.series-dialog.is-animated {
  opacity: 0;
  translate: 0 -24px;
  clip-path: inset(0 0 100% 0);
  transition: opacity 420ms var(--ease-standard),
              translate 560ms var(--ease-enter),
              clip-path 560ms var(--ease-enter);
}
.series-dialog.is-animated .series-dialog__grid,
.series-dialog.is-animated .series-dialog__foot {
  opacity: 0;
  translate: 0 -14px;
  transition: opacity 420ms var(--ease-standard) 90ms,
              translate 520ms var(--ease-enter) 90ms;
}
.series-dialog.is-animated.is-open {
  opacity: 1;
  translate: 0 0;
  clip-path: inset(0 0 0 0);
}
.series-dialog.is-animated.is-open .series-dialog__grid,
.series-dialog.is-animated.is-open .series-dialog__foot {
  opacity: 1;
  translate: 0 0;
}
html.reduced-motion .series-dialog.is-animated,
html.reduced-motion .series-dialog.is-animated .series-dialog__grid,
html.reduced-motion .series-dialog.is-animated .series-dialog__foot {
  transition: none;
}

/* The triggers acknowledge the press. (button--series keeps its inherited
 * background/colour transitions alongside the new transform.) */
.masthead__all { transition: transform var(--dur-fast) var(--ease-standard); }
.button--series {
  transition: background var(--dur-fast) var(--ease-standard),
              color var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard);
}
.masthead__all:active,
.button--series:active { transform: scale(0.97); }

.series-dialog__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px clamp(16px, 3vw, 56px);
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.series-dialog__bar > .mono span { color: var(--ink-45); }
.series-dialog__close {
  background: var(--signal);
  color: var(--color-off-white);
  padding: 10px 16px 8px;
  transition: background var(--dur-fast) var(--ease-standard);
}
.series-dialog__close:hover { background: var(--color-ink); color: var(--color-off-white); }

.series-dialog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: clamp(24px, 3vw, 48px);
  padding: clamp(24px, 4vh, 56px) clamp(16px, 3vw, 56px);
}
.series-dialog__grid figure img {
  background: var(--surface);
  transition: opacity var(--dur-fast) var(--ease-standard);
}
.series-dialog__grid figure:hover img { opacity: 0.94; }
.series-dialog__grid figcaption {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-3);
}
.series-dialog__name { font-size: var(--type-lg); font-weight: 400; }
.series-dialog__grid dl { display: grid; gap: 4px; color: var(--ink-70); }
.series-dialog__grid dl div { display: flex; gap: var(--space-3); }
.series-dialog__grid dt { inline-size: 76px; color: var(--ink-45); }

.series-dialog__foot {
  padding: 0 clamp(16px, 3vw, 56px) clamp(32px, 5vh, 64px);
  color: var(--ink-45);
}
.series-dialog__foot a { color: var(--ink-70); }

/* Mobile: the archive reads as a SERIES — two plates side by side, a
 * deliberate gutter, the record data trimmed to reference and status so
 * the grid stays calm. */
@media (max-width: 640px) {
  .series-dialog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 14px;
    padding: 20px 16px 32px;
  }
  .series-dialog__name { font-size: var(--type-base); }
  .series-dialog__grid dl div:nth-child(2),
  .series-dialog__grid dl div:nth-child(3) { display: none; }
  .series-dialog__grid dt { inline-size: 52px; }
}

/* --- reveals -------------------------------------------------------------- */

.reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 640ms var(--ease-enter), translate 640ms var(--ease-enter);
}
.reveal.is-visible { opacity: 1; translate: 0 0; }

/* Until JS runs — and whenever motion is reduced — everything is visible. */
html[data-js="false"] .reveal,
html.reduced-motion .reveal {
  opacity: 1;
  translate: 0 0;
  transition: none;
}

/* Footer styles live in chapters.css with the closing chapter. */
