/* =========================================================================
   BRB — Breaking Brands · demo design system
   Palette: paper white / baby pink / kraft / warm ink + cobalt accent
   Type: Fraunces (display) · Instrument Sans (body)
   ========================================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --paper: #FBF7F3;
  --paper-2: #FFFFFF;
  --pink: #F7C9DA;
  --pink-deep: #EFA9C2;
  --kraft: #C39B6E;
  --kraft-light: #D2AE85;
  --kraft-deep: #A67C52;
  --ink: #211B16;
  --ink-2: #17120E;
  --cobalt: #3B4FE0;
  --error: #B3261E;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  /* logo — condensed impact face, deliberately not the display serif */
  --font-logo: "Anton", Impact, "Arial Narrow", sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6.5rem;
  --section-pad: clamp(4.5rem, 11vh, 8.5rem);
  --bar-w: clamp(13.5rem, 19vw, 17rem); /* fixed left index bar */

  --radius-sharp: 2px;
  --radius-soft: 10px;

  --border-w: 2px;
  --shadow-hard: 5px 5px 0 var(--ink);
  --shadow-hard-sm: 3px 3px 0 var(--ink);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-med: 280ms;

  --header-h: 72px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
  -webkit-tap-highlight-color: rgba(247, 201, 218, 0.35);
}

@media (pointer: fine) {
  html { overscroll-behavior: none; }
}

img, svg, canvas { display: block; max-width: 100%; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

a { color: var(--accent, var(--cobalt)); text-underline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

::selection { background: var(--pink); color: var(--ink); }

h1, h2, h3, h4, h5, h6, section[id], [tabindex="-1"] {
  scroll-margin-top: calc(var(--header-h) + 1.25rem);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  z-index: 200;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: var(--radius-sharp);
}
.skip-link:focus-visible { top: var(--space-2); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}

/* all content lives to the right of the fixed index bar (desktop) */
@media (min-width: 961px) {
  .wrap {
    padding-left: max(clamp(1.25rem, 5vw, 4rem), calc(var(--bar-w) + 1.75rem - max(0px, (100vw - 1280px) / 2)));
  }
}

/* ---------- 3. Chapter themes + torn edges ---------- */
.chapter {
  position: relative;
  padding-block: var(--section-pad);
  background: var(--bg);
  color: var(--fg);
}

.chapter--paper { --bg: var(--paper);  --fg: var(--ink);  --muted: rgba(33, 27, 22, 0.72); --accent: var(--cobalt); --focus: var(--cobalt); }
.chapter--pink  { --bg: var(--pink);   --fg: var(--ink);  --muted: rgba(33, 27, 22, 0.78); --accent: var(--cobalt); --focus: var(--cobalt); }
.chapter--kraft { --bg: var(--kraft);  --fg: var(--ink);  --muted: rgba(33, 27, 22, 0.82); --accent: var(--ink);    --focus: var(--ink); }
.chapter--ink   { --bg: var(--ink);    --fg: var(--paper); --muted: rgba(251, 247, 243, 0.74); --accent: var(--pink); --focus: var(--pink); }

.chapter a { color: var(--accent); }

.chapter p { max-width: 62ch; }

.chapter__edge {
  position: absolute;
  left: 0; right: 0;
  top: -46px;
  height: 48px;
  background: var(--bg);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1200v31l-83-9-84 12-96-15-88 14-104-10-92 16-110-13-86 10-98-14-92 15-90-8-85 7L0 33z' fill='%23fff'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 48' preserveAspectRatio='none'%3E%3Cpath d='M0 0h1200v31l-83-9-84 12-96-15-88 14-104-10-92 16-110-13-86 10-98-14-92 15-90-8-85 7L0 33z' fill='%23fff'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  z-index: 2;
  pointer-events: none;
}

.chapter-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }

.chapter-head__kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  color: var(--muted);
}

.chapter-head__title {
  font-size: clamp(2.4rem, 5.6vw, 4.2rem);
  margin-bottom: var(--space-3);
}

.chapter-head__title--big { font-size: clamp(2.8rem, 7vw, 5.4rem); }

.chapter-head__lede {
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 44ch;
}

.chapter__more { margin-top: var(--space-4); }

