/* ==========================================================================
   BURGUNDY & GOLD LUXURY DIGITAL WEDDING INVITATION
   ========================================================================== */

:root {
  --color-burgundy-900: #180206;
  --color-burgundy-850: #220308;
  --color-burgundy-800: #2f060d;
  --color-burgundy-700: #440a13;
  --color-burgundy-600: #5c0e1b;
  --color-burgundy-500: #771324;
  
  --color-gold-light: #fbe8b5;
  --color-gold-base: #d4af37;
  --color-gold-dark: #aa7c1e;
  --color-gold-accent: #e5c365;

  --color-ivory: #faf7f2;
  --color-ivory-soft: #ede6dc;
  --color-ivory-muted: #cbbbae;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Great Vibes', 'Alex Brush', cursive;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-cinzel: 'Cinzel', serif;

  --gold-gradient: linear-gradient(135deg, #f7ebb8 0%, #d4af37 35%, #f3df95 70%, #aa7c1e 100%);
  --gold-gradient-text: linear-gradient(135deg, #fff2c6 0%, #dfb746 45%, #fff2c6 75%, #ba8924 100%);
  --gold-border: 1px solid rgba(212, 175, 55, 0.35);
  --gold-border-bold: 1.5px solid rgba(212, 175, 55, 0.65);
  --gold-glow: 0 0 20px rgba(212, 175, 55, 0.25);
  --glass-bg: rgba(34, 3, 8, 0.72);
  --glass-bg-card: rgba(47, 6, 13, 0.65);
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-burgundy-900);
  color: var(--color-ivory);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 20%, #3e0811 0%, #200307 60%, #120104 100%);
  background-attachment: fixed;
  color: var(--color-ivory);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-burgundy-900);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-gold-dark), var(--color-gold-base));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-light);
}

/* Typography Helpers */
.font-serif { font-family: var(--font-serif); }
.font-script { font-family: var(--font-script); }
.font-sans { font-family: var(--font-sans); }
.font-cinzel { font-family: var(--font-cinzel); }

.text-gold-gradient {
  background: var(--gold-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-ivory { color: var(--color-ivory); }
.text-ivory-soft { color: var(--color-ivory-soft); }
.text-ivory-muted { color: var(--color-ivory-muted); }

/* Luxury Gold Frames & Borders */
.gold-border {
  border: var(--gold-border);
}

.gold-border-double {
  border: 1px solid rgba(212, 175, 55, 0.45);
  position: relative;
}
.gold-border-double::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  pointer-events: none;
}

.gold-card {
  background: var(--glass-bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: var(--gold-border);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(212, 175, 55, 0.05);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.gold-card:hover {
  border-color: rgba(212, 175, 55, 0.6);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5), 0 0 25px rgba(212, 175, 55, 0.15);
}

/* Gold Arch Frames for Bride & Groom */
.arch-frame {
  position: relative;
  border-top-left-radius: 9999px;
  border-top-right-radius: 9999px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(212, 175, 55, 0.7);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.2);
}
.arch-frame::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-top-left-radius: 9999px;
  border-top-right-radius: 9999px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
  border: 1px dashed rgba(212, 175, 55, 0.4);
  pointer-events: none;
}

/* Luxury Gold Buttons */
.btn-gold {
  background: var(--gold-gradient);
  color: #24040a;
  font-family: var(--font-cinzel);
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 0.85rem 1.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 235, 170, 0.75);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.82rem;
}
.btn-gold:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5), 0 0 30px rgba(212, 175, 55, 0.3);
  filter: brightness(1.08);
}
.btn-gold:active {
  transform: translateY(0);
}

.btn-gold-outline {
  background: rgba(34, 3, 8, 0.5);
  color: var(--color-gold-accent);
  font-family: var(--font-cinzel);
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  border: 1.5px solid var(--color-gold-base);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.78rem;
}
.btn-gold-outline:hover {
  background: var(--gold-gradient);
  color: #24040a;
  border-color: #f7ebb8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

/* Cover / Gatefold Opening Screen */
#envelope-cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #420a14 0%, #200307 65%, #100104 100%);
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s ease;
  overflow: hidden;
  padding: 1.5rem;
}
#envelope-cover.opened {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Wax Seal Button */
.wax-seal {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e6be57, #9b7218 70%, #573e08 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), inset 0 2px 4px rgba(255, 255, 255, 0.5), 0 0 15px rgba(212, 175, 55, 0.4);
  animation: pulseGlow 3s infinite alternate;
  cursor: pointer;
}
@keyframes pulseGlow {
  0% { transform: scale(1); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 10px rgba(212, 175, 55, 0.2); }
  100% { transform: scale(1.05); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 25px rgba(212, 175, 55, 0.5); }
}

/* Botanical Ornaments SVG styling */
.floral-ornament {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}
.floral-accent-gold {
  color: var(--color-gold-base);
  opacity: 0.85;
}

/* Floating Audio Control */
.audio-controller {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
}
.music-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(34, 3, 8, 0.85);
  border: 1.5px solid var(--color-gold-base);
  color: var(--color-gold-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.music-btn:hover {
  transform: scale(1.1);
  border-color: #f7ebb8;
}
.music-btn.spinning {
  animation: spinRecord 6s linear infinite;
}
@keyframes spinRecord {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Falling Rose Petals Canvas */
#petals-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 40;
}

/* Bottom Floating Navigation */
.floating-bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(26, 2, 6, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.5rem 0.8rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 95vw;
}
.nav-pill-item {
  color: var(--color-ivory-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: all 0.25s ease;
  font-family: var(--font-cinzel);
  font-weight: 500;
  letter-spacing: 0.05em;
}
.nav-pill-item:hover, .nav-pill-item.active {
  color: #24040a;
  background: var(--gold-gradient);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

/* Countdown Card */
.countdown-box {
  background: rgba(34, 3, 8, 0.65);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  padding: 0.85rem 0.6rem;
  min-width: 65px;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(14, 1, 3, 0.95);
  backdrop-filter: blur(12px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.lightbox-modal.active {
  display: flex;
}

/* Toast Notification */
.toast-msg {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: var(--gold-gradient);
  color: #200307;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.4);
  z-index: 150;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
  opacity: 0;
  pointer-events: none;
  font-family: var(--font-sans);
}
.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Story Timeline */
.timeline-stem {
  position: relative;
}
.timeline-stem::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--color-gold-base) 15%, var(--color-gold-base) 85%, transparent);
  transform: translateX(-50%);
}
@media (max-width: 640px) {
  .timeline-stem::before {
    left: 24px;
  }
}

/* Floral Divider */
.floral-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.floral-divider::before, .floral-divider::after {
  content: '';
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6));
}
.floral-divider::after {
  background: linear-gradient(270deg, transparent, rgba(212, 175, 55, 0.6));
}

/* Section Header Styling */
.section-title {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  letter-spacing: 0.04em;
}
@media (min-width: 768px) {
  .section-title {
    font-size: 2.75rem;
  }
}

.section-subtitle {
  font-family: var(--font-cinzel);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--color-gold-accent);
  text-transform: uppercase;
}

/* Image Shimmer on Hover */
.gallery-img-wrap {
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}
.gallery-img-wrap img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s ease;
}
.gallery-img-wrap:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}
.gallery-img-wrap:hover {
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
}

/* Dress Code Color Swatches */
.swatch-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}
.swatch-circle:hover {
  transform: scale(1.12);
}
