/* ===== Intro loader =====
   Shown when the site is opened from outside or reloaded (html.pl-on is set by the inline script in <head>);
   not shown when moving between pages inside the site. Without JS it never appears.
   Sequence: panda mark pops in → wordmark slides out from behind it → red line fills with real loading progress
             → the whole curtain lifts and the page's own entrance animations start. */
.pl{display:none}
html.pl-on .pl{display:flex;position:fixed;inset:0;z-index:3000;align-items:center;justify-content:center;background:#08080a;
  box-shadow:0 34px 90px rgba(0,0,0,.75);touch-action:none;will-change:transform;
  transition:transform .95s cubic-bezier(.65,0,.15,1) .24s}
.pl::before{content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse 46% 42% at 50% 48%,rgba(215,27,29,.11),rgba(215,27,29,0) 100%);opacity:0;transition:opacity 1.6s ease .2s}
.pl.pl-go::before{opacity:1}

.pl-in{position:relative;--h:clamp(50px,13.5vw,92px);display:flex;flex-direction:column;align-items:stretch;gap:calc(var(--h)*.44);
  transition:transform .55s cubic-bezier(.4,0,.2,1),opacity .4s ease}
.pl-logo{display:flex;align-items:center;gap:calc(var(--h)*.2)}
.pl-mark{display:block;height:var(--h);width:auto;opacity:0}
.pl-word{display:block;overflow:hidden;height:calc(var(--h)*.46)}
.pl-word img{display:block;height:100%;width:auto;transform:translateX(-103%)}
.pl-go .pl-mark{animation:pl-mark .85s cubic-bezier(.2,.9,.25,1.2) .1s both}
.pl-go .pl-word img{animation:pl-word .95s cubic-bezier(.65,0,.15,1) .5s both}
@keyframes pl-mark{from{opacity:0;transform:scale(.72) rotate(-10deg)}55%{opacity:1}to{opacity:1;transform:none}}
@keyframes pl-word{from{transform:translateX(-103%)}to{transform:none}}

.pl-bar{height:1px;background:rgba(255,255,255,.14);overflow:hidden;opacity:0;transition:opacity .6s ease .55s}
.pl-go .pl-bar{opacity:1}
.pl-bar i{display:block;height:100%;background:#d71b1d;transform:scaleX(0);transform-origin:0 50%}

/* exit */
.pl-out .pl-in{transform:translateY(-24px);opacity:0}
html.pl-on .pl.pl-out{transform:translateY(-101%)}

/* keep the page's own entrance animations waiting behind the curtain */
.pl-hold body>:not(.pl),.pl-hold body>:not(.pl) *,.pl-hold body>:not(.pl) *::before,.pl-hold body>:not(.pl) *::after{animation-play-state:paused!important}

@media (prefers-reduced-motion:reduce){
  html.pl-on .pl{transition:opacity .35s ease}
  html.pl-on .pl.pl-out{transform:none;opacity:0}
  .pl-go .pl-mark,.pl-go .pl-word img{animation:none}
  .pl-mark{opacity:1}
  .pl-word img{transform:none}
  .pl-out .pl-in{transform:none}
  .pl-bar,.pl::before{transition:none}
}