/* ---------- 4. Sticker buttons & links ---------- */
.sticker-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper-2);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-sharp);
  box-shadow: var(--shadow-hard-sm);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
  touch-action: manipulation;
}
.sticker-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.sticker-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.sticker-btn--pink { background: var(--pink); }
.chapter a.sticker-btn { color: var(--ink); }
.chapter a.sticker-btn--ghost { color: var(--paper); }
.sticker-btn--kraft { background: var(--kraft); }
.sticker-btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--paper);
  box-shadow: 3px 3px 0 rgba(251, 247, 243, 0.4);
}
.sticker-btn--ghost:hover { box-shadow: 5px 5px 0 rgba(251, 247, 243, 0.55); }
.sticker-btn--ghost:active { box-shadow: 1px 1px 0 rgba(251, 247, 243, 0.55); }
.sticker-btn--lg { padding: 0.9rem 1.9rem; font-size: 1.125rem; }

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration-color: currentColor;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
}
.arrow-link::after {
  content: "";
  width: 9px; height: 9px;
  border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}
.arrow-link:hover::after { transform: rotate(-45deg) translate(3px, 3px); }

/* ---------- 5. Header & nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: var(--header-h);
  padding: 0.75rem clamp(1.25rem, 4vw, 2.5rem);
  color: var(--paper);
  transition: background-color var(--dur-med) ease, color var(--dur-med) ease, box-shadow var(--dur-med) ease;
}
/* transparent header: it always takes its tone from the section below
   (is-ink flips the text for dark chapters) */
.site-header.is-scrolled {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}
.site-header.is-ink {
  background: transparent;
  color: var(--paper);
}


.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}
/* viewBox is trimmed to the Anton baseline (y=35), so the svg's bottom
   edge IS the baseline and align-items:baseline levels it with the sub */
.brand__mark { height: 24px; width: auto; fill: currentColor; }
.brand__mark-text {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: 0.02em;
}
.brand__sub {
  /* header text matches the index: same font, same size */
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 1.05vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.85;
}
.site-header__cta { font-size: clamp(0.85rem, 1.05vw, 0.95rem); font-weight: 500; }

.site-nav__list {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  list-style: none;
  padding: 0;
}
.site-nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.15rem;
  border-bottom: 2px dotted transparent;
}
.site-nav a:hover { border-bottom-color: currentColor; }
.site-nav a[aria-current="page"] { border-bottom-color: currentColor; }

.menu-btn {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  background: transparent;
  color: inherit;
  border: 2px dashed currentColor;
  border-radius: var(--radius-sharp);
  font-weight: 600;
}
.menu-btn__icon, .menu-btn__icon::before {
  content: "";
  display: block;
  width: 18px; height: 2.5px;
  background: currentColor;
}
.menu-btn__icon { position: relative; }
.menu-btn__icon::before { position: absolute; top: -6px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: var(--paper);
  color: var(--ink);
  padding: calc(var(--header-h) + 2rem) clamp(1.5rem, 6vw, 3rem) 2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu__list { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.mobile-menu__list a {
  display: block;
  padding: 0.6rem 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3rem);
  color: var(--ink);
  text-decoration: none;
}
.mobile-menu__list a:hover { font-style: italic; }
.mobile-menu__cta { margin-top: var(--space-4); }

/* ---------- 6. Hero ---------- */
.hero {
  padding-block: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: clip;
}

.hero__stage {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  gap: var(--space-3);
  padding: calc(var(--header-h) + 2rem) 1.25rem 2.5rem;
}

.hero__title { position: relative; z-index: 1; }

.hero__wordmark {
  display: block;
  font-family: var(--font-logo);
  font-weight: 400; /* Anton ships a single weight */
  font-size: clamp(7.5rem, 30vw, 20rem);
  line-height: 0.82;
  letter-spacing: 0.05em; /* a little air — Anton is condensed, don't crush it */
  color: var(--paper);
}

.hero__tag {
  display: block;
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  color: var(--pink);
}
.hero__tag em { font-style: italic; }

.hero__shatter {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero__shatter[hidden] { display: none; }

.hero__lede {
  position: relative;
  z-index: 1;
  max-width: 44ch;
  font-size: 1.125rem;
  color: rgba(251, 247, 243, 0.82);
}

.hero__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
}

/* tape reveal (JS-gated) */
.tape-reveal { display: none; pointer-events: none; }
.js .tape-reveal:not([hidden]) {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 92; /* covers the now-transparent header until the box opens */
}
.tape-panel {
  position: relative;
  width: 50%;
  height: 100%;
  background:
    repeating-linear-gradient(90deg, rgba(33, 27, 22, 0.07) 0 3px, transparent 3px 14px),
    var(--kraft-light);
  display: grid;
  place-items: center;
}
.tape-panel--left { border-right: 3px dashed rgba(33, 27, 22, 0.35); }
.tape-panel--right {
  background:
    repeating-linear-gradient(90deg, rgba(33, 27, 22, 0.07) 0 3px, transparent 3px 14px),
    var(--kraft);
}
.tape-strip {
  display: inline-block;
  padding: 0.8rem 2.6rem;
  font-weight: 700;
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-top: 2px dashed rgba(33, 27, 22, 0.4);
  border-bottom: 2px dashed rgba(33, 27, 22, 0.4);
  rotate: -2deg;
}
.tape-strip--pink { background: var(--pink); }
.tape-strip--kraft { background: var(--paper-2); rotate: 2deg; }

/* ---------- 7. Exploded box chapter ---------- */
.explode {
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding-top: calc(var(--header-h) + 1.5rem);
}
.explode__grid {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
}
.explode .chapter-head { text-align: left; margin-inline: 0; justify-self: start; margin-bottom: var(--space-2); }
.explode .chapter-head__title { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: var(--space-2); }
.explode .chapter-head__lede { margin-inline: 0; }

.explode__stage {
  position: relative;
  width: min(100%, 980px);
  height: min(54svh, 500px);
  perspective: 1400px;
}

/* Chapter II 3D scene (demo3d.js — the three-html-to-canvas port): the
   full-viewport canvas (z:35, created in JS) owns the screen while the
   section is pinned; the DOM net is hidden but stays in the a11y tree
   (opacity, not visibility — screen readers still read the six
   services). The chapter head and the aside link ride ABOVE the white
   scene. */
.explode.is-3d .box-net { opacity: 0; pointer-events: none; }

/* the scene lives in the band between the head and the aside link —
   the stage box is its viewport, so the chrome never gets covered */
.demo3d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  /* feathered edges: projected text DISSOLVES at the band boundary
     instead of being sliced (the scene bg behind is the same kraft, so
     the fade target is the section itself) */
  /* vertical feather kept short (10px): content rests ~20px in from
     the band edge, so headings stay fully opaque while a real cut at
     the boundary still dissolves instead of slicing */
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%),
    linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to bottom, transparent 0, #000 10px, #000 calc(100% - 10px), transparent 100%),
    linear-gradient(to right, transparent 0, #000 32px, #000 calc(100% - 32px), transparent 100%);
  mask-composite: intersect;
}
.demo3d-canvas.is-on { opacity: 1; }

