/* ===== Variabel & Reset ===== */
:root {
  --color-bg-cream: #f3ede0;
  --color-bg-cream-light: #f9f5ec;
  --color-sage: #8b9484;
  --color-sage-dark: #6f7864;
  --color-gold: #c9a876;
  --color-gold-dark: #a9895c;
  --color-text-dark: #4a4438;
  --color-text-light: #f5f0e6;
  --color-border: #d9cbb0;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-body: 'EB Garamond', Georgia, serif;
}

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

body {
  background: var(--color-bg-cream);
  color: var(--color-text-dark);
  font-family: var(--font-body);
  line-height: 1.7;
  font-size: 1.05rem;
}

.hidden { display: none !important; }

/* ===== Reusable section paddings ===== */
.section,
.section-illustrated {
  padding: 56px 24px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.section-illustrated {
  background-image:
    radial-gradient(ellipse at top, rgba(180, 190, 160, 0.15), transparent 60%),
    linear-gradient(180deg, var(--color-bg-cream-light) 0%, var(--color-bg-cream) 100%);
  background-size: cover;
  position: relative;
}

.section-sage {
  background: linear-gradient(180deg, var(--color-sage) 0%, var(--color-sage-dark) 100%);
  color: var(--color-text-light);
  max-width: 100%;
  padding: 56px 24px;
}

.section-sage blockquote,
.section-sage .doa-translation,
.section-sage p {
  color: var(--color-text-light);
}

.section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 2rem;
  letter-spacing: 1px;
  color: var(--color-text-dark);
  margin-bottom: 20px;
}

.section-title-light { color: var(--color-text-light); }

.eyebrow {
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--color-gold-dark);
  margin-bottom: 10px;
  font-family: var(--font-body);
}

.eyebrow-light { color: #dfe4d3; }

/* ===== Cover (background dari gambar sampul-garden, full tanpa terpotong) ===== */
.cover {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  /* Warna diambil dari tone cream gambar, supaya kalau viewport lebih
     tinggi dari gambar (rasio 640:1137), sisa area di bawah gambar
     menyatu mulus, bukan terlihat seperti terpotong / kosong tiba-tiba. */
  background: var(--color-bg-cream-light);
  overflow: hidden;
}

.cover-image-wrap {
  position: relative;
  width: 100%;
  height: 100vh; /* Mengambil seluruh tinggi layar browser */
  /* Rasio ini HARUS sama dengan rasio asli gambar public/images/cover-bg.jpg
     (saat ini 640x1137 -> 640/1137). Kalau ganti gambar dengan rasio lain,
     update angka ini supaya gambar tidak terpotong ataupun ada gap kosong. */
  aspect-ratio: 640 / 1137;
}

.cover-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Otomatis ter-zoom memotong pinggirannya tanpa merusak rasio */
  object-position: center; /* Ubah dari 'center top' ke 'center' agar seimbang */
  display: block;
}

.cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 32px;
  /* Digeser turun sedikit karena area kosong pada gambar (di dalam
     lengkungan arch) ada mulai sekitar 35% dari tinggi gambar */
  padding-top: 8%;
}

.couple-names {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--color-text-dark);
  margin: 6px 0 18px;
  letter-spacing: 1px;
}

.wedding-date-text {
  letter-spacing: 3px;
  color: var(--color-gold-dark);
  font-size: 0.9rem;
}

.invited-box {
  margin: 28px 0;
  padding: 18px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.invited-box p:first-child { font-size: 0.9rem; color: #8a7a63; }

.guest-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 6px;
  color: var(--color-text-dark);
  letter-spacing: 0.5px;
}

/* ===== Buttons ===== */
.btn-open, .btn-gold, .btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 30px;
  border: none;
  font-size: 0.95rem;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  margin-top: 16px;
  transition: transform 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.btn-open {
  background: var(--color-sage-dark);
  color: #fff;
  box-shadow: 0 6px 16px rgba(111, 120, 100, 0.35);
}

.btn-gold {
  background: linear-gradient(180deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(169, 137, 92, 0.3);
}

.btn-open:hover, .btn-gold:hover { opacity: 0.9; transform: translateY(-2px); }
.btn-open-icon { font-size: 1rem; }

/* ===== Plaque (ornamen dekoratif bentuk plakat) ===== */
.plaque {
  position: relative;
  margin: 0 auto;
  padding: 60px 28px 40px;
  border: 2px solid rgba(139, 148, 132, 0.55);
  border-radius: 120px 120px 60px 60px / 90px 90px 50px 50px;
  background: rgba(255, 253, 248, 0.5);
  max-width: 320px;
}

.plaque-bouquet {
  font-size: 2.2rem;
  margin-bottom: 12px;
  color: var(--color-gold-dark);
  line-height: 1;
}

.couple-names-plaque {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.9rem;
  margin: 6px 0;
  color: var(--color-text-dark);
}

/* ===== Hero section dengan video background (animasi garden) ===== */
.section-hero-video {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--color-bg-cream);
  height: 100vh; /* Mengambil seluruh tinggi layar browser */
}

.hero-bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 40px;
}

.hero-video-overlay .eyebrow { color: var(--color-gold-dark); }
.hero-video-overlay .couple-names-plaque { font-size: 2rem; }
.hero-video-overlay .wedding-date-text { color: var(--color-sage-dark); }

/* Fallback kalau video gagal dimuat / browser tidak dukung autoplay:
   tetap tampil rapi dengan background gradient cream biasa */
.section-hero-video:has(video:not([src]))  {
  background: linear-gradient(180deg, var(--color-bg-cream-light) 0%, var(--color-bg-cream) 100%);
}

