/* ==========================================================================
   Motion — presence & hierarchy (not noise)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Reveal on scroll ------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-slow) var(--ease-lux),
    transform var(--dur-slow) var(--ease-lux);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 320ms; }

/* Subtle gold shimmer on brand accents ---------------------------------- */
@keyframes goldShimmer {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.gold-rule {
  animation: goldShimmer 4.5s ease-in-out infinite;
}

/* Cinematic hero — CSS assists (GSAP drives the intro timeline) --------- */
.cinematic-hero.is-ready .hero-scroll {
  animation: scrollPulse 2.6s var(--ease-out) infinite;
}

.cinematic-hero.is-ready .hero-grain {
  animation: grainShift 8s steps(6) infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.45; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.9; transform: translateX(-50%) translateY(7px); }
}

@keyframes grainShift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-1%, 1%); }
  40% { transform: translate(1%, -1%); }
  60% { transform: translate(-1%, -1%); }
  80% { transform: translate(1%, 1%); }
  100% { transform: translate(0, 0); }
}

/* Reduced motion: show final hero state, no looping flourishes --------- */
@media (prefers-reduced-motion: reduce) {
  .cinematic-hero .hero-loader,
  .cinematic-hero .hero-curtain {
    display: none !important;
  }

  .cinematic-hero .hero-sub,
  .cinematic-hero .hero-names,
  .cinematic-hero .hero-date-block,
  .cinematic-hero .hero-location,
  .cinematic-hero .btn-invite,
  .cinematic-hero .hero-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  .cinematic-hero.is-ready .hero-scroll,
  .cinematic-hero.is-ready .hero-grain,
  .gold-rule {
    animation: none !important;
  }

  .hero-petals {
    display: none !important;
  }
}

/* Header transition polish ---------------------------------------------- */
.site-header {
  transition:
    background var(--dur-med) var(--ease-out),
    box-shadow var(--dur-med) var(--ease-out),
    backdrop-filter var(--dur-med) var(--ease-out);
}

/* Lightbox fade ---------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(26, 18, 16, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease-out), visibility var(--dur-med);
  padding: 1.5rem;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(920px, 100%);
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(201, 168, 76, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgba(201, 168, 76, 0.5);
  background: transparent;
  color: var(--color-champagne);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
