/* ============================================================
   MBP FORGE — REMASTERED (direction v3: Aluminum + The Brain)
   Light metallic ground · circuit-brain centerpiece
   cyan = the system · ember = the spark/CTA
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-var.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-var.woff2') format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* color — brushed aluminum */
  --bg:      #E9EBEE;
  --bg-2:    #DEE2E7;
  --panel:   rgba(255, 255, 255, 0.62);
  --panel-2: rgba(255, 255, 255, 0.85);
  --line:    rgba(22, 50, 70, 0.16);
  --line-2:  rgba(22, 50, 70, 0.08);
  --ink:     #16202B;   /* headlines */
  --text:    #2F3E4C;   /* body */
  --soft:    #536470;   /* secondary */
  --cyan:    #38DBFF;   /* glow-only accent */
  --cyan-t:  #0B7285;   /* cyan for text/lines on light (AA) */
  --ember:   #FF6B2C;   /* CTA fill, spark */
  --molten:  #FFB36B;
  --ember-t: #B23E0E;   /* ember for text on light (AA) */
  --paper:   #F5F0E6;   /* the one warm section */
  --ink-warm:#140A05;

  /* type */
  --f-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

  --fs-hero: clamp(2.625rem, 1.1rem + 5.2vw, 5rem);
  --fs-h2:   clamp(1.9rem, 1.2rem + 2.6vw, 3.25rem);
  --fs-sub:  clamp(1.2rem, 1.05rem + 0.6vw, 1.6rem);
  --fs-body: 1.0625rem;
  --fs-body-s: 0.96875rem;
  --fs-mono: 0.8125rem;

  /* spacing */
  --s1: 0.5rem; --s2: 0.875rem; --s3: 1.5rem;
  --s4: 2.25rem; --s5: 3.75rem; --s6: 6.5rem; --s7: 9rem;

  --maxw: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* motion */
  --t-instant: 80ms; --t-quick: 160ms; --t-base: 320ms;
  --t-slow: 560ms; --t-forge: 900ms;
  --e-settle: cubic-bezier(0.16, 1, 0.3, 1);
  --e-machine: cubic-bezier(0.7, 0, 0.2, 1);
  --e-heat: cubic-bezier(0.4, 0, 0.6, 1);
  --d-hair: 4px; --d-step: 12px; --d-move: 24px;
}

/* ---------- Reset + aluminum ground ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}
/* brushed-metal sheen + faint neural constellation — subtle, never a grid */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    linear-gradient(105deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 30%, rgba(180,190,200,0.25) 55%, rgba(255,255,255,0.4) 80%),
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(56, 219, 255, 0.10), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560'%3E%3Cg fill='none' stroke='rgba(22,50,70,0.055)' stroke-width='1'%3E%3Cpath d='M84 96 L212 168 L180 300 M212 168 L368 112 L462 238 M462 238 L392 396 L312 348 M180 300 L312 348 M368 112 L462 238'/%3E%3C/g%3E%3Cg fill='rgba(22,50,70,0.09)'%3E%3Ccircle cx='84' cy='96' r='2.5'/%3E%3Ccircle cx='212' cy='168' r='3'/%3E%3Ccircle cx='180' cy='300' r='2.5'/%3E%3Ccircle cx='368' cy='112' r='2.5'/%3E%3Ccircle cx='392' cy='396' r='2.5'/%3E%3Ccircle cx='312' cy='348' r='3'/%3E%3C/g%3E%3Ccircle cx='462' cy='238' r='3' fill='rgba(11,114,133,0.16)'/%3E%3C/svg%3E");
  background-size: 100% 100%, 100% 100%, 560px 560px;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: rgba(56, 219, 255, 0.35); color: var(--ink); }
:focus-visible { outline: 2px solid var(--cyan-t); outline-offset: 3px; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); position: relative; z-index: 2; }

.skip {
  position: absolute; left: var(--gutter); top: -3rem; z-index: 100;
  background: var(--ember); color: var(--ink-warm);
  font-family: var(--f-mono); font-size: var(--fs-mono);
  padding: 0.6em 1em; transition: top var(--t-quick) var(--e-settle);
}
.skip:focus-visible { top: var(--s2); }

/* ---------- Text roles ---------- */
.eyebrow {
  font-family: var(--f-mono); font-size: var(--fs-mono);
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan-t);
  display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: "//"; color: rgba(11, 114, 133, 0.5); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: var(--fs-hero); line-height: 1.02; font-weight: 700; }
h2 { font-size: var(--fs-h2); line-height: 1.08; }
h3 { font-size: var(--fs-sub); line-height: 1.25; font-weight: 500; }
.accent-cy { color: var(--cyan-t); }
.accent-em { color: var(--ember-t); }

