/* PeppolBridge — Swiss Precision light system + WebGL journey overlay */

:root {
  --bg: #f6f5f1;
  --nbg: #0b1c30;          /* journey world */
  --nink: #eaf3fb;         /* text on navy */
  --nmut: #9db7cc;
  --ice: #9fc6e8;
  --cyan: #39d6ff;
  --surface: #ffffff;
  --ink: #11263c;
  --navy: #16324f;
  --muted: #5b6b7c;
  --hair: #ddd9cf;
  --accent: #2457ff;
  --green: #12a150;
  --red: #e5484d;
  --amber: #d97706;
  --font-d: 'Space Grotesk', sans-serif;
  --font-b: 'Inter', sans-serif;
  --font-m: 'JetBrains Mono', monospace;
  --max: 1280px;
  --pad: clamp(20px, 4vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-b);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- type ---------- */
.k {
  font-family: var(--font-m);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.k b { color: var(--accent); font-weight: 500; }
h1, h2, h3 { font-family: var(--font-d); font-weight: 600; line-height: 1.02; letter-spacing: -0.02em; }
.display { font-size: clamp(38px, 5vw, 76px); }
.h2 { font-size: clamp(28px, 3.6vw, 50px); }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 54ch; }

/* ---------- preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--nbg);
  display: grid; place-items: center;
  transition: opacity 0.7s ease, visibility 0.7s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.pre-inner { text-align: center; }
.pre-label { font-family: var(--font-m); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--nmut); margin-top: 14px; }
.pre-bar { width: 140px; height: 1px; background: #24466b; margin: 12px auto 0; overflow: hidden; }
.pre-bar i { display: block; width: 40%; height: 100%; background: var(--cyan); animation: slide 1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%);} 100% { transform: translateX(350%);} }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s;
}
.nav.scrolled { background: rgba(246, 245, 241, 0.86); backdrop-filter: blur(14px); border-color: var(--hair); }
body.over-navy .nav { border-color: transparent; }
body.over-navy .nav.scrolled { background: rgba(11, 28, 48, 0.78); backdrop-filter: blur(14px); border-color: rgba(159, 198, 232, 0.16); }
body.over-navy .brand { color: var(--nink); }
body.over-navy .nav-links a { color: var(--nmut); }
body.over-navy .nav-links a:hover { color: #fff; }
body.over-navy .nav .btn-ghost { border-color: rgba(234, 243, 251, 0.45); color: var(--nink); }
body.over-navy .nav .btn-ghost:hover { background: var(--nink); color: var(--nbg); }
body.over-navy .nav .btn-fill { background: #2457ff; border-color: #2457ff; }
body.over-navy .burger span { background: var(--nink); }
body.over-navy .brand svg path { stroke: var(--nink); }
body.over-navy .brand svg path:last-child { stroke: var(--cyan); }
.nav-in {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-d); font-size: 19px; text-decoration: none; letter-spacing: -0.01em; }
.brand b { font-weight: 700; }
.nav-links { display: flex; gap: 26px; }
.nav-links a {
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-m); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; border-radius: 2px; padding: 13px 22px;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-fill { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-fill:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
.btn-sm { padding: 9px 16px; font-size: 11px; }

.burger { display: none; background: none; border: 0; cursor: pointer; width: 44px; height: 44px; }
.burger span { display: block; width: 22px; height: 1.6px; background: var(--ink); margin: 5px auto; transition: 0.25s; }

.menu {
  position: fixed; inset: 0; z-index: 99; background: var(--bg);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transition: 0.3s;
  touch-action: none; overscroll-behavior: contain;
}
.menu.open { opacity: 1; visibility: visible; }
/* lock the page (and the pinned journey scrub) while the overlay menu is open */
body.menu-open { overflow: hidden; }
/* burger morphs to an X while open (span pitch: 1.6px bar + 5px margin = 6.6px) */
body.menu-open .burger span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
.menu-links { display: grid; gap: 8px; text-align: center; }
.menu-links a {
  font-family: var(--font-d); font-size: clamp(28px, 7vw, 44px); text-decoration: none; padding: 4px 0;
}
.menu-links a small { font-family: var(--font-m); font-size: 11px; color: var(--accent); vertical-align: super; }

/* ---------- WebGL journey ---------- */
#journey { position: relative; }
#stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--nbg); }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.ch {
  position: absolute; inset: 0; z-index: 5;
  pointer-events: none;
  display: grid; align-content: center;
  max-width: var(--max); margin: 0 auto; padding: 80px var(--pad) 0;
}
.ch .inner { max-width: 600px; position: relative; }
.ch .inner::before {
  content: ''; position: absolute; inset: -36px -60px;
  background: radial-gradient(ellipse at 40% 50%, rgba(11, 28, 48, 0.92) 0%, rgba(11, 28, 48, 0.66) 55%, transparent 78%);
  z-index: -1;
}
.ch h1, .ch h2 { color: var(--nink); }
.ch .lead { color: var(--nmut); }
.ch .k { color: var(--nmut); }
.ch .k b { color: var(--cyan); }
.ch .btn { border-color: rgba(234, 243, 251, 0.5); color: var(--nink); }
.ch .btn-ghost:hover { background: var(--nink); color: var(--nbg); }
.ch .btn-fill { background: #2457ff; border-color: #2457ff; color: #fff; }
.ch .btn-fill:hover { background: var(--cyan); border-color: var(--cyan); color: var(--nbg); }
.hero-stats div b { color: var(--nink); }
.hero-stats div span { color: var(--nmut); }
.scroll-cue { color: var(--nmut); }
.scroll-cue::after { background: linear-gradient(var(--nmut), transparent); }
.ch .inner.right { margin-left: auto; text-align: left; }
.ch .num {
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.22em; color: var(--accent);
  display: block; margin-bottom: 16px;
}
.ch h1, .ch h2 { margin: 10px 0 18px; }
.ch .lead { margin-bottom: 26px; }
.ch a, .ch .btn { pointer-events: auto; }

.ch-list { list-style: none; display: grid; gap: 10px; margin-top: 20px; }
.ch-list li {
  font-family: var(--font-m); font-size: 12.5px; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 10px; color: var(--navy);
}
.ch-list li::before { content: ''; width: 8px; height: 8px; background: var(--accent); }
.ch-list li.ok::before { background: var(--green); }
/* navy-world overrides (must follow the originals) */
.ch .num { color: var(--cyan); }
.ch-list li { color: #cfe2f2; }
.ch-list li::before { background: var(--cyan); }
.ch-list li.ok::before { background: #2ee6a0; }

.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats div b { font-family: var(--font-d); font-size: 26px; font-weight: 600; display: block; }
.hero-stats div span { font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }

.scroll-cue {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-m); font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 6;
}
.scroll-cue::after { content: ''; width: 1px; height: 34px; background: linear-gradient(var(--muted), transparent); animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(0.4); transform-origin: top; } 50% { transform: scaleY(1); } }

/* no-WebGL fallback: chapters stack as normal sections */
.no-webgl #stage { height: auto; overflow: visible; background: var(--nbg); }
.no-webgl #gl, .no-webgl .scroll-cue { display: none; }
.no-webgl .ch { position: relative; inset: auto; opacity: 1 !important; visibility: visible !important; padding-top: 120px; padding-bottom: 60px; }

/* ---------- sections after the journey ---------- */
.sec { padding: clamp(80px, 10vw, 150px) 0; position: relative; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.sec-head { display: grid; gap: 16px; margin-bottom: clamp(36px, 5vw, 64px); }
.rule { border: 0; border-top: 1px solid var(--hair); }

.metrics { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); background: var(--surface); }
.metrics .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: clamp(28px, 3.4vw, 46px) 20px; border-left: 1px solid var(--hair); }
.metric:first-child { border-left: 0; }
.metric b { font-family: var(--font-d); font-size: clamp(30px, 3.6vw, 52px); font-weight: 600; display: block; line-height: 1; }
.metric b em { font-style: normal; color: var(--accent); }
.metric > span { font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); display: block; margin-top: 10px; }

