/* ============================================================
   no <BS> Marketing — black & white "computeristic" theme
   ============================================================ */

:root {
  --bg: #ffffff;
  --ink: #000000;
  --mut: #6b6b6b;
  --line: #000000;
  --hair: rgba(0, 0, 0, 0.12);
  --panel: #f4f4f4;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
/* Lenis smooth scroll (native scroll-behavior handed off to JS) */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

a { color: inherit; text-decoration: none; }
em { font-style: normal; text-decoration: underline; text-underline-offset: 3px; }

/* subtle CRT scanlines */
.scanlines {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply; opacity: .6;
}

/* ---------- Logo ---------- */
.logo {
  font-family: var(--mono); font-weight: 800; font-size: 20px;
  letter-spacing: -0.5px; display: inline-flex; align-items: baseline;
}
.logo__bracket { font-weight: 500; }
.logo__bs { font-weight: 800; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--mono); font-weight: 700; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.5px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 13px 20px; border: 2px solid var(--ink);
  transition: transform .12s ease, background .2s ease, color .2s ease;
  cursor: pointer; white-space: nowrap;
}
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { background: var(--bg); color: var(--ink); transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn__caret { animation: blink 1s steps(1) infinite; }

@keyframes blink { 50% { opacity: 0; } }
.blink { animation: blink 1.1s steps(1) infinite; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 2px solid transparent; transition: background .25s, border-color .25s;
}
.nav.scrolled { background: rgba(255,255,255,.9); backdrop-filter: blur(8px); border-color: var(--ink); }
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav__links { display: flex; gap: 26px; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.nav__links a { position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--ink); transition: width .2s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__cta { padding: 10px 16px; font-size: 12px; }
.nav__burger { display: none; font-family: var(--mono); font-size: 18px; background: none; border: none; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 150px 0 0; overflow: hidden; border-bottom: 2px solid var(--ink); }
.hero__grid {
  position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(var(--hair) 1px, transparent 1px), linear-gradient(90deg, var(--hair) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
}
.hero__webgl { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hero__inner {
  position: relative; z-index: 1; text-align: center; padding-bottom: 60px;
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1);
}
body.booting .hero__inner { opacity: 0; transform: translateY(34px); }
.hero__tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1px; font-weight: 500;
  border: 1.5px solid var(--ink); display: inline-flex; gap: 8px; align-items: center;
  padding: 7px 14px; margin-bottom: 28px;
}
.hero__title {
  font-family: var(--sans); font-weight: 700; letter-spacing: -2px;
  font-size: clamp(38px, 7vw, 82px); line-height: 0.98; margin-bottom: 22px;
}
.hl { position: relative; display: inline-block; }
.hl::after { content: ""; position: absolute; left: -2px; right: -2px; bottom: 6px; height: 14px; background: var(--ink); opacity: .12; z-index: -1; }
.hero__sub {
  max-width: 620px; margin: 0 auto 34px; font-size: clamp(15px, 2vw, 18px);
  color: #262626;
}

/* ---------- Terminal ---------- */
.terminal {
  max-width: 640px; margin: 0 auto 34px; text-align: left;
  border: 2px solid var(--ink); background: var(--ink);
  box-shadow: 8px 8px 0 rgba(0,0,0,1);
}
.terminal__bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  border-bottom: 2px solid #fff; background: var(--ink);
}
.terminal__bar .dot { width: 10px; height: 10px; border: 1.5px solid #fff; border-radius: 50%; display: inline-block; }
.terminal__title { font-family: var(--mono); font-size: 12px; color: #fff; margin-left: 8px; opacity: .8; }
.terminal__body {
  font-family: var(--mono); font-size: clamp(12px, 1.6vw, 14px); line-height: 1.7;
  color: #fff; padding: 18px; min-height: 210px; white-space: pre-wrap; word-break: break-word;
}
.terminal__body .g { color: #bdbdbd; }
.cursor { color: #fff; animation: blink 1s steps(1) infinite; }

.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Marquee ---------- */
.marquee { border-top: 2px solid var(--ink); background: var(--ink); color: var(--bg); overflow: hidden; }
.marquee__track {
  display: flex; gap: 28px; align-items: center; white-space: nowrap;
  font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: 1px;
  padding: 12px 0; width: max-content; animation: scroll 26s linear infinite;
}
.marquee__track span { text-transform: uppercase; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Section heads ---------- */
.section__head { margin-bottom: 46px; max-width: 720px; }
.section__idx {
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: 2px;
  display: inline-block; margin-bottom: 12px; border-bottom: 2px solid var(--ink); padding-bottom: 2px;
}
.section__title { font-size: clamp(28px, 4.5vw, 46px); letter-spacing: -1.5px; font-weight: 700; line-height: 1.02; }
.section__lead { margin-top: 14px; color: #333; font-size: 17px; max-width: 620px; }

section { padding: 92px 0; }
.hero { padding-top: 150px; padding-bottom: 0; }

/* ---------- Stats: "SYSTEM LEDGER" (Method-language node grid) ---------- */
.stats { position: relative; background: var(--ink); color: var(--bg); border-bottom: 2px solid var(--ink); overflow: hidden; }
.stats__inner { position: relative; z-index: 2; }
.stats__gridbg { position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 50px 50px; mask-image: radial-gradient(ellipse 80% 90% at 50% 45%, #000 30%, transparent 100%); }
.stats .section__idx, .stats .section__title { color: var(--bg); border-color: var(--bg); }
.stats .section__idx .blink { color: #fff; margin-right: 8px; }

.stats__grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--bg); }
/* the "data flow" line that threads the nodes — draws across on reveal (structural, not decorative) */
.stats__flow { position: absolute; top: 61px; left: 0; height: 2px; width: 100%; z-index: 0; overflow: hidden; pointer-events: none; }
.stats__flow i { position: absolute; left: 0; top: 0; height: 100%; width: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.55), rgba(255,255,255,.15)); box-shadow: 0 0 10px rgba(255,255,255,.4); }
.stats__grid.run .stats__flow i { animation: railFill 2.1s cubic-bezier(.35,0,.1,1) forwards; }
@keyframes railFill { to { width: 100%; } }

.stat { position: relative; z-index: 1; padding: 30px 24px 30px; border-right: 2px solid var(--bg);
  opacity: 0; transform: translateY(20px); transition: opacity .55s ease, transform .55s ease, background .25s ease; transition-delay: calc(var(--i) * .12s); }
.stat.in { opacity: 1; transform: none; }
.stat:last-child { border-right: none; }
.stat:hover { background: rgba(255,255,255,.045); }
.stat__hd { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.stat__idx { flex: 0 0 auto; width: 28px; height: 28px; border: 1.5px solid rgba(255,255,255,.4); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 11px; font-weight: 800; color: #9a9a9a;
  background: #000; transition: all .45s ease; transition-delay: calc(var(--i) * .12s + .35s); }
.stat.in .stat__idx { border-color: #fff; color: #000; background: #fff; box-shadow: 0 0 16px 3px rgba(255,255,255,.4); }
.stat__k { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: #7f7f7f; }
.stat__num { font-family: var(--mono); font-weight: 800; font-size: clamp(29px, 4.1vw, 47px); letter-spacing: -2px; line-height: 1;
  white-space: nowrap; word-spacing: -0.24em; text-shadow: 0 0 24px rgba(255,255,255,.15); }
.stat__meter { height: 5px; border: 1px solid rgba(255,255,255,.26); margin: 16px 0 12px; overflow: hidden; }
.stat__meter i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, #fff 0 5px, transparent 5px 8px);
  box-shadow: 0 0 8px rgba(255,255,255,.4); transition: width 1.3s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i) * .12s + .5s); }
.stat.in .stat__meter i { width: var(--w, 80%); }
.stat__label { font-family: var(--mono); font-size: 13px; color: #c9c9c9; }

/* ---------- Services cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--ink); }
.card {
  padding: 30px 26px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transition: background .2s, color .2s; position: relative;
}
.card:nth-child(3n) { border-right: none; }
.card:nth-child(n+4) { border-bottom: none; }
.card:hover { background: var(--ink); color: var(--bg); }
.card__id { font-family: var(--mono); font-size: 12px; color: var(--mut); margin-bottom: 16px; }
.card:hover .card__id { color: #bbb; }
.card h3 { font-size: 22px; letter-spacing: -0.5px; margin-bottom: 10px; }
.card p { font-size: 15px; color: #333; }
.card:hover p { color: #ddd; }

/* ---------- Split (D2C / B2B) ---------- */
.split { border-bottom: 2px solid var(--ink); }
.split__inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.split__inner--rev .split__copy { order: 2; }
.split__inner--rev .split__panel { order: 1; }
.split__copy .section__idx { display: inline-block; }
.split__copy .section__title { margin: 12px 0 16px; }
.split__copy > p { color: #333; font-size: 17px; margin-bottom: 22px; max-width: 520px; }
.checklist { list-style: none; margin: 0 0 28px; display: grid; gap: 10px; }
.checklist li { font-family: var(--mono); font-size: 14px; padding-left: 26px; position: relative; }
.checklist li::before { content: "[x]"; position: absolute; left: 0; font-weight: 700; }
.split__actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- Sub-page hero / blocks ---------- */
.subhero { padding: 150px 0 70px; border-bottom: 2px solid var(--ink); position: relative; overflow: hidden; }
.subhero__crumb { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--mut); margin-bottom: 18px; }
.subhero__crumb a:hover { text-decoration: underline; }
.subhero h1 { font-size: clamp(38px, 7vw, 78px); letter-spacing: -2px; line-height: 0.98; font-weight: 700; max-width: 900px; }
.subhero p { max-width: 620px; margin-top: 20px; font-size: 18px; color: #262626; }
.subhero__cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

.feature { border-bottom: 2px solid var(--ink); }
.feature__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--ink); }
.feature__item { padding: 30px 26px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transition: background .2s, color .2s; }
.feature__item:nth-child(3n) { border-right: none; }
.feature__item:nth-last-child(-n+3) { border-bottom: none; }
.feature__item:hover { background: var(--ink); color: var(--bg); }
.feature__item .card__id { font-family: var(--mono); font-size: 12px; color: var(--mut); margin-bottom: 14px; }
.feature__item:hover .card__id { color: #bbb; }
.feature__item h3 { font-size: 20px; letter-spacing: -0.5px; margin-bottom: 10px; }
.feature__item p { font-size: 15px; color: #333; }
.feature__item:hover p { color: #ddd; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--ink); }
.kpi { padding: 30px 26px; border-right: 2px solid var(--ink); }
.kpi:last-child { border-right: none; }
.kpi b { font-family: var(--mono); font-weight: 800; font-size: clamp(30px, 4.5vw, 48px); letter-spacing: -2px; display: block; }
.kpi span { font-family: var(--mono); font-size: 13px; color: var(--mut); }

@media (max-width: 900px) {
  .feature__grid { grid-template-columns: 1fr 1fr; }
  .feature__item:nth-child(3n) { border-right: 2px solid var(--ink); }
  .feature__item:nth-child(2n) { border-right: none; }
  .feature__item:nth-last-child(-n+3) { border-bottom: 2px solid var(--ink); }
  .kpis { grid-template-columns: 1fr; }
  .kpi { border-right: none; border-bottom: 2px solid var(--ink); }
  .kpi:last-child { border-bottom: none; }
}
@media (max-width: 560px) {
  .feature__grid { grid-template-columns: 1fr; }
  .feature__item { border-right: none !important; border-bottom: 2px solid var(--ink) !important; }
  .feature__item:last-child { border-bottom: none !important; }
}

.panel { border: 2px solid var(--ink); background: var(--panel); padding: 26px; box-shadow: 8px 8px 0 var(--ink); }
.panel__row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 14px; padding: 12px 0; border-bottom: 1px dashed var(--hair); }
.panel__row span { color: var(--mut); }
.panel__row b { font-weight: 700; }
.panel__bar { height: 14px; border: 2px solid var(--ink); margin: 20px 0 10px; }
.panel__bar i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--ink) 0 6px, transparent 6px 10px); transition: width 1.2s ease; }
.panel__bar.in i { width: var(--w); }
.panel__note { font-family: var(--mono); font-size: 12px; color: var(--mut); }

/* ---------- Method steps ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--ink); counter-reset: s; }
.step { padding: 28px 24px; border-right: 2px solid var(--ink); transition: background .2s, color .2s; }
.step:last-child { border-right: none; }
.step:hover { background: var(--ink); color: var(--bg); }
.step__no { font-family: var(--mono); font-weight: 800; font-size: 40px; letter-spacing: -2px; margin-bottom: 18px; }
.step h3 { font-size: 21px; margin-bottom: 10px; letter-spacing: -0.5px; }
.step p { font-size: 14.5px; color: #333; }
.step:hover p { color: #ddd; }

/* ---------- Quotes ---------- */
.quotes__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 2px solid var(--ink); }
.quote { padding: 30px 28px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.quote:nth-child(2n) { border-right: none; }
.quote:nth-child(n+3) { border-bottom: none; }
.quote p { font-size: 18px; letter-spacing: -0.3px; margin-bottom: 16px; }
.quote cite { font-family: var(--mono); font-size: 13px; font-style: normal; color: var(--mut); }

/* ---------- CTA ---------- */
.cta { background: var(--ink); color: var(--bg); text-align: center; }
.cta__inner { max-width: 720px; }
.cta .section__idx { color: var(--bg); border-color: var(--bg); }
.cta__title { font-size: clamp(32px, 5.5vw, 60px); letter-spacing: -2px; margin: 14px 0 16px; font-weight: 700; }
.cta .hl::after { background: var(--bg); opacity: .3; }
.cta__sub { color: #cfcfcf; font-size: 17px; max-width: 520px; margin: 0 auto 34px; }
.cta__form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; text-align: left; max-width: 560px; margin: 0 auto; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--mono); font-size: 12px; color: #bbb; letter-spacing: 1px; }
.field input, .field select {
  font-family: var(--mono); font-size: 14px; padding: 12px 14px;
  background: var(--ink); color: #fff; border: 2px solid #fff;
}
.field input:focus, .field select:focus { outline: none; background: #111; }
.field input::placeholder { color: #777; }
.cta__submit { grid-column: 1 / -1; justify-content: center; background: var(--bg); color: var(--ink); border-color: var(--bg); }
.cta__submit:hover { background: var(--ink); color: var(--bg); box-shadow: 4px 4px 0 #fff; }
.cta__msg { grid-column: 1 / -1; font-family: var(--mono); font-size: 13px; min-height: 18px; margin: 0; }
.cta__mail { display: inline-block; margin-top: 26px; font-family: var(--mono); font-size: 13px; border-bottom: 1px solid #fff; padding-bottom: 2px; }

/* ---------- Footer ---------- */
.footer { background: var(--bg); color: var(--ink); padding: 40px 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__brand p { font-family: var(--mono); font-size: 13px; color: var(--mut); margin-top: 6px; }
.footer__links { display: flex; gap: 22px; font-family: var(--mono); font-size: 13px; }
.footer__links a:hover { text-decoration: underline; }
.footer__meta { display: flex; flex-direction: column; gap: 4px; text-align: right; font-family: var(--mono); font-size: 12px; color: var(--mut); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
  /* Mobile perf: shorter pinned scroll, drop full-screen animated overlays & blur that thrash compositing during scroll. */
  .immersive { height: 300vh; }
  .immersive__scan { display: none; }
  .nav.scrolled, .theme-dark .nav.scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav.open .nav__links {
    display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    background: var(--bg); border-bottom: 2px solid var(--ink); padding: 18px 24px; gap: 16px;
  }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 2px solid var(--bg); }
  .cards { grid-template-columns: 1fr 1fr; }
  .card:nth-child(3n) { border-right: 2px solid var(--ink); }
  .card:nth-child(2n) { border-right: none; }
  .card:nth-child(n+4) { border-bottom: 2px solid var(--ink); }
  .card:nth-last-child(-n+2) { border-bottom: none; }
  .split__inner, .split__inner--rev .split__copy, .split__inner--rev .split__panel { grid-template-columns: 1fr; order: unset; }
  .split__inner { gap: 32px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2n) { border-right: none; }
  .step:nth-child(-n+2) { border-bottom: 2px solid var(--ink); }
}

@media (max-width: 560px) {
  section { padding: 64px 0; }
  .hero { padding-top: 120px; }
  .stats__grid { grid-template-columns: 1fr; }
  .stat { border-right: none !important; border-bottom: 2px solid var(--bg); }
  .stat:last-child { border-bottom: none; }
  .cards, .steps, .quotes__grid { grid-template-columns: 1fr; }
  .card, .step, .quote { border-right: none !important; border-bottom: 2px solid var(--ink) !important; }
  .card:last-child, .step:last-child, .quote:last-child { border-bottom: none !important; }
  .cta__form { grid-template-columns: 1fr; }
  .footer__meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   CASE STUDIES · METHOD STACK · LIVE ANIMATION LAYER
   ============================================================ */

/* Scroll progress bar (injected by JS) */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--ink); z-index: 200; transition: width .1s linear;
}
.nav.scrolled + .progress, .progress { mix-blend-mode: normal; }

.mono-accent { font-family: var(--mono); }

/* ---------- Method: step tags + framework stack ---------- */
.step__tags { list-style: none; margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.step__tags li { font-family: var(--mono); font-size: 11px; border: 1px solid currentColor; padding: 3px 7px; opacity: .8; }

.method__stack { margin-top: 56px; }
.method__stack-title { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; margin-bottom: 20px; text-transform: uppercase; }
.stack__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid var(--ink); }
.stack__item { padding: 24px 22px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transition: background .2s, color .2s, transform .2s; }
.stack__item:nth-child(3n) { border-right: none; }
.stack__item:nth-last-child(-n+3) { border-bottom: none; }
.stack__item:hover { background: var(--ink); color: var(--bg); }
.stack__k { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--mut); }
.stack__item:hover .stack__k { color: #bbb; }
.stack__item b { display: block; font-size: 20px; letter-spacing: -0.5px; margin: 6px 0 8px; font-family: var(--sans); }
.stack__item p { font-size: 14px; color: #333; }
.stack__item:hover p { color: #ddd; }

/* ---------- Case studies ---------- */
.cases { border-bottom: 2px solid var(--ink); }
.case {
  border: 2px solid var(--ink); padding: 34px; margin-bottom: 26px;
  background: var(--bg); box-shadow: 6px 6px 0 var(--ink);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.case:last-of-type { margin-bottom: 0; }
.case:hover { transform: translate(-3px,-3px); box-shadow: 12px 12px 0 var(--ink); }
.case__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; border-bottom: 2px dashed var(--hair); padding-bottom: 18px; margin-bottom: 18px; }
.case__meta { display: flex; flex-direction: column; gap: 6px; }
.case__idx { font-family: var(--mono); font-weight: 800; font-size: 13px; letter-spacing: 1px; }
.case__role { font-family: var(--mono); font-size: 12px; color: var(--mut); }
.case__stat { text-align: right; }
.case__stat b { font-family: var(--mono); font-weight: 800; font-size: clamp(28px, 4vw, 44px); letter-spacing: -2px; display: block; line-height: 1; }
.case__stat span { font-family: var(--mono); font-size: 12px; color: var(--mut); }
.case__title { font-size: clamp(20px, 3vw, 30px); letter-spacing: -1px; margin-bottom: 12px; }
.case__desc { font-size: 15.5px; color: #2a2a2a; max-width: 760px; margin-bottom: 22px; }
.case__desc b { font-weight: 700; background: var(--ink); color: var(--bg); padding: 0 4px; }
.case__kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 2px solid var(--ink); margin-bottom: 20px; }
.ck { padding: 16px 14px; border-right: 2px solid var(--ink); }
.ck:last-child { border-right: none; }
.ck b { font-family: var(--mono); font-weight: 800; font-size: clamp(18px, 2.4vw, 26px); letter-spacing: -1px; display: block; }
.ck span { font-family: var(--mono); font-size: 11.5px; color: var(--mut); display: block; margin-top: 4px; }
.case__spark { height: 46px; margin-bottom: 20px; }
.case__spark svg { width: 100%; height: 100%; display: block; }
.case__spark path.line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.case__spark.in path.line { animation: draw 1.4s ease forwards; }
.case__spark path.area { fill: var(--ink); opacity: 0; }
.case__spark.in path.area { animation: fadein .8s ease .6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: .06; } }
.case__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.case__tags span { font-family: var(--mono); font-size: 11.5px; border: 1.5px solid var(--ink); padding: 4px 9px; transition: background .18s, color .18s; }
.case__tags span:hover { background: var(--ink); color: var(--bg); }
.cases__note { font-family: var(--mono); font-size: 12.5px; color: var(--mut); margin-top: 22px; text-align: center; }

/* ---------- Extra live animations ---------- */
/* animated drifting hero grid */
.hero__grid { animation: drift 24s linear infinite; }
@keyframes drift { to { background-position: 44px 44px; } }

/* glitch on hero title */
.hero__title .hl { transition: transform .2s; }
.hero__title:hover .hl { animation: glitch .35s steps(2) 2; }
@keyframes glitch {
  0% { text-shadow: 2px 0 rgba(0,0,0,.4), -2px 0 rgba(0,0,0,.2); transform: translate(0); }
  25% { transform: translate(-1px, 1px); }
  50% { text-shadow: -2px 0 rgba(0,0,0,.4), 2px 0 rgba(0,0,0,.2); transform: translate(1px, -1px); }
  100% { text-shadow: none; transform: translate(0); }
}

/* soft entrance for stat numbers when counting */
.stat.in .stat__num { animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.9); opacity: .4; } 100% { transform: scale(1); opacity: 1; } }

/* button magnetic press */
.btn:active { transform: translate(1px,1px) !important; box-shadow: none !important; }

/* live pulse ring on status dot */
.hero__tag .blink { position: relative; }

/* reveal stagger via transition-delay set in JS is optional; base fade already exists */

/* ---------- Responsive: cases + stack ---------- */
@media (max-width: 900px) {
  .stack__grid { grid-template-columns: 1fr 1fr; }
  .stack__item:nth-child(3n) { border-right: 2px solid var(--ink); }
  .stack__item:nth-child(2n) { border-right: none; }
  .stack__item:nth-last-child(-n+3) { border-bottom: 2px solid var(--ink); }
  .stack__item:nth-last-child(-n+2) { border-bottom: none; }
  .case__kpis { grid-template-columns: 1fr 1fr; }
  .ck:nth-child(2n) { border-right: none; }
  .ck:nth-child(-n+2) { border-bottom: 2px solid var(--ink); }
}
@media (max-width: 560px) {
  .case { padding: 22px; box-shadow: 4px 4px 0 var(--ink); }
  .case__head { flex-direction: column; }
  .case__stat { text-align: left; }
  .stack__grid { grid-template-columns: 1fr; }
  .stack__item { border-right: none !important; border-bottom: 2px solid var(--ink) !important; }
  .stack__item:last-child { border-bottom: none !important; }
  .case__kpis { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   3D DEPTH / EXPERIENCE LAYER
   ============================================================ */
@media (hover: hover) and (pointer: fine) {
  /* shared vanishing point so tiles in a grid tilt toward one horizon */
  .cards, .steps, .stack__grid, .feature__grid,
  .quotes__grid, .case__kpis { perspective: 1600px; }
  .hero { perspective: 1200px; }

  .tilt {
    position: relative;
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform .5s cubic-bezier(.2, .8, .2, 1), box-shadow .35s ease;
  }
  .tilt.is-tilting { transition: box-shadow .35s ease; }

  /* lift the tile off the grid while interacting */
  .card.is-tilting, .step.is-tilting,
  .stack__item.is-tilting, .feature__item.is-tilting {
    z-index: 3;
    box-shadow: 0 34px 46px -22px rgba(0, 0, 0, .55);
  }
  .case.is-tilting { box-shadow: 16px 16px 0 var(--ink), 0 40px 50px -26px rgba(0, 0, 0, .4); }
  .panel.is-tilting { box-shadow: 12px 12px 0 var(--ink), 0 34px 44px -24px rgba(0, 0, 0, .35); }
  .terminal.is-tilting { box-shadow: 12px 12px 0 rgba(0,0,0,1), 0 40px 50px -26px rgba(0, 0, 0, .5); }

  /* cursor-tracked CRT glare (only on tiles that go black on hover) */
  .tilt__glare {
    position: absolute; inset: 0; z-index: 0;
    pointer-events: none; opacity: 0;
    transition: opacity .35s ease;
    background: radial-gradient(240px circle at var(--gx, 50%) var(--gy, 50%),
                rgba(255, 255, 255, .32), rgba(255, 255, 255, 0) 62%);
  }
  .tilt:hover .tilt__glare { opacity: 1; }

  /* inner parallax: content lifts to different depths for real thickness */
  .card > *:not(.tilt__glare),
  .step > *:not(.tilt__glare),
  .stack__item > *:not(.tilt__glare),
  .feature__item > *:not(.tilt__glare) {
    transition: transform .5s cubic-bezier(.2, .8, .2, 1);
  }
  .card:hover .card__id,
  .feature__item:hover .card__id { transform: translateZ(28px); }
  .card:hover h3,
  .feature__item:hover h3 { transform: translateZ(58px); }
  .card:hover p,
  .feature__item:hover p { transform: translateZ(38px); }

  .step:hover .step__no { transform: translateZ(64px); }
  .step:hover h3 { transform: translateZ(46px); }
  .step:hover p { transform: translateZ(30px); }
  .step:hover .step__tags { transform: translateZ(20px); }

  .stack__item:hover .stack__k { transform: translateZ(24px); }
  .stack__item:hover b { transform: translateZ(54px); }
  .stack__item:hover p { transform: translateZ(32px); }

  /* hero layers move smoothly on parallax */
  .hero__grid, .hero__tag, .hero__title, .hero__cta {
    transition: transform .35s cubic-bezier(.2, .8, .2, 1);
    will-change: transform;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tilt__glare { display: none; }
  .tilt { transform: none !important; }
  .card:hover *, .step:hover *,
  .stack__item:hover *, .feature__item:hover * { transform: none !important; }
}

/* ============================================================
   BOOT PRELOADER
   ============================================================ */
.boot {
  position: fixed; inset: 0; z-index: 100000;
  background: #000; color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .7s ease, visibility .7s ease;
}
.boot--done { opacity: 0; visibility: hidden; }
body.booting { overflow: hidden; }
.boot__inner { width: min(520px, 84vw); font-family: var(--mono); }
.boot__brand { font-weight: 800; font-size: 22px; letter-spacing: -0.5px; margin-bottom: 20px; }
.boot__brand .boot__eng { color: #666; font-weight: 500; }
.boot__log { font-size: 13px; line-height: 1.9; color: #bdbdbd; white-space: pre-wrap; min-height: 150px; }
.boot__bar { height: 8px; border: 2px solid #fff; margin-top: 16px; }
.boot__bar i { display: block; height: 100%; width: 0; background: #fff; transition: width .16s linear; }
.boot__pct { font-size: 12px; margin-top: 8px; text-align: right; color: #fff; letter-spacing: 1px; }

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 99998;
  pointer-events: none; border-radius: 50%;
  mix-blend-mode: difference; will-change: transform;
}
.cursor-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; background: #fff; }
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid #fff;
  transition: width .22s ease, height .22s ease, margin .22s ease, background .22s ease;
}
body.cursor-hover .cursor-ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(255,255,255,.12); }
body.cursor-label-on .cursor-ring { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: rgba(255,255,255,.06); }
body.cursor-down .cursor-ring { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
.cursor-label {
  position: fixed; top: 0; left: 0; z-index: 99999; pointer-events: none;
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  color: #fff; mix-blend-mode: difference; opacity: 0;
  transition: opacity .22s ease; white-space: nowrap; will-change: transform;
}
body.cursor-label-on .cursor-label { opacity: 1; }
.cursor-label { display: none; }
body.has-cursor .cursor-label { display: block; }
body.has-cursor,
body.has-cursor a, body.has-cursor button, body.has-cursor .btn,
body.has-cursor input, body.has-cursor select, body.has-cursor .card,
body.has-cursor .step, body.has-cursor .stack__item { cursor: none; }
.cursor-dot, .cursor-ring { display: none; }
body.has-cursor .cursor-dot, body.has-cursor .cursor-ring { display: block; }

/* ============================================================
   SECTION HUD
   ============================================================ */
.hud {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 95;
  display: flex; flex-direction: column; gap: 2px;
  font-family: var(--mono); font-size: 11px; mix-blend-mode: difference;
}
.hud a {
  display: flex; align-items: center; gap: 8px; padding: 5px 8px; color: #fff;
  opacity: .5; letter-spacing: 1px; text-transform: uppercase;
  border-right: 2px solid transparent; transition: opacity .25s ease, border-color .25s ease;
}
.hud a span { font-weight: 700; min-width: 18px; }
.hud a.on { opacity: 1; border-right-color: #fff; }
.hud a:hover { opacity: 1; }

/* ============================================================
   IMMERSIVE 3D JOURNEY
   ============================================================ */
.immersive {
  position: relative; height: 460vh;
  background: #000; color: #fff;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.immersive__sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: flex; align-items: center;
}
.immersive__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.immersive__scan {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .6;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.035) 0 1px, transparent 1px 3px);
}
.immersive__vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 75% 75% at 50% 50%, transparent 42%, #000 100%);
}
.immersive__ui { position: relative; z-index: 2; width: 100%; }
.immersive__tag {
  font-family: var(--mono); font-size: 12px; letter-spacing: 1px;
  border: 1.5px solid #fff; padding: 7px 14px; display: inline-flex; gap: 8px; align-items: center;
}
.immersive__stages { display: grid; margin-top: 26px; }
.immersive__stage {
  grid-area: 1 / 1; max-width: 640px;
  opacity: 0; transform: translateY(26px); pointer-events: none;
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.immersive__stage.on { opacity: 1; transform: none; }
.immersive__step { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: #7d7d7d; margin-bottom: 14px; }
.immersive__h { font-size: clamp(44px, 8.5vw, 104px); letter-spacing: -3px; line-height: .94; font-weight: 700; }
.immersive__stage p { font-family: var(--mono); font-size: clamp(14px, 1.6vw, 17px); color: #b9b9b9; margin-top: 20px; max-width: 520px; line-height: 1.7; }
.immersive .hl::after { background: #fff; opacity: .2; }
.immersive__rail {
  position: absolute; right: 30px; top: 50%; transform: translateY(-50%); z-index: 3;
  display: flex; flex-direction: column; gap: 12px;
}
.immersive__rail i { width: 10px; height: 10px; border: 1.5px solid #fff; opacity: .35; transition: all .4s cubic-bezier(.2,.8,.2,1); }
.immersive__rail i.on { opacity: 1; background: #fff; height: 30px; }
.immersive__hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: #888;
  animation: hintpulse 1.8s ease-in-out infinite;
}
@keyframes hintpulse { 0%,100% { opacity: .35; transform: translate(-50%, 0); } 50% { opacity: 1; transform: translate(-50%, 5px); } }

/* ============================================================
   CALENDAR BOOKING WIDGET
   ============================================================ */
.booking { max-width: 620px; margin: 0 auto; text-align: left; }
.booking__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 22px; }
.booking__cal { border: 2px solid #fff; padding: 16px; }
.booking__calbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.booking__month { font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; }
.booking__nav { background: none; border: 2px solid #fff; color: #fff; font-family: var(--mono); width: 34px; height: 30px; cursor: pointer; transition: background .18s, color .18s, opacity .18s; }
.booking__nav:hover:not(:disabled) { background: #fff; color: #000; }
.booking__nav:disabled { opacity: .3; cursor: not-allowed; }
.booking__dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.booking__dow span { font-family: var(--mono); font-size: 11px; color: #888; text-align: center; }
.booking__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.booking__day {
  aspect-ratio: 1 / 1; font-family: var(--mono); font-size: 13px;
  border: 1.5px solid rgba(255,255,255,.25); background: none; color: #fff; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  display: flex; align-items: center; justify-content: center;
}
.booking__day:hover:not(:disabled):not(.empty) { border-color: #fff; background: rgba(255,255,255,.1); }
.booking__day:disabled { color: #555; border-color: transparent; cursor: default; }
.booking__day.empty { border: none; cursor: default; }
.booking__day.sel { background: #fff; color: #000; border-color: #fff; font-weight: 700; }
.booking__slots { margin-top: 20px; }
.booking__slotlabel { font-family: var(--mono); font-size: 12px; color: #bdbdbd; margin-bottom: 12px; }
.booking__slotgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.booking__slot { font-family: var(--mono); font-size: 13px; padding: 10px 8px; border: 1.5px solid #fff; background: none; color: #fff; cursor: pointer; transition: background .15s, color .15s; }
.booking__slot:hover { background: rgba(255,255,255,.12); }
.booking__slot.sel { background: #fff; color: #000; font-weight: 700; }
.booking .cta__submit { margin-top: 22px; width: 100%; justify-content: center; }
@media (max-width: 560px) { .booking__fields { grid-template-columns: 1fr; } }

/* ============================================================
   CASE CINEMA — pinned horizontal scroll (desktop) / stack (mobile)
   ============================================================ */
.cinema__head { margin-bottom: 40px; }
.cinema__bar { height: 3px; background: var(--hair); margin-top: 22px; display: none; position: relative; }
.cinema__bar i { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--ink); transition: width .1s linear; }
.cinema__hint { display: none; font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: var(--mut); margin-top: 10px; }
.cinema__track { display: flex; flex-direction: column; gap: 26px; }
.cinema__track .case { margin-bottom: 0; }

@media (min-width: 900px) and (pointer: fine) {
  .cinema--on { position: relative; }
  .cinema--on .cinema__sticky {
    position: sticky; top: 0; height: 100vh; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
  }
  .cinema--on .cinema__head {
    position: absolute; top: 0; left: 0; right: 0; margin: 0; padding-top: 38px; z-index: 5;
  }
  .cinema--on .cinema__head .section__lead { display: none; }
  .cinema--on .cinema__bar, .cinema--on .cinema__hint { display: block; }
  .cinema--on .cinema__track {
    flex-direction: row; align-items: center; gap: 40px; padding: 40px 6vw 0;
    will-change: transform;
  }
  .cinema--on .cinema__track .case { flex: 0 0 auto; width: min(64vw, 780px); }
}

/* ============================================================
   PERSISTENT CONVERSION — FAB + DRAWER
   ============================================================ */
.fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 9500;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .5px;
  padding: 14px 20px; background: var(--ink); color: #fff; border: 2px solid var(--ink);
  cursor: pointer; box-shadow: 5px 5px 0 rgba(0,0,0,.25);
  transform: translateY(120px); opacity: 0; pointer-events: none;
  transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .5s ease, background .2s, color .2s;
}
.fab.show { transform: translateY(0); opacity: 1; pointer-events: auto; }
.fab:hover { background: #fff; color: var(--ink); }
.fab__txt { position: relative; z-index: 1; white-space: nowrap; }
.fab__pulse {
  position: absolute; left: 16px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px;
  border-radius: 50%; background: #fff;
}
.fab:hover .fab__pulse { background: var(--ink); }
.fab__pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid currentColor; animation: fabpulse 1.6s ease-out infinite;
}
.fab .fab__txt { padding-left: 16px; }
@keyframes fabpulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.drawer { position: fixed; inset: 0; z-index: 9600; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer__scrim {
  position: absolute; inset: 0; background: rgba(0,0,0,.6); opacity: 0;
  transition: opacity .4s ease; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.drawer.open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(440px, 92vw);
  background: var(--ink); color: #fff; border-left: 2px solid #fff;
  padding: 30px 30px 40px; overflow-y: auto;
  transform: translateX(100%); transition: transform .5s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
.drawer.open .drawer__panel { transform: none; }
.drawer__x { align-self: flex-end; background: none; border: none; color: #fff; font-family: var(--mono); font-size: 13px; cursor: pointer; padding: 4px; }
.drawer__idx { font-family: var(--mono); font-size: 12px; color: #7d7d7d; letter-spacing: 1px; margin: 8px 0 22px; }
.drawer__title { font-size: clamp(28px, 6vw, 40px); letter-spacing: -1.5px; line-height: 1; font-weight: 700; }
.drawer .hl::after { background: #fff; opacity: .28; }
.drawer__sub { font-family: var(--mono); font-size: 14px; color: #bdbdbd; line-height: 1.7; margin: 16px 0 26px; }
.drawer__form { display: grid; gap: 16px; }
.drawer__submit { justify-content: center; background: #fff; color: var(--ink); border-color: #fff; }
.drawer__submit:hover { background: var(--ink); color: #fff; box-shadow: 4px 4px 0 #fff; }
.drawer__msg { font-family: var(--mono); font-size: 13px; min-height: 18px; margin: 0; }
.drawer__trust { font-family: var(--mono); font-size: 12px; color: #9a9a9a; margin-top: 22px; letter-spacing: .5px; }
.drawer__alt { font-family: var(--mono); font-size: 13px; margin-top: 14px; color: #fff; border-bottom: 1px solid #fff; align-self: flex-start; padding-bottom: 2px; }
@media (max-width: 560px) {
  .fab { right: 14px; bottom: 14px; padding: 12px 16px; font-size: 12px; }
  .drawer__panel { width: 100%; border-left: none; border-top: 2px solid #fff; top: auto; bottom: 0; height: auto; max-height: 90vh; transform: translateY(100%); }
  .drawer.open .drawer__panel { transform: none; }
}

/* ============================================================
   NARRATIVE CHAPTER INTERSTITIALS
   ============================================================ */
.chapter {
  position: relative; background: #000; color: #fff; overflow: hidden;
  min-height: 92vh; display: flex; align-items: center;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.chapter__bg {
  position: absolute; inset: -2px; z-index: 0; opacity: .55;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 28%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 28%, transparent 78%);
  animation: drift 30s linear infinite;
}
.chapter__inner { position: relative; z-index: 1; }
.chapter__idx {
  font-family: var(--mono); font-size: 13px; letter-spacing: 2px; color: #8a8a8a;
  display: inline-block; margin-bottom: 22px; border-bottom: 2px solid #fff; padding-bottom: 4px;
  will-change: transform;
}
.chapter__line {
  font-size: clamp(40px, 8.5vw, 104px); letter-spacing: -3px; line-height: .96; font-weight: 700;
  max-width: 15ch; will-change: transform;
}
.chapter .hl::after { background: #fff; opacity: .2; }
.chapter__sub {
  font-family: var(--mono); font-size: clamp(14px, 1.6vw, 17px); color: #b9b9b9;
  margin-top: 26px; max-width: 540px; line-height: 1.7; will-change: transform;
}

/* cinematic word-rise reveal (Trionn-style) */
.rw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.rw__i { display: inline-block; transform: translateY(115%); transition: transform .75s cubic-bezier(.19, 1, .22, 1); will-change: transform; }
.reveal-words.in .rw__i { transform: none; }

/* method journey spine — fills as you scroll the steps */
.steps { position: relative; }
.steps::after {
  content: ""; position: absolute; top: -2px; left: 0; height: 4px;
  width: var(--jp, 0%); background: var(--ink); z-index: 6;
  box-shadow: 0 0 12px rgba(0, 0, 0, .5);
  transition: width .12s linear;
}

@media (max-width: 1100px) { .hud { display: none; } }
@media (max-width: 720px) {
  .immersive { height: 400vh; }
  .immersive__rail { right: 16px; }
  .immersive__hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .immersive { height: auto; }
  .immersive__sticky { position: relative; height: auto; min-height: 100vh; padding: 80px 0; }
  .immersive__stages { display: block; }
  .immersive__stage { grid-area: auto; margin-bottom: 60px; opacity: 1; transform: none; }
  .immersive__hint, .cursor-dot, .cursor-ring { display: none !important; }
}

/* ============================================================
   METHOD PAGE — cinematic dark, scroll-driven pipeline
   ============================================================ */
body.theme-dark { background: #000; color: #fff; }
body.theme-dark .footer { background: #000; color: #fff; border-top: 2px solid #fff; }
body.theme-dark .footer__brand p, body.theme-dark .footer__meta { color: #8a8a8a; }
.theme-dark .section__title { color: #fff; }
.theme-dark .section__idx { color: #fff; border-color: #fff; }
.theme-dark .section__lead { color: #bdbdbd; }
.theme-dark .hl::after { background: #fff; opacity: .22; }
.theme-dark .btn--ghost { color: #fff; border-color: #fff; }
.theme-dark .btn--ghost:hover { background: #fff; color: #000; }
.theme-dark .progress { background: #fff; }

/* nav readable on black before it gets the scrolled white bar */
.theme-dark .nav:not(.scrolled) .logo,
.theme-dark .nav:not(.scrolled) .nav__links a,
.theme-dark .nav:not(.scrolled) .nav__burger { color: #fff; }
.theme-dark .nav:not(.scrolled) .nav__links a::after { background: #fff; }
/* Open mobile menu on dark pages: dark panel so the white links are visible (not white-on-white). */
.theme-dark .nav.open .nav__links { background: #000; border-bottom-color: #fff; }
.theme-dark .nav.open .nav__links a { color: #fff; }
.theme-dark .nav.open .nav__links a::after { background: #fff; }
.theme-dark .nav:not(.scrolled) .nav__cta.btn--solid { background: #fff; color: #000; border-color: #fff; }

/* ---------- Kinetic hero ---------- */
.mhero { position: relative; min-height: 94vh; display: flex; align-items: center; overflow: hidden; border-bottom: 2px solid #fff; }
.mhero__grid { position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 54px 54px; mask-image: radial-gradient(ellipse 70% 60% at 50% 34%, #000 28%, transparent 100%); animation: drift 26s linear infinite; }
.mhero__glow { position: absolute; left: 50%; top: -12%; width: min(900px,90vw); height: 620px; transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255,255,255,.18), transparent 60%); filter: blur(24px); pointer-events: none; z-index: 0; }
.mhero__inner { position: relative; z-index: 1; text-align: center; width: 100%; }
.mhero__kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; color: #9a9a9a; margin-bottom: 22px; }
.mhero__kicker .blink { color: #fff; }
.mhero__title { font-size: clamp(42px, 9vw, 118px); line-height: .93; letter-spacing: -3px; font-weight: 700; }
.mhero__title .em { background: linear-gradient(100deg, #fff 18%, #5f5f5f 40%, #fff 62%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 3.4s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
.mhero__sub { max-width: 660px; margin: 28px auto 0; color: #c3c3c3; font-size: clamp(15px, 2vw, 19px); }
.mhero__cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.mhero__scroll { margin-top: 46px; font-family: var(--mono); font-size: 12px; color: #7a7a7a; letter-spacing: 1px; }
.mhero__scroll span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- Pipeline overview (reference-style glowing spine) ---------- */
.pipe { position: relative; padding: 96px 0; border-bottom: 2px solid #fff; overflow: hidden; }
.pipe__glow { position: absolute; left: 50%; top: 0; width: 520px; height: 100%; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.10), transparent 60%); pointer-events: none; }
.pipe__stack { max-width: 430px; margin: 0 auto; position: relative; z-index: 1; }
.pipe__line { position: absolute; left: 50%; top: 12px; bottom: 12px; width: 2px; transform: translateX(-50%); background: rgba(255,255,255,.16); }
.pipe__line i { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: #fff; box-shadow: 0 0 14px 3px rgba(255,255,255,.75); }
.pipe.in .pipe__line i { animation: fillDown 2.4s cubic-bezier(.4,0,.1,1) forwards; }
@keyframes fillDown { to { height: 100%; } }
.pipe__node { position: relative; z-index: 1; margin: 20px 0; background: #0b0b0b; border: 2px solid rgba(255,255,255,.24);
  border-radius: 44px; padding: 15px 22px; text-align: center; font-family: var(--mono); font-size: 14px; letter-spacing: .3px;
  opacity: 0; transform: translateY(16px) scale(.98); }
.pipe__node b { color: #fff; }
.pipe__node span { color: #7f7f7f; margin-right: 8px; }
.pipe.in .pipe__node { animation: nodeIn .55s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(var(--i) * .26s + .2s); }
@keyframes nodeIn { to { opacity: 1; transform: none; } }
.pipe.in .pipe__node.lit { border-color: #fff; box-shadow: 0 0 22px rgba(255,255,255,.14); }

/* ---------- Deep stages (scroll timeline w/ traveling beam) ---------- */
.stages { position: relative; padding: 100px 0 60px; }
.stages__wrap { position: relative; max-width: 900px; margin: 0 auto; padding-left: 56px; }
.stages__spine { position: absolute; left: 11px; top: 6px; bottom: 60px; width: 2px; background: rgba(255,255,255,.14); }
.stages__beam { position: absolute; left: 11px; top: 6px; width: 2px; height: 0; background: #fff; box-shadow: 0 0 16px 3px rgba(255,255,255,.55); transition: height .12s linear; }
.stage { position: relative; padding: 0 0 68px; opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.stage.in { opacity: 1; transform: none; }
.stage__dot { position: absolute; left: -51px; top: 0; width: 24px; height: 24px; border: 2px solid rgba(255,255,255,.35); border-radius: 50%;
  background: #000; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 10px; color: #888; transition: all .35s ease; }
.stage.on .stage__dot { border-color: #fff; color: #000; background: #fff; box-shadow: 0 0 18px 4px rgba(255,255,255,.5); transform: scale(1.08); }
.stage__k { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; color: #8a8a8a; }
.stage.on .stage__k { color: #fff; }
.stage__h { font-size: clamp(23px, 3.4vw, 38px); letter-spacing: -1px; margin: 6px 0 12px; line-height: 1.02; }
.stage__body { color: #bdbdbd; font-size: 16px; max-width: 640px; }
.stage__grid { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 26px; margin: 20px 0 0; }
.stage__grid li { font-family: var(--mono); font-size: 13px; color: #d6d6d6; padding-left: 20px; position: relative; }
.stage__grid li::before { content: ">"; position: absolute; left: 0; color: #fff; }
.stage__tele { margin-top: 20px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.03); padding: 13px 16px;
  font-family: var(--mono); font-size: 12.5px; color: #9a9a9a; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.stage__tele b { color: #fff; }
.stage__tele .ok { color: #fff; }

/* ---------- Kinetic split statement ---------- */
.kstate { padding: 120px 0; border-top: 2px solid #fff; border-bottom: 2px solid #fff; overflow: hidden; background: #050505; }
.kstate__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.kstate__l { font-size: clamp(32px, 7.5vw, 92px); letter-spacing: -2px; font-weight: 700; line-height: 1; opacity: 0; transition: transform 1s cubic-bezier(.2,.8,.2,1), opacity 1s; }
.kstate__l1 { transform: translateX(-46px); }
.kstate__l2 { transform: translateX(46px); text-align: right; color: #6f6f6f; }
.kstate.in .kstate__l { opacity: 1; transform: none; }
.kstate__l2 .em2 { color: #fff; }

/* ---------- Frameworks (dark) ---------- */
.mstack { padding: 100px 0; border-bottom: 2px solid #fff; }
.mstack__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 2px solid #fff; }
.mstack__item { padding: 26px 24px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transition: background .2s, color .2s; }
.mstack__item:nth-child(3n) { border-right: none; }
.mstack__item:nth-last-child(-n+3) { border-bottom: none; }
.mstack__item:hover { background: #fff; color: #000; }
.mstack__k { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #8a8a8a; }
.mstack__item:hover .mstack__k { color: #444; }
.mstack__item b { display: block; font-size: 19px; letter-spacing: -.5px; margin: 6px 0 8px; }
.mstack__item p { font-size: 14px; color: #bdbdbd; }
.mstack__item:hover p { color: #333; }

/* ---------- Formulas / telemetry glossary ---------- */
.formulas { padding: 100px 0; }
.formulas__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.formula { border: 1px solid rgba(255,255,255,.18); padding: 22px; background: rgba(255,255,255,.02); transition: border-color .2s, background .2s; }
.formula:hover { border-color: #fff; background: rgba(255,255,255,.05); }
.formula__name { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: #8a8a8a; text-transform: uppercase; }
.formula__eq { font-family: var(--mono); font-size: clamp(15px, 2vw, 19px); color: #fff; margin: 10px 0; }
.formula__eq em { color: #7f7f7f; font-style: normal; }
.formula__why { font-size: 14px; color: #b6b6b6; }

/* ---------- Method page responsive ---------- */
@media (max-width: 760px) {
  .stages__wrap { padding-left: 44px; }
  .stage__dot { left: -44px; width: 20px; height: 20px; }
  .stages__spine, .stages__beam { left: 9px; }
  .stage__grid { grid-template-columns: 1fr; }
  .mstack__grid { grid-template-columns: 1fr; }
  .mstack__item { border-right: none !important; border-bottom: 2px solid #fff !important; }
  .mstack__item:last-child { border-bottom: none !important; }
  .formulas__grid { grid-template-columns: 1fr; }
  .kstate__l2 { text-align: left; }
}

/* ---------- Homepage METHOD teaser (dark band → links to method.html) ---------- */
.method-teaser { position: relative; background: #000; color: #fff; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); overflow: hidden; padding: 96px 0; }
.method-teaser__grid { position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 80% at 30% 50%, #000 30%, transparent 100%); animation: drift 26s linear infinite; }
.method-teaser__inner { position: relative; z-index: 1; }
.method-teaser .section__idx { color: #fff; border-color: #fff; }
.method-teaser .section__title { color: #fff; }
.method-teaser .section__lead { color: #c3c3c3; }
.method-teaser__flow { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 34px; padding: 0; }
.method-teaser__flow li { font-family: var(--mono); font-size: 13px; letter-spacing: .3px; border: 1.5px solid rgba(255,255,255,.35); padding: 9px 15px; display: flex; align-items: center; gap: 8px; transition: background .2s, color .2s, border-color .2s; }
.method-teaser__flow li span { color: #7f7f7f; font-weight: 700; }
.method-teaser__flow li:hover { background: #fff; color: #000; border-color: #fff; }
.method-teaser__flow li:hover span { color: #555; }
.method-teaser__cta { background: #fff; color: #000; border-color: #fff; }
.method-teaser__cta:hover { background: #000; color: #fff; box-shadow: 4px 4px 0 #fff; }
@media (max-width: 560px) { .method-teaser { padding: 64px 0; } .method-teaser__flow li { font-size: 12px; padding: 8px 12px; } }

/* Keep the nav dark on scroll for dark-themed pages (method) */
.theme-dark .nav.scrolled { background: rgba(0,0,0,.82); backdrop-filter: blur(8px); border-color: #fff; }
.theme-dark .nav.scrolled .logo,
.theme-dark .nav.scrolled .nav__links a,
.theme-dark .nav.scrolled .nav__burger { color: #fff; }
.theme-dark .nav.scrolled .nav__links a::after { background: #fff; }
.theme-dark .nav.scrolled .nav__cta.btn--solid { background: #fff; color: #000; border-color: #fff; }
.theme-dark .nav.scrolled .nav__cta.btn--solid:hover { background: transparent; color: #fff; box-shadow: 4px 4px 0 #fff; }

/* ============================================================
   HOMEPAGE UNIFIED DARK (Method design language) — body.theme-dark
   Only affects pages that opt in via <body class="theme-dark">
   ============================================================ */

/* Global buttons on dark: solid = white fill, ghost = outline */
.theme-dark .btn--solid { background: #fff; color: #000; border-color: #fff; }
.theme-dark .btn--solid:hover { background: transparent; color: #fff; box-shadow: 4px 4px 0 #fff; }

/* Subtle white section separators for the paneled Method feel */
.theme-dark .hero, .theme-dark .services, .theme-dark .split, .theme-dark .cases, .theme-dark .quotes { border-bottom: 2px solid rgba(255,255,255,.16); }

/* ---- HERO ---- */
.theme-dark .hero__grid {
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); }
.theme-dark .hero__title { color: #fff; }
.theme-dark .hero__sub { color: #c3c3c3; }
.theme-dark .hero__tag { border-color: rgba(255,255,255,.4); color: #cfcfcf; }
.theme-dark .hero__tag .blink { color: #fff; }

/* ---- SERVICES (node cards) ---- */
.theme-dark .cards { border-color: #fff; }
.theme-dark .card { border-color: #fff; transition: background .2s, color .2s, box-shadow .2s; }
.theme-dark .card h3 { color: #fff; }
.theme-dark .card p { color: #b9b9b9; }
.theme-dark .card__id { color: #7f7f7f; }
.theme-dark .card:hover { background: #fff; color: #000; box-shadow: inset 0 0 0 9999px #fff; }
.theme-dark .card:hover h3 { color: #000; }
.theme-dark .card:hover p { color: #333; }
.theme-dark .card:hover .card__id { color: #555; }

/* ---- SPLITS (D2C / B2B) ---- */
.theme-dark .split__copy p { color: #bdbdbd; }
.theme-dark .checklist li { color: #d6d6d6; }
.theme-dark .panel { background: #0d0d0d; border-color: #fff; box-shadow: 8px 8px 0 #fff; color: #fff; }
.theme-dark .panel__row { border-bottom-color: rgba(255,255,255,.14); }
.theme-dark .panel__row span { color: #8a8a8a; }
.theme-dark .panel__row b { color: #fff; }
.theme-dark .panel__bar { border-color: #fff; }
.theme-dark .panel__bar i { background: repeating-linear-gradient(45deg, #fff 0 6px, transparent 6px 10px); }
.theme-dark .panel__note { color: #8a8a8a; }

/* ---- CASES ---- */
.theme-dark .case { background: #0a0a0a; border-color: #fff; box-shadow: 6px 6px 0 #fff; }
.theme-dark .case:hover { box-shadow: 12px 12px 0 #fff; }
.theme-dark .case__head { border-bottom-color: rgba(255,255,255,.18); }
.theme-dark .case__role, .theme-dark .case__stat span, .theme-dark .ck span { color: #8a8a8a; }
.theme-dark .case__idx, .theme-dark .case__stat b, .theme-dark .case__title, .theme-dark .ck b { color: #fff; }
.theme-dark .case__desc { color: #c3c3c3; }
.theme-dark .case__desc b { background: #fff; color: #000; }
.theme-dark .case__kpis, .theme-dark .ck { border-color: #fff; }
.theme-dark .case__spark path.line { stroke: #fff; }
.theme-dark .case__spark path.area { fill: #fff; }
.theme-dark .case__tags span { border-color: #fff; color: #d6d6d6; }
.theme-dark .case__tags span:hover { background: #fff; color: #000; }
.theme-dark .cases__note { color: #8a8a8a; }
.theme-dark .cinema__bar { border-color: #fff; }
.theme-dark .cinema__bar i { background: #fff; }
.theme-dark .cinema__hint { color: #9a9a9a; }

/* ---- QUOTES ---- */
.theme-dark .quotes__grid { border-color: #fff; }
.theme-dark .quote { border-color: #fff; }
.theme-dark .quote p { color: #ededed; }
.theme-dark .quote cite { color: #8a8a8a; }

/* ---- Method teaser sits on black already; make its border seamless ---- */
.theme-dark .method-teaser { border-color: rgba(255,255,255,.16); }

/* ---- Kinetic statement word-reveal (scroll-scrubbed) ---- */
.kstate__l { opacity: 1 !important; transform: none !important; } /* words handle the animation now */
.kstate__l .kw { color: rgba(255,255,255,.15); transition: color .3s ease, text-shadow .3s ease; }
.kstate__l .kw.lit { color: #fff; }
.kstate__l .kw--em { color: rgba(255,255,255,.28); }
.kstate__l .kw--em.lit { color: #fff; text-shadow: 0 0 26px rgba(255,255,255,.35); }
.kstate__l2 .kw.lit { color: #cfcfcf; }
.kstate__l2 .kw--em.lit { color: #fff; }

/* ---- Mobile polish for new sections ---- */
@media (max-width: 760px) {
  .stats__flow { display: none; } /* horizontal connector is meaningless when nodes stack */
  .kstate { padding: 84px 0; }
  .kstate__l { font-size: clamp(30px, 9vw, 52px); }
}
@media (max-width: 400px) {
  .stat__num { font-size: clamp(26px, 10vw, 40px); }
}
