/* =============================================================
   CUSTOM FONT DECLARATION
   ============================================================= */
@font-face {
  font-family: 'Felt That';
  src: url('../assets/fonts/FeltThat.woff2') format('woff2'),
       url('../assets/fonts/FeltThat.woff') format('woff'),
       url('../assets/fonts/FeltThat.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* =============================================================
   STYLE UNDANGAN DIGITAL
   ============================================================= */
:root {
  /* --- WARNA --- */
  --c-bg:      #f7f1e8;
  --c-text:    #3d3a35;
  --c-muted:   #7a7268;
  --c-accent:  #b8925a;
  --c-sage:    #7c8b6f;

  /* --- FONT --- */
  --f-name:    'Felt That', 'Caveat', cursive;
  --f-cambria: 'Cambria', 'Georgia', 'Times New Roman', serif;
  --f-amp:     'Allura', cursive;

  --f-hand:    'Great Vibes', cursive;
  --f-serif:   'Cormorant Garamond', serif;
  --f-sans:    'Montserrat', sans-serif;

  /* --- PENGANTIN DI HALAMAN AWAL --- */
  --couple-height: min(62vh, 520px, 88vw);
  --couple-overlap: 0px;

  /* --- FOTO PENGANTIN (section 2) --- */
  --photo-width: min(35vw, 210px, 24vh);
}

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

html {
  background: var(--c-bg);
}
body {
  color: var(--c-text);
  font-family: var(--f-sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

/* =============================================================
   BACKGROUND DIAM
   ============================================================= */
.page-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
main { position: relative; z-index: 1; }

section {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.25rem;
  text-align: center;
  overflow: hidden;
}

/* =============================================================
   DEKORASI
   ============================================================= */
.deco-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.deco {
  position: absolute;
  will-change: transform;
}
.deco img {
  width: 100%;
  height: auto;
  opacity: .9;
}

.names__inner, .event__inner, .gift__inner, .closing__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* =============================================================
   SECTION 1 — HERO
   ============================================================= */
.hero { padding: 0; height: 100vh; height: 100svh; }
/* Teks Dear Tamu & Judul Pengantin di area kosong atas Landing Page */
.hero__invite {
  position: absolute;
  top: clamp(11%, 15vh, 18%);
  left: 0;
  right: 0;
  padding: 0 1.25rem;
  text-align: center;
  z-index: 3;
  pointer-events: none;
}

.hero__dear {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.1rem, 4.2vw, 1.45rem);
  color: var(--c-text);
  margin-bottom: .35rem;
}

.hero__subtitle {
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: clamp(.78rem, 3vw, .95rem);
  line-height: 1.55;
  color: var(--c-muted);
  letter-spacing: .04em;
}

.hero__couple-title {
  font-family: var(--f-hand);
  font-weight: 400;
  font-size: clamp(2.5rem, 10.5vw, 4.2rem);
  line-height: 1.15;
  color: var(--c-accent);
  margin-top: .25rem;
}

.scroll-hint {
  position: absolute;
  bottom: calc(var(--couple-height) * 0.45);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  font-size: .72rem;
  line-height: 1.3;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--c-muted);
  z-index: 3;
  pointer-events: none;
}
.scroll-hint__arrow {
  width: 12px; height: 12px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  animation: hint-bounce 1.6s ease-in-out infinite;
}
@keyframes hint-bounce {
  0%, 100% { transform: translateY(0) rotate(45deg); }
  50%      { transform: translateY(6px) rotate(45deg); }
}

.couple {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 1;
}
.couple img {
  height: var(--couple-height);
  width: auto;
  max-width: none;
  will-change: transform;
}
.couple__bride { margin-right: calc(-1 * var(--couple-overlap)); }
.couple__groom { margin-left:  calc(-1 * var(--couple-overlap)); }

.couple__heart {
  position: absolute;
  left: 50%;
  bottom: calc(var(--couple-height) + 12px);
  transform: translateX(-50%);
  font-size: 2rem;
  color: var(--c-accent);
  opacity: 0;
  z-index: 2;
}

/* =============================================================
   SECTION 1.5 — SURAH AR-RUM AYAT 21 (COMPACT)
   ============================================================= */
.verse {
  min-height: auto;
  padding: 2.5rem 1.25rem 1.5rem;
}

.verse__box {
  position: relative;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  padding: clamp(2.2rem, 6vw, 3.8rem) clamp(1.6rem, 6vw, 3.6rem);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed var(--c-accent);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.35);
}

.verse__box:has(.verse__frame:not([style*="display: none"])) {
  border: none;
  background: transparent;
}

.verse__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  z-index: 0;
  pointer-events: none;
}

