/* ==========================================================
   DESIGN TOKENS
   Palette : Off-White / Baby Blue / Soft Gold / Dark Slate
   Type    : Cormorant Garamond (display) + Jost (body/labels)
   ========================================================== */
:root {
  --c-bg:          #FBFAF7;
  --c-bg-alt:      #FFFFFF;
  --c-baby-blue:   #E7F0F6;
  --c-baby-blue-2: #A9C6DA;
  --c-slate:       #263449;
  --c-slate-soft:  #5A6B82;
  --c-gold:        #C9A46A;
  --c-gold-soft:   #E7D6B4;

  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Jost', sans-serif;

  --gap-section: clamp(72px, 12vw, 140px);
  --gap-inner: clamp(24px, 5vw, 48px);
  --max-w: 1080px;
  --max-w-narrow: 640px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-slate);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: var(--max-w-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--gap-section) 0;
  position: relative;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--c-gold);
  margin: 0 0 14px;
}
.eyebrow--center { text-align: center; }

.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 20px;
  color: var(--c-slate);
}
.section__title--center { text-align: center; }

.ornament {
  width: 60px;
  height: 1px;
  background: var(--c-gold);
  margin: 28px auto 0;
}
.ornament--dot::after {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-gold);
  margin: 14px auto 0;
}
/* Ornamen garis dengan flourish tengah — dipakai di transisi antar section
   yang butuh sedikit aksen premium, tanpa berlebihan. */
.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
}
.flourish::before, .flourish::after {
  content: '';
  height: 1px;
  width: 42px;
  background: var(--c-gold-soft);
}
.flourish__mark {
  width: 6px;
  height: 6px;
  border: 1px solid var(--c-gold);
  transform: rotate(45deg);
}

/* Glow radial halus di belakang momen-momen kunci (hero, quote, closing)
   — satu treatment berulang, bukan dekorasi acak, agar terasa premium
   tanpa ramai. */
.section--glow { position: relative; overflow: hidden; }
.section--glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, 140%);
  height: min(720px, 140%);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(201,164,106,0.14) 0%, rgba(201,164,106,0) 62%);
  pointer-events: none;
  z-index: 0;
}
.section--glow > .container,
.section--glow > .container--narrow { position: relative; z-index: 1; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 36px;
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.06em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease);
}
.btn--primary {
  background: var(--c-slate);
  color: #fff;
}
.btn--primary:hover { transform: translateY(-2px); }
.btn--outline {
  border-color: var(--c-gold);
  color: var(--c-slate);
  background: transparent;
  margin-top: 24px;
}
.btn--outline:hover { background: var(--c-gold-soft); }
.btn--whatsapp { background: var(--c-slate); color: #fff; margin-top: 8px; }

/* ==========================================================
   COVER / OPENING
   ========================================================== */
.cover {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--c-slate);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  transition: opacity 0.85s var(--ease), visibility 0.85s var(--ease);
}
.cover__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(38,52,73,0.6) 0%, rgba(20,28,41,0.82) 100%);
}
.cover__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  max-width: 480px;
}
.cover .eyebrow { color: var(--c-gold-soft); }
.cover__names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 9vw, 58px);
  margin: 0 0 10px;
  letter-spacing: 0.01em;
}
.cover__names .amp { color: var(--c-gold); font-style: italic; }
.cover__date {
  font-size: 15px;
  letter-spacing: 0.12em;
  margin: 0;
  color: rgba(255,255,255,0.85);
}
.cover__divider {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.4);
  margin: 28px auto;
}
.cover__lead {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  margin: 0 0 32px;
}
.cover__guest-box {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 18px;
  padding: 24px;
  backdrop-filter: blur(6px);
}
.cover__guest-label {
  display: block;
  font-size: 13px;
  margin-bottom: 12px;
  color: rgba(255,255,255,0.9);
}
.cover__guest-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  margin-bottom: 16px;
  text-align: center;
}
.cover__guest-input::placeholder { color: rgba(255,255,255,0.6); }
.cover__guest-input:focus {
  outline: none;
  border-color: var(--c-gold);
}
.cover__guest-box .btn { width: 100%; }
.cover__guest-preview {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--c-gold-soft);
  margin: 0 0 18px;
}

/* Hide invitation until opened */
.invitation-wrapper { display: none; }
body.is-open .invitation-wrapper { display: block; }
body.is-open .cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
/* Setelah transisi fade-out selesai, JS menambahkan class ini supaya
   cover benar-benar hilang dari layout (bukan sekadar tak terlihat),
   sehingga tidak menyisakan area kosong di atas konten undangan. */
