/* ============================================================
   Editorial design system — Chapter Two
   Hayley Bance Portfolio

   Reference: docs/MASTER_BUILD_BRIEF.md, docs/DESIGN_PRINCIPLES.md
   Layout language adapted from chapter-products.html reference:
   a persistent left "rail" for labels beside a fixed content column,
   contained/breakout/diagram image plates, and a bordered stat row —
   restrained asymmetry rather than a scattered grid.
   Voice: architecture monograph / Kinfolk / Monocle — not SaaS.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=Manrope:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  /* -- Palette -------------------------------------------------- */
  --ivory:        #F7F2E8;
  --ivory-deep:   #EFE7D6;
  --paper:        #FBF8F1;
  --charcoal:     #23211D;
  --charcoal-soft:#55503F;
  --charcoal-mute:#8A8371;
  --olive:        #6B6E4C;
  --olive-deep:   #4B4E34;
  --accent:       #A45332;
  --stone:        #C8BEA9;
  --stone-line:   #DCD3BF;
  --rule:         rgba(35, 33, 29, 0.14);
  --rule-soft:    rgba(35, 33, 29, 0.08);

  /* -- Type ------------------------------------------------------ */
  --font-display: 'Newsreader', Georgia, 'Iowan Old Style', serif;
  --font-body:    'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  /* -- Rhythm ------------------------------------------------------ */
  --frame-max: 1320px;
  --plate-max: 1120px;
  --essay-max: 760px;
  --edge: clamp(1.25rem, 4vw, 48px);
  --rail-w: 160px;
  --rail-gap: 48px;
  --breath-lg: clamp(6rem, 14vw, 12rem);
  --breath-md: clamp(3.5rem, 8vw, 7rem);
  --breath-sm: clamp(1.75rem, 4vw, 3rem);
}

/* -- Reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint paper grain — kept extremely subtle */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--charcoal);
  margin: 0;
  letter-spacing: -0.01em;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* -- Skip link (a11y) ---------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--charcoal);
  color: var(--ivory);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus { left: var(--edge); }

/* -- Site chrome ---------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.25rem, 3vw, 26px) var(--edge);
  background: var(--ivory);
  border-bottom: 1px solid var(--rule);
}
.masthead__mark {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--charcoal);
}
.masthead__meta {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--charcoal-mute);
  font-weight: 500;
}
.masthead__nav {
  display: flex;
  gap: clamp(18px, 3vw, 32px);
}
.masthead__nav a {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--charcoal-mute);
  text-decoration: none;
  transition: color 0.3s ease;
}
.masthead__nav a:hover { color: var(--charcoal); }

/* -- Email reveal (hover tooltip for mailto links) ------------------------
   Links that would otherwise point to an About/contact page that doesn't
   exist yet go straight to mailto: instead — this tooltip surfaces the
   address on hover so the destination is never a surprise before the click. */
.email-reveal { position: relative; }
.email-reveal::after {
  content: "hbance1@gmail.com";
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 8px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ivory);
  background: var(--charcoal);
  padding: 5px 10px;
  border-radius: 3px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 20;
}
.email-reveal:focus-visible::after { opacity: 1; visibility: visible; }
/* Scoped to real hover devices only — on touch, :hover would otherwise
   "eat" the first tap (showing the tooltip instead of opening mail), so
   phones and tablets skip straight to the mailto: link on a single tap. */
@media (hover: hover) and (pointer: fine) {
  .email-reveal:hover::after { opacity: 1; visibility: visible; }
}

main { position: relative; z-index: 1; }

/* -- Frame: the page's outer measure — everything lives inside this ---- */
.frame {
  max-width: var(--frame-max);
  margin-inline: auto;
  padding-inline: var(--edge);
}

/* -- Crumb (breadcrumb back-link) --------------------------------------- */
.crumb { padding: 40px 0 0; }
.crumb a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--charcoal-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.crumb a:hover { color: var(--charcoal); border-color: var(--olive); }

/* -- Railed: persistent label rail beside a content column -------------
   The core layout device. A short mono label sits in a fixed-width left
   column beside whatever content follows — chapter labels, section
   names, figure numbers — so nothing in the page shares one centered
   measure, but the offset stays calm and consistent rather than
   scattered. */
.railed {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  column-gap: var(--rail-gap);
}
.rail { padding-top: 6px; }
.rail .label {
  font-size: 11px;
  color: var(--charcoal-soft);
  line-height: 1.6;
}

