/* ============================================================
   CHRIS COOK — NODE PIPELINE DESIGN SYSTEM
   Graphite canvas · signal-amber accent · mono technical labels
   ============================================================ */

/* ---------------- Tokens ---------------- */
:root {
  --bg: #08090c;
  --bg-2: #0c0e12;
  --panel: #101319;
  --panel-2: #141821;
  --line: #1e232d;
  --line-2: #2b3340;

  --amber: #ffb454;
  --amber-hot: #ffcf8a;
  --amber-glow: rgba(255, 180, 84, 0.16);
  --amber-wire: rgba(255, 180, 84, 0.55);

  --live: #6fe0a8;
  --dev: #8ab4ff;

  --text: #eceff4;
  --muted: #99a3b1;
  --dim: #5d6675;

  --sans: 'Geist', system-ui, -apple-system, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Code', monospace;

  --w: 1080px;
  --w-narrow: 880px;
  --r: 12px;
}

/* ---------------- Reset / base ---------------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

::selection { background: var(--amber); color: var(--bg); }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------------- Background field ---------------- */
.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 180, 84, 0.055), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px;
  background-position: 0 0, -1px -1px, -1px -1px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.18) 30%, rgba(0,0,0,.18) 75%, rgba(0,0,0,.4));
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.18) 30%, rgba(0,0,0,.18) 75%, rgba(0,0,0,.4));
}

.page { position: relative; z-index: 1; }

/* ---------------- Type utilities ---------------- */
.k {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.k-dim { color: var(--dim); }
.k-amber { color: var(--amber); }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(8, 9, 12, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled { border-bottom-color: var(--line); }

.nav-inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-brand strong { color: var(--text); font-weight: 500; }

.nav-node {
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--amber);
  border-radius: 3px;
  position: relative;
  flex-shrink: 0;
}

.nav-node::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: var(--amber);
  border-radius: 1px;
  animation: nodeblink 3.2s ease-in-out infinite;
}

@keyframes nodeblink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--amber); }

/* ---------------- Hero ---------------- */
.hero {
  max-width: var(--w);
  margin: 0 auto;
  padding: 72px 28px 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
  min-height: 62vh;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-eyebrow .rule {
  width: 34px;
  height: 1px;
  background: var(--amber);
}

.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.028em;
  margin: 0 0 26px;
}

.hero h1 .amber { color: var(--amber); }

.hero .lede {
  font-size: 1.09rem;
  color: var(--muted);
  max-width: 30em;
  margin: 0 0 34px;
}

.hero .lede strong { color: var(--text); font-weight: 500; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------- Buttons ---------------- */
.btn {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 13px 24px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-2);
  transition: all 0.22s ease;
  cursor: pointer;
}

.btn-amber {
  background: var(--amber);
  border-color: var(--amber);
  color: #14100a;
}

.btn-amber:hover {
  background: var(--amber-hot);
  border-color: var(--amber-hot);
  box-shadow: 0 4px 28px -6px rgba(255, 180, 84, 0.45);
  transform: translateY(-1px);
}

.btn-ghost { background: transparent; color: var(--muted); }

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--amber-wire);
}

/* ---------------- Hero graph (SVG) ---------------- */
.hero-graph {
  position: relative;
  min-width: 0;
}

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

.hg-wire {
  fill: none;
  stroke: var(--line-2);
  stroke-width: 1.5;
}

.hg-wire-hot {
  fill: none;
  stroke: var(--amber-wire);
  stroke-width: 1.5;
  stroke-dasharray: 5 7;
  animation: wireflow 1.4s linear infinite;
}

@keyframes wireflow { to { stroke-dashoffset: -12; } }

.hg-node { fill: var(--panel); stroke: var(--line-2); stroke-width: 1.25; rx: 8; }
.hg-node-active { stroke: var(--amber-wire); }

.hg-label {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  fill: var(--muted);
  text-transform: uppercase;
}

.hg-label-amber { fill: var(--amber); }
.hg-label-dim { fill: var(--dim); font-size: 9px; letter-spacing: 0.16em; }

.hg-port { fill: var(--bg); stroke: var(--dim); stroke-width: 1.25; }
.hg-port-hot { stroke: var(--amber); fill: var(--amber-glow); }

.hg-packet { fill: var(--amber); filter: drop-shadow(0 0 5px rgba(255, 180, 84, 0.9)); }

/* ---------------- Ticker strip ---------------- */
.strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 14, 18, 0.6);
  overflow: hidden;
}

