/*
 * CPU-friendly fallback for browsers without usable graphics acceleration.
 * The profile is applied synchronously by page-lifecycle.js before first paint.
 */

html[data-cx-performance="lite"] {
    scroll-behavior: auto !important;
    cursor: auto !important;
}

html[data-cx-performance="lite"] body.cx-page {
    cursor: auto !important;
}

html[data-cx-performance="lite"] :where(
    a[href],
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    label[for],
    select,
    summary,
    [role="button"]
) {
    cursor: pointer !important;
}

html[data-cx-performance="lite"] body.cx-page::before,
html[data-cx-performance="lite"] .cx-spatial-pointer-light,
html[data-cx-performance="lite"] .cx-cinematic-wipe,
html[data-cx-performance="lite"] .cx-board-scan,
html[data-cx-performance="lite"] .cx-board-reflection,
html[data-cx-performance="lite"] .cx-board-orbit,
html[data-cx-performance="lite"] .cx-gallery-stage-light::after,
html[data-cx-performance="lite"] #stars-canvas,
html[data-cx-performance="lite"] #cx-fog-canvas,
html[data-cx-performance="lite"] #cx-circuit-canvas,
html[data-cx-performance="lite"] .cx-media-backdrop {
    display: none !important;
}

/* Backdrop blur forces large repaints in software compositing. */
html[data-cx-performance="lite"] body.cx-page *,
html[data-cx-performance="lite"] body.cx-page *::before,
html[data-cx-performance="lite"] body.cx-page *::after {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    mix-blend-mode: normal !important;
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
}

html[data-cx-performance="lite"] .cx-page--experience #cx-experience-canvas {
    opacity: 0.2;
}

html[data-cx-performance="lite"] .cx-page--experience .cx-stage-glow,
html[data-cx-performance="lite"] .cx-page--gallery .cx-gallery-spatial::before,
html[data-cx-performance="lite"] .cx-page--gallery .cx-gallery-stage-light {
    filter: none !important;
}

html[data-cx-performance="lite"] .cx-page--experience .cx-media-primary {
    animation: none !important;
    filter: none !important;
    transform: none;
    will-change: auto;
}

html[data-cx-performance="lite"] #custom-cursor,
html[data-cx-performance="lite"] #cursor-follower {
    display: none !important;
}