/* ---------- 7b. Demo page (three-html-to-canvas port) ----------
   Offscreen raster source: the demo page's own layout, translated from
   its Tailwind utilities to plain CSS at the same breakpoints
   (sm:640, md:768, lg:1024), same sizes, same colors (#1f49e0 / #fbf7f3) */
#demo-page-host {
  position: fixed;
  top: 0;
  left: -200vw;
  width: 100vw;
  height: 100vh;
  min-height: 100lvh;
  pointer-events: none;
  z-index: -1;
}
#demo-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  position: relative;
  padding-inline: 1rem;
  font-family: "Geist", "Instrument Sans", sans-serif;
  letter-spacing: -0.025em;
  -webkit-font-smoothing: antialiased;
}
/* service label inside the card, pinned to its bottom — both captured
   states project onto the SAME surface, so it hugs the card through
   every camera angle (Paid Ads / Social Media mixed in the shader) */
.demo-service {
  font-weight: 700;
  margin-top: auto;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 2.5rem;
  line-height: 1;
  color: #fbf7f3;
}
@media (max-width: 639px) {
  .demo-service { font-size: 1.5rem; }
}
.demo-headings {
  width: 100%;
  max-width: 70rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  color: #222;
}
.demo-col-1, .demo-col-2, .demo-col-3 {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.demo-col-1 { max-width: 17.5rem; align-self: center; }
.demo-col-2 { max-width: 10rem; align-self: flex-start; }
.demo-col-3 { max-width: 10rem; align-self: flex-end; }
.demo-heading {
  font-weight: 700;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -0.06em;
}
.demo-self-start { align-self: flex-start; }
.demo-self-end { align-self: flex-end; }
.demo-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 1 / 1;
  width: 70%;
  background: #1f49e0;
  color: #fbf7f3;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.demo-card__brand {
  margin: 0;
  font-weight: 800;
  font-size: 1.125rem;
}
.demo-card__p1 { margin: 0; text-wrap: balance; font-size: 0.875rem; font-weight: 600; line-height: 1.25; }
.demo-card__p2 { margin: 0; text-wrap: balance; font-size: 0.75rem; line-height: 1.25; }
@media (min-width: 640px) {
  .demo-headings { gap: 2.5rem; }
  .demo-col-1 { max-width: 25rem; }
  .demo-col-2 { max-width: 12.5rem; }
  .demo-col-3 { max-width: 13.75rem; }
  .demo-heading { font-size: 4.5rem; }
  .demo-card { width: min(50vw, 25rem); padding: 2rem; gap: 1.5rem; }
  .demo-card__brand { font-size: 1.375rem; }
  .demo-card__p1 { font-size: 1rem; }
  .demo-card__p2 { font-size: 0.875rem; }
}
@media (min-width: 768px) {
  .demo-headings { gap: 0; }
  .demo-col-1 { max-width: 32.5rem; }
  .demo-col-2 { max-width: 25rem; }
  .demo-col-3 { max-width: 25rem; }
  .demo-heading { font-size: 6rem; }
  .demo-card__logo { height: 1.5rem; }
  .demo-card__p1 { font-size: 1.125rem; }
  .demo-card__p2 { font-size: 1rem; }
}