/* ---------- Machined panel (light HUD) ---------- */
.hud {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(22, 50, 70, 0.06), 0 8px 24px -12px rgba(22, 50, 70, 0.12);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.hud::before, .hud::after {
  content: ""; position: absolute; width: 13px; height: 13px;
  border: 2px solid var(--cyan-t); opacity: 0.6; pointer-events: none;
}
.hud::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hud::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hud-hover { transition: border-color var(--t-quick) var(--e-settle), box-shadow var(--t-quick) var(--e-settle); }
.hud-hover:hover { border-color: var(--cyan-t); box-shadow: 0 0 30px -6px rgba(56, 219, 255, 0.45), 0 1px 2px rgba(22,50,70,0.06); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  font-family: var(--f-mono); font-size: var(--fs-mono);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 1em 1.75em;
  position: relative;
  transition: background-color var(--t-quick) var(--e-settle),
              border-color var(--t-quick) var(--e-settle),
              color var(--t-quick) var(--e-settle),
              box-shadow var(--t-quick) var(--e-settle);
}
.btn-primary { background: var(--ember); color: var(--ink-warm); }
.btn-primary:hover { background: var(--molten); box-shadow: 0 6px 24px -6px rgba(255, 107, 44, 0.55); }
.btn-primary:active { filter: brightness(0.94); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: rgba(255,255,255,0.4); }
.btn-ghost:hover { border-color: var(--cyan-t); color: var(--cyan-t); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 60;
  background: rgba(233, 235, 238, 0.85);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.nav::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px;
  background: var(--line);
  opacity: 0; transition: opacity var(--t-quick) var(--e-settle);
}
.nav.scrolled::after { opacity: 1; }
.nav-inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 0.7rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
}
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo img { height: 48px; width: auto; }
.nav-logo .brand-name {
  font-family: var(--f-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.01em; color: var(--ink);
}
.nav-logo .brand-sub {
  display: block; font-family: var(--f-mono); font-weight: 400;
  font-size: 9px; letter-spacing: 0.18em; color: var(--soft); text-transform: uppercase;
}
.nav-right { display: flex; align-items: center; gap: var(--s4); }
.nav-links { display: flex; align-items: center; gap: var(--s3); list-style: none; }
.nav-links a {
  font-family: var(--f-mono); font-size: 12.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--soft);
  padding: 0.4em 0; position: relative;
  transition: color var(--t-quick) var(--e-settle);
}
.nav-links a:hover { color: var(--cyan-t); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--cyan-t);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t-quick) var(--e-machine);
}
.nav-links a:hover::after, .nav-links a[aria-current="true"]::after { transform: scaleX(1); }
.nav .btn { padding: 0.7em 1.3em; }
.nav-cta-label-s { display: none; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-logo img { height: 36px; }
  .nav-cta-label-l { display: none; }
  .nav-cta-label-s { display: inline; }
}

/* ---------- Sections ---------- */
main { display: block; }
.section { padding-block: var(--s6); position: relative; }
.section-band { background: linear-gradient(180deg, var(--bg-2), transparent); }
.section-paper { background: var(--paper); }
.sec-head { max-width: 42rem; margin-bottom: var(--s5); }
.sec-head .eyebrow { display: inline-flex; margin-bottom: var(--s2); }
.sec-head p.kicker { margin-top: var(--s2); color: var(--soft); max-width: 34rem; font-size: var(--fs-body); }
.shell-note {
  font-family: var(--f-mono); font-size: var(--fs-mono);
  color: var(--soft); border: 1px dashed var(--line);
  padding: var(--s4); letter-spacing: 0.06em;
}

/* ---------- Reveal: power on ---------- */
.reveal {
  opacity: 0;
  transform: translateY(var(--d-step));
  transition:
    opacity var(--t-slow) var(--e-settle),
    transform var(--t-slow) var(--e-settle),
    border-color var(--t-slow) var(--e-settle);
  transition-delay: var(--rd, 0ms);
}
.sec-head.reveal { transform: translateY(var(--d-move)); }
.reveal.in { opacity: 1; transform: none; }
.ignite .w {
  opacity: 0; display: inline-block; transform: translateY(0.15em);
  transition: opacity var(--t-base) var(--e-settle), transform var(--t-base) var(--e-settle);
  transition-delay: var(--wd, 0ms);
}
.ignite.lit .w { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .sec-head.reveal { opacity: 1; transform: none; transition: none; }
  .ignite .w { opacity: 1; transform: none; transition: none; }
}

/* ---------- Hero — the Brain ---------- */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  padding-block: calc(var(--s7) + 1rem) var(--s5);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
  gap: var(--s4);
  align-items: center;
  width: 100%;
}
.hero-h1 { margin-top: var(--s3); }
.hero-sub { margin-top: var(--s3); color: var(--text); max-width: 31rem; font-size: 1.125rem; }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.hero-visual { min-width: 0; position: relative; }
/* the brain blends — no frame, no box; its own light-gray render IS the ground */
.brain-wrap { position: relative; }
.brain-img {
  width: 100%; height: auto;
  /* multiply melts the render's light-gray ground into the page; mask feathers the rest */
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, #000 45%, transparent 88%);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, #000 45%, transparent 88%);
}
.brain-float { animation: brain-float 8s var(--e-heat) infinite; }
@keyframes brain-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
/* static glow — the brain already floats and scans; a third loop on the same
   object is ambient clutter (benchmark: nothing moves while you read) */
