/* ============================================================
   STYLE.CSS — Main Design System for Wedding Invitation
   ============================================================ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Nunito:wght@300;400;600;700&family=Great+Vibes&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Light theme — Palet Mewah Hangat (Espresso, Moka, & Emas Jawa Keraton) */
  --bg-gradient-start: #faf7f2;
  --bg-gradient-end: #f4ebe1;
  --text-primary: #241e1b;
  --text-secondary: #5c4c41;
  --text-muted: #8a786c;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dark: #9a7232;
  --glass-bg: rgba(255, 255, 255, 0.40);
  --glass-border: rgba(255, 255, 255, 0.60);
  --glass-shadow: rgba(60, 42, 28, 0.08);
  --glass-bg-dark-mode: rgba(30, 10, 50, 0.35);
  --card-hover-shadow: rgba(201, 168, 76, 0.22);
  --progress-color: linear-gradient(90deg, #c9a84c, #e8c97a, #c9a84c);
  --scrollbar-thumb: #c9a84c;
  --accent-1: #d4a373;
  --accent-2: #b59e7f;
  --toast-bg: rgba(36, 30, 27, 0.94);
  --toast-color: #fff;
  --cover-overlay: rgba(36, 30, 27, 0.65);
  --nav-dot-active: #c9a84c;
  --section-divider: rgba(201, 168, 76, 0.30);
  --input-bg: rgba(255, 255, 255, 0.50);
  --input-border: rgba(201, 168, 76, 0.45);
  --btn-primary-bg: linear-gradient(135deg, #c9a84c, #e8c97a);
  --btn-primary-text: #241e1b;
  --countdown-bg: rgba(255, 255, 255, 0.30);
  --wish-card-bg: rgba(255, 255, 255, 0.35);
}

/* Dark mode overrides */
body.dark-mode {
  --bg-gradient-start: #0f0520;
  --bg-gradient-end: #1a0a2e;
  --text-primary: #f0e6ff;
  --text-secondary: #c9a8e0;
  --text-muted: #9068b0;
  --glass-bg: rgba(30, 10, 60, 0.40);
  --glass-border: rgba(200, 150, 255, 0.18);
  --glass-shadow: rgba(0, 0, 0, 0.40);
  --card-hover-shadow: rgba(150, 80, 200, 0.40);
  --cover-overlay: rgba(5, 0, 20, 0.80);
  --input-bg: rgba(30, 10, 60, 0.40);
  --input-border: rgba(201, 168, 76, 0.40);
  --wish-card-bg: rgba(30, 10, 60, 0.35);
  --toast-bg: rgba(200, 170, 255, 0.95);
  --toast-color: #1a0a2e;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  /* Hilangkan flash biru saat tap di mobile */
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  /* Cegah auto-resize teks di iOS */
  text-size-adjust: 100%;
}

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text-primary);
  overflow-x: hidden;
  transition: color 0.4s ease, background 0.4s ease;
  background: var(--bg-gradient-start);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.cover-active {
  overflow: hidden;
}

/* Pastikan elemen interaktif punya ukuran minimum sentuh yang nyaman (48px) di mobile */
button,
a,
[role="button"] {
  min-height: 44px;
  touch-action: manipulation;
  /* Cegah delay 300ms pada iOS */
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

/* ── Fixed Background ──────────────────────────────────────── */
#bg-fixed {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: url('../assets/bg-lokasi.png');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  /* scroll untuk kompatibilitas mobile iOS */
  transition: filter 0.4s ease;
}

#bg-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg,
      rgba(253, 242, 248, 0.82) 0%,
      rgba(252, 231, 214, 0.80) 100%);
  transition: background 0.4s ease;
}

body.dark-mode #bg-overlay {
  background: linear-gradient(135deg,
      rgba(15, 5, 32, 0.88) 0%,
      rgba(26, 10, 46, 0.85) 100%);
}

/* ── Progress Bar ──────────────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--progress-color);
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(201, 168, 76, 0.7);
}

/* ── Theme Toggle ──────────────────────────────────────────── */
#theme-toggle {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top, 0px));
  right: calc(18px + env(safe-area-inset-right, 0px));
  z-index: 9000;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 16px var(--glass-shadow);
}

#theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
}

/* ── Cover / Hero Overlay (Full Screen & Anti-Bocor Sesuai Surat Manis) ── */
#cover-section {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  /* Dynamic viewport height — fix untuk mobile Safari */
  max-height: 100vh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 8000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #2b1d0c;
  /* fallback hangat jika aset sedang dimuat */
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

#cover-section.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── Background Foto pria-wanita.png 100% Full Menutupi Layar ── */
.cover-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/pria-wanita.png');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
  filter: none;
  opacity: 1;
}

