/* ============================================================
   What's Next — "DEPTH"
   A scroll-cinematic, fully 3D landing experience.
   The What's Next landing (served at /). No framework, no build.

   How it works
   ------------
   Each <section class="act"> is taller than the viewport. Inside,
   a sticky `.pin` holds a `.scene` (perspective + preserve-3d).
   depth.js writes one number per act — `--p` (0..1) = how far the
   reader has scrolled through that act — onto the act element.
   Because CSS custom properties inherit, every descendant can read
   `--p` and drive its own transform with calc()/clamp(). Per-element
   sub-timing comes from inline `--s` (start) and `--span` on a
   `.scrub`, which derives `--rp` (its own local 0..1 progress).

   Everything is transform/opacity only (GPU), and the whole thing
   collapses to a calm static layout under prefers-reduced-motion.
   ============================================================ */

:root {
  --b1: #7C5CFF;          /* violet */
  --b2: #2DC8F0;          /* cyan   */
  --b3: #ff5e7a;          /* warm magenta accent */
  --join: #2bbf6f;

  --ink-0: #ffffff;
  --ink-1: #eef0f6;
  --ink-2: #b6b8c6;
  --ink-3: #8a8c9c;
  --ink-4: #5d6075;

  --bg: #06060a;
  --hair: rgba(255,255,255,0.09);
  --hair-2: rgba(255,255,255,0.16);

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

  /* pointer parallax, written by JS (-1..1) */
  --mx: 0;
  --my: 0;
  --scroll: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body {
  /* deep-space backdrop that subtly drifts with scroll */
  background:
    radial-gradient(80vw 60vh at 18% 8%, rgba(124,92,255,0.16), transparent 60%),
    radial-gradient(70vw 55vh at 85% 90%, rgba(45,200,240,0.13), transparent 60%),
    radial-gradient(60vw 50vh at 60% 50%, rgba(255,94,122,0.06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--b2); text-decoration: none; }
::selection { background: rgba(124,92,255,0.4); color: #fff; }

/* grain / vignette overlay for cinematic depth */
.fx-vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 40%, transparent 55%, rgba(0,0,0,0.55));
  mix-blend-mode: multiply;
}

/* ---- scroll progress bar ---- */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; z-index: 60;
  width: calc(var(--scroll) * 100%);
  background: linear-gradient(90deg, var(--b1), var(--b2), var(--b3));
  box-shadow: 0 0 12px rgba(124,92,255,0.7);
}

/* ---- minimal fixed nav ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 55;
  display: flex; align-items: center; gap: 14px;
  padding: 16px max(20px, 4vw);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 15px; color: var(--ink-1);
  letter-spacing: -0.01em;
  opacity: calc(0.4 + var(--scroll) * 2);
}
.nav-brand img { width: 26px; height: 26px; filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6)); }
.nav-spacer { flex: 1; }
.nav-free {
  font-size: 12px; font-weight: 700; letter-spacing: 0.04em; color: #d8ccff;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(124,92,255,0.16); border: 1px solid rgba(124,92,255,0.4);
}
.nav-cta {
  padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 13.5px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--b1), var(--b2));
  box-shadow: 0 8px 24px rgba(124,92,255,0.4);
  transition: transform 160ms cubic-bezier(.2,.7,.3,1), box-shadow 160ms;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(124,92,255,0.55); }

/* ============================================================
   The scroll-3D engine
   ============================================================ */
.act { position: relative; z-index: 2; }
.pin {
  position: sticky; top: 0;
  height: 100vh; height: 100dvh;
  display: grid; place-items: center; justify-content: center;
  perspective: 1200px;
  perspective-origin: calc(50% + var(--mx) * 3%) calc(42% + var(--my) * 4%);
  /* clip (not hidden) so deep-Z children don't balloon the document
     scroll height — without breaking the sticky pin */
  overflow: clip;
}
.scene {
  position: relative;
  width: min(1180px, 92vw);
  padding-inline: clamp(16px, 3vw, 44px);
  transform-style: preserve-3d;
  /* gentle pointer tilt on every scene (kept subtle so nothing
     ever swings past the viewport edge) */
  transform: rotateY(calc(var(--mx) * 2.4deg)) rotateX(calc(var(--my) * -1.8deg));
  transition: transform 220ms cubic-bezier(.2,.7,.3,1);
}
/* grid children must be allowed to shrink, or long headings push the
   whole scene wider than its column and overflow the edge */
