/* ── HERO CLOUDS — drifting cloud background for the hero ────────────────
   Reproduces the `#explore-3d` ("Engineered in 3D") background treatment and
   moves it onto the hero.

   Loaded ONLY by hero-clouds-sample.html. Nothing here is linked from
   index.html, so the live homepage is unaffected until this is approved.

   Every rule is scoped under .hero-clouds (a class added to <body> in the
   sample) so even if this file were linked elsewhere by mistake it would be
   inert.
   ────────────────────────────────────────────────────────────────────────── */

/* ── Base treatment ───────────────────────────────────────────────────────
   Copied verbatim from .explore-3d in the 3D build so the hero reads as the
   same environment: two brand radial washes over a near-black base. */
.hero-clouds .test-hero-bg {
  background:
    radial-gradient(120% 90% at 78% 42%, rgba(239, 35, 60, 0.14) 0%, rgba(239, 35, 60, 0) 60%),
    radial-gradient(90% 80% at 12% 30%, rgba(60, 200, 255, 0.10) 0%, rgba(60, 200, 255, 0) 62%),
    #0d1015;
}

/* ── Cloud layer ─────────────────────────────────────────────────────────
   Sits at the very back of .test-hero-bg, above the gradients but below the
   grid/blueprint/vignette layers the hero keeps. */
.hero-clouds .hero-cloud-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;

  /* Poster is painted by CSS, so the hero still shows clouds when autoplay is
     refused, when JS is off, and before the first video frame decodes. The
     <video> elements simply sit on top of it once they start. */
  background-image: url('../assets/video/ambient-poster.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.34;   /* matches .explore-3d's ambient video opacity */
}

.hero-clouds .hero-cloud-layer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Crossfade is driven by js/hero-clouds.js writing inline opacity.
     Both start at 0 so a decode hiccup shows the poster, never a black box. */
  opacity: 0;
  will-change: opacity;
}

/* The layers the hero keeps must stay above the clouds. The originals have no
   explicit z-index, which would let them fall behind the cloud layer. */
.hero-clouds .test-bg-glass-shine,
.hero-clouds .test-bg-vignette {
  z-index: 1;
}

/* No grid, no circles, no floating tech labels.
   `.test-bg-grid` and the whole `.test-bg-blueprint` layer are deleted outright
   in the sample markup, so nothing needs suppressing here — the blueprint
   carried the 46px grid, the two ring pseudo-elements AND the four tech
   labels, and all three were removed on client request.

   All of this is scoped to .hero-clouds and done in the sample's own markup,
   so css/hero-test.css is untouched and index.html keeps its original hero. */

/* ── No orbit ring, no floor portal ──────────────────────────────────────
   Client asked for the circle behind the product and the lit disc beneath it
   to go, so the unit reads as floating in the clouds rather than sitting in a
   sci-fi rig.

     .test-product-orbit    — 560px ring with crosshair lines behind the unit
     .test-product-platform — 153px ellipse under it, cyan glow + lit top edge

   Kept deliberately: .test-product-glow (a soft radial light, not a circle —
   it is what separates the product from the dark background) and
   .test-orbit-spinner with its two travelling nodes.

   js/hero-test-gsap.js still tweens both hidden elements during the hero
   entrance and idle loop. That is harmless — it guards every target with an
   `if (els.x)` and animating a display:none element has no visual effect — so
   the entrance choreography needs no edit. */
.hero-clouds .test-product-orbit,
.hero-clouds .test-product-platform {
  display: none;
}

/* ── Reduced motion ──────────────────────────────────────────────────────
   No playback, no crossfade — the CSS poster alone. js/hero-clouds.js bails
   out before touching the videos, so they stay at opacity 0. */
@media (prefers-reduced-motion: reduce) {
  .hero-clouds .hero-cloud-layer video {
    display: none;
  }
}

/* There is only one video now — the clip loops on its own, so there is no
   crossfade pair to hide on narrow screens and nothing extra to decode. */