/* the box as a 2D laid-out lid net: left · front · right · back in a row,
   one lid above and one below the front — headings live ON the lids */
.box-net {
  position: relative;
  width: min(100%, 940px);
  margin-inline: auto;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    ".       top     .        ."
    "left    front   right    back"
    ".       bottom  .        .";
  /* lids share one 3D space above the stage perspective (see
     .explode__stage) so the folded box depth-sorts like a real box
     and unfolds into one flat 2D layer */
  transform-style: preserve-3d;
}
.lid {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-content: center;
  gap: 0.2rem;
  padding: 0.5rem 0.6rem;
  text-align: center;
  border: 3px solid var(--ink);
  background:
    repeating-linear-gradient(90deg, rgba(33, 27, 22, 0.08) 0 2px, transparent 2px 9px),
    var(--kraft);
  backface-visibility: hidden;
}
.lid--top    { grid-area: top; background-color: var(--kraft-light); }
.lid--left   { grid-area: left; background-color: #B98F62; }
.lid--front  { grid-area: front; }
.lid--right  { grid-area: right; background-color: var(--kraft-deep); }
.lid--back   { grid-area: back; background-color: var(--kraft-deep); }
.lid--bottom { grid-area: bottom; background-color: var(--kraft-deep); }
.lid__name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.85rem, 1.35vw, 1.15rem);
  line-height: 1.15;
}
.lid__desc {
  display: block;
  font-size: clamp(0.66rem, 0.85vw, 0.8rem);
  line-height: 1.3;
  color: rgba(33, 27, 22, 0.78);
}

/* fold hinges: each lid swings about the edge it shares with the front
   lid, so the closed pose reads as a real box instead of overlapping
   flaps. The back lid has no chainable hinge in a flat net — it tucks
   flat behind the right wall (see FOLD in exploded.js), so its backface
   must stay visible. */
.lid--left   { transform-origin: right center; }
.lid--right  { transform-origin: left center; }
.lid--back   { transform-origin: left center; backface-visibility: visible; }
.lid--top    { transform-origin: center bottom; }
.lid--bottom { transform-origin: center top; }

.box3d__stamp {
  position: absolute;
  left: 8px; bottom: 6px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: rgba(33, 27, 22, 0.75);
}

.explode__aside { margin-top: var(--space-4); }

/* full-bleed rows need their own inner wrap to keep text aligned */
.explode__head-wrap { width: 100%; }

/* Pinned desktop composition: head + whole box share one screen;
   rows fill exactly, the head compresses on scrub so the lid never
   covers live text. */
