/* ========================================================
   WEDDING E-INVITATION CUSTOM STYLES
   ======================================================== */

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

:root {
  --primary-gold: #c5a059;
  --primary-gold-dark: #a8833c;
  --primary-gold-light: #e8d7b5;
  --bg-cream: #faf7f2;
  --bg-card: #ffffff;
  --text-main: #2b2824;
  --text-muted: #6e6962;
  --border-gold: rgba(197, 160, 89, 0.28);
}

* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-main);
  background-color: #1a1815;
  overflow-x: hidden;
}

/* Typography Helpers */
.font-serif-luxury {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

.font-script {
  font-family: 'Alex Brush', cursive;
}

/* Phone / Container Frame on Desktop */
.invitation-container {
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--bg-cream);
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

@media (min-width: 1024px) {
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(30, 27, 22, 0.85) 0%, rgba(15, 14, 12, 0.98) 100%),
                url('https://images.unsplash.com/photo-1519741497674-611481863552?q=80&w=1600&auto=format&fit=crop') center/cover no-repeat;
    filter: blur(8px);
    z-index: -1;
    opacity: 0.45;
  }
}

/* Glassmorphism */
.glass-panel {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-gold);
}

.glass-panel-dark {
  background: rgba(26, 24, 21, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(197, 160, 89, 0.3);
}

/* Envelope Cover Overlay */
#cover-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.85s ease;
  overflow: hidden;
}

#cover-overlay.opened {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Pulsing Open Button */
.btn-pulse {
  animation: pulseGold 2s infinite ease-in-out;
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.5);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(197, 160, 89, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(197, 160, 89, 0);
  }
}

/* Floating Audio Player Disc */
.music-disc {
  animation: spin 6s linear infinite;
}

.music-disc.paused {
  animation-play-state: paused;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Floating Petals / Ambient Leaves */
.petal {
  position: fixed;
  top: -20px;
  user-select: none;
  pointer-events: none;
  z-index: 50;
  animation: fall linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(105vh) rotate(360deg);
  }
}

/* Toast Message */
#toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  z-index: 1000;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Gallery Lightbox */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(8px);
  z-index: 1050;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#lightbox.active {
  display: flex;
  opacity: 1;
}

/* Gold Gradient Text */
.gold-gradient-text {
  background: linear-gradient(135deg, #b8860b 0%, #d4af37 50%, #aa771c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background: #f1ede6;
}
::-webkit-scrollbar-thumb {
  background: #c5a059;
  border-radius: 4px;
}

/* Shimmer Border */
.gold-card-border {
  position: relative;
  border: 1px solid rgba(197, 160, 89, 0.35);
  box-shadow: 0 10px 25px -5px rgba(197, 160, 89, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

.gold-card-border::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 6px;
  bottom: 6px;
  border: 1px dashed rgba(197, 160, 89, 0.3);
  pointer-events: none;
  border-radius: inherit;
}
