/* ============================================================
   Mainline Studio — Production Stylesheet
   Direction C (Industrial Maker) — locked 2026-04-21
   See projects/agency-launch/visual-identity.md for canon
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Core — warm concrete */
  --ink: oklch(18% 0.012 55);
  --ink-fallback: #1f1c18;
  --paper: oklch(95% 0.012 75);
  --paper-fallback: #f0ebe0;
  --ink-muted: oklch(42% 0.015 55);
  --line: oklch(85% 0.012 70);
  --paper-sunk: oklch(91% 0.012 75);

  /* Signal — Electric Copper */
  --signal: oklch(65% 0.15 55);
  --signal-fallback: #c07f3a;
  --signal-hover: oklch(58% 0.16 55);
  --signal-soft: oklch(92% 0.06 60);

  /* Semantic (UI only) */
  --success: oklch(58% 0.14 145);
  --warning: oklch(75% 0.14 90);
  --danger: oklch(55% 0.22 20);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 300ms;

  /* Spacing — 4px base */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-12: 72px;
  --space-16: 96px;
  --space-20: 120px;

  /* Radius — industrial, hard edges */
  --radius-sm: 2px;
  --radius-md: 6px;

  /* Content widths */
  --width-reading: 680px;
  --width-ui: 800px;
  --width-marketing: 1200px;

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Type scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 48px;
  --text-5xl: clamp(48px, 8vw, 84px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: oklch(95% 0.012 75);
    --paper: oklch(16% 0.012 55);
    --ink-muted: oklch(62% 0.015 55);
    --line: oklch(26% 0.012 55);
    --paper-sunk: oklch(22% 0.012 55);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Reset + base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }

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

/* ---------- Layout ---------- */
.container {
  max-width: var(--width-marketing);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container-reading { max-width: var(--width-reading); }

/* ---------- Typography components ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--signal);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 400;
}
.h-display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-5xl);
  line-height: 1.0;
  letter-spacing: -0.02em;
}
.h-display em { font-style: normal; color: var(--signal); }
.h-section {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-4xl);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.h-card {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-2xl);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.lead {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  line-height: 1.55;
  color: var(--ink-muted);
}
.mono { font-family: var(--font-mono); font-weight: 700; font-size: var(--text-sm); }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: var(--space-3); text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 22px; height: 22px;
  flex-shrink: 0;
  display: block;
}
.logo-mark rect:first-child { fill: var(--signal-fallback); fill: var(--signal); }
.logo-mark rect:last-child { fill: var(--paper-fallback); fill: var(--paper); }
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

/* ---------- Nav ---------- */
.site-nav {
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
}
.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-6);
  align-items: center;
}
.site-nav a.nav-link {
  color: var(--ink-muted);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color var(--duration-fast) var(--ease);
}
.site-nav a.nav-link:hover,
.site-nav a.nav-link[aria-current="page"] { color: var(--ink); }
.site-nav a.nav-link[aria-current="page"] { position: relative; }
.site-nav a.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--signal);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease);
  line-height: 1;
  white-space: nowrap;
}
.btn-primary { background: var(--signal); color: oklch(99% 0 0); color: #ffffff; }
.btn-primary:hover { background: var(--signal-hover); color: #ffffff; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Cards ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  background: var(--paper);
  transition: border-color var(--duration-fast) var(--ease);
  position: relative;
  display: flex;
  flex-direction: column;
}
.card:hover { border-color: var(--ink); }
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 28px; height: 4px;
  background: var(--signal);
}
.card-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: var(--space-2);
  margin-bottom: var(--space-3);
}
.card-body { flex: 1; color: var(--ink-muted); font-size: var(--text-base); line-height: 1.6; margin-bottom: var(--space-4); }
.card-body p + p { margin-top: var(--space-3); }
.card-price {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink);
  font-weight: 700;
  padding-top: var(--space-4);
  border-top: 1px dashed var(--line);
}
.card-price-unit { color: var(--ink-muted); font-weight: 400; }
.card-status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-left: var(--space-2);
  vertical-align: middle;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.card-status-badge.live { background: var(--signal); color: #fff; }
.card-status-badge.soon { background: var(--paper-sunk); color: var(--ink-muted); border: 1px solid var(--line); }

/* ---------- Sections ---------- */
section { padding: var(--space-20) 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: 0; }
.section-kicker { margin-bottom: var(--space-3); }
.section-header { margin-bottom: var(--space-8); }
.section-header p { color: var(--ink-muted); font-size: var(--text-lg); max-width: 60ch; margin-top: var(--space-4); }

/* ---------- Grids ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-4); }

/* ---------- Hero ---------- */
.hero { padding: var(--space-16) 0 var(--space-12); border-top: 0; }
.hero h1 { max-width: 16ch; margin-top: var(--space-5); margin-bottom: var(--space-6); }
.hero p.lead { max-width: 60ch; margin-bottom: var(--space-8); }
.cta-row { display: flex; gap: var(--space-3); flex-wrap: wrap; }

/* ---------- Footer ---------- */
footer {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
}
footer .container {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-6);
  align-items: start;
}
footer .footer-brand { display: flex; flex-direction: column; gap: var(--space-3); }
footer .footer-brand p { max-width: 40ch; font-family: var(--font-sans); }
footer .footer-links { display: flex; gap: var(--space-6); flex-wrap: wrap; }
footer .footer-links ul { list-style: none; }
footer .footer-links li { padding: var(--space-1) 0; }
footer .footer-links a { color: var(--ink-muted); text-decoration: none; }
footer .footer-links a:hover { color: var(--ink); }
footer .footer-links h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
  font-weight: 400;
}
footer .meta {
  grid-column: 1 / -1;
  padding-top: var(--space-6);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---------- Content blocks ---------- */
.manifesto-pull {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: var(--space-12) 0;
}
.manifesto-pull blockquote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  max-width: 30ch;
}
.manifesto-pull cite {
  display: block;
  margin-top: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  font-style: normal;
}

