/* ══════════════════════════════
   SITE PRELOADER
   Logo + progress bar + counter. Only the logo dissolves into particle
   tiles on exit (bar/counter/backdrop fade plainly); the header then
   slides in and the existing hero slider takes over unmodified.
   Logic lives in homepage-preloader.js.
══════════════════════════════ */

html.site-preloader-lock,
html.site-preloader-lock body {
  overflow: hidden !important;
  height: 100% !important;
}

#sitePreloader {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: #f5f5f5;
}

.site-preloader__logo-wrap {
  position: relative;
  width: 100%;
  max-width: 50vw;
 
}

.site-preloader__logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: cover;
  margin: 0 auto;
}

/* Generated in JS — one per grid cell, each showing its own slice of the
   logo via background-position, so the shatter reads as many small pieces
   rather than the whole logo fading as one block. */
.site-preloader-tile {
  position: absolute;
  top: 0;
  left: 0;
  background-repeat: no-repeat;
  will-change: transform, opacity;
  pointer-events: none;
  /* On a white backdrop, light/white parts of the logo would otherwise
     blend straight into the background as they fly apart — a shadow gives
     every tile a visible edge regardless of what it's showing. */
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
  border-radius: 2px;
  backface-visibility: hidden;
}

.site-preloader__progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 200px;
  max-width: 60vw;
}

.site-preloader__bar {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.site-preloader__bar-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #ED1C24;
  border-radius: inherit;
}

.site-preloader__counter {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.65);
  font-variant-numeric: tabular-nums;
}

.site-preloader__counter span {
  opacity: 0.6;
  margin-left: 1px;
}

@media (prefers-reduced-motion: reduce) {
  .site-preloader-tile {
    display: none;
  }
}
