@font-face { font-family: "Space Grotesk"; src: url("fonts/SpaceGrotesk-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-700-latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* Layout: one-page canvas over a system grid. A cyan spine links one node per section;
   grid brightens around the hero and each node. Brand: OpusGrid Glass & Light (Brand Guide 6.4). */
:root {
  color-scheme: dark;
  --navy: #0B132B;
  --navy-2: #16264f;
  --navy-3: #13203f;
  --cyan: #00F5D4;
  --cyan-20: #CCFDF6;
  --amber: #FF9F1C;
  --white: #FFFFFF;
  --text: rgba(236, 242, 255, 0.80);
  --muted: rgba(236, 242, 255, 0.56);
  --line: rgba(0, 245, 212, 0.38);
  --grid-faint: rgba(0, 245, 212, 0.045);
  --grid-strong: rgba(0, 245, 212, 0.17);
  --glass: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.025));
  --font-head: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --bar: 73px;      /* height of the fixed bars above the content; index.html measures it (top bar, plus the rail on phones) */
  --lead: 0px;      /* height of the hero copy when it stacks above the art (phones); set by the hero script */
  --cell: 48px;
  --sec-pl: 96px;
  --node-l: 22px;
}
@media (max-width: 720px) { :root { --sec-pl: 44px; --node-l: 4px; } }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--navy); }

h1, h2, h3 { font-family: var(--font-head); margin: 0; text-wrap: balance; color: var(--white); }
h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); line-height: 1.04; letter-spacing: -0.02em; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.1; letter-spacing: -0.01em; font-weight: 700; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 600; }
p { margin: 0; color: var(--text); max-width: 64ch; }
a { color: var(--cyan); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 14px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  background: rgba(11, 19, 43, 0.94);
  border-bottom: 1px solid rgba(0, 245, 212, 0.12);
}
.wordmark { display: inline-flex; }
.wordmark img { display: block; width: 104px; height: auto; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 0.95rem;
  padding: 10px 18px; border-radius: 999px; text-decoration: none; cursor: pointer;
  color: var(--navy); background: var(--amber); border: 0;
  box-shadow: 0 0 24px rgba(255, 159, 28, 0.35);
}
.btn:hover { background: #FFB347; }

/* ---------- Node rail (fixed nav) ---------- */
.rail {
  position: fixed; z-index: 15;
  right: max(14px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
}
.rail button {
  position: relative; width: 14px; height: 14px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--navy); border: 2px solid rgba(0, 245, 212, 0.55);
}
.rail button.passed { background: rgba(0, 245, 212, 0.55); }
.rail button.active { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.rail button.endpoint { border-color: var(--amber); }
.rail button.endpoint.active { background: var(--amber); box-shadow: 0 0 14px var(--amber); }
.rail .tip {
  position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  white-space: nowrap; font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cyan); background: rgba(11, 19, 43, 0.85); border: 1px solid rgba(0,245,212,0.25);
  padding: 4px 10px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.rail button:hover .tip, .rail button:focus-visible .tip { opacity: 1; }
@media (max-width: 720px) {
  .rail {
    top: calc(env(safe-area-inset-top, 0px) + 70px); right: auto; transform: none;
    left: 0; width: 100%; flex-direction: row; justify-content: center; gap: 12px;
    padding-block: 8px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    background: rgba(11, 19, 43, 0.94);
    border-bottom: 1px solid rgba(0, 245, 212, 0.10);
  }
  .rail button { width: 12px; height: 12px; }
  .rail .tip { display: none; }
  .rail-label {
    font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--cyan); margin-left: 6px; align-self: center; white-space: nowrap;
  }
}
@media (min-width: 721px) { .rail-label { display: none; } }

/* ---------- Hero: copy over a pinned generative field, then one viewport of scroll runway ----------
   Six capability nodes send waves through the grid. On scroll, each node's broken stub drains into one
   line, and that line drops out of the art to become the page spine. Scripts: "Hero, part 1" and
   "Hero, part 2" in index.html. */
.hero { overflow-x: clip; scroll-margin-top: 200px; --muted: #9DA1AA; }
.stage { position: relative; }
.artpin {
  position: sticky; top: var(--bar); z-index: 1;
  height: calc(100vh - var(--bar)); height: calc(100svh - var(--bar)); min-height: 440px;
}
.runway { height: 100vh; }
.hero-field {
  position: absolute; left: 0; right: 0; bottom: 0; top: calc(-1 * var(--lead)); overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 72% 40%, rgba(22, 38, 79, 0.9) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 6% 100%, rgba(19, 32, 63, 0.9) 0%, transparent 70%),
    var(--navy);
  cursor: crosshair;
}
.hero-field > canvas, .hero-field > div { position: absolute; left: 0; top: 0; }
.hero-field::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 72px; pointer-events: none; background: linear-gradient(to bottom, rgba(11, 19, 43, 0), var(--navy)); }
.grid-layer, #wave, #lines { pointer-events: none; }

