/* ==========================================================================
   Sajid & Farheen - Cinematic Single-Page Wedding Invitation
   Theme System:
   - Dynamic Scroll-Driven Event Palettes:
     * Mehandi (Jan 27): Deep Royal Blue accents with intricate botanical motifs
     * Haldi (Jan 28): Vibrant Marigold Yellow & Warm Gold with Genda Phool
     * Valima (Jan 30): Deep Royal Blue & Gold luxury finish
   - Canva-Style Scroll Slide-In Animations (Panels glide & lock into center)
   - Cinematic Intro Overlay with Smart Session Caching (localStorage)
   Strictly Zero Emojis. Clean Classical Serif Typography.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700;800;900&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Royal Blue Watercolor Tones (Mehandi & Valima & Default) */
  --royal-950: #06152b;
  --royal-900: #0c2142;
  --royal-800: #12325e;
  --royal-700: #1a457e;
  --royal-600: #255ba3;
  --royal-400: #4982cc;
  --royal-100: #e7effa;
  --royal-50: #f3f7fd;

  /* Shimmering Metallic Gold Palette */
  --gold-primary: #c59b3f;
  --gold-light: #f4e4b5;
  --gold-dark: #876214;
  --gold-border: rgba(197, 155, 63, 0.42);

  /* Haldi Vibrant Marigold Yellow & Warm Gold Tones */
  --marigold-yellow: #f59e0b;
  --marigold-bright: #fbbf24;
  --marigold-sun: #ffd000;
  --marigold-deep: #b45309;
  --marigold-warm-bg: #fffbf0;

  /* Ivory Canvas Backgrounds */
  --bg-ivory: #faf8f5;
  --bg-ivory-warm: #f4efe4;
  --text-dark: #0a1b33;
  --text-body: #334a66;
  --text-muted: #64748b;

  /* Dynamic Active Palette Tokens (updated via JS on scroll) */
  --active-accent: var(--royal-800);
  --active-border: var(--gold-border);
  --active-glow: rgba(197, 155, 63, 0.25);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-ivory);
  color: var(--text-dark);
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.8s ease, color 0.8s ease;
}

/* Custom Refined Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--bg-ivory-warm);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d8b86d, #b88f34);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a37c27;
}

::selection {
  background: #ecd599;
  color: #0c2142;
}

/* Typography Utilities */
.font-cinzel {
  font-family: 'Cinzel', serif;
}