.strip-inner {
  max-width: var(--w);
  margin: 0 auto;
  padding: 15px 28px;
  display: flex;
  align-items: center;
  gap: 34px;
  flex-wrap: wrap;
  justify-content: space-between;
}

.strip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

.strip-item b { color: var(--muted); font-weight: 500; }

.strip-item .tick { color: var(--amber); }

/* ---------------- Sections ---------------- */
.section {
  max-width: var(--w);
  margin: 0 auto;
  padding: 96px 28px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 14px;
}

.section-head .idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--amber);
  letter-spacing: 0.1em;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  margin: 0;
}

.section-head .line {
  flex: 1;
  height: 1px;
  background: var(--line);
  align-self: center;
}

.section-sub {
  color: var(--muted);
  max-width: 44em;
  margin: 0 0 52px;
}

/* ---------------- Project graph ---------------- */
.graph {
  position: relative;
  padding-left: 44px;
}

/* spine */
.graph::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, var(--amber-wire), var(--line-2) 85%, transparent);
}

/* traveling packet on spine */
.graph::after {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(255, 180, 84, 0.9);
  animation: spinetravel 7s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes spinetravel {
  0% { top: 1%; opacity: 0; }
  6% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 97%; opacity: 0; }
}

.node-card {
  position: relative;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 30px 34px 26px;
  margin-bottom: 26px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  display: block;
}

.node-card:hover {
  border-color: var(--amber-wire);
  transform: translateX(4px);
  box-shadow: 0 18px 50px -20px rgba(255, 180, 84, 0.22), 0 8px 30px -12px rgba(0, 0, 0, 0.6);
}

/* connector stub from spine to card */
.node-card::before {
  content: '';
  position: absolute;
  left: -33px;
  top: 42px;
  width: 33px;
  height: 1.5px;
  background: var(--line-2);
  transition: background 0.3s ease;
}

.node-card:hover::before { background: var(--amber-wire); }

/* port dot on spine */
.node-card::after {
  content: '';
  position: absolute;
  left: -38px;
  top: 38px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--dim);
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.node-card:hover::after {
  border-color: var(--amber);
  background: var(--amber-glow);
  box-shadow: 0 0 12px rgba(255, 180, 84, 0.5);
}

.node-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.node-id {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--dim);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  margin-left: auto;
}

.status .led {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-live { color: var(--live); border-color: rgba(111, 224, 168, 0.35); }
.status-live .led { animation: ledpulse 2s ease-in-out infinite; }
.status-soon { color: var(--amber); border-color: rgba(255, 180, 84, 0.35); }
.status-dev { color: var(--dev); border-color: rgba(138, 180, 255, 0.3); }

@keyframes ledpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(111, 224, 168, 0.5); }
  50% { box-shadow: 0 0 0 4px rgba(111, 224, 168, 0); }
}

.node-title {
  font-size: 1.65rem;
  font-weight: 630;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.node-desc {
  color: var(--muted);
  font-size: 0.99rem;
  margin: 0 0 22px;
  max-width: 42em;
}

/* IO row */
.io {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: rgba(8, 9, 12, 0.55);
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 20px;
}

.io-tag {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.io-val {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.02em;
}

.io-arrow {
  color: var(--amber);
  font-family: var(--mono);
  font-size: 13px;
  animation: ioarrow 2.4s ease-in-out infinite;
}

@keyframes ioarrow {
  0%, 100% { transform: translateX(0); opacity: 0.7; }
  50% { transform: translateX(4px); opacity: 1; }
}

.node-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(8, 9, 12, 0.4);
  white-space: nowrap;
}

.chip-hot {
  color: var(--amber);
  border-color: rgba(255, 180, 84, 0.3);
}

.node-open {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease, gap 0.2s ease;
  white-space: nowrap;
}

.node-card:hover .node-open { color: var(--amber); gap: 12px; }

/* ---------------- Approach ---------------- */
.approach {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.approach-step {
  position: relative;
  padding: 26px 26px 26px 0;
}

.approach-step:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 13px;
  top: 36px;
  width: calc(100% - 60px);
  height: 1.5px;
  left: auto;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 5px, transparent 5px 11px);
}

.approach-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--amber-wire);
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--amber);
  margin-bottom: 16px;
  background: var(--bg);
  position: relative;
  z-index: 1;
}

.approach-step h3 {
  font-size: 1.02rem;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.approach-step p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
  max-width: 24em;
}

/* ---------------- Toolbox ---------------- */
.toolbox {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.toolbox-col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 24px 26px;
}

.toolbox-col h3 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbox-col h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------------- Profile ---------------- */
.profile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 44px;
  align-items: center;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 44px 48px;
  position: relative;
  overflow: hidden;
}