.brain-glow {
  position: absolute; left: 50%; top: 54%; width: 62%; height: 46%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, rgba(56, 219, 255, 0.28), transparent 65%);
  pointer-events: none;
  opacity: 0.85;
}
/* scan line sweeping the brain — the system reading itself */
.brain-scan {
  position: absolute; left: 8%; right: 8%; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 219, 255, 0.5), transparent);
  animation: brain-scan 7s linear infinite;
  pointer-events: none;
}
@keyframes brain-scan {
  0% { top: 6%; opacity: 0; }
  8% { opacity: 1; }
  92% { opacity: 1; }
  100% { top: 94%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .brain-scan { display: none; } }

.hero-caption {
  font-family: var(--f-mono); font-size: var(--fs-mono);
  letter-spacing: 0.08em; color: var(--soft);
  margin-top: var(--s2); text-align: center;
}
.hero-caption .cap-arrow { color: var(--ember-t); }
@media (prefers-reduced-motion: reduce) {
  .brain-float, .brain-glow { animation: none; }
}
@media (max-width: 767px) {
  .hero { padding-top: calc(var(--s6) + 3rem); }
  .hero-grid { grid-template-columns: 1fr; gap: var(--s4); }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-caption { text-align: left; }
}

/* ---------- Proof strip ---------- */
.proof { margin-top: var(--s5); }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.tm { padding: var(--s3); border-right: 1px solid var(--line-2); }
.tm:last-child { border-right: 0; }
.tm .k {
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft);
}
.tm .v { font-family: var(--f-mono); font-size: 1.375rem; color: var(--cyan-t); margin-top: 6px; }
.tm .v small { font-size: 0.8rem; color: var(--soft); }
.tm .b { font-size: 0.8125rem; color: var(--soft); margin-top: 4px; }
.tm .b s { color: rgba(83, 100, 112, 0.85); }
@media (max-width: 1023px) and (min-width: 640px) {
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .tm:nth-child(2) { border-right: 0; }
  .tm:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 639px) {
  .proof-grid { grid-template-columns: 1fr; }
  .tm { border-right: 0; }
  .tm + .tm { border-top: 1px solid var(--line-2); }
}

/* ---------- The Layers (MBP Core scrollytelling) ---------- */
.layers-section { position: relative; }
.layers-grid {
  display: grid;
  grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
  gap: var(--s5);
  align-items: start;
}
.layers-steps { display: flex; flex-direction: column; gap: 38vh; padding-block: 12vh 20vh; }
.layer-step { max-width: 26rem; opacity: 0.25; transition: opacity var(--t-slow) var(--e-settle); }
.layer-step.active { opacity: 1; }
.layer-step .l-index { font-family: var(--f-mono); font-size: var(--fs-mono); color: var(--ember-t); letter-spacing: 0.1em; }
.layer-step h3 { margin-top: var(--s1); }
.layer-step p { margin-top: var(--s2); color: var(--soft); font-size: var(--fs-body-s); }
.layers-visual {
  position: sticky; top: 14vh;
  align-self: start;
}
.layers-brain { position: relative; }
.layers-brain img {
  width: 100%; height: auto;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, #000 45%, transparent 88%);
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, #000 45%, transparent 88%);
}
/* the scan ring travels between brain regions per active layer */
.scan-ring {
  position: absolute;
  width: 34%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--cyan);
  box-shadow: 0 0 24px rgba(56, 219, 255, 0.55), inset 0 0 24px rgba(56, 219, 255, 0.25);
  left: 33%; top: 60%;
  opacity: 0;
  transition: left var(--t-forge) var(--e-settle), top var(--t-forge) var(--e-settle),
              width var(--t-forge) var(--e-settle), opacity var(--t-slow) var(--e-settle);
  pointer-events: none;
}
.layers-brain.scanning .scan-ring { opacity: 1; }
/* the ring moves reactively as you scroll the layers — no idle ping echo,
   which pulsed every 3.2s while the layer copy was being read */