/* FAQ */
details {
  padding: var(--space-4) 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
details:last-child { border-bottom: 1px solid var(--line); }
details summary {
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  letter-spacing: -0.015em;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--signal);
  transition: transform var(--duration-fast) var(--ease);
}
details[open] summary::after { content: "−"; }
details p {
  color: var(--ink-muted);
  margin-top: var(--space-3);
  font-size: var(--text-base);
  max-width: 60ch;
}

/* Bio block */
.bio {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-5);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--line);
}
.bio:first-of-type { border-top: 0; }
.bio-avatar {
  width: 120px; height: 120px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-4xl);
  color: var(--ink-muted);
  letter-spacing: -0.04em;
}
.bio h3 { margin-bottom: var(--space-2); }
.bio .bio-role {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}
.bio p { color: var(--ink); font-size: var(--text-base); margin-bottom: var(--space-3); max-width: 60ch; }
.bio-links { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.bio-links a {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: all var(--duration-fast) var(--ease);
}
.bio-links a:hover { color: var(--ink); border-color: var(--ink); }

/* Values list */
.values-list { list-style: none; counter-reset: values; }
.values-list li {
  counter-increment: values;
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
  position: relative;
  padding-left: var(--space-12);
}
.values-list li::before {
  content: counter(values, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--signal);
  font-weight: 700;
}
.values-list li h4 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}
.values-list li p { color: var(--ink-muted); max-width: 60ch; }

/* Services pricing table */
.offer-table {
  margin: var(--space-8) 0;
}
.offer-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: var(--space-5);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.offer-row:last-child { border-bottom: 1px solid var(--line); }
.offer-row .offer-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  letter-spacing: -0.02em;
}
.offer-row .offer-desc {
  color: var(--ink-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-1);
}
.offer-row .offer-price {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 700;
  text-align: right;
}
.offer-row .offer-price-unit {
  color: var(--ink-muted);
  font-weight: 400;
  font-size: var(--text-xs);
  display: block;
  margin-top: 2px;
}

@media (max-width: 720px) {
  .offer-row { grid-template-columns: 1fr; }
  .offer-row .offer-price { text-align: left; }
}

/* Direction banner (for preview context) */
.preview-banner {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-3) 0;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-align: center;
}
.preview-banner strong { color: var(--signal); font-weight: 500; }

/* Responsive */
@media (max-width: 720px) {
  .site-nav ul { gap: var(--space-4); }
  .site-nav ul li:not(:last-child) { display: none; }
  section { padding: var(--space-12) 0; }
  .hero { padding: var(--space-12) 0 var(--space-8); }
  .bio { grid-template-columns: 1fr; }
  .bio-avatar { width: 80px; height: 80px; font-size: var(--text-2xl); }
  footer .container { grid-template-columns: 1fr; }
  footer .footer-links { flex-direction: column; gap: var(--space-4); }
}

/* ============================================================
   TREATMENT 2++ — FULLY WIRED
   Appended 2026-04-21 per agency-launch/visual-identity.md v2
   Adds: busbar rail · scroll wire · currents indicator · hero
   wire compositions · particles · junctions · pulse propagation ·
   schematic inline symbols · section reveal choreography
   ============================================================ */

:root {
  --cursor-x: 50%;
  --cursor-y: 50%;
  --busbar-left: 12px;
}

/* Grain already on body::before? If not, add it. (Pre-existing body has no grain;
   this is additive) */
body.wired::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='280'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.11 0 0 0 0 0.10 0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) {
  body.wired::before { mix-blend-mode: screen; opacity: 0.09; }
}

/* Ensure site chrome sits above grain + busbar */
body.wired .preview-banner,
body.wired nav.site-nav,
body.wired section,
body.wired footer { position: relative; z-index: 2; }

/* Busbar rail — 1px copper line down left edge, with pulse element */
.busbar {
  position: fixed;
  left: var(--busbar-left);
  top: 0;
  width: 20px;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}
