/* Motion layer: home scenes, scrubbed reveals, filters, page transitions.
   Everything that moves sits behind `.motion-on` (set by motion.js unless the visitor prefers
   reduced motion). Without it, scenes fall back to a static, readable layout. */

/* ------------------------------------------------------------ page-wide */
.site-header { view-transition-name: site-header; }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; }
.scroll-progress-bar { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out .26s cubic-bezier(.4, 0, 1, 1) both; }
  ::view-transition-new(root) { animation: vt-in .42s cubic-bezier(.2, .7, .2, 1) both; }
  ::view-transition-group(*) { animation-duration: .5s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
}
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }

/* One orchestrated load moment per page: lines and words rise into place. */
.motion-on .hero-rise { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .9s var(--ease); }
.motion-on .hero-line > .hero-rise { opacity: 1; transform: translateY(108%); }
.motion-on.is-loaded .hero-rise { opacity: 1; transform: none; }
.r1 { transition-delay: .05s; } .r2 { transition-delay: .12s; } .r3 { transition-delay: .22s; } .r4 { transition-delay: .36s; }
.r5 { transition-delay: .46s; } .r6 { transition-delay: .56s; } .r7 { transition-delay: .7s; }
.hero-line { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; margin-bottom: -.06em; }
.hero-line > .hero-rise { display: inline-block; }
.split-words .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .1em; margin-bottom: -.1em; }
.split-words .wi { display: inline-block; }
.motion-on .split-words .wi { transform: translateY(110%); transition: transform .85s var(--ease); transition-delay: calc(var(--i) * 45ms + .08s); }
.motion-on.is-loaded .split-words .wi { transform: none; }

/* Filter chips (bench tools, work areas) */
.bench-tools, .work-filter { display: grid; gap: 10px; margin: 6px 0 24px; }
.bench-tools-label { font-size: var(--text-s); font-weight: 600; color: var(--ink-2); }
.bench-tools-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--porcelain); font-size: var(--text-s); font-weight: 600; color: var(--ink); transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.tool-chip:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.tool-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--porcelain); }
.tool-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--paper-deep); font: 600 var(--text-xs)/1 var(--mono); color: var(--ink-2); }
.tool-chip[aria-pressed="true"] .tool-count { background: rgb(255 255 255 / 16%); color: var(--porcelain); }
.bench-tools-status { min-height: 1.5em; font-size: var(--text-s); color: var(--ink-3); }
.tool-more { display: contents; }
.tool-more-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px dashed var(--ink-3); background: transparent; font-size: var(--text-s); font-weight: 600; color: var(--ink-2); transition: background-color .2s, color .2s, border-color .2s; }
.tool-more-toggle:hover { background: var(--porcelain); border-style: solid; color: var(--ink); }
.tool-more-toggle[aria-expanded="true"] { border-style: solid; }