@media (min-width: 961px) {
  .explode {
    height: 100svh;
    min-height: 0;
    align-content: stretch;
    /* row 1: the pinned grid; row 2: the aside — explicit rows keep
       "Full service breakdown" inside the clipped 100svh box instead
       of being pushed past it by a full-height grid */
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
    padding-top: calc(var(--header-h) + clamp(0.5rem, 2vh, 1.25rem));
    /* must clear .chapter__edge of the NEXT section: the wave sits
       top:-46px (z-index 2) over this section's last 46px — the aside
       used to live inside that zone and got covered the moment the pin
       released into chapter III */
    padding-bottom: clamp(3.4rem, 6.5vh, 5rem);
  }
  .explode__grid {
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(0.5rem, 1.6vh, 1.4rem);
    justify-items: stretch;
  }
  /* the box spans the full viewport instead of the text column, so the
     open net uses every bit of space (no dead gutter beside it) */
  .explode__aside {
    /* sit on the same text column as the chapter head above it, which
     .wrap already keeps clear of the fixed index bar */
    padding-inline-start: clamp(1.25rem, 5vw, 4rem);
  }
  .explode__stage {
    width: 100vw;
    height: auto;
    max-height: none;
    margin-inline: calc(50% - 50vw);
  }
  /* the net centres in the area right of the fixed index bar, so the
     net and the bar read as one balanced composition */
  .box-net { margin-left: calc(var(--bar-w) / 2); }
  /* header stays inside the text column (clear of the fixed index bar);
     the title gets the wider cap so "Every brand hides an angle." holds one
     line — the 46ch head cap was measured on the 16px body font and
     squeezed the title to three */
  .explode .chapter-head {
    max-width: min(42rem, 100%);
    padding-inline-start: clamp(1.25rem, 5vw, 4rem);
  }
  .explode .chapter-head { margin-bottom: 0; }
  .explode .chapter-head__title {
    margin-bottom: var(--space-1);
    transform-origin: top left;
    will-change: transform;
  }
  .explode .chapter-head__lede { max-width: min(46ch, 100%); will-change: transform, opacity; }
}
@media (min-width: 961px) and (max-height: 780px) {
  .explode .chapter-head__title { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
  .explode .chapter-head__lede { display: none; }
  .lid__desc { display: none; }
}
@media (max-width: 640px) {
  .lid { padding: 0.3rem 0.2rem; }
  .lid__desc { display: none; }
  .lid__name { font-size: 0.7rem; }
}

/* ---------- 8. Work collage + case grid ---------- */
.work-collage {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}
.work-card--offset { margin-top: 3.5rem; }

.work-card__link { display: block; text-decoration: none; color: inherit; }

.work-card__panel {
  display: block;
  padding: 1.4rem;
  background-color: var(--paper-2);
  background-image: radial-gradient(rgba(33, 27, 22, 0.16) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.work-card__art { width: 100%; height: auto; }
.work-card__link:hover .work-card__panel {
  transform: translate(-3px, -3px) rotate(-0.6deg);
  box-shadow: 8px 8px 0 var(--ink);
}

.work-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: var(--space-2);
}
.work-card__client { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.work-card__discipline { font-size: 0.9rem; color: var(--muted); }
.work-card__stat { display: block; margin-top: 0.3rem; font-size: 0.975rem; color: var(--muted); }
.work-card__stat strong { color: var(--cobalt); font-variant-numeric: tabular-nums; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-4);
}
.filter {
  min-height: 44px;
  padding: 0.45rem 1.1rem;
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: var(--radius-sharp);
  font-weight: 600;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
}
.filter:hover { transform: translateY(-2px); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.case-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
}
.case[hidden] { display: none; }

.case__card { display: grid; gap: 0.55rem; }

.case__panel {
  display: block;
  padding: 1.2rem;
  margin-bottom: 0.6rem;
  background-color: var(--paper-2);
  background-image: radial-gradient(rgba(33, 27, 22, 0.16) 1.2px, transparent 1.2px);
  background-size: 14px 14px;
  border: var(--border-w) solid var(--ink);
  transition: transform var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.case__card:hover .case__panel {
  transform: translate(-3px, -3px) rotate(0.4deg);
  box-shadow: 8px 8px 0 var(--ink);
}
.case__panel svg { width: 100%; height: auto; }

.case__client { font-size: 1.5rem; }
.case__discipline { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.case__desc { color: var(--muted); max-width: 52ch; }
.case__stat { font-size: 1.05rem; color: var(--muted); }
.case__stat strong { color: var(--cobalt); font-family: var(--font-display); font-size: 1.3rem; font-variant-numeric: tabular-nums; }

.empty-state {
  padding: var(--space-4);
  border: 2px dashed var(--ink);
  text-align: center;
  font-size: 1.1rem;
}
.empty-state__reset {
  background: none;
  border: none;
  padding: 0;
  font-weight: 700;
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 9. Proof manifest + quote + principles ---------- */
.proof-manifest { display: grid; gap: 0; }

.proof-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-block: clamp(1.1rem, 3vh, 1.8rem);
  border-bottom: 2px dotted rgba(33, 27, 22, 0.35);
}
.proof-row:first-child { border-top: 2px dotted rgba(33, 27, 22, 0.35); }

.proof-row__label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex: 1;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 500;
}
.proof-row__label::after {
  content: "";
  flex: 1;
  border-bottom: 2px dotted rgba(33, 27, 22, 0.3);
  translate: 0 -6px;
  min-width: 2rem;
}
.proof-row__value {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.principle__note {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--muted);
  max-width: 34ch;
  white-space: normal;
  text-align: right;
}

.pull-quote {
  margin-top: var(--space-5);
  max-width: 56rem;
}
.pull-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  line-height: 1.25;
  max-width: none;
}
.pull-quote figcaption { margin-top: var(--space-2); color: var(--muted); }
.pull-quote cite { font-style: normal; font-weight: 600; }

/* ---------- 10. End chapter, meta panel, tear strip ---------- */
.chapter--end { padding-block: clamp(5rem, 13vh, 9rem); }

.end__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.end__lede {
  margin-block: var(--space-3) var(--space-4);
  font-size: 1.2rem;
  color: var(--muted);
}

.meta-panel {
  position: relative;
  padding: var(--space-4) var(--space-3) var(--space-3);
  background: var(--paper);
  color: var(--ink);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--shadow-hard);
  rotate: -1deg;
}
.meta-panel::before {
  content: "";
  position: absolute;
  top: -14px; left: 50%;
  width: 120px; height: 26px;
  translate: -50% 0;
  background: rgba(247, 201, 218, 0.9);
  border-left: 2px dashed rgba(33, 27, 22, 0.3);
  border-right: 2px dashed rgba(33, 27, 22, 0.3);
  rotate: 2deg;
}
.meta-panel__note { font-size: 1.0625rem; }
.meta-panel__note em { font-family: var(--font-display); font-style: italic; font-size: 1.15em; display: block; margin-bottom: 0.5rem; }
.meta-panel .sticker-btn { margin-top: var(--space-3); }

.tear-strip {
  position: relative;
  margin-top: var(--space-3);
  border-top: 3px dashed rgba(33, 27, 22, 0.45);
  padding-top: var(--space-2);
}
.tear-strip__tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.45rem 1.2rem;
  background: var(--kraft);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8125rem;
  touch-action: none;
  transition: transform var(--dur-fast) var(--ease-out);
}
.tear-strip__tab:hover { transform: translateX(3px); }
.tear-strip__reveal { margin-top: var(--space-2); }
.tear-strip__reveal a { color: var(--cobalt); font-weight: 600; }