/* ── Vignette Fotografi Halus (Tengah Bening, Atas & Bawah Lembut) ── */
.cover-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.45) 0%,
      rgba(0, 0, 0, 0.18) 20%,
      transparent 32%,
      transparent 65%,
      rgba(0, 0, 0, 0.25) 78%,
      rgba(0, 0, 0, 0.60) 100%);
}

/* ── Floating Butterflies ─────────────────────────────────── */
.cover-butterflies {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

.cover-butterfly {
  position: absolute;
  width: var(--bf-size, 38px);
  height: var(--bf-size, 38px);
  animation:
    bfFloat var(--bf-dur, 14s) ease-in-out infinite var(--bf-delay, 0s),
    bfDrift var(--bf-drift, 18s) ease-in-out infinite var(--bf-delay, 0s);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
  opacity: 0.95;
}

.cover-butterfly svg {
  width: 100%;
  height: 100%;
}

/* Kepakan sayap - tiap sayap berputar dengan 3D */
.cover-butterfly .wing-left {
  transform-origin: right center;
  animation: wingFlapL 0.35s ease-in-out infinite alternate;
}

.cover-butterfly .wing-right {
  transform-origin: left center;
  animation: wingFlapR 0.35s ease-in-out infinite alternate;
}

@keyframes wingFlapL {
  0% {
    transform: rotateY(0deg);
  }

  100% {
    transform: rotateY(55deg);
  }
}

@keyframes wingFlapR {
  0% {
    transform: rotateY(0deg);
  }

  100% {
    transform: rotateY(-55deg);
  }
}

/* Melayang naik-turun */
@keyframes bfFloat {

  0%,
  100% {
    transform: translateY(0) rotate(var(--bf-rot, 0deg));
  }

  25% {
    transform: translateY(calc(-1 * var(--bf-amp, 30px))) rotate(calc(var(--bf-rot, 0deg) + 8deg));
  }

  50% {
    transform: translateY(calc(-0.5 * var(--bf-amp, 30px))) rotate(calc(var(--bf-rot, 0deg) - 5deg));
  }

  75% {
    transform: translateY(calc(-1.2 * var(--bf-amp, 30px))) rotate(calc(var(--bf-rot, 0deg) + 12deg));
  }
}

/* Melayang horizontal */
@keyframes bfDrift {

  0%,
  100% {
    margin-left: 0;
    margin-top: 0;
  }

  33% {
    margin-left: var(--bf-dx, 30px);
    margin-top: calc(-0.5 * var(--bf-dy, 20px));
  }

  66% {
    margin-left: calc(-0.5 * var(--bf-dx, 30px));
    margin-top: var(--bf-dy, 20px);
  }
}

/* ── Cover Content (Tanpa Kotak Buram / Bening / Sesuai Surat Manis) ─ */
.cover-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 580px;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  /* Dynamic viewport height untuk mobile */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 3.2rem 1.5rem calc(3.5rem + env(safe-area-inset-bottom, 0px));
  padding-top: calc(3.2rem + env(safe-area-inset-top, 0px));
  box-sizing: border-box;
  animation: coverFadeIn 1.2s ease both;
  pointer-events: auto;
}

@keyframes coverFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Bagian Atas: Bismillah, Judul, Nama Pasangan, Tanggal ── */
.cover-header {
  text-align: center;
  width: 100%;
}

.cover-bismillah {
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.9);
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.cover-subtitle {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  letter-spacing: 0.38em;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.cover-couple-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.3rem, 7vw, 3.6rem);
  font-weight: 500;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.95);
}

