/* ==========================================================================
   Preloader — "UNICORN / STORE" punched out of an ink plate

   Layering, back to front:
     .pl-backer   opaque cream sheet hiding the page while the letters stamp in
     .pl-plate    the ink plate; the letters are holes in its mask
     .pl-chrome   corner text and the loading counter, riding on the plate
   ========================================================================== */

.pl-root { position: fixed; inset: 0; z-index: var(--z-preloader); }

.pl-backer {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--u-paper);
}

.pl-backer__texture {
  position: absolute;
  inset: 0;
  color: var(--u-ink);
  background-image: radial-gradient(circle at center, currentColor 1.4px, transparent 1.5px);
  background-size: 16px 16px;
  opacity: 0.08;
}

.pl-plate {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.pl-chrome {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  color: var(--u-paper);
  font-family: var(--font-body);
}

.pl-chrome__label {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.75;
}
.pl-chrome__label--tl { top: 1.5rem; left: 1.5rem; }
.pl-chrome__label--br { bottom: 1.5rem; right: 1.5rem; }

.pl-chrome__counter {
  position: absolute;
  bottom: 1.15rem;
  left: 1.5rem;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.12em;
  line-height: 1;
}

.pl-chrome__corner {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 16px;
  height: 16px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  opacity: 0.55;
}

/* Confetti flecks drifting behind the letterforms. */
.pl-fleck {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  opacity: 0.9;
}

/* Scroll is locked for the duration; restored by the timeline's onComplete. */
html.pl-locked { overflow: hidden; }
