/* ==========================================================================
   ATHARV & KIARA LUXURY ROYAL WEDDING STYLES
   Royal Red Wine Velvet & Imperial Gold Palette
   ========================================================================== */

/* Universal Reset & Kinetic Mobile Scroll Hygiene (Rule 4 & user_rules) */
html {
  scroll-behavior: auto !important;
  touch-action: pan-y !important;
  -webkit-text-size-adjust: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  background-color: #0a0103;
}

body {
  margin: 0;
  padding: 0;
  -webkit-overflow-scrolling: touch !important;
  overflow-x: hidden !important;
  background-color: #0a0103;
  color: #fff8f5;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* Zero Long-Press & Media Protection (Rule 72) */
img, video, audio, a, button {
  -webkit-touch-callout: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
  pointer-events: auto;
}

/* Root Lockdown during Preloader & Opening Animation (Rule 5 & 14) */
html.is-locked, html.is-locked body {
  overflow: hidden !important;
  overflow-y: hidden !important;
  touch-action: none !important;
  height: 100% !important;
  max-height: 100vh !important;
}

/* Luxury Viewport Container */
.luxury-container {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: #160205;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.95);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  .luxury-container {
    border-left: 1px solid rgba(212, 175, 55, 0.35);
    border-right: 1px solid rgba(212, 175, 55, 0.35);
  }
}

/* ==========================================================================
   THEME-CONGRUENT PRELOADER (Rule 14 & Rule 101)
   ========================================================================== */
#yuvi-preloader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #160205;
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  touch-action: none;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html.is-preloaded #yuvi-preloader,
html.is-preloaded-session #yuvi-preloader {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.yuvi-loader-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.18);
  border-top-color: #d4af37;
  animation: yuvi-spin 0.85s linear infinite;
  margin-bottom: 14px;
}

@keyframes yuvi-spin {
  to { transform: rotate(360deg); }
}

.yuvi-loader-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #f7e7be;
  margin: 0 0 6px 0;
}

#yuvi-loader-pct {
  font-family: 'Cinzel', Didot, Georgia, serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #d4af37;
}

.yuvi-loader-bar-bg {
  width: 150px;
  height: 1.5px;
  background: rgba(212, 175, 55, 0.15);
  border-radius: 999px;
  margin-top: 13px;
  overflow: hidden;
}

.yuvi-loader-bar-fill {
  width: 0%;
  height: 100%;
  background: #d4af37;
  border-radius: 999px;
  transition: width 0.15s ease-out;
}

/* ==========================================================================
   TRANSLUCENT 38PX CIRCULAR SOUND CONTROLLER (Rule 6, Rule 100, Rule 103)
   ========================================================================== */
#yuvi-sound-btn {
  position: fixed;
  bottom: 20px;
  right: 18px;
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  min-height: 38px !important;
  border-radius: 9999px !important;
  background: rgba(22, 2, 5, 0.35) !important;
  backdrop-filter: blur(10px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(10px) saturate(140%) !important;
  border: none !important;
  outline: none !important;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  z-index: 99990 !important;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, opacity 0.5s ease, visibility 0.5s ease !important;
}

@media (min-width: 640px) {
  #yuvi-sound-btn {
    right: max(18px, calc(50vw - 215px + 18px)) !important;
  }
}

#yuvi-sound-btn:active {
  transform: scale(0.92) !important;
}

#yuvi-sound-btn.is-hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Mute State Icon */
.yuvi-mute-icon {
  width: 17px !important;
  height: 17px !important;
  stroke: #d4af37 !important;
  display: none;
}

#yuvi-sound-btn.is-muted .yuvi-mute-icon {
  display: block !important;
}

/* Playing State 4-Bar Dancing Equalizer */
.yuvi-sound-waves {
  width: 16px !important;
  height: 14px !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 2.5px !important;
}

#yuvi-sound-btn.is-playing .yuvi-sound-waves {
  display: flex !important;
}

.yuvi-wave-bar {
  width: 2px !important;
  height: 14px !important;
  background: #d4af37 !important;
  border-radius: 999px !important;
  transform-origin: center !important;
}

#yuvi-sound-btn.is-playing .yuvi-wave-bar:nth-child(1) {
  animation: yuvi-wave-1 0.85s ease-in-out infinite alternate !important;
}
#yuvi-sound-btn.is-playing .yuvi-wave-bar:nth-child(2) {
  animation: yuvi-wave-2 0.65s ease-in-out infinite alternate !important;
}
#yuvi-sound-btn.is-playing .yuvi-wave-bar:nth-child(3) {
  animation: yuvi-wave-3 0.95s ease-in-out infinite alternate !important;
}
#yuvi-sound-btn.is-playing .yuvi-wave-bar:nth-child(4) {
  animation: yuvi-wave-4 0.75s ease-in-out infinite alternate !important;
}

