/* ============================================================
   TEMPLATES CSS — 5 TEMA UNDANGAN DIGITAL PERNIKAHAN
   1. Botanical (Emerald Sage & Gold)
   2. Javanese (Royal Batik & Gunungan)
   3. Luxury (Midnight Velvet & Champagne Gold)
   4. Aesthetic (Earth-Tone Terracotta & Arches)
   5. Islamic (Emerald Blossom & Arabic Calligraphy)
   ============================================================ */

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

:root {
  --primary: #1B4332;
  --primary-light: #2D6A4F;
  --secondary: #D4AF37;
  --secondary-light: #F3E5AB;
  --bg-main: #F7F9F6;
  --bg-card: #FFFFFF;
  --text-main: #212529;
  --text-muted: #6C757D;
  --border: #E8ECE9;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-script: 'Playfair Display', serif;
  --ornament-opacity: 0.12;
}

/* ------------------------------------------------------------
   TEMA 1: BOTANICAL (Emerald Sage & Luxury Gold)
   ------------------------------------------------------------ */
.theme-botanical {
  --primary: #1B4332;
  --primary-light: #40916C;
  --secondary: #C5A059;
  --secondary-light: #F4EBD9;
  --bg-main: #F4F7F4;
  --bg-card: #FFFFFF;
  --text-main: #1C2826;
  --text-muted: #526B63;
  --border: #D8E2DC;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-script: 'Playfair Display', serif;
}

/* ------------------------------------------------------------
   TEMA 2: JAVANESE (Royal Wayang & Antique Gold)
   ------------------------------------------------------------ */
.theme-javanese {
  --primary: #3E2723;
  --primary-light: #5D4037;
  --secondary: #C59B27;
  --secondary-light: #F9F1DC;
  --bg-main: #FAF6EE;
  --bg-card: #FFFDF9;
  --text-main: #2B1D19;
  --text-muted: #795548;
  --border: #EADBCC;
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-script: 'Cinzel', serif;
}

/* ------------------------------------------------------------
   TEMA 3: LUXURY (Midnight Velvet & Gold Glitter)
   ------------------------------------------------------------ */
.theme-luxury {
  --primary: #F59E0B;
  --primary-light: #FBBF24;
  --secondary: #D97706;
  --secondary-light: #374151;
  --bg-main: #0B0F19;
  --bg-card: #151D2F;
  --text-main: #F9FAFB;
  --text-muted: #9CA3AF;
  --border: #2D3748;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Montserrat', sans-serif;
  --font-script: 'Great Vibes', cursive;
}

/* ------------------------------------------------------------
   TEMA 4: AESTHETIC (Earth-Tone Terracotta & Bohemian Arches)
   ------------------------------------------------------------ */
.theme-aesthetic {
  --primary: #B85D43;
  --primary-light: #D47A60;
  --secondary: #7A5C58;
  --secondary-light: #F5EBE6;
  --bg-main: #FAF4F0;
  --bg-card: #FFFFFF;
  --text-main: #332724;
  --text-muted: #7D6B66;
  --border: #EADBD4;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  --font-script: 'Playfair Display', serif;
}

/* ------------------------------------------------------------
   TEMA 5: ISLAMIC (Royal Emerald & Arabesque Elegance)
   ------------------------------------------------------------ */
.theme-islamic {
  --primary: #064E3B;
  --primary-light: #047857;
  --secondary: #D97706;
  --secondary-light: #FEF3C7;
  --bg-main: #F7FAF8;
  --bg-card: #FFFFFF;
  --text-main: #132E27;
  --text-muted: #4B6E64;
  --border: #D1E5DE;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-script: 'Amiri', serif;
}

/* ------------------------------------------------------------
   BASE STYLING & ANIMATIONS
   ------------------------------------------------------------ */
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  scroll-behavior: smooth;
}

.font-serif { font-family: var(--font-serif); }
.font-script { font-family: var(--font-script); }
.font-sans { font-family: var(--font-sans); }

/* Cover overlay modal */
#coverOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--bg-main);
  background-size: cover;
  background-position: center;
  transition: transform 0.85s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.85s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#coverOverlay.opened,
#coverOverlay.is-open {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* State halaman setelah undangan dibuka */
body.invitation-opened #coverOverlay,
html.invitation-opened #coverOverlay {
  display: none !important;
}

/* Cegah scroll saat cover masih tertutup */
body:not(.invitation-opened) {
  overflow: hidden;
  height: 100vh;
}

/* Floating Audio Player */
.music-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 2px solid var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
}

.music-btn.playing {
  animation: spin 5s linear infinite;
}

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

/* Floating Navigation Bar for Mobile */
.bottom-nav {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9998;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  display: flex;
  gap: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.theme-luxury .bottom-nav {
  background: rgba(21, 29, 47, 0.85);
  border-color: var(--border);
}

.bottom-nav a {
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.bottom-nav a:hover, .bottom-nav a.active {
  color: var(--primary);
  transform: translateY(-2px);
}

.theme-luxury .bottom-nav a:hover, .theme-luxury .bottom-nav a.active {
  color: var(--primary-light);
}

/* Arch Shape (untuk template aesthetic) */
.arch-frame {
  border-radius: 200px 200px 16px 16px;
  overflow: hidden;
  border: 4px solid var(--secondary);
}

/* Gunungan / Batik Pattern Background (untuk template javanese) */
.javanese-pattern {
  background-image: radial-gradient(var(--secondary) 0.75px, transparent 0.75px);
  background-size: 18px 18px;
}

/* Arabic Kaligrafi Ornament */
.arabic-bismillah {
  font-family: 'Amiri', serif;
  font-size: 2.2rem;
  line-height: 1.4;
  color: var(--primary);
}

/* Card Styling */
.inv-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.theme-luxury .inv-card {
  box-shadow: 0 4px 25px rgba(0,0,0,0.4);
}

/* Countdown Box */
.countdown-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 8px;
  min-width: 65px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.countdown-box .val {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-serif);
}

.countdown-box .lbl {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* Timeline Item */
.story-timeline {
  position: relative;
  border-left: 2px dashed var(--secondary);
  margin-left: 18px;
  padding-left: 20px;
}

.story-dot {
  position: absolute;
  left: -27px;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--secondary);
  border: 3px solid var(--bg-card);
}

/* Gallery Grid */
.gallery-img {
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-img:hover {
  transform: scale(1.03);
}

/* Lightbox Modal */
#galleryLightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#galleryLightbox.active {
  opacity: 1;
  pointer-events: auto;
}

/* Toast Alert */
.toast-notice {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #10B981;
  color: white;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 999999;
}

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