/* =========================================================
   Northern Lights 3D — performance overrides
   Upload this file to the same folder as styles.css
   and link it AFTER styles.css in index.html.

   It keeps the aurora, parallax, glass panels, and menu
   animations, but reduces the most expensive GPU effects.
   ========================================================= */

/* Contain decorative background painting */
.site-background {
  contain: paint;
}

/* Slightly cheaper aurora while preserving the glow */
.aurora-ribbon {
  filter: blur(12px);
  contain: paint;
}

/* Keep glass effect on the main header and hero only */
.site-header,
.glass-panel {
  backdrop-filter: blur(10px) saturate(125%);
  -webkit-backdrop-filter: blur(10px) saturate(125%);
}

/* Remove live blur from smaller repeated cards */
.feature-card,
.material-card,
.process-step,
.quick-points span {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Replace the expensive full-page menu blur with opacity + scale */
body.menu-open .parallax-deck {
  filter: none !important;
  opacity: 0.94;
  transform: scale(0.992);
}

/* Pause decorative animations when the tab is not visible */
@media (prefers-reduced-motion: no-preference) {
  body:not(.menu-open) .background-gradient,
  body:not(.menu-open) .background-dots,
  body:not(.menu-open) .aurora-ribbon,
  body:not(.menu-open) .shooting-star {
    animation-play-state: running;
  }
}

/* Mobile and reduced-motion: keep the visual identity,
   but stop continuous expensive background animation. */
@media (max-width: 820px), (prefers-reduced-motion: reduce) {
  .background-gradient,
  .background-dots,
  .aurora-ribbon,
  .shooting-star {
    animation: none !important;
    filter: none !important;
  }

  .orb-layer {
    display: none !important;
  }

  .site-header,
  .glass-panel {
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
  }
}

/* Prevent unnecessary compositing on low-power devices */
@media (max-width: 820px) {
  .parallax-slide,
  .slide-content {
    will-change: auto;
  }
}