.busbar-line {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--signal);
  opacity: 0.15;
}
@media (prefers-color-scheme: dark) { .busbar-line { opacity: 0.22; } }
.busbar-pulse {
  position: absolute;
  left: -2px;
  top: 0;
  width: 5px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--signal), transparent);
  opacity: 0;
  filter: blur(1px);
  transform: translateY(-40px);
}
.busbar-pulse.firing {
  animation: busbar-fire 1.6s var(--ease) forwards;
}
@keyframes busbar-fire {
  0%   { opacity: 0; transform: translateY(-40px); }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(100vh); }
}
@media (max-width: 900px) { .busbar { display: none; } }

/* Scroll-driven secondary wire */
.scroll-wire {
  position: fixed;
  left: calc(var(--busbar-left) + 20px);
  top: 0;
  width: 60px;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.5;
}
@media (max-width: 900px) { .scroll-wire { display: none; } }
.scroll-wire-path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 600ms var(--ease);
}

/* Currents indicator in nav */
.currents-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: var(--space-4);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  text-transform: uppercase;
  background: var(--paper-sunk);
  vertical-align: middle;
}
.currents-indicator .label { opacity: 0.7; }
.currents-indicator .leds { display: inline-flex; gap: 3px; }
.currents-indicator .led {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  opacity: 0.2;
  transition: opacity 200ms var(--ease);
}
.currents-indicator .led.on {
  opacity: 1;
  box-shadow: 0 0 6px rgba(192, 127, 58, 0.6);
}
@media (max-width: 720px) { .currents-indicator { display: none; } }

/* Hero wire system */
body.wired .hero { overflow: hidden; position: relative; }
body.wired .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    380px circle at var(--cursor-x) var(--cursor-y),
    rgba(192, 127, 58, 0.08),
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
  transition: background 400ms var(--ease);
}
@media (prefers-color-scheme: dark) {
  body.wired .hero::after {
    background: radial-gradient(
      380px circle at var(--cursor-x) var(--cursor-y),
      rgba(192, 127, 58, 0.14),
      transparent 70%
    );
  }
}

.wire-trace {
  position: absolute;
  top: 0;
  right: 0;
  width: 65vw;
  max-width: 900px;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}
.wire-primary {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: draw-wire 1.6s var(--ease) forwards;
  filter: drop-shadow(0 0 3px rgba(192, 127, 58, 0.5));
}
.wire-secondary, .wire-tertiary {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 2000;
  stroke-dashoffset: 2000;
  animation: draw-wire 1.6s var(--ease) forwards;
}
.wire-secondary { opacity: 0.45; }
.wire-tertiary { opacity: 0.25; animation-delay: 0.15s; }
.wire-branch-dashed {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 4 4;
  opacity: 0.35;
}
@keyframes draw-wire { to { stroke-dashoffset: 0; } }
@media (prefers-color-scheme: dark) {
  .wire-primary { filter: drop-shadow(0 0 6px rgba(192, 127, 58, 0.6)); }
}

.particle {
  fill: var(--signal);
  opacity: 0;
  animation: particle-appear 0.4s var(--ease) forwards;
  animation-delay: 1.6s;
  filter: drop-shadow(0 0 4px rgba(192, 127, 58, 0.8));
}
@keyframes particle-appear { to { opacity: 1; } }

.junction { opacity: 0; animation: junction-appear 0.4s var(--ease) forwards; }
.junction.j1 { animation-delay: 1.7s; }
.junction.j2 { animation-delay: 1.9s; }
.junction.j3 { animation-delay: 2.1s; }
.junction.j4 { animation-delay: 2.3s; }
.junction.inactive { opacity: 0; animation: junction-appear-inactive 0.4s var(--ease) forwards; animation-delay: 2.1s; }
@keyframes junction-appear { to { opacity: 1; } }
@keyframes junction-appear-inactive { to { opacity: 0.55; } }

.junction-outer { fill: var(--signal); }
.junction-inner { fill: var(--paper); }
.junction.inactive .junction-outer { fill: var(--ink-muted); }
.junction-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--ink-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}
.junction-product-label {
  font-family: var(--font-display);
  font-size: 15px;
  fill: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.junction-product-label.inactive { fill: var(--ink-muted); opacity: 0.7; }
.junction-status {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  fill: var(--signal);
}
.junction-status.inactive { fill: var(--ink-muted); opacity: 0.7; }

.terminal-group {
  opacity: 0;
  animation: terminal-appear 0.3s var(--ease) forwards;
  animation-delay: 1.55s;
}
@keyframes terminal-appear { to { opacity: 1; } }
.terminal-dot { fill: var(--signal); }
.terminal-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--signal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.pulse-ring {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  opacity: 0;
  transform-origin: center;
}
.pulse-ring.p1 { animation: single-pulse 1s ease-out 1.6s 1; }
.pulse-ring.p2 { animation: single-pulse 1s ease-out 1.9s 1; }
.pulse-ring.p3 { animation: single-pulse 1s ease-out 2.2s 1; }
@keyframes single-pulse {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(3.5); opacity: 0; }
}
.heartbeat-ring {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  opacity: 0;
  transform-origin: center;
  animation: heartbeat 3s var(--ease) infinite;
  animation-delay: 3.5s;
}
@keyframes heartbeat {
  0%   { transform: scale(1); opacity: 0.5; }
  60%  { transform: scale(2.5); opacity: 0; }
  100% { transform: scale(2.5); opacity: 0; }
}

