/* /journey/ — The Pipeline. One family, three inks, semantic colour.
   Laws: one idea per surface · 3 ink values · colour = routing · light is physical ·
   committed geometry · every mark carries data · emptiness is load-bearing. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque-800.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Silkscreen";
  src: url("/fonts/Silkscreen-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Shrikhand";
  src: url("/fonts/Shrikhand-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Literata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/Literata-400.woff2") format("woff2");
}
@font-face {
  font-family: "Literata"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/fonts/Literata-400i.woff2") format("woff2");
}
@font-face {
  font-family: "Literata"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/Literata-600.woff2") format("woff2");
}
:root {
  --swift: cubic-bezier(0.35, 0.7, 0.25, 1);
  /* three inks */
  --ink-hi: #E9EFE4;
  --ink-mid: #B9C4B4;
  --ink-lo: #93A28F;
  /* ground */
  --ground: #0F1411;
  --ground-lift: #182420;
  --line: rgba(233, 239, 228, 0.12);
  /* domains — colour is routing, not mood */
  --trade: #C98A50;
  --client: #7FA3C9;
  --product: #B48FD9;
  --fintech: #6FC2B0;
  --press: #D9B96A;
  --home: #E8E4D2;
  --rest: #5E6B60;
  /* material textures: static noise tiles, blended per surface */
  --tex-grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='140' height='140' filter='url(%23g)'/></svg>");
  --tex-paper: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='p'><feTurbulence type='fractalNoise' baseFrequency='0.55 0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.16 0'/></filter><rect width='180' height='180' filter='url(%23p)'/></svg>");
  --tex-speck: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='s'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.1 0'/></filter><rect width='120' height='120' filter='url(%23s)'/></svg>");
  --sans: "Bricolage Grotesque", -apple-system, "Segoe UI", sans-serif;
  --serif: "Literata", Georgia, serif;
  --loud: "Shrikhand", "Georgia", serif;
  --mono: "Silkscreen", ui-monospace, Menlo, monospace;
  /* board materials — one system, era-tinted through --dcol */
  --substrate: var(--ground-lift);
  --substrate-edge: #26332B;
  --hole: var(--ground);
  --silkscreen: var(--ink-hi);
  --silkscreen-dim: var(--ink-lo);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* the hero wire paints past the viewport on purpose; without this, mobile
   browsers widen the layout viewport to fit it and the whole page zooms out */
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  background: var(--ground);
  color: var(--ink-mid);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* the ground is a snappable field, not a texture */
  background-image: radial-gradient(rgba(233, 239, 228, 0.05) 1px, transparent 1.2px);
  background-size: 28px 28px;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--tex-grain);
  opacity: 0.05;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 60;
}

