/* PartnerPilot AI — animated dark backgrounds (hero stars + grid floor, chapter 1 dust, chapter 2 data rain).
   Everything animates with transform only, and pauses while the section is off screen. */

.bga{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}

/* tiled star / dust layers: the tile repeats every --t px, so shifting by one tile loops seamlessly */
.bga .ly{position:absolute;left:0;right:0;top:0;bottom:calc(var(--t,600px)*-1);background-repeat:repeat;opacity:var(--o,1);
  animation:bgrise var(--d,90s) linear infinite,bgtw var(--w,6s) ease-in-out infinite alternate;animation-play-state:paused}
.bga.on .ly{animation-play-state:running}
@keyframes bgrise{to{transform:translateY(calc(var(--t,600px)*-1))}}
@keyframes bgtw{from{opacity:calc(var(--o,1)*.5)}to{opacity:var(--o,1)}}

/* hero: perspective grid floor sliding toward the viewer */
.bga .floor{position:absolute;left:-10%;right:-10%;bottom:0;height:48%;perspective:520px;overflow:hidden;
  -webkit-mask-image:linear-gradient(180deg,transparent 0%,#000 60%);mask-image:linear-gradient(180deg,transparent 0%,#000 60%)}
.bga .plane{position:absolute;left:-50%;right:-50%;top:0;height:220%;transform-origin:50% 0;transform:rotateX(64deg);
  background:linear-gradient(rgba(120,145,255,.3) 1px,transparent 1px) 0 0/64px 64px,linear-gradient(90deg,rgba(120,145,255,.3) 1px,transparent 1px) 0 0/64px 64px;
  animation:bgfloor 2.6s linear infinite;animation-play-state:paused}
.bga.on .plane{animation-play-state:running}
@keyframes bgfloor{to{transform:rotateX(64deg) translateY(64px)}}

/* chapter 2: falling streaks of light */
.bga .st{position:absolute;top:-200px;width:var(--w,2px);height:var(--l,140px);border-radius:2px;opacity:var(--a,.6);
  background:linear-gradient(180deg,transparent,rgba(34,211,238,.9));
  animation:bgfall var(--d,7s) linear infinite;animation-delay:var(--dl,0s);animation-play-state:paused}
.bga .st:nth-child(3n){background:linear-gradient(180deg,transparent,rgba(255,63,164,.9))}
.bga .st:nth-child(5n){background:linear-gradient(180deg,transparent,rgba(150,165,255,.9))}
.bga.on .st{animation-play-state:running}
@keyframes bgfall{to{transform:translateY(calc(var(--h,900px) + 400px))}}

/* the hero's old gradient blobs and grid give way to the animated background */
.hero .aurora,.hero .grid-bg{display:none}
.hv-glow{opacity:.55}

@media(prefers-reduced-motion:reduce){.bga *{animation:none!important}}