/* ================================================
   WEDDING INVITATION — STYLE (VERSI TERPADU)
   Urutan: 1 Dasar · 2 Intro · 3 Video · 4 Kartu
           5 Mempelai · 6 Agenda · 7 Gallery · 8 Penutup
           9 Watermark · 10 Musik · 11 Lightbox
   ================================================ */

/* ── 1. DASAR ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --clr-text:       #ffffff;
  --clr-text-muted: rgba(255, 255, 255, 0.85);
  --ink:       #2b4a7a;                 /* teks di dalam kartu */
  --ink-soft:  rgba(43, 74, 122, .8);
  --gold:      #b08d57;                 /* border / ornamen */
  --clr-gold:  var(--gold);
  --blue:      74, 130, 207;            /* dipakai sebagai rgba(var(--blue), x) */

  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-ui:      'Jost', system-ui, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.75rem;

  --dur-normal: 300ms;
}

html, body {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  background-color: transparent !important;
  color: var(--clr-text);
  font-family: var(--ff-ui);
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

.mobile-frame {
  width: 100%;
  max-width: 450px;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
  background-image: url('images/BG-Website-v2.jpg');
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
  background-attachment: scroll;
}

body.scroll-locked { overflow: hidden !important; height: 100dvh !important; touch-action: none; }

.hidden { display: none !important; }
.hidden-content { display: none; }

@keyframes spin   { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Tombol reset */
.btn-reset {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 1rem));
  right: calc(50% - 210px);
  z-index: 999;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: var(--fs-xs);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@media (max-width: 450px) { .btn-reset { right: 1rem; } }

/* ── 2. INTRO / HALAMAN DEPAN ── */
.intro-gate {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: transparent !important;
  opacity: 1;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
}
.intro-gate.fade-out { position: absolute; inset: 0; z-index: 100; opacity: 0; pointer-events: none; }

.intro-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.intro-overlay { display: none; }

.intro-content {
  position: relative;
  top: calc(25dvh - 3.3rem);              /* geser naik/turun di sini */
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.intro-date { position: relative; top: 1rem; font-size: var(--fs-sm); color: var(--clr-text-muted); }

.guest-wrapper {
  position: relative;
  width: 100%;
  margin: 1.2rem 0;
  padding: 1.1rem 1.4rem;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--gold);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.guest-wrapper::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 3px double var(--gold);
  border-radius: 11px;
  pointer-events: none;
}
.guest-label { font-size: var(--fs-xs); color: var(--ink-soft); margin-bottom: 0.3rem; }
.guest-name  { font-family: var(--ff-display); font-size: 1.45rem; font-style: italic; color: var(--ink); }

.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.875rem 2.2rem;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--ink);
  font-size: var(--fs-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
}

/* ── 3. VIDEO SCENE ── */
.video-section { position: relative; width: 100%; height: 100dvh; background: #000; overflow: hidden; }

/* Transisi mix: video jadi overlay lalu memudar ke agenda */
.video-section.crossfade {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 50;
  transition: opacity 1.5s ease;
  pointer-events: none;
}

.main-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.tap-area   { position: absolute; inset: 0; z-index: 2; cursor: pointer; }

.scene-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); }
.dot.active { background: #fff; transform: scale(1.4); }

.tap-hint {
  position: absolute;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: var(--fs-xs);
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.loading-spinner {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}
.spinner-ring {
  width: 44px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── 4. KARTU (PUTIH TRANSPARAN + BINGKAI EMAS GANDA) ── */
.agenda-section { position: relative; width: 100%; min-height: 100dvh; background: transparent !important; }
.agenda-section.reveal .agenda-content { animation: fadeUp 1.6s ease both; }

.agenda-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
  padding: 3rem 1.25rem 2.5rem;
}

.guide-floating { display: flex; gap: 0.75rem; }
.btn-float {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 0.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #5b95e0, #3f73c0);
  color: #fff;
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(63, 115, 192, .45);
  transition: transform .2s, box-shadow .2s;
}
.btn-float:hover, .btn-float:active { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(63, 115, 192, .55); }

.card-box {
  position: relative;
  padding: 1.5rem 1.25rem;
  background: rgba(255, 255, 255, .78);
  border: 1px solid var(--gold);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.card-box::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 3px double var(--gold);
  border-radius: 11px;
  pointer-events: none;
}
.agenda-header, .guide-box, .gift-box, .ayat-box, .livestream-box, .gallery-box { text-align: center; }

.section-eyebrow {
  margin-bottom: 0.3rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink);
}
.section-title, .guide-title, .gift-title {
  font-family: var(--ff-display);
  font-size: 2.2rem;
  font-style: italic;
  color: var(--ink);
}

.quran-quote { margin: 0.8rem 0; font-family: var(--ff-display); font-size: 1.05rem; font-style: italic; line-height: 1.6; color: var(--ink); }
.quran-surah { font-size: var(--fs-xs); letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-soft); }