/* -- Hero (deep-dive pages, and the chapter index) -------------------------
   The title, chapter numeral, and pull quote as one bound composition
   rather than three independent blocks stacked with space between them.
   A vertical thread runs from the numeral down to a closing rule under
   the quote, tying the whole spread together; the quote is pinned to
   the foot of the spread so the space above it reads as deliberate
   proportion, not leftover gap. Roughly fills the first viewport. */
.hero {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  column-gap: var(--rail-gap);
  min-height: 82vh;
  padding: 34px 0 var(--breath-md);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--breath-md);
}
.hero__rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 10px;
}
.hero__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--olive-deep);
}
.hero__thread {
  flex: 1;
  width: 1px;
  min-height: 40px;
  margin-top: 22px;
  background: var(--rule);
}
.hero__body {
  display: flex;
  flex-direction: column;
}
.hero__title {
  font-size: clamp(2.75rem, 6.5vw, 4.6rem);
  line-height: 1.08;
  max-width: 16ch;
}
.hero__statement {
  max-width: 600px;
  margin-top: auto;
  padding-top: var(--breath-sm);
  border-top: 1px solid var(--rule);
}
.hero__statement p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.4;
  color: var(--charcoal);
}

/* Chapter index page — the title runs longer (a full sentence rather
   than a two-word section name), so it keeps its own smaller size;
   the statement is a dek (p.dek), not a blockquote, styled below. */
.hero--chapter .hero__title { font-size: clamp(2.2rem, 5vw, 3.6rem); }

/* -- Chapter head -------------------------------------------------------- */
.chapter-head { padding: 30px 0 var(--breath-md); }
/* Used on pages without a dek — less bottom padding since there's no
   subhead to separate from the body copy below. */
.chapter-head--tight { padding-bottom: var(--breath-md); }
.chapter-head--tight h1 { margin-bottom: 0; }
.chapter-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin: 0 0 26px;
}
.chapter-head--tight h1 {
  font-size: clamp(2.75rem, 6.5vw, 4.6rem);
}
p.dek {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  line-height: 1.55;
  color: var(--olive-deep);
  max-width: 38ch;
  margin: 0;
}

/* -- Essay ----------------------------------------------------------------- */
.essay { max-width: var(--essay-max); }
.essay p {
  font-size: clamp(1rem, 1vw + 0.65rem, 1.125rem);
  line-height: 1.8;
  color: var(--charcoal);
  margin: 0 0 26px;
}
.essay p:last-child { margin-bottom: 0; }
.essay p strong { font-weight: 600; }
.essay.dropcap p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 4.2em;
  line-height: 0.78;
  float: left;
  padding: 0.03em 0.1em 0 0;
  color: var(--olive-deep);
}

/* editorial list — no bullets, no boxes */
.editorial-list {
  list-style: none;
  margin: 1.75em 0 0;
  padding: 0;
  display: grid;
  gap: 0.9em;
  counter-reset: item;
}
.impact-label + .editorial-list { margin-top: 0.75em; }
.editorial-list li {
  display: grid;
  grid-template-columns: 2.4em 1fr;
  gap: 0.75em;
  color: var(--charcoal);
  font-size: clamp(1rem, 1vw + 0.65rem, 1.125rem);
}
.editorial-list li::before {
  counter-increment: item;
  content: counter(item, lower-roman);
  font-family: var(--font-display);
  font-style: italic;
  color: var(--olive-deep);
  font-size: 0.9em;
}

/* -- Essay section (argument, not case study) --------------------------------
   For chapters that build a single continuous argument rather than a set
   of client projects — no accordion, read straight through, same rhythm
   and rail-numeral device as .sequence-row but sized for full sections
   with their own heading, essay copy, and figures. */
.essay-section { padding: var(--breath-md) 0 0; }
.essay-section + .essay-section { border-top: 1px solid var(--rule); }
.essay-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 20px;
  max-width: 22ch;
}

/* -- Story (project section) ----------------------------------------------- */
.story { padding: var(--breath-md) 0 0; }
/* When several stories run back to back (e.g. a chapter with many short
   case studies), a rule between them separates the projects without
   needing invented connective copy. */
.story + .story { border-top: 1px solid var(--rule); }

/* Stories as an accordion — each case study collapses to its header
   (overline, name, kicker) so a chapter with several projects stays
   scannable; a mono +/× glyph in the rail marks the open state. Native
   <details>/<summary>, no JS required to open or close. */