/* ------------------------------------------------------------ home: hero */
.hero-xl { position: relative; display: grid; grid-template-rows: 1fr auto; min-height: calc(100svh - var(--header-h, 68px)); padding: clamp(18px, 4vw, 48px) 0 20px; overflow: clip; }
.hero-grid-bg { position: absolute; inset: -12% 0 0; pointer-events: none;
  background:
    radial-gradient(34% 40% at 74% 40%, rgb(255 252 242 / 85%), rgb(255 250 236 / 0) 100%),
    linear-gradient(rgb(110 90 60 / 6%) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgb(110 90 60 / 6%) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(rgb(110 90 60 / 11%) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(90deg, rgb(110 90 60 / 11%) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(180deg, #ede4d4, #e3d7c3);
  -webkit-mask-image: radial-gradient(60% 55% at 72% 42%, #000 20%, transparent 72%); mask-image: radial-gradient(60% 55% at 72% 42%, #000 20%, transparent 72%); }
.hero-xl .hero-grid { position: relative; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; }
.hero-float { position: relative; height: min(58vh, 540px); min-height: 340px; }
.float-shadow { position: absolute; left: 8%; right: 8%; bottom: 2%; height: 14%; border-radius: 50%; background: radial-gradient(closest-side, rgb(70 52 28 / 18%), transparent); }
.float-obj { position: absolute; display: block; will-change: transform; }
.float-obj svg { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 16px 18px rgb(70 52 28 / 20%)); }
.float-bob { display: block; }
.fo-rack { left: 32%; top: 8%; width: 36%; z-index: 2; }
.fo-kit { left: 0; top: 4%; width: 30%; }
.fo-folder { right: 0; top: 0; width: 30%; }
.fo-switch { left: 2%; top: 56%; width: 40%; z-index: 3; }
.fo-lan { right: 0; top: 58%; width: 42%; z-index: 3; }
.motion-on .float-obj { opacity: 0; transition: opacity .9s var(--ease); }
.motion-on.is-loaded .float-obj { opacity: 1; }
.motion-on .fo-kit { transition-delay: .35s; } .motion-on .fo-rack { transition-delay: .2s; } .motion-on .fo-folder { transition-delay: .5s; }
.motion-on .fo-switch { transition-delay: .62s; } .motion-on .fo-lan { transition-delay: .74s; }
.motion-on .float-bob { animation: bob 7s ease-in-out infinite; }
.fo-kit .float-bob { animation-duration: 8s; animation-delay: -2s; }
.fo-folder .float-bob { animation-duration: 6.5s; animation-delay: -4s; }
.fo-switch .float-bob { animation-duration: 9s; animation-delay: -1s; }
.fo-lan .float-bob { animation-duration: 7.5s; animation-delay: -3s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-10px) rotate(-.6deg); } }

.hero-foot { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-top: 22px; }
.hero-facts-row { flex: 1 1 auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; max-width: 980px; background: none; border: 0; border-radius: 0; box-shadow: none; }
.hero-facts-row > li, .hero-facts-row > li + li { border: 1px solid rgb(120 100 70 / 20%); }
.hero-facts-row > li { border-radius: 6px 12px 12px 6px; rotate: var(--tag-r, -.8deg); transform-origin: 14px 50%; }
.hero-facts-row > li:nth-child(2) { --tag-r: .6deg; } .hero-facts-row > li:nth-child(3) { --tag-r: -.4deg; }
.hero-facts-row > li { grid-template-columns: minmax(0, 1fr); gap: 4px; align-content: start; } /* label above the text, like the glance tag */
.scroll-cue { flex: none; display: grid; justify-items: center; gap: 8px; min-width: 44px; padding: 6px; font: 600 var(--text-xs)/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); text-decoration: none; }
.scroll-cue-line { position: relative; width: 2px; height: 46px; border-radius: 2px; background: var(--line); overflow: hidden; }
.scroll-cue-line::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%; border-radius: 2px; background: var(--accent); }
.motion-on .scroll-cue-line::after { animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-110%); } 100% { transform: translateY(260%); } }

/* Scroll-linked values change in wheel-sized steps; a short transition smooths them out. */
.motion-on [data-scrub] { transition: transform .32s cubic-bezier(.2, .7, .2, 1), opacity .32s linear; }
.motion-on .contrib-list > li::after { transition: transform .32s cubic-bezier(.2, .7, .2, 1), background-size .32s linear; }
.motion-on .pipe-packet { transition: transform .2s linear, background-color .3s, box-shadow .3s; }
.motion-on .pipe-track::after { transition: transform .25s linear; }

/* The bench (mat, lamp, arrival, pick-up, filter) lives in bench.css. */