/* ===== Arch card (dipakai di section Resepsi) ===== */
.arch-card {
  position: relative;
  margin: 0 auto;
  padding: 44px 24px 36px;
  border: 2px solid rgba(139, 148, 132, 0.55);
  border-radius: 160px 160px 24px 24px;
  background: rgba(255, 253, 248, 0.55);
  max-width: 320px;
}

.divider-diamond {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--color-gold-dark);
  font-size: 0.7rem;
}
.divider-diamond span {
  height: 1px;
  width: 50px;
  background: var(--color-border);
}

/* ===== Hero / Ayat (di section sage) ===== */
.section-sage blockquote {
  font-style: italic;
  font-size: 0.95rem;
  max-width: 400px;
  margin: 0 auto;
}
.section-sage cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  color: var(--color-gold);
  font-size: 0.85rem;
}

/* ===== Countdown ===== */
.countdown {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.count-box {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  padding: 14px 10px;
  min-width: 62px;
}
.count-box span {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
}
.count-box label {
  font-size: 0.65rem;
  color: #e4e8da;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== Bride & Groom ===== */
.intro-text { margin-bottom: 24px; font-size: 0.95rem; max-width: 380px; margin-left: auto; margin-right: auto; }

.person-script {
  font-family: var(--font-script);
  font-size: 3rem;
  font-weight: 400;
  color: var(--color-sage-dark);
  margin-top: 8px;
  line-height: 1;
}
.fullname { font-weight: 600; margin: 6px 0 4px; letter-spacing: 0.5px; }
.parents { font-size: 0.85rem; color: #6b5c4d; }
.ampersand {
  font-family: var(--font-script);
  font-size: 2.2rem;
  color: var(--color-gold);
  margin: 18px 0;
}

/* ===== Event Section ===== */
.event-day {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--color-sage-dark);
  margin-top: 12px;
}
.event-date { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--color-text-dark); }
.event-time { margin-bottom: 16px; font-size: 0.95rem; }
.event-place { margin-bottom: 8px; font-size: 0.9rem; }

/* ===== Doa ===== */
.arabic { font-size: 1.5rem; margin: 20px 0 16px; direction: rtl; }
.doa-translation { font-size: 0.9rem; font-style: italic; max-width: 380px; margin: 0 auto; }

/* ===== RSVP Card ===== */
.rsvp-card {
  margin-top: 40px;
  background: var(--color-bg-cream-light);
  border: 1px solid rgba(201, 168, 118, 0.5);
  border-radius: 28px;
  padding: 32px 24px;
  color: var(--color-text-dark);
}
.rsvp-card .section-title { color: var(--color-text-dark); }
.rsvp-card p { color: #6b5c4d; }

.rsvp-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.rsvp-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.85rem;
  color: var(--color-text-dark);
  gap: 6px;
}
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
}
.btn-submit { align-self: center; }

.rsvp-summary {
  display: flex;
  justify-content: space-around;
  margin-top: 28px;
}
.rsvp-summary div { display: flex; flex-direction: column; }
.rsvp-summary strong { font-family: var(--font-serif); font-size: 1.5rem; color: var(--color-text-dark); }
.rsvp-summary span { font-size: 0.7rem; color: #8a7a68; }

/* ===== Comments / Guestbook ===== */
.comments-list { text-align: left; margin-top: 16px; margin-bottom: 40px; }
.comment-item {
  display: flex;
  gap: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}
.comment-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 600;
}
.comment-body { flex: 1; }
.comment-name { font-weight: 600; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.comment-message { margin-top: 6px; font-size: 0.9rem; }
.badge {
  font-size: 0.6rem;
  padding: 3px 10px;
  border-radius: 12px;
  color: #fff;
  letter-spacing: 0.5px;
}
.badge-hadir { background: var(--color-sage-dark); }
.badge-tidak_hadir { background: #b3543f; }
.badge-ragu { background: var(--color-gold-dark); }
.no-comments { color: #8a7a68; font-style: italic; text-align: center; }

/* ===== Footer ===== */
.footer-text { font-size: 0.9rem; max-width: 360px; margin: 0 auto 8px; color: #6b5c4d; }
.couple-names-footer {
  font-family: var(--font-serif);
  font-weight: 600;
  margin-top: 16px;
  color: var(--color-text-dark);
  font-size: 1.8rem;
}
.footer-credit {
  text-align: center;
  padding: 24px;
  background: var(--color-sage-dark);
  color: #dfe4d3;
  font-size: 0.8rem;
}

/* ===== Music player ===== */
.music-player {
  position: fixed;
  bottom: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
  background: rgba(74, 68, 56, 0.85);
  padding: 6px 16px 6px 6px;
  border-radius: 30px;
  backdrop-filter: blur(4px);
}
.music-disc {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #111;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.music-disc.spinning { animation: spin 4s linear infinite; }
.music-label { color: #fff; font-size: 0.75rem; letter-spacing: 0.5px; }

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

/* ===== Fade-in on scroll ===== */
.section, .section-illustrated, .section-sage {
  animation: fadeInUp 0.6s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Check-in page ===== */
.checkin-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}
.guest-name-checkin {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin: 12px 0;
  color: var(--color-text-dark);
}
.notice { margin-top: 16px; color: var(--color-sage-dark); }

/* ===== Admin login ===== */
.admin-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 400px;
  margin: 0 auto;
  padding: 24px;
  text-align: center;
}
.admin-login form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.admin-login input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.error-text { color: #b3543f; margin-top: 8px; }

/* ===== Responsive tweak ===== */
@media (max-width: 400px) {
  .couple-names { font-size: 2rem; }
  .person-script { font-size: 2.4rem; }
  .count-box { min-width: 54px; padding: 10px 6px; }
}
