/* scene.css: the live 3D card stage, the scroll camera, the slime progress bar and the heat haze on the
   neon sign. Everything here falls back to the flat page when the script or WebGL is not there. */

/* ---------- live 3D card (hero3d.js) ---------- */
.card-art{position:relative}
.stage3d{position:absolute;left:-35%;width:170%;aspect-ratio:1;top:0;margin-top:-35%;pointer-events:none;z-index:1}
.stage3d canvas{display:block;width:100%;height:100%;opacity:0;transition:opacity .9s ease;-webkit-mask:radial-gradient(closest-side,#000 78%,transparent);mask:radial-gradient(closest-side,#000 78%,transparent)}
.stage3d.live3d canvas{opacity:1}
.stage3d.live3d~.holo{visibility:hidden}
.card-art .hud,.card-art .reel{z-index:3}
.card-art .reel-cap{position:relative;z-index:3}

/* ---------- scroll camera (camera.js sets --fly and --p) ---------- */
.stage-bg{scale:calc(1 + var(--fly,0) * .22)}
.stage-shade{opacity:calc(1 + var(--fly,0) * .6)}
.neon,.logo-h{translate:0 calc(var(--fly,0) * 26vh);scale:calc(1 + var(--fly,0) * .4);opacity:calc(1 - var(--fly,0) * 1.4)}
main{perspective:1400px;perspective-origin:50% 0}
[data-shot]{transform-origin:50% 0;translate:0 calc((1 - var(--p,1)) * 140px);scale:calc(.84 + var(--p,1) * .16);rotate:x calc((1 - var(--p,1)) * 32deg)}

/* ---------- slime progress bar ---------- */
.show .progress{overflow:visible;height:18px}
.show #bar{background:none;box-shadow:none;filter:drop-shadow(0 0 7px rgba(78,255,90,.75))}
.show #bar::after{z-index:2;border-radius:99px}
.slime{position:absolute;left:-4px;right:-4px;top:-8px;height:52px;filter:url(#goo)}
.slime::before{content:"";position:absolute;left:4px;right:4px;top:8px;height:18px;border-radius:99px;background:linear-gradient(90deg,#1fb52c,var(--accent) 55%,var(--brand-lime,#b4ff22))}
.slime i{position:absolute;top:10px;width:12px;height:12px;border-radius:50%;background:var(--accent);animation:drip 3s cubic-bezier(.6,0,.8,.4) infinite}
.slime i:nth-child(1){left:18%;animation-delay:-.4s}
.slime i:nth-child(2){left:52%;animation-delay:-1.6s;width:10px;height:10px}
.slime i:nth-child(3){right:8%;animation-delay:-2.4s;background:#c8ff2a}
.slime b{position:absolute;top:2px;width:16px;height:16px;border-radius:50%;background:#7dff7a;animation:blob 2.4s ease-in-out infinite}
.slime b:nth-of-type(1){left:30%}.slime b:nth-of-type(2){left:70%;animation-delay:-1.1s}.slime b:nth-of-type(3){right:2%;animation-delay:-.5s}
.show #bar .bub{position:absolute;z-index:3;bottom:3px;width:5px;height:5px;border-radius:50%;border:1px solid rgba(255,255,255,.7);animation:bub 2.2s ease-in infinite}
.show #bar .bub:nth-of-type(1){left:22%}.show #bar .bub:nth-of-type(2){left:61%;animation-delay:-.8s}.show #bar .bub:nth-of-type(3){left:84%;animation-delay:-1.5s}
@keyframes drip{0%,30%{transform:translateY(0) scale(1,1)}62%{transform:translateY(9px) scale(.8,1.5)}100%{transform:translateY(40px) scale(.7,1);opacity:0}}
@keyframes blob{0%,100%{transform:translateY(6px) scale(.6)}50%{transform:translateY(0) scale(1)}}
@keyframes bub{0%{transform:translateY(0);opacity:0}20%{opacity:1}100%{transform:translateY(-12px);opacity:0}}
.fx-defs{position:absolute;width:0;height:0;overflow:hidden}

/* ---------- heat haze over the neon ---------- */
.neon-tubes{filter:url(#haze)}

@media (prefers-reduced-motion: reduce){
  .neon-tubes,.slime{filter:none}
  .slime i,.slime b,.show #bar .bub{display:none}
}