/* ---------- 11. Footer ---------- */
.site-footer {
  background: var(--ink-2);
  color: rgba(251, 247, 243, 0.82);
  padding-block: var(--space-5) var(--space-4);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1.2fr;
  gap: var(--space-4);
  align-items: start;
}
.brand__mark--footer { fill: var(--paper); height: 28.6px; }
.site-footer__tag {
  margin-top: var(--space-2);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--pink);
}
.site-footer__nav ul { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
.site-footer__nav a { color: inherit; text-decoration: none; }
.site-footer__nav a:hover { color: var(--pink); text-decoration: underline; text-underline-offset: 3px; }
.site-footer__fine { font-size: 0.9rem; color: rgba(251, 247, 243, 0.6); display: grid; gap: var(--space-2); }

/* ---------- 12. Chapter index + scrubber (home) ---------- */
.chapter-index {
  position: fixed;
  left: 0; right: auto;
  bottom: clamp(1.2rem, 4vh, 2.5rem);
  width: var(--bar-w);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.4rem;
  padding-inline: clamp(0.9rem, 1.5vw, 1.3rem);
  /* dark ink on light sections, paper white on ink sections — the bar
     flips with the background actually behind it (set by main.js) */
  color: var(--ink);
  transition: color var(--dur-med) ease;
  pointer-events: none;
}
.chapter-index.on-dark { color: var(--paper); }
.chapter-index ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.15rem; pointer-events: auto; }
.chapter-index__names { flex: 1; min-width: 0; }
.chapter-index__nums { text-align: right; justify-items: end; }
.chapter-index__names li { display: flex; align-items: baseline; }
/* the active row grows a dotted leader toward its numeral — Home is the
   page itself, not a chapter, so it never gets one */
.chapter-index__names li:not(:has(a[href="#main"])):has(a[aria-current="true"])::after {
  content: "";
  flex: 1;
  min-width: 1rem;
  margin: 0 0.35em 0.3em;
  border-bottom: 1px dotted currentColor;
  opacity: 0.7;
}
.chapter-index a {
  display: block;
  color: inherit;
  text-decoration: none;
  /* same font, same size throughout — the reference index */
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.85rem, 1.05vw, 0.95rem);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.5;
  opacity: 0.45;
  transition: opacity var(--dur-fast) ease;
}
.chapter-index a:hover, .chapter-index a[aria-current="true"] { opacity: 1; }
.chapter-index__num { font-variant-numeric: tabular-nums; font-weight: 500; }
.chapter-index__name { white-space: nowrap; }