.font-cormorant {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-playfair {
  font-family: 'Playfair Display', Georgia, serif;
}

/* Gold Text Gradient & Foil */
.gold-text-gradient {
  background: linear-gradient(
    135deg,
    #9c721b 0%,
    #d4af37 30%,
    #fae8a4 50%,
    #c4972e 70%,
    #8e6515 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShine 7s ease-in-out infinite alternate;
}

.gold-text-static {
  background: linear-gradient(135deg, #9e741e 0%, #cf9f33 50%, #876010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.royal-text-gradient {
  background: linear-gradient(135deg, #0c2142 0%, #1a457e 55%, #06152b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.marigold-text-gradient {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@keyframes goldShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Fine Art Paper Texture */
.fine-paper-texture {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(rgba(14, 36, 71, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.85;
}

/* Watercolor Canvas Background Container */
.watercolor-bg-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  transition: opacity 1s ease;
}

.watercolor-wash-1 {
  position: absolute;
  top: -6%;
  right: -6%;
  width: 55vw;
  height: 55vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle at 65% 35%, rgba(26, 69, 126, 0.22) 0%, rgba(37, 91, 163, 0.12) 45%, transparent 72%);
  filter: blur(60px);
  border-radius: 43% 57% 65% 35% / 48% 41% 59% 52%;
  animation: gentlePulse 20s ease-in-out infinite alternate;
  transition: background 1s ease;
}

.watercolor-wash-2 {
  position: absolute;
  bottom: 4%;
  left: -8%;
  width: 52vw;
  height: 52vw;
  max-width: 780px;
  max-height: 780px;
  background: radial-gradient(circle at 35% 65%, rgba(18, 50, 94, 0.18) 0%, rgba(26, 69, 126, 0.09) 45%, transparent 70%);
  filter: blur(55px);
  border-radius: 58% 42% 38% 62% / 42% 53% 47% 58%;
  animation: gentlePulse 24s ease-in-out infinite alternate-reverse;
  transition: background 1s ease;
}

.watercolor-wash-3 {
  position: absolute;
  top: 48%;
  left: 28%;
  width: 38vw;
  height: 38vw;
  max-width: 520px;
  max-height: 520px;
  background: radial-gradient(circle, rgba(197, 155, 63, 0.12) 0%, rgba(244, 228, 181, 0.04) 50%, transparent 70%);
  filter: blur(50px);
  border-radius: 50%;
  animation: floatSlow 16s ease-in-out infinite alternate;
  transition: background 1s ease;
}

/* 3D WebGL Canvas Layer */
#webgl-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
}

/* ==========================================================================
   DYNAMIC SCROLL-DRIVEN PALETTES (Body Classes)
   ========================================================================== */
/* Haldi Theme: Vibrant Marigold Yellow & Warm Gold */
body.palette-haldi {
  background-color: var(--marigold-warm-bg);
}

body.palette-haldi .watercolor-wash-1 {
  background: radial-gradient(circle at 65% 35%, rgba(245, 158, 11, 0.25) 0%, rgba(251, 191, 36, 0.15) 45%, transparent 72%);
}

body.palette-haldi .watercolor-wash-2 {
  background: radial-gradient(circle at 35% 65%, rgba(180, 83, 9, 0.18) 0%, rgba(253, 230, 138, 0.22) 45%, transparent 70%);
}

body.palette-haldi .watercolor-wash-3 {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(251, 191, 36, 0.08) 50%, transparent 70%);
}

/* Mehandi Theme: Deep Royal Blue with Intricate Botanical/Floral Accents */
body.palette-mehandi {
  background-color: #f7f9fd;
}
body.palette-mehandi .watercolor-wash-1 {
  background: radial-gradient(circle at 65% 35%, rgba(18, 50, 94, 0.32) 0%, rgba(37, 91, 163, 0.18) 45%, transparent 72%);
}
body.palette-mehandi .watercolor-wash-2 {
  background: radial-gradient(circle at 35% 65%, rgba(12, 33, 66, 0.28) 0%, rgba(26, 69, 126, 0.14) 45%, transparent 70%);
}
body.palette-mehandi .watercolor-wash-3 {
  background: radial-gradient(circle, rgba(197, 155, 63, 0.18) 0%, rgba(37, 91, 163, 0.08) 50%, transparent 70%);
}

/* Barat Theme: Deep Royal Blue & Gold Luxury Finish */
body.palette-barat {
  background-color: #f5f8fc;
}
body.palette-barat .watercolor-wash-1 {
  background: radial-gradient(circle at 65% 35%, rgba(12, 33, 66, 0.38) 0%, rgba(197, 155, 63, 0.22) 45%, transparent 72%);
}
body.palette-barat .watercolor-wash-2 {
  background: radial-gradient(circle at 35% 65%, rgba(18, 50, 94, 0.3) 0%, rgba(212, 175, 55, 0.18) 45%, transparent 70%);
}
body.palette-barat .watercolor-wash-3 {
  background: radial-gradient(circle, rgba(197, 155, 63, 0.25) 0%, rgba(12, 33, 66, 0.15) 50%, transparent 70%);
}

/* Valima Theme: Deep Royal Blue & Gold Luxury Finish */
body.palette-valima {
  background-color: #f6f8fc;
}
body.palette-valima .watercolor-wash-1 {
  background: radial-gradient(circle at 65% 35%, rgba(12, 33, 66, 0.35) 0%, rgba(197, 155, 63, 0.2) 45%, transparent 72%);
}
body.palette-valima .watercolor-wash-2 {
  background: radial-gradient(circle at 35% 65%, rgba(6, 21, 43, 0.28) 0%, rgba(212, 175, 55, 0.15) 45%, transparent 70%);
}
body.palette-valima .watercolor-wash-3 {
  background: radial-gradient(circle, rgba(197, 155, 63, 0.22) 0%, rgba(12, 33, 66, 0.12) 50%, transparent 70%);
}

/* ==========================================================================
   CANVA-STYLE SMOOTH SLIDE-IN TRANSITIONS
   Panels glide smoothly from sides and lock into center view on scroll.
   Mobile-optimized with constrained offsets to prevent horizontal shifts.
   ========================================================================== */
.canva-panel-left {
  opacity: 0;
  transform: translateX(-48px);
  filter: blur(3px);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s ease, filter 0.85s ease;
  will-change: transform, opacity;
}

.canva-panel-right {
  opacity: 0;
  transform: translateX(48px);
  filter: blur(3px);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s ease, filter 0.85s ease;
  will-change: transform, opacity;
}

.canva-panel-center {
  opacity: 0;
  transform: translateY(36px) scale(0.97);
  filter: blur(3px);
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s ease, filter 0.85s ease;
  will-change: transform, opacity;
}

.canva-locked {
  opacity: 1 !important;
  transform: translate(0, 0) scale(1) !important;
  filter: blur(0) !important;
}

.canva-delay-1 {
  transition-delay: 0.12s;
}

.canva-delay-2 {
  transition-delay: 0.22s;
}

.canva-delay-3 {
  transition-delay: 0.34s;
}

@media (max-width: 640px) {
  .canva-panel-left {
    transform: translateX(-24px);
    transition-duration: 0.7s;
  }
  .canva-panel-right {
    transform: translateX(24px);
    transition-duration: 0.7s;
  }
  .canva-panel-center {
    transform: translateY(22px) scale(0.98);
    transition-duration: 0.7s;
  }
}

/* ==========================================================================
   CINEMATIC INTRO OVERLAY & SMART SESSION / CACHING
   ========================================================================== */
#cinematic-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: #faf8f5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 1.2s ease;
}

#cinematic-intro-overlay.intro-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-curtain-left,
.envelope-curtain-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50vw;
  background: radial-gradient(circle at center, #ffffff 0%, #faf8f5 100%);
  border-bottom: 2px solid rgba(197, 155, 63, 0.3);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 101;
}

.envelope-curtain-left {
  left: 0;
  border-right: 1px solid rgba(197, 155, 63, 0.35);
}

.envelope-curtain-right {
  right: 0;
  border-left: 1px solid rgba(197, 155, 63, 0.35);
}

#cinematic-intro-overlay.intro-dismissed .envelope-curtain-left {
  transform: translateX(-100%);
}

#cinematic-intro-overlay.intro-dismissed .envelope-curtain-right {
  transform: translateX(100%);
}