details.story summary {
  cursor: pointer;
  list-style: none;
  padding-bottom: 28px;
}
details.story summary::-webkit-details-marker { display: none; }
details.story summary::marker { content: ""; }
details.story summary:hover h2 { color: var(--olive-deep); }
details.story summary:focus-visible { outline: 2px solid var(--olive-deep); outline-offset: 6px; }
.story__toggle {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1;
  color: var(--olive-deep);
  transition: transform 0.25s ease;
}
details.story[open] .story__toggle { transform: rotate(45deg); }
.story__body { padding-bottom: var(--breath-sm); }
.story .overline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--charcoal-mute);
  margin: 0 0 14px;
}
.story h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin: 0 0 6px;
  max-width: 20ch;
}
.story .kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--olive-deep);
  margin: 0 0 34px;
  max-width: 36ch;
}
.story .essay { margin-top: 24px; }
.story .impact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--olive-deep);
  margin: 30px 0 12px;
}
.story .tags {
  margin: 28px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  font-weight: 600;
  color: var(--charcoal-soft);
}

/* Skills read on the collapsed card, but step aside once a case study
   is open and its own body copy is doing the talking. */
details.story[open] summary .tags { display: none; }

/* -- Plates (images / evidence) --------------------------------------------
   .contained sits inside the essay column; .breakout bleeds left, past
   the text, up to the frame's own margin (never full viewport width);
   .diagram is for evidence that must be read whole, not cropped;
   .plate-pair sets two plates side by side. */
figure.plate { margin: clamp(56px, 8vw, 88px) 0; }
figure.plate img, figure.plate .placeholder {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 2px;
}
figure.plate img { object-fit: cover; cursor: zoom-in; }
figure.plate.locked img { cursor: default; }

/* Breakout and plate-pair images reserve a box for rhythm, but the
   photo itself is never cropped to force-fit it — it's shown whole and
   centered within that box (letterboxed if its proportions differ). */
figure.plate.breakout img, .plate-pair figure.plate img,
figure.plate.breakout video {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
}
.plate-pair figure.plate img { aspect-ratio: auto; min-height: 340px; object-fit: contain; }

figure.plate.diagram {
  background: var(--ivory-deep);
  padding: 28px;
  border: 1px solid var(--stone-line);
}
figure.plate.diagram img {
  width: 100%;
  height: auto;
  aspect-ratio: auto !important;
  object-fit: contain;
  min-height: 0 !important;
  border-radius: 0;
}

/* Locked / private evidence — shown blurred with a badge rather than
   omitted entirely, so the reader knows the work exists and how to
   ask about it. */
figure.plate.locked { position: relative; }
figure.plate.locked img { filter: blur(20px) saturate(0.85); }
figure.plate.locked .plate__lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
figure.plate.locked .plate__lock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--ivory);
}
figure.plate.locked .plate__lock-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--charcoal);
  background: var(--ivory);
  padding: 6px 14px;
  border-radius: 999px;
}
figure.plate figcaption a {
  color: var(--olive-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.25s ease;
}
figure.plate figcaption a:hover { color: var(--charcoal); }

figure.plate .placeholder {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(135deg, var(--ivory-deep) 0px, var(--ivory-deep) 2px, transparent 2px, transparent 14px),
    var(--stone-line);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  overflow: hidden;
}
figure.plate .placeholder span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--charcoal-soft);
  background: var(--ivory);
  padding: 5px 10px;
}
figure.plate figcaption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--charcoal-soft);
  max-width: var(--essay-max);
}
figure.plate figcaption .fig-num {
  font-family: var(--font-mono);
  color: var(--olive-deep);
  margin-right: 8px;
}

figure.plate.contained { max-width: var(--essay-max); margin-inline: auto; }

/* Small inline callout — a compact screenshot placed directly beside a
   short passage of text (e.g. one touchpoint in a sequence), not a
   full evidence plate. No forced crop, no caption apparatus. */
figure.plate.small {
  max-width: 320px;
  margin: 20px 0 0;
}
figure.plate.small img { border-radius: 3px; }
figure.plate.small video { display: block; width: 100%; height: auto; border-radius: 3px; }
/* Occasional emphasis within a sequence — same inline placement as
   .small, just given more room to read. */
figure.plate.small.large { max-width: 460px; }

/* Centered, not offset — wider than the reading column but never
   shifted left of it. Avoids overflow at in-between viewport widths
   and reads calmer than a breakout bleed. */
figure.plate.breakout {
  max-width: var(--plate-max);
  margin-inline: auto;
}
figure.plate.breakout .placeholder { aspect-ratio: 16 / 9; }
figure.plate.breakout figcaption { max-width: var(--essay-max); margin-inline: auto; }

