body.has-intro-overlay {
  overflow: hidden;
}

.site-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 221, 236, 0.48), transparent 34%),
    linear-gradient(135deg, #f5d8e5 0%, #e9d2df 34%, #97b9d4 68%, #1f496d 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 850ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 850ms cubic-bezier(0.22, 1, 0.36, 1);
  filter: saturate(0.94) brightness(1.03);
}

.site-intro-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.site-intro-overlay.is-hiding {
  opacity: 0;
  filter: saturate(1.08) brightness(1.12);
}

.site-intro-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 62%),
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.2), transparent 24%);
  opacity: 0;
  transform: translateX(-12%);
  animation: introGlow 2s ease-in-out forwards;
}

.site-intro-overlay__image {
  width: min(100vw, 100vh * 0.794);
  height: min(100vh, 100vw * 1.259);
  object-fit: contain;
  display: block;
  box-shadow: 0 30px 90px rgba(6, 27, 54, 0.18);
  transform: scale(1.025);
  opacity: 0;
  animation: introImageReveal 2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, opacity;
}

.site-intro-overlay.is-hiding .site-intro-overlay__image {
  transform: scale(1.045);
}

@keyframes introImageReveal {
  0% {
    opacity: 0;
    transform: scale(1.055);
  }

  35% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes introGlow {
  0% {
    opacity: 0;
    transform: translateX(-14%);
  }

  42% {
    opacity: 0.65;
  }

  100% {
    opacity: 0.18;
    transform: translateX(8%);
  }
}

@media all and (max-width: 768px) {
  .site-intro-overlay {
    background:
      radial-gradient(circle at 50% 18%, rgba(255, 225, 238, 0.42), transparent 38%),
      linear-gradient(160deg, #f5d8e5 0%, #b9c2dc 55%, #173c60 100%);
  }

  .site-intro-overlay__image {
    width: 100vw;
    height: 100dvh;
    object-fit: cover;
    object-position: center;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-intro-overlay,
  .site-intro-overlay::before,
  .site-intro-overlay__image {
    animation: none;
    transition: opacity 250ms ease;
  }

  .site-intro-overlay__image {
    opacity: 1;
    transform: none;
  }
}