.cover-couple-name .ampersand {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 0.85em;
  color: #e8c97a;
  margin: 0 0.15em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.cover-date {
  font-family: 'Playfair Display', serif;
  font-size: 0.92rem;
  color: #ffffff;
  letter-spacing: 0.22em;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.cover-date-ornament {
  color: #e8c97a;
  font-size: 0.7em;
  vertical-align: middle;
  margin: 0 0.35rem;
}

/* ── Bagian Bawah: Dear, Nama Tamu, You're Invited, Tombol Buka ── */
.cover-footer {
  text-align: center;
  width: 100%;
}

.cover-guest {
  font-family: 'Playfair Display', serif;
  font-size: 0.82rem;
  color: #ffffff;
  margin-bottom: 0.3rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.cover-guest-name {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 5vw, 1.85rem);
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.14em;
  margin-bottom: 0.4rem;
  min-height: 2.2rem;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.95);
}

.cover-invitation-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 1.2rem;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

/* ── Tombol Buka Undangan (Style Surat Manis: Pill Bronze/Karamel Mewah) ── */
.btn-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 2.4rem;
  background: linear-gradient(135deg, #6d4421, #8a582c, #6d4421);
  color: #ffffff;
  border: 1.5px solid rgba(232, 201, 122, 0.45);
  border-radius: 50px;
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.08em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(109, 68, 33, 0.5);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  animation: pulseGlowCover 2.5s ease-in-out infinite;
}

.btn-open .btn-icon {
  width: 18px;
  height: 18px;
}

.btn-open:hover {
  transform: translateY(-2px) scale(1.04);
  background: linear-gradient(135deg, #7d4e26, #9b6332, #7d4e26);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 16px rgba(232, 201, 122, 0.5);
  border-color: #e8c97a;
}

@keyframes pulseGlowCover {

  0%,
  100% {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  }

  50% {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 18px rgba(232, 201, 122, 0.4);
  }
}

/* ── Penyesuaian Responsif Layar Pendek ────────────────────── */
@media (max-height: 680px) {
  .cover-content {
    padding: 2rem 1.2rem 2.2rem;
  }

  .cover-bismillah {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
  }

  .cover-subtitle {
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
  }

  .cover-couple-name {
    font-size: 2.2rem;
    margin-bottom: 0.2rem;
  }

  .cover-guest-name {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
  }

  .cover-invitation-text {
    margin-bottom: 0.8rem;
  }

  .btn-open {
    padding: 0.7rem 2rem;
    font-size: 0.88rem;
  }
}

/* Aksesibilitas: kurangi animasi untuk pengguna yang memilih reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cover-butterfly {
    animation: none !important;
  }

  .cover-butterfly .wing-left,
  .cover-butterfly .wing-right {
    animation: none !important;
  }

  .cover-content {
    animation: none !important;
  }
}

/* ── Main Content ──────────────────────────────────────────── */
#main-content {
  position: relative;
  z-index: 1;
}

/* ── Section Shared ────────────────────────────────────────── */
section {
  padding: 5rem 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.divider-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.5rem 0;
  color: var(--gold);
  font-size: 1rem;
}

.divider-ornament::before,
.divider-ornament::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ── Glassmorphism Card ────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px var(--glass-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px var(--card-hover-shadow);
}

/* ── VIDEO SECTION ─────────────────────────────────────────── */
#video-section {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.6rem 1rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#video-section .section-label {
  margin-bottom: 0.25rem;
}

#video-section .section-title {
  margin-bottom: 0;
  line-height: 1.25;
}

#video-section .divider-ornament {
  margin: 0.4rem auto 0.8rem;
}

.video-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Ketinggian adaptif mendekati penuh/maksimal layar tanpa perlu scroll ke bawah */
  height: min(calc(100vh - 150px), 70vh, 700px);
  aspect-ratio: 9 / 16;
  /* Pas persis dengan rasio video portrait 9:16 (1440x2560) sehingga tidak ada black bars samping */
  width: auto;
  max-width: min(90vw, 420px);
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 4px 16px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--glass-border);
  background: #000000;
  line-height: 0;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.video-wrapper:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.45), 0 6px 20px rgba(0, 0, 0, 0.25), 0 0 0 1.5px var(--gold);
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: block;
  object-fit: contain;
  /* Utuh 100% tanpa ada bagian video yang terpotong */
  background: #000000;
  border-radius: inherit;
  cursor: pointer;
}

.video-no-source {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  background: linear-gradient(135deg, rgba(60, 30, 90, 0.6), rgba(30, 10, 60, 0.8));
  color: var(--text-secondary);
  gap: 1rem;
  font-size: 0.9rem;
}

.video-no-source .icon {
  font-size: 3rem;
}

/* ── QUOTES & COUNTDOWN ────────────────────────────────────── */
#quotes-countdown {
  text-align: center;
}

.couple-photos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.couple-photo-frame {
  position: relative;
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.couple-photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 1;
  border: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
  background: radial-gradient(circle at 50% 35%, #fffdfa 0%, #f4eae0 70%, #ead5c0 100%);
}

body.dark-mode .couple-photo-inner {
  background: radial-gradient(circle at 50% 35%, #38244f 0%, #251638 70%, #1a0f28 100%);
}

.couple-photo-frame::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg,
      var(--gold), var(--gold-light), var(--gold), var(--gold-dark), var(--gold));
  z-index: 0;
  animation: spinRing 6s linear infinite;
}

@keyframes spinRing {
  to {
    transform: rotate(360deg);
  }
}

.couple-heart {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heartPulse 2.2s ease-in-out infinite;
  user-select: none;
}

.heart-ornament {
  width: 76px;
  height: 76px;
  display: block;
  overflow: visible;
}