.scan-label {
  position: absolute; left: 50%; bottom: -2.4em; transform: translateX(-50%);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--cyan-t); text-transform: uppercase; white-space: nowrap;
}
/* per-layer engineering breakdown */
.layer-more { margin-top: var(--s3); border-top: 1px solid var(--line-2); }
.layer-more summary {
  list-style: none; cursor: pointer;
  position: relative;
  padding: var(--s2) 1.6rem var(--s2) 0;
  font-family: var(--f-mono); font-size: 11.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan-t);
}
.layer-more summary::-webkit-details-marker { display: none; }
.layer-more summary .st-more { top: var(--s2); }
.lm-body { padding-bottom: var(--s2); }
.lm-body p { font-size: var(--fs-body-s); color: var(--soft); }
.lm-body p strong { color: var(--ink); font-weight: 600; }
.lm-body .l-ex {
  margin-top: var(--s2);
  border-left: 2px solid var(--line);
  padding-left: var(--s2);
}
.lm-body .l-ex span {
  display: block; font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.12em; color: var(--ember-t); margin-bottom: 2px;
}
details[open].layer-more .lm-body { animation: body-in var(--t-base) var(--e-settle) both; }
@media (prefers-reduced-motion: reduce) { details[open].layer-more .lm-body { animation: none; } }

/* ring positions per layer (percentages of the brain image box) */
.layers-brain[data-layer="0"] .scan-ring { left: 14%; top: 6%; width: 72%; }   /* governance: perimeter shield */
.layers-brain[data-layer="1"] .scan-ring { left: 30%; top: 58%; width: 40%; }
.layers-brain[data-layer="2"] .scan-ring { left: 33%; top: 26%;  width: 34%; }
.layers-brain[data-layer="3"] .scan-ring { left: 12%; top: 34%; width: 30%; }
.layers-brain[data-layer="4"] .scan-ring { left: 56%; top: 34%; width: 30%; }
@media (prefers-reduced-motion: reduce) {
  .layer-step { opacity: 1; }
  .scan-ring { display: none; }
  .layers-steps { gap: var(--s5); padding-block: 0; }
}
@media (max-width: 767px) {
  .layers-grid { grid-template-columns: 1fr; }
  .layers-visual { position: relative; top: 0; margin-bottom: var(--s4); }
  .layers-steps { gap: var(--s4); padding-block: 0; }
  .layer-step { opacity: 1; }
}

/* ---------- Expandable panel shared bits ---------- */
details.stamp summary, details.station summary, details.note summary {
  list-style: none; cursor: pointer; position: relative;
}
details.stamp summary::-webkit-details-marker,
details.station summary::-webkit-details-marker,
details.note summary::-webkit-details-marker { display: none; }
.st-more {
  position: absolute; right: 0; top: 0;
  font-family: var(--f-mono); font-size: 1rem; color: var(--cyan-t);
  transition: transform var(--t-quick) var(--e-machine);
}
.st-more::before { content: "+"; }
details[open] > summary .st-more::before { content: "\2212"; }

/* opening choreography: body content powers on, icon seats in (04-motion tokens) */
@keyframes body-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes icon-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: none; }
}
details[open] .st-body,
details[open] .stamp-body,
details[open] .note-body,
details[open] .p-body,
details.faq[open] > p {
  animation: body-in var(--t-base) var(--e-settle) both;
}
details[open] .st-icon { animation: icon-in var(--t-slow) var(--e-settle) both; }
@media (prefers-reduced-motion: reduce) {
  details[open] .st-body, details[open] .stamp-body, details[open] .note-body,
  details[open] .p-body, details.faq[open] > p, details[open] .st-icon { animation: none; }
}

/* ---------- Creed stamps (interactive) ---------- */
.stamps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); align-items: start; }
.stamp { padding: var(--s4) var(--s3); }
.stamp-index { font-family: var(--f-mono); font-size: var(--fs-mono); color: var(--ember-t); letter-spacing: 0.08em; }
.stamp-title {
  font-family: var(--f-display); font-weight: 600;
  font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.05em;
  margin-top: var(--s1); color: var(--ink);
}
.stamp summary p { font-size: var(--fs-body-s); margin-top: var(--s2); color: var(--soft); }
.stamp-body { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line-2); }
.stamp-body p { font-size: var(--fs-body-s); color: var(--text); }
@media (max-width: 1023px) and (min-width: 640px) { .stamps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .stamps { grid-template-columns: 1fr; } }

