/* ==========================================================================
   🏛️ Ananya & Aarav — Royal Wedding Arch Opening CSS
   ========================================================================== */

/* Reset & CSS Custom Properties */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

:root {
  --gold-primary: #D4AF37;
  --gold-glow: #FFF0B3;
  --rose-pink: #E86A92;
  --deep-burgundy: #2C0E14;
  --dark-night: #09050d;
  --font-serif: 'Cormorant Garamond', serif;
  --font-script: 'Great Vibes', cursive;
  --font-cinzel: 'Cinzel Decorative', serif;
  --font-sans: 'Montserrat', sans-serif;
}

html,
body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--dark-night);
  font-family: var(--font-serif);
  color: #fff;
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;  /* Firefox */
}

/* Lock scrolling until intro rope pull / unlock */
html.scroll-locked,
body.scroll-locked {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none;
}

/* Hide scrollbar globally across all Webkit browsers */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Main Viewport Container */
.scene-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  /* Starting State: Dim & Atmospheric Night Scene (Matches Reference Image 2) */
  filter: grayscale(50%) brightness(45%) contrast(110%);
  transition: filter 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Illuminated Full-Color State */
.scene-container.illuminated {
  filter: none;
}

/* Background Arch Image */
.bg-arch-layer {
  position: absolute;
  inset: 0;
  background-image: url('assets/hero_arch.png');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Spotlight & Night Ambiance Overlay */
.spotlight-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: radial-gradient(circle at 50% 15%, rgba(255, 230, 160, 0.28) 0%, rgba(10, 14, 26, 0.72) 45%, rgba(3, 5, 10, 0.94) 85%);
  transition: opacity 1.2s ease, background 1.2s ease;
}

.spotlight-overlay .light-beam {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 65vh;
  background: linear-gradient(180deg, rgba(255, 240, 180, 0.35) 0%, rgba(255, 215, 140, 0.08) 60%, transparent 100%);
  clip-path: polygon(35% 0%, 65% 0%, 100% 100%, 0% 100%);
  filter: blur(16px);
  opacity: 0.8;
  transition: opacity 1s ease, width 1s ease;
}

.scene-container.illuminated .spotlight-overlay {
  opacity: 0.15;
}

.scene-container.illuminated .spotlight-overlay .light-beam {
  opacity: 0;
}

/* Flash Effect on Light-Up */
.flash-overlay {
  position: absolute;
  inset: 0;
  z-index: 90;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.08s ease-in;
}

.flash-overlay.active {
  opacity: 0.85;
}

/* ==========================================================================
   🌺 Decor PNG Layer & Animations
   ========================================================================== */

.decor-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.decor-png {
  position: absolute;
  opacity: 0.5;
  filter: brightness(0.7);
  mix-blend-mode: multiply;
  /* Blends out solid white image backgrounds into the pink scene */
  transition: opacity 1.4s ease, filter 1.4s ease, transform 0.8s ease-out;
}

.scene-container.illuminated .decor-png {
  opacity: 1;
  filter: brightness(1.05);
}

/* Highlighted Top Corner Garlands */
.top-left-flowers {
  top: -35px;
  /* Pushed deeper into the top-left corner */
  left: -80px;
  width: 380px;
  max-width: 44vw;
  animation: floatCornerLeft 6s ease-in-out infinite alternate;
}

.top-right-flowers {
  top: -35px;
  /* Pushed deeper into the top-right corner */
  right: -80px;
  width: 380px;
  max-width: 44vw;
  animation: floatCornerRight 6s ease-in-out infinite alternate;
}

.scene-container.illuminated .top-left-flowers,
.scene-container.illuminated .top-right-flowers {
  opacity: 1;
  filter: brightness(1.15) drop-shadow(0 0 22px rgba(255, 235, 170, 0.85)) drop-shadow(0 0 45px rgba(232, 106, 146, 0.55));
}

/* Highlighted Bottom Lotus & Emerging Floral Decor */
.bottom-left-lotus {
  bottom: -15px;
  left: -25px;
  /* Anchored to bottom-left corner */
  width: 340px;
  max-width: 40vw;
  animation: floatLotus 5s ease-in-out infinite alternate;
}

.bottom-right-lotus {
  bottom: -15px;
  right: -25px;
  /* Anchored to bottom-right corner */
  width: 340px;
  max-width: 40vw;
  animation: floatLotus 5.5s ease-in-out infinite alternate-reverse;
}