@keyframes heartPulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 3px 10px rgba(184, 134, 11, 0.35));
  }

  14% {
    transform: scale(1.15);
    filter: drop-shadow(0 6px 18px rgba(184, 134, 11, 0.6));
  }

  28% {
    transform: scale(1);
    filter: drop-shadow(0 3px 10px rgba(184, 134, 11, 0.35));
  }

  42% {
    transform: scale(1.1);
    filter: drop-shadow(0 5px 14px rgba(184, 134, 11, 0.5));
  }

  70% {
    transform: scale(1);
    filter: drop-shadow(0 3px 10px rgba(184, 134, 11, 0.35));
  }
}

.quran-verse {
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.quran-verse .arabic {
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  color: var(--gold);
  line-height: 2;
  margin-bottom: 0.8rem;
  font-weight: 400;
  direction: rtl;
}

.quran-verse .translation {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.quran-verse .source {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Countdown */
.countdown-wrapper {
  margin: 2.5rem 0;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.countdown-item {
  background: var(--countdown-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  padding: 1.2rem 1.4rem;
  min-width: 80px;
  text-align: center;
  box-shadow: 0 4px 16px var(--glass-shadow);
  transition: transform 0.3s ease;
}

.countdown-item:hover {
  transform: translateY(-4px) scale(1.05);
}

.countdown-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  display: block;
  text-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}

.countdown-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.3rem;
  display: block;
}

.countdown-expired {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--gold);
  padding: 1rem;
}

.btn-calendar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.8rem;
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 50px;
  color: var(--gold);
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.3s, color 0.3s, transform 0.2s;
  letter-spacing: 0.04em;
}

.btn-calendar:hover {
  background: var(--gold);
  color: #fff;
  transform: translateY(-2px);
}

/* ── PROFIL MEMPELAI ───────────────────────────────────────── */
#profil-section {
  text-align: center;
}

.profil-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: stretch;
  margin-top: 2.5rem;
}

@media (max-width: 640px) {
  .profil-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profil-divider {
    display: none;
  }
}

.profil-card {
  padding: 2.2rem 1.8rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
}

.profil-photo-frame {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 3px solid var(--gold);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
  margin: 0 auto 1.2rem;
  display: block;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 35%, #fffdfa 0%, #f4eae0 70%, #ead5c0 100%);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.profil-photo-frame:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(201, 168, 76, 0.45);
}

body.dark-mode .profil-photo-frame {
  background: radial-gradient(circle at 50% 35%, #38244f 0%, #251638 70%, #1a0f28 100%);
}

/* ── Penyesuaian Presisi Framing & Letak Wajah Mempelai ────── */
.couple-photo-inner img,
.profil-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform-origin: center top;
  transition: transform 0.4s ease;
}

/* Mempelai Pria: wajah terpusat presisi, blangkon & ornamen janur latar seimbang */
.couple-photo-inner img.photo-pria,
.profil-photo-frame img.photo-pria {
  transform: translateY(-17%) scale(1.60);
}

/* Mempelai Wanita: cunduk mentul & mahkota bunga pas di lengkungan atas frame */
.couple-photo-inner img.photo-wanita,
.profil-photo-frame img.photo-wanita {
  transform: translateY(-2%) scale(1.60);
}

.profil-photo-frame:hover img.photo-pria {
  transform: translateY(-17%) scale(1.68);
}

.profil-photo-frame:hover img.photo-wanita {
  transform: translateY(-2%) scale(1.68);
}

.profil-role {
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.profil-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  min-height: 4.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}

.profil-parents {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

.profil-divider {
  font-family: 'Great Vibes', cursive;
  font-size: 4rem;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 4px 16px rgba(201, 168, 76, 0.4);
  animation: heartbeat 2s ease-in-out infinite;
  align-self: center;
}

/* ── DETAIL ACARA ──────────────────────────────────────────── */
#acara-section {
  text-align: center;
}

.acara-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.acara-card {
  padding: 2rem 1.5rem;
  text-align: center;
}

.acara-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.acara-type {
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.acara-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.acara-date {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.8rem;
}

.acara-venue {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}

.acara-address {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.nav-btn-group {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
  cursor: pointer;
}

.btn-nav.gmaps {
  background: linear-gradient(135deg, #4285F4, #34A853);
  color: #fff;
  box-shadow: 0 4px 14px rgba(66, 133, 244, 0.4);
}

.btn-nav.waze {
  background: linear-gradient(135deg, #33ccff, #00a0e4);
  color: #fff;
  box-shadow: 0 4px 14px rgba(51, 204, 255, 0.4);
}

.btn-nav:hover {
  transform: translateY(-2px);
}

/* ── WEDDING GIFT ──────────────────────────────────────────── */
#gift-section {
  text-align: center;
}

.gift-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1.2rem;
  margin-top: 2rem;
  max-width: 100%;
  padding: 0.5rem 0;
}

/* ── ATM Card Base ── */
.atm-card {
  flex: 1 1 300px;
  max-width: 400px;
  min-width: 0;
  aspect-ratio: 1.5 / 1;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: center;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.atm-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.atm-card-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 40%, #333333 100%);
  border-radius: 16px;
  padding: 1.4rem 1.6rem;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 0.2rem 0;
}

/* Subtle shine overlay */
.atm-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.06) 0%,
      transparent 40%,
      transparent 60%,
      rgba(255, 255, 255, 0.03) 100%);
  border-radius: 16px;
  pointer-events: none;
  z-index: 1;
}