/* ---------- Service stations + weld (interactive) ---------- */
.stations { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s3); align-items: start; }
/* spans are explicit per card — the grid follows the journey groups */
.st-12 { grid-column: 1 / -1; }
.st-7 { grid-column: span 7; }
.st-5 { grid-column: span 5; }
.st-4 { grid-column: span 4; }
/* journey group divider: the same verbs the Five Passes teach */
.st-group {
  grid-column: 1 / -1;
  display: flex; align-items: baseline; gap: var(--s2);
  margin-top: var(--s3); padding-bottom: var(--s1);
  border-bottom: 1px solid var(--line-2);
}
.stations .st-group:first-child { margin-top: 0; }
.st-verb {
  font-family: var(--f-mono); font-size: var(--fs-mono);
  letter-spacing: 0.14em; color: var(--ember-t);
}
.st-gline { font-size: var(--fs-body-s); color: var(--soft); }
.station { padding: var(--s4); }
.st-forged {
  margin-top: var(--s3); color: var(--ink); font-weight: 500;
  font-size: var(--fs-body-s);
}
.st-body {
  margin-top: var(--s3); padding-top: var(--s3);
  border-top: 1px solid var(--line-2);
  display: grid; grid-template-columns: 120px 1fr; gap: var(--s3);
  align-items: start;
}
.st-icon {
  width: 120px; height: 120px;
  mix-blend-mode: multiply;   /* melts the icon's gray tile into the panel */
}
.st-body p { font-size: var(--fs-body-s); color: var(--text); }
.st-body p + p { margin-top: var(--s2); }
@media (max-width: 639px) {
  .st-body { grid-template-columns: 1fr; }
  .st-icon { width: 96px; height: 96px; }
}
.st-index { font-family: var(--f-mono); font-size: var(--fs-mono); color: var(--cyan-t); letter-spacing: 0.08em; }
.station h3 { margin-top: var(--s1); }
@media (max-width: 767px) {
  .stations { grid-template-columns: 1fr; }
  .stations .station, .stations .st-group { grid-column: auto; }
}
@media (max-width: 1023px) and (min-width: 768px) {
  .st-4 { grid-column: span 6; }
  .st-4:last-child { grid-column: 4 / span 6; }
}

/* ---------- Method rail ---------- */
.rail { position: relative; padding-left: 3.25rem; max-width: 46rem; }
.rail-line {
  position: absolute; left: 1.25rem; top: 1rem; bottom: 1rem; width: 2px;
  background: var(--line-2); overflow: hidden;
}
.rail-line i {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--cyan-t), var(--ember));
  transform: scaleY(0); transform-origin: top;
  will-change: transform;
}
.pass { padding-block: var(--s4); position: relative; }
.pass::before {
  content: ""; position: absolute; left: -2.36rem; top: calc(var(--s4) + 0.45em);
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--line);
  transition: border-color var(--t-quick) var(--e-settle), box-shadow var(--t-quick) var(--e-settle);
}
.pass.lit::before { border-color: var(--ember); box-shadow: 0 0 10px rgba(255, 107, 44, 0.6); }
.pass-num {
  font-family: var(--f-mono); font-size: var(--fs-mono); letter-spacing: 0.1em;
  color: var(--soft);
  transition: color var(--t-quick) var(--e-settle);
}
.pass.lit .pass-num { color: var(--ember-t); }
.pass h3 { margin-top: var(--s1); }
.pass p { margin-top: var(--s1); color: var(--soft); font-size: var(--fs-body-s); max-width: 34rem; }
@media (prefers-reduced-motion: reduce) {
  .rail-line i { transform: none; }
  .pass::before { border-color: var(--ember); }
  .pass-num { color: var(--ember-t); }
}

/* ---------- Method: pass theater (details fade in from the right) ---------- */
.method-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s5); align-items: start;
}
/* huge run-out below the last pass: the pin must never bottom-out while 05 is active */
.method-grid .rail { padding-bottom: 85vh; }
/* transform-free pinning: fixed-height sticky window, card centered inside,
   NO internal scrolling — the card is sized to always fit the screen */