/* ------------------------------------------------------------ pinned scenes (shared) */
.scene { position: relative; }
.scene-stage { position: relative; }
.scene-beats { display: grid; gap: 22px; margin: 22px 0 0; padding: 0; list-style: none; }
.scene-beats h3 { font: 700 var(--text-xl)/1.2 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.scene-beats p { margin-top: 8px; max-width: 46ch; font-size: var(--text-l); line-height: 1.55; color: var(--ink-2); }
.scene-rail { display: none; gap: 6px; margin-top: 24px; }
.scene-jump { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--porcelain); font: 700 var(--text-s)/1 var(--mono); color: var(--ink-2); transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease); }
.scene-jump:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.scene-jump[aria-current="step"] { background: var(--ink); border-color: var(--ink); color: var(--porcelain); }

@media (min-height: 640px) {
  .motion-on .scene-pipeline { height: 290vh; }
  .motion-on .scene-principles { height: 180vh; }
  /* the stage is as tall as its content and sticks centred in the viewport (top set by motion.js) */
  .motion-on :is(.scene-pipeline, .scene-principles) > .scene-stage { position: sticky; top: var(--stage-top, var(--header-h, 68px)); padding: clamp(24px, 3.5vw, 44px) 0; }
}
/* a stage taller than the viewport is never pinned */
.scene[data-fit="no"] { height: auto !important; }
.scene[data-fit="no"] > .scene-stage { position: relative !important; top: auto !important; }

/* In a pinned scene one beat shows at a time; the others stay readable by assistive tech. */
.scene[data-mode="pinned"] .scene-rail { display: flex; }
.scene[data-mode="pinned"] .scene-beats { grid-template-areas: "beat"; gap: 0; }
.scene[data-mode="pinned"] .scene-beats > li { grid-area: beat; opacity: 0; transform: translateY(-14px); pointer-events: none; transition: opacity .18s ease-out, transform .3s ease-out; }
.scene[data-mode="pinned"][data-beat="0"] .scene-beats > li[data-beat="0"],
.scene[data-mode="pinned"][data-beat="1"] .scene-beats > li[data-beat="1"],
.scene[data-mode="pinned"][data-beat="2"] .scene-beats > li[data-beat="2"],
.scene[data-mode="pinned"][data-beat="3"] .scene-beats > li[data-beat="3"],
.scene[data-mode="pinned"][data-beat="4"] .scene-beats > li[data-beat="4"],
.scene[data-mode="pinned"][data-beat="5"] .scene-beats > li[data-beat="5"] { opacity: 1; transform: none; pointer-events: auto; transition: opacity .45s var(--ease) .16s, transform .6s var(--ease) .16s; }
.scene[data-mode="pinned"] .scene-beats h3 { font-size: var(--text-2xl); line-height: 1.06; letter-spacing: -.03em; }

