/* Havio spark stage (hero): a dark stage where the products orbit in 3D and lightning strikes.
   Without JavaScript or with reduced motion, the stage shows the single hero photo instead. */

.spark-stage{position:relative;isolation:isolate;aspect-ratio:1/1;background:radial-gradient(120% 90% at 50% 0%,#1d3a57 0%,#0c1a2a 54%,#050b13 100%);touch-action:pan-y;-webkit-user-select:none;user-select:none}
/* The banner has no text beside it, so on tablets and desktops the stage is a wide banner across the page.
   stage.js caps the product cards by the stage height (--card-max) so they fit the wide stage. */
@media (min-width:768px){
 .spark-stage{aspect-ratio:2.15/1}
 /* Without the animation (reduced motion), the lamp photo sits whole in the middle of the dark stage */
 .spark-stage:not(.is-live){display:flex;align-items:center;justify-content:center}
 .spark-stage:not(.is-live) .stage-fallback{width:auto;height:84%;aspect-ratio:1/1;border-radius:18px;overflow:hidden;box-shadow:0 34px 60px -24px rgba(0,0,0,.8),0 0 0 1px rgba(255,255,255,.1)}
}
.spark-stage.is-live{cursor:grab}
.spark-stage.is-live:active{cursor:grabbing}
.stage-fallback{display:block;width:100%;height:100%}
.stage-fallback img{width:100%;height:100%;object-fit:cover;display:block}
.spark-stage.is-live .stage-fallback{display:none}
.spark-stage:not(.is-live) .stage-light,.spark-stage:not(.is-live) .stage-floor,.spark-stage:not(.is-live) .stage-ring,.spark-stage:not(.is-live) .stage-sparks{display:none}

/* Light cone from above and a glowing floor grid in perspective */
.stage-light{position:absolute;inset:0;z-index:0;pointer-events:none;background:radial-gradient(55% 48% at 50% 0%,rgba(206,230,248,.30),transparent 72%),radial-gradient(40% 18% at 50% 86%,rgba(150,200,255,.18),transparent 70%)}
.stage-floor{position:absolute;left:-60%;right:-60%;bottom:-4%;height:52%;z-index:0;pointer-events:none;
  background-image:linear-gradient(rgba(150,200,255,.26) 1px,transparent 1px),linear-gradient(90deg,rgba(150,200,255,.26) 1px,transparent 1px);
  background-size:58px 58px;transform:perspective(420px) rotateX(72deg);transform-origin:50% 100%;
  -webkit-mask-image:linear-gradient(to top,#000 8%,transparent 88%);mask-image:linear-gradient(to top,#000 8%,transparent 88%)}

/* The ring of products */
.stage-ring{position:absolute;inset:0;z-index:1;perspective:1100px}
.stage-card{position:absolute;left:50%;top:45%;width:min(46%,var(--card-max,100%));aspect-ratio:1/1;border-radius:18px;overflow:hidden;outline-offset:6px;
  box-shadow:0 34px 60px -24px rgba(0,0,0,.8),0 0 0 1px rgba(255,255,255,.1),0 0 40px -6px rgba(140,200,255,.25);
  -webkit-box-reflect:below 12px linear-gradient(transparent 68%,rgba(255,255,255,.2));will-change:transform}
.stage-card img{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.stage-card:focus-visible{outline:2px solid #cee6f8}

/* Lightning canvas and the flash on a big strike */
.stage-sparks{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}
.stage-flash{position:absolute;inset:0;z-index:3;pointer-events:none;opacity:0;background:radial-gradient(circle at var(--fx,50%) var(--fy,20%),rgba(225,238,255,.6),rgba(160,140,255,.18) 35%,transparent 65%)}
.stage-flash.on{animation:stage-flash .38s ease-out}
@keyframes stage-flash{0%{opacity:0}12%{opacity:1}100%{opacity:0}}

/* Mouse sparks over the whole hero */
.hero{position:relative}
.hero-sparks{position:absolute;inset:0;width:100%;height:100%;z-index:5;pointer-events:none}

/* Electric streak through "UPGRADE" and a flickering bolt by the eyebrow */
.zap{background:linear-gradient(100deg,currentColor 0 40%,#7b5cff 46%,#22c3ff 50%,#7cc8ff 54%,currentColor 60% 100%);background-size:260% 100%;background-position:100% 0;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.hero-copy .eyebrow{display:flex;align-items:center;gap:8px}
.bolt{width:16px;height:16px;flex-shrink:0;fill:url(#bolt-grad);stroke:none;filter:drop-shadow(0 0 6px rgba(108,75,255,.45))}

/* More 3D: product cards unfold, headings flip up, the feature photo tilts with the mouse */
.feature-visual{transform:perspective(1100px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg));transition:transform .8s cubic-bezier(.2,.8,.2,1)}
.feature-visual.is-tilting{transition-duration:.15s}

@media (prefers-reduced-motion:no-preference){
 .stage-floor{animation:floor-run 2.6s linear infinite}
 .zap{animation:zap 5.5s ease-in-out 1.6s infinite}
 .bolt{animation:bolt-flicker 4s steps(1) infinite}
 .motion-ready .product-card[data-reveal]{transform:perspective(1000px) rotateX(16deg) translateY(40px);transform-origin:50% 100%}
 .motion-ready .product-card[data-reveal].is-visible{transform:none}
 .motion-ready [data-reveal] h2{transform:perspective(700px) rotateX(58deg);transform-origin:50% 100%;opacity:.15;transition:transform 1s cubic-bezier(.2,.8,.2,1) .12s,opacity .8s ease .12s}
 .motion-ready [data-reveal].is-visible h2{transform:none;opacity:1}
}
@keyframes floor-run{to{background-position:0 58px,0 0}}
@keyframes zap{0%,50%{background-position:100% 0}78%,100%{background-position:0 0}}
@keyframes bolt-flicker{0%,100%{opacity:1}6%{opacity:.25}8%{opacity:1}52%{opacity:1}54%{opacity:.35}55%{opacity:1}}

@media (max-width:767.98px){
 .stage-card{width:min(50%,var(--card-max,100%));border-radius:14px}
 .stage-floor{background-size:44px 44px}
 .bolt{width:13px;height:13px}
}