.gift-desc { font-size: 0.8rem; line-height: 1.6; color: var(--ink-soft); }

/* Tombol di dalam kartu */
.btn-location-inline, .btn-calendar, .btn-guide, .btn-toggle-gift, .btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  background: rgba(var(--blue), .12);
  border: 1px solid rgba(var(--blue), .5);
  border-radius: 999px;
  color: var(--ink);
  font-size: var(--fs-xs);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--dur-normal);
}
.btn-location-inline:hover, .btn-calendar:hover, .btn-guide:hover,
.btn-toggle-gift:hover, .btn-copy:hover { background: rgba(var(--blue), .28); }

.btn-location-inline { margin-top: 0.8rem; }
.btn-guide { display: block; width: 100%; margin-top: 0.5rem; text-align: center; }
.btn-toggle-gift { width: 100%; margin-top: 0.8rem; }
.btn-disabled { cursor: default; opacity: .75; pointer-events: none; }   /* "Tautan Menyusul" */

/* ── 5. MEMPELAI (SATU KARTU) ── */
.couple-box { padding: 2rem 1.5rem; text-align: center; }

.couple-intro { margin-bottom: 0.8rem; }
.couple-salam {
  margin-bottom: 0.6rem;
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.3;
  color: var(--ink);
}
.couple-invite { font-size: 0.85rem; line-height: 1.6; color: var(--ink-soft); }
.parents-info  { text-wrap: balance; }   /* baris kedua dipatahkan rapi kalau kepanjangan */

.couple-profile { display: flex; flex-direction: column; align-items: center; margin: 1rem 0; text-align: center; }

.couple-avatar {
  width: 140px;
  height: 140px;
  margin-bottom: 0.8rem;
  overflow: hidden;
  border: 2px solid var(--gold);
  border-radius: 18px;                      /* persegi, ujung tumpul */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.couple-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.couple-profile:last-child .couple-avatar img { object-position: center 40%; }   /* foto pria: fokus lebih ke bawah */

.couple-name { font-family: var(--ff-display); font-size: 1.5rem; font-style: italic; color: var(--ink); }
.parents-info { margin-top: 0.2rem; font-size: 0.8rem; line-height: 1.4; color: var(--ink-soft); }

.couple-divider {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: .6rem 0;
  font-family: var(--ff-display);
  font-size: 1.8rem;
  color: var(--gold);
}
.couple-divider::before, .couple-divider::after { content: ""; flex: 1; height: 1px; }
.couple-divider::before { background: linear-gradient(90deg, transparent, var(--gold)); }
.couple-divider::after  { background: linear-gradient(270deg, transparent, var(--gold)); }

/* ── 6. AGENDA, COUNTDOWN, HADIAH ── */
.agenda-item {
  display: flex;
  flex-direction: column;       /* jam di atas, nama acara di bawahnya */
  align-items: center;
  gap: 0.2rem;
  padding: 1rem 0;
  text-align: center;
}
.agenda-time { font-size: 1.2rem; font-weight: 500; color: var(--ink); }
.agenda-event { font-family: var(--ff-display); font-size: var(--fs-lg); color: var(--ink); }
.agenda-place { font-style: normal; font-size: 0.82rem; color: var(--ink-soft); }
.agenda-location { padding-top: 0.8rem; text-align: center; }
.agenda-location-label { margin-bottom: 0.3rem; font-size: var(--fs-xs); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); }
.agenda-divider, .rekening-divider { height: 1px; margin: 0.5rem 0; background: rgba(43, 74, 122, .2); }

.countdown-box { margin-top: 1.5rem; padding-top: 1.2rem; text-align: center; border-top: 1px solid rgba(43, 74, 122, .2); }
.countdown-label { color: var(--ink-soft); }
.countdown-timer { display: flex; justify-content: center; gap: 0.6rem; margin-bottom: 1rem; }
.countdown-item {
  min-width: 58px;
  padding: 0.6rem;
  background: rgba(var(--blue), .1);
  border: 1px solid rgba(var(--blue), .35);
  border-radius: 10px;
}
.countdown-item span  { display: block; font-size: 1.2rem; color: var(--ink); }
.countdown-item small { font-size: 9px; color: var(--ink-soft); }