.verse__content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.verse__arabic {
  font-family: 'Amiri', serif;
  font-size: clamp(1.15rem, 4.3vw, 1.65rem);
  line-height: 2;
  color: var(--c-text);
  margin-bottom: .75rem;
}

.verse__translation {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(.82rem, 3vw, 1.02rem);
  line-height: 1.45;
  color: var(--c-muted);
}

.verse__source {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: clamp(.72rem, 2.5vw, .85rem);
  letter-spacing: .08em;
  color: var(--c-accent);
  margin-top: .55rem;
}

@media (max-width: 480px) {
  .verse__box {
    aspect-ratio: auto;
    min-height: 280px;
  }
}

/* =============================================================
   SECTION 2 — FOTO + NAMA (SUDAH DI-CENTERING KE DALAM FRAME)
   ============================================================= */
.names { padding: 1.5rem .5rem; }

.names__inner {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  /* Padding atas-bawah & kiri-kanan disesuaikan dengan ruang dalam frame SVG */
  padding: clamp(3.4rem, 11vw, 5.2rem) clamp(2.2rem, 8.5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.names__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  z-index: 0;
  pointer-events: none;
}

.names__content {
  position: relative;
  z-index: 1;
  width: 100%;
}

.names__intro {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(.78rem, 2.9vw, 1.02rem);
  line-height: 1.4;
  color: var(--c-muted);
  /* Dorong sedikit ke dalam agar tidak kena bunga kiri atas */
  padding: 0 clamp(.8rem, 4vw, 2rem);
  margin-bottom: 1.1rem;
}

.couple-cards {
  display: flex;
  flex-direction: column;
  width: 100%;
  /* Dorong kedua baris pengantin ke tengah agar foto & nama ortu aman di dalam garis frame */
  padding: 0 clamp(.35rem, 2vw, 1.2rem);
  margin: 0 auto;
}

.person {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.65rem, 3vw, 1.6rem);
}

.person--bride {
  flex-direction: row;
  width: 100%;
}

.person--groom {
  flex-direction: row-reverse;
  width: 100%;
}

.person__media {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  /* Ukuran foto sedikit diperkecil di HP agar pas masuk ke dalam garis frame */
  width: clamp(108px, 31vw, 195px);
  aspect-ratio: 3 / 4;
}

.person__photo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.person__info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
}

.person__name {
  font-family: var(--f-name);
  font-weight: 400;
  font-size: clamp(2.2rem, 9.5vw, 4rem);
  line-height: 1.05;
  color: var(--c-accent);
  margin-bottom: .1rem;
}

.person__fullname {
  font-family: var(--f-cambria);
  font-weight: 700;
  font-size: clamp(.85rem, 3.4vw, 1.25rem);
  line-height: 1.25;
  color: var(--c-text);
  margin-top: .1rem;
}

.person__parents {
  font-family: var(--f-cambria);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(.64rem, 2.5vw, .88rem);
  line-height: 1.35;
  color: var(--c-muted);
  margin-top: .2rem;
}

.person__parents-label {
  display: block;
  font-weight: 400;
  font-style: italic;
  margin-bottom: .05rem;
}

.names__amp {
  position: relative;
  display: block;
  align-self: center;
  font-family: var(--f-amp);
  font-weight: 400;
  font-size: clamp(3rem, 12.5vw, 5rem);
  line-height: 1.1;
  color: var(--c-sage);
  margin: .1rem 0;
  z-index: 3;
}

/* =============================================================
   SECTION 3 — EVENT (WAKTU & TEMPAT)
   ============================================================= */
.event {
  padding: 2rem 1.25rem;
}

.section-title {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 6.5vw, 2.5rem);
  margin-bottom: 1.1rem;
}

.event__day {
  letter-spacing: .3em;
  text-transform: uppercase;
  font-size: .82rem;
  color: var(--c-muted);
}
.event__big {
  font-family: var(--f-serif);
  font-size: clamp(1.9rem, 8.5vw, 2.9rem);
  color: var(--c-accent);
  line-height: 1.2;
}
.event__time { font-size: .88rem; margin-top: .25rem; }