body.wired .hero .container { position: relative; z-index: 3; }

/* Input-jack graphic (contact page) */
.jack-body { fill: none; stroke: var(--signal); stroke-width: 1.5; }
.jack-fill { fill: var(--signal); }
.jack-shaft { stroke: var(--signal); stroke-width: 2; stroke-linecap: round; fill: none; }

/* Voltage reading labels (work page) */
.voltage-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  fill: var(--signal);
  letter-spacing: 0.04em;
}
.voltage-unit {
  fill: var(--ink-muted);
  opacity: 0.7;
  font-size: 9px;
}

/* Pulse-propagation button state */
body.wired .btn-primary[data-pulse-target] {
  position: relative;
  overflow: visible;
  transition: background var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}
body.wired .btn-primary.firing {
  animation: btn-receive-pulse 0.6s var(--ease);
}
@keyframes btn-receive-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 127, 58, 0); }
  40%      { box-shadow: 0 0 0 6px rgba(192, 127, 58, 0.4), 0 0 24px 0 rgba(192, 127, 58, 0.6); }
}

/* Schematic inline symbols (for prices, features) */
.schematic-symbol {
  display: inline-block;
  vertical-align: middle;
  color: var(--signal);
  opacity: 0.7;
  margin-right: 8px;
  line-height: 0;
}
.schematic-symbol svg { display: block; }

body.wired .card .card-price {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Refined section tap-marks — proper busbar junctions */
body.wired section:not(.hero) .container { position: relative; }
body.wired section:not(.hero) .section-kicker {
  position: relative;
  padding-left: var(--space-6);
}
body.wired section:not(.hero) .section-kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 1px;
  background: var(--signal);
  opacity: 0.6;
}
body.wired section:not(.hero) .section-kicker::after {
  content: "";
  position: absolute;
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--signal);
  border: 2px solid var(--paper);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--signal);
}

/* Section content reveal on scroll */
body.wired section:not(.hero) .section-header,
body.wired section:not(.hero) .grid-3 > *,
body.wired section:not(.hero) .grid-2 > *,
body.wired section:not(.hero) .offer-table,
body.wired section:not(.hero) .values-list > *,
body.wired section:not(.hero) .bio,
body.wired section:not(.hero) details {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
body.wired section:not(.hero).revealed .section-header { opacity: 1; transform: translateY(0); }
body.wired section:not(.hero).revealed .grid-3 > *,
body.wired section:not(.hero).revealed .grid-2 > * { opacity: 1; transform: translateY(0); }
body.wired section:not(.hero).revealed .grid-3 > *:nth-child(1),
body.wired section:not(.hero).revealed .grid-2 > *:nth-child(1) { transition-delay: 100ms; }
body.wired section:not(.hero).revealed .grid-3 > *:nth-child(2),
body.wired section:not(.hero).revealed .grid-2 > *:nth-child(2) { transition-delay: 200ms; }
body.wired section:not(.hero).revealed .grid-3 > *:nth-child(3),
body.wired section:not(.hero).revealed .grid-2 > *:nth-child(3) { transition-delay: 300ms; }
body.wired section:not(.hero).revealed .grid-3 > *:nth-child(4) { transition-delay: 400ms; }
body.wired section:not(.hero).revealed .offer-table,
body.wired section:not(.hero).revealed .values-list > *,
body.wired section:not(.hero).revealed .bio,
body.wired section:not(.hero).revealed details { opacity: 1; transform: translateY(0); }
body.wired section:not(.hero).revealed .values-list > *:nth-child(1) { transition-delay: 100ms; }
body.wired section:not(.hero).revealed .values-list > *:nth-child(2) { transition-delay: 180ms; }
body.wired section:not(.hero).revealed .values-list > *:nth-child(3) { transition-delay: 260ms; }
body.wired section:not(.hero).revealed .values-list > *:nth-child(4) { transition-delay: 340ms; }
body.wired section:not(.hero).revealed .values-list > *:nth-child(5) { transition-delay: 420ms; }
body.wired section:not(.hero).revealed .values-list > *:nth-child(6) { transition-delay: 500ms; }
body.wired section:not(.hero).revealed .values-list > *:nth-child(7) { transition-delay: 580ms; }

/* Reduced motion overrides — kill non-essential animation */
@media (prefers-reduced-motion: reduce) {
  .wire-primary, .wire-secondary, .wire-tertiary,
  .scroll-wire-path { animation: none !important; stroke-dashoffset: 0 !important; }
  .particle { display: none; }
  .pulse-ring, .heartbeat-ring { animation: none; opacity: 0; }
  .terminal-group, .junction { animation: none; opacity: 1; }
  .junction.inactive { opacity: 0.55; }
  body.wired .hero::after { display: none; }
  .busbar-pulse { display: none; }
  body.wired section:not(.hero) .section-header,
  body.wired section:not(.hero) .grid-3 > *,
  body.wired section:not(.hero) .grid-2 > *,
  body.wired section:not(.hero) .offer-table,
  body.wired section:not(.hero) .values-list > *,
  body.wired section:not(.hero) .bio,
  body.wired section:not(.hero) details { opacity: 1; transform: none; transition: none; }
  .currents-indicator .led { opacity: 1 !important; animation: none; }
}

@media (max-width: 900px) {
  /* Hero wire labels collide with hero copy at tablet/mobile; hide them and
     shrink the trace so it reads as abstract circuitry behind the text.
     The spine (≥1100px) carries the semantics on desktop; on mobile the
     section-kicker tap-marks carry it. */
  .wire-trace { width: 55vw; opacity: 0.25; right: -10vw; }
  .wire-trace .junction-label,
  .wire-trace .terminal-label,
  .wire-trace .junction-product-label,
  .wire-trace .junction-status { display: none; }
  body.wired .hero::after { display: none; }
}
@media (max-width: 560px) {
  .wire-trace { display: none; }
}

/* ============================================================
   TREATMENT 2+++ — FULL CIRCUIT (Wave 1 + 2 + 3)
   Appended 2026-04-21 per plans/help-me-game-plan-twinkling-pancake.md
   Adds: meandering busbar · circuit-component taps · cross-busbar wires ·
   return pathway · scroll-velocity wire temperature · currents depth meter ·
   view-transitions · WebGL noise canvas · prefers-contrast · reduced-effects
   ============================================================ */

:root {
  --wire-temperature: 0;      /* 0 = idle, 1 = active scroll */
  --scroll-depth: 0;           /* 0 = top, 1 = bottom */
}

/* Meandering busbar — SVG replaces straight line */
body.wired .busbar .circuit-busbar-svg {
  position: absolute;
  left: -10px;
  top: 0;
  width: 40px;
  height: 100%;
  pointer-events: none;
}
body.wired .busbar .circuit-busbar-svg .busbar-path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: calc(0.15 + 0.15 * var(--wire-temperature));
  filter: drop-shadow(0 0 calc(2px * var(--wire-temperature)) rgba(192, 127, 58, calc(0.6 * var(--wire-temperature))));
  transition: opacity 200ms var(--ease);
}
@media (prefers-color-scheme: dark) {
  body.wired .busbar .circuit-busbar-svg .busbar-path { opacity: calc(0.25 + 0.25 * var(--wire-temperature)); }
}
body.wired .busbar .circuit-busbar-svg .busbar-particle {
  fill: var(--signal);
  filter: drop-shadow(0 0 3px rgba(192, 127, 58, 0.7));
}
body.wired .busbar-line { display: none; }  /* SVG takes over; hide fallback line when JS inserts SVG */
body.wired .busbar.no-svg .busbar-line { display: block; }  /* fallback if JS fails */