.bottom-center-lotus {
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 170px;
  max-width: 25vw;
  animation: floatLotusCenter 4.5s ease-in-out infinite alternate;
}

.scene-container.illuminated .bottom-left-lotus,
.scene-container.illuminated .bottom-right-lotus,
.scene-container.illuminated .bottom-center-lotus {
  opacity: 1;
  filter: brightness(1.12) drop-shadow(0 0 20px rgba(255, 230, 160, 0.8)) drop-shadow(0 0 35px rgba(232, 106, 146, 0.5));
}

@keyframes floatCornerRight {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  100% {
    transform: translateY(-8px) rotate(1.5deg);
  }
}

@keyframes floatCornerLeft {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  100% {
    transform: translateY(-8px) rotate(-1.5deg);
  }
}

@keyframes floatLotus {
  0% {
    transform: translateY(0px);
  }

  100% {
    transform: translateY(-10px);
  }
}

@keyframes floatLotusCenter {
  0% {
    transform: translateX(-50%) translateY(0px) scale(1);
  }

  100% {
    transform: translateX(-50%) translateY(-6px) scale(1.04);
  }
}

/* ==========================================================================
   🏮 Royal Jhoomer Lantern Component (Grand & Highlighted)
   ========================================================================== */

.jhoomer-container {
  position: absolute;
  top: -50px;
  /* Anchored right at top ceiling edge with no gap */
  left: 50%;
  transform: translateX(-50%) translateY(-200px) scale(0.65);
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  transition: transform 1.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 1.2s ease;
}

.scene-container.illuminated .jhoomer-container {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* Continuous Pendulum Sway Physics */
.jhoomer-swing {
  position: relative;
  transform-origin: top center;
  animation: jhoomerPendulum 4.5s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes jhoomerPendulum {
  0% {
    transform: rotate(-4deg);
  }

  100% {
    transform: rotate(4deg);
  }
}

.jhoomer-img {
  width: 540px;
  max-width: 85vw;
  height: auto;
  display: block;
  /* Glowing Highlight Effect */
  filter: drop-shadow(0 0 25px rgba(255, 235, 170, 0.95)) drop-shadow(0 0 60px rgba(232, 106, 146, 0.75)) brightness(1.18) contrast(1.05);
}

.jhoomer-glow-aura {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(255, 240, 180, 0.85) 0%, rgba(238, 110, 150, 0.38) 45%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: jhoomerPulse 3s ease-in-out infinite alternate;
}

@keyframes jhoomerPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0.7;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.28);
    opacity: 1;
  }
}

/* ==========================================================================
   🧵 Interactive Pull Rope Component (Realistic Overhead Rope Physics)
   ========================================================================== */

.rope-wrapper {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Ceiling glow highlight beam matching Reference Image 2 */
.rope-ceiling-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 235, 170, 0.35) 0%, rgba(255, 215, 140, 0.08) 100%);
  filter: blur(12px);
  pointer-events: none;
}

.rope-handle {
  position: relative;
  cursor: grab;
  touch-action: none;
  padding-bottom: 5px;
  transform-origin: top center;
  will-change: transform;
}

.rope-handle:active {
  cursor: grabbing;
}

.rope-img {
  width: 220px;
  /* Grand, prominent rope matching Reference Image 2 */
  max-width: 48vw;
  height: auto;
  max-height: 62vh;
  display: block;
  filter: drop-shadow(0 14px 35px rgba(0, 0, 0, 0.88)) brightness(1.1);
  pointer-events: none;
  transform-origin: top center;
}

.rope-glow-ring {
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 235, 170, 0.65) 0%, transparent 70%);
  pointer-events: none;
  animation: ropePulse 2s ease-in-out infinite alternate;
}

@keyframes ropePulse {
  0% {
    transform: translateX(-50%) scale(0.85);
    opacity: 0.5;
  }

  100% {
    transform: translateX(-50%) scale(1.25);
    opacity: 1;
  }
}

/* Rebound animation on release */
.rope-handle.rebounding {
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Elegant Bottom Hint Text (Matches Reference Image 2) */
.pull-text-bottom {
  position: absolute;
  bottom: 38%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 35;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 400;
  color: #EAD295;
  letter-spacing: 0.8px;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.95), 0 0 18px rgba(212, 175, 55, 0.5);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  animation: floatText 3s ease-in-out infinite alternate;
}