.plate-pair {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  max-width: var(--plate-max);
  margin-inline: auto;
  margin-top: clamp(56px, 8vw, 88px);
}
.plate-pair .placeholder { aspect-ratio: auto; height: 100%; min-height: 340px; }
.plate-pair figure.plate { margin: 0; }

/* Photo grid — a small gallery of related shots (a render, a
   behind-the-scenes photo) shown side by side at a uniform size,
   centered as a pair, rather than stacked full-width. Unlike evidence
   diagrams, these are photographic and fine to crop to a consistent
   shape. align-items:start keeps each figure at its own natural
   height so a longer caption never gets squeezed against the row
   below it. */
.plate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  column-gap: 20px;
  row-gap: clamp(40px, 6vw, 64px);
  max-width: var(--plate-max);
  margin-inline: auto;
  margin-top: clamp(56px, 8vw, 88px);
  margin-bottom: clamp(40px, 6vw, 64px);
}
.plate-grid figure.plate { margin: 0; }
.plate-grid figure.plate img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  border-radius: 2px;
}
.plate-grid figure.plate figcaption { margin-top: 10px; }
/* A grid item that needs to be seen whole (e.g. a dense collage of
   screens) spans the full row instead of one column, and shows
   entirely at full width rather than filling a fixed-aspect tile. */
.plate-grid figure.plate.full { grid-column: 1 / -1; }
.plate-grid figure.plate.full img,
.plate-grid figure.plate.full video {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 2px;
}

/* -- Device frame (tablet wrapper for screen-capture evidence) -----------
   A simple CSS bezel, no image asset — so a raw screen recording reads as
   "this lived on a real device" rather than a bare rectangle floating in
   whitespace. Scoped to .device-frame so it only applies where used. */
.device-frame {
  position: relative;
  background: var(--charcoal);
  border-radius: 22px;
  padding: 16px 16px 36px;
  box-shadow: 0 24px 48px rgba(35, 33, 29, 0.22);
}
.device-frame img, .device-frame video {
  border-radius: 4px;
  cursor: zoom-in;
}
.device-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 13px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--charcoal-mute);
  transform: translateX(-50%);
}

/* -- Transition (short connective beat) --------------------------------------------- */
.transition { padding: var(--breath-sm) 0 0; max-width: 560px; }
.transition p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.6;
  color: var(--charcoal-soft);
  margin: 0;
}

/* -- Mid-weight quote (thesis lines, pull quotes) ------------------------------------ */
.quote-mid { padding: var(--breath-sm) 0; }
.quote-mid blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.4;
  color: var(--charcoal);
  max-width: 680px;
}

/* Hero pull quote — the second beat in the title / quote / essay
   sequence at the top of a deep-dive page. Generous space on both
   sides keeps it from competing with the title above or the essay
   below; a narrower column reinforces that it's a single aside, not
   another block of body copy. */
.quote-mid--hero {
  padding: var(--breath-md) 0;
}
.quote-mid--hero blockquote { max-width: 600px; }
.quote-mid cite {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--olive-deep);
}

/* -- Stat rows (editorial callouts — large type, minimal labels, whitespace) --------- */
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  margin: 44px 0 8px;
  text-align: center;
}
.stat {
  flex: 0 1 auto;
  min-width: 0;
  padding: 0;
}
.stat .num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  color: var(--charcoal);
  line-height: 1;
  display: block;
  margin-bottom: 0.75rem;
}
.stat .label {
  font-size: 0.85rem;
  color: var(--charcoal-soft);
  line-height: 1.5;
  max-width: 16ch;
  margin-inline: auto;
}
.stat .label em {
  display: block;
  margin-top: 0.35rem;
  font-style: italic;
  color: var(--charcoal-mute);
}

/* -- Reflection (closing blockquote — the chapter's largest typographic moment) ------ */
section.reflection {
  padding: clamp(4rem, 10vw, 130px) 0;
  border-top: 1px solid var(--rule);
  margin-top: clamp(3rem, 8vw, 110px);
}
section.reflection blockquote {
  margin: 0;
  max-width: 760px;
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 3.6vw, 2.1rem);
  line-height: 1.42;
  color: var(--charcoal);
}
section.reflection blockquote p { margin: 0 0 18px; }
section.reflection blockquote p:last-child { margin: 0; }