.profile::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(255, 180, 84, 0.09), transparent 70%);
  pointer-events: none;
}

.profile h2 {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  font-weight: 620;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.profile p {
  color: var(--muted);
  margin: 0;
  max-width: 40em;
}

.profile .hero-ctas { margin-top: 0; }

/* ---------------- Footer ---------------- */
footer {
  max-width: var(--w);
  margin: 96px auto 0;
  padding: 30px 28px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--dim);
  text-transform: uppercase;
}

footer .foot-links { display: flex; gap: 22px; }
footer a { color: var(--muted); transition: color 0.2s ease; }
footer a:hover { color: var(--amber); }

/* ============================================================
   DETAIL PAGES
   ============================================================ */

.crumb {
  max-width: var(--w-narrow);
  margin: 0 auto;
  padding: 34px 28px 0;
}

.crumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.crumb li { display: flex; align-items: center; }
.crumb li:not(:last-child)::after { content: '/'; margin: 0 12px; color: var(--line-2); }
.crumb a { color: var(--dim); transition: color 0.2s ease; }
.crumb a:hover { color: var(--amber); }
.crumb [aria-current="page"] { color: var(--text); }

.d-hero {
  max-width: var(--w-narrow);
  margin: 0 auto;
  padding: 44px 28px 40px;
}

.d-hero .node-head { margin-bottom: 22px; }

.d-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 650;
  letter-spacing: -0.026em;
  line-height: 1.05;
  margin: 0 0 20px;
}

.d-hero .lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 36em;
  margin: 0 0 30px;
}

.d-hero .io { max-width: 640px; }

.d-hero .hero-ctas { margin-top: 28px; }

.d-section {
  max-width: var(--w-narrow);
  margin: 0 auto;
  padding: 56px 28px 0;
}

.d-section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.d-section-head h2 {
  font-size: 1.35rem;
  font-weight: 620;
  letter-spacing: -0.015em;
  margin: 0;
  white-space: nowrap;
}

.d-section-head .line { flex: 1; height: 1px; background: var(--line); }

.d-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.d-cols p, .d-prose p {
  color: var(--muted);
  font-size: 0.99rem;
  margin: 0 0 1em;
}

.d-cols p:last-child, .d-prose p:last-child { margin-bottom: 0; }

.d-prose strong, .d-cols strong { color: var(--text); font-weight: 550; }

.d-prose { max-width: 46em; }

/* pull-quote panel */
.d-callout {
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  background: var(--panel);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 22px 28px;
  margin: 28px 0 0;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.6;
}

.d-callout .k { display: block; margin-bottom: 8px; color: var(--amber); }

/* screenshots */
.shots {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.shots.single { grid-template-columns: 1fr; }

.shot {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  cursor: zoom-in;
  transition: border-color 0.25s ease, transform 0.25s ease;
  margin: 0;
}

.shot:hover { border-color: var(--amber-wire); transform: translateY(-2px); }

.shot img { width: 100%; }

.shot figcaption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--dim);
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.shot-wide { grid-column: 1 / -1; }

/* ---------------- Pipeline (vertical flow) ---------------- */
.pipe {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding-left: 40px;
}

.pipe::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: var(--line-2);
}

.pipe-progress {
  position: absolute;
  left: 9px;
  top: 12px;
  width: 2px;
  height: 0;
  background: linear-gradient(to bottom, var(--amber), var(--amber-wire));
  box-shadow: 0 0 10px rgba(255, 180, 84, 0.35);
  transition: height 0.1s linear;
}

.pipe-step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 22px;
  opacity: 0.45;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.5s ease;
}

.pipe-step.on {
  opacity: 1;
  transform: translateY(0);
  border-color: var(--line-2);
}

.pipe-step::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 26px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--dim);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.pipe-step.on::before {
  border-color: var(--amber);
  box-shadow: 0 0 10px rgba(255, 180, 84, 0.55);
}

.pipe-step::after {
  content: '';
  position: absolute;
  left: -26px;
  top: 30.5px;
  width: 26px;
  height: 1.5px;
  background: var(--line-2);
}

.pipe-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pipe-tool {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  padding: 3px 9px;
  border: 1px solid rgba(255, 180, 84, 0.35);
  border-radius: 5px;
  background: rgba(255, 180, 84, 0.06);
  white-space: nowrap;
}

.pipe-title {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pipe-step p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
  line-height: 1.6;
}

.pipe-step p .t { color: var(--amber); }
.pipe-step p strong { color: var(--text); font-weight: 550; }

/* split row inside pipeline */
.pipe-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 22px;
}