/* KADO card variant - slightly different gradient */
.atm-card-kado .atm-card-inner {
  background: linear-gradient(145deg, #3a3535 0%, #2a2525 40%, #444040 100%);
}

/* ── Chip SVG ── */
.atm-chip {
  grid-column: 1;
  grid-row: 1;
  width: 48px;
  height: 38px;
  align-self: start;
  position: relative;
  z-index: 2;
}

.atm-chip svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.atm-chip-kado {
  width: 42px;
  height: 42px;
}

/* ── Bank Name (top-right) ── */
.atm-bank-name {
  grid-column: 2;
  grid-row: 1;
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
  text-align: right;
  letter-spacing: 0.06em;
  align-self: start;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ── Info Right (No. Rekening) ── */
.atm-info-right {
  grid-column: 2;
  grid-row: 2;
  text-align: right;
  align-self: center;
  position: relative;
  z-index: 2;
}

.atm-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}

.atm-number {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.12em;
  font-variant-numeric: tabular-nums;
}

.atm-address {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.4;
  margin-top: 0.15rem;
}

/* ── Info Left (Atas Nama) ── */
.atm-info-left {
  grid-column: 1;
  grid-row: 2 / 4;
  align-self: end;
  text-align: left;
  position: relative;
  z-index: 2;
  padding-bottom: 0.2rem;
}

.atm-holder {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

/* ── Copy Button (bottom-right) ── */
.atm-copy-wrap {
  grid-column: 2;
  grid-row: 3;
  text-align: right;
  align-self: end;
  position: relative;
  z-index: 2;
}

.btn-copy-atm {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.btn-copy-atm:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-copy-atm:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.3);
}

/* ── TOAST NOTIFICATION ────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--toast-bg);
  color: var(--toast-color);
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 9500;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── RSVP ──────────────────────────────────────────────────── */
#rsvp-section {
  text-align: center;
}

.rsvp-form-wrapper {
  padding: 2.5rem 2rem;
  margin-top: 2rem;
  text-align: left;
}

.form-group {
  margin-bottom: 1.4rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  letter-spacing: 0.04em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--input-bg);
  border: 1.5px solid var(--input-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Nunito', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  backdrop-filter: blur(8px);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a84c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.form-checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--gold);
  cursor: pointer;
}

.form-checkbox-group label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}

.wa-input-wrapper {
  display: none;
  margin-top: 0.8rem;
}

.wa-input-wrapper.visible {
  display: block;
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  border: none;
  border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
  letter-spacing: 0.04em;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(201, 168, 76, 0.55);
}

.btn-submit:active {
  transform: translateY(0);
}

/* ── WISHES & GUESTBOOK ────────────────────────────────────── */
#wishes-section {
  text-align: center;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.stat-item {
  padding: 1rem 1.5rem;
  min-width: 110px;
  text-align: center;
}

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 600;
  color: var(--gold);
  display: block;
  line-height: 1;
  transition: transform 0.3s ease;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 0.3rem;
  display: block;
}

.wish-form {
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: left;
}

.wish-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.wish-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 500px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.wish-card {
  background: var(--wish-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  text-align: left;
  backdrop-filter: blur(8px);
  animation: wishEnter 0.4s ease both;
}

@keyframes wishEnter {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.wish-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.7rem;
}

.wish-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--accent-1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.wish-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.wish-status {
  font-size: 0.72rem;
  padding: 0.15rem 0.6rem;
  border-radius: 50px;
  margin-left: auto;
}

.wish-status.hadir {
  background: rgba(100, 220, 150, 0.2);
  color: #3dc87a;
  border: 1px solid rgba(100, 220, 150, 0.3);
}

.wish-status.tidak {
  background: rgba(255, 120, 120, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(255, 120, 120, 0.3);
}

.wish-status.mungkin {
  background: rgba(255, 200, 100, 0.2);
  color: #f0a830;
  border: 1px solid rgba(255, 200, 100, 0.3);
}

.wish-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.wish-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  text-align: right;
}

/* ── FLOATING AUDIO PLAYER ─────────────────────────────────── */
#audio-player {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  left: calc(24px + env(safe-area-inset-left, 0px));
  z-index: 8500;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

#audio-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gold);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.3);
  position: relative;
  overflow: hidden;
  padding: 0;
}

