/* Fusion brand site
   Scroll scenes: a .scene is a tall section whose .stage sticks to the viewport.
   scroll.js writes its progress (0 to 1) to --p on the scene, and to --t on any
   child with data-range="start,end". CSS turns those numbers into motion. */

:root {
  --bg: #04070d;
  --bg-2: #0a0f1a;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-2: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --ink: #f4f7fb;
  --ink-2: #a9b4c4;
  --ink-3: #6c7a8f;

  --safety: #3d8bff;
  --safety-2: #22d3ee;
  --em: #f5a524;
  --em-2: #ff6b3d;
  --admin: #a78bfa;
  --admin-2: #34d399;

  --radius: 22px;
  --wrap: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); letter-spacing: -0.035em; line-height: 1.02; font-weight: 700; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.lede { font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); max-width: 640px; }
.grad-safety { background: linear-gradient(100deg, var(--safety), var(--safety-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-em { background: linear-gradient(100deg, var(--em), var(--em-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-admin { background: linear-gradient(100deg, var(--admin), var(--admin-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-all { background: linear-gradient(100deg, var(--safety-2), var(--safety) 30%, var(--admin) 60%, var(--em)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform .3s var(--ease), background .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #05080f; }
.btn-primary:hover { box-shadow: 0 10px 40px rgba(255,255,255,.18); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--panel-2); }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.link-arrow { color: var(--safety-2); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .4s, border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(4, 7, 13, 0.72); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.03em; }
.brand svg { width: 28px; height: 28px; }
.brand small { font-family: var(--font); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-left: 2px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-links > li > a, .nav-links > li > button {
  display: block; padding: 8px 14px; border-radius: 999px; font-size: 14px; color: var(--ink-2);
  background: none; border: 0; font: inherit; font-size: 14px; cursor: pointer;
  transition: color .2s, background .2s;
}
.nav-links > li > a:hover, .nav-links > li > button:hover, .nav-links > li > a[aria-current] { color: var(--ink); background: var(--panel-2); }
.nav-cta { height: 38px; padding: 0 16px; font-size: 14px; }
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0;
  width: 680px; padding: 18px; border-radius: 20px;
  background: rgba(10, 15, 26, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.5);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.has-mega:hover .mega, .has-mega:focus-within .mega, .has-mega.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega-col { padding: 12px; border-radius: 14px; }
.mega-col h4 { font-family: var(--font); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; font-weight: 600; }
.mega-col a { display: block; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; font-size: 14px; }
.mega-col a span { display: block; color: var(--ink-3); font-size: 12.5px; }
.mega-col a:hover { background: var(--panel-2); }
.mega-col.safety h4 { color: var(--safety); }
.mega-col.em h4 { color: var(--em); }
.mega-col.admin h4 { color: var(--admin); }
.nav-toggle { display: none; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--panel-2); border: 0; color: var(--ink); cursor: pointer; }
  .nav.menu-open { background: rgba(4,7,13,.96); }
  .nav.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 64px; left: 0; right: 0; padding: 12px 20px 24px;
    background: rgba(4,7,13,.96); border-bottom: 1px solid var(--line);
  }
  .nav.menu-open .mega { position: static; translate: none; width: auto; grid-template-columns: 1fr; opacity: 1; visibility: visible; transform: none; background: none; border: 0; box-shadow: none; padding: 0; }
  .nav.menu-open .has-mega > button { display: none; }
  .nav-cta-li { margin-top: 10px; }
}

/* ---------- Scroll scene plumbing ---------- */
.scene { position: relative; height: var(--len, 300vh); }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
[data-range] { --t: 0; }

/* Simple reveal for non-sticky content */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Generic section ---------- */
.section { padding: clamp(96px, 14vw, 180px) 0; position: relative; }
.section-head { max-width: 820px; margin-bottom: clamp(48px, 7vw, 88px); }
.section-head h2 { font-size: clamp(40px, 6.4vw, 84px); margin: 18px 0 22px; }
.center { text-align: center; margin-inline: auto; }
.center .lede { margin-inline: auto; }

/* ---------- Home: hero ---------- */
.hero .stage { display: grid; place-items: center; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg canvas { width: 100%; height: 100%; }
.hero-glow {
  position: absolute; inset: -20%;
  background:
    radial-gradient(40% 35% at 30% 40%, rgba(61,139,255,.28), transparent 70%),
    radial-gradient(35% 30% at 72% 55%, rgba(245,165,36,.18), transparent 70%),
    radial-gradient(30% 30% at 50% 80%, rgba(167,139,250,.2), transparent 70%);
  filter: blur(20px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate3d(3%, -2%, 0) scale(1.08); } }
.hero-copy {
  position: relative; text-align: center; padding: 0 20px;
  opacity: calc(1 - var(--p) * 2.2);
  transform: translateY(calc(var(--p) * -120px)) scale(calc(1 - var(--p) * 0.25));
}
.hero-copy h1 { font-size: clamp(56px, 11vw, 164px); letter-spacing: -0.055em; line-height: .92; }
.hero-copy h1 .line { display: block; }
.hero-copy .lede { margin: 28px auto 36px; text-align: center; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-in > * { animation: rise 1.2s var(--ease) both; }
.hero-in > *:nth-child(2) { animation-delay: .12s; }
.hero-in > *:nth-child(3) { animation-delay: .24s; }
.hero-in > *:nth-child(4) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(36px); filter: blur(8px); } }
.scroll-cue {
  position: absolute; bottom: 32px; left: 50%; translate: -50% 0;
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: calc(1 - var(--p) * 6);
}
.scroll-cue i { width: 1px; height: 40px; background: linear-gradient(var(--ink-3), transparent); animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Hero second beat: the statement that zooms in */
.hero-statement {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 0 24px;
  opacity: calc(var(--t) * 1.4 - 0.1);
  transform: scale(calc(1.25 - var(--t) * 0.25));
}
.hero-statement h2 { font-size: clamp(36px, 6vw, 88px); max-width: 15ch; }

/* ---------- Home: the split (one platform -> three families) ---------- */
.split .stage { display: grid; place-items: center; }
.split-title { position: absolute; top: 12vh; left: 0; right: 0; text-align: center; padding: 0 20px; }
.split-title h2 { font-size: clamp(36px, 5.4vw, 72px); }
.split-title p { margin-top: 14px; }
.split-title { opacity: calc(var(--p) * 5); }
.orbit { position: relative; width: min(1100px, 92vw); height: 58vh; margin-top: 14vh; }
.core {
  position: absolute; left: 50%; top: 50%; width: 140px; height: 140px; translate: -50% -50%;
  border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #1c2a44, #070b14 70%);
  border: 1px solid var(--line-2);
  box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 0 120px rgba(61,139,255,.35), inset 0 0 40px rgba(61,139,255,.2);
  transform: scale(calc(1 + var(--t) * -0.35));
  opacity: calc(1 - var(--t) * 0.6);
}
.core svg { width: 64px; height: 64px; }
.family {
  position: absolute; left: 50%; top: 50%; width: min(340px, 30vw);
  padding: 26px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  translate: -50% -50%;
  opacity: calc(var(--t) * 1.6);
  transition: border-color .3s, background .3s;
}
.family:hover { border-color: var(--line-2); background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.03)); }
.family .tag { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.family h3 { font-size: 28px; margin: 10px 0 10px; }
.family p { color: var(--ink-2); font-size: 15px; }
.family ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.family li { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); }
.family.safety { transform: translate(calc(var(--t) * -118%), calc(var(--t) * 8%)) scale(calc(.6 + var(--t) * .4)); }
.family.safety .tag { color: var(--safety); }
.family.em { transform: translate(0, calc(var(--t) * -4%)) scale(calc(.6 + var(--t) * .4)); }
.family.em .tag { color: var(--em); }
.family.admin { transform: translate(calc(var(--t) * 118%), calc(var(--t) * 8%)) scale(calc(.6 + var(--t) * .4)); }
.family.admin .tag { color: var(--admin); }
.beams { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.beams path { fill: none; stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--t)); }

@media (max-width: 860px) {
  .orbit { height: auto; margin-top: 30vh; display: grid; gap: 14px; }
  .core, .beams { display: none; }
  .family { position: relative; left: auto; top: auto; translate: none; width: 100%; padding: 20px; }
  .family.safety, .family.em, .family.admin { transform: translateY(calc((1 - var(--t)) * 60px)); }
  .family h3 { font-size: 22px; }
  .split-title { top: 10vh; }
}

/* ---------- Home: device reveal (CAD screen tilting up) ---------- */
.device-scene .stage { display: flex; flex-direction: column; align-items: center; justify-content: center; perspective: 1600px; }
.device-copy { text-align: center; padding: 0 20px; position: absolute; top: 11vh; left: 0; right: 0; }
.device-copy h2 { font-size: clamp(40px, 6.2vw, 92px); }
.device-copy .lede { margin: 16px auto 0; }
.device-copy { opacity: calc(1 - var(--p) * 1.2); transform: translateY(calc(var(--p) * -60px)); }
.device {
  width: min(1100px, 90vw); aspect-ratio: 16 / 10; margin-top: 18vh;
  border-radius: 18px; padding: 10px;
  background: linear-gradient(180deg, #1a2233, #0b101a);
  border: 1px solid var(--line-2);
  box-shadow: 0 60px 140px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.03), 0 0 160px rgba(61,139,255, calc(var(--t) * .25));
  transform-origin: 50% 100%;
  transform: translateY(calc((1 - var(--t)) * 24vh)) rotateX(calc((1 - var(--t)) * 52deg)) scale(calc(.82 + var(--t) * .18));
}
.screen { position: relative; width: 100%; height: 100%; border-radius: 10px; overflow: hidden; background: #070c15; display: grid; grid-template-columns: 210px 1fr 260px; grid-template-rows: 40px 1fr; font-size: 12px; }
.screen .bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.screen .bar b { color: var(--ink); font-weight: 600; margin-right: auto; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pill { padding: 3px 9px; border-radius: 999px; background: var(--panel-2); font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.pill.live { color: #4ade80; }
.pill.live::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; margin-right: 6px; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.queue { border-right: 1px solid var(--line); padding: 10px; display: grid; align-content: start; gap: 8px; overflow: hidden; }
.call { padding: 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); display: grid; gap: 3px; }
.call b { font-size: 12px; }
.call span { color: var(--ink-3); font-size: 11px; }
.call.p1 { border-left: 3px solid #f43f5e; }
.call.p2 { border-left: 3px solid var(--em); }
.call.p3 { border-left: 3px solid var(--safety); }
.map { position: relative; overflow: hidden; background:
  radial-gradient(circle at 60% 40%, rgba(61,139,255,.12), transparent 50%),
  linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px,
  linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 40px 40px,
  #08101c; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.unit { position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; translate: -50% -50%; box-shadow: 0 0 0 6px rgba(255,255,255,.08); }
.unit::after { content: attr(data-id); position: absolute; left: 18px; top: -4px; font-size: 10px; color: var(--ink-2); white-space: nowrap; }
.unit.u1 { background: var(--safety); left: 30%; top: 40%; animation: patrol1 9s ease-in-out infinite alternate; }
.unit.u2 { background: #f43f5e; left: 62%; top: 30%; animation: patrol2 11s ease-in-out infinite alternate; }
.unit.u3 { background: #4ade80; left: 48%; top: 70%; animation: patrol3 8s ease-in-out infinite alternate; }
.unit.u4 { background: var(--em); left: 76%; top: 64%; }
@keyframes patrol1 { to { left: 44%; top: 52%; } }
@keyframes patrol2 { to { left: 70%; top: 44%; } }
@keyframes patrol3 { to { left: 36%; top: 62%; } }
.ping { position: absolute; left: 70%; top: 44%; width: 18px; height: 18px; translate: -50% -50%; border-radius: 50%; background: rgba(244,63,94,.9); }
.ping::before, .ping::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(244,63,94,.8); animation: ping 2.2s ease-out infinite; }
.ping::after { animation-delay: 1.1s; }
@keyframes ping { to { transform: scale(5); opacity: 0; } }
.detail { border-left: 1px solid var(--line); padding: 14px; display: grid; align-content: start; gap: 12px; }
.detail h5 { margin: 0; font-size: 15px; font-family: var(--display); letter-spacing: -0.02em; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; color: var(--ink-3); font-size: 11px; }
.kv b { color: var(--ink); font-weight: 500; }
.timeline { display: grid; gap: 8px; border-left: 1px solid var(--line-2); padding-left: 12px; font-size: 11px; color: var(--ink-2); }
.timeline div { position: relative; }
.timeline div::before { content: ""; position: absolute; left: -16px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--safety); }
.device-caption { position: absolute; bottom: 7vh; left: 0; right: 0; text-align: center; color: var(--ink-2); font-size: 15px; opacity: calc(var(--t) * 2 - 1); }
@media (max-width: 860px) {
  .screen { grid-template-columns: 1fr; grid-template-rows: 34px 1fr; }
  .queue, .detail { display: none; }
  .device { margin-top: 22vh; aspect-ratio: 4 / 5; width: 86vw; }
  .device-caption { display: none; }
}

/* ---------- Product grid (Public Safety Suite) ---------- */
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product {
  position: relative; padding: 28px; border-radius: var(--radius); min-height: 340px;
  background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease), border-color .3s;
}
.product:hover { transform: translateY(-6px); border-color: var(--line-2); }
.product::before { content: ""; position: absolute; inset: auto -30% -40% -30%; height: 70%; background: radial-gradient(closest-side, var(--glow, rgba(61,139,255,.35)), transparent); opacity: .6; transition: opacity .4s; }
.product:hover::before { opacity: 1; }
.product .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: auto; }
.product .icon svg { width: 24px; height: 24px; }
.product h3 { font-size: 30px; margin: 40px 0 6px; position: relative; }
.product .full { font-size: 13px; color: var(--ink-3); letter-spacing: .02em; position: relative; }
.product p { margin-top: 14px; color: var(--ink-2); font-size: 15px; position: relative; }
@media (max-width: 1000px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .products { grid-template-columns: 1fr; } .product { min-height: 0; } }

/* ---------- Feature band (big split panels) ---------- */
.band { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.band.flip > :first-child { order: 2; }
.band h2 { font-size: clamp(40px, 5.6vw, 76px); margin: 18px 0 22px; }
.band .lede { margin-bottom: 28px; }
.checks { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; color: var(--ink-2); }
.checks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%; background: var(--c, var(--safety)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%2305080f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.visual {
  position: relative; aspect-ratio: 1; border-radius: 32px; overflow: hidden;
  background: radial-gradient(circle at 50% 50%, #0f1830, #060a12 70%);
  border: 1px solid var(--line);
}
@media (max-width: 900px) { .band { grid-template-columns: 1fr; } .band.flip > :first-child { order: 0; } }

/* Radar visual */
.radar { position: absolute; inset: 8%; border-radius: 50%; overflow: hidden;
  background:
    repeating-radial-gradient(circle, transparent 0 calc(12.5% - 1px), rgba(245,165,36,.18) calc(12.5% - 1px) 12.5%),
    radial-gradient(circle, rgba(245,165,36,.08), transparent 70%);
}
.radar::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 49.8%, rgba(245,165,36,.18) 50%, transparent 50.2%), linear-gradient(0deg, transparent 49.8%, rgba(245,165,36,.18) 50%, transparent 50.2%); }
.sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(245,165,36,.55), rgba(245,165,36,0) 70deg, transparent 360deg); animation: sweep 4s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.blip { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--em); box-shadow: 0 0 20px var(--em); animation: blipfade 4s linear infinite; }
@keyframes blipfade { 0%, 100% { opacity: .15; } 8% { opacity: 1; } }
.storm-cell { position: absolute; border-radius: 50%; filter: blur(14px); opacity: .7; animation: cell 12s ease-in-out infinite alternate; }
@keyframes cell { to { transform: translate(14%, -10%) scale(1.15); } }

/* Policy (TeamSage) visual */
.docs { position: absolute; inset: 0; display: grid; place-items: center; }
.doc {
  position: absolute; width: 56%; aspect-ratio: 8.5 / 11; border-radius: 14px; padding: 7%;
  background: linear-gradient(180deg, #151c2e, #0d1322); border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px rgba(0,0,0,.5);
  display: grid; align-content: start; gap: 9px;
  transform: rotate(var(--r)) translate(var(--x), var(--y));
  transition: transform 1.2s var(--ease);
}
.reveal.in .doc { transform: rotate(var(--r2)) translate(var(--x2), var(--y2)); }
.doc i { display: block; height: 7px; border-radius: 4px; background: rgba(255,255,255,.1); }
.doc i.h { height: 12px; width: 60%; background: rgba(167,139,250,.6); margin-bottom: 6px; }
.doc i.s { width: 75%; }
.doc .stamp { margin-top: 14px; justify-self: start; display: inline-flex; gap: 6px; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; color: #05080f; background: var(--admin-2); }
.doc .sig { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.doc .sig b { width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--admin), var(--safety)); }

/* ---------- Connected (path drawing) ---------- */
.connect .stage { display: grid; place-items: center; }
.connect-copy { position: absolute; top: 12vh; left: 0; right: 0; text-align: center; padding: 0 20px; }
.connect-copy h2 { font-size: clamp(36px, 5.6vw, 80px); }
.connect-copy .lede { margin: 16px auto 0; }
.net { width: min(900px, 94vw, 100vh); margin-top: 24vh; overflow: visible; }
@media (max-width: 600px) { .net { width: 100vw; margin-top: 30vh; } .net .node text { font-size: 22px; } .net .node text.sub { display: none; } }
.net .wire { fill: none; stroke: url(#wireGrad); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--t)); }
.net .pulse { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: .04 1; animation: flow 3s linear infinite; opacity: calc(var(--t) * 2 - 1); }
@keyframes flow { from { stroke-dashoffset: 1.04; } to { stroke-dashoffset: 0; } }
.net .node rect { fill: #0c1322; stroke: rgba(255,255,255,.14); }
.net .node text { fill: var(--ink); font: 600 15px var(--font); text-anchor: middle; }
.net .node text.sub { fill: var(--ink-3); font-weight: 500; font-size: 11px; letter-spacing: .1em; }
.net .node { opacity: calc(var(--t) * 3 - var(--i, 0) * 0.35); }
.net .hub circle.halo { fill: none; stroke: rgba(255,255,255,.12); animation: halo 3s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes halo { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

/* ---------- Big quote / statement ---------- */
.statement { font-family: var(--display); font-weight: 700; letter-spacing: -0.04em; line-height: 1.08; font-size: clamp(32px, 5vw, 68px); max-width: 22ch; }
.statement .w { opacity: .15; transition: opacity .2s; }
.statement .w.on { opacity: 1; }

/* ---------- CTA ---------- */
.cta {
  position: relative; text-align: center; padding: clamp(80px, 12vw, 140px) 24px; border-radius: 36px; overflow: hidden;
  background: radial-gradient(60% 80% at 50% 0%, rgba(61,139,255,.25), transparent 70%), linear-gradient(180deg, #0c1424, #070b14);
  border: 1px solid var(--line);
}
.cta h2 { font-size: clamp(40px, 6.4vw, 88px); margin-bottom: 20px; }
.cta .lede { margin: 0 auto 36px; }
.cta .hero-actions { margin-top: 0; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 64px 0 40px; margin-top: 120px; color: var(--ink-3); font-size: 14px; }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot h4 { font-family: var(--font); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; font-weight: 600; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a:hover { color: var(--ink); }
.foot .brand { color: var(--ink); margin-bottom: 14px; }
.legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* ---------- NexusEM page ---------- */
.em-page { --accent: var(--em); }
.em-hero .stage { display: grid; place-items: center; }
.em-hero-bg { position: absolute; inset: 0; display: grid; place-items: center; }
.em-radar { position: relative; width: 150vmax; aspect-ratio: 1; border-radius: 50%; opacity: calc(.9 - var(--p) * .3); transform: scale(calc(1 + var(--p) * .4)); }
.em-radar .radar { inset: 0; }
.em-hero-copy { position: relative; text-align: center; padding: 0 20px; opacity: calc(1 - var(--p) * 2.4); transform: translateY(calc(var(--p) * -100px)); }
.em-hero-copy .logo-tile { width: 92px; height: 92px; margin: 0 auto 28px; border-radius: 24px; box-shadow: 0 20px 60px rgba(202,138,4,.3); }
.em-hero-copy h1 { font-size: clamp(60px, 12vw, 176px); letter-spacing: -0.06em; line-height: .9; }
.em-hero-copy .lede { margin: 26px auto 36px; }
.vignette { position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 30%, var(--bg) 75%); pointer-events: none; }

/* Dashboard assembly */
.assemble .stage { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.assemble-copy { text-align: center; padding: 0 20px; margin-bottom: 5vh; opacity: calc(var(--p) * 6); }
.assemble-copy h2 { font-size: clamp(36px, 5.6vw, 80px); }
.assemble-copy .lede { margin: 14px auto 0; }
.dash {
  width: min(1120px, 92vw);
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(100px, 14vh); gap: 14px;
}
.tile {
  border-radius: 18px; padding: 16px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: calc(var(--t) * 1.5);
  transform: translate(calc((1 - var(--t)) * var(--dx, 0px)), calc((1 - var(--t)) * var(--dy, 120px))) rotate(calc((1 - var(--t)) * var(--rot, 0deg))) scale(calc(.85 + var(--t) * .15));
  font-size: 12px; color: var(--ink-2);
}
.tile h6 { margin: 0 0 8px; font: 600 11px var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.tile .big { font-family: var(--display); font-size: clamp(22px, 2.4vw, 34px); font-weight: 700; color: var(--ink); letter-spacing: -0.03em; line-height: 1.1; }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
.tile.alert { border-color: rgba(245,165,36,.4); background: linear-gradient(180deg, rgba(245,165,36,.16), rgba(245,165,36,.03)); }
.tile.alert .big { color: var(--em); }
.lcl { display: flex; gap: 4px; margin-top: 10px; }
.lcl span { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); }
.lcl span.on:nth-child(1) { background: #4ade80; } .lcl span.on:nth-child(2) { background: #facc15; } .lcl span.on:nth-child(3) { background: var(--em); }
.gauge { position: relative; width: 100%; max-width: 160px; aspect-ratio: 2 / 1.1; margin: 4px auto 0; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.spark { width: 100%; height: 56px; margin-top: 8px; }
.road { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.road:last-child { border: 0; }
.road b { color: var(--ink); font-weight: 500; }
.tag-red { color: #fb7185; } .tag-amb { color: var(--em); } .tag-grn { color: #4ade80; }
.mini-map { position: absolute; inset: 38px 0 0 0; background:
  radial-gradient(circle at 40% 55%, rgba(245,165,36,.35), transparent 18%),
  radial-gradient(circle at 62% 38%, rgba(244,63,94,.35), transparent 14%),
  linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 28px 28px,
  linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px) 0 0 / 28px 28px; }
@media (max-width: 900px) {
  .dash { grid-template-columns: repeat(2, 1fr); grid-auto-rows: minmax(96px, 12vh); gap: 10px; }
  .tile.hide-sm { display: none; }
  .tile.tall { grid-row: span 1; }
}

/* Horizontal module rail */
.rail .stage { display: flex; flex-direction: column; justify-content: center; }
.rail-head { padding: 0 max(20px, calc((100vw - var(--wrap)) / 2)); margin-bottom: 40px; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.rail-head h2 { font-size: clamp(36px, 5vw, 72px); max-width: 14ch; }
.rail-count { font-family: var(--display); font-size: 15px; color: var(--ink-3); }
.rail-track {
  display: flex; gap: 18px; padding: 0 max(20px, calc((100vw - var(--wrap)) / 2));
  width: max-content;
  transform: translateX(calc(var(--p) * var(--shift, 0px) * -1));
}
.mod {
  width: clamp(270px, 28vw, 360px); height: clamp(340px, 50vh, 440px); flex: none;
  border-radius: 26px; padding: 28px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.mod .num { font-family: var(--display); font-size: 13px; color: var(--ink-3); }
.mod .glyph { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 22px 0 auto; background: rgba(245,165,36,.12); border: 1px solid rgba(245,165,36,.3); color: var(--em); }
.mod .glyph svg { width: 30px; height: 30px; }
.mod h3 { font-size: 28px; margin-bottom: 10px; }
.mod p { color: var(--ink-2); font-size: 15px; }
.mod::after { content: ""; position: absolute; right: -30%; top: -30%; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(245,165,36,.14), transparent); }

/* Phone + push */
.phone {
  position: relative; width: min(320px, 72vw); aspect-ratio: 9 / 19.5; margin: 0 auto;
  border-radius: 48px; padding: 12px; background: linear-gradient(160deg, #2a3242, #0d121c);
  box-shadow: 0 50px 120px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08);
}
.phone .scr { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background:
  radial-gradient(80% 50% at 50% 0%, rgba(245,165,36,.35), transparent 70%),
  linear-gradient(180deg, #1a1430, #0a0d18); }
.phone .notch { position: absolute; top: 10px; left: 50%; translate: -50% 0; width: 32%; height: 26px; border-radius: 20px; background: #000; z-index: 2; }
.phone .clock { text-align: center; margin-top: 70px; font-family: var(--display); font-weight: 600; font-size: 64px; letter-spacing: -0.04em; color: rgba(255,255,255,.92); }
.phone .date { text-align: center; color: rgba(255,255,255,.7); font-size: 14px; }
.notif {
  margin: 12px; padding: 12px 14px; border-radius: 20px;
  background: rgba(255,255,255,.14); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: grid; grid-template-columns: 36px 1fr; gap: 10px; font-size: 12.5px; color: rgba(255,255,255,.85);
  opacity: 0; transform: translateY(-30px) scale(.96);
  transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s);
}
.reveal.in .notif { opacity: 1; transform: none; }
.notif img, .notif svg { width: 36px; height: 36px; border-radius: 9px; }
.notif b { display: flex; justify-content: space-between; color: #fff; font-size: 13px; }
.notif b small { font-weight: 400; color: rgba(255,255,255,.55); }
.notifs { margin-top: 40px; }

/* Storm cone */
.cone-vis { background: radial-gradient(circle at 70% 70%, #0d2238, #050a12 75%); }
.cone-vis svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cone-vis .coast { fill: #0e1a2a; stroke: rgba(255,255,255,.18); stroke-width: 1.5; }
.cone-vis .cone { fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.5); stroke-dasharray: 6 6; opacity: 0; transition: opacity 1.4s var(--ease) .6s; }
.cone-vis .track { fill: none; stroke: var(--em); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s var(--ease) .3s; }
.cone-vis .pt { fill: var(--bg); stroke: var(--em); stroke-width: 3; opacity: 0; transition: opacity .5s; }
.reveal.in .cone, .reveal.in .pt { opacity: 1; }
.reveal.in .track { stroke-dashoffset: 0; }
.cone-vis .pt:nth-of-type(2) { transition-delay: .8s; } .cone-vis .pt:nth-of-type(3) { transition-delay: 1.2s; } .cone-vis .pt:nth-of-type(4) { transition-delay: 1.6s; } .cone-vis .pt:nth-of-type(5) { transition-delay: 2s; }
.hurricane { transform-origin: center; transform-box: fill-box; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }

/* Module toggles */
.toggles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.toggle { color: var(--ink); font: inherit; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-weight: 500; font-size: 15px; cursor: pointer; transition: border-color .3s, background .3s; user-select: none; }
.toggle:hover { border-color: var(--line-2); }
.toggle .sw { width: 44px; height: 26px; border-radius: 999px; background: rgba(255,255,255,.12); position: relative; transition: background .35s var(--ease); flex: none; }
.toggle .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .35s var(--ease); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.toggle[aria-pressed="true"] .sw { background: var(--em); }
.toggle[aria-pressed="true"] .sw::after { transform: translateX(18px); }
.toggle-note { margin-top: 22px; color: var(--ink-3); font-size: 14px; }

/* Two audiences */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.duo-card { padding: clamp(28px, 4vw, 48px); border-radius: 28px; background: var(--panel); border: 1px solid var(--line); position: relative; overflow: hidden; }
.duo-card h3 { font-size: clamp(28px, 3.4vw, 44px); margin: 14px 0 14px; }
.duo-card p { color: var(--ink-2); }
.duo-card ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.duo-card li { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 15px; }
.duo-card.pub { background: linear-gradient(180deg, rgba(61,139,255,.12), rgba(255,255,255,.02)); }
.duo-card.staff { background: linear-gradient(180deg, rgba(245,165,36,.12), rgba(255,255,255,.02)); }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

/* ---------- Reduced motion: everything lands in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .scene { height: auto !important; }
  .stage { position: relative; height: auto; min-height: 100vh; padding: 120px 0 80px; }
  .rail .stage { overflow-x: auto; }
  .rail-track { transform: none !important; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-statement, .scroll-cue { display: none; }
  .hero-copy, .em-hero-copy, .device-copy, .split-title, .connect-copy, .assemble-copy { opacity: 1 !important; transform: none !important; }
  .split-title, .device-copy, .connect-copy, .assemble-copy { position: relative; top: auto; }
  .device, .net, .dash, .orbit { margin-top: 48px; }
  .device-caption { position: relative; bottom: auto; margin-top: 24px; }
  .stage { display: flex !important; flex-direction: column; align-items: center; justify-content: center; }
  .em-radar { opacity: .5 !important; }
  .rail .stage { align-items: flex-start !important; }
}

/* ---------- TeamSage page ---------- */
.ts-hero .stage { display: grid; place-items: center; }
.ts-hero-bg { position: absolute; inset: -10%; background:
  radial-gradient(40% 40% at 30% 35%, rgba(167,139,250,.28), transparent 70%),
  radial-gradient(35% 35% at 72% 65%, rgba(52,211,153,.16), transparent 70%);
  filter: blur(20px); animation: drift 18s ease-in-out infinite alternate; }
.ts-stack { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ts-stack .doc { width: min(300px, 42vw); opacity: calc(var(--p) * 1.8 - .1);
  transform: translate(calc(var(--p) * var(--fx)), calc(var(--p) * var(--fy) + 6vh)) rotate(calc(var(--p) * var(--fr))) scale(calc(.9 + var(--p) * .1)); }
.ts-hero-copy { position: relative; text-align: center; padding: 0 20px; opacity: calc(1 - var(--p) * 2.4); transform: translateY(calc(var(--p) * -100px)); }
.ts-hero-copy h1 { font-size: clamp(60px, 12vw, 176px); letter-spacing: -0.06em; line-height: .9; }
.ts-hero-copy .lede { margin: 26px auto 36px; }
.ts-hero-copy .logo-tile { width: 92px; height: 92px; margin: 0 auto 28px; border-radius: 24px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2a1f5c, #0f2a2a); border: 1px solid rgba(167,139,250,.4); box-shadow: 0 20px 60px rgba(167,139,250,.3); }
.ts-hero-copy .logo-tile svg { width: 48px; height: 48px; }
.ts-hero .vignette { background: radial-gradient(circle at 50% 50%, transparent 25%, var(--bg) 78%); }

/* Sign-off dashboard */
.signoff .stage { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.signoff-copy { text-align: center; padding: 0 20px; margin-bottom: 5vh; opacity: calc(var(--p) * 6); }
.signoff-copy h2 { font-size: clamp(36px, 5.6vw, 80px); }
.signoff-copy .lede { margin: 14px auto 0; }
.board { width: min(1100px, 92vw); display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.board .tile { --dy: 80px; }
.acks { display: grid; gap: 14px; margin-top: 6px; }
.ack { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; font-size: 13px; color: var(--ink-2); }
.ack b { color: var(--ink); font-weight: 500; }
.ack .track { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: rgba(255,255,255,.07); overflow: hidden; }
.ack .fill { height: 100%; border-radius: 4px; width: calc(var(--t) * var(--w)); background: linear-gradient(90deg, var(--admin), var(--admin-2)); }
.ack .pct { font-variant-numeric: tabular-nums; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; margin-top: 12px; padding-bottom: 22px; position: relative; }
.bars .col { flex: 1; display: flex; gap: 3px; align-items: flex-end; height: 100%; position: relative; }
.bars .col span { flex: 1; border-radius: 4px 4px 0 0; height: calc(var(--t) * var(--h)); }
.bars .col span:first-child { background: rgba(255,255,255,.12); }
.bars .col span:nth-child(2) { background: linear-gradient(180deg, var(--admin-2), rgba(52,211,153,.4)); }
.bars .col i { position: absolute; bottom: -20px; left: 0; right: 0; text-align: center; font-style: normal; font-size: 10px; color: var(--ink-3); }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--ink-3); }
.legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--c); }
.expiring { display: grid; gap: 8px; margin-top: 8px; }
.expiring div { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); font-size: 12.5px; }
.expiring div b { color: var(--ink); font-weight: 500; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } .board .hide-sm { display: none; } }

/* Lifecycle flow */
.flow .stage { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.flow-head { text-align: center; padding: 0 20px; margin-bottom: 8vh; }
.flow-head h2 { font-size: clamp(36px, 5.6vw, 80px); }
.flow-head .lede { margin: 14px auto 0; }
.steps { position: relative; width: min(1100px, 92vw); display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.steps .rail-line { position: absolute; left: 10%; right: 10%; top: 36px; height: 2px; background: rgba(255,255,255,.08); }
.steps .rail-line i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--t)); background: linear-gradient(90deg, var(--admin), var(--admin-2)); box-shadow: 0 0 20px rgba(167,139,250,.6); }
.step { position: relative; text-align: center; padding: 0 6px; }
.step .ring { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: #0b0f1c; border: 1px solid var(--line-2); color: var(--ink-3);
  transition: background .5s, border-color .5s, color .5s, box-shadow .5s, transform .5s var(--ease); }
.step .ring svg { width: 28px; height: 28px; }
.step h3 { font-size: 20px; margin-bottom: 6px; opacity: calc(.35 + var(--t) * .65); }
.step p { font-size: 14px; color: var(--ink-2); opacity: calc(var(--t) * 1); transform: translateY(calc((1 - var(--t)) * 14px)); }
.step.lit .ring { background: linear-gradient(135deg, rgba(167,139,250,.35), rgba(52,211,153,.25)); border-color: rgba(167,139,250,.7); color: #fff; box-shadow: 0 0 40px rgba(167,139,250,.35); transform: scale(1.06); }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 18px; width: min(420px, 90vw); }
  .steps .rail-line { left: 36px; right: auto; top: 36px; bottom: 36px; width: 2px; height: auto; }
  .steps .rail-line i { transform-origin: top; transform: scaleY(var(--t)); }
  .step { display: grid; grid-template-columns: 72px 1fr; gap: 0 16px; text-align: left; align-items: center; }
  .step .ring { margin: 0; grid-row: span 2; width: 60px; height: 60px; }
  .flow-head { margin-bottom: 4vh; }
}

/* Library mock */
.lib { border-radius: 24px; overflow: hidden; background: linear-gradient(180deg, #10142a, #0a0d18); border: 1px solid var(--line); box-shadow: 0 40px 100px rgba(0,0,0,.5); }
.lib-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.lib-top b { color: var(--ink); font-size: 15px; font-family: var(--display); letter-spacing: -0.02em; }
.lib-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 14px;
  opacity: 0; transform: translateX(-20px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0s); }
.lib-row:last-child { border-bottom: 0; }
.reveal.in .lib-row { opacity: 1; transform: none; }
.lib-row .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(167,139,250,.14); color: var(--admin); }
.lib-row .ico svg { width: 15px; height: 15px; }
.lib-row small { display: block; color: var(--ink-3); font-size: 12px; }
.badge { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge.pending { color: var(--em); background: rgba(245,165,36,.12); }
.badge.signed { color: var(--admin-2); background: rgba(52,211,153,.12); }
.badge.flip { display: inline-grid; color: var(--em); background: rgba(245,165,36,.12); transition: color .5s, background .5s; transition-delay: 1.6s; }
.badge.flip span { grid-area: 1 / 1; transition: opacity .4s; transition-delay: 1.6s; }
.badge.flip .b { opacity: 0; }
.reveal.in .badge.flip { color: var(--admin-2); background: rgba(52,211,153,.12); }
.reveal.in .badge.flip .a { opacity: 0; }
.reveal.in .badge.flip .b { opacity: 1; }

/* Audit log */
.log { border-radius: 20px; background: #070a12; border: 1px solid var(--line); font: 13px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow: hidden; }
.log-top { display: flex; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-family: var(--font); font-size: 12px; align-items: center; }
.log-row { display: grid; grid-template-columns: 70px 120px 1fr; gap: 12px; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.04); color: var(--ink-2);
  opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in .log-row { opacity: 1; transform: none; }
.log-row .when { color: var(--ink-3); }
.log-row .act { font-weight: 600; }
.act.ok { color: var(--admin-2); } .act.info { color: #7dd3fc; } .act.warn { color: var(--em); } .act.bad { color: #fb7185; }
@media (max-width: 560px) { .log-row { grid-template-columns: 1fr; gap: 2px; } }

/* Roles chips */
.roles { display: flex; flex-wrap: wrap; gap: 10px; }
.role { padding: 12px 18px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 500; font-size: 15px; display: inline-flex; gap: 10px; align-items: center; }
.role i { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--admin)); box-shadow: 0 0 12px var(--c, var(--admin)); }

@media (prefers-reduced-motion: reduce) {
  .ts-hero-copy, .signoff-copy { opacity: 1 !important; transform: none !important; }
  .ts-stack { display: none; }
  .lib-row, .log-row { opacity: 1; transform: none; }
  .step .ring { background: linear-gradient(135deg, rgba(167,139,250,.35), rgba(52,211,153,.25)); border-color: rgba(167,139,250,.7); color: #fff; }
}
