/* preloader.css — full-viewport loading overlay + the content-visibility gate.
 * The overlay only exists when JS is present (html.js); with no JS the page shows
 * immediately. While gated, .page is visibility:hidden (NOT display:none) so the
 * hero images still fetch and can be decoded/counted by preloader.js. */

.preloader {
  display: none;
}
html.js .preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 90% at 50% 38%, #0b1236 0%, #050a28 58%, #03061c 100%);
  color: #f2e4cf;
  transition: opacity var(--preloader-fade) ease;
}
.preloader.is-done {
  opacity: 0;
  pointer-events: none;
}

.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: min(74vw, 320px);
  text-align: center;
}

.preloader__monogram {
  font-family: "Pinyon Script", cursive;
  font-size: clamp(52px, 16vw, 68px);
  line-height: 1;
  background: linear-gradient(180deg, #f0e2cd 0%, #d9bd88 55%, #c19a5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.preloader__monogram .amp {
  font-size: 0.62em;
  vertical-align: 0.06em;
}

.preloader__bar {
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: rgba(242, 228, 207, 0.18);
  overflow: hidden;
}
.preloader__fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c19a5c, #f0e2cd);
  transition: width 0.22s ease;
}

.preloader__pct {
  font-family: "Cinzel", serif;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: rgba(242, 228, 207, 0.82);
}

/* content-visibility gate while loading */
html.js.is-preloading .page {
  visibility: hidden;
}
html.js.is-preloading .scene-toggle {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .preloader__fill {
    transition-duration: 0.001ms;
  }
}
