:root {
  --bg-color: #f7f4ee;
  --bg-card: rgba(255, 255, 255, 0.90);
  --primary-color: #a33d3d;
  --primary-dark: #822a2a;
  --gold-accent: #d4af37;
  --text-main: #3a322d;
  --text-muted: #6e645e;
  --border-gold: rgba(212, 175, 55, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cormorant Garamond', serif;
  background-color: #1a1a1a;
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden;
}

.font-script { font-family: 'Alex Brush', cursive; }
.font-imperial { font-family: 'Imperial Script', cursive; }
.font-arabic { font-family: 'Amiri', serif; direction: rtl; }
.font-delafield { 
  font-family: 'Mrs Saint Delafield', cursive; 
  font-weight: normal;
  padding: 0 4px;
  display: inline-block;
  font-size: 0.9em;
}

.mobile-wrapper {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle, rgba(247, 244, 238, 0.85) 0%, rgba(235, 228, 216, 0.95) 100%), 
                    url('assets/cover-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  box-shadow: 0 0 30px rgba(0,0,0,0.6);
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Partikel Serpihan Bunga Melayang */
.petal-container {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  height: 100vh;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}

.petal {
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  will-change: transform;
}

/* Floating Music */
.music-control {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border: none;
}

/* ================= COVER SECTION ================= */
.cover-section {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cover-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url('assets/cover-bg.jpg');
  background-size: cover;
  background-position: center;
  z-index: 1;
  transform-origin: center center;
}

.ornament {
  position: absolute;
  pointer-events: none;
  object-fit: contain;
}

.orn-top-leaves { top: -15px; left: -2%; width: 104%; z-index: 2; transform-origin: top center; }
.orn-left-tree { top: 12%; left: -20%; width: 50%; z-index: 2; transform-origin: bottom left; }
.orn-left-bush { bottom: -5px; left: -10%; width: 58%; z-index: 2; transform-origin: bottom left; }

.orn-right-tree { 
  top: 25%; 
  right: -25%; 
  width: 52%; 
  z-index: 2;
  transform: rotate(-18deg); 
  transform-origin: bottom right; 
}

.orn-coconut-tree { 
  bottom: 0; 
  right: -5%; 
  width: 55%; 
  z-index: 2; 
  transform-origin: bottom right; 
}

.orn-gazebo { 
  bottom: 0; 
  right: 0; 
  width: 60%; 
  z-index: 3; 
  transform-origin: bottom right; 
}

.orn-butterfly { 
  bottom: 28%; 
  right: 42%; 
  width: 34px; 
  z-index: 4;
}

.cover-content { 
  position: relative; 
  z-index: 5; 
  width: 100%; 
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  padding: 13vh 25px 32vh 25px; 
}

.cover-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover-subtitle { 
  font-family: 'Cormorant Garamond', serif; 
  font-size: 0.9rem; 
  letter-spacing: 3px; 
  color: #4a443f; 
  margin-bottom: 6px; 
}

.cover-couple-title { 
  font-family: 'Imperial Script', cursive; 
  font-size: 3.2rem; 
  color: #111111; 
  font-weight: normal;
  margin: 0; 
  line-height: 1.1;
}

.cover-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cover-guest-label { 
  font-family: 'Cormorant Garamond', serif; 
  font-size: 0.95rem; 
  color: #4a443f; 
}

.cover-guest-name { 
  font-family: 'Cormorant Garamond', serif; 
  font-size: 1.25rem; 
  font-weight: 600; 
  color: #111111; 
  margin-top: 3px; 
}

/* Tombol Vintage Elegan */
.btn-open-invitation {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border: 1px solid var(--gold-accent);
  outline: 1px solid rgba(212, 175, 55, 0.6);
  outline-offset: -4px;
  padding: 12px 32px;
  border-radius: 4px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25), inset 0 0 10px rgba(212, 175, 55, 0.2);
  transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-open-invitation:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #5a1d1d 100%);
  border-color: #ffffff;
  outline-color: var(--gold-accent);
  box-shadow: 0 8px 22px rgba(163, 61, 61, 0.4), inset 0 0 14px rgba(255, 215, 0, 0.3);
  transform: translateY(-2px);
}

.cover-section.opened { 
  display: none !important; 
}

/* ================= HERO SECTION ================= */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  border-bottom: 1px dashed rgba(212, 175, 55, 0.3);
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url('assets/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  z-index: 1;
  transform-origin: center center;
}

.hero-orn {
  position: absolute;
  pointer-events: none;
  object-fit: contain;
}

/* Daun Kelapa Posisi Atas (-5px) & Saturasi Diturunkan Mendekati Monokrom */
.hero-orn-palm { 
  top: -5px; 
  right: -5%; 
  width: 52%; 
  z-index: 2; 
  transform-origin: top right; 
  filter: saturate(0.18);
}

.hero-orn-left-tree { 
  top: 26%; 
  left: -18%; 
  width: 50%; 
  z-index: 2; 
  transform-origin: bottom left; 
}

.hero-orn-right-tree { 
  top: 18%; 
  right: -28%; 
  width: 56%; 
  z-index: 2; 
  transform-origin: bottom right; 
}

/* Bunga-Bunga Belakang Flower Bed */
.hero-orn-flower-pink { 
  bottom: 20px; 
  left: 5%; 
  width: 24%; 
  z-index: 4; 
  transform-origin: bottom left; 
}

.hero-orn-flower-lavender { 
  bottom: 22px; 
  left: 36%; 
  width: 26%; 
  z-index: 4; 
  transform-origin: bottom center; 
}

.hero-orn-flower-blue { 
  bottom: 25px; 
  right: 8%; 
  width: 21%; 
  z-index: 4; 
  transform-origin: bottom right; 
}

/* 3 Taman Bunga Dasar (Flower Bed) Menutup Batas Bawah */
.hero-orn-flower-bed-1 { 
  bottom: 0px; 
  left: -8%; 
  width: 48%; 
  z-index: 5; 
  transform-origin: bottom center; 
}

.hero-orn-flower-bed-2 { 
  bottom: 0px; 
  left: 26%; 
  width: 48%; 
  z-index: 5; 
  transform-origin: bottom center; 
}

.hero-orn-flower-bed-3 { 
  bottom: 0px; 
  right: -8%; 
  width: 48%; 
  z-index: 5; 
  transform-origin: bottom center; 
}

/* Posisi Kupu-Kupu Taman & Pohon Kanan */
.hero-butterfly-1 { bottom: 125px; left: 45px; width: 26px; z-index: 6; }
.hero-butterfly-2 { bottom: 105px; right: 55px; width: 28px; z-index: 6; }

/* Kupu-Kupu Duplikat di Area Pohon Sebelah Kanan */
.hero-butterfly-3 { top: 20%; right: 10%; width: 25px; z-index: 6; }

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 85px 20px 0 20px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-quote-card {
  background: transparent;
  border: none;
  padding: 10px;
  max-width: 330px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  opacity: 0;
}

.hero-couple-names {
  font-family: 'Imperial Script', cursive;
  font-size: 3.5rem;
  color: #111111;
  font-weight: normal;
  margin-bottom: 8px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
}

.hero-quote-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.55;
  color: #241d18;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* MAIN CONTENT LAINNYA */
.main-content { display: block; }
.section { padding: 50px 20px; text-align: center; border-bottom: 1px dashed rgba(212, 175, 55, 0.3); }
.section-title { font-size: 2.8rem; color: var(--primary-color); margin-bottom: 15px; }

.btn-primary, .btn-social {
  background: var(--primary-color);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.monogram { font-size: 3.5rem; color: var(--primary-color); }
.bismillah-text { font-size: 1.8rem; margin: 15px 0; color: var(--primary-color); }
.greeting-text { font-size: 1rem; line-height: 1.6; margin-bottom: 25px; }

.verse-card {
  background: var(--bg-card);
  padding: 30px 20px;
  border-radius: 120px 120px 15px 15px;
  border: 1px solid var(--border-gold);
  position: relative;
}

.wax-seal-icon {
  width: 40px; height: 40px; background: var(--primary-color); color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: -50px auto 20px; border: 2px solid var(--gold-accent);
}

.arabic-verse { font-size: 1.3rem; line-height: 2; color: var(--primary-color); margin-bottom: 15px; }
.verse-translation { font-size: 0.9rem; font-style: italic; color: var(--text-main); }
.verse-surah { display: block; margin-top: 10px; font-weight: bold; color: var(--primary-color); }

.oval-frame {
  width: 180px; height: 240px; border-radius: 50%;
  border: 5px solid var(--gold-accent); margin: 0 auto 15px;
  overflow: hidden; cursor: pointer;
}
.oval-frame img { width: 100%; height: 100%; object-fit: cover; }

.profile-name { font-size: 2.5rem; color: var(--primary-color); }
.profile-fullname { font-family: 'Montserrat', sans-serif; font-size: 0.9rem; margin-bottom: 5px; }
.parents-info { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; }
.divider-and { font-size: 2.8rem; color: var(--gold-accent); margin: 20px 0; }

.story-timeline { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.story-item { background: var(--bg-card); padding: 15px; border-radius: 10px; border: 1px solid var(--border-gold); text-align: left; }
.story-year { font-weight: bold; color: var(--primary-color); font-size: 1.1rem; }

.countdown-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
.time-box { background: var(--bg-card); padding: 12px 5px; border-radius: 12px; border: 1px solid var(--border-gold); }
.time-box span { font-size: 2.2rem; color: var(--primary-color); }
.time-box p { font-size: 0.75rem; font-family: 'Montserrat', sans-serif; }

.event-card { background: var(--bg-card); padding: 25px 20px; border-radius: 15px; border: 1px solid var(--border-gold); margin-bottom: 25px; }
.event-type { font-size: 2.2rem; color: var(--primary-color); margin-bottom: 5px; }
.event-date { font-weight: bold; font-size: 1.05rem; }
.event-time { color: var(--text-muted); margin-bottom: 15px; }
.loc-title { font-weight: bold; }
.loc-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; }

.palette-container { display: flex; justify-content: center; gap: 10px; margin-top: 15px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }

.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.gallery-item { width: 100%; height: 160px; border-radius: 10px; overflow: hidden; cursor: pointer; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.gift-details-box { display: none; margin-top: 20px; }
.bank-card { background: var(--bg-card); padding: 15px; border-radius: 12px; border: 1px solid var(--border-gold); margin-bottom: 12px; }
.bank-icon { height: 28px; margin-bottom: 8px; object-fit: contain; }

.rsvp-form { background: var(--bg-card); padding: 20px; border-radius: 15px; border: 1px solid var(--border-gold); text-align: left; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.85rem; font-family: 'Montserrat', sans-serif; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 8px; font-family: inherit; }

.wishes-container { margin-top: 25px; text-align: left; }
.wish-item { background: var(--bg-card); padding: 12px; border-radius: 8px; border-left: 4px solid var(--primary-color); margin-bottom: 10px; }
.wish-header { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }
.wish-name { font-weight: bold; color: var(--primary-color); }
.wish-text { margin-top: 5px; font-size: 0.9rem; }

.dua-box { background: var(--bg-card); padding: 20px; border-radius: 12px; border: 1px solid var(--border-gold); margin-bottom: 25px; }
.arabic-dua { font-size: 1.2rem; color: var(--primary-color); margin-bottom: 10px; }

.thankyou-text { font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }
.outro-happy { font-size: 0.9rem; color: var(--text-muted); }
.outro-couple { font-size: 3rem; color: var(--primary-color); margin-top: 5px; }

.agency-watermark { background: #1a1a1a; color: #aaa; padding: 30px 15px; font-family: 'Montserrat', sans-serif; font-size: 0.75rem; text-align: center; }
.agency-logo-img { height: 35px; margin: 10px 0; object-fit: contain; }
.agency-socials { display: flex; justify-content: center; gap: 15px; margin-top: 10px; }
.agency-socials a { color: #fff; font-size: 1.2rem; text-decoration: none; }

.lightbox-modal { display: none; position: fixed; z-index: 1000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); align-items: center; justify-content: center; }
.lightbox-content { max-width: 90%; max-height: 80%; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 2rem; cursor: pointer; }

.toast { visibility: hidden; min-width: 250px; background-color: #333; color: #fff; text-align: center; border-radius: 25px; padding: 12px; position: fixed; z-index: 1001; bottom: 80px; left: 50%; transform: translateX(-50%); font-family: 'Montserrat', sans-serif; font-size: 0.8rem; }
.toast.show { visibility: visible; animation: fadein 0.5s, fadeout 0.5s 2.5s; }
@keyframes fadein { from { bottom: 0; opacity: 0; } to { bottom: 80px; opacity: 1; } }
@keyframes fadeout { from { bottom: 80px; opacity: 1; } to { bottom: 0; opacity: 0; } }