/* Hero terminal → busbar bridge (U1.1) */
.wire-bridge {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: draw-bridge 0.6s var(--ease) forwards;
  animation-delay: 2.4s;
  filter: drop-shadow(0 0 2px rgba(192, 127, 58, 0.4));
}
@keyframes draw-bridge {
  to { opacity: 0.7; stroke-dashoffset: 0; }
}

/* Circuit-component taps (U1.3) — positioned absolutely within each section */
.circuit-tap {
  position: absolute;
  left: -34px;
  top: 48px;
  width: 50px;
  height: 28px;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
}
body.wired section.revealed .circuit-tap {
  opacity: 0.85;
  transform: translateX(0);
}
.circuit-tap svg { width: 100%; height: 100%; overflow: visible; }
.circuit-tap .tap-path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.circuit-tap .tap-dot { fill: var(--signal); }

@media (max-width: 720px) {
  .circuit-tap { display: none; }  /* Mobile reverts to existing section tap-marks */
}

/* Cross-busbar connection from tap to section H2 (U1.4) */
.circuit-cross {
  position: absolute;
  left: 16px;
  top: 60px;
  height: 1px;
  background: linear-gradient(to right, var(--signal), transparent 100%);
  opacity: 0;
  width: 0;
  transition: width 700ms var(--ease) 200ms, opacity 400ms var(--ease) 200ms;
  pointer-events: none;
  z-index: 1;
}
body.wired section.revealed .circuit-cross {
  width: 80px;
  opacity: calc(0.3 + 0.2 * var(--wire-temperature));
}
@media (max-width: 900px) {
  .circuit-cross { display: none; }
}

/* Return pathway on right edge (U1.5) */
.circuit-return {
  position: fixed;
  right: 12px;
  top: 0;
  width: 20px;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
body.wired .circuit-return.active { opacity: 1; }
.circuit-return svg { width: 100%; height: 100%; }
.circuit-return .return-path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: calc(0.08 + 0.08 * var(--wire-temperature));
}
@media (prefers-color-scheme: dark) {
  .circuit-return .return-path { opacity: calc(0.14 + 0.1 * var(--wire-temperature)); }
}
@media (max-width: 900px) {
  .circuit-return { display: none; }
}