#audio-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(201, 168, 76, 0.45);
}

#audio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.audio-svg {
  display: block;
  transition: transform 0.3s ease;
}

#audio-btn.playing {
  border-color: var(--gold-light);
  box-shadow: 0 4px 22px rgba(201, 168, 76, 0.55);
}

#audio-btn.playing .audio-svg {
  animation: musicBeat 1.4s ease-in-out infinite;
}

@keyframes musicBeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.14) rotate(4deg);
  }
}

.audio-label {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.3s, transform 0.3s;
}

#audio-player:hover .audio-label {
  opacity: 1;
  transform: translateX(0);
}

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 3rem 1.5rem calc(5rem + env(safe-area-inset-bottom, 0px));
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.8;
}

footer .footer-logo {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

/* ── SECTION SEPARATOR ─────────────────────────────────────── */
.section-sep {
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--section-divider), transparent);
  margin: 0 auto;
}

/* ── SCROLL REVEAL (EFEK TIMBUL & TERBENAM DUA ARAH) ───────── */
.reveal {
  opacity: 0;
  transform: translateY(48px) scale(0.96);
  transition:
    opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
    transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  /* Saat terbenam/hilang ke bawah layar, langsung merespons secara halus tanpa jeda */
  transition-delay: 0s;
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Staggered delay HANYA saat elemen masuk / timbul ke layar */
.reveal.visible.reveal-delay-1 {
  transition-delay: 0.12s;
}

.reveal.visible.reveal-delay-2 {
  transition-delay: 0.22s;
}

.reveal.visible.reveal-delay-3 {
  transition-delay: 0.32s;
}

.reveal.visible.reveal-delay-4 {
  transition-delay: 0.42s;
}

/* Aksesibilitas bagi pengguna dengan preferensi reduced motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 0;
    transform: none !important;
    transition: opacity 0.35s ease !important;
  }

  .reveal.visible {
    opacity: 1;
    transform: none !important;
  }
}

/* ── RESPONSIVE ────────────────────────────────────────────── */

/* ── Tablet (max-width: 768px) ── */
@media (max-width: 768px) {
  section {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: clamp(1.7rem, 5vw, 2.4rem);
  }

  .countdown-item {
    padding: 0.9rem 1rem;
    min-width: 68px;
  }

  .countdown-number {
    font-size: 2rem;
  }

  .couple-photo-frame,
  .profil-photo-frame {
    width: 130px;
    height: 130px;
  }

  .rsvp-form-wrapper {
    padding: 1.5rem 1rem;
  }

  .profil-card {
    padding: 1.5rem 1.2rem;
  }

  .acara-card {
    padding: 1.5rem 1rem;
  }

  #video-section {
    padding: 1.3rem 0.8rem 1.5rem;
  }

  .video-wrapper {
    height: min(calc(100vh - 130px), 68vh, 600px);
    max-width: min(88vw, 380px);
    border-radius: 18px;
  }
}