.cover.is-closed {
  display: none;
}

/* ==========================================================
   GREETING
   ========================================================== */
.greeting { text-align: center; background: var(--c-bg-alt); }
.greeting__guest {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 30px);
  color: var(--c-gold);
  margin-top: 6px;
}
.greeting__body {
  color: var(--c-slate-soft);
  font-size: 15px;
  margin-top: 20px;
}

/* ==========================================================
   HERO
   ========================================================== */
.hero { text-align: center; }
.hero__names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 5.5vw, 46px);
  margin: 0;
  color: var(--c-slate);
  line-height: 1.3;
}
.hero__amp {
  display: block;
  color: var(--c-gold);
  font-style: italic;
  font-size: 0.7em;
  margin: 6px 0;
}
.hero__sub {
  color: var(--c-slate-soft);
  margin-top: 16px;
  font-size: 15px;
}

/* ==========================================================
   LOVE QUOTE / FINAL QUOTE
   ========================================================== */
.love-quote, .final-quote {
  background: var(--c-baby-blue);
  text-align: center;
}
.quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.6;
  margin: 0;
  color: var(--c-slate);
}
.quote__source {
  margin-top: 16px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--c-slate-soft);
}

/* ==========================================================
   COUPLE
   ========================================================== */
.couple { background: var(--c-bg-alt); }
.couple__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 64px);
  flex-wrap: wrap;
}
.couple__person { text-align: center; max-width: 320px; }
.couple__photo-frame {
  width: min(72vw, 300px);
  aspect-ratio: 4 / 5;
  margin: 0 auto 22px;
  border: 1px solid var(--c-gold);
  padding: 8px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(38,52,73,0.12);
}
.couple__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  transform: scale(1.2);
  transition: transform 1.15s var(--ease) 0.18s;
}
.couple__person.is-visible .couple__photo { transform: scale(1); }
.couple__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 4px;
}
.couple__parent {
  font-size: 13px;
  color: var(--c-slate-soft);
  margin: 0;
}
.couple__amp {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 34px;
  color: var(--c-gold);
}

@media (min-width: 780px) {
  .couple__photo-frame { width: 280px; }
}

/* ==========================================================
   OUR STORY
   ========================================================== */
.our-story { background: var(--c-bg); }
.our-story__intro { text-align: center; margin-bottom: 56px; }
.our-story__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(24px, 4vw, 32px);
  margin: 0 0 16px;
}
.our-story__lead {
  color: var(--c-slate-soft);
  font-size: 15px;
}

.story-track {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 8vw, 88px);
}

.story-item {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 56px);
}
.story-item--right { flex-direction: row-reverse; }

.story-item__photo-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 42%;
  max-width: 320px;
}
.story-item__number {
  position: absolute;
  top: -18px;
  left: -8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 42px;
  color: var(--c-gold-soft);
  z-index: 0;
}
.story-item__frame {
  position: relative;
  z-index: 1;
  border: 1px solid var(--c-baby-blue-2);
  padding: 6px;
  background: var(--c-bg-alt);
}
.story-item__frame img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
.story-item__text { flex: 1 1 auto; }
.story-item__label {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  color: var(--c-gold);
  margin: 0 0 10px;
}
.story-item__body {
  color: var(--c-slate-soft);
  font-size: 15px;
  margin: 0;
}

.our-story__closing {
  text-align: center;
  margin-top: 72px;
}
.our-story__closing-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 3vw, 22px);
  color: var(--c-slate);
}

/* ==========================================================
   MOMENTS / GALLERY
   ========================================================== */
.moments { background: var(--c-baby-blue); text-align: center; }
.gallery {
  position: relative;
  max-width: 100%;
  margin-top: 40px;
}
.gallery__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 14px;
  padding: 4px 24px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide {
  flex: 0 0 88%;
  max-width: 460px;
  scroll-snap-align: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 16px 32px rgba(38,52,73,0.14);
}
.gallery__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery__slide:hover img { transform: scale(1.04); }
.gallery__nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  color: var(--c-slate);
  font-size: 20px;
  cursor: pointer;
}
.gallery__nav--prev { left: 8px; }
.gallery__nav--next { right: 8px; }

@media (min-width: 860px) {
  .gallery__slide { flex: 0 0 44%; }
  .gallery__nav { display: flex; align-items: center; justify-content: center; }
}

/* ==========================================================
   EMOTIONAL PAUSE
   ========================================================== */
