/* [perf-2026-10-26] performance overrides. Loaded last. Remove the <link> to this file to undo everything in it. */

/* 1. backdrop-filter over the playing background video is the most expensive thing on the page:
      the GPU re-blurs the live video behind EVERY card on EVERY frame. Kept only on the header (.top) and small controls. */
main *,.foot,.foot *{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
/* optional - compensate for the missing blur by darkening the video a little (uncomment): */
/* .bg-shade{background:rgba(var(--bkr),.68)} */

/* 2. video progress bar now moves by transform (see video-gallery.js) */
.bg-progress i{transition:transform .22s linear}

/* 3. loading screen (see the inline script in index.html) - pure CSS, no extra elements */
@property --pf-p{syntax:'<number>';inherits:true;initial-value:.06}
html.pf-load{transition:--pf-p .3s linear}
html.pf-load::before{content:attr(data-pf-name);position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;
  background:var(--bk,#141414);color:var(--tx,#fff);font:700 clamp(18px,3.2vw,30px)/1 var(--font,system-ui,sans-serif);letter-spacing:.14em;text-transform:uppercase;
  opacity:1;transition:opacity .35s ease;animation:pfFail .01s linear 8s forwards}
html.pf-load::after{content:"";position:fixed;left:50%;top:calc(50% + 34px);width:140px;height:2px;margin-left:-70px;z-index:2147483001;border-radius:2px;
  background:linear-gradient(var(--c1,#27F5D6),var(--c1,#27F5D6)) 0 0/calc(var(--pf-p)*100%) 100% no-repeat,rgba(128,128,128,.28);
  opacity:1;transition:opacity .35s ease;animation:pfFail .01s linear 8s forwards}
html.pf-out::before,html.pf-out::after{opacity:0;pointer-events:none}
html.pf-nobar.pf-load::after{display:none}   /* editor: "Полоса прогресса" off */
@keyframes pfFail{to{opacity:0;visibility:hidden;pointer-events:none}}   /* fail-safe: never covers the page for more than 8 s, even if the script dies */
/* 3b. widgets that are already "in view" wait for the loader, then play their normal staggered entrance as it fades (instead of finishing unseen behind it).
       Fail-safe: after 8 s they are shown even if the script never lifts the loader. Not applied for reduced-motion users. */
@media (prefers-reduced-motion:no-preference){
  html.pf-load:not(.pf-out):not(.pf-nohold) .reveal.in{opacity:0;transform:translateY(20px);animation:pfRel .01s linear 8s forwards}
}
@keyframes pfRel{to{opacity:1;transform:none}}

/* 3c. notices (announcement bar, cookie banner) animate LAYOUT (height) which re-lays out the whole page every frame; under the loader they just appear. */
html.pf-load:not(.pf-out) .ann,html.pf-load:not(.pf-out) .ann *,html.pf-load:not(.pf-out) #ckBanner,html.pf-load:not(.pf-out) #ckBanner *{transition:none!important;animation:none!important}

/* 4. adaptive quality: classes are set on <html> by js/perf-governor.js ONLY when this device cannot keep up (cumulative: l1, l1+l2, l1+l2+l3) */
html.pf-l1 #fxGlow{display:none!important}
html.pf-l1 .bg-shade{background-image:radial-gradient(circle at 18%12%,rgba(var(--c1r,39,245,214),.16),transparent 55%),radial-gradient(circle at 86%88%,rgba(var(--c2r,232,153,0),.14),transparent 55%)!important}
html.pf-l2 #fxRoute{display:none!important}
html.pf-l3 .bgv,html.pf-l3 .arrow,html.pf-l3 .bg-progress{display:none!important}