/* Scroll-velocity wire temperature (U1.6) — applies to hero primary wire */
body.wired .wire-primary {
  filter: drop-shadow(0 0 calc(3px + 4px * var(--wire-temperature)) rgba(192, 127, 58, calc(0.5 + 0.4 * var(--wire-temperature))));
  transition: filter 250ms var(--ease);
}
@media (prefers-color-scheme: dark) {
  body.wired .wire-primary {
    filter: drop-shadow(0 0 calc(6px + 6px * var(--wire-temperature)) rgba(192, 127, 58, calc(0.6 + 0.3 * var(--wire-temperature))));
  }
}

/* Currents indicator upgraded to scroll-depth meter (U3.2) */
.currents-indicator .led.fill-1 { opacity: 0.22; }
.currents-indicator .led.fill-2 { opacity: 0.4; }
.currents-indicator .led.fill-3 { opacity: 0.6; box-shadow: 0 0 4px rgba(192, 127, 58, 0.4); }
.currents-indicator .led.fill-4 { opacity: 0.85; box-shadow: 0 0 6px rgba(192, 127, 58, 0.55); }
.currents-indicator .led.fill-5 { opacity: 1; box-shadow: 0 0 8px rgba(192, 127, 58, 0.7); }

.currents-indicator .depth-value {
  display: inline-block;
  min-width: 2.6ch;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  opacity: calc(0.5 + 0.5 * var(--wire-temperature));
}

/* WebGL noise canvas (U2.3) */
#noise-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  display: none;  /* only activated in dark mode via JS */
  mix-blend-mode: screen;
  opacity: 0.18;
}
@media (prefers-color-scheme: light) { #noise-canvas { display: none !important; } }

/* View Transitions API (U2.2) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 350ms;
  animation-timing-function: cubic-bezier(0.2, 0, 0.2, 1);
}
/* Pin persistent chrome so it doesn't flash during transition */
body.wired nav.site-nav { view-transition-name: site-nav; }
body.wired .busbar { view-transition-name: busbar; }
body.wired .circuit-return { view-transition-name: circuit-return; }
body.wired footer { view-transition-name: site-footer; }
::view-transition-group(site-nav),
::view-transition-group(busbar),
::view-transition-group(circuit-return),
::view-transition-group(site-footer) {
  animation-duration: 0ms;  /* don't animate chrome — let it persist */
}

/* prefers-contrast: more (U3.5) */
@media (prefers-contrast: more) {
  body.wired .busbar .circuit-busbar-svg .busbar-path { opacity: 0.55; stroke-width: 1.4; }
  body.wired .wire-secondary, body.wired .wire-tertiary { opacity: 0.75; }
  body.wired .junction-outer { stroke: var(--ink); stroke-width: 0.8; }
  body.wired .btn:focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; }
  .circuit-return .return-path { opacity: 0.3; }
  .currents-indicator { border-color: var(--ink-muted); }
}

/* Focus-visible across all interactive elements (U3.5) */
body.wired a:focus-visible,
body.wired button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Reduced-effects mode (U3.6) — auto-applied on low-end devices */
body.wired.reduced-effects #noise-canvas { display: none !important; }
body.wired.reduced-effects .wire-secondary,
body.wired.reduced-effects .wire-tertiary { display: none; }
body.wired.reduced-effects .particle.p3 { display: none; }
body.wired.reduced-effects .btn.firing { animation: none; box-shadow: none; }
body.wired.reduced-effects .circuit-busbar-svg .busbar-particle { display: none; }

/* Mobile simplified-but-alive version (U3.4) */
@media (max-width: 720px) {
  /* Keep busbar visible on mobile (just simpler) */
  body.wired .busbar { display: block; width: 10px; }
  body.wired .busbar .circuit-busbar-svg { display: none; }
  body.wired .busbar-line { display: block; opacity: 0.2; }  /* use straight fallback */
  /* Kill the 3-phase bundle in hero, keep only primary */
  body.wired .wire-secondary, body.wired .wire-tertiary { display: none; }
  body.wired .particle.p2, body.wired .particle.p3 { display: none; }
  body.wired .currents-indicator .led:nth-child(n+4) { display: none; }
}

/* Reduced-motion completeness (U3.5) — add to existing reduced-motion block */
@media (prefers-reduced-motion: reduce) {
  .wire-bridge { animation: none; stroke-dashoffset: 0; opacity: 0.7; }
  .circuit-tap { opacity: 0.85; transform: none; transition: none; }
  .circuit-cross { width: 80px; opacity: 0.35; transition: none; }
  .circuit-return { opacity: 0.25; transition: none; }
  body.wired .busbar .circuit-busbar-svg .busbar-particle { display: none; }
  body.wired .wire-primary { filter: drop-shadow(0 0 3px rgba(192, 127, 58, 0.5)); transition: none; }
  #noise-canvas { display: none !important; }
}