.pause { text-align: center; background: var(--c-bg-alt); }
.pause__text {
  font-family: var(--font-display);
  font-size: clamp(19px, 3vw, 24px);
  font-style: italic;
  color: var(--c-slate);
  margin: 0;
}

/* ==========================================================
   WEDDING DETAILS
   ========================================================== */
.wedding-details { background: var(--c-bg); text-align: center; }
.event-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 6vw, 64px);
  margin-top: 40px;
  flex-wrap: wrap;
}
.event-card__divider {
  width: 1px;
  height: 48px;
  background: var(--c-gold-soft);
}
.event-card__label {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--c-slate-soft);
  margin: 0 0 6px;
}
.event-card__time {
  font-family: var(--font-display);
  font-size: 26px;
  margin: 0;
  color: var(--c-slate);
}

/* ==========================================================
   LOCATION / NGUNDUH MANTU
   ========================================================== */
.location, .ngunduh-mantu { text-align: center; background: var(--c-bg-alt); }
.location__address {
  color: var(--c-slate-soft);
  font-size: 14px;
  margin: 0 0 28px;
}
.map-frame {
  position: relative;
  width: 100%;
  padding-top: 62%;
  border: 1px solid var(--c-baby-blue-2);
  overflow: hidden;
}
.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.ngunduh-mantu { background: var(--c-baby-blue); }

/* ==========================================================
   INVITATION
   ========================================================== */
.invitation { text-align: center; background: var(--c-bg); }
.invitation__text {
  color: var(--c-slate-soft);
  font-size: 15px;
}
.invitation__signoff {
  margin-top: 24px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--c-gold);
}

/* ==========================================================
   RSVP
   ========================================================== */
.rsvp { text-align: center; background: var(--c-bg-alt); }
.rsvp__body {
  color: var(--c-slate-soft);
  font-size: 15px;
  margin: 0 0 28px;
}

/* ==========================================================
   QR
   ========================================================== */
.qr { text-align: center; background: var(--c-baby-blue); }
.qr__thanks {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  margin: 0 0 24px;
}
.qr__frame {
  width: 160px;
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--c-gold-soft);
}

/* ==========================================================
   CLOSING
   ========================================================== */
.closing {
  text-align: center;
  background: var(--c-slate);
  color: #fff;
  padding-bottom: calc(var(--gap-section) + 40px);
}
.closing__label {
  letter-spacing: 0.14em;
  font-size: 13px;
  color: var(--c-gold-soft);
  margin: 0 0 20px;
}
.closing__names {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.6;
  margin: 0 0 16px;
}
.closing__amp { color: var(--c-gold); font-style: italic; font-size: 0.8em; }
.closing__date {
  font-size: 14px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
  margin: 0 0 24px;
}
.closing__farewell {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: rgba(255,255,255,0.85);
}

/* ==========================================================
   FLOATING MUSIC BUTTON
   ========================================================== */
.music-toggle {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid var(--c-gold-soft);
  background: rgba(255,255,255,0.9);
  color: var(--c-slate);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 6px 18px rgba(38,52,73,0.15);
  transition: transform 0.4s var(--ease);
}
.music-toggle.is-playing .music-toggle__icon { animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================
   REVEAL ANIMATIONS
   ========================================================== */
.reveal, .reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible, .reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Varian arah — dipakai untuk foto mempelai agar terasa "muncul" dari
   sisi berlawanan (pria dari kiri, wanita dari kanan) saat discroll. */
.reveal-left.reveal-up {
  transform: translate3d(-56px, 18px, 0) rotate(-2.5deg) scale(0.94);
}
.reveal-left.reveal-up.is-visible {
  transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
}
.reveal-right.reveal-up {
  transform: translate3d(56px, 18px, 0) rotate(2.5deg) scale(0.94);
}
.reveal-right.reveal-up.is-visible {
  transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-up, .gallery__slide img, .music-toggle {
    transition: none !important;
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================
   RESPONSIVE — story track collapses to single column
   ========================================================== */
@media (max-width: 780px) {
  .story-item, .story-item--right {
    flex-direction: column;
    text-align: left;
  }
  .story-item__photo-wrap { width: 70%; max-width: 260px; margin: 0 auto; }
  .story-item__text { text-align: center; }
  .couple__grid { gap: 24px; }
  .couple__amp { order: 2; }
}

@media (max-width: 480px) {
  .container, .container--narrow { padding: 0 20px; }
  .section { padding: clamp(56px, 14vw, 90px) 0; }
}