@keyframes yuvi-wave-1 {
  0% { transform: scaleY(0.25); }
  50% { transform: scaleY(0.85); }
  100% { transform: scaleY(0.35); }
}
@keyframes yuvi-wave-2 {
  0% { transform: scaleY(0.95); }
  50% { transform: scaleY(0.30); }
  100% { transform: scaleY(1.00); }
}
@keyframes yuvi-wave-3 {
  0% { transform: scaleY(0.40); }
  50% { transform: scaleY(1.00); }
  100% { transform: scaleY(0.20); }
}
@keyframes yuvi-wave-4 {
  0% { transform: scaleY(0.70); }
  50% { transform: scaleY(0.20); }
  100% { transform: scaleY(0.85); }
}

/* ==========================================================================
   HERO OPENING VIDEO & PERMANENT OPENED LAYER (Rule 75, 77 & 83)
   ========================================================================== */
.hero-wrapper {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  background-color: #160205;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-media-box {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

/* Rule 77: Permanent opened layer sits directly behind video */
#hero-opened-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

#intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 2;
  transition: opacity 0.6s ease;
}

#hero-poster-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 3;
  transition: opacity 0.4s ease;
}

/* Tap to Open Prompt Overlay */
#hero-prompt-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 70px;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.5s ease;
}

.royal-pulse-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(22, 2, 5, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  animation: royalHandPulse 2.2s infinite ease-in-out;
}

@keyframes royalHandPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 20px rgba(0,0,0,0.6); }
  50% { transform: scale(1.05); box-shadow: 0 4px 25px rgba(212, 175, 55, 0.35); }
}

/* Hero Content (Lord Ganesha, Couple Names, Date, Venue) */
#hero-content-layer {
  position: relative;
  z-index: 20;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

#hero-content-layer.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Lightbox Modal */
#gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 1, 3, 0.95);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  touch-action: none;
}

#gallery-modal.is-active {
  display: flex;
}

#gallery-modal img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

.modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(22, 2, 5, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #d4af37;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  touch-action: manipulation;
}

/* ==========================================================================
   ROYAL ANIMATION SUITE & ATMOSPHERIC PARTICLES
   ========================================================================== */

/* Ambient Petal & Sparkle Particle Canvas */
.petals-canvas {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: 100%;
  pointer-events: none;
  z-index: 25;
  opacity: 0.95;
}

/* Lord Ganesha Breathing Golden Halo Aura */
@keyframes ganeshaAura {
  0%, 100% {
    filter: drop-shadow(0 4px 12px rgba(128, 20, 36, 0.35)) drop-shadow(0 0 8px rgba(212, 175, 55, 0.3));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 6px 18px rgba(128, 20, 36, 0.45)) drop-shadow(0 0 20px rgba(212, 175, 55, 0.7));
    transform: scale(1.03);
  }
}

.ganesha-aura {
  animation: ganeshaAura 3.5s ease-in-out infinite;
}

/* Staggered Hero Revealed Content Keyframes */
@keyframes heroFadeDown {
  0% { opacity: 0; transform: translateY(-16px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroFadeUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes heroLineGrow {
  0% { opacity: 0; transform: scaleX(0); }
  100% { opacity: 1; transform: scaleX(1); }
}

#hero-content-layer.is-visible .hero-ganesha-block {
  animation: heroFadeDown 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#hero-content-layer.is-visible .hero-tagline {
  animation: heroFadeUp 0.85s 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#hero-content-layer.is-visible .hero-groom {
  animation: heroFadeUp 0.85s 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#hero-content-layer.is-visible .hero-divider {
  animation: heroLineGrow 0.85s 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#hero-content-layer.is-visible .hero-bride {
  animation: heroFadeUp 0.85s 0.52s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#hero-content-layer.is-visible .hero-hashtag {
  animation: heroFadeUp 0.85s 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-hashtag span,
.hero-hashtag {
  color: #801424 !important;
}

#hero-content-layer.is-visible .hero-scroll-btn {
  animation: heroFadeUp 0.85s 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Scroll-Driven Reveals */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92) translateY(20px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-scale.is-revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

/* Metallic Gold Light Sweep on Primary CTAs */
.gold-shimmer-btn {
  position: relative !important;
  overflow: hidden !important;
}

.gold-shimmer-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 248, 220, 0.35) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  animation: goldSweep 3.5s infinite ease-in-out;
  pointer-events: none;
}

@keyframes goldSweep {
  0% { left: -75%; opacity: 0; }
  15% { opacity: 1; }
  50% { left: 140%; opacity: 0; }
  100% { left: 140%; opacity: 0; }
}

/* Portrait Breathing Glow */
.portrait-glow {
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.25), 0 8px 30px rgba(0, 0, 0, 0.7);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.portrait-glow:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 0 35px rgba(212, 175, 55, 0.45), 0 12px 35px rgba(0, 0, 0, 0.8);
}

/* Countdown Box Gloss */
.countdown-box {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.countdown-box:hover {
  transform: translateY(-3px);
  border-color: rgba(212, 175, 55, 0.7) !important;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.25);
}

/* Timeline Node Glow */
@keyframes timelineDotGlow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.6);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 14px 4px rgba(212, 175, 55, 0.4);
  }
}

.timeline-dot-pulse {
  animation: timelineDotGlow 2.8s infinite ease-in-out;
}


#rsvp-success-modal {
  display: none !important;
}
#rsvp-success-modal.is-active {
  display: flex !important;
}
