/* ════════════════════════════════════════════════════
   PRELOADER — tela inicial de carregamento
   ════════════════════════════════════════════════════ */
@font-face {
  font-family: 'NVDuneHero';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('../fonts/NVDuneHero-Medium.woff2') format('woff2'),
       url('../fonts/NVDuneHero-Medium.woff') format('woff');
}

html.is-preloading,
html.is-preloading body {
  overflow: hidden;
}

.site-preloader {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0b0a09;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.site-preloader--out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.site-preloader__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px;
}

.site-preloader__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(9px, 1.4vh, 13px);
  width: min(18vw, 74px);
}

.site-preloader__logo {
  position: relative;
  width: 100%;
  aspect-ratio: 232 / 164;
}

.site-preloader__logo-ghost,
.site-preloader__logo-fill img {
  display: block;
  object-fit: contain;
}

.site-preloader__logo-ghost {
  width: 100%;
  height: 100%;
  object-position: center;
  opacity: 0.18;
}

.site-preloader__logo-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    to right,
    #000 calc(100% - 3px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    #000 calc(100% - 3px),
    transparent 100%
  );
  animation: preloader-logo-fill 2s ease-out forwards;
}

.site-preloader__logo-fill img {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--preloader-logo-w, 100%);
  height: var(--preloader-logo-h, 100%);
  max-width: none;
  object-position: center;
}

.site-preloader__label {
  margin: 0;
  width: 100%;
  font-family: 'NVDuneHero', 'DM Sans', sans-serif;
  font-size: clamp(4.5px, 0.525vw, 5px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  color: #c9ab94;
  animation: preloader-label-pulse 2.4s ease-in-out infinite;
}

@keyframes preloader-logo-fill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

@keyframes preloader-label-pulse {
  0%,
  100% {
    opacity: 0.32;
  }
  50% {
    opacity: 1;
  }
}

.site-preloader--complete .site-preloader__logo-fill {
  animation: none;
  width: 100%;
  -webkit-mask-image: none;
  mask-image: none;
}

@media (prefers-reduced-motion: reduce) {
  .site-preloader__logo-fill {
    animation: none;
    width: 100%;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .site-preloader__label {
    animation: none;
    opacity: 0.85;
  }

  .site-preloader {
    transition-duration: 0.2s;
  }
}