.split > * { min-width: 0; }
/* the scrub helper: derive a local 0..1 from the act's --p */
.scrub { --rp: clamp(0, calc((var(--p, 0) - var(--s, 0)) / var(--span, 1)), 1); }
/* lift: slide up + fade in driven by --rp (pair with .scrub) */
.lift { transform: translateY(calc((1 - var(--rp)) * 42px)); opacity: var(--rp); }
.split-visual { perspective: 1000px; transform-style: preserve-3d; }

/* shared bits */
.glass {
  background: linear-gradient(180deg, rgba(26,26,38,0.86), rgba(14,14,22,0.86));
  border: 1px solid var(--hair-2);
  border-radius: 18px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
}
.gradient-edge { position: relative; }
.gradient-edge::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, rgba(124,92,255,0.7), rgba(45,200,240,0.5) 55%, rgba(255,94,122,0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--b2);
}
.kicker::before { content: ""; width: 22px; height: 1.5px; background: linear-gradient(90deg, var(--b1), var(--b2)); }
.act-h2 {
  font-size: clamp(28px, 4.4vw, 48px); line-height: 1.05; letter-spacing: -0.03em;
  font-weight: 800; margin: 14px 0 0;
  overflow-wrap: break-word;
  background: linear-gradient(135deg, #fff 30%, #c4c6d4);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.act-copy { font-size: clamp(15px, 2.1vw, 18px); line-height: 1.6; color: var(--ink-2); margin: 16px 0 0; max-width: 46ch; }
.feat { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 11px; }
.feat li { display: flex; gap: 11px; font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.feat li b { color: var(--ink-1); }
.feat .ck {
  flex: 0 0 20px; height: 20px; margin-top: 1px; border-radius: 6px;
  display: grid; place-items: center; color: #d8c8ff;
  background: linear-gradient(135deg, rgba(124,92,255,0.28), rgba(45,200,240,0.18));
  border: 1px solid rgba(124,92,255,0.45);
}
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px,5vw,64px); align-items: center; width: 100%; }
.split--rev .split-text { order: 2; }

/* ============================================================
   ACT 0 — HERO : the menu-bar slab, camera push-in
   ============================================================ */
.hero .scene { width: min(1280px, 94vw); }

/* receding grid floor */
.floor {
  position: absolute; left: 50%; top: 64%;
  width: 240%; height: 150%;
  transform:
    translate(-50%, 0)
    rotateX(78deg)
    translateZ(calc(-200px + var(--p) * 240px));
  transform-origin: 50% 0;
  background-image:
    linear-gradient(rgba(124,92,255,0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45,200,240,0.18) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(60% 60% at 50% 0%, #000, transparent 75%);
          mask-image: radial-gradient(60% 60% at 50% 0%, #000, transparent 75%);
  opacity: calc(0.9 - var(--p) * 0.6);
}

.hero-stack { position: relative; text-align: center; transform-style: preserve-3d; }

.hero-eyebrow {
  position: relative; z-index: 3;
  transform: translateZ(40px) translateY(calc(var(--p) * -40px));
  opacity: calc(1 - var(--p) * 1.4);
}
.hero-title {
  position: relative; z-index: 3; margin: 14px 0 0;
  font-size: clamp(54px, 13vw, 168px); line-height: 0.92; font-weight: 800;
  letter-spacing: -0.05em; color: #fff;
  text-shadow: 0 1px 0 rgba(124,92,255,0.5), 0 24px 80px rgba(124,92,255,0.35);
  transform: translateZ(calc(80px + var(--p) * 360px)) translateY(calc(var(--p) * -30px));
  opacity: calc(1 - var(--p) * 1.1);
}
.hero-title .dot-accent { color: var(--b2); }
.hero-sub {
  position: relative; z-index: 3; margin: 22px auto 0; max-width: 560px;
  font-size: clamp(15px, 2.2vw, 19px); color: var(--ink-2); line-height: 1.55;
  transform: translateZ(20px) translateY(calc(var(--p) * -20px));
  opacity: calc(1 - var(--p) * 1.6);
}
.hero-cta { margin-top: 30px; display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center;
  transform: translateZ(20px); opacity: calc(1 - var(--p) * 1.8); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform 160ms cubic-bezier(.2,.7,.3,1), box-shadow 160ms;
}
.btn--solid { color: #fff; background: linear-gradient(135deg, var(--b1), var(--b2)); box-shadow: 0 12px 30px rgba(124,92,255,0.45); }
.btn--solid:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(124,92,255,0.6); }
.btn--ghost { color: var(--ink-1); background: rgba(255,255,255,0.06); border: 1px solid var(--hair-2); }
.btn--ghost:hover { background: rgba(255,255,255,0.12); transform: translateY(-2px); }

/* the floating menu-bar slab that the camera flies toward */
.slab {
  position: absolute; left: 50%; top: 50%;
  width: min(680px, 84vw);
  transform:
    translate(-50%, -50%)
    translateZ(calc(-420px + var(--p) * 620px))
    rotateX(calc(42deg - var(--p) * 42deg))
    scale(calc(0.9 + var(--p) * 0.25));
  opacity: calc(0.25 + var(--p) * 0.75);
  z-index: 2;
}
.menubar {
  display: flex; align-items: center; gap: 14px; height: 34px; padding: 0 14px;
  border-radius: 12px;
  background: rgba(16,16,24,0.9);
  border: 1px solid var(--hair-2);
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
  font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden;
}
.menubar .mb-app { font-weight: 700; color: var(--ink-1); }
.menubar .mb-spacer { flex: 1; }
.mb-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 8px;
  background: linear-gradient(135deg, rgba(124,92,255,0.32), rgba(45,200,240,0.26));
  border: 1px solid rgba(124,92,255,0.5);
  color: #fff; font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 24px rgba(124,92,255,0.5);
}
.mb-status .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--join);
  box-shadow: 0 0 0 0 rgba(43,191,111,0.6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(43,191,111,.6)} 70%{box-shadow:0 0 0 8px rgba(43,191,111,0)} 100%{box-shadow:0 0 0 0 rgba(43,191,111,0)} }

.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: grid; place-items: center; gap: 8px; color: var(--ink-3); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  opacity: calc(1 - var(--p) * 3);
}
.scroll-hint .mouse { width: 22px; height: 34px; border: 1.5px solid var(--ink-3); border-radius: 12px; position: relative; }
.scroll-hint .mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 6px; border-radius: 2px; background: var(--ink-2); transform: translateX(-50%); animation: wheel 1.6s infinite; }
@keyframes wheel { 0%{opacity:0;transform:translate(-50%,0)} 30%{opacity:1} 100%{opacity:0;transform:translate(-50%,10px)} }