.scrubber {
  position: fixed;
  right: clamp(1rem, 2.5vw, 2rem);
  bottom: clamp(1rem, 3vh, 2rem);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 0.6rem 0.2rem;
  color: #fff;
  mix-blend-mode: difference;
  cursor: pointer;
}
.scrubber:hover .scrubber__tick { opacity: 0.7; }
.scrubber:hover .scrubber__tick.is-active { opacity: 1; }
.scrubber__tick {
  width: 2px;
  height: 12px;
  background: currentColor;
  opacity: 0.38;
  border-radius: 1px;
  transition: height var(--dur-fast) ease, opacity var(--dur-fast) ease;
}
.scrubber__tick.is-active { height: 22px; opacity: 1; }

/* ---------- 13. Inner page hero ---------- */
.page-hero {
  min-height: 62svh;
  display: grid;
  align-content: center;
  padding-top: calc(var(--header-h) + var(--space-5));
}
.page-hero__inner { width: 100%; }
.page-hero__title {
  font-size: clamp(3rem, 9vw, 6.5rem);
  color: var(--paper);
  margin-bottom: var(--space-3);
}
.chapter--pink .page-hero__title { color: var(--ink); }
.page-hero__lede {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--muted);
  max-width: 46ch;
}

/* ---------- 14. Accordion ---------- */
.acc { border-top: 2px dotted rgba(33, 27, 22, 0.35); }
.acc__heading { margin: 0; }
.acc__btn {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  width: 100%;
  padding: 1.35rem 0.25rem;
  background: none;
  border: 0;
  border-bottom: 2px dotted rgba(33, 27, 22, 0.35);
  text-align: left;
  transition: padding-left var(--dur-fast) var(--ease-out);
}
.acc__btn:hover { padding-left: 0.75rem; }
.acc__name {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 600;
}
.acc__hint { flex: 1; color: var(--muted); font-size: 0.975rem; }
.acc__chev {
  position: relative;
  flex: 0 0 16px;
  width: 16px; height: 16px;
  align-self: center;
}
.acc__chev::before, .acc__chev::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 14px; height: 2.5px;
  background: currentColor;
  translate: -50% -50%;
  transition: rotate var(--dur-med) var(--ease-out);
}
.acc__chev::after { rotate: 90deg; }
.acc__btn[aria-expanded="true"] .acc__chev::after { rotate: 0deg; }

.acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows var(--dur-med) var(--ease-out), visibility 0s linear var(--dur-med);
  border-bottom: 2px dotted rgba(33, 27, 22, 0.35);
}
.acc__btn[aria-expanded="true"] + .acc__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows var(--dur-med) var(--ease-out), visibility 0s;
}
.acc__inner { overflow: hidden; padding-left: 0.25rem; }
.acc__inner > * { margin-bottom: var(--space-2); }
.acc__inner p { padding-top: var(--space-2); color: var(--muted); }
.acc__list {
  padding: 0 0 var(--space-3) 1.1rem;
  display: grid;
  gap: 0.35rem;
}
.acc__list li::marker { content: "— "; }

/* ---------- 15. Packages ---------- */
.packages {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}
.package {
  position: relative;
  padding: var(--space-3);
  background: var(--paper-2);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
}
.package--hero {
  background: var(--paper);
  box-shadow: var(--shadow-hard);
}
.package__flag {
  position: absolute;
  top: -16px; right: 18px;
  padding: 0.3rem 0.9rem;
  background: var(--pink);
  border: 2px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  rotate: 3deg;
}
.package__name { font-size: 1.6rem; margin-bottom: 0.4rem; }
.package__price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--space-2);
}
.package__price span { font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.package__desc { color: var(--muted); margin-bottom: var(--space-3); }
.package__list { padding-left: 1.1rem; display: grid; gap: 0.35rem; }
.package__list li::marker { content: "× "; }

/* ---------- 16. Process ---------- */
.process {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  counter-reset: step;
}
.process__step {
  position: relative;
  padding-top: var(--space-4);
  border-top: 2px solid var(--ink);
}
.process__num {
  position: absolute;
  /* the number keeps its original seat on the rule; its backdrop
     (section colour) knocks the rule out behind the glyph — the number
     reads on top, the line runs behind it, never across it */
  top: -0.72em;
  left: 0;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--kraft);
  -webkit-text-stroke: 2px var(--ink);
  background: var(--bg);
}
.process__name { font-size: 1.4rem; margin-bottom: 0.5rem; }
.process__desc { color: var(--muted); font-size: 0.975rem; }

/* ---------- 17. About: story, timeline, crew ---------- */
.story {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-bottom: var(--space-6);
}
.story__text p { margin-bottom: var(--space-2); color: var(--muted); max-width: 54ch; }
.story__text p strong { color: var(--ink); }
.story__art { border: var(--border-w) solid var(--ink); box-shadow: var(--shadow-hard); background: var(--pink); }
.story__figure figcaption { margin-top: var(--space-2); font-size: 0.9rem; color: var(--muted); }