.pass-theater {
  position: sticky; top: 9vh;
  height: 82vh;
  display: grid;
  align-content: center;
}
.pd-card {
  grid-area: 1 / 1;
  padding: var(--s3);
  overflow: visible;
  opacity: 0; transform: translateX(40px);
  transition: opacity var(--t-slow) var(--e-settle), transform var(--t-slow) var(--e-settle);
  pointer-events: none;
}
.pd-card.active { opacity: 1; transform: none; pointer-events: auto; }
.pd-card h3 { font-size: 1.1rem; margin-bottom: var(--s1); }
.pd-block { margin-top: var(--s2); }
.pd-block span {
  display: block; font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.14em; color: var(--ember-t);
}
.pd-block p { margin-top: 2px; color: var(--soft); font-size: 0.875rem; line-height: 1.5; }
.mini-dg {
  width: 100%; height: auto; max-width: 220px;
  border: 1px solid var(--line-2); background: rgba(233, 235, 238, 0.5);
  padding: 6px; margin-bottom: var(--s2);
}
@media (max-height: 880px) {
  .mini-dg { max-width: 170px; }
  .pd-block p { font-size: 0.82rem; line-height: 1.45; }
  .pd-card h3 { font-size: 1rem; }
}
/* diagram language (shared with tools page) */
.dg-box rect { fill: rgba(255,255,255,0.85); stroke: var(--line); }
.dg-box text {
  fill: var(--ink); font-family: var(--f-mono); font-size: 12px;
  text-anchor: middle; letter-spacing: 0.06em;
}
.dg-box .dg-small { font-size: 9.5px; fill: var(--soft); }
.dg-hot rect { stroke: var(--cyan-t); }
.dg-gate rect { stroke: var(--ember); }
.dg-obj rect { stroke-dasharray: 4 3; }
.dg-arrow line, .dg-arrow path { stroke: var(--cyan-t); stroke-width: 1.4; stroke-linecap: round; fill: none; }
.dg-dot { fill: var(--cyan-t); opacity: 0.9; }
@media (prefers-reduced-motion: reduce) { .dg-dot { display: none; } }
.pd-card .dg-box { opacity: 0; animation: dg-in var(--t-base) var(--e-settle) both; animation-delay: var(--dgd, 0ms); }
.pd-card .dg-arrow line, .pd-card .dg-arrow path {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: dg-draw 380ms var(--e-machine) both;
  animation-delay: var(--dgd, 0ms);
}
/* restart diagram choreography each time a card becomes active */
.pd-card:not(.active) .dg-box,
.pd-card:not(.active) .dg-arrow line,
.pd-card:not(.active) .dg-arrow path { animation: none; opacity: 0; }
.pd-card:not(.active) .dg-arrow line, .pd-card:not(.active) .dg-arrow path { opacity: 1; stroke-dashoffset: 1; }
@keyframes dg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes dg-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 1023px) {
  .method-grid { grid-template-columns: 1fr; }
  .method-grid .rail { padding-bottom: 0; }
  .pass-theater { position: static; height: auto; align-content: start; gap: var(--s3); }
  .pd-card { grid-area: auto; opacity: 1; transform: none; pointer-events: auto; max-height: none; overflow: visible; }
  .pd-card .dg-box { animation: none; opacity: 1; }
  .pd-card .dg-arrow line, .pd-card .dg-arrow path { animation: none; stroke-dashoffset: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-card { transition: none; }
  .pd-card .dg-box, .pd-card .dg-arrow line, .pd-card .dg-arrow path { animation: none; opacity: 1; stroke-dashoffset: 0; }
}

/* receipts: the checkable public record behind a named case study */
.cs-receipts {
  margin-top: var(--s2);
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s3);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em;
}
.cs-receipts span { color: var(--soft); letter-spacing: 0.14em; }
.cs-receipts a { color: var(--cyan-t); }
.cs-receipts a:hover { text-decoration: underline; }

/* ---------- Case study: the measured numbers, up front ---------- */
.cs-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
  margin-bottom: var(--s4);
  max-width: 52rem;
}
.cs-stat {
  padding: var(--s3) var(--s3) var(--s3) var(--s4);
  border-left: 2px solid var(--line);
  position: relative;
}
.cs-stat-lead { border-left-color: var(--ember); }
.cs-num {
  display: block;
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.75rem, 1.1rem + 1.9vw, 2.6rem);
  line-height: 1; letter-spacing: -0.02em;
  color: var(--ink);
}
.cs-num em {
  font-style: normal; font-weight: 500;
  font-size: 0.44em; letter-spacing: 0.02em; color: var(--soft);
}
.cs-num .cs-arrow { color: var(--ember-t); }
.cs-stat-lead .cs-num { color: var(--ember-t); }
/* a before → after pair must never break mid-value: one line, sized to fit */
.cs-num-pair {
  white-space: nowrap;
  font-size: clamp(1.65rem, 1.05rem + 1.6vw, 2.2rem);
}
.cs-k {
  display: block; margin-top: var(--s2);
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan-t);
}
.cs-b {
  display: block; margin-top: 4px;
  font-size: 0.8125rem; line-height: 1.5; color: var(--soft);
}
@media (max-width: 767px) {
  .cs-stats { grid-template-columns: 1fr; gap: var(--s2); }
}