/* product shots */
.shots { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; }
.shot {
  background: var(--surface); border: 1px solid var(--hair); border-radius: 4px; overflow: hidden;
  display: flex; flex-direction: column;
}
.shot.tall { grid-row: span 2; }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--hair); }
.shot-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--hair); }
.shot-bar span { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.shot figcaption { padding: 14px 16px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--hair); }
.shot .ph {
  aspect-ratio: 16/9.6; padding: 24px;
  background: #fbfaf8;
  font-family: var(--font-m); font-size: 11px; letter-spacing: 0.1em; color: var(--muted);
}
.shot.noimg img { display: none; }
.shot:not(.noimg) .ph { display: none; }

/* --- CSS recreations of the product screens (replaced by real PNGs when present) --- */
.mock { display: flex; flex-direction: column; gap: 8px; font-family: var(--font-b); letter-spacing: 0; overflow: hidden; }
.shot.tall .mock { aspect-ratio: auto; flex: 1; }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m-head b { font-family: var(--font-d); font-size: 15px; color: var(--ink); font-weight: 600; }
.m-sub { font-size: 10.5px; color: var(--muted); }
.m-sub u { color: var(--accent); text-decoration: none; font-weight: 600; }
.m-btn {
  font-family: var(--font-m); font-size: 8.5px; letter-spacing: 0.06em; white-space: nowrap;
  padding: 5px 9px; border-radius: 3px; background: var(--navy); color: #fff;
}
.m-btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--hair); }
.m-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.m-card { background: #fff; border: 1px solid var(--hair); border-radius: 4px; padding: 8px; display: grid; gap: 2px; }
.m-card span { font-size: 8px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.m-card b { font-family: var(--font-d); font-size: 18px; line-height: 1; color: var(--ink); }
.m-card i { font-style: normal; font-size: 8px; color: var(--muted); }
.m-card.alert { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.m-card.alert b { color: var(--red); }
.m-strip {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--hair); border-radius: 4px; padding: 8px;
}
.m-strip em { font-style: normal; font-size: 7.5px; letter-spacing: 0.1em; color: var(--muted); }
.m-mini { border: 1px solid var(--hair); border-radius: 3px; padding: 3px 8px; display: grid; text-align: center; }
.m-mini span { font-size: 7px; letter-spacing: 0.08em; color: var(--muted); }
.m-mini b { font-size: 12px; color: var(--ink); }
.m-mini.ok b { color: var(--green); }
.m-mini.bad b { color: var(--red); }
.m-mini.warn b { color: var(--amber); }
.m-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--hair); border-radius: 4px; padding: 10px;
}
.m-row b { font-size: 12px; color: var(--ink); }
.m-row i { font-style: normal; font-size: 10px; color: var(--muted); }
.m-gap { flex: 1; }
.m-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--hair); flex: none; }
.m-dot.ok { background: var(--green); }
.m-tag {
  font-family: var(--font-m); font-size: 8px; letter-spacing: 0.04em; white-space: nowrap;
  padding: 3px 7px; border-radius: 20px; border: 1px solid var(--hair); color: var(--muted); background: #fff;
}
.m-tag.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 7%, #fff); }
.m-note {
  font-size: 10px; padding: 7px 10px; border-radius: 4px; border: 1px solid var(--hair); background: #fff; color: var(--muted);
}
.m-note.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); background: color-mix(in srgb, var(--green) 6%, #fff); }
.m-note.big { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; padding: 12px 10px; }
.m-trow {
  display: grid; grid-template-columns: 84px 1.2fr 1.3fr 96px; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--hair); border-radius: 4px; padding: 6px 8px;
  font-size: 9.5px; color: var(--ink);
}
.m-trow em { font-style: normal; font-family: var(--font-m); font-size: 7.5px; color: var(--muted); border: 1px solid var(--hair); border-radius: 2px; padding: 0 3px; }
.m-trow span:nth-child(3) { font-family: var(--font-m); font-size: 8px; color: var(--muted); }
.m-trow span:nth-child(4) { font-family: var(--font-m); font-size: 8px; color: var(--navy); }
.m-trow.th { background: transparent; border: 0; padding: 2px 8px; }
.m-trow.th span { font-size: 7.5px; letter-spacing: 0.1em; color: var(--muted); font-family: var(--font-m); }
.m-check {
  display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink);
  background: #fff; border: 1px solid var(--hair); border-radius: 4px; padding: 8px 10px;
}
.m-check .m-tag { margin-left: auto; }