@keyframes floatText {
  0% {
    transform: translateX(-50%) translateY(0px);
    opacity: 0.9;
  }

  100% {
    transform: translateX(-50%) translateY(-5px);
    opacity: 1;
  }
}

/* Skip Intro Link at Bottom Right (Matches Reference Image 2) */
.skip-intro-btn {
  position: absolute;
  bottom: 22px;
  right: 28px;
  z-index: 45;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.3s ease, opacity 0.6s ease;
}

.skip-intro-btn:hover {
  color: #EAD295;
}

.scene-container.illuminated .rope-wrapper,
.scene-container.illuminated .pull-text-bottom,
.scene-container.illuminated .skip-intro-btn {
  pointer-events: none;
  opacity: 0 !important;
  visibility: hidden;
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0s 0.8s;
}

.scene-container.illuminated .rope-wrapper {
  transform: translateX(-50%) translateY(-100%);
}

/* ==========================================================================
   📜 Unlocked Royal Invitation Content
   ========================================================================== */

.invitation-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.92);
  z-index: 40;
  width: 92%;
  max-width: 580px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease 0.4s, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scene-container.illuminated .invitation-content {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.shloka {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #FCE8BD;
  letter-spacing: 3px;
  margin-bottom: 6px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.98), 0 0 20px rgba(0, 0, 0, 0.95), 0 0 28px rgba(212, 175, 55, 0.7);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.98));
}

.couple-title-wrap {
  position: relative;
  margin: 6px 0;
}

.couple-names {
  font-family: var(--font-script);
  font-size: clamp(3.4rem, 9vw, 5.2rem);
  font-weight: 500;
  line-height: 1.15;
  color: #F5C86B;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF3D4 25%, #F7D070 65%, #EAA232 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.98)) drop-shadow(0 0 20px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 35px rgba(212, 175, 55, 0.7));
  letter-spacing: 1px;
}

.couple-names .ampersand {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  font-style: italic;
  color: #FFE699;
  -webkit-text-fill-color: #FFE699;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 1)) drop-shadow(0 0 16px rgba(212, 175, 55, 0.85));
  margin: 0 6px;
}

.details-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 10px 0 14px;
  opacity: 0.9;
}

.details-divider .line {
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.details-divider .diamond {
  color: var(--gold-primary);
  font-size: 0.85rem;
  text-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
}

.event-meta {
  margin-bottom: 14px;
}

.event-date {
  font-family: var(--font-sans);
  font-size: clamp(1.0rem, 2.3vw, 1.2rem);
  font-weight: 600;
  letter-spacing: 4px;
  color: #FFF;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.98), 0 0 20px rgba(0, 0, 0, 0.95), 0 0 30px rgba(212, 175, 55, 0.6);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.98));
}

.event-venue {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  font-style: italic;
  color: #FCE8BD;
  letter-spacing: 1px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.98), 0 0 20px rgba(0, 0, 0, 0.95), 0 0 30px rgba(212, 175, 55, 0.6);
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.98));
}

.cta-wrap {
  margin-top: 10px;
}

.explore-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.45) 0%, rgba(212, 175, 55, 0.2) 100%);
  border: 1px solid var(--gold-primary);
  border-radius: 40px;
  color: #FFF;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 0 14px rgba(212, 175, 55, 0.35);
  transition: all 0.3s ease;
}

.explore-btn:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.55) 0%, rgba(212, 175, 55, 0.25) 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(212, 175, 55, 0.5);
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .event-date {
    font-size: 1rem;
    letter-spacing: 2px;
  }

  .event-venue {
    font-size: 1.05rem;
  }

  .pull-badge {
    font-size: 0.75rem;
    padding: 8px 16px;
  }

  .top-left-flowers,
  .top-right-flowers {
    width: 200px;
  }

  .bottom-left-lotus,
  .bottom-right-lotus {
    width: 180px;
  }
}

/* ==========================================================================
   🏛️ Main Royal Invitation Section (Inspiration Screenshot Match)
   ========================================================================== */

.invitation-section {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  background-color: var(--dark-night);
  overflow: hidden;
}

/* Central Royal Card Frame (Aspect-Ratio Preserved) */
.royal-card-container {
  position: relative;
  width: 100%;
  max-width: 580px;
  aspect-ratio: 1 / 1.52;
  /* Matches natural card_arch_frame.png ratio */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.card-arch-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Prevents squishing or distortion */
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7));
  pointer-events: none;
  z-index: 1;
}