/* ------------------------------------------------------------ home: release pipeline */
.scene-pipeline { padding: clamp(36px, 5vw, 64px) 0; background: var(--porcelain); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.motion-on .scene-pipeline[data-mode="pinned"] { padding: 0; }
.pipe-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; width: min(100% - 2 * var(--gutter), var(--max)); }
.pipe-copy h2 { margin-top: 10px; font: 700 var(--text-2xl)/1.05 var(--serif); letter-spacing: -.03em; text-wrap: balance; max-width: 16ch; }
.scene[data-mode="pinned"] .pipe-copy h2 { font-size: var(--text-xl); line-height: 1.2; color: var(--ink-2); max-width: 24ch; }
.pipe-source, .pr-source { margin-top: 18px; font-size: var(--text-s); color: var(--ink-3); }
.pipe-source a { font-weight: 600; color: var(--ink-2); }
.pipe-diagram { position: relative; padding: clamp(26px, 3.2vw, 40px) clamp(16px, 2.4vw, 30px) clamp(24px, 2.8vw, 32px); } /* surface: the mat strip in pages.css */
.pipe-track { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; --fill: 1; }
.pipe-track::before, .pipe-track::after { content: ""; position: absolute; left: calc(100% / 12); right: calc(100% / 12); top: 20px; height: 3px; border-radius: 2px; background: rgb(110 90 60 / 24%); }
.pipe-track::after { background: var(--ink); transform: scaleX(var(--fill)); transform-origin: 0 50%; }
.pipe-stage { position: relative; z-index: 1; display: grid; justify-items: center; align-content: start; gap: 10px; text-align: center; }
.pipe-node { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--porcelain); border: 2px solid var(--line-strong); transition: background-color .3s, border-color .3s, transform .3s var(--ease); }
.pipe-node::after { content: ""; font: 700 var(--text-s)/1 var(--sans); color: var(--porcelain); }
.pipe-name { font-size: var(--text-s); font-weight: 600; line-height: 1.25; color: var(--ink-2); }
.pipe-stage[data-state="reached"] .pipe-node, .pipe-stage[data-state="live"] .pipe-node, .scene:not([data-mode]) .pipe-node { background: var(--ink); border-color: var(--ink); }
.pipe-stage[data-state="reached"] .pipe-node::after, .scene:not([data-mode]) .pipe-node::after { content: "✓"; }
.pipe-stage[data-state="checking"] .pipe-node { border-color: var(--warn); background: var(--warn-soft); animation: ring 1s ease-out infinite; }
.pipe-stage[data-state="fail"] .pipe-node { border-color: var(--bad); background: var(--bad-soft); transform: scale(1.12); }
.pipe-stage[data-state="fail"] .pipe-node::after { content: "✗"; color: var(--bad); }
.pipe-stage[data-state="live"] .pipe-node { background: var(--ok); border-color: var(--ok); transform: scale(1.12); }
.pipe-stage[data-state="live"] .pipe-node::after { content: "✓"; }
.pipe-stage[data-state="fail"] .pipe-name { color: var(--bad); }
.pipe-stage[data-state="live"] .pipe-name { color: var(--ok); }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgb(138 90 0 / 35%); } 100% { box-shadow: 0 0 0 12px rgb(138 90 0 / 0%); } }
.pipe-packet { display: none; position: absolute; left: 0; top: 0; z-index: 2; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft), 0 8px 16px rgb(160 50 10 / 35%); transition: background-color .3s, box-shadow .3s; will-change: transform; }
.scene[data-mode="pinned"] .pipe-packet { display: block; }
.pipe-packet[data-state="fail"] { background: var(--bad); box-shadow: 0 0 0 7px var(--bad-soft); animation: shake .5s var(--ease); }
.pipe-packet[data-state="ok"] { background: var(--ok); box-shadow: 0 0 0 7px var(--ok-soft); }
@keyframes shake { 20%, 60% { margin-left: -15px; } 40%, 80% { margin-left: -7px; } }
.pipe-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.pipe-slot { display: grid; gap: 2px; padding: 14px 16px; border-radius: 6px 12px 12px 6px; border-width: 1.5px; border-color: rgb(120 100 70 / 32%); rotate: var(--tag-r, -.8deg); transform-origin: 14px 50%; transition: background-color .35s, border-color .35s, transform .45s var(--ease), opacity .35s; }
.pipe-slot[data-slot="next"] { --tag-r: .7deg; }
.pipe-slot-label { font-size: var(--text-xs); font-weight: 600; color: var(--ink-3); }
.pipe-slot-name { font: 700 var(--text-l)/1.3 var(--mono); color: var(--ink); }
.pipe-slot-note { font-size: var(--text-s); color: var(--ink-2); }
.pipe-slot[data-state="live"], .pipe-slot[data-state="kept"] { border-color: var(--ink); background: var(--porcelain); }
.pipe-slot[data-state="kept"] { box-shadow: 0 0 0 4px var(--ok-soft); }
.pipe-slot[data-state="empty"] { border-style: dashed; opacity: .75; }
.pipe-slot[data-state="pending"] { border-style: dashed; border-color: var(--accent); }
.pipe-slot[data-state="checking"] { border-color: var(--warn); background: var(--warn-soft); }
.pipe-slot[data-state="fail"] { border-color: var(--bad); background: var(--bad-soft); }
.pipe-slot[data-state="fail"] :is(.pipe-slot-name, .pipe-slot-note) { color: var(--bad); }
.pipe-slot[data-state="ok"] { border-color: var(--ok); background: var(--ok-soft); transform: translateY(-2px); }
.pipe-slot[data-state="ok"] :is(.pipe-slot-name, .pipe-slot-note) { color: var(--ok); }
.pipe-slot[data-state="standby"] { border-style: dashed; }
.pipe-restore { position: absolute; right: clamp(16px, 2.4vw, 28px); top: 10px; padding: 4px 10px; border-radius: 999px; background: var(--porcelain); border: 1px solid var(--bad); font: 600 var(--text-xs)/1.4 var(--mono); color: var(--bad); opacity: 0; transform: translateY(6px); transition: opacity .35s, transform .45s var(--ease); }
.pipe-restore[data-show="yes"] { opacity: 1; transform: none; }