/* ============================================================
   ACT 1 — AGENDA : popover assembles from depth
   ============================================================ */
.popover {
  position: relative; width: min(380px, 86vw); margin: 0 auto;
  padding: 16px 14px 14px; border-radius: 18px;
  background: linear-gradient(180deg, #14141c, #0c0c14);
  border: 1px solid var(--hair-2);
  box-shadow: 0 50px 120px rgba(0,0,0,0.65);
  transform-style: preserve-3d;
  transform:
    rotateY(calc(22deg - var(--p) * 22deg))
    rotateX(calc(10deg - var(--p) * 10deg))
    translateZ(calc(var(--p) * 40px));
}
.po-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 12px; }
.po-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.po-brand img { width: 22px; height: 22px; }
.po-date { color: var(--ink-3); font-size: 13px; }
.po-label { margin: 6px 4px 8px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-4); }
/* rows fly in from depth, staggered by --i via --rp */
.po-row {
  --rp: clamp(0, calc((var(--p,0) - (0.12 + 0.12 * var(--i,0))) / 0.4), 1);
  transform: translateZ(calc(-260px + var(--rp) * 260px)) translateY(calc((1 - var(--rp)) * 26px));
  opacity: var(--rp);
}
.po-feat {
  position: relative; display: flex; gap: 12px; padding: 14px 14px 14px 16px; margin-bottom: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(40,60,120,0.55), rgba(30,30,50,0.55));
  border: 1px solid rgba(80,110,200,0.35);
}
.po-rail { width: 3px; border-radius: 2px; background: var(--b2); margin: 4px 0; }
.po-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
  background: rgba(0,0,0,0.45); font-size: 12px; font-weight: 700; color: #fff; }