/* Royal Card Inner Body (Strictly position INSIDE cream arch area) */
.royal-card-body {
  position: absolute;
  z-index: 2;
  top: 23%;
  /* Below top floral arch dome */
  bottom: 20%;
  /* Above bottom lotus flowers */
  left: 15%;
  /* Inside left pillar */
  right: 15%;
  /* Inside right pillar */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  padding: 4px 2px;
  box-sizing: border-box;
  overflow: hidden;
}

/* Blessings Header */
.blessing-header {
  margin: 0;
}

.blessing-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.78rem, 2.5vw, 1.15rem);
  color: #6D5438;
  letter-spacing: 0.5px;
  line-height: 1.35;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Ornamental Dividers */
.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 72%;
  margin: 2px 0;
}

.ornament-divider .divider-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, #C59D45, transparent);
  opacity: 0.6;
}

.ornament-divider .divider-flower {
  color: #C59D45;
  font-size: 0.78rem;
  opacity: 0.85;
}

/* Couple Names Typography (Serif Classical Gold) */
.couple-name-box {
  margin: 2px 0;
}

.invitation-couple-names {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 6vw, 3.6rem);
  color: #C59D45;
  letter-spacing: 1.5px;
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.6), 0 1px 1px rgba(0, 0, 0, 0.15);
}

.invitation-couple-names .inv-amp {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 4.8vw, 2.8rem);
  color: #C59D45;
  margin: 0 4px;
}

/* Parents & Host Information */
.parents-info {
  margin: 2px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.parents-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.72rem, 2.3vw, 1.04rem);
  color: #5C4632;
  letter-spacing: 0.3px;
  line-height: 1.35;
}

.invite-line {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.72rem, 2.3vw, 1.04rem);
  color: #6D5438;
  margin-top: 2px;
}

/* Event Details (Date & Venue) */
.event-details {
  margin-top: 2px;
}

.inv-date {
  font-family: var(--font-serif);
  font-size: clamp(1.0rem, 3.1vw, 1.55rem);
  color: #7E223B;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.inv-date .day-num {
  font-size: 1.15em;
  font-weight: 600;
  margin-right: 3px;
}

.inv-venue {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.78rem, 2.4vw, 1.12rem);
  color: #6D5438;
  margin-top: 2px;
  letter-spacing: 0.5px;
}

/* View Events Button */
.view-events-wrap {
  margin-top: 4px;
}

.view-events-btn {
  background: #9A8D79;
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: clamp(0.65rem, 2vw, 0.8rem);
  font-weight: 600;
  letter-spacing: 2px;
  padding: 8px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.view-events-btn:hover {
  background: #857864;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Lenis Smooth Scroll Rules */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Floating Medallion Action Controls */
.floating-controls {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.floating-medallion-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, opacity 0.5s ease;
}

.floating-medallion-btn:hover {
  transform: scale(1.14);
}

.medallion-icon-img {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.65));
  animation: continuousRotate 15s linear infinite;
  will-change: transform;
}

/* Music Toggle Button States (Fades out when stopped, bright & glowing when playing) */
.music-btn {
  opacity: 0.4;
}

.music-btn .music-icon-img {
  animation-play-state: paused;
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.music-btn:hover {
  opacity: 0.85;
}

.music-btn.playing {
  opacity: 1;
}

.music-btn.playing .music-icon-img {
  animation-play-state: running;
  animation-duration: 6s;
  filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.95)) drop-shadow(0 8px 22px rgba(0, 0, 0, 0.65));
}

.direction-icon-img {
  animation-duration: 22s;
  animation-direction: reverse;
}

@keyframes continuousRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Scaling for Mobile Screens */
@media (max-width: 768px) {
  .invitation-section {
    padding: 16px 8px;
  }

  .royal-card-container {
    width: 94vw;
    max-width: 460px;
  }

  .floating-controls {
    bottom: 20px;
    right: 18px;
    gap: 18px;
  }

  .floating-medallion-btn {
    width: 54px;
    height: 54px;
  }

  .medallion-icon-img {
    width: 54px;
    height: 54px;
  }
}

/* ==========================================================================
   🌺 Celebration Journey Section ("Our Events")
   ========================================================================== */

.events-section {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  background-color: #160812;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 90px 20px 80px 20px;
  overflow: hidden;
}

