/* sw-preload.css — 20261024: full-screen preloader, waits for wallpaper, warp-in.
  олько transform/opacity анимируются; blur — статичен (дешёвый композитинг). */
#swWarp{
  position:fixed; inset:0; z-index:999999; pointer-events:none;
  overflow:hidden; background:#0b0f14; opacity:1;
}
#swWarp .swpl-a,
#swWarp .swpl-b{
  position:absolute; inset:-8%;
  background-image:var(--swpl-bg,none);
  background-position:center; background-size:cover; background-repeat:no-repeat;
  will-change:transform,opacity;
  backface-visibility:hidden;
}
#swWarp .swpl-b{
  filter:blur(28px) saturate(1.15) brightness(.92);
  transform:scale(1.12);
  animation:swplDrift 9s ease-in-out infinite alternate;
}
#swWarp .swpl-a{
  opacity:0; transform:scale(1.18);
}
#swWarp .swpl-scan{
  position:absolute; left:0; right:0; top:-12%; height:12%;
  background:linear-gradient(180deg,
    rgba(150,190,255,0) 0%,
    rgba(150,190,255,.08) 55%,
    rgba(255,255,255,.20) 82%,
    rgba(255,255,255,0) 100%);
  transform:translateY(0);
  animation:swplScan 3.4s linear infinite;
  will-change:transform;
}
#swWarp .swpl-flash{
  position:absolute; inset:0; pointer-events:none;
  background:radial-gradient(ellipse at center, rgba(255,255,255,.55), rgba(255,255,255,0) 70%);
  opacity:0;
}
@keyframes swplDrift{
  from{ transform:scale(1.12) translateY(-.6%); }
  to  { transform:scale(1.16) translateY(.6%); }
}
@keyframes swplScan{
  from{ transform:translateY(0); }
  to  { transform:translateY(900%); }
}

/* ВАРП: обои загрузились — резкий слой врывается, размытый растворяется */
html.sw-pl-in #swWarp{ animation:swplOut .9s cubic-bezier(.16,.8,.3,1) forwards; }
html.sw-pl-in #swWarp .swpl-a{ animation:swplSharp .82s cubic-bezier(.12,.85,.25,1) forwards; }
html.sw-pl-in #swWarp .swpl-b{ animation:swplGone .78s cubic-bezier(.12,.85,.25,1) forwards; }
html.sw-pl-in #swWarp .swpl-scan{ animation:swplSci .8s cubic-bezier(.6,0,.4,1) forwards; }
html.sw-pl-in #swWarp .swpl-flash{ animation:swplFlick .34s ease-out forwards; }

@keyframes swplSharp{
  0%  { opacity:0;    transform:scale(1.18); }
  55% { opacity:.88;  transform:scale(1.035); }
  100%{ opacity:1;    transform:scale(1.0); }
}
@keyframes swplGone{
  0%  { opacity:1; }
  100%{ opacity:0; }
}
@keyframes swplOut{
  0%  { opacity:1; }
  72% { opacity:1; }
  100%{ opacity:0; }
}
@keyframes swplSci{
  0%  { transform:translateY(0); opacity:1; }
  100%{ transform:translateY(1050%); opacity:0; }
}
@keyframes swplFlick{
  0%  { opacity:.14; }
  100%{ opacity:0; }
}
/* RT-безопасность: если JS/шрифты сломались — оверлей растворяется сам через CSS-таймер */
@media (prefers-reduced-motion: reduce){
  #swWarp .swpl-b{ animation:none; }
  #swWarp .swpl-scan{ animation:none; }
  html.sw-pl-in #swWarp{ animation-duration:.35s; }
  html.sw-pl-in #swWarp .swpl-a{ animation-duration:.3s; }
}

/* sw-kara-brand-v1: karaoke standard preloader - cubes + brand, no scanner bar (GPU only) */
.swKara .swpl-scan{display:none!important}
.swKara .swpl-logo{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);text-align:center;font-weight:600;font-size:clamp(15px,2.6vw,20px);line-height:1;color:#fff;letter-spacing:.34em;text-transform:uppercase;text-shadow:0 2px 14px rgba(0,0,0,.35);}
.swKara .swpl-cubes{position:absolute;left:0;right:0;top:calc(50% + 42px);height:26px;display:flex;gap:10px;justify-content:center;}
.swKara .swpl-cubes b{width:12px;height:12px;border-radius:3px;background:#fff;opacity:.6;animation:swplCube 1.05s ease-in-out infinite;will-change:transform,opacity;}
.swKara .swpl-cubes b:nth-child(2){animation-delay:.09s}
.swKara .swpl-cubes b:nth-child(3){animation-delay:.18s}
.swKara .swpl-cubes b:nth-child(4){animation-delay:.27s}
.swKara .swpl-cubes b:nth-child(5){animation-delay:.36s}
html.sw-pl-in .swKara .swpl-cubes b{animation:none!important;opacity:0}
html.sw-pl-in .swKara .swpl-logo{opacity:0;transition:opacity .25s}
@keyframes swplCube{
  0%{transform:translateY(0) scale(1,1);opacity:.5}
  18%{transform:translateY(-12px) scale(.96,1.1);opacity:1}
  38%{transform:translateY(0) scale(1.08,.86);opacity:.9}
  55%{transform:translateY(0) scale(1,1);opacity:.6}
  100%{transform:translateY(0) scale(1,1);opacity:.5}
}
@media (prefers-reduced-motion:reduce){
  .swKara .swpl-cubes b{animation:none!important;opacity:.7}
  .swKara .swpl-logo{letter-spacing:.22em}
}
