*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream: #faf7f2;
  --blush: #e8c9b8;
  --rose: #c9897a;
  --dusty: #b5795e;
  --sage: #8fa88a;
  --sage-light: #c8d8c4;
  --warm-brown: #6b4c3b;
  --text-dark: #3a2c28;
  --text-mid: #6b5a54;
  --text-light: #a08880;
  --gold: #c4a265;
  --gold-light: #e6d5b8;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  overflow-x: hidden;
  overflow-y: hidden;
}

body.unlocked {
  overflow-y: auto;
}

/* ===== COVER ===== */
#cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--cream);
  transition: opacity 0.8s ease, visibility 0.8s ease;
  overflow: hidden;
}

#cover.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.cover-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #e8d5c8 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 10% 80%, #d4e3d0 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 90% 70%, #e8c9b8 0%, transparent 50%);
}

.cover-ornament {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 160px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
  z-index: 1;
}

.cover-ornament-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
  transform: scaleY(-1);
  z-index: 1;
}

.cover-content {
  position: relative;
  text-align: center;
  padding: 0 32px;
  animation: fadeUp 1.2s ease both;
}

.cover-bismillah {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 28px;
}

.cover-we-invite {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-mid);
  margin-bottom: 12px;
  letter-spacing: 1px;
}

.cover-names {
  font-family: 'Pinyon Script', cursive;
  font-size: 72px;
  color: var(--warm-brown);
  line-height: 1;
  margin-bottom: 6px;
}

.cover-amp {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 28px;
  color: var(--rose);
  display: block;
  margin: -4px 0;
}

.cover-date {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 4px;
  color: var(--text-mid);
  text-transform: uppercase;
  margin-top: 20px;
  margin-bottom: 36px;
}

.cover-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0 auto 36px;
}

.btn-open {
  background: none;
  border: 1px solid var(--warm-brown);
  color: var(--warm-brown);
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 14px 36px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease;
  z-index: 9999;
}

.btn-open::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--warm-brown);
  transform: translateX(-100%);
  transition: transform 0.4s ease;
}

.btn-open:hover::before { transform: translateX(0); }
.btn-open:hover { color: var(--cream); }
.btn-open span { position: relative; }

.cover-to {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 32px;
  margin-bottom: 8px;
}

/* ===== GUEST NAME CONTAINER ===== */
.guest-name-container {
  margin-top: 8px;
  margin-bottom: 32px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(196, 162, 101, 0.2);
  border-radius: 8px;
  position: relative;
}

.guest-name-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.guest-name-label {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-mid);
  position: relative;
  z-index: 1;
  display: block;
  text-align: center;
  letter-spacing: 1px;
}

/* ===== MAIN CONTENT ===== */
#main {
  opacity: 0;
  transition: opacity 0.8s ease;
}

#main.visible { opacity: 1; }

/* ===== SECTIONS ===== */
section {
  padding: 72px 28px;
  position: relative;
}

.section-center { text-align: center; }

.eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 20px;
  display: block;
}

.script-title {
  font-family: 'Pinyon Script', cursive;
  font-size: 52px;
  color: var(--warm-brown);
  line-height: 1.1;
}

.serif-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.4;
}

.body-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-mid);
}

.thin-divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 24px auto;
}

/* ===== AYAT QURAN ===== */
#ayat {
  background: linear-gradient(160deg, #f2ebe2 0%, #ede3d8 100%);
  padding: 72px 28px;
  position: relative;
  overflow: hidden;
}

#ayat::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, #e8c9b8 0%, transparent 70%);
  opacity: 0.5;
}

.quran-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 19px;
  line-height: 1.9;
  color: var(--text-dark);
  text-align: center;
  position: relative;
}

.quran-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: var(--text-light);
  letter-spacing: 1px;
  text-align: center;
  margin-top: 16px;
}

.ornament-leaf {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}

/* ===== PENGANTIN ===== */
#pengantin {
  background: var(--cream);
  padding: 80px 28px;
}

.couple-wrapper {
  display: flex;
  flex-direction: column;
  gap: 48px;
  margin-top: 48px;
}

.couple-card {
  text-align: center;
  position: relative;
}

.couple-monogram {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #f2e8e0, #e8d8cc);
  border: 1px solid var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Pinyon Script', cursive;
  font-size: 52px;
  color: var(--warm-brown);
  position: relative;
  box-shadow: 0 0 0 6px #faf7f2, 0 0 0 7px var(--gold-light);
}

.couple-name {
  font-family: 'Pinyon Script', cursive;
  font-size: 46px;
  color: var(--warm-brown);
  line-height: 1;
  margin-bottom: 8px;
}

.couple-fullname {
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text-mid);
  margin-bottom: 4px;
}

.couple-parents {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}

.couple-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.couple-sep-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--blush));
}

.couple-sep-line.right {
  background: linear-gradient(90deg, var(--blush), transparent);
}

.couple-sep-text {
  font-family: 'Pinyon Script', cursive;
  font-size: 36px;
  color: var(--rose);
}

/* ===== COUNTDOWN ===== */
#countdown {
  background: linear-gradient(160deg, #3a2c28 0%, #5a3d30 100%);
  padding: 72px 28px;
  position: relative;
  overflow: hidden;
  color: var(--cream);
}

#countdown::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c4a265' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}

#countdown .eyebrow { color: var(--gold-light); }

.countdown-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 0;
  position: relative;
  max-width: 340px;
  margin: 0 auto;
}

.countdown-item {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 4px;
}

.countdown-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-60%);
  height: 40px;
  width: 1px;
  background: rgba(196, 162, 101, 0.3);
}