/* ── Mobile (max-width: 480px) ── Utama untuk Smartphone ── */
@media (max-width: 480px) {

  /* ─ Global Section ─ */
  section {
    padding: 2.5rem 0.85rem;
  }

  .section-label {
    font-size: 0.65rem;
    letter-spacing: 0.22em;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 0.7rem;
  }

  .divider-ornament {
    margin: 1rem 0;
    font-size: 0.9rem;
  }

  .divider-ornament::before,
  .divider-ornament::after {
    max-width: 50px;
  }

  /* ─ Glass Card ─ */
  .glass-card {
    border-radius: 16px;
  }

  .glass-card:hover {
    transform: none;
    /* Nonaktifkan hover lift di mobile */
    box-shadow: 0 8px 32px var(--glass-shadow);
  }

  /* ─ Cover Section ─ */
  .cover-content {
    padding: 2.5rem 1rem 2.8rem;
  }

  .cover-bismillah {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
  }

  .cover-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    margin-bottom: 0.4rem;
  }

  .cover-couple-name {
    font-size: clamp(1.8rem, 9vw, 2.6rem);
    margin-bottom: 0.3rem;
  }

  .cover-couple-name .ampersand {
    font-size: 0.8em;
  }

  .cover-date {
    font-size: 0.8rem;
    letter-spacing: 0.16em;
  }

  .cover-guest {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
  }

  .cover-guest-name {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    margin-bottom: 0.3rem;
    min-height: 1.8rem;
  }

  .cover-invitation-text {
    font-size: 0.7rem;
    margin-bottom: 0.9rem;
  }

  .btn-open {
    padding: 0.7rem 1.8rem;
    font-size: 0.85rem;
    gap: 0.4rem;
  }

  .btn-open .btn-icon {
    width: 15px;
    height: 15px;
  }

  /* Kupu-kupu lebih kecil di mobile */
  .cover-butterfly {
    opacity: 0.75;
  }

  /* ─ Couple Photos ─ */
  .couple-photos {
    gap: 1rem;
    margin: 1.5rem 0;
  }

  .couple-photo-frame,
  .profil-photo-frame {
    width: 110px;
    height: 110px;
  }

  .couple-photo-frame::before {
    inset: -4px;
  }

  .heart-ornament {
    width: 48px;
    height: 48px;
  }

  /* ─ Quran Verse ─ */
  .quran-verse {
    padding: 1.2rem;
    margin: 1.2rem 0;
  }

  .quran-verse .arabic {
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    line-height: 1.8;
  }

  .quran-verse .translation {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .quran-verse .source {
    font-size: 0.72rem;
  }

  /* ─ Countdown ─ */
  .countdown-wrapper {
    margin: 1.5rem 0;
  }

  .countdown-grid {
    gap: 0.6rem;
  }

  .countdown-item {
    padding: 0.7rem 0.8rem;
    min-width: 60px;
    border-radius: 12px;
  }

  .countdown-number {
    font-size: 1.7rem;
  }

  .countdown-label {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
  }

  .btn-calendar {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }

  /* ─ Profil Mempelai ─ */
  .profil-grid {
    margin-top: 1.5rem;
  }

  .profil-card {
    padding: 1.5rem 1rem;
  }

  .profil-name {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    min-height: auto;
    margin-bottom: 0.5rem;
  }

  .profil-role {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
  }

  .profil-parents {
    font-size: 0.8rem;
  }

  /* ─ Detail Acara ─ */
  .acara-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .acara-card {
    padding: 1.5rem 1rem;
  }

  .acara-icon {
    font-size: 2rem;
    margin-bottom: 0.7rem;
  }

  .acara-type {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
  }

  .acara-time {
    font-size: 1.3rem;
  }

  .acara-date {
    font-size: 0.85rem;
  }

  .acara-venue {
    font-size: 0.92rem;
  }

  .acara-address {
    font-size: 0.78rem;
    margin-bottom: 1rem;
  }

  .btn-nav {
    padding: 0.5rem 0.9rem;
    font-size: 0.75rem;
  }

  /* ─ Gift / ATM Cards ─ */
  .gift-grid {
    gap: 1rem;
    padding: 0.5rem 0;
  }

  .atm-card {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .atm-card-inner {
    padding: 1.1rem 1.2rem;
  }

  .atm-chip {
    width: 40px;
    height: 32px;
  }

  .atm-chip-kado {
    width: 36px;
    height: 36px;
  }

  .atm-bank-name {
    font-size: 1.2rem;
  }

  .atm-label {
    font-size: 0.62rem;
  }

  .atm-number {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
  }

  .atm-address {
    font-size: 0.72rem;
  }

  .atm-holder {
    font-size: 0.82rem;
  }

  .btn-copy-atm {
    padding: 0.3rem 0.8rem;
    font-size: 0.68rem;
  }

  /* ─ RSVP ─ */
  .rsvp-form-wrapper {
    padding: 1.2rem 0.9rem;
    border-radius: 16px;
  }

  .form-label {
    font-size: 0.78rem;
  }

  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.7rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 10px;
  }

  .form-checkbox-group label {
    font-size: 0.82rem;
  }

  .btn-submit {
    padding: 0.85rem;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  /* ─ Wishes / Buku Tamu ─ */
  .stats-grid {
    gap: 0.6rem;
  }

  .stat-item {
    padding: 0.7rem 0.8rem;
    min-width: 80px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.62rem;
  }

  .wish-form {
    padding: 1.2rem;
  }

  .wish-form-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .wish-card {
    padding: 1rem;
    border-radius: 14px;
  }

  .wish-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }

  .wish-name {
    font-size: 0.85rem;
  }

  .wish-text {
    font-size: 0.82rem;
  }

  .wish-time {
    font-size: 0.65rem;
  }

  .wish-status {
    font-size: 0.65rem;
    padding: 0.12rem 0.5rem;
  }

  /* ─ Toast ─ */
  #toast {
    bottom: 80px;
    font-size: 0.8rem;
    padding: 0.6rem 1.2rem;
    max-width: calc(100vw - 2rem);
    white-space: normal;
    text-align: center;
  }

  /* ─ Audio Player ─ */
  #audio-player {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: calc(16px + env(safe-area-inset-left, 0px));
  }

  #audio-btn {
    width: 44px;
    height: 44px;
  }

  .audio-svg {
    width: 18px !important;
    height: 18px !important;
  }

  .audio-label {
    font-size: 0.68rem;
    padding: 0.25rem 0.7rem;
  }

  /* ─ Theme Toggle ─ */
  #theme-toggle {
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  /* ─ Admin Login Float ─ */
  .admin-login-float {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: calc(16px + env(safe-area-inset-right, 0px));
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }

  /* ─ Footer ─ */
  footer {
    padding: 2rem 1rem 4rem;
    font-size: 0.75rem;
  }

  footer .footer-logo {
    font-size: 2rem;
  }

  /* ─ Video ─ */
  #video-section {
    max-width: 100%;
    padding: 0.85rem 0.6rem 1.1rem;
  }

  #video-section .section-title {
    font-size: 1.45rem;
  }

  #video-section .divider-ornament {
    margin: 0.25rem auto 0.55rem;
    font-size: 0.85rem;
  }

  .video-wrapper {
    /* Ukuran mendekati maksimal di layar HP, proporsional 9:16, rapi & pas tanpa perlu scroll ke bawah */
    height: min(calc(100vh - 110px), 66vh, 520px);
    aspect-ratio: 9 / 16;
    width: auto;
    max-width: 86vw;
    border-radius: 16px;
    margin: 0 auto;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.4);
  }

  @supports (height: 100dvh) {
    .video-wrapper {
      height: min(calc(100dvh - 110px), 66dvh, 520px);
    }
  }

  .video-wrapper video {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: inherit;
  }

  .video-no-source {
    min-height: 180px;
    font-size: 0.8rem;
  }

  .video-no-source .icon {
    font-size: 2rem;
  }

  /* ─ Section Separator ─ */
  .section-sep {
    margin: 0 1rem;
  }
}