/* Copy: visible from the first frame */
.copy {
  position: absolute; z-index: 6; top: 0; left: 0; right: 0; margin: 0 auto; max-width: 1200px;
  height: calc(100vh - var(--bar)); height: calc(100svh - var(--bar)); min-height: 440px;
  display: flex; align-items: center;
  padding-left: calc(16px + clamp(24px, 7.5vw, 96px));
  pointer-events: none;
}
.copy-inner { position: relative; width: min(494px, 44vw); pointer-events: auto; }
.copy-inner::before {
  content: ""; position: absolute; inset: -72px -88px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(11, 19, 43, 0.92), rgba(11, 19, 43, 0.72) 62%, rgba(11, 19, 43, 0));
}
.hero h1 { font-size: clamp(2.3rem, min(5.2vw, 9.4vh), 4rem); }   /* also capped by height, so the copy fits the pinned view */
.tagline { margin-top: 28px; padding-left: 16px; border-left: 3px solid var(--cyan); font-family: var(--font-head); font-weight: 500; font-size: 1.1rem; line-height: 1.4; color: var(--muted); }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-cta .note { font-size: 0.9rem; color: var(--muted); }
@media (max-width: 860px) {
  /* Phones: the copy stacks above the pinned art, on a soft Navy band; the art layer runs up behind it. */
  .copy { position: relative; height: auto; min-height: 0; display: block; max-width: none; padding: 0; }
  .copy-inner {
    width: auto; padding: 26px 20px 46px;
    background: linear-gradient(180deg, rgba(11, 19, 43, 0.86) 0%, rgba(11, 19, 43, 0.82) 80%, rgba(11, 19, 43, 0) 100%);
  }
  .copy-inner::before { display: none; }
  .hero .lede { font-size: 1.02rem; margin-top: 14px; }
  .tagline { margin-top: 20px; font-size: 1rem; }
  .hero-cta { margin-top: 24px; }
}
@media (max-width: 720px) { .copy-inner { padding-top: 60px; } }   /* clears the section rail, which sits under the top bar on phones */

/* The six capability nodes */
.nodes { position: absolute; left: 0; right: 0; bottom: 0; top: calc(-1 * var(--lead)); z-index: 5; pointer-events: none; }
.hero-node {
  position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; padding: 0;
  transform: translate3d(var(--x, 0px), var(--y, 0px), 0);
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; pointer-events: auto;
  font: 700 0.75rem/1.4 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--cyan);
  opacity: 0; transition: opacity 0.45s ease-out;
}
.hero-node.lit { opacity: 1; }
.node-dot {
  position: relative; isolation: isolate; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; letter-spacing: 0;
  background: var(--navy); border: 1.5px solid var(--cyan); color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(11, 19, 43, 0.85), 0 0 16px rgba(0, 245, 212, 0.55);
}
/* Task complete: an Amber skin snaps on over a Navy disc, then cools off in about 600ms.
   Amber only ever sits on Navy: the skin fades first (Amber into Navy), then the disc fades (Navy into the art).
   That way the flash never mixes with Cyan light behind it and never passes through an off-palette green. */
.node-dot::before {
  content: ""; position: absolute; inset: -19px; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, var(--navy) 72%, rgba(11, 19, 43, 0));
  opacity: 0; transition: opacity 0.24s ease-out 0.38s;
}
.node-dot::after {
  content: attr(data-n); position: absolute; inset: -1.5px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--amber); color: var(--navy);
  box-shadow: 0 0 10px 2px rgba(255, 159, 28, 0.85);
  opacity: 0; transition: opacity 0.42s ease-out;
}
.hero-node.fire .node-dot::before, .hero-node.fire .node-dot::after { opacity: 1; transition-duration: 0.06s; transition-delay: 0s; }
.hero-node[aria-expanded="true"] .node-dot { background: var(--cyan); color: var(--navy); }
.hero-node:focus-visible { outline: none; }
.hero-node:focus-visible .node-dot { outline: 2px solid var(--cyan); outline-offset: 4px; }
/* The label is the visible button: a chip with a plus that turns into a cross while its card is open.
   Every tap cue is Cyan; Amber stays with the "task complete" flash. Keep the chip 26px tall or less:
   that is the box the stub layout in the hero script keeps clear for it. */
