/* ── Intro / Preloader Overlay ── */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  pointer-events: none;
  overflow: hidden;
}

/* Ambient gold particle dots */
#intro-overlay::before,
#intro-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#intro-overlay::before {
  background-image:
    radial-gradient(1.5px 1.5px at 18% 22%, rgba(184,149,106,0.45) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 15%, rgba(184,149,106,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 55% 78%, rgba(184,149,106,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 32% 88%, rgba(184,149,106,0.25) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 91% 61%, rgba(184,149,106,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 45%, rgba(184,149,106,0.2) 0%, transparent 100%),
    radial-gradient(2px 2px at 12% 52%, rgba(184,149,106,0.25) 0%, transparent 100%);
  opacity: 0;
  animation: dustFadeIn 2s 1.5s ease-out forwards;
}

#intro-overlay::after {
  background:
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(184,149,106,0.04) 0%, transparent 70%);
  opacity: 0;
  animation: ambientGlow 3s 2s ease-out forwards;
}

/* ── Phase layers ── */
.intro-phase {
  position: absolute;
  text-align: center;
  opacity: 0;
}

/* Phase 1: "The Wedding of" — fade in then out */
#intro-p1 {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: clamp(0.6rem, 2vw, 0.75rem);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  animation: p1FadeInOut 3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Phase 2: "Rudy & Linda" — fade in after P1 fades, STAYS */
#intro-p2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: p2FadeIn 1.2s 2.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.intro-p2-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 3.8vw, 2.2rem);
  line-height: 1;
  color: #fff;
  margin: 0;
  white-space: nowrap;
}

.intro-p2-text .amp {
  color: #B8956A;
  font-style: italic;
  margin: 0 0.12em;
}

/* Phase 3: RL Monogram — sits above P2 (Rudy & Linda) */
#intro-p3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  left: 50%;
  bottom: calc(50% + 0.4em);
  top: auto;
  transform: translateX(-50%);
  opacity: 0;
  z-index: 9998;
}

#intro-p3.phase3-enter {
  animation: p3FadeIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#intro-p3.phase3-enter .intro-initials {
  animation: rlRiseFromLine 2.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.intro-initials-mask {
  overflow: hidden;
  display: inline-block;
  line-height: 0.9;
  padding: 0 0.04em;
}

.intro-initials {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(5rem, 15vw, 8.5rem);
  line-height: 0.9;
  color: #fff;
  letter-spacing: 0.04em;
  display: block;
  margin: 0;
  transform: translateY(100%);
}

/* Phase 3 exit: fade out */
#intro-p3.phase3-exit {
  animation: p3FadeOut 0.8s cubic-bezier(0.4, 0, 0.8, 0.6) forwards;
}

/* Overlay fade out */
#intro-overlay.outro {
  animation: overlayFadeOut 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Keyframes ── */
@keyframes dustFadeIn {
  to { opacity: 1; }
}

@keyframes ambientGlow {
  to { opacity: 1; }
}

@keyframes p1FadeInOut {
  0%   { opacity: 0; }
  25%  { opacity: 1; }
  75%  { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes p2FadeIn {
  from { opacity: 0; transform: translate(-50%, -50%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes p3FadeIn {
  from { opacity: 0; transform: translateX(-50%); }
  to   { opacity: 1; transform: translateX(-50%); }
}

@keyframes rlRiseFromLine {
  0%   { transform: translateY(100%); }
  100% { transform: translateY(0); }
}

@keyframes p3FadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes overlayFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; pointer-events: none; }
}

/* Hide main cover during intro */
body.intro-active .cover {
  opacity: 0;
}

body.intro-done .cover {
  animation: coverReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes coverReveal {
  from { opacity: 0; transform: scale(1.04); filter: blur(6px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* Skip button removed */
#intro-skip {
  display: none !important;
}

body.intro-done #intro-overlay {
  display: none;
}

/* Already seen: skip instantly */
body.intro-skip-all #intro-overlay,
body.intro-skip-all #intro-skip {
  display: none !important;
}
body.intro-skip-all .cover {
  opacity: 1 !important;
  animation: none !important;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