.countdown-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 52px;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  display: block;
}

.countdown-label {
  font-family: 'Jost', sans-serif;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-top: 8px;
  display: block;
}

.countdown-colon {
  font-family: 'Cormorant Garamond', serif;
  font-size: 40px;
  color: var(--gold);
  opacity: 0.4;
  align-self: flex-start;
  padding-top: 8px;
  flex: 0;
}

/* ===== ACARA ===== */
#acara {
  background: var(--cream);
  padding: 80px 28px;
}

.acara-cards {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 44px;
}

.acara-card {
  border: 1px solid var(--gold-light);
  padding: 32px 24px;
  position: relative;
  background: #fff;
}

.acara-card::before {
  content: '';
  position: absolute;
  top: 6px; left: 6px; right: -6px; bottom: -6px;
  border: 1px solid var(--blush);
  z-index: -1;
}

.acara-row {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-bottom: 0;
}

.acara-row-item {
  flex: 1;
  padding-bottom: 16px;
}

.acara-row-item:last-child {
  text-align: right;
}

.acara-row-divider {
  width: 1px;
  background: var(--gold-light);
  align-self: stretch;
  margin: 0 16px;
  flex-shrink: 0;
}

.acara-single-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  margin-bottom: 20px;
}

.acara-type {
  font-family: 'Jost', sans-serif;
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 12px;
  display: block;
}

.acara-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 16px;
}

.acara-detail {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.acara-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.acara-detail-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.6;
}

.acara-detail-text strong {
  color: var(--text-dark);
  font-weight: 500;
}

.map-container {
  margin-top: 20px;
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--gold-light);
  height: 200px;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.btn-maps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 24px;
  border: 1px solid var(--sage);
  color: var(--sage);
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}

.btn-maps:hover { background: var(--sage); color: #fff; }

/* ===== AMPLOP DIGITAL ===== */
#amplop {
  background: linear-gradient(160deg, #f5f0ea 0%, #ede8e0 100%);
  padding: 80px 28px;
}

.amplop-box {
  margin-top: 40px;
  border: 1px solid var(--gold-light);
  padding: 36px 24px;
  background: #fff;
  text-align: center;
  position: relative;
}

.amplop-box::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blush), var(--gold), var(--blush));
}

.amplop-bank {
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}

.amplop-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  color: var(--warm-brown);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.amplop-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--warm-brown);
  color: var(--warm-brown);
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-copy:hover { background: var(--warm-brown); color: #fff; }

.amplop-note {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-light);
  margin-top: 20px;
  line-height: 1.7;
}

/* ===== HADIR ===== */
#hadir {
  background: var(--cream);
  padding: 80px 28px;
  text-align: center;
}

.hadir-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--text-mid);
  line-height: 1.9;
  max-width: 320px;
  margin: 0 auto;
}

.hadir-names {
  font-family: 'Pinyon Script', cursive;
  font-size: 48px;
  color: var(--warm-brown);
  margin-top: 20px;
  line-height: 1;
}

/* ===== MUTIARA ===== */
#mutiara {
  background: linear-gradient(160deg, #e8e0d8 0%, #dfd6cb 100%);
  padding: 72px 28px;
}

.mutiara-list {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 40px;
}

.mutiara-item {
  padding: 28px 24px;
  background: rgba(255,255,255,0.5);
  border-left: 2px solid var(--gold);
  position: relative;
}

.mutiara-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.mutiara-source {
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-light);
}

/* ===== FOOTER ===== */
#footer {
  background: linear-gradient(160deg, #3a2c28 0%, #5a3d30 100%);
  padding: 72px 28px 100px;
  text-align: center;
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

#footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c4a265' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.footer-closing {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 16px;
  color: var(--gold-light);
  line-height: 1.8;
  position: relative;
}

.footer-names {
  font-family: 'Pinyon Script', cursive;
  font-size: 56px;
  color: var(--gold);
  line-height: 1;
  margin: 20px 0;
  position: relative;
}

.footer-hashtag {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.6;
  position: relative;
}

/* ===== MUSIC FLOAT ===== */
#music-btn {
  position: fixed;
  bottom: 32px;
  right: 24px;
  z-index: 200;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--warm-brown);
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s;
}

#music-btn.playing svg {
  animation: spin 4s linear infinite;
}

#music-btn:hover { transform: scale(1.08); }

#music-btn svg { color: #fff; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--warm-brown);
  color: var(--cream);
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 10px 24px;
  opacity: 0;
  transition: all 0.4s;
  z-index: 300;
  pointer-events: none;
}

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

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.float-anim { animation: float 4s ease-in-out infinite; }

/* ===== RESPONSIVE MOBILE ===== */
@media (max-width: 768px) {
  .cover-content {
    padding: 0 24px;
    z-index: 10;
  }

  .cover-names {
    font-size: 56px;
  }

  .cover-ornament {
    height: 120px;
    z-index: 1;
  }

  .cover-ornament-bottom {
    height: 120px;
    z-index: 1;
  }

  .btn-open {
    z-index: 20;
    margin-bottom: 20px;
  }

  .guest-name-container {
    z-index: 15;
  }
}

@media (max-width: 480px) {
  .cover-content {
    padding: 0 20px;
  }

  .cover-names {
    font-size: 48px;
  }

  .cover-ornament {
    height: 100px;
  }

  .cover-ornament-bottom {
    height: 100px;
  }

  .btn-open {
    padding: 12px 28px;
    font-size: 11px;
    margin-bottom: 30px;
  }
}