/* ── Extra Small Mobile (max-width: 360px) ── Layar sangat kecil ── */
@media (max-width: 360px) {
  section {
    padding: 2rem 0.7rem;
  }

  .cover-couple-name {
    font-size: clamp(1.5rem, 10vw, 2.2rem);
  }

  .couple-photo-frame,
  .profil-photo-frame {
    width: 95px;
    height: 95px;
  }

  .heart-ornament {
    width: 40px;
    height: 40px;
  }

  .couple-photos {
    gap: 0.6rem;
  }

  .countdown-item {
    padding: 0.6rem 0.6rem;
    min-width: 52px;
  }

  .countdown-number {
    font-size: 1.4rem;
  }

  .countdown-label {
    font-size: 0.55rem;
  }

  .atm-card-inner {
    padding: 0.9rem 1rem;
  }

  .atm-bank-name {
    font-size: 1rem;
  }

  .atm-number {
    font-size: 0.85rem;
  }

  .atm-holder {
    font-size: 0.75rem;
  }

  .profil-name {
    font-size: clamp(1.1rem, 4.5vw, 1.35rem);
  }

  #video-section {
    padding: 0.7rem 0.4rem 0.9rem;
  }

  .video-wrapper {
    height: min(calc(100vh - 95px), 64vh, 460px);
    max-width: 88vw;
    border-radius: 14px;
  }

  @supports (height: 100dvh) {
    .video-wrapper {
      height: min(calc(100dvh - 95px), 64dvh, 460px);
    }
  }
}

/* ── FIREBASE AUTH MODAL ───────────────────────────────────── */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 5, 30, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.auth-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 2.2rem 2rem;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}

.auth-modal-backdrop.active .auth-modal-content {
  transform: translateY(0) scale(1);
}

.auth-close-btn {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.auth-close-btn:hover {
  color: var(--gold);
}


/* ── Floating Admin Login Button (Kanan Bawah - Icon Only) ── */
.admin-login-float {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  right: calc(24px + env(safe-area-inset-right, 0px));
  z-index: 8999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 168, 76, 0.55);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--gold);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.25);
  overflow: hidden;
  user-select: none;
  white-space: nowrap;
}

.admin-login-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.45);
}

/* ── Footer Business CTA (Subtle, Kecil & Elegan) ───────── */
.footer-business-cta {
  margin: 1.2rem auto 0;
  padding: 0.65rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-block;
  max-width: 240px;
  width: auto;
  box-sizing: border-box;
}

.footer-cta-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.footer-cta-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.btn-wa-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.85rem;
  background: rgba(37, 211, 102, 0.15);
  color: #25D366;
  border: 1px solid rgba(37, 211, 102, 0.35);
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all .25s ease;
  box-shadow: none;
}

.btn-wa-cta:hover {
  background: #25D366;
  color: #fff;
  border-color: #25D366;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.3);
}

.btn-wa-cta svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}