/* ==========================================================================
   SITE LOADER — overlay di caricamento pagina
   ========================================================================== */

/* ================= SITE LOADER ================= */

body.is-loading {
  overflow: hidden;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 999999;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    radial-gradient(circle at 50% 42%, rgba(221,114,255,0.18), transparent 28%),
    linear-gradient(180deg, #03040a 0%, #010206 100%);

  opacity: 1;
  visibility: visible;

  transition:
    opacity 700ms ease,
    visibility 0s linear 700ms;
}

.site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-loader__box {
  width: min(82vw, 520px);
  text-align: center;
}

.site-loader__title {
  font-family: "Space Age", "Orbitron", sans-serif;
  font-size: clamp(1.1rem, 3vw, 2rem);
  letter-spacing: 0.14em;
  color: #efc8ff;

  text-shadow:
    0 0 4px rgba(255,255,255,0.45),
    0 0 14px rgba(221,114,255,0.75),
    0 0 28px rgba(118,36,255,0.5);
}

.site-loader__bar {
  position: relative;
  height: 4px;
  margin: 26px auto 14px;
  overflow: hidden;
  border-radius: 999px;

  background: rgba(255,255,255,0.08);
}

.site-loader__bar span {
  position: absolute;
  inset: 0;
  width: 45%;

  background:
    linear-gradient(
      90deg,
      transparent,
      rgba(221,114,255,0.95),
      rgba(98,195,255,0.95),
      transparent
    );

  animation: loaderBarMove 1.15s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.site-loader__text {
  font-family: "Orbitron", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: rgba(238,244,255,0.78);
}

@keyframes loaderBarMove {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(240%);
  }
}