/* countries table */
.tbl { border-top: 1px solid var(--hair); }
.row {
  display: grid; grid-template-columns: 52px 1.4fr 1fr 1fr 130px;
  gap: 16px; align-items: center;
  padding: 22px 6px; border-bottom: 1px solid var(--hair);
  text-decoration: none; transition: background 0.2s;
}
.row:hover { background: var(--surface); }
.row .idx { font-family: var(--font-m); font-size: 11px; color: var(--muted); }
.row .cname { font-family: var(--font-d); font-size: clamp(18px, 2vw, 24px); font-weight: 600; }
.row .prof, .row .mand { font-family: var(--font-m); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }
.chip {
  justify-self: end;
  font-family: var(--font-m); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 12px; border: 1px solid;
  display: inline-flex; align-items: center; gap: 7px;
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.live { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); }
.chip.soon { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }
.chip.draft { color: var(--muted); border-color: var(--hair); }

/* developers */
.dev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 60px); align-items: center; }
.code {
  background: var(--navy); color: #dce7f5; border-radius: 4px;
  font-family: var(--font-m); font-size: 12.5px; line-height: 1.75;
  padding: 26px 28px; overflow-x: auto; white-space: pre;
}
.code .c1 { color: #7f9cbd; }
.code .c2 { color: #7ee2a8; }
.code .c3 { color: #9db8ff; }
.dev-points { list-style: none; display: grid; gap: 18px; margin-top: 26px; }
.dev-points li { padding-left: 26px; position: relative; color: var(--muted); font-size: 15px; }
.dev-points li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.dev-points li b { color: var(--ink); font-weight: 600; }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; }
.cta-band .k { color: #8fa9c4; }
.cta-band .h2 { color: #fff; max-width: 18ch; }
.cta-band .lead { color: #b7c8da; }
.cta-band .wrap { display: grid; gap: 26px; }
.cta-band .btn { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.cta-band .btn-fill { background: var(--accent); border-color: var(--accent); }
.cta-band .btn-fill:hover { background: #fff; color: var(--navy); border-color: #fff; }

/* footer */
footer { border-top: 1px solid var(--hair); padding: clamp(48px, 6vw, 80px) 0 36px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 34px; }
.foot-grid h4 { font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; font-weight: 500; }
.foot-grid ul { list-style: none; display: grid; gap: 9px; }
.foot-grid a { text-decoration: none; color: var(--ink); font-size: 14px; }
.foot-grid a:hover { color: var(--accent); }
.foot-brand p { color: var(--muted); font-size: 13.5px; max-width: 30ch; margin-top: 12px; }
.foot-base {
  margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--hair);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-family: var(--font-m); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .metrics .wrap { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(3) { border-left: 0; }
  .metric { border-top: 1px solid var(--hair); }
  .metric:nth-child(-n+2) { border-top: 0; }
  .shots { grid-template-columns: 1fr; }
  .shot.tall { grid-row: auto; }
  .dev-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .nav-cta .btn-fill { display: none; }
}
@media (max-width: 760px) {
  .nav-cta .btn-ghost { display: none; }
  .row { grid-template-columns: 30px 1fr 110px; }
  .row .prof, .row .mand { display: none; }
  .ch .inner { max-width: 100%; }
  /* hero must fit the pinned 100svh stage on small phones (320x700 worst case) */
  .ch { padding-top: 76px; }
  .display { font-size: clamp(28px, 9.5vw, 40px); }
  .ch h1, .ch h2 { margin: 8px 0 14px; }
  .ch .lead { font-size: 14.5px; line-height: 1.55; margin-bottom: 18px; }
  .ch .btn { padding: 11px 18px; }
  .hero-ctas { gap: 10px; }
  .hero-stats { margin-top: 20px; gap: 9px; flex-direction: column; }
  .hero-stats div { display: flex; align-items: baseline; gap: 10px; }
  .hero-stats div b { font-size: 19px; }
  .ch-list { gap: 8px; margin-top: 14px; }
  .scroll-cue { display: none; }
}

/* ---------- award-craft layer ---------- */

/* film grain */
.grain {
  position: fixed; inset: -50%; z-index: 240; pointer-events: none;
  width: 200%; height: 200%; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 7s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-2%); } 80% { transform: translate(3%,2%); }
}

/* preloader counter */
.pre-num {
  font-family: var(--font-d); font-weight: 600; font-size: clamp(46px, 7vw, 84px);
  color: var(--nink); line-height: 1; margin: 18px 0 6px; font-variant-numeric: tabular-nums;
}

/* chapter progress rail */
.rail {
  position: fixed; right: 26px; top: 50%; transform: translateY(-50%);
  z-index: 90; display: grid; gap: 18px; justify-items: end;
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
}
body.in-journey .rail { opacity: 1; visibility: visible; }
.rail-line {
  position: absolute; right: 3px; top: -26px; bottom: -26px; width: 1px;
  background: rgba(159, 198, 232, 0.18);
}
.rail-line b { display: block; width: 100%; height: 0%; background: var(--cyan); transition: height 0.15s linear; }
.rail button {
  display: flex; flex-direction: row-reverse; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer; padding: 0;
  font-family: var(--font-m);
}
.rail button em {
  font-style: normal; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--nmut); opacity: 0; transform: translateX(6px); transition: 0.25s;
}
.rail button:hover em, .rail button.on em { opacity: 1; transform: none; }
.rail button span {
  font-size: 10px; color: var(--nmut); width: 7px; height: 7px; border-radius: 50%;
  background: rgba(159, 198, 232, 0.35); text-indent: -9999px; overflow: hidden; display: block;
  transition: 0.25s;
}
.rail button.on span { background: var(--cyan); box-shadow: 0 0 0 4px rgba(57, 214, 255, 0.18); }
@media (max-width: 980px) { .rail { display: none; } }
.no-webgl .rail { display: none; }

/* chapter content: staggered reveal when chapter goes live */
#stage .ch .inner > * { opacity: 0; transform: translateY(26px); transition: opacity 0.65s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1); }
#stage .ch .inner > *:nth-child(2) { transition-delay: 0.07s; }
#stage .ch .inner > *:nth-child(3) { transition-delay: 0.14s; }
#stage .ch .inner > *:nth-child(4) { transition-delay: 0.21s; }
#stage .ch .inner > *:nth-child(5) { transition-delay: 0.28s; }
#stage .ch.live .inner > * { opacity: 1; transform: none; }
.no-webgl #stage .ch .inner > * { opacity: 1; transform: none; }

/* compliance ticker */
.ticker {
  overflow: hidden; border-bottom: 1px solid var(--hair);
  background: var(--surface); white-space: nowrap; padding: 16px 0;
}
.ticker-track { display: inline-flex; align-items: center; gap: 38px; animation: tick 26s linear infinite; will-change: transform; }
.ticker span { font-family: var(--font-m); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); }
.ticker i { font-style: normal; font-size: 8px; color: var(--accent); }
@keyframes tick { to { transform: translateX(-50%); } }

/* kinetic mega type above footer */
.mega { overflow: hidden; padding: clamp(30px, 5vw, 70px) 0 0; }
.mega-track { display: inline-flex; align-items: baseline; gap: 40px; white-space: nowrap; animation: tick 18s linear infinite; will-change: transform; }
.mega b {
  font-family: var(--font-d); font-weight: 700; font-size: clamp(64px, 10vw, 150px); line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px rgba(22, 50, 79, 0.55); letter-spacing: -0.02em;
}
.mega b:nth-child(4n+3) { color: var(--navy); -webkit-text-stroke: 0; }
.mega span { font-family: var(--font-d); font-size: clamp(40px, 6vw, 90px); color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .grain, .ticker-track, .mega-track { animation: none; }
  #stage .ch .inner > * { transition: none; opacity: 1; transform: none; }
}

/* ---------- LIGHT journey theme (html[data-journey="light"]) ---------- */
html[data-journey="light"] .preloader { background: var(--bg); }
html[data-journey="light"] .pre-num { color: var(--ink); }
html[data-journey="light"] .pre-label { color: var(--muted); }
html[data-journey="light"] .pre-bar { background: var(--hair); }
html[data-journey="light"] .pre-bar i { background: var(--accent); }

html[data-journey="light"] #stage,
html[data-journey="light"].no-webgl #stage { background: var(--bg); }

html[data-journey="light"] .ch .inner::before {
  background: radial-gradient(ellipse at 40% 50%, rgba(246, 245, 241, 0.94) 0%, rgba(246, 245, 241, 0.72) 55%, transparent 78%);
}
html[data-journey="light"] .ch h1, html[data-journey="light"] .ch h2 { color: var(--ink); }
html[data-journey="light"] .ch .lead { color: var(--muted); }
html[data-journey="light"] .ch .k { color: var(--muted); }
html[data-journey="light"] .ch .k b { color: var(--accent); }
html[data-journey="light"] .ch .num { color: var(--accent); }
html[data-journey="light"] .ch-list li { color: var(--navy); }
html[data-journey="light"] .ch-list li::before { background: var(--accent); }
html[data-journey="light"] .ch-list li.ok::before { background: var(--green); }
html[data-journey="light"] .ch .btn { border-color: var(--ink); color: var(--ink); }
html[data-journey="light"] .ch .btn-ghost:hover { background: var(--ink); color: var(--bg); }
html[data-journey="light"] .ch .btn-fill { background: var(--navy); border-color: var(--navy); color: #fff; }
html[data-journey="light"] .ch .btn-fill:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
html[data-journey="light"] .hero-stats div b { color: var(--ink); }
html[data-journey="light"] .hero-stats div span { color: var(--muted); }
html[data-journey="light"] .scroll-cue { color: var(--muted); }
html[data-journey="light"] .scroll-cue::after { background: linear-gradient(var(--muted), transparent); }

html[data-journey="light"] .rail-line { background: rgba(22, 50, 79, 0.15); }
html[data-journey="light"] .rail-line b { background: var(--accent); }
html[data-journey="light"] .rail button em { color: var(--muted); }
html[data-journey="light"] .rail button span { background: rgba(22, 50, 79, 0.3); }
html[data-journey="light"] .rail button.on span { background: var(--accent); box-shadow: 0 0 0 4px rgba(36, 87, 255, 0.15); }

