/* home.css — the p2present landing page.
   Cinematic, scroll-driven, lunarpunk. Near-black canvas, a cyan→violet→magenta
   neon glow, generous negative space. Shares the player's base palette so the
   home and the /app player feel like one product, then pushes it darker and
   more luminous for the marketing surface. Self-contained; no external assets.

   Motion is layered so it degrades cleanly:
     · CSS keyframe ambience (aurora drift, shimmer)         → ornamental
     · IntersectionObserver reveals (.reveal → .in)          → JS, graceful
     · scroll-driven layout morph (.morph[data-step])        → JS, graceful
   All of it is silenced under prefers-reduced-motion (see the block at the end). */

:root {
  --bg: #06070b;          /* near-black canvas */
  --bg-2: #0a0c11;
  --panel: #11141b;
  --panel-2: #171b23;
  --line: #232834;
  --line-2: #2c3340;
  --fg: #eef1f5;
  --muted: #98a1af;
  --cyan: #4fd1c5;        /* player accent */
  --violet: #7c6bff;
  --magenta: #ff5cf0;
  --neon: linear-gradient(100deg, #4fd1c5 0%, #7c6bff 52%, #ff5cf0 100%);
  --neon-soft: linear-gradient(100deg, rgba(79,209,197,.9), rgba(124,107,255,.9), rgba(255,92,240,.9));
  --radius: 14px;
  --maxw: 1120px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
/* `clip` (not hidden) keeps position:sticky working while killing any sideways
   bleed from the glow blobs / morph transforms. */
html, body { overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* gradient ("neon") text used for headline accents */
.neon-text {
  background: var(--neon);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ============================================================= *
 *  AMBIENT BACKDROP — slow-drifting aurora blobs behind it all  *
 * ============================================================= */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora::before, .aurora::after,
.aurora .blob { content: ""; position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.aurora::before {
  width: 60vw; height: 60vw; left: -14vw; top: -18vw;
  background: radial-gradient(circle at 50% 50%, rgba(79,209,197,.55), transparent 62%);
  animation: drift1 26s ease-in-out infinite;
}
.aurora::after {
  width: 56vw; height: 56vw; right: -16vw; top: 8vh;
  background: radial-gradient(circle at 50% 50%, rgba(255,92,240,.42), transparent 62%);
  animation: drift2 32s ease-in-out infinite;
}
.aurora .blob {
  width: 52vw; height: 52vw; left: 28vw; top: 52vh;
  background: radial-gradient(circle at 50% 50%, rgba(124,107,255,.45), transparent 62%);
  animation: drift3 30s ease-in-out infinite;
}
/* a faint star/grain field for texture */
.aurora .grain {
  position: absolute; inset: -50%; opacity: .05; filter: none;
  background-image: radial-gradient(rgba(255,255,255,.7) .5px, transparent .5px);
  background-size: 3px 3px;
}
@keyframes drift1 { 0%,100%{ transform: translate(0,0) scale(1); } 50%{ transform: translate(8vw,6vh) scale(1.12); } }
@keyframes drift2 { 0%,100%{ transform: translate(0,0) scale(1.05); } 50%{ transform: translate(-7vw,5vh) scale(.92); } }
@keyframes drift3 { 0%,100%{ transform: translate(0,0) scale(1); } 50%{ transform: translate(-5vw,-8vh) scale(1.1); } }

/* subtle vignette so edges sink into black (cinematic) */
.vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ============================================================= *
 *  TOP NAV                                                       *
 * ============================================================= */
.top {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 22px;
  background: rgba(6, 7, 11, 0.55);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .2px; color: var(--fg); }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; object-fit: contain; display: block;
  background: rgba(79,209,197,.06); border: 1px solid var(--line-2);
  box-shadow: 0 0 18px rgba(124,107,255,.25);
}
footer.site .brand .logo { width: 24px; height: 24px; border-radius: 7px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.top nav a {
  color: var(--fg); font-size: 14px; padding: 7px 13px; border-radius: 999px;
  border: 1px solid transparent; transition: color .2s, border-color .2s, background .2s;
}
.top nav a:not(.cta):hover { border-color: var(--line-2); color: #fff; text-decoration: none; }
.top nav a.cta {
  position: relative; color: #04121a; font-weight: 700;
  background: var(--neon); border-color: transparent;
  box-shadow: 0 4px 22px rgba(124,107,255,.35);
}
.top nav a.cta:hover { text-decoration: none; filter: brightness(1.08); }
/* secondary CTA (Builder) — same pill weight, outline instead of the neon fill */
.top nav a.cta-alt {
  color: var(--fg); font-weight: 600;
  background: rgba(255,255,255,.04); border-color: var(--line-2);
  box-shadow: none;
}
.top nav a.cta-alt:hover { border-color: var(--cyan); color: var(--cyan); filter: none; }
@media (max-width: 620px) { .top nav .hide-sm { display: none; } }

/* ============================================================= *
 *  BUTTONS                                                       *
 * ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 24px; border-radius: 999px; font-size: 16px; font-weight: 700;
  border: 1px solid var(--line-2); color: var(--fg); cursor: pointer; background: transparent;
  transition: transform .18s var(--ease), box-shadow .2s, border-color .2s, background .2s, color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  color: #04121a; border-color: transparent; background: var(--neon);
  background-size: 180% 180%; animation: hueShift 8s ease infinite;
  box-shadow: 0 8px 30px rgba(124,107,255,.35);
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(255,92,240,.4); }
@keyframes hueShift { 0%,100%{ background-position: 0% 50%; } 50%{ background-position: 100% 50%; } }
.btn-ghost { background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* ============================================================= *
 *  HERO                                                          *
 * ============================================================= */
.hero { position: relative; padding: clamp(64px, 13vh, 132px) 0 64px; }
.hero-inner { max-width: 880px; }

/* ---- hero brand mark + scroll-orbit planets ----
   Centered + enlarged "popped" emblem above the headline. It pops in on load and
   JS fades + lifts it away as you scroll into the hero (style.opacity/transform). */
.hero-logo {
  position: relative; margin: 0 auto 18px; width: clamp(240px, 40vw, 430px);
  aspect-ratio: 1 / 1; max-width: 100%;
  transform-origin: center top; will-change: opacity, transform;
  /* fill:none so the finished entrance hands control of transform/opacity back to
     the base (and to the JS scroll-fade inline styles) without a flash. */
  animation: heroLogoPop 1s var(--ease);
}
@keyframes heroLogoPop {
  from { opacity: 0; transform: translateY(20px) scale(.8); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-logo .hero-logo-base {
  display: block; width: 100%; height: 100%; object-fit: contain;
  /* logo-hero-cut.png has a transparent background (the black is gone), so it sits
     directly on the page; layered glows lift it off the surface (elevated). */
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.55))
          drop-shadow(0 0 30px rgba(124,107,255,.35))
          drop-shadow(0 0 60px rgba(79,209,197,.14));
}
.hero-orbit {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  pointer-events: none;
}
.hero-orbit .planet {
  /* the glow; will-change keeps the per-frame cx/cy updates cheap */
  will-change: transform; transform-box: fill-box; transform-origin: center;
}
.hero-orbit .planet-cyan {
  fill: #4fd1c5;
  filter: drop-shadow(0 0 6px #4fd1c5) drop-shadow(0 0 16px rgba(79,209,197,.85));
}
.hero-orbit .planet-magenta {
  fill: #ff5cf0;
  filter: drop-shadow(0 0 6px #ff5cf0) drop-shadow(0 0 16px rgba(255,92,240,.85));
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); padding: 6px 13px 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
}
.eyebrow .dotpulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan); animation: blink 2.4s ease-in-out infinite;
}
@keyframes blink { 0%,100%{ opacity: 1; } 50%{ opacity: .3; } }

.hero h1 {
  font-size: clamp(46px, 9vw, 104px); font-weight: 800; letter-spacing: -.04em;
  margin: 22px 0 0; line-height: .98;
}
.hero h1 .dot { background: var(--neon); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .tagline {
  font-size: clamp(19px, 2.6vw, 28px); color: var(--fg); max-width: 24ch;
  margin: 26px 0 0; font-weight: 500; line-height: 1.32;
}
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 34px; }

/* 3-beat value story: In sync → Relivable → Immortal. Each beat carries a title +
   a one-line payoff, ending on the p2p / "outlives the venue" idea. */
.beats { display: flex; align-items: stretch; gap: 12px; margin-top: 38px; flex-wrap: wrap; }
.beat {
  display: inline-flex; align-items: center; gap: 11px; padding: 10px 18px 10px 11px;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.02);
}
.beat .bi {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  font-size: 17px; line-height: 1; color: var(--cyan); flex: none;
  background: rgba(124,107,255,.14); border: 1px solid var(--line-2);
  box-shadow: 0 0 16px rgba(124,107,255,.25); animation: beatPulse 3.2s ease-in-out infinite;
}
.beat .bt { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.beat .bt b { font-size: 14.5px; font-weight: 700; letter-spacing: .01em; }
.beat .bt i { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.beat:nth-of-type(3) .bi { animation-delay: .5s; color: var(--violet); }
.beat:nth-of-type(5) .bi { animation-delay: 1s; color: var(--magenta); }
@keyframes beatPulse { 0%,100%{ transform: scale(1); box-shadow: 0 0 16px rgba(124,107,255,.25); } 50%{ transform: scale(1.08); box-shadow: 0 0 24px rgba(255,92,240,.4); } }
/* a flowing connector between beats */
.beats .flow {
  align-self: center; width: 26px; height: 2px; border-radius: 2px; position: relative; overflow: hidden;
  background: var(--line-2);
}
.beats .flow::after {
  content: ""; position: absolute; inset: 0; width: 50%; border-radius: 2px;
  background: var(--neon); animation: flowRun 1.8s linear infinite;
}
@keyframes flowRun { from{ transform: translateX(-120%); } to{ transform: translateX(240%); } }

/* floating scroll cue, pinned to the bottom-right of the viewport. JS fades it out
   (.is-gone) once the user starts scrolling so it never sits over the content. */
.scroll-cue {
  position: fixed; right: 24px; bottom: 24px; z-index: 55;
  display: inline-flex; flex-direction: column; align-items: center; gap: 7px; pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.scroll-cue.is-gone { opacity: 0; transform: translateY(10px); pointer-events: none; }
.scroll-cue .mouse {
  width: 24px; height: 37px; border: 2px solid rgba(79,209,197,.7); border-radius: 13px; position: relative;
  background: rgba(6,7,11,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 18px rgba(79,209,197,.3);
}
.scroll-cue .mouse::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; border-radius: 2px;
  background: var(--cyan); box-shadow: 0 0 8px var(--cyan);
  transform: translateX(-50%); animation: wheel 1.8s ease-in-out infinite;
}
/* a little chevron under the mouse so it reads as "scroll down" */
.scroll-cue::after {
  content: ""; width: 9px; height: 9px; border-right: 2px solid rgba(79,209,197,.7);
  border-bottom: 2px solid rgba(79,209,197,.7); transform: rotate(45deg);
  animation: cueChev 1.8s ease-in-out infinite;
}
@keyframes wheel { 0%{ opacity: 0; transform: translate(-50%, -3px); } 30%{ opacity: 1; } 70%{ opacity: 1; } 100%{ opacity: 0; transform: translate(-50%, 9px); } }
@keyframes cueChev { 0%,100%{ opacity: .35; transform: rotate(45deg) translateY(-1px); } 50%{ opacity: 1; transform: rotate(45deg) translateY(2px); } }

/* ============================================================= *
 *  SCROLL-MORPH SHOWCASE — the centerpiece                      *
 *  #showcase is a tall scroll track; .showcase-sticky pins a    *
 *  stylized player mock that morphs through the 4 layout modes  *
 *  as JS drives .morph[data-step] from scroll progress.         *
 * ============================================================= */
/* tall scroll track: the sticky child pins for the extra height, giving the
   morph ~80vh of scroll travel per layout step. Neutralised under reduced motion. */
#showcase { position: relative; height: 560vh; }
.showcase-sticky {
  --flow: 0;
  position: sticky; top: 64px; height: calc(100vh - 64px); height: calc(100svh - 64px);
  display: grid; grid-template-rows: auto 1fr auto; align-items: center;
  padding: 18px 0 28px; overflow: hidden;
}
.showcase-head { text-align: center; padding-top: 8px; }
.showcase-head .kicker { color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.showcase-head h2 { font-size: clamp(24px, 4vw, 40px); margin-top: 8px; }
/* the permanence line under the title — rises in with the source climax */
.morph-sub {
  margin: 10px auto 0; max-width: 52ch;
  font-size: clamp(13px, 1.6vw, 16px); color: var(--muted); line-height: 1.5;
  opacity: 0; transform: translateY(6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.morph-sub b { color: var(--fg); font-weight: 650; }
.showcase-sticky.sourcing .morph-sub { opacity: 1; transform: none; }

/* the mock player */
.morph-wrap { position: relative; display: grid; place-items: center; min-height: 0; }
.morph { transition: transform .7s var(--ease); }
.morph {
  --pip: 0;                 /* 0 = paned, 1 = PiP overlay (driven per step) */
  width: min(92vw, 880px); aspect-ratio: 16 / 9; position: relative;
  border-radius: 16px; padding: 12px;
  background: linear-gradient(160deg, rgba(23,27,35,.92), rgba(10,12,17,.92));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.02) inset;
}
/* glow ring that hue-shifts with the active step */
.morph::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: 17px; z-index: -1;
  background: var(--neon); opacity: .5; filter: blur(14px);
  transition: opacity .5s var(--ease);
}
.morph-stage {
  position: relative; height: calc(100% - 40px);
}
/* Panes are absolutely positioned and driven by left/width/top/height so every
   layout mode — including the lift into Picture-in-picture — is a continuous,
   transitionable morph (no display:flex→block jump between video-focus and PiP). */
.morph-pane {
  position: absolute; top: 0; height: 100%; min-width: 0;
  border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: #000;
  transition: left .7s var(--ease), width .7s var(--ease), top .7s var(--ease),
              height .7s var(--ease), border-radius .6s var(--ease),
              box-shadow .6s var(--ease), opacity .5s var(--ease);
}
.morph-pane .tag {
  position: absolute; top: 8px; left: 9px; z-index: 4; font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  background: rgba(0,0,0,.55); padding: 3px 8px; border-radius: 6px; backdrop-filter: blur(4px);
}

/* slides pane: a clean stylized deck with cross-fading "slides" */
.morph-slides { background: radial-gradient(120% 120% at 30% 0%, #131822, #0a0d12); }
.deck { position: absolute; inset: 0; display: grid; place-items: center; }
.deck-slide {
  position: absolute; inset: 12% 14%; display: flex; flex-direction: column; justify-content: center; gap: 8px;
  opacity: 0; transition: opacity .8s var(--ease), transform .8s var(--ease); transform: scale(.98);
}
.deck-slide.on { opacity: 1; transform: scale(1); }
.deck-slide .h { height: 12px; width: 62%; border-radius: 5px; background: var(--neon); }
.deck-slide .l { height: 7px; border-radius: 4px; background: var(--panel-2); }
.deck-slide .l.a { width: 92%; } .deck-slide .l.b { width: 80%; } .deck-slide .l.c { width: 86%; } .deck-slide .l.d { width: 68%; }
.deck-slide .chips { display: flex; gap: 6px; margin-top: 6px; }
.deck-slide .chips i { width: 26px; height: 16px; border-radius: 4px; background: rgba(124,107,255,.25); border: 1px solid var(--line-2); }

/* video pane: soft glow + a play puck + a faux scanline */
.morph-video { background: radial-gradient(120% 90% at 50% 45%, #142029, #06080c); z-index: 2; }
.morph-video .play {
  position: absolute; inset: 0; margin: auto; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; color: #04121a; font-size: 22px;
  background: var(--neon); box-shadow: 0 0 32px rgba(124,107,255,.55);
  animation: puck 2.8s ease-in-out infinite;
}
@keyframes puck { 0%,100%{ transform: scale(1); } 50%{ transform: scale(1.07); } }
.morph-video .cc {
  position: absolute; left: 50%; bottom: 11%; transform: translateX(-50%);
  background: rgba(0,0,0,.66); color: #fff; font-size: 10px; padding: 3px 9px; border-radius: 6px; white-space: nowrap;
}
.morph-video .wave { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; opacity: .5;
  background: linear-gradient(0deg, rgba(79,209,197,.22), transparent); }

/* control bar */
.morph-bar { position: absolute; left: 12px; right: 12px; bottom: 12px; height: 28px; display: flex; align-items: center; gap: 9px; }
.morph-bar .g { color: var(--cyan); font-size: 12px; }
.morph-bar .track { flex: 1; height: 5px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.morph-bar .track::after { content: ""; display: block; height: 100%; width: 38%; background: var(--neon); animation: scrub 9s linear infinite; }
@keyframes scrub { from{ width: 4%; } to{ width: 100%; } }

/* ---- the four morph states, driven by data-step ----
   Each pane is placed by left/width (+ top/height for PiP). A ~2% centre gutter
   keeps the two panes apart; transitions animate all four edges so the modes flow
   into one another, and video-focus → PiP becomes a smooth lift, not a cut. */
/* 0 · split — equal panes */
.morph[data-step="0"] .morph-slides { left: 0;   width: 49%; }
.morph[data-step="0"] .morph-video  { left: 51%; width: 49%; }
/* 1 · slides-focus — big deck, slim video */
.morph[data-step="1"] .morph-slides { left: 0;   width: 72%; }
.morph[data-step="1"] .morph-video  { left: 74%; width: 26%; }
/* 2 · video-focus — slim deck, big video */
.morph[data-step="2"] .morph-slides { left: 0;   width: 26%; }
.morph[data-step="2"] .morph-video  { left: 28%; width: 72%; }
/* 3 · PiP — deck fills, the video lifts into a floating bottom-right corner */
.morph[data-step="3"] .morph-slides,
.morph[data-step="4"] .morph-slides { left: 0; width: 100%; }
.morph[data-step="3"] .morph-video,
.morph[data-step="4"] .morph-video {
  left: 63%; width: 35%; top: 58%; height: 39%; z-index: 6;
  box-shadow: 0 16px 44px rgba(0,0,0,.62); border-color: var(--line-2);
}
.morph[data-step="3"] .morph-video .play,
.morph[data-step="4"] .morph-video .play { width: 34px; height: 34px; font-size: 14px; }
.morph[data-step="3"] .morph-video .cc,
.morph[data-step="4"] .morph-video .cc { font-size: 8px; bottom: 8%; }

/* ---- the climax: source constellation streaming into the player ---- */
/* overlays the morph stage; ignites when JS adds .sourcing at the final phase.  */
.sources-field {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  opacity: 0; transition: opacity .35s var(--ease);
}
.showcase-sticky.sourcing .sources-field { opacity: calc(.5 + (.5 * var(--flow))); }
/* shrink the player hard so the sources have clear room to flow into it */
.showcase-sticky.sourcing .morph { transform: translateY(calc(-5vh * var(--flow))) scale(calc(1 - (.5 * var(--flow)))); }
/* fade the layout legend out of the way at the source climax */
.showcase-sticky.sourcing .morph-caps { opacity: calc(1 - (.8 * var(--flow))); transition: opacity .5s var(--ease); }

/* the streams: a faint base wire per source + one travelling light packet on top */
.sources-field .streams { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sources-field .streams path { fill: none; }
.sources-field .streams .wires path {
  stroke: url(#streamGrad); stroke-width: .55; stroke-linecap: round;
  opacity: calc(.05 + (.3 * var(--flow)));
}
/* dasharray "5 100" over pathLength=100 leaves a single short segment that the
   keyframe walks from the chip down to the player centre — one clean packet. */
.sources-field .streams .pulses path {
  /* a short bright streak = a clean comet of light gliding along the wire */
  stroke: url(#streamGrad); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 2.5 100; opacity: calc(.15 + (.85 * var(--flow)));
  filter: drop-shadow(0 0 calc(3px + (6px * var(--flow))) rgba(124,107,255,.9));
  animation: streamPulse calc(2.6s - (1s * var(--flow))) linear infinite;
}
.sources-field .streams .pulses path:nth-child(2){ animation-delay: -.55s; }
.sources-field .streams .pulses path:nth-child(3){ animation-delay: -1.05s; }
.sources-field .streams .pulses path:nth-child(4){ animation-delay: -1.5s; }
.sources-field .streams .pulses path:nth-child(5){ animation-delay: -1.95s; }
@keyframes streamPulse { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -105; } }

/* the source nodes — protocol cards: icon + title + a one-line explanation.
   The info STAYS readable through the whole climax (the light packets do the
   "flowing into the box"; the cards hold and explain themselves). */
.src-node {
  /* anchored at --x/--y so each wire emanates straight from its card; the player
     shrinks and the light packets do the "flowing into the box" (cards hold). */
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%) scale(calc(1 - (.04 * var(--flow))));
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 15px 9px 10px; border-radius: 14px;
  background: linear-gradient(150deg, rgba(22,27,36,.96), rgba(10,12,18,.96));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 14px 32px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.02) inset;
  opacity: 0; transition: opacity .45s var(--ease), transform .45s var(--ease);
}
.showcase-sticky.sourcing .src-node { opacity: 1; }
/* cards arrive with a small stagger so the constellation reads as it builds */
.src-node:nth-of-type(2) { transition-delay: .06s; }
.src-node:nth-of-type(3) { transition-delay: .12s; }
.src-node:nth-of-type(4) { transition-delay: .18s; }
.src-node:nth-of-type(5) { transition-delay: .24s; }
.src-node .orb {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; font-size: 17px; flex: none;
  background: radial-gradient(circle at 35% 30%, rgba(124,107,255,.4), rgba(10,12,17,.95));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 0 calc(10px + (18px * var(--flow))) rgba(124,107,255,.5);
}
.src-meta { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.src-meta b { font-size: 14px; font-weight: 700; letter-spacing: .01em; color: var(--fg); white-space: nowrap; }
/* the explanation stays readable through the whole climax — it's the info */
.src-meta i {
  font-style: normal; font-size: 11.5px; font-weight: 500; color: #aab4c3; white-space: nowrap;
  margin-top: 2px;
}

/* captions row beneath the mock — one lights up per step */
.morph-caps { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 0 16px; }
.morph-cap {
  font-size: 13px; color: var(--muted); padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,.015);
  display: flex; align-items: center; gap: 9px; transition: color .35s, border-color .35s, background .35s, transform .35s;
}
.morph-cap .ico { width: 18px; height: 14px; }
.morph-cap .ico rect { fill: currentColor; }
.morph-cap .ico .f { fill: var(--bg); }
.morph-cap.active { color: #04121a; border-color: transparent; background: var(--neon); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,107,255,.3); }
.morph-cap.active .ico .f { fill: rgba(0,0,0,.35); }

/* progress dots */
.morph-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.morph-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background .3s, transform .3s; }
.morph-dots i.on { background: var(--cyan); transform: scale(1.25); box-shadow: 0 0 10px var(--cyan); }

/* ============================================================= *
 *  GENERIC SECTIONS + REVEALS                                   *
 * ============================================================= */
section { position: relative; padding: clamp(72px, 12vh, 128px) 0; }
.section-head { max-width: 62ch; margin: 0 auto 48px; text-align: center; }
.section-head .kicker { color: var(--cyan); font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(28px, 4.4vw, 46px); margin-top: 10px; font-weight: 800; }
.section-head p { color: var(--muted); margin: 14px auto 0; font-size: clamp(15px, 1.8vw, 18px); max-width: 52ch; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

/* ---- KEPT ALIVE (persistence / roadmap teaser) ---- */
.alive { position: relative; }
.alive-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; max-width: 1000px; margin: 0 auto; }
.alive h2 { font-size: clamp(26px, 3.8vw, 40px); font-weight: 800; }
.alive p.lead { color: var(--muted); font-size: clamp(15px, 1.8vw, 18px); margin: 16px 0 26px; }
.alive .roadmap-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.alive .roadmap-pills .pill {
  font-size: 13px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--fg); background: rgba(255,255,255,.02); display: inline-flex; align-items: center; gap: 8px;
}
.alive .roadmap-pills .pill .t { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cyan); }
.alive .more { margin-top: 26px; }

/* an animated "signal kept alive" visual: nested rings pulsing outward */
.alive-visual { position: relative; aspect-ratio: 1; display: grid; place-items: center; }
.alive-visual .core {
  width: 64px; height: 64px; border-radius: 50%; background: var(--neon);
  box-shadow: 0 0 40px rgba(124,107,255,.6); display: grid; place-items: center; color: #04121a; font-size: 26px; z-index: 2;
}
.alive-visual .ring {
  position: absolute; border-radius: 50%; border: 1.5px solid rgba(124,107,255,.4);
  animation: ripple 4s ease-out infinite;
}
.alive-visual .ring:nth-child(2) { animation-delay: 1s; }
.alive-visual .ring:nth-child(3) { animation-delay: 2s; }
.alive-visual .ring:nth-child(4) { animation-delay: 3s; }
@keyframes ripple {
  0%   { width: 64px; height: 64px; opacity: .8; border-color: rgba(79,209,197,.6); }
  100% { width: min(420px, 80%); height: min(420px, 80%); opacity: 0; border-color: rgba(255,92,240,.1); }
}

/* ---- OPEN SOURCE / SELF-HOST ---- */
.os { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; max-width: 1000px; margin: 0 auto; }
.os h2 { font-size: clamp(26px, 3.8vw, 40px); font-weight: 800; }
.os p { color: var(--muted); }
.os .pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.os .pills a { padding: 10px 17px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font-size: 14px; transition: border-color .2s, color .2s; }
.os .pills a:hover { border-color: var(--cyan); color: var(--cyan); text-decoration: none; }
/* "host it anywhere": one static build → any host. A packet runs out each branch
   from your site to a target (GitHub Pages / IPFS / Arweave / your own box), which
   then glows on its own — same files, no lock-in. */
.fork-viz { position: relative; min-height: 300px; }
.fork-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fork-wires path { fill: none; }
.fork-wires .fwire path { stroke: url(#streamGrad); stroke-width: .5; opacity: .3; }
.fork-wires .fpulse path {
  stroke: url(#streamGrad); stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 2.5 100; filter: drop-shadow(0 0 5px rgba(124,107,255,.85));
  animation: forkPulse 2.8s linear infinite;
}
.fork-wires .fpulse path:nth-child(2) { animation-delay: -.7s; }
.fork-wires .fpulse path:nth-child(3) { animation-delay: -1.4s; }
.fork-wires .fpulse path:nth-child(4) { animation-delay: -2.1s; }
@keyframes forkPulse { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100.4; } }

/* your built site (the source of every deploy) */
.fork-viz .origin {
  position: absolute; left: 11%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 3;
}
.fork-viz .origin .g {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  color: #04121a; background: var(--neon);
  box-shadow: 0 0 40px rgba(124,107,255,.6); animation: puck 2.8s ease-in-out infinite;
}
.fork-viz .origin .g svg { width: 30px; height: 30px; fill: none; stroke: #04121a; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fork-viz .origin b, .fork-viz .fork b {
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
/* the hosting targets — each lights up on its own */
.fork-viz .fork {
  position: absolute; left: var(--fx); top: var(--fy); transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 7px; z-index: 2;
}
.fork-viz .fork .g {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; font-size: 19px;
  background: radial-gradient(circle at 35% 30%, rgba(79,209,197,.32), rgba(10,12,17,.95));
  border: 1px solid rgba(255,255,255,.16);
  animation: forkAlive 3.4s ease-in-out infinite;
}
.fork-viz .fork:nth-of-type(3) .g { animation-delay: -.9s; }
.fork-viz .fork:nth-of-type(4) .g { animation-delay: -1.8s; }
.fork-viz .fork:nth-of-type(5) .g { animation-delay: -2.7s; }
/* each copy keeps glowing on its own — outlives the origin */
@keyframes forkAlive {
  0%,100% { box-shadow: 0 0 16px rgba(79,209,197,.3); transform: translateY(0); }
  50%     { box-shadow: 0 0 30px rgba(124,107,255,.55); transform: translateY(-3px); }
}

/* ---- FINAL CTA BAND ---- */
.cta-band { text-align: center; }
.cta-band .halo {
  max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 72px) 28px; border-radius: 26px;
  background: radial-gradient(120% 140% at 50% 0%, rgba(124,107,255,.16), transparent 70%);
  border: 1px solid var(--line); position: relative; overflow: hidden;
}
.cta-band h2 { font-size: clamp(30px, 5vw, 54px); font-weight: 800; }
.cta-band p { color: var(--muted); max-width: 44ch; margin: 14px auto 0; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }

/* ============================================================= *
 *  DEMO PICKER (dialog)                                          *
 * ============================================================= */
.demo-picker {
  border: none; padding: 0; background: transparent; color: var(--fg);
  max-width: 560px; width: calc(100vw - 32px); border-radius: 20px;
}
.demo-picker::backdrop { background: rgba(4,5,8,.72); backdrop-filter: blur(6px); }
.demo-picker[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.demo-picker .panel {
  background: linear-gradient(160deg, rgba(20,24,31,.98), rgba(9,11,16,.98));
  border: 1px solid var(--line-2); border-radius: 20px; padding: 22px;
  box-shadow: 0 40px 120px rgba(0,0,0,.7);
}
.demo-picker .ph { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.demo-picker .ph h3 { font-size: 19px; margin: 0; }
.demo-picker .ph .x { margin-left: auto; background: transparent; border: 1px solid var(--line); color: var(--muted); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 16px; }
.demo-picker .ph .x:hover { color: #fff; border-color: var(--line-2); }
.demo-picker .psub { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.demo-list { display: grid; gap: 10px; }
.demo-card {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.02); cursor: pointer; color: var(--fg);
  transition: border-color .2s, transform .2s, background .2s;
}
.demo-card:hover:not([disabled]) { border-color: var(--cyan); transform: translateY(-2px); text-decoration: none; }
.demo-card[disabled] { opacity: .5; cursor: default; }
.demo-card .thumb {
  width: 80px; height: 50px; flex: none; border-radius: 9px; overflow: hidden;
  background: var(--neon); display: grid; place-items: center; color: #04121a; font-size: 20px;
  border: 1px solid var(--line-2);
}
.demo-card .meta { min-width: 0; }
.demo-card .meta h4 { margin: 0 0 3px; font-size: 15px; }
.demo-card .meta p { margin: 0; font-size: 13px; color: var(--muted); }
.demo-card .meta .badges { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.demo-card .meta .badges span { font-size: 10px; letter-spacing: .04em; text-transform: uppercase; color: var(--cyan); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; }
.demo-card .go { margin-left: auto; color: var(--muted); font-size: 18px; flex: none; }
.demo-card .soon { margin-left: auto; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; flex: none; }

/* ============================================================= *
 *  FOOTER                                                        *
 * ============================================================= */
footer.site { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; position: relative; }
footer.site .cols { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }
footer.site .brand { color: var(--fg); }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--cyan); }
footer.site .spacer { flex: 1; }

/* ============================================================= *
 *  RESPONSIVE                                                   *
 * ============================================================= */
@media (max-width: 900px) {
  .alive-grid, .os { grid-template-columns: 1fr; gap: 36px; }
  .alive-visual { max-width: 320px; margin: 0 auto; }
  .fork-viz { min-height: 200px; }
}
@media (max-width: 560px) {
  .hero { padding: 54px 0 40px; }
  .morph-caps { gap: 7px; }
  .morph-cap { font-size: 12px; padding: 7px 11px; }
  /* the value beats stack into a clean column on phones (no awkward wrapping) */
  .beats { flex-direction: column; align-items: stretch; gap: 8px; }
  .beats .flow { display: none; }
  .beat { width: 100%; padding: 10px 14px 10px 11px; }
  .scroll-cue { right: 14px; bottom: 14px; }
  /* tighter constellation so it fits the phone stage; player shrinks hard */
  .showcase-sticky.sourcing .morph { transform: translateY(calc(-9vh * var(--flow))) scale(calc(1 - (.46 * var(--flow)))); }
  .src-node { gap: 7px; padding: 5px 9px 5px 6px; }
  .src-node .orb { width: 26px; height: 26px; font-size: 12px; border-radius: 8px; }
  .src-meta b { font-size: 10.5px; }
  .src-meta i { display: none; }   /* no room for the explanation on a phone */
  /* tighten the arc so the five cards don't clip the phone edges */
  .src-node[data-src="youtube"] { --x: 13% !important; --dx: 30% !important; }
  .src-node[data-src="mp4"]     { --x: 17% !important; --dx: 33% !important; }
  .src-node[data-src="ipfs"]    { --x: 50% !important; --dx: 50% !important; }
  .src-node[data-src="torrent"] { --x: 83% !important; --dx: 67% !important; }
  .src-node[data-src="arweave"] { --x: 87% !important; --dx: 70% !important; }
  /* shorter pinned track on phones — less scrolling through all five phases */
  #showcase { height: 440vh; }
}

/* ============================================================= *
 *  REDUCED MOTION — graceful static fallback                    *
 *  Kill ambience + morph transitions; reveal everything; pin    *
 *  the morph mock to its split state (JS also no-ops the morph).*
 * ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .aurora, .scroll-cue, .morph-bar .track::after { display: none; }
  .reveal { opacity: 1; transform: none; }
  .deck-slide:first-of-type { opacity: 1; transform: none; }
  /* let the pinned showcase release into normal flow so nothing is stuck */
  #showcase { height: auto; }
  .showcase-sticky { position: relative; height: auto; min-height: auto; padding: 40px 0; }
  .morph-dots { display: none; }
  .morph { transform: none !important; }
  /* the source constellation never gets its .sourcing trigger here — show it statically */
  .sources-field { position: relative; opacity: 1; margin-top: 40px; min-height: 240px; }
  .sources-field .streams { display: none; }
  .src-node { opacity: 1 !important; transform: translate(-50%, -50%) !important; }
}