.node-label {
  position: absolute; left: calc(100% - 2px); top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 8px; border-radius: 4px; white-space: nowrap;
  background: rgba(11, 19, 43, 0.82); border: 1px solid rgba(0, 245, 212, 0.6);
  transition: opacity 0.3s, border-color 0.15s, background-color 0.15s, box-shadow 0.3s, scale 0.1s;
}
.node-label::after {
  content: ""; flex: none; width: 10px; height: 10px;
  background:
    linear-gradient(var(--cyan), var(--cyan)) center / 100% 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) center / 2px 100% no-repeat;
  transition: transform 0.2s ease-out;
}
@media (hover: hover) { .hero-node:hover .node-label { border-color: var(--cyan); background-color: rgba(10, 46, 63, 0.88); } }
.hero-node:focus-visible .node-label,
.hero-node[aria-expanded="true"] .node-label,
.hero-node.hint .node-label { border-color: var(--cyan); background-color: rgba(10, 46, 63, 0.88); }
.hero-node.hint .node-label { box-shadow: 0 0 14px rgba(0, 245, 212, 0.55); }   /* first-tap assist: the hero script lights the chip nearest a tap on empty grid */
.hero-node[aria-expanded="true"] .node-label::after { transform: rotate(45deg); }
.hero-node:active .node-label { scale: 0.96; }
.hero-node[data-side="l"] .node-label { left: auto; right: calc(100% - 2px); }
.hero-node[data-side="b"] .node-label { left: 50%; top: calc(100% - 5px); transform: translateX(-50%); }
.hero-node[data-side="t"] .node-label { left: 50%; top: auto; bottom: calc(100% - 5px); transform: translateX(-50%); }
@media (max-width: 860px) { .hero-node { font-size: 0.6875rem; } .node-label { padding: 3px 6px; gap: 6px; } }
/* Reduced motion: a soft glow that fades in and out in place. Opacity only. */
.hero-node::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(0, 245, 212, 0.5), rgba(0, 245, 212, 0));
}
.hero-node.glow::before { animation: softglow 1.2s ease-in-out; }
.softglow {
  width: 180px; height: 180px; margin: -90px 0 0 -90px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(204, 253, 246, 0.5), rgba(0, 245, 212, 0.28) 45%, rgba(0, 245, 212, 0));
  animation: softglow 1.3s ease-in-out;
}
@keyframes softglow { 0%, 100% { opacity: 0; } 40% { opacity: 1; } }