a { color: var(--ink-hi); text-underline-offset: 3px; text-decoration-color: var(--line); }
a:hover { text-decoration-color: currentColor; }

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

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  z-index: 30;
  background: var(--ink-hi); color: var(--ground);
  padding: 0.5rem 1rem; border-radius: 3px;
  font-size: 0.85rem;
  transition: top 0.15s var(--swift);
}
.skip-link:focus { top: 1rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 96vh;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  max-width: none;
  margin: 0;
  padding: 0 1.5rem 9vh 6vw;
  text-align: left;
}
.hero-scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}
.hero-scene svg { width: 100%; height: 100%; display: block; }
.hero-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    115% 95% at 26% 80%,
    rgba(24, 46, 30, 0.42) 0%,
    rgba(13, 26, 17, 0.52) 48%,
    rgba(8, 13, 9, 0.62) 100%
  );
}
.hero .standfirst { margin: 0; }
.addr {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-mid);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.5rem 0 1.3rem;
}
.addr b { font-weight: 400; color: var(--ink-lo); margin-right: 0.3em; }
body.js .addr .addr-line { animation: addr-stamp 0.18s steps(2, end) both; }
body.js .addr .addr-line:first-child { animation-delay: 2.3s; }
body.js .addr .addr-line:last-child { animation-delay: 2.55s; }
@keyframes addr-stamp { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.js .addr .addr-line { animation: none; } }
.kicker { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-lo); margin-bottom: 1rem; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.hero-ember .lamp-bulb { filter: drop-shadow(0 0 8px rgba(239, 166, 73, 0.7)); }
body.js .hero-ember .lamp-glow { animation: lamp-flicker 6s ease-in-out 3s infinite; }
@keyframes lamp-flicker { 0%, 100% { opacity: 1; } 47% { opacity: 0.84; } 52% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .hero-ember .lamp-glow, .hero-ember.ember-ack .lamp-glow { animation: none; } }
.hero h1 {
  font-family: var(--loud);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--ink-hi);
  margin-bottom: 1.4rem;
  transform: rotate(-1.2deg);
  text-shadow:
    1px 1px 0 #0A1C10, 2px 2px 0 #0A1C10, 3px 3px 0 #0A1C10,
    4px 4px 0 #0A1C10, 5px 5px 0 #0A1C10;
}
.hero h1 .zing {
  display: block;
  font-size: 1.6em;
  margin-top: 0.04em;
  color: #EFA649;
  text-shadow:
    1px 1px 0 #0A1C10, 2px 2px 0 #0A1C10, 3px 3px 0 #0A1C10,
    4px 4px 0 #0A1C10, 5px 5px 0 #0A1C10, 6px 6px 0 #0A1C10,
    0 0 28px rgba(239, 166, 73, 0.38);
}
.standfirst { font-family: var(--serif); color: var(--ink-lo); font-size: 1.0625rem; line-height: 1.55; max-width: 33rem; }
.zing { position: relative; display: inline-block; }
.desk-under {
  position: absolute;
  left: -2%;
  top: 96%;
  width: 104%;
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}
.desk-under circle { fill: var(--hole); stroke: currentColor; stroke-width: 2; transition: fill 0.15s var(--swift); transform-box: fill-box; transform-origin: center; }
.desk-under .hw-obj, .desk-under [data-domain] { pointer-events: auto; }
.hero-scene { pointer-events: none; }
body.js .desk-under [data-domain]:hover { animation: junc-blip 0.35s cubic-bezier(0.2, 1.7, 0.4, 1); }
@keyframes junc-blip { 0% { transform: scale(1); } 45% { transform: scale(1.3); } 100% { transform: scale(1); } }
.hw-plant .hw-leaf { opacity: 0; transition: opacity 0.4s var(--swift); }
.hw-plant:hover .hw-leaf { opacity: 1; }
.desk-under circle.on { fill: currentColor; }
/* boot sequence: the wire draws itself out of the socket, junctions pop in along it */
body.js .hw-cable { stroke-dasharray: 1; stroke-dashoffset: 1; animation: cable-draw 1.1s cubic-bezier(0.4, 0.7, 0.2, 1) 0.35s forwards; }
@keyframes cable-draw { to { stroke-dashoffset: 0; } }
body.js .desk-under [data-domain] { animation: junc-pop 0.45s cubic-bezier(0.2, 1.7, 0.4, 1) both; }
@keyframes junc-pop { from { transform: scale(0); } to { transform: scale(1); } }
body.js .desk-under [data-domain]:nth-of-type(1) { animation-delay: 0.5s; }
body.js .desk-under [data-domain]:nth-of-type(2) { animation-delay: 0.64s; }
body.js .desk-under [data-domain]:nth-of-type(3) { animation-delay: 0.78s; }
body.js .desk-under [data-domain]:nth-of-type(4) { animation-delay: 0.92s; }
body.js .desk-under [data-domain]:nth-of-type(5) { animation-delay: 1.1s; }
body.js .desk-under [data-domain]:nth-of-type(6) { animation-delay: 1.28s; }
@media (max-width: 1050px) { .hw-obj { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .desk-under circle { transition: none; }
  body.js .hw-cable { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; }
  body.js .desk-under [data-domain] { animation: none; transform: scale(1); }
  body.js .desk-under [data-domain]:hover { animation: none; }
  .hw-plant .hw-leaf { transition: none; }
}
.cue {
  font-size: 0.85rem;
  color: var(--ink-lo);
  margin-top: 1.6rem;
  transition: opacity 0.2s var(--swift);
}
body.has-scrolled .cue { opacity: 0; }
body.has-scrolled .cue--loop { opacity: 1; }
.loop-fig { margin: 2rem 0 0; }
.loop-fig svg { width: 7.5rem; height: 7.5rem; display: block; overflow: visible; color: var(--line); }
.loop-fig figcaption { margin-top: 0.6rem; }
body:not(.js) .loop-fig { display: none; }
.cue--loop { margin-top: 2.6rem; }
.cue--loop button {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-lo);
  cursor: pointer;
}
.cue--loop button:hover, .cue--loop button:focus-visible { color: var(--ink-mid); text-decoration: underline; }
.hero-ember.ember-ack .lamp-glow { animation: ember-ack 2.6s linear 1, lamp-flicker 6s ease-in-out 3s infinite; }
@keyframes ember-ack { 0% { opacity: 0; } 44% { opacity: 0; } 62% { opacity: 1; } 100% { opacity: 1; } }