/* -- Sequence (numbered rows — e.g. touchpoints diagram) ------------------------------ */
.sequence-row {
  padding: clamp(1.75rem, 3vw, 2.5rem) 0;
  border-top: 1px solid var(--rule);
}
.sequence-row:last-child { border-bottom: 1px solid var(--rule); }
.sequence-row h3 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin: 0 0 0.5rem;
}
.sequence-row p {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--charcoal-soft);
  max-width: 46ch;
  margin: 0;
}

/* -- Studio CTA (index page, after the contents list) ------------------------------------
   A quiet editorial nudge, not a button — sits where the contents list would
   otherwise just end, closing the list off with its own rule. */
.cta-line {
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.6;
  color: var(--charcoal-soft);
}
.cta-line a {
  color: var(--olive-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}
.cta-line a:hover { color: var(--charcoal); }

/* -- In-chapter contents nav (index page) ---------------------------------------------- */
.contents-row {
  display: block;
  text-decoration: none;
  padding: clamp(1.5rem, 3vw, 2rem) 0;
  border-top: 1px solid var(--rule);
  transition: opacity 0.35s ease;
}
.contents-row:last-child { border-bottom: 1px solid var(--rule); }
.contents-row:hover .contents-row__title { color: var(--olive-deep); }
.contents-row__title {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  transition: color 0.35s ease;
}
.contents-row__desc {
  margin: 0.5rem 0 0;
  max-width: 48ch;
  font-size: 0.95rem;
  color: var(--charcoal-soft);
}
.contents-row__clients {
  margin: 0.9rem 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal-mute);
}

/* -- Chapter nav footer ----------------------------------------------------------------- */
.chapter-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding: 46px 0 60px;
  border-top: 1px solid var(--rule);
}
.chapter-nav a { text-decoration: none; font-size: 13px; color: var(--charcoal-soft); }
.chapter-nav a:hover { color: var(--charcoal); }
.chapter-nav .dir {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--stone);
}
.chapter-nav .next { text-align: right; margin-left: auto; }
.chapter-nav .title { font-family: var(--font-display); font-size: 16px; color: var(--charcoal); }

footer.site {
  padding: 30px var(--edge) 40px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--charcoal-soft);
  border-top: 1px solid var(--rule);
}

/* -- Reveal-on-scroll (subtle) ------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* -- Responsive ----------------------------------------------------------------------- */
@media (max-width: 900px) {
  .railed { grid-template-columns: 1fr; }
  .rail { padding-top: 0; margin-bottom: 8px; }
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 20px;
  }
  .hero__rail {
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding-top: 0;
    margin-bottom: 28px;
  }
  .hero__thread { width: auto; height: 1px; min-height: 0; flex: 1; margin-top: 0; }
  .hero__title { font-size: 2.75rem; max-width: none; }
  .hero--chapter .hero__title { font-size: 2.4rem; }
  .hero__statement { margin-top: 32px; padding-top: 24px; }
  .chapter-head h1 { font-size: 2.4rem; max-width: none; }
  .chapter-head--tight h1 { font-size: 2.75rem; }
  p.dek { font-size: 1.1rem; max-width: none; }
  .essay p { font-size: 1rem; }
  .story h2 { font-size: 1.6rem; max-width: none; }
  /* Homepage only: the masthead already shows "Hayley Bance" right above
     this hero, so repeating it as a big H1 on a short mobile viewport is
     pure redundancy — drop it and let the pull quote lead instead. */
  .hero--home .hero__title { display: none; }
  figure.plate.breakout, .plate-pair, .plate-grid { max-width: 100%; margin-left: 0; }
  .plate-pair { grid-template-columns: 1fr; }
  .plate-pair .placeholder { min-height: 220px; }
  .plate-grid { grid-template-columns: 1fr; }
  .stats { gap: 2rem; }
  section.reflection blockquote { font-size: 1.5rem; }
  .chapter-nav { flex-direction: column; gap: 20px; }
  .chapter-nav .next { text-align: left; margin-left: 0; }
}

/* -- Lightbox -------------------------------------------------------
   Tapping any plate image opens it full-size against a dark scrim.
   One shared overlay, injected once by scripts/reveal.js. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 5vw, 64px);
  background: rgba(23, 22, 18, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  cursor: default;
}
.lightbox__close {
  position: absolute;
  top: clamp(16px, 3vw, 32px);
  right: clamp(16px, 3vw, 32px);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(247, 242, 232, 0.3);
  border-radius: 50%;
  background: transparent;
  color: var(--ivory);
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.lightbox__close:hover, .lightbox__close:focus-visible { border-color: var(--ivory); }