/* Glass pop-out card */
.hero-card {
  position: absolute; z-index: 8; width: min(340px, calc(100vw - 24px)); padding: 18px 20px 22px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.03)), rgba(18, 32, 68, 0.74);
  border: 1.5px solid rgba(0, 245, 212, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 18px 40px rgba(2, 6, 20, 0.55), 0 0 36px rgba(0, 245, 212, 0.12);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  opacity: 0; visibility: hidden; transform: scale(0.9);
  transform-origin: var(--ox, 0%) var(--oy, 50%);
  transition: opacity 0.18s ease-out, transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.25), visibility 0s linear 0.24s;
}
.hero-card.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 0.75rem/1.4 var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--cyan);
}
.badge-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--cyan); letter-spacing: 0; }
.card-close {
  display: grid; place-items: center; width: 36px; height: 36px; margin: -6px -8px -6px 0; padding: 0;
  background: none; border: 1px solid rgba(0, 245, 212, 0.25); border-radius: 50%; cursor: pointer;
}
.card-close svg { display: block; fill: none; stroke: var(--cyan); stroke-width: 1.5; stroke-linecap: round; }
.card-close:hover { border-color: var(--cyan); }
.card-title { font-size: clamp(1.2rem, 2vw, 1.4rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
.card-line { margin-top: 10px; }
@media (max-width: 860px) {
  .hero-card {
    position: fixed; left: 12px !important; right: 12px; top: auto !important; width: auto;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform-origin: 50% 100%;
  }
}

/* The line that leaves the art, each node's broken stub, and the channels the energy runs into on scroll */
.drop { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.drop path { fill: none; stroke: var(--cyan); stroke-linecap: round; stroke-linejoin: round; }
.drop .glow { stroke-width: 12; opacity: 0.16; }
.drop .core { stroke-width: 3; }
.drop .head { fill: var(--cyan-20); stroke: none; opacity: 0; }
#dropExtra .cg { stroke-width: 9; opacity: 0.13; }
#dropExtra .cc { stroke-width: 2; }
#dropExtra .st { stroke-width: 2; }
#dropExtra .sh { fill: var(--cyan-20); opacity: 0; }
#dropExtra .tm { opacity: 0; }                                               /* end points left on a severed branch */
#dropExtra .tm.dot { fill: var(--cyan); }
#dropExtra .tm.ring { fill: var(--navy); stroke: var(--cyan); stroke-width: 2; }

/* Dev aid: add ?fps to the URL to see the hero's frame rate */
.fps {
  position: fixed; left: 8px; bottom: 8px; z-index: 40; padding: 4px 8px; border-radius: 4px; pointer-events: none;
  font: 700 0.6875rem/1.4 var(--font-mono); color: var(--cyan); background: rgba(11, 19, 43, 0.9); border: 1px solid rgba(0, 245, 212, 0.3);
}

/* ---------- Canvas: grid layers + spine ---------- */
.canvas {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 70% 40% at 12% 0%, var(--navy-2) 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 100% 60%, var(--navy-3) 0%, transparent 70%),
    var(--navy);
}
.grid {
  position: absolute; inset: 0; pointer-events: none;
  will-change: transform; transform: translateZ(0);
  background-image:
    linear-gradient(var(--gc) 1px, transparent 1px),
    linear-gradient(90deg, var(--gc) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: var(--gx, 0px) var(--gy, 0px);
}
.grid.base { --gc: var(--grid-faint); }
.grid.focus { --gc: var(--grid-strong); }
/* The hero ends on flat Navy, so the page's glow and grid fade in under it instead of starting on a hard line. */
.canvas::before { content: ""; position: absolute; inset: 0 0 auto; height: 180px; z-index: 1; pointer-events: none; background: linear-gradient(to bottom, var(--navy), rgba(11, 19, 43, 0)); }
.spine { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; overflow: visible; }
.spine .track { stroke: rgba(0, 245, 212, 0.18); stroke-width: 2; fill: none; }
.spine .prog { stroke: var(--cyan); stroke-width: 3; fill: none; stroke-linecap: round; }
.spine .glow { stroke: var(--cyan); stroke-width: 12; opacity: 0.18; fill: none; stroke-linecap: round; }
.spine .dash { stroke-dasharray: 8 9; }

.page {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(44px, env(safe-area-inset-right, 0px));
}
@media (max-width: 720px) { .page { padding-right: max(16px, env(safe-area-inset-right, 0px)); } }

/* ---------- Sections + nodes ---------- */
.sec { position: relative; padding-left: var(--sec-pl); padding-block: 88px; scroll-margin-top: 40px; }
@media (max-width: 720px) { .sec { scroll-margin-top: 70px; } }
@media (max-width: 720px) { .sec { padding-block: 64px; } }

.node {
  position: absolute; left: var(--node-l); top: calc(var(--pt, 88px) + 1px);
  width: 18px; height: 18px; padding: 0; border-radius: 50%; cursor: pointer; z-index: 3;
  background: var(--navy); border: 2px solid rgba(0, 245, 212, 0.6);
  transition: background .3s, box-shadow .3s, border-color .3s;
}
@media (max-width: 720px) { .node { --pt: 64px; } }
.sec.passed .node { background: rgba(0, 245, 212, 0.6); }
.sec.active .node { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 0 6px rgba(0,245,212,0.12), 0 0 22px var(--cyan); }
/* Arrival flicker: a node flashes Amber as the path reaches it, then settles back to its state. */
@keyframes arrive {
  0%   { background: var(--cyan);  border-color: var(--cyan);  box-shadow: 0 0 18px var(--cyan); }
  12%  { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 7px rgba(255,159,28,0.18), 0 0 30px var(--amber); }
  24%  { background: rgba(255,159,28,0.25); border-color: rgba(255,159,28,0.5); box-shadow: 0 0 6px rgba(255,159,28,0.4); }
  38%  { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 7px rgba(255,159,28,0.18), 0 0 30px var(--amber); }
  52%  { background: rgba(255,159,28,0.35); border-color: rgba(255,159,28,0.6); box-shadow: 0 0 10px rgba(255,159,28,0.5); }
  66%  { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 24px var(--amber); }
}
.sec.arrive .node, .rail button.arrive { animation: arrive .8s steps(1, end) 1; }
.sec.endpoint .node { border-color: var(--amber); }
.sec.endpoint.active .node { background: var(--amber); box-shadow: 0 0 0 6px rgba(255,159,28,0.14), 0 0 26px var(--amber); }

.label {
  display: block; height: 20px; margin-bottom: 18px;
  font-family: var(--font-head); font-weight: 500; font-size: 0.8rem; line-height: 20px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--cyan);
  opacity: 0; transition: opacity .25s;
}
.sec.endpoint .label { color: var(--amber); }
.sec.active .label, .sec.show-label .label { opacity: 1; }

.lede { font-size: 1.1rem; margin-top: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

/* ---------- Glass materials ---------- */
.glass {
  position: relative; border-radius: 22px;
  background: var(--glass), rgba(22, 38, 79, 0.55);
  border: 1.5px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 18px 40px rgba(2,6,20,0.5);
}
.accent {
  border-radius: 18px; color: var(--navy);
  background: linear-gradient(120deg, #FFB347 0%, var(--amber) 45%, #F08A00 100%);
  border: 1.5px solid rgba(255,214,150,0.9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 0 40px 4px rgba(255,159,28,0.35);
}
.accent p, .accent h3 { color: var(--navy); }
.render { position: relative; isolation: isolate; }
/* Glows are gradients, not blur filters, so scrolling never repaints a blur. */
.render::before, .render::after { content: ""; position: absolute; z-index: -1; pointer-events: none; transition: opacity .5s; opacity: .55; }
.render::before { width: 90%; height: 90%; left: -20%; top: -10%; background: radial-gradient(closest-side, rgba(0,245,212,0.26), transparent); }
.render::after { width: 70%; height: 70%; right: -15%; bottom: -15%; background: radial-gradient(closest-side, rgba(255,159,28,0.24), transparent); }
.week { backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); }
.sec.active .render::before, .sec.active .render::after { opacity: 1; }
.sec .render .glass { transition: border-color .4s; }
.sec.active .render .glass { border-color: rgba(0,245,212,0.6); }

/* ---------- One inquiry's week (opens "Where it breaks") ---------- */
.week { padding: 28px 28px 24px; }
.week-head { font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; position: relative; }
.stops::before {
  content: ""; position: absolute; left: 11px; top: 14px; bottom: 58px; width: 3px; border-radius: 2px;
  background: var(--cyan); box-shadow: 0 0 12px rgba(0,245,212,0.8);
}
.stops::after {
  content: ""; position: absolute; left: 11px; bottom: 16px; height: 42px; width: 3px;
  background: repeating-linear-gradient(to bottom, var(--amber) 0 6px, transparent 6px 12px);
}
.stop { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 16px; position: relative; }
.stop .dot { width: 25px; height: 25px; border-radius: 50%; margin-top: 2px; background: var(--navy); border: 2px solid var(--cyan); box-shadow: 0 0 0 5px rgba(11,19,43,0.9), 0 0 14px rgba(0,245,212,0.7); position: relative; z-index: 1; }
.stop time { display: block; font-family: var(--font-head); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan); font-variant-numeric: tabular-nums; }
.stop strong { display: block; font-weight: 600; color: var(--white); }
.stop small { display: block; font-size: 0.9rem; color: var(--muted); }
.stop.stalled .dot { border-color: var(--amber); box-shadow: 0 0 0 5px rgba(11,19,43,0.9), 0 0 18px rgba(255,159,28,0.8); }
.stop.stalled time { color: var(--amber); }

/* ---------- Card lists ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
@media (max-width: 900px) { .cards { grid-template-columns: minmax(0, 1fr); } }
.card { padding: 24px; border-radius: 18px; border: 1px solid rgba(0,245,212,0.16); background: rgba(255,255,255,0.025); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.98rem; }
/* Problem cards: glass panels. Each diagram shows its own failure in the Emblem's grammar: Cyan for
   what works, Amber only at the point where the work stops. */
.card.fail { background: var(--glass), rgba(22, 38, 79, 0.55); border-color: rgba(0,245,212,0.28); }
.fail-art {
  display: block; width: 100%; height: auto; max-height: 150px; margin-bottom: 20px; padding: 12px; border-radius: 12px;
  overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round;
  background:
    linear-gradient(rgba(0,245,212,0.06) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(0,245,212,0.06) 1px, transparent 1px) 0 0 / 16px 16px,
    rgba(11, 19, 43, 0.65);
}
.fail-art .on { fill: var(--cyan); }
.fail-art .on-ink { stroke: var(--navy); stroke-width: 1.5; }
.fail-art .path { stroke: var(--cyan); stroke-width: 2; }
.fail-art .thin { stroke-width: 1.5; }
.fail-art .wire { stroke: var(--cyan); stroke-width: 2; }
.fail-art .wire-box rect { stroke: rgba(0,245,212,0.5); stroke-width: 1.5; fill: rgba(11,19,43,0.7); }
.fail-art .ghost * { stroke: rgba(236,242,255,0.45); stroke-width: 1.5; }
.fail-art .stall { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 5 6; }
.fail-art .end { stroke: var(--amber); stroke-width: 2; fill: var(--navy); }
.fail-art .end-line { stroke: var(--amber); stroke-width: 2; }
.fail-art .end-mark { fill: var(--amber); font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.fail-art .cell { fill: var(--amber); }
.fail-art .wall { fill: var(--amber); }

/* Card motion: a 9s loop, about 3s of story then rest. Runs only while the card is on screen (.playing, set in
   index.html). Sparks and halos are invisible by default, so with no motion each card is its still diagram. */
.fail-art .spark, .fail-art .spark-c, .fail-art .halo { opacity: 0; }
.fail-art .spark { fill: var(--amber); }
.fail-art .spark-c { fill: var(--cyan); }
.fail-art .spark, .fail-art .spark-c { offset-rotate: 0deg; }
.fail-art .halo { fill: rgba(255,159,28,0.28); stroke: var(--amber); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.fail-art .a1-dot { offset-path: path('M42 60H104'); }
.fail-art .a1-s1 { offset-path: path('M132 60H200'); }
.fail-art .a1-s2 { offset-path: path('M127 49C147 27 169 20 200 20'); }
.fail-art .a1-s3 { offset-path: path('M127 71C147 93 169 100 200 100'); }
.fail-art .a2-s { offset-path: path('M122 56H184'); }
.fail-art .a3-s { offset-path: path('M48 54C48 14 140 14 140 54C140 14 232 14 232 46'); }

.card.fail { --d: 0s; }
@media (min-width: 901px) {
  /* Side by side, the cards take turns instead of firing at once. */
  .card.fail:nth-child(2) { --d: 1s; }
  .card.fail:nth-child(3) { --d: 2s; }
}
.playing .fail-art .a1-dot { animation: f-dot 9s linear var(--d) infinite; }
.playing .fail-art .a1-halo { animation: f-halo-1 9s ease-out var(--d) infinite; }
.playing .fail-art .a1-s { animation: f-run-1 9s ease-in-out var(--d) infinite; }
.playing .fail-art .a2-n1 { animation: f-n1 9s linear var(--d) infinite; }
.playing .fail-art .a2-n2 { animation: f-n2 9s linear var(--d) infinite; }
.playing .fail-art .a2-n3 { animation: f-n3 9s linear var(--d) infinite; }
.playing .fail-art .a2-s { animation: f-run-2 9s ease-in-out var(--d) infinite; }
.playing .fail-art .a2-halo { animation: f-halo-2 9s ease-out var(--d) infinite; }
.playing .fail-art .a2-wall { animation: f-wall 9s linear var(--d) infinite; }
.playing .fail-art .a3-s { animation: f-run-3 9s linear var(--d) infinite; }
.playing .fail-art .a3-b1 { animation: f-box-1 9s linear var(--d) infinite; }
.playing .fail-art .a3-b2 { animation: f-box-2 9s linear var(--d) infinite; }
.playing .fail-art .a3-b3 { animation: f-box-3 9s linear var(--d) infinite; }
.playing .fail-art .a3-cell { animation: f-cell 9s linear var(--d) infinite; }
.playing .fail-art .a3-halo { animation: f-halo-3 9s ease-out var(--d) infinite; }

/* Card 1: dot reaches the question mark, it pulses, three sparks stop short and flash. */
@keyframes f-dot { 0% { offset-distance: 0%; opacity: 0; } 2% { opacity: 1; } 10% { offset-distance: 100%; opacity: 1; } 11%, 100% { offset-distance: 100%; opacity: 0; } }
@keyframes f-halo-1 { 0%, 10% { opacity: 0; transform: scale(1); } 12% { opacity: 1; transform: scale(1); } 20%, 100% { opacity: 0; transform: scale(1.5); } }
@keyframes f-run-1 { 0%, 15% { offset-distance: 0%; opacity: 0; transform: scale(1); } 16% { opacity: 1; } 28% { offset-distance: 100%; opacity: 1; transform: scale(1); } 30% { offset-distance: 100%; opacity: 1; transform: scale(1.9); } 36%, 100% { offset-distance: 100%; opacity: 0; transform: scale(1); } }
/* Card 2: nodes light in order, the spark hits the barrier and bounces back, and the new hire's head stays empty. */
@keyframes f-n1 { 0% { opacity: 1; } 2%, 4% { opacity: 0.25; } 6%, 100% { opacity: 1; } }
@keyframes f-n2 { 0% { opacity: 1; } 2%, 8% { opacity: 0.25; } 10%, 100% { opacity: 1; } }
@keyframes f-n3 { 0% { opacity: 1; } 2%, 12% { opacity: 0.25; } 14%, 100% { opacity: 1; } }
@keyframes f-run-2 { 0%, 15% { offset-distance: 0%; opacity: 0; } 16% { opacity: 1; } 27% { offset-distance: 100%; opacity: 1; } 33% { offset-distance: 60%; opacity: 0.7; } 36%, 100% { offset-distance: 52%; opacity: 0; } }
@keyframes f-halo-2 { 0%, 26% { opacity: 0; transform: scale(1); } 28% { opacity: 1; transform: scale(1); } 37%, 100% { opacity: 0; transform: scale(1.35); } }
@keyframes f-wall { 0%, 27% { transform: translateX(0); } 28% { transform: translateX(3px); } 30% { transform: translateX(-1px); } 32%, 100% { transform: translateX(0); } }
/* Card 3: the spark hunts across all three, passes the amber cell, and ends still searching. */
@keyframes f-run-3 { 0%, 2% { offset-distance: 0%; opacity: 0; transform: scale(1); } 4% { opacity: 1; } 32% { offset-distance: 100%; opacity: 1; transform: scale(1); } 34%, 100% { offset-distance: 100%; opacity: 0; transform: scale(1); } }
@keyframes f-box-1 { 0%, 2% { stroke: rgba(0,245,212,0.5); } 5%, 9% { stroke: #00F5D4; } 13%, 100% { stroke: rgba(0,245,212,0.5); } }
@keyframes f-box-2 { 0%, 15% { stroke: rgba(0,245,212,0.5); } 18%, 22% { stroke: #00F5D4; } 26%, 100% { stroke: rgba(0,245,212,0.5); } }
@keyframes f-box-3 { 0%, 26% { stroke: rgba(0,245,212,0.5); } 29%, 33% { stroke: #00F5D4; } 37%, 100% { stroke: rgba(0,245,212,0.5); } }
@keyframes f-cell { 0%, 16% { opacity: 1; } 18% { opacity: 0.2; } 20% { opacity: 1; } 22% { opacity: 0.2; } 24%, 100% { opacity: 1; } }
@keyframes f-halo-3 { 0%, 32% { opacity: 0; transform: scale(1); } 34% { opacity: 1; transform: scale(1); } 42%, 100% { opacity: 0; transform: scale(1.9); } }
.card.feature { border-color: rgba(0,245,212,0.45); background: rgba(0,245,212,0.05); }
/* Bio card: headshot on a node-style ring (DESIGN.md Visual Reference). */
.bio { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 40px; max-width: 860px; }
.bio p + p { margin-top: 12px; }
.bio-photo { display: block; width: 120px; height: 120px; border-radius: 50%; border: 2px solid var(--cyan); box-shadow: 0 0 0 5px rgba(11,19,43,0.9), 0 0 18px rgba(0,245,212,0.55); }
@media (max-width: 520px) { .bio { grid-template-columns: minmax(0, 1fr); } }
.closer { margin-top: 36px; font-family: var(--font-head); font-size: 1.15rem; color: var(--white); max-width: 60ch; }

/* ---------- Render: snapshot document ---------- */
.doc { padding: 26px; display: grid; gap: 14px; }
.doc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-family: var(--font-head); }
.doc-head b { font-size: 1.1rem; }
.doc-head span { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.doc-part { padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,0.045); border: 1px solid rgba(0,245,212,0.2); }
.doc-part h3 { font-size: 1rem; }
.doc-part p { font-size: 0.92rem; color: var(--muted); }
.doc .accent { padding: 18px; }
.doc .accent h3 { font-size: 1.05rem; }
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.phases span { text-align: center; font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; padding: 6px 4px; border-radius: 8px; background: rgba(11,19,43,0.14); }

/* Desktop: copy + summary card on the left, a report page filling the right column at the same height.
   Phone: copy, then a short crop of the page fading under the card. */
.snap { grid-template-areas: "copy" "preview" "card"; gap: 0; }
.snap-copy { grid-area: copy; margin-bottom: 40px; }
.snap-card { grid-area: card; }
.report-preview { grid-area: preview; margin: 0 0 -56px; }
.report-preview figcaption { font-family: var(--font-head); font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.report-preview img {
  display: block; width: 100%; height: auto; aspect-ratio: 1040 / 852; object-fit: cover; object-position: top;
  border-radius: 14px 14px 0 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 45%, transparent 92%);
}
@media (min-width: 901px) {
  .snap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "copy preview" "card preview"; column-gap: 56px; align-items: stretch; }
  .snap-copy { margin-bottom: 32px; }
  .report-preview { margin: 0; display: flex; flex-direction: column; }
  .report-preview img {
    flex: 1 1 0; height: 0; min-height: 0; aspect-ratio: auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  }
}

/* ---------- Render: process steps ---------- */
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; position: relative; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 50px; top: 86px; bottom: -48px; width: 3px; background: var(--cyan); box-shadow: 0 0 12px rgba(0,245,212,0.7); z-index: 0; }
.step { padding: 24px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px 20px; align-items: start; }
.step-body { display: grid; gap: 10px; align-content: start; min-width: 0; }
/* Last step: the path's Amber endpoint, leading into contact. */
.step:last-child .badge { color: var(--amber); border-color: var(--amber); box-shadow: 0 0 0 6px rgba(11,19,43,0.9), 0 0 18px rgba(255,159,28,0.7); }
@media (max-width: 720px) {
  .step { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .step:not(:last-child)::before { display: none; }
  .doc { padding: 14px; }
  .doc .accent { padding: 10px; }
  .phases { gap: 6px; }
  .phases span { font-size: 0.72rem; padding: 6px 2px; }
}
/* Very narrow phones: stack the three phases so the labels never touch. */
@media (max-width: 360px) { .phases { grid-template-columns: minmax(0, 1fr); } }
.badge {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--cyan);
  background: radial-gradient(circle at 35% 30%, #1b2b55, var(--navy) 70%);
  border: 2px solid var(--cyan); box-shadow: 0 0 0 6px rgba(11,19,43,0.9), 0 0 18px rgba(0,245,212,0.7);
}
.step .kicker { font-family: var(--font-head); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.step p { font-size: 0.96rem; }

/* ---------- Contact ---------- */
.form { padding: 28px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--text); }
.field input, .field textarea {
  font: inherit; color: var(--white); background: rgba(11,19,43,0.6);
  border: 1px solid rgba(0,245,212,0.25); border-radius: 12px; padding: 12px 14px; width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,245,212,0.18); }
.form-status { font-size: 0.9rem; color: var(--amber); min-height: 1.4em; }
.endpoint-glow { position: absolute; width: 460px; height: 460px; left: -160px; top: -60px; background: radial-gradient(closest-side, rgba(255,159,28,0.22), transparent); pointer-events: none; z-index: -1; }

footer {
  position: relative; z-index: 2; border-top: 1px solid rgba(0,245,212,0.12);
  padding-block: 28px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: center;
  font-size: 0.9rem; color: var(--muted);
  background: var(--navy);
}
.footer-emblem { flex: 0 0 100%; height: 160px; object-fit: contain; }
footer a { color: var(--muted); }
footer a:hover { color: var(--cyan); }
footer .social { display: inline-flex; align-items: center; min-height: 24px; }

/* ---------- Text pages (privacy.html, 404.html) ---------- */
/* Scoped to main.page: the homepage wrapper is <div class="page"> (max-width 1200px above); a bare .page here capped it at 760px (2026-11-20). */
main.page { max-width: 760px; margin: 0 auto; padding: 56px 16px 80px; }
main.page h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 12px; }
main.page h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: 48px 0 12px; scroll-margin-top: calc(var(--bar) + 16px); }
main.page h3 { margin: 28px 0 8px; }
main.page p, main.page ul { margin: 0 0 14px; }
main.page ul { padding-left: 1.3em; color: var(--text); }
main.page li { margin-bottom: 6px; }
main.page .meta { color: var(--muted); font-size: 0.95rem; }
main.page .toc { list-style: none; padding: 0; }
main.page .toc a { text-decoration: none; }
main.page .toc a:hover { text-decoration: underline; }
main.page .table-wrap { overflow-x: auto; margin: 0 0 18px; }
main.page table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.92rem; color: var(--text); }
main.page th, main.page td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid rgba(0,245,212,0.14); }
main.page th { font-family: var(--font-head); color: var(--white); }
main.page .small { font-size: 0.85rem; color: var(--muted); }
main.page.notfound { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
main.page.notfound .btn { align-self: flex-start; }

/* Split-colour word in headings (Brand Guide 6.3) */
.hl { color: var(--cyan); }
.form-note { font-size: 0.85rem; color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 40; background: var(--amber); color: var(--navy); padding: 8px 12px; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  /* Hero: its reduced-motion feedback is opacity-only fades in place, so those stay on. */
  .hero-node.glow::before { animation: softglow 1.2s ease-in-out !important; }
  .hero .softglow { animation: softglow 1.3s ease-in-out !important; }
  .hero-node:active .node-label { scale: none; }
  .hero-card { transform: none; transition: opacity 0.2s ease-out, visibility 0s linear 0.2s !important; }
  .hero-card.open { transition-delay: 0s !important; }
}

