.site-preloader { display: none; }
.is-preloading .site-preloader, .site-preloader.is-revealing {
  position: fixed; z-index: 10000; inset: 0; display: grid;
  width: 100%; max-width: none; height: 100dvh; max-height: none;
  margin: 0; padding: 0; overflow: hidden; overflow: clip; border: 0;
  color: #252525; background: #fff; place-items: center;
  overscroll-behavior: none; touch-action: none;
}
.site-preloader::backdrop { background: transparent; }
.site-preloader:focus { outline: none; }
html.is-preloading, .is-preloading body { overflow: hidden; }
.is-preloading .cursor-follower { visibility: hidden; }

/* A full-screen white satin flag with the school logo, laid back and turned diagonally
   (isometric, facing the bottom left). The canvas draws the waving cloth; the satin ground and
   upright logo below are the static no-WebGL / reduced-motion fallback. The logo faces the viewer upright on the
   tilted cloth. Keep the angles and the logo size (50.2% of the reference flag height) in sync with preloader-flag.js. */
.site-preloader__flag {
  --kak-preloader-flag: min(60vw, 110vh, 1180px);
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgb(0 0 0 / 10%)), linear-gradient(218deg, #e4e4e4, #fff 30%, #dcdcdc 52%, #fff 70%, #e2e2e2);
  perspective: 2600px;
}
@media (max-width: 699px) { .site-preloader__flag { --kak-preloader-flag: min(82vw, 110vh); } }
.site-preloader__cloth { position: absolute; inset: 0; display: none; width: 100%; height: 100%; }
.site-preloader__logo {
  position: relative; z-index: 1; width: calc(var(--kak-preloader-flag) / 1.5 * .502); height: auto; aspect-ratio: 1;
  object-fit: contain; mix-blend-mode: multiply;
  transform: none;
}
.site-preloader__flag.is-flag-ready > .site-preloader__logo { visibility: hidden; }
.site-preloader__flag.is-flag-ready > .site-preloader__cloth { display: block; }

.site-preloader__progress {
  position: absolute; bottom: max(8vh, 30px, env(safe-area-inset-bottom)); left: 50%;
  color: #252525; font: 500 14px/1 Outfit, sans-serif; letter-spacing: 0;
  font-variant-numeric: tabular-nums; text-align: center; transform: translateX(-50%);
}
.site-preloader__number { display: block; min-width: 3ch; }
/* Fills in step with the three-digit counter. */
.site-preloader__timeline { position: absolute; right: 0; bottom: 0; left: 0; height: 4px; background: rgb(0 0 0 / 8%); }
.site-preloader__timeline > span { display: block; height: 100%; background: var(--kak-red, #ed1c24); transform: scaleX(0); transform-origin: 0 50%; }
