/* ==========================================================================
   TEMA BALI: Traditional Balinese Elegance - Digital Wedding Invitation
   The Wedding of Dwi & Anita
   ========================================================================== */

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

:root {
  --color-gold: #D4AF37;
  --color-gold-light: #F7E7B4;
  --color-gold-dark: #9A7B20;
  --color-gold-deep: #705310;
  
  --color-brown-dark: #1E130C;
  --color-brown: #2D1E15;
  --color-brown-light: #4A3525;
  --color-brown-border: #8C6A4F;

  --color-sage: #43604D;
  --color-sage-dark: #2A3E31;
  --color-sage-soft: #7A9482;
  --color-sage-light: #EBF2EC;

  --color-ivory: #FDFBF7;
  --color-cream: #F5EFE6;
  --color-sand: #EAE2D5;
  
  --font-cinzel-dec: 'Cinzel Decorative', Georgia, serif;
  --font-cinzel: 'Cinzel', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-gold: 0 0 25px rgba(212, 175, 55, 0.28);
  --shadow-card: 0 15px 35px -8px rgba(30, 19, 12, 0.12), 0 0 0 1px rgba(212, 175, 55, 0.22);
  --shadow-card-hover: 0 20px 40px -10px rgba(30, 19, 12, 0.2), 0 0 0 1px rgba(212, 175, 55, 0.45);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-brown-dark);
  color: #33261C;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: #1C120B;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #D4AF37, #9A7B20);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #F7E7B4;
}

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

/* Balinese Gold Shimmer Text */
.text-gold-gradient {
  background: linear-gradient(135deg, #FFF1C5 0%, #D4AF37 40%, #F5D372 70%, #9A7B20 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gold-subtle {
  color: #C5A059;
}

/* Gold Metallic Foil Background */
.bg-gold-gradient {
  background: linear-gradient(135deg, #F9E7B4 0%, #D4AF37 50%, #A37E1C 100%);
}

.bg-gold-radial {
  background: radial-gradient(circle at center, #F9E7B4 0%, #D4AF37 70%, #947116 100%);
}

.bg-sage-gradient {
  background: linear-gradient(135deg, #43604D 0%, #2A3E31 100%);
}

.bg-brown-gradient {
  background: linear-gradient(135deg, #2D1E15 0%, #170E08 100%);
}

/* Balinese Songket Woven Pattern Overlay */
.bg-songket-pattern {
  background-color: #FDFBF7;
  background-image: 
    radial-gradient(#D4AF37 0.75px, transparent 0.75px),
    radial-gradient(#D4AF37 0.75px, #FDFBF7 0.75px);
  background-size: 30px 30px;
  background-position: 0 0, 15px 15px;
  background-opacity: 0.12;
}

.bg-dark-ornament {
  background-color: #170F09;
  background-image: radial-gradient(rgba(212, 175, 55, 0.12) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Balinese Elegant Card Frames */
.bali-card {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bali-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(212, 175, 55, 0.6);
}

.bali-card-dark {
  position: relative;
  background: rgba(30, 19, 12, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 1.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* Balinese Arch Picture Frame (Kori Agung / Angkul-angkul arch) */
.arch-frame {
  border-top-left-radius: 9999px;
  border-top-right-radius: 9999px;
  border-bottom-left-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
  overflow: hidden;
  position: relative;
}

.arch-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-top-left-radius: 9999px;
  border-top-right-radius: 9999px;
  border-bottom-left-radius: 1.25rem;
  border-bottom-right-radius: 1.25rem;
  border: 2px solid rgba(212, 175, 55, 0.7);
  box-shadow: inset 0 0 15px rgba(212, 175, 55, 0.35);
  pointer-events: none;
}

/* Pulsing Gold Glow */
.gold-glow {
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
  animation: pulseGoldGlow 3s infinite alternate;
}

@keyframes pulseGoldGlow {
  0% { box-shadow: 0 0 15px rgba(212, 175, 55, 0.3); }
  100% { box-shadow: 0 0 28px rgba(212, 175, 55, 0.65); }
}

/* Floating Bunga Jepun Petals */
.floating-petal {
  position: absolute;
  pointer-events: none;
  z-index: 10;
  opacity: 0.7;
  animation: floatPetal 14s infinite ease-in-out;
}

@keyframes floatPetal {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 0.8;
  }
  85% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(100vh) rotate(360deg) scale(1);
    opacity: 0;
  }
}

/* Envelope Opening Animations */
.envelope-closed {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.9s ease;
}

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

/* Rotating Audio Disc & Equalizer Bars */
@keyframes spinDisc {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spin-slow {
  animation: spinDisc 8s linear infinite;
}

.spin-paused {
  animation-play-state: paused !important;
}

.equalizer-bar {
  animation: eqPulse 1.2s infinite ease-in-out alternate;
}
.equalizer-bar:nth-child(2) { animation-delay: 0.2s; }
.equalizer-bar:nth-child(3) { animation-delay: 0.4s; }
.equalizer-bar:nth-child(4) { animation-delay: 0.1s; }

@keyframes eqPulse {
  0% { height: 4px; }
  100% { height: 18px; }
}

/* Reveal on Scroll Animations (Intersection Observer) */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-zoom {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-zoom.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(14, 9, 6, 0.95);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #1E130C;
  color: #FDFBF7;
  border: 1px solid #D4AF37;
  padding: 10px 24px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* Navigation Dock (Swalapatra Style) */
.nav-dock {
  background: rgba(30, 19, 12, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.45);
}

.nav-dock-item {
  color: #D9C7B4;
  transition: all 0.25s ease;
  position: relative;
}

.nav-dock-item:hover,
.nav-dock-item.active {
  color: #F7E7B4;
}

.nav-dock-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 2px;
  background: #D4AF37;
  border-radius: 99px;
  box-shadow: 0 0 8px #D4AF37;
}

/* Interactive Button Hover Shine */
.btn-gold {
  background: linear-gradient(135deg, #F3DE97 0%, #D4AF37 50%, #A88120 100%);
  color: #1A1009;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35);
  transition: all 0.3s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.55);
}

.btn-gold::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(30deg);
  transition: all 0.85s ease;
}

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

/* Floating Audio Widget */
.audio-controller {
  position: fixed;
  bottom: 84px;
  right: 20px;
  z-index: 80;
  transition: all 0.3s ease;
}

@media (min-width: 1024px) {
  .audio-controller {
    bottom: 24px;
    right: 24px;
  }
}
