html:not(.intro-seen) {
  overflow: hidden;
}

#site-intro {
  background: transparent;
}

.site-intro {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: transparent;
  perspective: 1600px;
}

.site-intro-plane {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #070708;
  color: #fbf7f4;
  transform-style: preserve-3d;
  transform-origin: 50% 46%;
  backface-visibility: hidden;
  animation: intro-fall 4.6s linear forwards;
}

.site-intro-card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.intro-edge {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border: 9px solid transparent;
  border-image: linear-gradient(90deg, #ffffff 0%, #f7d0e2 34%, #ffffff 50%, #f4a8c4 74%, #e56b9a 100%) 1;
  filter: drop-shadow(0 0 10px rgba(244, 168, 196, 0.55)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.4));
  animation: intro-edge-in 1.15s cubic-bezier(0.65, 0, 0.28, 1) 0.15s both;
}

@keyframes intro-edge-in {
  0% { clip-path: inset(0 100% 100% 0); }
  34% { clip-path: inset(0 0 100% 0); }
  68% { clip-path: inset(0); }
  100% { clip-path: inset(0); }
}

.intro-3d {
  perspective: 900px;
}

.intro-3d-inner {
  transform-style: preserve-3d;
  animation: intro-logo-3d 1.8s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.intro-badge {
  display: grid;
  width: 8.5rem;
  height: 8.5rem;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #ffd0e2, #e56b9a 46%, #9d315c);
  color: #fff;
  box-shadow:
    0 22px 40px rgba(0, 0, 0, 0.45),
    inset 0 10px 16px rgba(255, 255, 255, 0.35),
    inset 0 -14px 18px rgba(80, 10, 36, 0.35);
}

.site-intro-name {
  margin-top: 1.4rem;
  font-family: Cinzel, serif;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  animation: intro-name 0.7s 1.15s both;
}

.site-intro-tag {
  margin-top: 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #f4a8c4;
  animation: intro-name 0.7s 1.35s both;
}

@keyframes intro-fall {
  0%, 52% {
    transform: translate3d(0, 0, 0) rotateX(0deg);
    animation-timing-function: cubic-bezier(0.42, 0, 0.72, 0.28);
  }
  100% {
    transform: translate3d(0, 128%, -160px) rotateX(74deg);
  }
}

@keyframes intro-logo-3d {
  0% {
    opacity: 0;
    transform: translateY(-46vh) rotateX(62deg) rotateY(-160deg) scale(0.72);
  }
  40% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translateY(0) rotateX(10deg) rotateY(360deg) scale(1);
  }
}

@keyframes intro-name {
  from { opacity: 0; transform: translateY(-22vh); }
  to { opacity: 1; transform: translateY(0); }
}

html.intro-replay body {
  visibility: visible;
}

html.intro-seen .site-intro {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  html:not(.intro-seen) {
    overflow: auto;
  }

  .site-intro {
    display: none !important;
  }
}
