/* ============================================================================
   Software-compositing rescue.

   When Chrome runs with hardware acceleration OFF the compositor works on the
   CPU. Profiling showed an idle main thread but solid-red frames and a
   continuous "Animations" track: the cost is compositing, not JavaScript.

   Three things dominate that budget here:

     1. backdrop-filter — re-samples everything painted behind the element on
        every frame. 42 uses on the home page, 31 on the guide.
     2. filter: blur()  — the ambient background orbs are up to 760px wide with
        a 120px blur radius. Those layers are already radial-gradients, so the
        blur is visually redundant: dropping it leaves the same soft glow at a
        fraction of the cost.
     3. animation: ... infinite on those same large layers, which keeps 1 and 2
        recomputing frame after frame instead of settling.

   We drop all three. Panel backgrounds are already semi-opaque, so the
   dark-glass look survives; what is lost is the blur *behind* glass panels and
   the slow ambient drift. Spinners and progress bars are deliberately kept —
   they communicate state, they are not decoration.

   Loaded by the static pages in public/ and imported by styles/globals.css so
   the Next.js routes (/account, /checkout) get the same treatment.
   ========================================================================= */

/* 1 ── backdrop-filter, everywhere. Universal so it catches class rules,
        inline styles and pseudo-elements alike. */
*,
*::before,
*::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 2 ── blur() on the fixed, full-viewport decorative layers. Each of these
        already paints a radial-gradient, so removing the blur is close to
        invisible. Scoped to the ambient layers so genuine blur effects inside
        small mockups (locked-content previews) still work. */
.bg,
.bg::before,
.bg::after,
.bg span,
.grain,
.hscAurora,
.hscAurora::before,
.hscAurora::after,
.hero-orb,
[class*="-orb"] {
  filter: none !important;
  -webkit-filter: none !important;
  animation: none !important;
}

/* 3 ── give the remaining fixed full-screen layers their own compositing layer
        so they are rasterised once instead of on every scroll tick. */
.bg,
.grain,
.hscAurora {
  will-change: transform;
  transform: translateZ(0);
}

/* 4 ── decorative infinite loops that repaint rather than composite.
        box-shadow and background-position cannot be composited: they force a
        repaint every frame. Static end-state instead. */
.hscNavOn,
.hscStat::after,
.hscWallet::before,
.hsc-glow::after,
.hscGlow::after,
.btn-login::after,
.nav-account .dot,
.pv-float {
  animation: none !important;
}

/* 5 ── honour the OS setting. Anything still moving collapses to its final
        frame; iteration-count 1 stops loops without hiding the end state. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