/* ---------- Case study pillars ---------- */
.pillars { display: flex; flex-direction: column; gap: var(--s2); max-width: 52rem; }
.pillar summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr; gap: 4px var(--s3);
  padding: var(--s3) var(--s4);
  align-items: baseline;
}
.pillar summary::-webkit-details-marker { display: none; }
.p-index { font-family: var(--f-mono); font-size: var(--fs-mono); color: var(--ember-t); grid-row: span 2; }
.p-title { font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.p-line { color: var(--soft); font-size: var(--fs-body-s); }
.pillar .p-body { padding: 0 var(--s4) var(--s4) calc(var(--s4) + 1.9rem); }
.pillar .p-body p + p { margin-top: var(--s2); }
.p-ex {
  border-left: 2px solid var(--line);
  padding-left: var(--s2);
  font-size: var(--fs-body-s); color: var(--soft);
}
.p-ex span {
  display: block; font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.12em; color: var(--cyan-t); margin-bottom: 2px;
}
.p-close { font-family: var(--f-display); font-weight: 500; color: var(--ink); }
.cs-measure {
  margin-top: var(--s4);
  font-family: var(--f-mono); font-size: var(--fs-mono);
  letter-spacing: 0.08em; color: var(--soft);
}
.cs-cta { margin-top: var(--s3); }

/* ---------- People factor (paper) ---------- */
.people-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--s5); align-items: start;
}
.people-copy p { color: #4a4234; }
.people-copy p + p { margin-top: var(--s3); }
.people-copy strong, .people-copy em { color: var(--ink-warm); }
.op-note { font-size: var(--fs-body-s); color: #6b6252; }
.pull-quote {
  margin-top: var(--s3);
  font-family: var(--f-display); font-weight: 600;
  font-size: var(--fs-sub); line-height: 1.3; color: var(--ink-warm);
  border-left: 3px solid var(--ember);
  padding-left: var(--s3);
}
.op-sig {
  margin-top: var(--s2); padding-left: calc(var(--s3) + 3px);
  font-family: var(--f-mono); font-size: var(--fs-mono);
  letter-spacing: 0.06em; color: #6b6252;
}
@media (max-width: 767px) { .people-grid { grid-template-columns: 1fr; gap: var(--s4); } }

/* ---------- Modules ---------- */
.mods { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.mod {
  padding: var(--s4);
  display: flex; flex-direction: column; align-items: stretch;
  text-align: left; width: 100%; cursor: pointer;
}
.mod .tool-open {
  margin-top: var(--s2);
  font-family: var(--f-mono); font-size: 12px; color: var(--cyan-t);
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--t-quick) var(--e-settle), transform var(--t-quick) var(--e-settle);
}
.mod:hover .tool-open, .mod:focus-visible .tool-open { opacity: 1; transform: none; }
.mod-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.mod-tag {
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--soft);
}
.chip {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--soft);
  display: inline-flex; align-items: center; gap: 6px;
}
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--soft); }
.chip-on { color: var(--ember-t); }
/* status is carried by colour and label — a blinking dot beside body copy
   competes with reading, and there are 13 of them across the site */
.chip-on i {
  background: var(--ember); box-shadow: 0 0 7px rgba(255, 107, 44, 0.7);
}
.mod h3 { margin-top: var(--s3); }
.mod-sub { font-family: var(--f-mono); font-size: 12px; color: var(--cyan-t); margin-top: 4px; }
.mod > p:last-child { margin-top: var(--s2); color: var(--soft); font-size: var(--fs-body-s); }
@media (max-width: 767px) { .mods { grid-template-columns: 1fr; } }

/* ---------- Field notes + newsletter ---------- */
.notes-grid {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: var(--s3); align-items: start;
}
.notes-cards { display: grid; gap: var(--s3); align-items: start; }
.note { padding: var(--s4); }
.note summary { display: flex; flex-direction: column; gap: var(--s1); }
.note-date {
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.1em; color: var(--soft);
}
.note h3 { font-size: 1.2rem; }
.note summary p { color: var(--soft); font-size: var(--fs-body-s); }
.note-body { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line-2); }
.note-body p { color: var(--text); font-size: var(--fs-body-s); }
.note-read { display: inline-block; margin-top: var(--s2); font-family: var(--f-mono); font-size: 12px; color: var(--cyan-t); }
.note-read:hover { text-decoration: underline; }
.notes-all {
  margin-top: var(--s2);
  font-family: var(--f-mono); font-size: var(--fs-mono); letter-spacing: 0.04em;
}
.notes-all a { color: var(--cyan-t); }
.notes-all a:hover { text-decoration: underline; }
.newsletter { padding: var(--s4); position: sticky; top: 6rem; }
.nl-label {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ember-t);
}
.newsletter > p { margin-top: var(--s2); font-size: var(--fs-body-s); color: var(--soft); }
.nl-form { margin-top: var(--s3); }
.nl-input-label { display: none; }
.nl-row { display: flex; flex-direction: column; gap: var(--s2); }
.nl-row input {
  font: inherit; padding: 0.8em 1em;
  border: 1px solid var(--line); background: rgba(255,255,255,0.7);
  color: var(--ink); width: 100%;
}
.nl-row input:focus-visible { outline: 2px solid var(--cyan-t); outline-offset: 2px; }
.nl-done { margin-top: var(--s2); font-family: var(--f-mono); font-size: 12px; color: var(--cyan-t); }
.hp { position: absolute; left: -9999px; }
@media (max-width: 900px) {
  .notes-grid { grid-template-columns: 1fr; }
  .newsletter { position: relative; top: 0; }
}