/* ---------- essay grid ---------- */
.essay {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 0 4rem;
  max-width: none;
  margin: 0;
  padding: 0;
}
.stage-col { min-width: 0; }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #0B0F0C;
}
.image-plane {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  transform-origin: 0 0;
  will-change: transform;
  transition: transform 0.62s cubic-bezier(0.2, 0.78, 0.2, 1);
}
.scene { display: block; width: 100%; height: 100%; }
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--tex-grain);
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1;
}

#dimmer { opacity: calc(var(--dim, 0) * 0.93); pointer-events: none; }
#window-keep { opacity: var(--dim, 0); pointer-events: none; }
body[data-active-beat="finale"] #window-keep { pointer-events: auto; cursor: pointer; }

/* the focus ring: one functional mark — where the pipeline is reading */
#focus { transition: transform 0.62s cubic-bezier(0.28, 1.12, 0.3, 1), color 0.18s var(--swift), opacity 0.15s var(--swift); }
#focus circle { fill: none; }
.scene-halo {
  position: absolute;
  left: 0; top: 0;
  pointer-events: none;
  transition: transform 0.62s cubic-bezier(0.2, 0.78, 0.2, 1), opacity 0.2s var(--swift);
  will-change: transform, opacity;
}
.scene-halo-core {
  position: absolute;
  width: calc(var(--halo-r, 170px) * 2);
  height: calc(var(--halo-r, 170px) * 2);
  left: calc(-1 * var(--halo-r, 170px));
  top: calc(-1 * var(--halo-r, 170px));
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 178, 92, 0.20), rgba(242, 178, 92, 0.07) 55%, transparent 100%);
  animation: halo-breathe 3.4s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes halo-breathe { 0%, 100% { transform: scale(1); opacity: 0.82; } 50% { transform: scale(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .scene-halo-core { animation: none; } }

/* label-maker tape: two-tone emboss, one lighter top edge */
.stage-caption {
  position: absolute;
  z-index: 2;
  left: 1.2rem; bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #B9C4B4; /* pinned: the tape is a physical object, immune to daylight */
  background: #0A0D0A;
  background-image: var(--tex-speck);
  background-blend-mode: overlay;
  padding: 0.35rem 0.8rem;
  border-radius: 2px;
  border-top: 1px solid rgba(233, 239, 228, 0.22);
  transform: rotate(-0.8deg);
  max-width: 80%;
}

/* ==========================================================================
   THE PIPELINE — one wire, node pills, ports that hand colour forward.
   ========================================================================== */
.story {
  min-width: 0;
  padding: 20vh 3rem 28vh 3.6rem;
  position: relative;
}
.beat {
  max-width: 36rem;
  margin: 0;
  padding: 11vh 0;
  position: relative;
  --dcol: var(--rest);
  --dnext: var(--rest);
  --copper: var(--dcol);
  --copper-dim: color-mix(in srgb, var(--dcol) 40%, var(--substrate));
  --gold: color-mix(in srgb, var(--dcol) 45%, #E0C878);
}
.beat[data-domain="trade"]   { --dcol: var(--trade); }
.beat[data-domain="client"]  { --dcol: var(--client); }
.beat[data-domain="product"] { --dcol: var(--product); }
.beat[data-domain="fintech"] { --dcol: var(--fintech); }
.beat[data-domain="press"]   { --dcol: var(--press); }
.beat[data-domain="home"]    { --dcol: var(--home); }

/* the wire: one continuous segment per beat; fills with the beat's own
   colour once the pipeline has run past it */
.beat::before {
  content: "";
  position: absolute;
  left: -2.3rem;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--line);
  transition: background-color 0.18s var(--swift);
}
.beat.passed::before { background: var(--copper); }
.beat:first-of-type::before { top: 40%; }
.beat--finale::before { bottom: 55%; }

/* entry port: this node's own domain */
.node::before {
  content: "";
  position: absolute;
  left: -2.3rem;
  top: 50%;
  width: 11px; height: 11px;
  border-radius: 1px;
  background: var(--hole);
  border: 2.5px solid var(--copper);
  transform: translate(calc(-50% + 1px), -50%);
  transition: background-color 0.15s var(--swift);
}
.beat.passed .node::before, .beat.is-active .node::before { background: var(--copper); }

/* exit port: the colour of the node this one feeds — causality made visible */
.beat:not(.beat--rest):not(.beat--finale)::after {
  content: "";
  position: absolute;
  left: -2.3rem;
  bottom: 4.5vh;
  width: 8px; height: 8px;
  border-radius: 1px;
  background: var(--dnext);
  transform: translateX(calc(-50% + 1px));
  opacity: 0.85;
}

/* ---------- the node pill ---------- */
.node {
  position: relative;
  display: block;
  max-width: 100%;
}
.pcb {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.pcb .p-hole-ring { fill: none; stroke: var(--copper-dim); stroke-width: 2.5; }
.pcb .p-hole { fill: var(--hole); }
.pcb .p-finger { fill: var(--copper-dim); }
.pcb .p-trace { fill: none; stroke: var(--copper-dim); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pcb .p-via { fill: var(--copper-dim); }
.pcb .p-ic { fill: #10140F; stroke: var(--substrate-edge); stroke-width: 1; }
.pcb .p-pad { fill: var(--copper-dim); }
.pcb .p-pin1 { fill: var(--silkscreen-dim); }
.pcb .p-silk { fill: var(--silkscreen-dim); font-family: var(--mono); }
.pcb .p-part { fill: var(--silkscreen); font-family: var(--mono); }
.beat.is-active .pcb .p-hole-ring,
.beat.passed .pcb .p-hole-ring { stroke: var(--copper); }
.beat.is-active .pcb .p-trace,
.beat.passed .pcb .p-trace { stroke: var(--copper); }
.beat.is-active .pcb .p-via,
.beat.passed .pcb .p-via { fill: var(--copper); }
.beat.is-active .pcb .p-finger,
.beat.passed .pcb .p-finger { fill: var(--gold); }
.beat.is-active .pcb .p-pad,
.beat.passed .pcb .p-pad { fill: var(--copper); }
.pcb .p-hole-ring, .pcb .p-finger, .pcb .p-trace, .pcb .p-via, .pcb .p-pad {
  transition: stroke 0.15s var(--swift), fill 0.15s var(--swift);
}
.nl { display: block; line-height: 1.4; min-width: 0; }
.l1 { display: inline; color: var(--ink-lo); font-family: var(--mono); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.14em; }
.l2 { display: inline; color: var(--copper); font-family: var(--mono); font-size: 0.62rem; font-weight: 400; text-transform: uppercase; letter-spacing: 0.14em; }
.l2::before { content: "\00B7 "; color: var(--ink-lo); }
.l3 { color: var(--ink-hi); font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; margin-top: 0; }
.l3::before { content: ""; display: block; width: 2.6rem; height: 1px; background: var(--copper); opacity: 0.55; margin: 0.6rem 0 0.65rem; }


/* prose hangs off the node, uncontained */
.beat p:not(.fact):not(.skicker):not(.l1) { font-family: var(--serif); line-height: 1.55; margin-top: 1.4rem; max-width: 60ch; font-size: 1.0625rem; }
.beat .fact {
  margin: 2.4rem 0 0;
  max-width: 24ch;
  font-family: var(--loud);
  font-weight: 400;
  font-size: 1.7rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--dcol) 70%, var(--ink-hi));
  text-shadow:
    0 0 24px color-mix(in srgb, currentColor 55%, transparent),
    0 0 7px color-mix(in srgb, currentColor 32%, transparent);
}
.beat .fact.finale-links {
  text-shadow: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  line-height: 1.6;
  margin-top: 2.2rem;
  max-width: none;
}

/* ---------- stage headers (rests): labelled junctions, not displays ---------- */
.beat--rest { padding: 12vh 0 14vh; }
.skicker {
  position: relative;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--stage-accent, var(--ink-mid));
}
.skicker::after { content: ""; display: block; width: 2.6rem; height: 1px; background: currentColor; opacity: 0.55; margin-top: 0.65rem; }
.beat--rest .skicker::before {
  content: "";
  position: absolute;
  left: -2.3rem;
  top: 0.1em;
  width: 12px; height: 12px;
  border-radius: 1px;
  background: var(--ground);
  border: 2.5px solid var(--ink-lo);
  transform: translateX(calc(-50% + 1px));
}
.beat--rest.passed .skicker::before, .beat--rest.is-active .skicker::before { border-color: var(--ink-hi); }
.beat--rest[data-scene="bedroom"]   { --stage-accent: var(--trade); }
.beat--rest[data-scene="workshop"]  { --stage-accent: var(--product); }
.beat--rest[data-scene="boardroom"] { --stage-accent: var(--fintech); }
.beat--rest[data-scene="farm"]      { --stage-accent: var(--home); }
.sname {
  font-family: var(--loud);
  font-weight: 400;
  color: var(--stage-accent, var(--ink-hi));
  font-size: clamp(2.7rem, 5.2vw, 3.6rem);
  line-height: 1.0;
  margin: 1rem 0 0;
  --snsh: color-mix(in srgb, var(--stage-accent, #5E6B60) 28%, #040705);
  text-shadow:
    1px 1px 0 var(--snsh), 2px 2px 0 var(--snsh), 3px 3px 0 var(--snsh),
    4px 4px 0 var(--snsh), 5px 5px 0 var(--snsh), 6px 6px 0 var(--snsh),
    7px 7px 0 var(--snsh), 8px 8px 0 var(--snsh);
}
.beat--rest .fact { color: var(--ink-hi); }

/* ---------- finale: the last port, and no pill ---------- */
.beat--finale { padding-bottom: 12vh; }
.beat--finale .l1 { display: block; font-size: 0.72rem; }
.beat--finale h3 {
  font-family: var(--loud);
  font-weight: 400;
  font-size: clamp(2.2rem, 3.4vw, 2.9rem);
  letter-spacing: 0.01em;
  color: var(--home);
  margin: 0.4rem 0 1rem;
  transform: rotate(-1deg);
  text-shadow:
    1px 1px 0 #060A08, 2px 2px 0 #060A08,
    3px 3px 0 #060A08, 4px 4px 0 #060A08;
}
.beat--finale > h3::before {
  content: "";
  position: absolute;
  left: -2.3rem;
  top: 0;
  width: 13px; height: 13px;
  border-radius: 1px;
  background: var(--home);
  transform: translateX(calc(-50% + 1px));
}
.finale-links a { color: var(--home); }

.colophon {
  max-width: 30rem;
  margin-top: 8vh;
  padding: 2.2rem 0 8rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--silkscreen-dim);
  border-top: 1px solid var(--line);
}
.colophon p { margin-bottom: 0.5rem; }
.maker-mark { margin: 0 0 1.6rem; display: flex; align-items: center; gap: 1.2rem; }
.mm-frame { position: relative; display: block; flex: none; }
.maker-mark img { width: 120px; height: 120px; image-rendering: pixelated; display: block; transition: filter 0.35s var(--swift); }
.maker-mark:hover img { filter: drop-shadow(0 0 7px rgba(201, 180, 88, 0.45)) brightness(1.08); }
.mm-head { position: absolute; left: -4px; right: -4px; height: 2px; top: 0; background: var(--ink-hi); opacity: 0; pointer-events: none; }
.maker-mark figcaption { display: flex; flex-direction: column; gap: 0.35rem; text-transform: uppercase; letter-spacing: 0.1em; }
.maker-mark figcaption span:first-child { color: var(--ink-mid); }
/* the operator prints on arrival: stepped row reveal under a squeegee line */
@media (prefers-reduced-motion: no-preference) {
  body.js .maker-mark:not(.printed) img { clip-path: inset(0 0 100% 0); }
  body.js .maker-mark:not(.printed) figcaption span { opacity: 0; }
  body.js .maker-mark.printed img { animation: mm-print 1.3s steps(30, end) both; }
  body.js .maker-mark.printed .mm-head { animation: mm-sweep 1.3s linear both; }
  body.js .maker-mark.printed figcaption span { animation: mm-stamp 0.18s steps(2, end) both; }
  body.js .maker-mark.printed figcaption span:first-child { animation-delay: 1.35s; }
  body.js .maker-mark.printed figcaption span:last-child { animation-delay: 1.55s; }
}
@keyframes mm-print { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mm-sweep { 0% { top: 0; opacity: 0.9; } 94% { opacity: 0.9; } 100% { top: 118px; opacity: 0; } }
@keyframes mm-stamp { from { opacity: 0; } to { opacity: 1; } }
.colophon a { color: var(--ink-lo); }

/* ---------- rail: time, drawn truthfully ---------- */
.rail {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: #0B0F0C;
  border-top: 1px solid var(--line);
  padding: 0.75rem 3rem 0.95rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--swift);
}
body.story-active .rail { opacity: 1; pointer-events: auto; }
.rail-track {
  position: relative;
  height: 2px;
  background: var(--line);
  border-radius: 1px;
}
/* the return trace: at the finale, the timeline closes its circuit */
.rail-return {
  position: absolute;
  right: 0;
  top: 5px;
  height: 1px;
  width: 0;
  background: var(--home);
  opacity: 0.55;
  transition: width 1.2s cubic-bezier(0.2, 0.78, 0.2, 1) 0.4s;
}
.rail-return::before, .rail-return::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 1px;
  height: 5px;
  background: var(--home);
}
.rail-return::before { left: 0; }
.rail-return::after { right: 0; }
body[data-active-beat="finale"] .rail-return { width: 100%; }
@media (prefers-reduced-motion: reduce) { .rail-return { transition: none; } }
.rail-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--ink-hi);
  transition: width 0.18s var(--swift), background 0.18s var(--swift);
}
.rail-ticks { position: relative; height: 1.5rem; margin-top: 0.15rem; }
.rail-tick {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--ink-lo);
  padding: 0.15rem 0.2rem;
  transition: color 0.12s var(--swift);
}
.rail-tick::before {
  content: "";
  position: absolute;
  top: -0.35rem;
  left: 50%;
  width: 6px; height: 6px;
  border-radius: 1px;
  background: var(--hole);
  border: 1.5px solid var(--jc, currentColor);
  transform: translate(-50%, -50%);
}
.rail-tick.on::before { background: var(--jc, currentColor); }
.rail-tick:hover, .rail-tick:focus-visible { color: var(--ink-mid); }
.rail-tick[aria-current="step"] { color: var(--ink-hi); }
.rail-tick.no-label { font-size: 0; padding: 0.35rem; }