/* ============================================================
   TREATMENT 2×4 — CONTINUOUS CIRCUIT
   Per-section right-anchored wire compositions
   Appended 2026-04-21 · 6 templates · draw-in on scroll
   ============================================================ */

body.wired section[data-wire-template] { position: relative; }

.section-wire {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  width: min(400px, calc((100vw - 960px) / 2 + 180px));
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 600ms var(--ease);
}
body.wired section[data-wire-template].wire-drawn .section-wire { opacity: 0.9; }
body.wired section[data-wire-template].wire-drawn .section-wire .sw-path {
  stroke-dashoffset: 0;
}

.section-wire svg { width: 100%; height: auto; overflow: visible; display: block; }

.section-wire .sw-path {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 900ms var(--ease);
}
.section-wire .sw-path.sw-dashed { stroke-dasharray: 4 4; opacity: 0.5; }
body.wired section[data-wire-template].wire-drawn .section-wire .sw-path.sw-dashed {
  stroke-dashoffset: 0;
}
.section-wire .sw-path.sw-broken-left { stroke-dasharray: 200; stroke-dashoffset: 200; }
.section-wire .sw-path.sw-broken-right { stroke-dasharray: 200; stroke-dashoffset: 200; }
body.wired section[data-wire-template].wire-drawn .section-wire .sw-path.sw-broken-left,
body.wired section[data-wire-template].wire-drawn .section-wire .sw-path.sw-broken-right {
  stroke-dashoffset: 0;
}
.section-wire .sw-x {
  stroke: var(--signal);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0.6;
}
.section-wire .sw-junction-outer { fill: var(--signal); }
.section-wire .sw-junction-inner { fill: var(--paper); }
.section-wire .sw-junction.sw-inactive .sw-junction-outer { fill: var(--ink-muted); opacity: 0.6; }
.section-wire .sw-label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--ink-muted);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
}
.section-wire .sw-label-in { fill: var(--signal); }
.section-wire .sw-label-out { fill: var(--signal); }
.section-wire .sw-label-inactive { opacity: 0.6; }
.section-wire .sw-status {
  font-family: var(--font-mono);
  font-size: 8.5px;
  fill: var(--signal);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}
.section-wire .sw-status-inactive { fill: var(--ink-muted); opacity: 0.55; }
.section-wire .sw-voltage {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--signal);
  font-weight: 700;
  letter-spacing: 0.03em;
}
.section-wire .sw-voltage-unit {
  fill: var(--ink-muted);
  opacity: 0.7;
  font-size: 8.5px;
}
.section-wire .sw-tick {
  stroke: var(--signal);
  stroke-width: 1.2;
  stroke-linecap: round;
}
.section-wire .sw-particle {
  fill: var(--signal);
  filter: drop-shadow(0 0 3px rgba(192, 127, 58, 0.7));
}
.section-wire .sw-terminal {
  fill: var(--signal);
}

/* Hide section wires at narrow viewports — main wire stays via hero + busbar */
@media (max-width: 1100px) {
  .section-wire { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .section-wire { transition: none; opacity: 0.9; }
  .section-wire .sw-path { transition: none; stroke-dashoffset: 0; }
}

body.wired.reduced-effects .section-wire { display: none; }

/* ============================================================
   SPINE v1 — CONTINUOUS RIGHT-GUTTER CIRCUIT
   Appended 2026-04-21 per plans/floofy-weaving-gray.md
   One trunk wire runs body-height down reserved right gutter.
   Each section gets a branch → junction → label in the gutter.
   Replaces the five fragmented wire systems above when active.
   ============================================================ */

:root {
  --spine-gutter: 140px;
  --spine-trunk-x: 60px;
  --spine-branch-len: 30px;
  --spine-junction-size: 10px;
  --ease-out-smooth: cubic-bezier(0.25, 0.1, 0.25, 1.0);
  --ease-out-expo:   cubic-bezier(0.16, 1, 0.3, 1);
}

/* Activate gutter at desktop widths */
@media (min-width: 1100px) {
  body.wired.has-spine { position: relative; }
  body.wired.has-spine .container {
    padding-right: calc(var(--space-5) + var(--spine-gutter));
  }
  /* Offer table and value lists already align to container; no override needed */
}

/* Hide the FIVE competing wire systems when spine is active */
@media (min-width: 1100px) {
  body.wired.has-spine .busbar,
  body.wired.has-spine .scroll-wire,
  body.wired.has-spine .circuit-return,
  body.wired.has-spine .circuit-tap,
  body.wired.has-spine .circuit-cross,
  body.wired.has-spine .section-wire { display: none !important; }
}

/* Spine container */
.page-spine {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--spine-gutter);
  height: 100%;
  pointer-events: none;
  z-index: 2;
  display: none;
}
@media (min-width: 1100px) {
  body.wired.has-spine .page-spine { display: block; }
}

.page-spine > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Trunk — vertical line drawn via scroll-scrubbed stroke-dashoffset */
.spine-trunk {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.7;
  filter: drop-shadow(0 0 3px rgba(192, 127, 58, 0.35));
  /* stroke-dasharray + stroke-dashoffset set via JS based on getTotalLength */
}
@media (prefers-color-scheme: dark) {
  .spine-trunk {
    opacity: 0.85;
    filter: drop-shadow(0 0 5px rgba(192, 127, 58, 0.55));
  }
}