.po-title { margin: 8px 0 6px; font-size: 16px; font-weight: 700; color: #fff; }
.po-meta { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.po-join { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: var(--join); color: #fff; font-weight: 600; font-size: 13px; border: 0;
  box-shadow: 0 6px 16px rgba(43,191,111,0.4); }
.po-line { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 6px; border-radius: 10px;
  background: rgba(255,255,255,0.03); }
.po-time { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; width: 46px; color: var(--ink-1); }
.po-line h4 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink-1); }
.po-line p { margin: 2px 0 0; font-size: 12px; color: var(--ink-3); }
.ring {
  position: relative; width: 64px; height: 64px; flex: 0 0 64px;
  display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--b2) calc(var(--p) * 240deg), rgba(255,255,255,0.08) 0);
  -webkit-mask: radial-gradient(circle 22px at 50% 50%, transparent 98%, #000 100%);
          mask: radial-gradient(circle 22px at 50% 50%, transparent 98%, #000 100%);
}
.ring-wrap { position: relative; width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; }
.ring-num { position: absolute; font-size: 16px; font-weight: 800; color: #fff; }

/* ============================================================
   ACT 2 — JOIN : the whole fleet flies in at once
   ============================================================ */
.fleet {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  width: min(540px, 92%); margin: 0 auto; perspective: 1000px; transform-style: preserve-3d;
}
.fleet-tile {
  --rp: clamp(0, calc((var(--p,0) - 0.03 * var(--i,0)) / 0.55), 1);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(28,28,40,0.92), rgba(16,16,26,0.92));
  border: 1px solid var(--hair-2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.55);
  transform:
    translateZ(calc(-560px + var(--rp) * 560px))
    translateX(calc((1 - var(--rp)) * var(--ox, 0) * 1px))
    translateY(calc((1 - var(--rp)) * var(--oy, 0) * 1px))
    rotate(calc((1 - var(--rp)) * var(--rot, 0) * 1deg));
  opacity: var(--rp);
}
.fleet-tile .ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 18px; overflow: hidden; }
.fleet-tile .ic img { width: 38px; height: 38px; object-fit: contain; display: block; }
.fleet-tile .ic--light { background: #ffffff; }
.fleet-tile .ic--zoom { background: #2D8CFF; }
.fleet-tile .nm { font-size: 12px; font-weight: 600; color: var(--ink-1); text-align: center; }
.fleet-tile .kd { font-size: 10px; color: var(--ink-4); }
.m-webex{background:linear-gradient(135deg,#16ab5e,#0e7a43)} .m-goto{background:linear-gradient(135deg,#f68d2e,#e3700f)}
.m-where{background:linear-gradient(135deg,#3c3cff,#2a2ad6)} .m-around{background:linear-gradient(135deg,#ff5e7a,#e23b5a)}
.m-place{background:linear-gradient(135deg,#8a8c9c,#5d6075)}
@media (max-width: 560px) { .fleet { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   ACT 3 — ALERTS : notifications drop in and stack as you scroll
   ============================================================ */
.alert-stack { position: relative; width: min(380px, 90%); margin: 0 auto; transform-style: preserve-3d; }
.alert-card {
  --rp: clamp(0, calc((var(--p,0) - (0.06 + 0.18 * var(--i,0))) / 0.34), 1);
  position: relative; margin-bottom: 14px; padding: 14px 16px 14px 18px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(30,30,44,0.94), rgba(18,18,28,0.94));
  border: 1px solid var(--hair-2);
  box-shadow: 0 28px 60px rgba(0,0,0,0.6);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transform: translateZ(calc(-220px + var(--rp) * 220px)) translateY(calc((1 - var(--rp)) * 44px)) scale(calc(0.94 + var(--rp) * 0.06));
  transform-origin: 50% 0;
  opacity: var(--rp);
}
.alert-card .a-rail { position: absolute; left: 8px; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; }
.alert-card .a-close { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.08); border: 0; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; font-size: 12px; }
.alert-card .a-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,0.45); padding: 3px 9px; border-radius: 999px; margin-bottom: 8px; }
.alert-card .a-title { margin: 0 0 7px; font-size: 16px; font-weight: 700; color: #fff; padding-right: 28px; }
.alert-card .a-meta { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.alert-card .a-plat { color: var(--ink-3); }
.alert-card .a-join { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: var(--join); color: #fff; font-weight: 600; font-size: 13px; border: 0; box-shadow: 0 6px 16px rgba(43,191,111,0.4); cursor: pointer; }
.tune { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.tune-card { padding: 15px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid var(--hair); }
.tune-card h4 { margin: 0 0 5px; font-size: 14px; color: var(--ink-1); }
.tune-card p { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.tune-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tune-card .chips span { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--hair); color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ============================================================
   ACT 4 — CONTROLS : tilted key wall, keys depress, reactions fly out
   ============================================================ */
/* HUD above the keyboard announcing the firing shortcut */
.kbd-hud {
  display: inline-flex; align-items: center; gap: 9px; margin: 0 auto 18px;
  padding: 9px 16px; border-radius: 999px;
  background: rgba(14,14,20,0.9); border: 1px solid var(--hair-2);
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  color: #fff; font-size: 14px; font-weight: 600;
}
.kbd-hud b { font-family: var(--mono); color: #d8ccff; font-weight: 700;
  background: rgba(124,92,255,0.2); border: 1px solid rgba(124,92,255,0.4); border-radius: 7px; padding: 3px 8px; }
.kbd-wrap { display: grid; justify-items: center; }

/* a real-looking Mac keyboard, tilted on the desk */
.keyboard {
  width: min(640px, 96%); margin: 0 auto; padding: 12px; border-radius: 16px;
  display: grid; gap: 6px; transform-style: preserve-3d;
  background: linear-gradient(180deg, #2b2b34, #15151b);
  border: 1px solid var(--hair-2);
  box-shadow: 0 46px 90px rgba(0,0,0,0.72), inset 0 1px 0 rgba(255,255,255,0.07);
  transform: rotateX(calc(40deg - var(--p) * 28deg));
  transform-origin: 50% 100%;
}
.krow { display: flex; gap: 6px; }
.cap {
  flex: 1 1 0; min-width: 0; height: clamp(24px, 4.2vw, 34px);
  border-radius: 7px; display: grid; place-items: center;
  background: linear-gradient(180deg, #34343d, #23232b);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 2px 0 rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  font-size: clamp(8.5px, 1.25vw, 11px); font-weight: 600; color: var(--ink-3);
  transition: transform 140ms cubic-bezier(.28,1.4,.45,1), box-shadow 200ms, background 200ms, color 200ms;
}
.cap.u13 { flex: 1.3 } .cap.u15 { flex: 1.5 } .cap.u18 { flex: 1.8 } .cap.u23 { flex: 2.3 } .cap.space { flex: 6.25 }
/* modifiers held down for every combo */
.cap.held {
  color: #fff; background: linear-gradient(180deg, #4a3aa8, #2f2570);
  border-color: rgba(124,92,255,0.5);
  box-shadow: 0 1px 0 rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.18);
  transform: translateY(1px);
}
/* the action letter currently being pressed (JS toggles this) */
.cap.pressed {
  color: #fff; background: linear-gradient(180deg, var(--b1), var(--b2));
  border-color: rgba(255,255,255,0.35);
  box-shadow: 0 0 22px rgba(124,92,255,0.65), inset 0 1px 0 rgba(255,255,255,0.3);
  transform: translateY(2px) scale(0.96);
}
/* legend mapping glowing keys to actions */
.key-legend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.key-legend .lg { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2);
  background: rgba(255,255,255,0.04); border: 1px solid var(--hair); border-radius: 999px; padding: 5px 11px; }
.key-legend .lg b { font-family: var(--mono); color: #d8ccff; font-weight: 600; }
@media (max-width: 560px) { .keyboard .num-row { display: none; } }
.react-fly { position: absolute; inset: 0; pointer-events: none; transform-style: preserve-3d; }
.react-fly .e {
  position: absolute; left: 50%; bottom: 12%; font-size: 30px;
  transform: translateZ(calc(var(--p) * 600px)) translateX(calc(var(--dx) * 1px)) scale(calc(0.6 + var(--p) * 1.4));
  opacity: calc(var(--p) * (1 - var(--p)) * 4);
}
.react-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.react-row .e { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--hair); cursor: pointer;
  transition: transform 140ms cubic-bezier(.28,1.4,.45,1), background 140ms; }
.react-row .e:hover { transform: translateY(-4px) scale(1.1); background: rgba(255,255,255,0.1); }

/* ============================================================
   ACT 5 — STREAM DECK : tilted deck, keys light in a wave
   ============================================================ */
.deck3d {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
  width: min(520px, 88vw); margin: 0 auto; padding: 18px; border-radius: 18px;
  background: linear-gradient(180deg, #1b1b1b, #090909);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 50px 110px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.06);
  transform-style: preserve-3d;
  transform: rotateX(calc(30deg - var(--p) * 22deg)) rotateY(calc(10deg - var(--p) * 10deg));
}
.dk {
  --rp: clamp(0, calc((var(--p,0) - 0.06 * var(--i,0)) / 0.3), 1);
  aspect-ratio: 1; border-radius: 11px; display: grid; place-items: center; gap: 4px;
  background: #15161c; border: 1px solid rgba(255,255,255,0.06);
  color: var(--ink-3); font-size: 9.5px; font-weight: 600; text-align: center;
  transform: translateZ(calc(var(--rp) * 26px));
  box-shadow: 0 0 0 0 rgba(45,200,240,0);
  transition: box-shadow .3s;
}
.dk .em { font-size: 17px; }
.dk.on   { color: #5fe0a0; box-shadow: inset 0 0 0 1px rgba(95,224,160,0.5), 0 0 calc(var(--rp)*22px) rgba(95,224,160,0.45); background: linear-gradient(160deg,#10301f,#0a1f14); }
.dk.off  { color: #ff8b85; box-shadow: inset 0 0 0 1px rgba(255,139,133,0.5); background: linear-gradient(160deg,#301212,#1f0b0b); }
.dk.warn { color: #ffce6b; box-shadow: inset 0 0 0 1px rgba(255,206,107,0.5); background: linear-gradient(160deg,#2f2710,#1f1808); }

/* ============================================================
   ACT 6 — PRIVACY : cards floating at different depths
   ============================================================ */
.priv3d { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 16px; width: min(1040px, 92vw); margin: 0 auto; transform-style: preserve-3d; }
.pcard {
  --rp: clamp(0, calc((var(--p,0) - 0.05 * var(--i,0)) / 0.55), 1);
  padding: 22px; border-radius: 16px; background: rgba(255,255,255,0.035); border: 1px solid var(--hair);
  /* fly in from staggered depth, but every card lands flush at z:0 so
     the final grid is perfectly aligned */
  transform: translateZ(calc((1 - var(--rp)) * (-160px - var(--z, 0) * 1px))) translateY(calc((1 - var(--rp)) * 30px));
  opacity: var(--rp);
}
.pcard .pico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(124,92,255,0.22), rgba(45,200,240,0.16)); border: 1px solid rgba(124,92,255,0.32); color: #d8c8ff; }
.pcard h4 { margin: 0 0 6px; font-size: 15px; color: var(--ink-1); }
.pcard p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-3); }
.pcard code { font-family: var(--mono); font-size: 12px; color: var(--b2); }

/* ============================================================
   ACT — MULTI-ACCOUNT (compact, layered)
   ============================================================ */
.accts { display: grid; gap: 12px; width: min(420px, 86vw); margin: 0 auto; transform-style: preserve-3d; }
.acct {
  --rp: clamp(0, calc((var(--p,0) - (0.1 + 0.14 * var(--i,0))) / 0.4), 1);
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(26,26,38,0.9), rgba(16,16,24,0.9)); border: 1px solid var(--hair-2);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  transform: translateZ(calc(-180px + var(--rp) * 180px)) translateX(calc((1 - var(--rp)) * 40px));
  opacity: var(--rp);
}
.acct .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; }
.acct .em { font-size: 14px; font-weight: 600; color: var(--ink-1); }
.acct .cl { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.acct .tag { margin-left: auto; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--hair); color: var(--ink-2); }
.dotrow { display: inline-flex; gap: 4px; margin-left: 6px; }
.dotrow i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ============================================================
   FINAL CTA — the slab lands into a real menu bar
   ============================================================ */
/* Finale is a normal closing section (NOT a tall pinned act), so the
   page ends exactly here with no trailing empty scroll. */
.finale { position: relative; }
.finale-screen {
  position: relative; min-height: 100vh; min-height: 100dvh;
  display: grid; place-items: center; justify-content: center;
  text-align: center; padding: 96px 20px 64px; overflow: hidden;
}
.finale h2 { font-size: clamp(34px, 7vw, 84px); letter-spacing: -0.04em; font-weight: 800; margin: 0; color: #fff;
  text-shadow: 0 24px 80px rgba(124,92,255,0.4); }
.finale p { color: var(--ink-2); font-size: clamp(16px,2.2vw,19px); margin: 18px auto 28px; max-width: 44ch; }
.finale .req { margin-top: 22px; font-size: 13px; color: var(--ink-4); }
.finale .logo { width: 84px; height: 84px; margin-bottom: 18px; filter: drop-shadow(0 16px 40px rgba(124,92,255,0.5)); }
.finale .foot { position: absolute; left: 0; right: 0; bottom: 22px; z-index: 3; text-align: center;
  color: var(--ink-4); font-size: 13px; }
.foot a { color: var(--ink-3); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; gap: 28px; text-align: left; }
  .split--rev .split-text { order: 1; }
  .priv3d { grid-template-columns: 1fr; }
  .keyboard { padding: 8px; gap: 4px; }
  .krow { gap: 4px; }
}
@media (max-width: 560px) {
  .tune { grid-template-columns: 1fr; }
  .deck3d { grid-template-columns: repeat(4, 1fr); }
  .pin { perspective: 800px; }
}

/* ============================================================
   Reduced motion: collapse the cinema into a calm static page
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .act { height: auto !important; }
  .pin { position: static; height: auto; min-height: 0; padding: 56px 20px; perspective: none; overflow: visible; display: block; }
  .scene { transform: none !important; width: min(1040px, 92vw); margin: 0 auto; }
  .floor, .scroll-hint, .react-fly { display: none !important; }
  .slab { position: static; transform: none !important; opacity: 1 !important; width: min(680px,92vw); margin: 24px auto 0; }
  .hero-title { font-size: clamp(40px, 9vw, 84px); transform: none !important; opacity: 1 !important; }
  .hero-eyebrow, .hero-sub, .hero-cta { transform: none !important; opacity: 1 !important; }
  .popover, .keyboard, .deck3d, .fleet { transform: none !important; }
  .cap { transform: none !important; }
  .po-row, .kc, .dk, .pcard, .acct, .fleet-tile, .alert-card { transform: none !important; opacity: 1 !important; }
  .ring { background: conic-gradient(var(--b2) 240deg, rgba(255,255,255,0.08) 0); }
  .finale-inner { transform: none !important; opacity: 1 !important; }
  .progress { display: none; }
}
