html.preloading,
body.preloading {
  overflow: hidden;
}

#preloader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 99999;
  opacity: 1;
  visibility: visible;
  transition: opacity .35s ease, visibility .35s ease;

  background-color: #0a0a0f;
  background-image: url("/images/Paper%20Graphic.png");
  background-repeat: repeat;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

#preloader::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .22);
  z-index: 0;
}

.loader {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  place-items: center;
  text-align: center;
  padding: 8px;
}

#logo-bar {
  position: relative;
  width: min(72vw, 560px);
  aspect-ratio: 1249 / 768;
}

.logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; 
  display: block;
  pointer-events: none;
  user-select: none;
}

.logo.bg {
  opacity: .22;
  filter: grayscale(1) contrast(1.1);
}

.logo.fg {
  clip-path: inset(0 100% 0 0);
  transition: clip-path .2s linear;
}

.percent {
  color: #eee;
  font: 700 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing: .06em;
  opacity: .9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

@media (prefers-reduced-motion: reduce) {
  #preloader,
  #preloader.hidden,
  .logo.fg {
    transition: none !important;
  }
}

@media (max-width: 420px) {
  #preloader::before {
    background: rgba(0, 0, 0, .28);
  }
}