/* Background Texture Layer */
.events-bg-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(232, 106, 146, 0.12) 0%, rgba(22, 8, 18, 0.95) 75%);
  pointer-events: none;
  z-index: 1;
}

/* Top Decor Layer (Corner Garlands & Hanging Jhoomer) */
.events-decor-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  pointer-events: none;
  z-index: 10;
}

.events-decor-png {
  position: absolute;
  top: -20px;
  width: 320px;
  max-width: 38vw;
  filter: brightness(1.1) drop-shadow(0 0 20px rgba(255, 235, 170, 0.7));
  mix-blend-mode: multiply;
}

.events-top-left {
  left: -40px;
  animation: floatCornerLeft 6s ease-in-out infinite alternate;
}

.events-top-right {
  right: -40px;
  animation: floatCornerRight 6s ease-in-out infinite alternate;
}

.events-jhoomer-container {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.events-jhoomer-container .jhoomer-img {
  width: 520px;
  max-width: 82vw;
  height: auto;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 30px rgba(212, 175, 55, 0.4));
}

.events-jhoomer-swing {
  position: relative;
  transform-origin: top center;
  animation: jhoomerPendulum 4.5s ease-in-out infinite alternate;
}

/* Side Animal Motifs Layer (Tucked 50% Behind Scroll Grid) */
.side-decor-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.side-animal-container {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  transition: transform 0.4s ease;
}

.animal-png {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.7));
}

/* Animals sized larger & tucked 50% behind the 1180px scroll grid cards */
.left-peacock {
  left: calc(50% - 680px);
  top: 380px;
  width: 280px;
  max-width: 26vw;
  animation: floatCornerLeft 7s ease-in-out infinite alternate;
}

.right-elephant {
  right: calc(50% - 700px);
  top: 400px;
  width: 330px;
  max-width: 28vw;
  animation: floatCornerRight 7s ease-in-out infinite alternate;
}

.left-cow {
  left: calc(50% - 670px);
  top: 980px;
  width: 270px;
  max-width: 25vw;
}

.right-horse {
  right: calc(50% - 690px);
  top: 1010px;
  width: 300px;
  max-width: 27vw;
}

.left-deer {
  left: calc(50% - 650px);
  top: 1540px;
  width: 240px;
  max-width: 23vw;
}

.right-parrot {
  right: calc(50% - 650px);
  top: 1560px;
  width: 220px;
  max-width: 22vw;
}

/* Header Section (Positioned Cleanly Below Grand Jhoomer Tassels) */
.events-header {
  position: relative;
  z-index: 12;
  text-align: center;
  margin-top: 280px;
  /* Placed cleanly below 520px jhoomer tassels */
  margin-bottom: 45px;
}

.events-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 1.8vw, 0.92rem);
  font-weight: 600;
  letter-spacing: 4px;
  color: #D4AF37;
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.events-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 400;
  color: #FFF3D4;
  letter-spacing: 1px;
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.3);
}

.events-underline-img {
  width: 340px;
  max-width: 85vw;
  height: auto;
  display: block;
  margin: 12px auto 0;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
}

/* Events Grid Container */
.events-grid {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* Royal Parchment Unrolled Scroll Card (using scroll.png) */
.event-scroll-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.62;
  /* Matches natural unrolled scroll.png ratio */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s ease, filter 0.35s ease;
  animation: floatScroll 4.8s ease-in-out infinite alternate;
}

.event-scroll-card:nth-child(1) { animation-delay: 0s; }
.event-scroll-card:nth-child(2) { animation-delay: 0.8s; }
.event-scroll-card:nth-child(3) { animation-delay: 1.6s; }
.event-scroll-card:nth-child(4) { animation-delay: 0.4s; }
.event-scroll-card:nth-child(5) { animation-delay: 1.2s; }
.event-scroll-card:nth-child(6) { animation-delay: 2.0s; }

@keyframes floatScroll {
  0% {
    transform: translateY(0px);
  }
  100% {
    transform: translateY(-12px);
  }
}

.event-scroll-card:hover {
  transform: translateY(-16px) scale(1.02);
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 30px rgba(212, 175, 55, 0.45));
}

.scroll-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.6));
  pointer-events: none;
  z-index: 1;
}

