/* ──────────────────────────────────────────────────────────────
   5D — Animated background diffuser
   --------------------------------------------------------------
   The morphing-loop iframes show coloured orbs directly, which
   reads as "hard light blobs floating" without atmosphere.
   This sheet blurs the iframe so the orbs become soft glows,
   slightly desaturates for cohesion, and layers a vignette /
   colour tint over the top for depth.

   Scale 1.12 compensates for the blurred edges so they don't
   leak into the page.
   ────────────────────────────────────────────────────────── */

.hero-bg iframe,
.page-bg iframe {
  filter: blur(22px) saturate(1.08) brightness(1.04);
  transform: scale(1.14);
  transform-origin: center center;
  will-change: filter;
}

/* Atmospheric tint + vignette layer.
   Applied via ::before so it never clashes with existing
   ::after vignettes the pages already declare. */
.hero-bg::before,
.page-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 20% 30%, rgba(180, 90, 130, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 65% at 80% 70%, rgba(80, 140, 180, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 90% 100% at 50% 50%, transparent 30%, rgba(10, 10, 12, 0.35) 80%, rgba(8, 8, 10, 0.55) 100%);
}

/* Ensure overlays sit above the blurred iframe */
.hero-bg iframe,
.page-bg iframe {
  position: relative;
  z-index: 0;
}

/* Slightly lighter touch on mobile (smaller surface, perf) */
@media (max-width: 720px) {
  .hero-bg iframe,
  .page-bg iframe {
    filter: blur(16px) saturate(1.05) brightness(1.04);
    transform: scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg iframe,
  .page-bg iframe {
    filter: blur(24px) saturate(1.05);
  }
}