/* ------------------------------------------------------------ home: how I work */
.scene-principles { padding: clamp(36px, 5vw, 64px) 0; }
.pr-source .text-arrow { margin-left: 6px; min-height: 0; }
.motion-on .scene-principles[data-mode="pinned"] { padding: 0; }
.pr-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 5vw, 72px); align-items: center; width: min(100% - 2 * var(--gutter), var(--max)); }
.pr-beats h3 { font: 700 var(--text-2xl)/1.06 var(--serif); letter-spacing: -.03em; }
.pr-stage { display: grid; gap: 18px; padding: clamp(22px, 3vw, 36px) clamp(16px, 2.6vw, 32px); } /* surface: the mat strip in pages.css */
.pr-panel { margin: 0; padding: 18px 20px 20px; border-radius: 6px 14px 14px 6px; rotate: var(--tag-r, -.6deg); transform-origin: 14px 50%; font: 400 var(--text-s)/1.6 var(--mono); color: var(--ink); }
.pr-cap { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); font-size: var(--text-xs); font-weight: 600; color: var(--ink-3); }
.pr-panel[data-panel="1"] { --tag-r: .5deg; } .pr-panel[data-panel="2"] { --tag-r: -.3deg; }
.pr-cap::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--fam-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fam-accent) 28%, transparent), inset 0 -1px 1px rgb(0 0 0 / 18%); }
.pr-lines { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pr-log .pr-line { display: grid; grid-template-columns: 5.6em 4.4em minmax(0, 1fr) 2.4em; gap: 8px; padding: 3px 6px; border-radius: 6px; }
.pr-t, .pr-k { color: var(--ink-3); }
.pr-r { text-align: right; font-weight: 700; color: var(--ok); }
.pr-line.is-bad { background: var(--bad-soft); color: var(--bad); }
.pr-line.is-bad .pr-r { color: var(--bad); }
.pr-note { margin-top: 12px; padding: 8px 10px; border-radius: 8px; background: var(--paper); border-left: 3px solid var(--bad); font: italic 400 var(--text-m)/1.45 var(--serif); color: var(--ink); }
.pr-diff .pr-line { display: grid; grid-template-columns: 1.4em minmax(0, 1fr); padding: 3px 6px; border-radius: 6px; white-space: pre-wrap; }
.pr-line.is-del { background: var(--bad-soft); color: var(--bad); }
.pr-line.is-add { background: var(--ok-soft); color: var(--ok); }
.pr-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.pr-check { padding: 4px 10px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: 600; font-size: var(--text-xs); }
.pr-check::before { content: "✓ "; }
.pr-runbook .pr-task { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-bottom: 1px dashed var(--line); font: 400 var(--text-m)/1.4 var(--sans); }
.pr-box { position: relative; flex: none; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--ink-2); }
.pr-box::after { content: "✓"; position: absolute; inset: -2px 0 0 2px; font: 700 15px/1 var(--sans); color: var(--ok); }
.l1 { --i: 1; } .l2 { --i: 2; } .l3 { --i: 3; } .l4 { --i: 4; } .l5 { --i: 5; } .l6 { --i: 6; } .l7 { --i: 7; }