.royal-wax-seal-btn {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle, #f5d061 0%, #c59b3f 60%, #876214 100%);
  border: 3px solid #fff5c0;
  box-shadow: 
    0 12px 32px rgba(12, 33, 66, 0.28),
    0 0 24px rgba(197, 155, 63, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  animation: sealPulse 3s infinite alternate;
}

.royal-wax-seal-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 
    0 16px 40px rgba(12, 33, 66, 0.35),
    0 0 35px rgba(212, 175, 55, 0.7);
}

.royal-wax-seal-btn:active {
  transform: scale(0.95);
}

@keyframes sealPulse {
  0% { transform: scale(1); box-shadow: 0 10px 25px rgba(12, 33, 66, 0.2); }
  100% { transform: scale(1.05); box-shadow: 0 15px 35px rgba(197, 155, 63, 0.45); }
}

/* ==========================================================================
   CARDS & ARCHES
   ========================================================================== */
.card-wedding-arch {
  background: #fdfbf7;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 200px 200px 32px 32px;
  border: 1.5px solid rgba(197, 155, 63, 0.45);
  box-shadow: 
    0 24px 50px -12px rgba(12, 33, 66, 0.12),
    0 10px 24px -6px rgba(197, 155, 63, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.card-wedding-arch::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 193px 193px 25px 25px;
  border: 1px solid rgba(197, 155, 63, 0.25);
  pointer-events: none;
}

.card-royal-ivory {
  background: #fdfbf7;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1px solid rgba(197, 155, 63, 0.35);
  box-shadow: 
    0 16px 36px -10px rgba(12, 33, 66, 0.08),
    0 6px 16px -6px rgba(197, 155, 63, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-royal-ivory:hover {
  border-color: rgba(197, 155, 63, 0.65);
  box-shadow: 
    0 24px 48px -12px rgba(12, 33, 66, 0.14),
    0 10px 24px -8px rgba(197, 155, 63, 0.22);
}

/* Mehandi Card: Deep Royal Blue Accents with Intricate Botanical & Floral Motifs */
.card-mehandi-blue {
  background: #fdfbf7;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1.5px solid rgba(18, 50, 94, 0.45);
  box-shadow: 
    0 20px 45px -12px rgba(12, 33, 66, 0.16),
    0 8px 20px -6px rgba(37, 91, 163, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-mehandi-blue::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 140px;
  height: 140px;
  background-image: radial-gradient(circle at top right, rgba(26, 69, 126, 0.09) 0%, transparent 70%);
  pointer-events: none;
}

.card-mehandi-blue:hover {
  border-color: rgba(37, 91, 163, 0.75);
  box-shadow: 
    0 28px 55px -12px rgba(12, 33, 66, 0.22),
    0 12px 28px -6px rgba(37, 91, 163, 0.26);
  transform: translateY(-2px);
}

/* Live Countdown Box: Deep Royal Blue with Botanical Accents */
.card-countdown-blue {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  border: 1.5px solid rgba(18, 50, 94, 0.35);
  box-shadow: 
    0 16px 36px -10px rgba(12, 33, 66, 0.12),
    0 6px 16px -6px rgba(37, 91, 163, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-countdown-blue:hover {
  border-color: rgba(197, 155, 63, 0.7);
  box-shadow: 
    0 24px 45px -10px rgba(12, 33, 66, 0.18),
    0 8px 20px -6px rgba(197, 155, 63, 0.25);
  transform: translateY(-3px);
}

/* Haldi Card: Vibrant Marigold Yellow & Warm Gold Tones with Genda Phool Styling */
.card-haldi-yellow {
  background: #fdfbf7;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 
    0 20px 45px -12px rgba(180, 83, 9, 0.14),
    0 8px 20px -6px rgba(251, 191, 36, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-haldi-yellow:hover {
  border-color: rgba(245, 158, 11, 0.8);
  box-shadow: 
    0 28px 55px -12px rgba(180, 83, 9, 0.22),
    0 12px 28px -6px rgba(251, 191, 36, 0.28);
  transform: translateY(-2px);
}

/* Barat Card: Deep Royal Blue & Gold Luxury Finish */
.card-barat-royal {
  background: #fdfbf7;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1.5px solid rgba(18, 50, 94, 0.48);
  box-shadow: 
    0 20px 45px -12px rgba(12, 33, 66, 0.18),
    0 8px 20px -6px rgba(197, 155, 63, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-barat-royal:hover {
  border-color: rgba(197, 155, 63, 0.85);
  box-shadow: 
    0 28px 55px -12px rgba(12, 33, 66, 0.26),
    0 12px 28px -6px rgba(197, 155, 63, 0.35);
  transform: translateY(-2px);
}

/* Valima Card: Deep Royal Blue & Gold Luxury Finish */
.card-valima-luxury {
  background: #fdfbf7;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1.5px solid rgba(197, 155, 63, 0.45);
  box-shadow: 
    0 20px 45px -12px rgba(12, 33, 66, 0.15),
    0 8px 20px -6px rgba(197, 155, 63, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-valima-luxury:hover {
  border-color: rgba(212, 175, 55, 0.85);
  box-shadow: 
    0 28px 55px -12px rgba(12, 33, 66, 0.22),
    0 12px 28px -6px rgba(197, 155, 63, 0.32);
  transform: translateY(-2px);
}

.blue-text-gradient {
  background: linear-gradient(135deg, #06152b 0%, #0c2142 40%, #1a457e 75%, #255ba3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Haldi Marigold Card Variant */
.card-haldi-marigold {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  box-shadow: 
    0 20px 45px -12px rgba(180, 83, 9, 0.14),
    0 8px 20px -6px rgba(251, 191, 36, 0.16);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-haldi-marigold:hover {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 
    0 28px 55px -12px rgba(180, 83, 9, 0.2),
    0 12px 28px -6px rgba(251, 191, 36, 0.25);
}

/* Genda Phool Garland Graphic */
.genda-garland {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 0;
}

.genda-flower {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
  transition: transform 0.3s ease;
}

.genda-flower:hover {
  transform: scale(1.15) rotate(15deg);
}

.genda-orange {
  background: radial-gradient(circle, #ffd000 15%, #f59e0b 65%, #b45309 100%);
}

.genda-yellow {
  background: radial-gradient(circle, #fff066 15%, #ffd000 65%, #d97706 100%);
}

/* 3D Tilt Container */
.tilt-card-container {
  perspective: 1200px;
  transform-style: preserve-3d;
}

.tilt-card-inner {
  transition: transform 0.25s cubic-bezier(0.2, 0, 0.2, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

/* ==========================================================================
   BUTTONS WITH POLISHED HOVER AND ACTIVE CLICK STATES
   ========================================================================== */
.btn-royal-primary {
  background: linear-gradient(135deg, #0c2142 0%, #163a6b 50%, #08162b 100%);
  color: #faf8f5;
  border: 1px solid rgba(197, 155, 63, 0.65);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px -6px rgba(12, 33, 66, 0.32);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-royal-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 50%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 0%,
    rgba(255, 244, 209, 0.35) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  transition: all 0.75s ease;
}

.btn-royal-primary:hover {
  background: linear-gradient(135deg, #12325e 0%, #1d4d8c 50%, #0c2142 100%);
  border-color: #d4af37;
  box-shadow: 0 12px 30px -6px rgba(12, 33, 66, 0.42), 0 0 16px rgba(197, 155, 63, 0.3);
  transform: translateY(-2px);
}

.btn-royal-primary:hover::after {
  left: 140%;
}

.btn-royal-primary:active {
  transform: translateY(1px) scale(0.975);
  box-shadow: 0 3px 12px -2px rgba(12, 33, 66, 0.4);
  filter: brightness(0.92);
}

.btn-marigold-primary,
.btn-haldi-yellow {
  background: linear-gradient(135deg, #b45309 0%, #d97706 45%, #f59e0b 100%);
  color: #ffffff;
  border: 1px solid rgba(254, 240, 138, 0.7);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px -6px rgba(180, 83, 9, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-marigold-primary:hover,
.btn-haldi-yellow:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #b45309 100%);
  border-color: #fef08a;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -6px rgba(180, 83, 9, 0.45);
}

.btn-marigold-primary:active,
.btn-haldi-yellow:active {
  transform: translateY(1px) scale(0.975);
  filter: brightness(0.92);
}

.btn-gold-outline {
  background: rgba(255, 255, 255, 0.85);
  color: var(--royal-900);
  border: 1px solid rgba(197, 155, 63, 0.6);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px -3px rgba(12, 33, 66, 0.08);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-gold-outline:hover {
  background: var(--royal-900);
  color: #ffffff;
  border-color: var(--royal-900);
  box-shadow: 0 8px 20px -4px rgba(12, 33, 66, 0.22);
  transform: translateY(-2px);
}

.btn-gold-outline:active {
  transform: translateY(1px) scale(0.975);
  box-shadow: 0 2px 8px -2px rgba(12, 33, 66, 0.2);
  filter: brightness(0.94);
}

.btn-venue-map {
  background: linear-gradient(135deg, #0c2142 0%, #163a6b 100%);
  color: #fff;
  border: 1px solid rgba(197, 155, 63, 0.6);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-venue-map:hover {
  background: linear-gradient(135deg, #163a6b 0%, #205396 100%);
  border-color: #d4af37;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(12, 33, 66, 0.35);
}

.btn-venue-map:active {
  transform: translateY(1px) scale(0.975);
  box-shadow: 0 2px 6px -2px rgba(12, 33, 66, 0.3);
  filter: brightness(0.9);
}

/* Floating Audio Toggle */
.audio-floating-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 50;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px solid var(--gold-primary);
  box-shadow: 0 8px 24px rgba(12, 33, 66, 0.16), 0 0 12px rgba(197, 155, 63, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.audio-floating-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 30px rgba(12, 33, 66, 0.22), 0 0 16px rgba(197, 155, 63, 0.38);
}

.audio-floating-btn:active {
  transform: scale(0.94) translateY(1px);
}

.audio-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 16px;
}

.eq-bar {
  width: 2.5px;
  background: linear-gradient(to top, #0c2142, #c59b3f);
  border-radius: 1px;
  animation: equalize 1s infinite ease-in-out alternate;
}

.eq-bar:nth-child(1) { height: 35%; animation-duration: 0.65s; }
.eq-bar:nth-child(2) { height: 95%; animation-duration: 0.48s; }
.eq-bar:nth-child(3) { height: 60%; animation-duration: 0.78s; }
.eq-bar:nth-child(4) { height: 85%; animation-duration: 0.58s; }

.audio-paused .eq-bar {
  animation: none !important;
  height: 25% !important;
  background: #94a3b8;
}

@keyframes equalize {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* Ornate Dividers */
.ornate-gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 1.25rem 0;
}

.ornate-gold-divider::before,
.ornate-gold-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(197, 155, 63, 0.45), transparent);
}

.ornate-gold-divider-diamond {
  width: 7px;
  height: 7px;
  background: var(--gold-primary);
  transform: rotate(45deg);
  margin: 0 14px;
  box-shadow: 0 0 6px rgba(197, 155, 63, 0.45);
}

/* Form Inputs */
.input-royal-ivory {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(197, 155, 63, 0.38);
  color: var(--royal-950);
  transition: all 0.25s ease;
}

.input-royal-ivory:focus {
  outline: none;
  border-color: var(--royal-700);
  box-shadow: 0 0 0 3px rgba(26, 69, 126, 0.12), 0 0 12px rgba(197, 155, 63, 0.18);
}

@keyframes gentlePulse {
  0% { transform: scale(1) translate(0, 0); }
  50% { transform: scale(1.08) translate(-15px, 12px); }
  100% { transform: scale(0.96) translate(12px, -10px); }
}

@keyframes floatSlow {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-12px) rotate(2deg); }
}

/* Botanical Flourish SVG Accents */
.botanical-flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #1a457e;
  opacity: 0.85;
}

.botanical-corner {
  position: absolute;
  width: 38px;
  height: 38px;
  color: rgba(26, 69, 126, 0.3);
  pointer-events: none;
}
.botanical-top-left { top: 8px; left: 8px; }
.botanical-top-right { top: 8px; right: 8px; transform: scaleX(-1); }
.botanical-bottom-left { bottom: 8px; left: 8px; transform: scaleY(-1); }
.botanical-bottom-right { bottom: 8px; right: 8px; transform: scale(-1); }

/* ==========================================================================
   SLOW 3D BOOK / GATE ENTRANCE ANIMATION & "ARE YOU COMING?" PROMPT
   ========================================================================== */
.intro-overlay-3d-stage {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at center, #ffffff 0%, #faf8f5 60%, #eee8dd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1800px;
  overflow: hidden;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 1.2s ease;
}

.intro-overlay-3d-stage.intro-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.invitation-3d-book {
  position: relative;
  width: 90vw;
  max-width: 620px;
  height: 520px;
  max-height: 85vh;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D Gate Doors (Double Wings) */
.book-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: #ffffff;
  border: 1.5px solid rgba(197, 155, 63, 0.45);
  box-shadow: 0 20px 50px rgba(12, 33, 66, 0.15), inset 0 0 20px rgba(197, 155, 63, 0.08);
  transform-style: preserve-3d;
  transition: transform 2.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 2.2s ease;
  z-index: 20;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 85px;
}

.book-door-left {
  left: 0;
  transform-origin: left center;
  border-right: 1px dashed rgba(197, 155, 63, 0.5);
  border-radius: 20px 0 0 20px;
  padding-right: 50px;
  padding-left: 20px;
  text-align: center;
}

.book-door-right {
  right: 0;
  transform-origin: right center;
  border-left: 1px dashed rgba(197, 155, 63, 0.5);
  border-radius: 0 20px 20px 0;
  padding-left: 50px;
  padding-right: 20px;
  text-align: center;
}

/* Door Inner Ornamental Patterns */
.book-door::before {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(197, 155, 63, 0.28);
  pointer-events: none;
}

.book-door-left::before { border-radius: 14px 0 0 14px; }
.book-door-right::before { border-radius: 0 14px 14px 0; }

/* Opened State */
.invitation-3d-book.invitation-opened .book-door-left {
  transform: rotateY(-112deg);
  box-shadow: -15px 25px 40px rgba(12, 33, 66, 0.2);
}

.invitation-3d-book.invitation-opened .book-door-right {
  transform: rotateY(112deg);
  box-shadow: 15px 25px 40px rgba(12, 33, 66, 0.2);
}

.gate-seal-wrapper {
  position: absolute;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.invitation-3d-book.invitation-opened .gate-seal-wrapper {
  opacity: 0;
  transform: scale(0.65);
  pointer-events: none;
}

/* Interior Velvet Sanctum & "Are you coming?" Card */
.book-interior {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #ffffff 0%, #faf8f5 70%, #f3ede2 100%);
  border-radius: 24px;
  border: 2px solid rgba(197, 155, 63, 0.5);
  box-shadow: 0 24px 60px rgba(12, 33, 66, 0.2), inset 0 0 40px rgba(197, 155, 63, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  z-index: 10;
  overflow: hidden;
}

.coming-prompt-card {
  opacity: 0;
  transform: translateY(24px) scale(0.96);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
  text-align: center;
  max-width: 440px;
  pointer-events: none;
}

.invitation-3d-book.invitation-opened .coming-prompt-card {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.coming-prompt-card.prompt-accepted {
  opacity: 0;
  transform: translateY(-30px) scale(0.94);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   FIVE COLOR THEME SYSTEMS
   1. Royal Blue (Default)
   2. Marigold Yellow & Gold
   3. Mehandi Green
   4. Red Velvet
   5. Pure White
   ========================================================================== */

/* 1. Royal Blue (Default) */
body[data-active-theme="royal-blue"] {
  background-color: #faf8f5;
  color: #0a1b33;
}

/* 2. Marigold Yellow & Gold */
body[data-active-theme="marigold-yellow"] {
  background-color: #fffdf5;
  color: #261602;
}
body[data-active-theme="marigold-yellow"] .watercolor-wash-1 {
  background: radial-gradient(circle at 65% 35%, rgba(245, 158, 11, 0.26) 0%, rgba(251, 191, 36, 0.16) 45%, transparent 72%);
}
body[data-active-theme="marigold-yellow"] .watercolor-wash-2 {
  background: radial-gradient(circle at 35% 65%, rgba(180, 83, 9, 0.2) 0%, rgba(254, 240, 138, 0.25) 45%, transparent 70%);
}
body[data-active-theme="marigold-yellow"] .royal-text-gradient {
  background: linear-gradient(135deg, #78350f 0%, #b45309 45%, #d97706 75%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[data-active-theme="marigold-yellow"] .btn-royal-primary {
  background: linear-gradient(135deg, #92400e 0%, #b45309 50%, #78350f 100%);
  border-color: #fde047;
}

/* 3. Mehandi Green */
body[data-active-theme="mehandi-green"] {
  background-color: #f6faf7;
  color: #061c10;
}
body[data-active-theme="mehandi-green"] .watercolor-wash-1 {
  background: radial-gradient(circle at 65% 35%, rgba(13, 56, 35, 0.3) 0%, rgba(25, 105, 64, 0.18) 45%, transparent 72%);
}
body[data-active-theme="mehandi-green"] .watercolor-wash-2 {
  background: radial-gradient(circle at 35% 65%, rgba(7, 37, 23, 0.25) 0%, rgba(52, 211, 153, 0.15) 45%, transparent 70%);
}
body[data-active-theme="mehandi-green"] .royal-text-gradient {
  background: linear-gradient(135deg, #072517 0%, #0d3823 45%, #134e30 75%, #196940 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[data-active-theme="mehandi-green"] .btn-royal-primary {
  background: linear-gradient(135deg, #072517 0%, #0d3823 50%, #051a10 100%);
  border-color: #d4af37;
}

/* 4. Red Velvet */
body[data-active-theme="red-velvet"] {
  background-color: #faf5f6;
  color: #240309;
}
body[data-active-theme="red-velvet"] .watercolor-wash-1 {
  background: radial-gradient(circle at 65% 35%, rgba(107, 14, 32, 0.32) 0%, rgba(159, 18, 57, 0.18) 45%, transparent 72%);
}
body[data-active-theme="red-velvet"] .watercolor-wash-2 {
  background: radial-gradient(circle at 35% 65%, rgba(74, 7, 21, 0.28) 0%, rgba(244, 63, 94, 0.12) 45%, transparent 70%);
}
body[data-active-theme="red-velvet"] .royal-text-gradient {
  background: linear-gradient(135deg, #4a0715 0%, #6b0e20 45%, #881337 75%, #be123c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[data-active-theme="red-velvet"] .btn-royal-primary {
  background: linear-gradient(135deg, #4a0715 0%, #6b0e20 50%, #30040d 100%);
  border-color: #fbbf24;
}

/* 5. Pure White */
body[data-active-theme="pure-white"] {
  background-color: #ffffff;
  color: #0f172a;
}
body[data-active-theme="pure-white"] .fine-paper-texture {
  opacity: 0.35;
}
body[data-active-theme="pure-white"] .watercolor-wash-1 {
  background: radial-gradient(circle at 65% 35%, rgba(203, 213, 225, 0.3) 0%, rgba(241, 245, 249, 0.15) 45%, transparent 72%);
}
body[data-active-theme="pure-white"] .watercolor-wash-2 {
  background: radial-gradient(circle at 35% 65%, rgba(197, 155, 63, 0.12) 0%, rgba(248, 250, 252, 0.2) 45%, transparent 70%);
}
body[data-active-theme="pure-white"] .royal-text-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #334155 50%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
body[data-active-theme="pure-white"] .btn-royal-primary {
  background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #0f172a 100%);
  border-color: #cbd5e1;
}

/* Theme Switcher Bar */
.theme-switcher-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(197, 155, 63, 0.4);
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(12, 33, 66, 0.08);
}

.theme-swatch-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.theme-swatch-btn:hover {
  transform: scale(1.18);
}

.theme-swatch-btn.active-theme {
  border-color: #c59b3f;
  box-shadow: 0 0 0 2px #ffffff, 0 0 8px rgba(197, 155, 63, 0.6);
  transform: scale(1.15);
}