.timeline-title { margin-bottom: var(--space-3); }
.timeline { list-style: none; padding: 0; }
.timeline__row {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: var(--space-2);
  border-bottom: 2px dotted rgba(33, 27, 22, 0.35);
}
.timeline__year {
  flex: 0 0 auto;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 600;
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}
.timeline__event { color: var(--muted); align-self: center; }

.crew {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.crew__avatar {
  display: block;
  width: min(100%, 140px);
  margin-bottom: var(--space-2);
  transition: transform var(--dur-med) var(--ease-out);
}
.crew__member:hover .crew__avatar { transform: rotate(-3deg) scale(1.04); }
.crew__name { font-size: 1.3rem; }
.crew__role { font-size: 0.9rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.crew__quip { font-size: 0.975rem; color: var(--muted); }
.crew__hiring { margin-top: var(--space-4); }

/* ---------- 18. Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact__note { color: var(--muted); margin-bottom: var(--space-4); }

.form { display: grid; gap: var(--space-3); max-width: 34rem; }
.field { display: grid; gap: 0.4rem; border: 0; padding: 0; }
.field__label { font-weight: 600; font-size: 0.975rem; }
.field__req { color: var(--error); }

.field__input {
  min-height: 48px;
  padding: 0.65rem 0.9rem;
  background: var(--paper-2);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-sharp);
  transition: box-shadow var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.field__input:focus-visible { outline-offset: 2px; }
.field__input--area { min-height: 140px; resize: vertical; }
.field__input--select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 21px, calc(100% - 15px) 21px; background-size: 7px 7px, 7px 7px; background-repeat: no-repeat; padding-right: 2.6rem; }
.field__input[aria-invalid="true"] { border-color: var(--error); }
.field__hint { font-size: 0.875rem; color: var(--muted); }
.field__error { font-size: 0.9rem; font-weight: 600; color: var(--error); }

.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  cursor: pointer;
}
.check input {
  width: 22px; height: 22px;
  accent-color: var(--cobalt);
  cursor: pointer;
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.form__status { font-weight: 600; color: var(--error); }

.success-panel {
  padding: var(--space-4);
  background: var(--paper-2);
  border: var(--border-w) solid var(--ink);
  border-left: 10px solid var(--cobalt);
  box-shadow: var(--shadow-hard-sm);
  max-width: 34rem;
}
.success-panel__title { font-size: 2rem; margin-bottom: var(--space-2); }
.success-panel p { margin-bottom: var(--space-2); }
.success-panel__fine { font-size: 0.9rem; color: var(--muted); }

.contact-card {
  padding: var(--space-3);
  background: var(--paper-2);
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--shadow-hard-sm);
  rotate: 0.8deg;
}
.contact-card__title { font-size: 1.4rem; margin-bottom: var(--space-2); }
.contact-card__list { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.contact-card__list li { display: grid; gap: 0.1rem; }
.contact-card__list span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-card__list a { color: var(--cobalt); font-weight: 600; }

.tear-strip--aside { margin-top: var(--space-4); }

/* ---------- 19. Responsive ---------- */
@media (max-width: 1100px) {
  .process { grid-template-columns: repeat(2, 1fr); row-gap: var(--space-5); }
  .crew { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .site-nav, .site-header__cta { display: none; }
  .menu-btn { display: inline-flex; }

  .work-collage { grid-template-columns: 1fr; }
  .work-card--offset { margin-top: 0; }

  .case-grid { grid-template-columns: 1fr; }

  .end__grid, .story, .contact, .site-footer__grid { grid-template-columns: 1fr; }

  .packages { grid-template-columns: 1fr; }

  .chapter-index, .scrubber { display: none; }
}

@media (max-width: 600px) {
  :root { --header-h: 64px; }
  .checks { grid-template-columns: 1fr; }
  .timeline__row { flex-direction: column; gap: 0.2rem; }
  .timeline__event { align-self: start; }
  .process { grid-template-columns: 1fr; }
  .crew { grid-template-columns: 1fr; }
  .proof-row { flex-wrap: wrap; }
  .proof-row__label::after { display: none; }
  .proof-row__label { flex: 1 0 100%; }
  .principle__note { text-align: left; }
}

/* ---------- 20. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .tape-reveal { display: none !important; }
}

/* ---------- 21. Cross-page view transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 220ms ease both; }
::view-transition-new(root) { animation: vt-in 320ms ease both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ---------- 22. Fill-in slots (edit before launch) ---------- */
.fill-in {
  border-bottom: 1px dashed currentColor;
  opacity: 0.6;
  font-style: italic;
}