/* Pinned: one panel at a time; its lines appear as you scroll through the beat. */
.scene[data-mode="pinned"] .pr-stage { grid-template-areas: "panel"; gap: 0; }
.scene[data-mode="pinned"] .pr-panel { grid-area: panel; opacity: 0; transform: translateY(-16px) scale(.98); transition: opacity .2s ease-out, transform .3s ease-out; }
.scene[data-mode="pinned"][data-beat="0"] .pr-panel[data-panel="0"],
.scene[data-mode="pinned"][data-beat="1"] .pr-panel[data-panel="1"],
.scene[data-mode="pinned"][data-beat="2"] .pr-panel[data-panel="2"] { opacity: 1; transform: none; transition: opacity .45s var(--ease) .16s, transform .6s var(--ease) .16s; }
.scene[data-mode="pinned"] :is(.pr-line, .pr-check, .pr-note) { --show: clamp(0, calc(var(--lp, 1) * 7 - var(--i) + 2.5), 1); opacity: var(--show); transform: translateY(calc((1 - var(--show)) * 8px)); }
.scene[data-mode="pinned"] .pr-box::after { opacity: clamp(0, calc(var(--lp, 1) * 7 - var(--i) + 1.5), 1); }

/* ------------------------------------------------------------ network (home scene + contact page) */
.net-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 5vw, 64px); align-items: center; width: min(100% - 2 * var(--gutter), var(--max)); }
.net-copy .contact-links { margin-top: 22px; }
.net-cta { margin-top: 22px; }
.net-graph { position: relative; width: 100%; max-width: 560px; aspect-ratio: 520 / 420; justify-self: center; }
.net-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.net-cable { fill: none; stroke: var(--line-strong); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--c, 1)); transition: stroke .25s, stroke-width .25s; }
.net-cable-in { --c: var(--c-in, 1); } .net-cable-gh { --c: var(--c-gh, 1); } .net-cable-up { --c: var(--c-up, 1); } .net-cable-you { --c: var(--c-you, 1); stroke-dasharray: 1; }
.net-graph[data-hot="in"] .net-cable-in, .net-graph[data-hot="gh"] .net-cable-gh, .net-graph[data-hot="up"] .net-cable-up { stroke: var(--accent); stroke-width: 4; }
.net-packet { fill: var(--accent); opacity: 0; }
.net-packet-in { --dx: -164px; --dy: -124px; } .net-packet-gh { --dx: 170px; --dy: -114px; }
.net-packet-up { --dx: 180px; --dy: 120px; } .net-packet-you { --dx: -156px; --dy: 134px; fill: var(--ok); }
.motion-on .net-graph[data-on~="in"] .net-packet-in, .motion-on .net-graph.is-draw .net-packet-in { animation: net-go 2.8s ease-in-out infinite; }
.motion-on .net-graph[data-on~="gh"] .net-packet-gh, .motion-on .net-graph.is-draw .net-packet-gh { animation: net-go 3.2s ease-in-out infinite -1s; }
.motion-on .net-graph[data-on~="up"] .net-packet-up, .motion-on .net-graph.is-draw .net-packet-up { animation: net-go 3s ease-in-out infinite -2s; }
.motion-on .net-graph[data-on~="you"] .net-packet-you, .motion-on .net-graph.is-draw .net-packet-you { animation: net-go 2.4s ease-in-out infinite -.6s; }
@keyframes net-go { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.motion-on .net-graph.is-draw .net-cable { animation: net-draw 1.1s var(--ease) both; }
.motion-on .net-graph.is-draw .net-cable-gh { animation-delay: .25s; } .motion-on .net-graph.is-draw .net-cable-up { animation-delay: .45s; } .motion-on .net-graph.is-draw .net-cable-you { animation-delay: .7s; }
@keyframes net-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.net-node { position: absolute; display: grid; justify-items: center; gap: 6px; transform: translate(-50%, -50%); transition: opacity .4s, transform .5s var(--ease); }
.net-node-rv { left: 50%; top: 50%; }
.net-node-in { left: 18.46%; top: 20.48%; opacity: clamp(.3, calc(var(--c-in, 1) * 1.4), 1); }
.net-node-gh { left: 82.69%; top: 22.86%; opacity: clamp(.3, calc(var(--c-gh, 1) * 1.4), 1); }
.net-node-up { left: 84.62%; top: 78.57%; opacity: clamp(.3, calc(var(--c-up, 1) * 1.4), 1); }
.net-node-you { left: 20%; top: 81.9%; opacity: clamp(.3, calc(var(--c-you, 1) * 1.4), 1); }
.net-badge { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--ink); color: var(--porcelain); font: 700 var(--text-s)/1 var(--sans); box-shadow: 0 10px 20px -12px rgb(40 30 15 / 60%); transition: transform .3s var(--ease), background-color .3s; }
.net-badge-rv { width: 82px; height: 82px; border-radius: 50%; background: var(--porcelain); color: var(--ink); border: 2px solid var(--ink); font: 700 2rem/1 var(--serif); letter-spacing: -.04em; }
.net-badge-rv .dot { color: var(--accent); }
.net-node-you .net-badge { background: var(--accent); border-radius: 50%; }
.net-name { font-size: var(--text-xs); font-weight: 600; color: var(--ink-2); }
/* the outer nodes are links (mouse shortcuts to the contact tags' destinations): pointing at one lights it and its cable */
a.net-node { color: inherit; text-decoration: none; cursor: pointer; }
a.net-node:hover .net-name { color: var(--ink); text-decoration: underline; text-underline-offset: .18em; }
.net-graph:has(.net-node-in:hover) .net-cable-in, .net-graph:has(.net-node-gh:hover) .net-cable-gh, .net-graph:has(.net-node-up:hover) .net-cable-up, .net-graph:has(.net-node-you:hover) .net-cable-you { stroke: var(--accent); stroke-width: 4; }
a.net-node:hover .net-badge { transform: scale(1.12); background: var(--accent); }
a.net-node-you:hover .net-badge { background: var(--accent-hover); }
.net-graph[data-hot="in"] .net-node-in .net-badge, .net-graph[data-hot="gh"] .net-node-gh .net-badge, .net-graph[data-hot="up"] .net-node-up .net-badge { transform: scale(1.12); background: var(--accent); }
.scene-network.contact { padding: clamp(36px, 5vw, 64px) 0; border-top: 1px solid var(--line); }
.scene-network .net-copy h2 { font: 700 var(--text-2xl)/1.05 var(--serif); letter-spacing: -.03em; margin: 10px 0 16px; text-wrap: balance; }
.object-net .net-cable { stroke: #a8977a; } /* darker so the cables read on the mat */

/* ------------------------------------------------------------ work list */
.page-head-xl h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4rem); max-width: 18ch; }
.work-filter { margin-top: 22px; }