.countdown {
  display: flex;
  justify-content: center;
  gap: .65rem;
  margin: 1.4rem 0;
}
.countdown__box {
  width: 68px;
  padding: .75rem 0 .55rem;
  border: 1px solid var(--c-accent);
  border-radius: 12px;
  background: rgba(255,255,255,.4);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.countdown__box span {
  font-family: var(--f-serif);
  font-size: 1.7rem;
  line-height: 1;
}
.countdown__box small {
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-top: .28rem;
}
.countdown__done { font-family: var(--f-serif); font-size: 1.2rem; margin: -1rem 0 1.2rem; }

.venue__name {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 5vw, 1.55rem);
}
.venue__address { font-size: .88rem; color: var(--c-muted); margin-bottom: 1.1rem; }

.qr {
  width: min(160px, 38vw);
  height: min(160px, 38vw);
  margin: 0 auto 1rem;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
}

.btn {
  display: inline-block;
  padding: .72rem 1.6rem;
  border-radius: 999px;
  background: var(--c-accent);
  color: #fff;
  text-decoration: none;
  font-size: .85rem;
  letter-spacing: .1em;
}

/* =============================================================
   SECTION 4 — REKENING + FOTO PENGANTIN (STAY / PINNED)
   ============================================================= */
.gift {
  padding: 2rem 1.25rem;
}

.gift__accounts {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  max-width: 720px;
  margin: .75rem auto 0;
}

@media (min-width: 768px) {
  .gift__accounts {
    flex-direction: row;
    gap: 3.5rem;
  }
}

.gift__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Placeholder foto oval (menggunakan file foto yang sama dengan section 2) */
.gift__media {
  width: min(28vw, 145px, 18vh);
  aspect-ratio: 3 / 4;
  margin-bottom: .75rem;
  padding: 4px;
  border: 1.5px dashed var(--c-accent);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.gift__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.gift__holder {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(1.1rem, 3.8vw, 1.35rem);
  color: var(--c-text);
  line-height: 1.3;
}

.gift__number {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(.88rem, 3.1vw, 1.05rem);
  color: var(--c-muted);
  letter-spacing: .04em;
  margin-top: .2rem;
}

.gift__address-box {
  margin-top: 1.8rem;
  padding-top: 1.2rem;
  border-top: 1px dashed rgba(184, 146, 90, 0.45);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.gift__address-label {
  font-family: var(--f-serif);
  font-weight: 600;
  font-size: clamp(.95rem, 3.4vw, 1.15rem);
  color: var(--c-accent);
  margin-bottom: .25rem;
}

.gift__address {
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: clamp(.8rem, 2.8vw, .95rem);
  line-height: 1.55;
  color: var(--c-muted);
}

/* =============================================================
   SECTION 5 — PENUTUP ("Every love story...")
   ============================================================= */
.closing__quote {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 4.2vw, 1.45rem);
  line-height: 1.5;
  color: var(--c-muted);
  margin-bottom: 1rem;
}

.save-date {
  font-family: var(--f-hand);
  font-weight: 400;
  font-size: clamp(3rem, 13vw, 5.5rem);
  color: var(--c-accent);
}

/* =============================================================
   POJOK KIRI BAWAH: PROGRESS CIRCLE + CREDIT TEXT
   ============================================================= */
.scroll-status {
  position: fixed;
  left: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}

.progress-circle {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-circle__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-circle__bg {
  fill: none;
  stroke: rgba(184, 146, 90, 0.25);
  stroke-width: 2.2;
}

.progress-circle__fill {
  fill: none;
  stroke: var(--c-accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 125.66;
  stroke-dashoffset: 125.66;
  transition: stroke-dashoffset 0.1s linear;
}

.progress-circle__text {
  font-family: var(--f-sans);
  font-size: .62rem;
  font-weight: 500;
  color: var(--c-accent);
  letter-spacing: -.02em;
}

.credit-text {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  font-family: var(--f-sans);
  font-size: .52rem;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--c-muted);
  opacity: .75;
  white-space: nowrap;
}

/* =============================================================
   POJOK KANAN BAWAH: TOMBOL MUSIK
   ============================================================= */
.music-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--c-accent);
  background: rgba(255,255,255,.85);
  color: var(--c-accent);
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 100;
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.music-toggle:not(.is-playing) .music-toggle__icon { text-decoration: line-through; opacity: .6; }