/* Faint guide line for the trunk (so it's readable before scroll fills it) */
.spine-trunk-guide {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.08;
}
@media (prefers-color-scheme: dark) { .spine-trunk-guide { opacity: 0.14; } }

/* Horizontal branch from trunk to junction */
.spine-branch {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  opacity: 0;
  transition:
    opacity 500ms var(--ease-out-smooth),
    stroke-dashoffset 650ms var(--ease-out-expo);
}
.spine-branch.is-drawn {
  opacity: 0.85;
  stroke-dashoffset: 0;
}
.spine-branch.is-open {
  stroke-dasharray: 5 4;
  animation: none;
}
.spine-branch.is-open.is-drawn { opacity: 0.45; stroke-dashoffset: 0; }
.spine-branch.is-broken {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}
.spine-branch.is-broken.is-drawn { opacity: 0.5; stroke-dashoffset: 0; }

/* Vertical riser (branch splitting trunk into N sub-taps) */
.spine-riser {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  opacity: 0;
  transition:
    opacity 450ms var(--ease-out-smooth),
    stroke-dashoffset 700ms var(--ease-out-expo);
}
.spine-riser.is-drawn { opacity: 0.75; stroke-dashoffset: 0; }

/* Junction glyph — copper outer + paper inner (echoes logo mark) */
.spine-junction-outer { fill: var(--signal); }
.spine-junction-inner { fill: var(--paper); }
.spine-junction {
  opacity: 0;
  transform-origin: center;
  transition: opacity 400ms var(--ease-out-smooth);
}
.spine-junction.is-drawn { opacity: 1; }
.spine-junction.is-open .spine-junction-outer { fill: var(--ink-muted); }
.spine-junction.is-open.is-drawn { opacity: 0.6; }
.spine-junction.is-terminal .spine-junction-outer {
  /* Slightly larger visual weight, same geometry */
}

/* Open-switch glyph — a pivoted bar showing the switch is open */
.spine-switch-open {
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 1.3;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 400ms var(--ease-out-smooth);
  transition-delay: 180ms;
}
.spine-switch-open.is-drawn { opacity: 0.6; }

/* Refusal X marker — broken-wire slash */
.spine-x {
  stroke: var(--signal);
  stroke-width: 1.4;
  stroke-linecap: round;
  opacity: 0;
  transition: opacity 380ms var(--ease-out-smooth);
  transition-delay: 220ms;
}
.spine-x.is-drawn { opacity: 0.7; }

/* Terminal pulse ring at end of page (contact/book) */
.spine-terminal-pulse {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  opacity: 0;
  transform-origin: center;
}
.spine-terminal-pulse.is-drawn {
  animation: spine-pulse 2.4s var(--ease-out-smooth) infinite;
}
@keyframes spine-pulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  80%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

/* Voltage/meta labels inside gutter */
.spine-voltage {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--signal);
  font-weight: 700;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: opacity 400ms var(--ease-out-smooth);
  transition-delay: 260ms;
}
.spine-voltage.is-drawn { opacity: 0.9; }
.spine-voltage-unit { fill: var(--ink-muted); font-size: 8.5px; opacity: 0.7; }

/* Labels — HTML layer, absolutely positioned */
.spine-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.spine-label {
  position: absolute;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 420ms var(--ease-out-smooth);
  transition-delay: 300ms;
  max-width: calc(var(--spine-gutter) - 75px);
}
.spine-label.is-drawn { opacity: 0.95; }
.spine-label.is-open { }
.spine-label.is-open.is-drawn { opacity: 0.5; }
.spine-label.is-input,
.spine-label.is-output { color: var(--signal); }
.spine-label.is-terminal {
  color: var(--signal);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.spine-label-sub {
  display: block;
  font-size: 8.5px;
  color: var(--signal);
  margin-top: 2px;
  opacity: 0.85;
  letter-spacing: 0.08em;
  font-weight: 700;
}
.spine-label.is-open .spine-label-sub { color: var(--ink-muted); opacity: 0.55; }

/* Hero → spine visual bridge: the hero already has .wire-trace on the right;
   spine starts just below the hero. Nothing to override here. */

/* Reduced motion: draw everything immediately, no scroll scrub */
@media (prefers-reduced-motion: reduce) {
  .spine-trunk { stroke-dashoffset: 0 !important; }
  .spine-branch, .spine-riser, .spine-junction, .spine-x, .spine-switch-open,
  .spine-voltage, .spine-label {
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
    transition: none !important;
  }
  .spine-branch.is-open, .spine-junction.is-open, .spine-label.is-open { opacity: 0.5 !important; }
  .spine-terminal-pulse { animation: none !important; opacity: 0 !important; }
}

/* Small screens: spine hidden, existing section-kicker tap-marks cover mobile */
@media (max-width: 1099px) {
  .page-spine { display: none !important; }
}