/* ------------------------------------------------------------ project pages */
.motion-on .case-section[data-scrub="section"] { transform: translateY(calc((1 - var(--p, 1)) * 24px)); opacity: calc(.6 + var(--p, 1) * .4); }
.motion-on .case-section[data-scrub="section"] > h2::before { transform: scaleY(var(--p, 1)); transform-origin: 50% 0; }
.motion-on .contrib-list > li[data-scrub="step"] { transform: translateX(calc((var(--p, 1) - 1) * 16px)); opacity: calc(.55 + var(--p, 1) * .45); }
.motion-on .contrib-list > li[data-scrub="step"]::before { transform: scale(calc(.4 + var(--p, 1) * .6)) rotate(calc((1 - var(--p, 1)) * 90deg)); }
.contrib-list > li:not(:last-child)::after { content: ""; position: absolute; left: 9px; top: calc(.62em + 14px); bottom: -14px; width: 2px; border-radius: 2px; background: linear-gradient(var(--fam-ink), var(--fam-ink)) 0 0 / 100% calc(var(--p, 1) * 100%) no-repeat, var(--line); }
.motion-on .decision[data-scrub="flip"] { transform: perspective(900px) rotateX(calc((1 - var(--p, 1)) * 14deg)) translateY(calc((1 - var(--p, 1)) * 18px)); transform-origin: 50% 0; opacity: calc(.5 + var(--p, 1) * .5); }
.toc { display: grid; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.toc-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.toc-list a { position: relative; display: flex; align-items: center; min-height: 36px; padding-left: 14px; font-size: var(--text-s); font-weight: 600; color: var(--ink-3); text-decoration: none; transition: color .2s; }
.toc-list a::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--line); transition: background-color .25s, transform .25s var(--ease); }
.toc-list a:hover { color: var(--ink); }
.toc-list a[aria-current="true"] { color: var(--ink); }
.toc-list a[aria-current="true"]::before { background: var(--fam-accent); transform: scaleY(1.25); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .pipe-grid, .pr-grid, .net-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-xl .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-float { height: 46vw; min-height: 260px; max-height: 420px; }
}
@media (max-width: 760px) {
  .hero-xl { min-height: 0; }
  .hero-float { height: 64vw; min-height: 220px; }
  .hero-foot { display: block; }
  .hero-facts-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hero-facts-row > li { --tag-r: -.4deg; } .hero-facts-row > li:nth-child(even) { --tag-r: .4deg; }
  .scroll-cue { display: none; }
  .pipe-name { font-size: var(--text-xs); }
  .pipe-node { width: 28px; height: 28px; }
  .pipe-track::before, .pipe-track::after { top: 13px; }
  .pipe-restore { top: -13px; right: 12px; }
  .pipe-slots { margin-top: 18px; gap: 8px; }
  .pipe-slot { padding: 10px 12px; }
  .pipe-slot-name { font-size: var(--text-m); }
  .pipe-slot-note { font-size: var(--text-xs); }
  .scene[data-mode="pinned"] .pipe-grid, .scene[data-mode="pinned"] .pr-grid { gap: 18px; align-content: center; }
  .scene[data-mode="pinned"] .pipe-diagram { order: -1; }
  .scene[data-mode="pinned"] .pr-stage { order: 2; }
  .scene[data-mode="pinned"] .scene-beats h3, .scene[data-mode="pinned"] .pr-beats h3 { font-size: 1.5rem; }
  .scene[data-mode="pinned"] .scene-beats p { font-size: var(--text-m); }
  .scene[data-mode="pinned"] .pipe-copy h2 { font-size: 1.5rem; }
  .scene[data-mode="pinned"] .pipe-source, .scene[data-mode="pinned"] .pr-source { display: none; }
  .scene[data-mode="pinned"] .pr-panel { padding: 14px; font-size: var(--text-xs); }
  .pr-log .pr-line { grid-template-columns: 4.6em minmax(0, 1fr) 2em; }
  .pr-log .pr-k { display: none; }
  .net-graph { max-width: 360px; }
}

@media print {
  .scene { height: auto !important; }
  .scene-stage { position: static !important; height: auto !important; }
  .scene-beats > li, .pr-panel, [data-scrub] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .case-section[data-scrub] > h2::before, .contrib-list > li[data-scrub]::before { transform: none !important; }
  .scroll-progress, .scene-rail, .scroll-cue { display: none !important; }
  .hero-facts-row > li, .pipe-slot, .pr-panel { rotate: 0deg; }
  .pipe-diagram, .pr-stage { background: none; border: 0; box-shadow: none; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-facts-row > li, .pipe-slot, .pr-panel { rotate: 0deg; }
}
@media (forced-colors: active) {
  .tool-chip, .scene-jump, .pipe-node, .pr-panel, .net-badge { border: 1px solid CanvasText; }
  .tool-chip[aria-pressed="true"], .scene-jump[aria-current="step"] { outline: 3px solid Highlight; }
}