.pipe-split .pipe-step { margin-bottom: 0; }
.pipe-split .pipe-step:last-child::before,
.pipe-split .pipe-step:last-child::after { display: none; }

/* ---------------- Style ladder (StoryViz) ---------------- */
.ladder {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.ladder-step {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 18px 16px;
  text-align: center;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.ladder-step:hover { border-color: var(--amber-wire); transform: translateY(-3px); }

.ladder-step .glyph {
  font-size: 1.5rem;
  margin-bottom: 10px;
  filter: grayscale(1) opacity(0.55);
  transition: filter 0.3s ease;
}

.ladder-step:hover .glyph { filter: none; }

.ladder-step:nth-child(1) .glyph { filter: grayscale(1) opacity(0.35); }
.ladder-step:nth-child(5) .glyph { filter: none; }

.ladder-step h4 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 4px;
}

.ladder-step span {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  letter-spacing: 0.06em;
}

.ladder-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-family: var(--mono);
  font-size: 12px;
  z-index: 1;
}

/* ---------------- Feature grid ---------------- */
.feats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.feat {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  padding: 24px 26px;
  transition: border-color 0.3s ease;
}

.feat:hover { border-color: var(--line-2); }

.feat .k { color: var(--amber); display: block; margin-bottom: 10px; }

.feat h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.feat p { color: var(--muted); font-size: 0.92rem; margin: 0; line-height: 1.6; }

/* ---------------- Prev / next ---------------- */
.pager {
  max-width: var(--w-narrow);
  margin: 72px auto 0;
  padding: 0 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.pager a {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--panel);
  padding: 20px 24px;
  transition: border-color 0.25s ease;
}

.pager a:hover { border-color: var(--amber-wire); }

.pager .k { display: block; margin-bottom: 6px; }

.pager .pager-title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pager .next { text-align: right; }

/* ---------------- Lightbox ---------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 8, 0.93);
  border: none;
  padding: 0;
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(1280px, 94vw);
  max-height: 92vh;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line-2);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(16, 19, 25, 0.95);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover { color: var(--amber); border-color: var(--amber-wire); }

/* ---------------- Reveal on scroll ---------------- */
.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.rv.in { opacity: 1; transform: none; }

.rv-1 { transition-delay: 0.06s; }
.rv-2 { transition-delay: 0.12s; }
.rv-3 { transition-delay: 0.18s; }
.rv-4 { transition-delay: 0.24s; }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 52px;
    min-height: 0;
  }
  .hero-graph { max-width: 560px; }
  .approach { grid-template-columns: 1fr 1fr; }
  .approach-step:not(:last-child)::after { display: none; }
  .toolbox { grid-template-columns: 1fr; }
  .profile { grid-template-columns: 1fr; gap: 26px; padding: 34px 30px; }
  .ladder { grid-template-columns: repeat(5, 1fr); gap: 10px; }
}

@media (max-width: 720px) {
  .section { padding-top: 72px; }
  .nav-links { gap: 16px; }
  .nav-links a:not(:last-child) { display: none; }
  .graph { padding-left: 30px; }
  .node-card { padding: 24px 22px 20px; }
  .node-card::before { left: -19px; width: 19px; }
  .node-card::after { left: -24px; }
  .d-cols { grid-template-columns: 1fr; gap: 20px; }
  .shots { grid-template-columns: 1fr; }
  .feats { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: 1fr; }
  .ladder-step { display: flex; align-items: center; gap: 14px; text-align: left; padding: 14px 16px; }
  .ladder-step .glyph { margin-bottom: 0; }
  .ladder-step h4 { margin-bottom: 2px; }
  .ladder-step:not(:last-child)::after {
    content: '↓';
    right: auto;
    left: 24px;
    top: auto;
    bottom: -16px;
    transform: none;
  }
  .ladder { gap: 22px; }
  .pipe { padding-left: 30px; }
  .pipe-step::before { left: -25px; }
  .pipe-step::after { left: -16px; width: 16px; }
  .pipe::before, .pipe-progress { left: 5px; }
  .pipe-split { grid-template-columns: 1fr; }
  .pipe-split .pipe-step { margin-bottom: 0; }
  .pipe-split .pipe-step:last-child::before,
  .pipe-split .pipe-step:last-child::after { display: block; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { text-align: left; }
  .strip-inner { justify-content: flex-start; gap: 14px 26px; }
}

/* ---------------- Reduced motion ---------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .rv { opacity: 1; transform: none; }
  .pipe-step { opacity: 1; transform: none; }
  .graph::after { display: none; }
  .hg-packet { display: none; }
}