.gift-content { margin-top: 1rem; padding-top: 1rem; text-align: left; border-top: 1px dashed rgba(43, 74, 122, .3); }
.rekening-bank { font-size: var(--fs-xs); letter-spacing: 0.15em; color: var(--ink); }
.rekening-name { font-family: var(--ff-display); font-size: var(--fs-lg); color: var(--ink); }
.rekening-number { color: var(--ink); }
.rekening-number-row { display: flex; align-items: center; justify-content: space-between; }

.agenda-footer { padding-top: 1.5rem; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.3); }
.footer-names  { font-family: var(--ff-display); font-size: var(--fs-xl); font-style: italic; color: #fff; }

/* ── 7. GALLERY (MASONRY 2 KOLOM) ── */
/* ── 7. GALLERY ── */
/* ── 7. GALLERY: L / PP / L / L / PP / L / PP / L / L ── */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 1.2rem; }
.gallery-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;                     /* potret (default) */
  object-fit: cover;
  border-radius: 2px;
  background: rgba(176, 141, 87, .18);
  cursor: zoom-in;
}
/* Landscape: lebar penuh */
.gallery-grid img:nth-child(1),
.gallery-grid img:nth-child(4),
.gallery-grid img:nth-child(5),
.gallery-grid img:nth-child(8),
.gallery-grid img:nth-child(11),
.gallery-grid img:nth-child(12) { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
/* ── 8. PENUTUP ── */
.closing-section {
  position: relative;
  display: flex;
  align-items: center;                 /* isi menempel ke atas */
  justify-content: center;
  width: 100%;
  min-height: 60dvh;
  margin-top: -4rem;                       /* NAIKKAN SEMUA: -6rem, -8rem, dst. */
  padding: 0 0 1rem;
  text-align: center;
  background: transparent !important;
}
.closing-content { display: flex; flex-direction: column; gap: 1.5rem; max-width: 400px; padding: 0 1.5rem 2rem; }  /* padding atas 2rem → 0 */
.closing-quote { font-family: var(--ff-display); font-size: 1.25rem; color: #fff; }
.closing-salam { font-family: var(--ff-display); font-style: italic; font-size: 1.35rem; color: #fff; margin-top: 3rem; }  /* jeda panjang dari "We were so blessed" */
.closing-names { font-family: var(--ff-display); font-size: 2.8rem; font-style: italic; color: #fff; }
/* ── 9. WATERMARK (KREDIT MINIMALIS) ── */
.web-watermark {
  margin: 1rem 1.25rem 0.5rem;
  padding: 0.7rem 1rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(176, 141, 87, 0.45);
  border-radius: 18px;
}
.watermark-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.watermark-item { display: inline-flex; align-items: center; gap: 0.35rem; }
.watermark-dot  { opacity: 0.45; font-size: 0.6rem; }

.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-bottom: 1px dotted currentColor;
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.25s ease;
}
.ig-link:hover, .ig-link:active { color: rgb(var(--blue)); }
.ig-icon { width: 12px; height: 12px; opacity: 0.9; }
/* ── 10. TOMBOL MUSIK ── */
.btn-music {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
  right: calc(50% - 210px);
  z-index: 999;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid #1db954;              /* hijau saat play */
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #1db954;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
  transition: color .25s, border-color .25s;
}
@media (max-width: 450px) { .btn-music { right: 1rem; } }

.music-icon { width: 20px; height: 20px; animation: spin 3s linear infinite; }

/* Mute / belum diputar: abu-abu, berhenti berputar, dicoret */
.btn-music.is-muted { color: #9ca3af; border-color: #9ca3af; }
.btn-music.is-muted .music-icon { animation: none; }
.btn-music.is-muted::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 30px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-45deg);
}
/* ── 11. LIGHTBOX GALLERY ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .92);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lb-img { max-width: 94vw; max-height: 84dvh; object-fit: contain; border-radius: 4px; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); }
.lb-btn {
  position: absolute;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.lb-close { top: max(1rem, env(safe-area-inset-top, 1rem)); right: 1rem; font-size: 1.1rem; }
.lb-prev  { left: .6rem;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: .6rem; top: 50%; transform: translateY(-50%); }
.lb-count {
  position: absolute;
  bottom: max(1.2rem, env(safe-area-inset-bottom, 1.2rem));
  left: 0; right: 0;
  text-align: center;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, .85);
}