/* Text & Content Strictly Positioned Inside Scroll Paper Body */
.scroll-card-content {
  position: absolute;
  z-index: 2;
  top: 13%;
  /* Below top golden roller & lotus border */
  bottom: 11%;
  /* Above bottom golden roller & lotus border */
  left: 14%;
  /* Inside left lotus vine border */
  right: 14%;
  /* Inside right lotus vine border */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  padding: 4px 2px;
  box-sizing: border-box;
  overflow: hidden;
}

.event-icon-badge {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 2px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.event-card-title {
  font-family: var(--font-script);
  font-size: clamp(2.2rem, 4vw, 3.1rem);
  font-weight: 400;
  color: #7E223B;
  line-height: 1.1;
  margin-bottom: 4px;
}

.event-card-datetime {
  font-family: var(--font-sans);
  font-size: clamp(0.72rem, 1.4vw, 0.84rem);
  font-weight: 600;
  letter-spacing: 1.8px;
  color: #C59D45;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.event-card-venue {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 1.8vw, 1.18rem);
  color: #4A3525;
  margin-bottom: 2px;
}

.event-card-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.82rem, 1.5vw, 0.95rem);
  color: #7A624A;
  margin-bottom: 8px;
  opacity: 0.9;
}

/* Open in Maps Interactive Link Button */
.maps-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  background: rgba(126, 34, 59, 0.08);
  border: 1px solid #7E223B;
  border-radius: 20px;
  color: #7E223B;
  font-family: var(--font-sans);
  font-size: clamp(0.68rem, 1.3vw, 0.78rem);
  font-weight: 600;
  letter-spacing: 0.8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.maps-link-btn:hover {
  background: #7E223B;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(126, 34, 59, 0.3);
}

/* Card Animal Decor for Mobile (Hidden on Desktop) */
.card-animal-decor {
  display: none;
}

/* Responsive Media Queries for Events Grid & Animals */
@media (max-width: 1024px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    max-width: 768px;
  }

  .side-animal-container {
    opacity: 0.6;
  }
}

@media (max-width: 680px) {
  .events-section {
    padding: 70px 10px 60px 10px;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 360px;
  }

  .events-decor-png {
    width: 220px;
  }

  .side-animal-container {
    display: none;
    /* Hide heavy side motifs on mobile to maximize scroll card space */
  }

  /* Per-card Mobile Decorative Animals (Tucked 50% Behind Scroll Card) */
  .card-animal-decor {
    display: block;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
    width: 220px;
    max-width: 58%;
    pointer-events: none;
    transition: transform 0.35s ease;
  }

  .card-animal-decor.animal-right {
    right: -28%;
  }

  .card-animal-decor.animal-left {
    left: -28%;
  }

  .animal-png.flip-face {
    transform: scaleX(-1);
  }
}

/* ==========================================================================
   🌺 Guest Essentials Section ("Things to Know")
   ========================================================================== */

.guest-essentials-section {
  position: relative;
  width: 100vw;
  padding: 90px 24px 100px;
  background: linear-gradient(135deg, #8B223B 0%, #A42845 50%, #761C30 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid rgba(212, 175, 55, 0.4);
  border-bottom: 1px solid rgba(212, 175, 55, 0.4);
}

.essentials-watermarks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.watermark-png {
  position: absolute;
  opacity: 0.12;
  filter: brightness(1.5) sepia(0.5);
  mix-blend-mode: overlay;
}

.peacock-watermark {
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  max-width: 80vw;
}

.cow-watermark {
  top: 15px;
  right: 20px;
  width: 220px;
}

.elephant-watermark {
  bottom: 20px;
  left: -20px;
  width: 240px;
}

.essentials-header {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 650px;
  margin-bottom: 50px;
}

.essentials-subtitle {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.essentials-title {
  font-family: var(--font-script);
  font-size: clamp(3.2rem, 7.5vw, 4.8rem);
  font-weight: 400;
  color: #FFFFFF;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.essentials-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 12px 0 10px;
}

.essentials-divider .line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.essentials-divider .diamond {
  color: var(--gold-primary);
  font-size: 0.8rem;
}

.essentials-note {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.98rem, 2vw, 1.2rem);
  color: #FCE8BD;
  letter-spacing: 0.5px;
  opacity: 0.95;
}

/* 4-Card Grid Layout */
.essentials-grid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  width: 100%;
  max-width: 1240px;
}

