/* ------------------------------------------------------------------
   Loading screen — covers the page until it is ready to play.
   Only with JS (html.js): the inline script in index.html drives it,
   and without JS nothing should ever block the page.
------------------------------------------------------------------ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background:
    radial-gradient(circle at 50% 45%, rgb(210 172 104 / 0.07), transparent 42%),
    var(--color-bg);
  transition: opacity 0.7s var(--ease-out), visibility 0s linear 0.7s;
}
.js .loader { display: flex; }
.loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__pulse {
  width: 180px;
  height: 180px;
  transition: transform 0.7s var(--ease-out);
}
.loader.is-done .loader__pulse { transform: scale(1.12); }

.loader__brand {
  margin-top: 6px;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--color-text);
}

.loader__status {
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--color-gold);
  /* letter-spacing leaves a trailing gap after the last character */
  margin-right: -0.42em;
}
.loader__dots::after {
  content: "";
  display: inline-block;
  width: 2.2em;
  text-align: left;
  animation: loader-dots 1.4s steps(4, end) infinite;
}
@keyframes loader-dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%, 100% { content: "..."; }
}

/* Keep the page still and the hero's entrance waiting until the reveal. */
.is-loading { overflow: hidden; }
.is-loading .engine-hero__eyebrow,
.is-loading .engine-hero__title-line { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .loader__dots::after { animation: none; content: "..."; }
  .loader.is-done .loader__pulse { transform: none; }
}