/* ---------- FAQ ---------- */
.faqs { display: flex; flex-direction: column; gap: var(--s2); max-width: 46rem; }
.faq summary {
  list-style: none; cursor: pointer;
  padding: var(--s3) var(--s4);
  font-family: var(--f-display); font-weight: 500; font-size: 1.1rem; color: var(--ink);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: var(--s4); top: 50%;
  transform: translateY(-50%);
  font-family: var(--f-mono); color: var(--cyan-t);
  transition: transform var(--t-quick) var(--e-machine);
}
.faq[open] summary::after { content: "\2212"; }
.faq > p { padding: 0 var(--s4) var(--s4); color: var(--soft); font-size: var(--fs-body-s); max-width: 40rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: var(--s5); align-items: start;
}
/* ---------- KOVA: the companion at the ask ---------- */
.kova { margin-top: var(--s5); display: flex; align-items: center; gap: var(--s3); }
.kova-frames { position: relative; width: 96px; height: 104px; flex: none; }
.kova-f {
  position: absolute; inset: 0; margin: auto;
  max-width: 100%; max-height: 100%; width: auto; height: auto;
  opacity: 0; transform: scale(0.94);
  transition: opacity var(--t-slow) var(--e-settle), transform var(--t-slow) var(--e-settle);
}
.kova[data-state="idle"] .kova-f[data-for="idle"],
.kova[data-state="alert"] .kova-f[data-for="alert"],
.kova[data-state="done"]  .kova-f[data-for="done"] { opacity: 1; transform: none; }
/* KOVA sits still beside the form — it reacts to what you do (idle / alert /
   done) rather than bobbing while you type */
.kova-say {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--soft);
  transition: color var(--t-quick) var(--e-settle);
}
.kova[data-state="alert"] .kova-say { color: var(--ember-t); }
.kova[data-state="done"] .kova-say { color: var(--cyan-t); }
@media (prefers-reduced-motion: reduce) {
  .kova-f { transition: none; }
}

/* pricing structure, promoted out of the FAQ accordion — words, not numbers */
.pricing-how {
  margin-top: var(--s4);
  padding: var(--s3);
  border-left: 2px solid var(--cyan-t);
  background: rgba(11, 114, 133, 0.05);
}
.pricing-how .ph-k {
  display: block;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan-t);
}
.pricing-how p { margin-top: 6px; font-size: var(--fs-body-s); line-height: 1.55; color: var(--text); max-width: 52ch; }
.contact-note {
  margin-top: var(--s3);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--soft);
}
.contact-panel { padding: var(--s4); border-top: 2px solid var(--ember); }
.f-row { margin-bottom: var(--s3); }
.f-row label {
  display: block;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--soft); margin-bottom: 6px;
}
.f-row .opt { text-transform: none; letter-spacing: 0; }
.f-row input, .f-row textarea {
  font: inherit; width: 100%;
  padding: 0.8em 1em;
  border: 1px solid var(--line); background: rgba(255,255,255,0.7);
  color: var(--ink); resize: vertical;
}
.f-row input:focus-visible, .f-row textarea:focus-visible { outline: 2px solid var(--cyan-t); outline-offset: 2px; }
.f-row.invalid input, .f-row.invalid textarea { border-color: var(--ember-t); }
.f-err {
  margin-top: 6px; font-size: 0.8125rem; color: var(--ember-t);
  opacity: 0; transform: translateY(calc(-1 * var(--d-hair)));
  transition: opacity var(--t-base) var(--e-settle), transform var(--t-base) var(--e-settle);
}
.f-row.invalid .f-err { opacity: 1; transform: none; }
.f-carried {
  margin-bottom: 6px;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--cyan-t);
}
.f-submit { width: 100%; }
.f-done { text-align: center; padding: var(--s4) 0; }
.f-done-title {
  font-family: var(--f-mono); letter-spacing: 0.14em; color: var(--cyan-t);
  margin-bottom: var(--s2);
}
.f-fail { margin-top: var(--s2); font-size: var(--fs-body-s); color: var(--ember-t); }
.f-fail a { text-decoration: underline; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: var(--s4); } }
@media (prefers-reduced-motion: reduce) { .f-err { transition: none; } }

/* ---------- AEO row ---------- */
.aeo {
  margin-top: var(--s4); padding-top: var(--s3);
  border-top: 1px solid var(--line-2);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
}
.aeo-label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--soft);
}
.aeo a {
  font-family: var(--f-mono); font-size: 12px; color: var(--cyan-t);
}
.aeo a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding-block: var(--s5); position: relative; z-index: 2; }
.foot { display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; justify-content: space-between; }
.foot-brand { display: flex; align-items: center; gap: var(--s2); }
.foot-brand img { height: 36px; width: auto; }
.foot-nav { display: flex; flex-wrap: wrap; gap: var(--s3); list-style: none; }
.foot a, .foot p { font-family: var(--f-mono); font-size: var(--fs-mono); letter-spacing: 0.06em; color: var(--soft); }
.foot a { transition: color var(--t-quick) var(--e-settle); }
.foot a:hover { color: var(--cyan-t); }
@media (max-width: 767px) { .foot { flex-direction: column; align-items: flex-start; } }