.essential-card {
  position: relative;
  background: linear-gradient(180deg, #FDF9F0 0%, #F6ECDA 100%);
  border: 1px solid rgba(197, 157, 69, 0.45);
  border-radius: 16px;
  padding: 36px 22px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35), inset 0 0 20px rgba(255, 255, 255, 0.6);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.essential-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), inset 0 0 25px rgba(255, 255, 255, 0.8);
}

/* Decorative Gold Corner Accents */
.card-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--gold-primary);
  pointer-events: none;
}

.corner-tl {
  top: 8px;
  left: 8px;
  border-right: none;
  border-bottom: none;
}

.corner-br {
  bottom: 8px;
  right: 8px;
  border-left: none;
  border-top: none;
}

.essential-icon-badge {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 240, 200, 0.8) 0%, rgba(245, 220, 170, 0.4) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: inset 0 0 10px rgba(212, 175, 55, 0.25);
}

.essential-card-title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: #7E2038;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.essential-card-desc {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.92rem, 1.8vw, 1.06rem);
  color: #5C4632;
  line-height: 1.5;
}

.essential-card-desc em {
  font-style: normal;
  color: #7E2038;
  font-weight: 600;
}

/* ==========================================================================
   💌 RSVP & Save the Date Section ("Will you join us?")
   ========================================================================== */

.rsvp-section {
  position: relative;
  width: 100vw;
  min-height: 90vh;
  padding: 100px 24px;
  background-color: var(--dark-night);
  background-image: url('assets/hero_arch.png');
  background-size: cover;
  background-position: center center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rsvp-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, rgba(12, 18, 35, 0.72) 0%, rgba(6, 9, 18, 0.92) 75%, rgba(3, 4, 10, 0.98) 100%);
  z-index: 1;
}

.rsvp-container {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.rsvp-subtitle {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 3.5px;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.rsvp-heading {
  font-family: var(--font-serif);
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  font-weight: 400;
  color: #FFFFFF;
  line-height: 1.15;
  letter-spacing: 1px;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.9);
  margin-bottom: 12px;
}

.rsvp-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 8px 0 20px;
  width: 60%;
}

.rsvp-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-primary), transparent);
}

.rsvp-divider .flower-icon {
  color: var(--gold-primary);
  font-size: 0.9rem;
}

.rsvp-description {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.4vw, 1.32rem);
  color: #FCE8BD;
  line-height: 1.65;
  max-width: 620px;
  margin-bottom: 36px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.rsvp-action-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 50px;
}

.rsvp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 46px;
  background: linear-gradient(135deg, #7E2038 0%, #561426 100%);
  border: 1.5px solid var(--gold-primary);
  border-radius: 4px;
  color: #FCE8BD;
  font-family: var(--font-sans);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), inset 0 0 15px rgba(212, 175, 55, 0.35);
  transition: all 0.35s ease;
}

.rsvp-btn:hover {
  background: linear-gradient(135deg, #962744 0%, #6E1A31 100%);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(212, 175, 55, 0.5);
  color: #FFFFFF;
}

.rsvp-hint-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: rgba(252, 232, 189, 0.75);
  letter-spacing: 0.5px;
}

/* Save the Date sub-section */
.save-the-date-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.std-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
  max-width: 480px;
  margin-bottom: 20px;
}

.std-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}

.std-text {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--gold-primary);
  text-transform: uppercase;
}

.calendar-btn-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.calendar-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: rgba(15, 20, 35, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 30px;
  color: #FCE8BD;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: all 0.35s ease;
}

.calendar-pill-btn:hover {
  background: rgba(212, 175, 55, 0.25);
  border-color: var(--gold-primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Responsive queries */
@media (max-width: 1024px) {
  .essentials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .events-header {
    margin-top: 245px;
    margin-bottom: 35px;
  }

  .peacock-watermark {
    display: none; /* Removes square box background PNG behind peacock on mobile */
  }

  .rsvp-container {
    margin-top: 0;
    padding: 0 20px;
  }
}

@media (max-width: 600px) {
  .essentials-grid {
    grid-template-columns: 1fr;
  }
  .rsvp-heading {
    font-size: clamp(2.0rem, 6vw, 3.2rem);
  }
  .calendar-btn-group {
    flex-direction: column;
    width: 100%;
  }
  .calendar-pill-btn {
    width: 100%;
    justify-content: center;
  }
  .rsvp-btn {
    width: 100%;
    padding: 16px 20px;
  }
}