/* ---------- the bleed: the story is pasted ONTO the room ---------- */
@media (min-width: 1051px) {
  .story { margin-left: -15rem; z-index: 3; }
  .sname { font-size: clamp(3rem, 4.8vw, 4.4rem); }
  /* readability: edgeless radial scrims only. One shared left edge; scrim
     padding is refunded by an equal negative margin so type never moves. */
  .beat > p:not(.skicker),
  .beat .node,
  .sname,
  .beat--finale h3 {
    /* a flat scrim with a blurred same-colour shadow: the edge feathers OUTSIDE
       the box, so it dissolves instead of cutting - in both dusk and daylight */
    background: color-mix(in srgb, var(--scrim, #0B0F0C) 90%, transparent);
    box-shadow: 0 0 30px 18px color-mix(in srgb, var(--scrim, #0B0F0C) 90%, transparent);
    padding: 1.1rem 1.7rem;
    margin-left: -1.7rem;
  }
  .node::before { left: -0.6rem; }
  .beat--finale > h3::before { left: -0.6rem; }
}

/* ---------- background temperature: cool 2000s -> warm now (subtle) ---------- */
body { transition: background-color 1.2s ease; }
body[data-scene="bedroom"]  { background-color: #0E1312; }
body[data-scene="workshop"] { background-color: #0F1410; }
body[data-scene="boardroom"]{ background-color: #10140F; }
body[data-scene="farm"]     { background-color: #13140E; }
@media (prefers-reduced-motion: reduce) { body { transition: none; } }

/* finale: the wire stays energised; the last junction is the window */
body[data-active-beat="finale"] .rail-fill { background: var(--home) !important; width: 100% !important; }
.rail-tick:last-child::before { border-color: var(--home); }


.pcb .p-core { stroke: color-mix(in srgb, var(--copper) 55%, #FFFFFF); stroke-width: 0.8; fill: none; opacity: 0; transition: opacity 0.2s var(--swift) 0.3s; }
.beat.is-active .pcb .p-core, .beat.passed .pcb .p-core { opacity: 0.9; }
.pcb .p-pulse { stroke: color-mix(in srgb, var(--copper) 40%, #FFFFFF); stroke-width: 3; fill: none; stroke-linecap: round; opacity: 0; }
.pcb.pulse .p-pulse { opacity: 0.9; animation: pulse-run 0.45s cubic-bezier(0.3, 0.7, 0.2, 1) 1 forwards; }
@keyframes pulse-run { from { stroke-dashoffset: 1.3; } to { stroke-dashoffset: -0.3; opacity: 0; } }
.beat.is-active .pcb .p-finger { transition-delay: 0.12s; }
.beat.is-active .pcb .p-trace, .beat.is-active .pcb .p-via, .beat.is-active .pcb .p-pad { transition-delay: 0.25s; }
.pz-tr, .pz-comp { will-change: transform; }

/* the $100 held moment: screens hold pending, then tick over. */
.scene .m-pend, .scene .m-paid { display: none; }
body[data-active-beat="bigmonitor"]:not([data-paid]) .scene .m-pend { display: block; }
body[data-paid] .scene .m-paid { display: block; }
body[data-active-beat="bigmonitor"] .scene #bigmonitor ellipse.lit { opacity: 0.2; }

/* the switch: colour enters the essay here. Before it, the system runs grey. */
body[data-pre-switch] {
  --trade: #6E7A70; --client: #6E7A70; --product: #6E7A70;
  --fintech: #6E7A70; --press: #6E7A70; --home: #6E7A70;
}
body[data-pre-switch] .desk-under [data-domain] { color: #5E6B60 !important; }
.scene #crt .lit { transition: opacity 0.5s var(--swift); }
body[data-pre-switch] .scene #crt .lit { opacity: 0.1 !important; }
@media (prefers-reduced-motion: reduce) { .scene #crt .lit { transition: none; } }

.pcb .p-scratch { fill: var(--silkscreen-dim); font-family: var(--mono); opacity: 0.75; }

/* ---------- debug overlay ---------- */
.debug-dot {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid #FF5470;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.debug-dot span {
  position: absolute; left: 16px; top: -4px;
  font-size: 10px;
  color: #FF5470;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.6);
  padding: 0 4px;
}

/* ---------- mobile ---------- */
@media (max-width: 1050px) {
  .essay { grid-template-columns: 1fr; padding: 0 1rem; }
  .stage-col { position: sticky; top: 0; z-index: 10; }
  .stage {
    position: static;
    height: 34vh;
    border-bottom: 1px solid var(--line);
  }
  .story { padding: 6vh 0.4rem 2vh 2.9rem; }
  .beat { padding: 8vh 0; }
  /* at max scroll the sticky strip covers the top 34vh: the outro must fit
     entirely in the band below it, so the tail paddings go */
  .colophon { padding-bottom: 2.5rem; margin-top: 5vh; }
  .node { padding-right: 1.2rem; }
  .pcb .p-trace, .pcb .p-via, .pcb .p-fp { display: none; }
    .rail { padding: 0.7rem 1.2rem 0.8rem; }
  .hero { min-height: 86vh; padding: 0 1.2rem 14vh 1.4rem; }
  .hero .standfirst { font-size: 0.98rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .image-plane, #focus, .scene-halo { transition: none; }
  .rail-fill, .beat::before, .node, .node::after { transition: none; }
  .pcb * { transition: none !important; }
  .pcb.pulse .p-pulse { animation: none; opacity: 0; }
}

/* ---------- daylight: the farm faces a window ----------
   Stage 04 lets the morning in - the one scene where the desk gets a view.
   The room itself repaints (wall, sky, sun, fields; the lamp goes off), the
   page follows, and the copy scrims track --scrim so they never turn into
   boxes. The finale is excluded on purpose: dusk falls again there, so the
   window light has something to stay on against. */
@property --scrim { syntax: "<color>"; inherits: true; initial-value: #0B0F0C; }
body {
  --scrim: #0B0F0C;
  transition: background-color 1.6s ease, color 1.6s ease, --scrim 1.6s ease;
}
.beat p, .beat .fact, .l1, .l2, .l3, .skicker, .sname,
.colophon, .colophon a, .maker-mark figcaption span {
  transition: color 1.2s ease, text-shadow 1.2s ease;
}
.rail { transition: opacity 0.2s var(--swift), background-color 1.2s ease; }

body.daylight {
  --ink-hi: #131A12;
  --ink-mid: #37432F;
  --ink-lo: #5C6A55;
  --ground: #E4E6D0;
  --ground-lift: #D8DBC2;
  --line: rgba(19, 26, 18, 0.16);
  --substrate-edge: #C6CBB4;
  --scrim: #E4E6D0;
  background-color: #E4E6D0; /* outranks the scene temperature tints above */
  background-image: radial-gradient(rgba(19, 26, 18, 0.07) 1px, transparent 1.2px);
  background-size: 28px 28px;
}
body.daylight .rail { background: var(--ground); }
/* cream-on-cream would vanish: the farm accent darkens to olive in its own light */
body.daylight .beat--rest[data-scene="farm"] { --stage-accent: #5C5A26; }
/* nothing needs to emit light at noon */
body.daylight .beat .fact { text-shadow: none; }
/* the finale starts in daylight now: its cream type borrows the olive until dusk */
.beat--finale h3, .finale-links a, .beat--finale .l1 { transition: color 1.2s ease; }
body.daylight .beat--finale h3 { color: #5C5A26; }
body.daylight .beat--finale > h3::before { background: #5C5A26; }
body.daylight .finale-links a { color: var(--ink-hi); }

/* the room repaints: morning arrives inside the artwork, not on top of it */
.scape-bg, .scape-floor, .scape-floorline, .farm-wall,
.farm-sky, .farm-sky-hi, .farm-horizon, .farm-sun,
.farm-field-a, .farm-field-b, .farm-furrows, #lamp .lit {
  transition: fill 1.6s ease, stroke 1.6s ease, opacity 1.6s ease, transform 1.6s ease;
}
body.daylight .scape-bg { fill: #8C9A74; }
body.daylight .scape-floor { fill: #6F7B52; }
body.daylight .scape-floorline { fill: #59653F; }
body.daylight .farm-wall { fill: #A3B183; }
body.daylight .farm-sky { fill: #A9CBDA; }
body.daylight .farm-sky-hi { fill: rgba(255, 255, 255, 0.4); }
body.daylight .farm-horizon { fill: #EFD9A6; }
body.daylight .farm-sun { fill: #F6D874; transform: translateY(-44px); }
body.daylight .farm-field-a { fill: #7FA057; }
body.daylight .farm-field-b { fill: #6A8A4C; }
body.daylight .farm-furrows { stroke: #5B7A42; }
body.daylight #lamp .lit { opacity: 0.04; } /* the lamp is off at noon */

/* a last warm breath of sun through the window - gentle, the room does the work */
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(120% 95% at 78% 26%, rgba(255, 238, 200, 0.26), rgba(255, 238, 200, 0.07) 45%, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 1.6s ease;
}
body.daylight .stage::before { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  body, .stage::before { transition: none; }
  .scape-bg, .scape-floor, .scape-floorline, .farm-wall,
  .farm-sky, .farm-sky-hi, .farm-horizon, .farm-sun,
  .farm-field-a, .farm-field-b, .farm-furrows, #lamp .lit { transition: none; }
}
