/* =====================================================================
   UNDANGAN PERNIKAHAN — TEMA JAWA
   style.css  |  Palet: Sogan (coklat) + Emas Jawa + Krem
   ===================================================================== */

:root {
  --brown-900: #111111;
  --brown-800: #333333;
  --brown-700: #555555;
  --gold: #2d6a4f;
  --gold-soft: #74c69d;
  --cream: rgba(255, 255, 255, 0.9);
  --cream-2: rgba(244, 251, 247, 0.9);
  --ivory: #ffffff;
  --text: #333333;
  --text-soft: #666666;
  --shadow: 0 10px 30px rgba(0, 0, 0, .08);

  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-script: "Great Vibes", "Playfair Display", cursive;
  --font-body: "Cormorant Garamond", Georgia, serif;
  --font-ui: "Poppins", system-ui, -apple-system, Segoe UI, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Kanvas undangan dibatasi lebar layar ponsel agar terasa seperti kartu */
.invitation {
  max-width: 480px;
  margin: 0 auto;
  background: var(--ivory) url('../assets/ornament/backroound halaman.png') repeat center;
  background-size: cover;
  position: relative;
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(0, 0, 0, .4);
  overflow: hidden;
}

/* ---------- Tipografi ---------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

.title-badge {
  background: rgba(255, 255, 255, 0.85);
  padding: 4px 26px;
  border-radius: 40px;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(45, 106, 79, 0.15);
  position: relative;
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--gold);
}

.eyebrow {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: .3em;
  font-size: 11px;
  color: var(--gold);
  font-weight: 600;
  background: var(--ivory);
  padding: 6px 18px;
  border-radius: 30px;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(45, 106, 79, 0.2);
  margin-bottom: 12px;
  position: relative;
  z-index: 3;
}

/* ---------- Section dasar ---------- */
.section {
  position: relative;
  padding: 160px 26px 140px 26px;
  /* Ruang untuk header/footer */
  text-align: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-bottom: 2px solid rgba(45, 106, 79, 0.1);
  /* Pembatas halaman */
}

.section>div[style*="position:relative;"] {
  width: 100%;
  margin: auto 0;
  /* Agar konten di dalam div wrapper tetap proporsional dan berada di tengah secara aman */
}

.section--cream {
  background: var(--cream);
}

.section--cream2 {
  background: var(--cream-2);
}

.section--dark {
  background:
    linear-gradient(rgba(244, 251, 247, 0.85), rgba(244, 251, 247, 0.95)),
    url('../assets/ornament/backroound halaman.png');
  background-color: var(--cream-2);
  color: var(--brown-900);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--gold);
}

.divider {
  width: 220px;
  max-width: 60%;
  height: auto;
  margin: 18px auto;
  display: block;
}

/* Ornamen sudut batik */
.corner {
  position: absolute;
  width: 90px;
  height: 90px;
  opacity: .8;
  pointer-events: none;
}

.corner--tl {
  top: 12px;
  left: 12px;
}

.corner--tr {
  top: 12px;
  right: 12px;
  transform: scaleX(-1);
}

.corner--bl {
  bottom: 12px;
  left: 12px;
  transform: scaleY(-1);
}

.corner--br {
  bottom: 12px;
  right: 12px;
  transform: scale(-1, -1);
}

.frame-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  pointer-events: none;
  opacity: 0.85;
  z-index: 1;
}

.frame-bottom-left,
.frame-bottom-right {
  position: absolute;
  bottom: 0;
  width: 140px;
  height: 140px;
  object-fit: contain;
  pointer-events: none;
  opacity: 0.9;
  z-index: 1;
}

.frame-bottom-left {
  left: -10px;
  bottom: -10px;
  object-position: bottom left;
}

.frame-bottom-right {
  right: -10px;
  bottom: -10px;
  object-position: bottom left;
  transform: scaleX(-1);
}

/* Override khusus untuk bunga yang arah naturalnya adalah pojok kanan bawah */
img[src*="bunga_pojok_bawah_kiri.png"].frame-bottom-right {
  transform: none;
  object-position: bottom right;
}

img[src*="bunga_pojok_bawah_kiri.png"].frame-bottom-left {
  transform: scaleX(-1);
  object-position: bottom right;
}

/* =====================================================================
   COVER / PEMBUKA
   ===================================================================== */
.cover {
  position: fixed;
  inset: 0;
  z-index: 60;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 28px;
  color: var(--cream);
  background-color: var(--brown-900);
  /* dasar solid agar cover tidak pernah tembus */
  background-image:
    linear-gradient(rgba(27, 67, 50, .55), rgba(27, 67, 50, .82)),
    linear-gradient(160deg, #40916c, #1b4332);
  /* fallback; foto di-set inline di HTML */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 1s ease, opacity 1s ease;
}

.cover.hide {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.cover .eyebrow {
  color: var(--gold-soft);
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.cover__names {
  font-size: clamp(52px, 16vw, 76px);
  margin: 6px 0 2px;
  color: var(--gold-soft);
}

.cover__date {
  font-family: var(--font-ui);
  letter-spacing: .2em;
  font-size: 13px;
  margin-top: 8px;
}

.cover__to {
  margin-top: 34px;
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: .1em;
}

.cover__guest {
  font-family: var(--font-display);
  font-size: 26px;
  color: #fff;
  margin-top: 4px;
}

/* Tombol utama */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 13px 30px;
  border-radius: 40px;
  cursor: pointer;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #ffffff;
  text-decoration: none;
  transition: all .25s ease;
  min-height: 44px;
}

.btn:hover {
  background: transparent;
  color: var(--gold);
}

.btn--ghost {
  background: transparent;
  color: var(--gold);
}

.btn--ghost:hover {
  background: var(--gold);
  color: #ffffff;
}

.cover .btn {
  margin-top: 22px;
}

/* =====================================================================
   INTRO / SALAM
   ===================================================================== */
.salam {
  font-family: "Amiri", "Scheherazade New", serif;
  font-size: 22x;
  font-weight: bold;
 color: var(--gold);
  line-height: 1.8;
  margin-top: 10px;
  margin-bottom: 20px;
  direction: rtl;
}

.intro__logo {
  width: 70px;
  margin: 0 auto 14px;
  display: block;
}

.intro__names {
  font-size: clamp(44px, 13vw, 64px);
  color: var(--gold);
  margin: 4px 0;
}

.intro__amp {
  display: block;
  font-family: var(--font-script);
  font-size: 40px;
  color: var(--brown-700);
}

.lead {
  color: var(--text-soft);
  max-width: 34ch;
  margin: 14px auto;
}

/* ---------- Ayat ---------- */
.verse {
  font-size: 22px;
  direction: rtl;
  line-height: 2;
  margin-bottom: 18px;
  color: var(--brown-800);
  font-family: "Amiri", "Scheherazade New", serif;
}

.verse-tr {
  font-style: italic;
  max-width: 40ch;
  margin: 0 auto 10px;
}

.verse-src {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--gold);
}

/* =====================================================================
   MEMPELAI
   ===================================================================== */
.couple {
  display: flex;
  flex-direction: column;
  gap: 46px;
  margin-top: 30px;
}

.person__photo {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 18px;
  display: block;
  border: 4px solid var(--gold);
  padding: 5px;
  background: var(--ivory);
  box-shadow: var(--shadow);
}

.person__name {
  font-size: 34px;
  color: var(--gold);
}

.person__role {
  color: var(--text-soft);
  margin: 6px 0 10px;
}

.person__ig {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 13px;
  text-decoration: none;
  color: var(--brown-700);
  border: 1px solid var(--gold);
  border-radius: 30px;
  padding: 6px 16px;
  transition: .2s;
}

.person__ig:hover {
  background: var(--gold);
  color: #fff;
}

.couple__amp {
  font-family: var(--font-script);
  font-size: 46px;
  color: var(--gold);
}

/* =====================================================================
   LOVE STORY (timeline)
   ===================================================================== */
.timeline {
  position: relative;
  margin-top: 34px;
  padding-left: 28px;
  text-align: left;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--gold);
  opacity: .5;
}

.tl-item {
  position: relative;
  padding-bottom: 30px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--ivory);
}

.tl-item h3 {
  color: var(--gold);
  font-size: 24px;
}

.tl-item p {
  color: var(--text-soft);
  font-size: 17px;
}

/* =====================================================================
   COUNTDOWN
   ===================================================================== */
.countdown {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.cd-box {
  background: rgba(64, 145, 108, .12);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 14px 8px;
  min-width: 68px;
}

.cd-num {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--gold);
  display: block;
  line-height: 1;
}

.cd-label {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--brown-800);
  opacity: .9;
}

/* =====================================================================
   ACARA (Akad & Resepsi)
   ===================================================================== */
.event-card {
  background: var(--ivory);
  border: 1px solid var(--gold);
  border-radius: 16px;
  padding: 30px 22px;
  margin: 22px auto;
  max-width: 340px;
  box-shadow: var(--shadow);
}

.event-card h3 {
  font-size: 30px;
  color: var(--gold);
}

.event-date {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 0;
}

.event-date .num {
  font-size: 52px;
  font-family: var(--font-display);
  color: var(--brown-700);
}

.event-date .side {
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.event-date .side b {
  display: block;
  font-size: 15px;
  color: var(--brown-800);
}

.event-card .place {
  color: var(--text-soft);
  margin: 10px 0 18px;
}

/* =====================================================================
   FORM (RSVP & Ucapan) — tanpa database, disimpan di localStorage
   ===================================================================== */
.form {
  max-width: 360px;
  margin: 26px auto 0;
  text-align: left;
}

.field {
  margin-bottom: 16px;
}

.field label {
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-soft);
  display: block;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 17px;
  padding: 12px 14px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: var(--ivory);
  color: var(--text);
  min-height: 44px;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.choice {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.choice button {
  flex: 1;
  min-width: 90px;
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 11px 8px;
  border: 1px solid var(--gold);
  border-radius: 10px;
  background: rgba(64, 145, 108, .08);
  color: var(--brown-900);
  cursor: pointer;
  transition: .2s;
  min-height: 44px;
}

.choice button.active {
  background: var(--gold);
  color: #fff;
}

.form .btn {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}

/* Daftar ucapan */
.wishes {
  max-width: 360px;
  margin: 26px auto 0;
  text-align: left;
  max-height: 320px;
  overflow-y: auto;
}

.wish {
  background: rgba(64, 145, 108, .1);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.wish__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wish__name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  color: var(--gold);
}

.wish__tag {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 2px 8px;
}

.wish__msg {
  color: var(--brown-900);
  font-size: 16px;
  margin-top: 6px;
}

.wish__empty {
  color: var(--text-soft);
  text-align: center;
  font-style: italic;
}

/* =====================================================================
   GALERI
   ===================================================================== */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 28px;
}

.gallery img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: transform .3s;
}

.gallery img:hover {
  transform: scale(1.03);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(20, 12, 8, .94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.show {
  display: flex;
}

.lightbox img {
  max-width: 100%;
  max-height: 84vh;
  border-radius: 10px;
  border: 2px solid var(--gold);
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 22px;
  color: var(--gold-soft);
  font-size: 34px;
  cursor: pointer;
  line-height: 1;
}

/* =====================================================================
   HADIAH (cashless)
   ===================================================================== */
.gift-card {
  background: var(--ivory);
  border: 1px solid var(--gold);
  border-radius: 14px;
  padding: 22px;
  margin: 16px auto;
  max-width: 330px;
  box-shadow: var(--shadow);
  text-align: left;
}

.gift-card .bank {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--brown-800);
}

.gift-card .no {
  font-size: 26px;
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: .04em;
  margin: 6px 0;
}

.gift-card .an {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-soft);
}

.gift-card .btn {
  margin-top: 12px;
  font-size: 12px;
  padding: 9px 18px;
}

.gift-address {
  background: rgba(64, 145, 108, .12);
  border-radius: 12px;
  padding: 18px;
  max-width: 330px;
  margin: 16px auto 0;
}

.gift-address .btn {
  margin-top: 12px;
}

/* =====================================================================
   PENUTUP
   ===================================================================== */
.closing__names {
  font-family: var(--font-script);
  font-size: 58px;
  color: var(--gold-soft);
  margin-top: 10px;
}

.credit {
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .15em;
  color: var(--gold);
  opacity: .8;
  margin-top: 34px;
}

/* =====================================================================
   MUSIK — tombol mengambang
   ===================================================================== */
.music-toggle {
  position: fixed;
  bottom: 20px;
  right: calc(50% - min(240px, 50vw) + 16px);
  z-index: 80;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gold);
  border: none;
  color: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-toggle svg {
  width: 22px;
  height: 22px;
}

.music-toggle.playing svg {
  animation: spin 4s linear infinite;
}

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

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .music-toggle.playing svg {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Layar lebar: beri latar batik di sisi kartu */
@media (min-width: 620px) {
  body {
    background:
      linear-gradient(rgba(244, 251, 247, 0.95), rgba(244, 251, 247, 0.95)),
      url('../assets/ornament/backroound halaman.png');
    background-size: cover;
    background-attachment: fixed;
  }
}

/* =====================================================================
   TAMPILAN AWAL (CERAH & ANIMASI)
   ===================================================================== */
.cover {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  overflow-y: auto;
  transition: opacity 0.8s ease, visibility 0.8s ease, transform 0.8s ease;
}

.cover.hide {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%); /* Optional slide up animation */
}

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

.cover--bright {
  color: var(--brown-900) !important;
  background-color: var(--ivory) !important;
  background-image: none !important;
}

.cover--bright .eyebrow {
  color: var(--brown-800) !important;
  font-weight: 600;
}

.cover--bright .cover__names {
  color: var(--gold) !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.15);
}

.cover--bright .cover__guest {
  color: var(--brown-900) !important;
  font-weight: bold;
}

.cover--bright .cover__date,
.cover--bright .cover__to {
  color: var(--brown-700) !important;
  font-weight: 500;
}

.cover--bright .btn {
  background: var(--gold);
  color: #ffffff;
  border-color: var(--gold);
}

.cover--bright .btn:hover {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

@keyframes gununganFloat {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 5px rgba(64, 145, 108, 0.3));
  }

  50% {
    transform: translateY(-8px) scale(1.02);
    filter: drop-shadow(0 0 15px rgba(64, 145, 108, 0.7));
  }

  100% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 5px rgba(64, 145, 108, 0.3));
  }
}

@keyframes wayangLakiMove {
  0% {
    transform: scaleX(1) translateX(0) rotate(0deg);
  }

  50% {
    transform: scaleX(1) translateX(-6px) rotate(-3deg);
  }

  100% {
    transform: scaleX(1) translateX(0) rotate(0deg);
  }
}

@keyframes wayangPerempuanMove {
  0% {
    transform: scaleX(1) translateX(0) rotate(0deg);
  }

  50% {
    transform: scaleX(1) translateX(6px) rotate(3deg);
  }

  100% {
    transform: scaleX(1) translateX(0) rotate(0deg);
  }
}

.anim-gunungan {
  animation: gununganFloat 4s infinite ease-in-out;
}

.anim-wayang-laki {
  animation: wayangLakiMove 3s infinite ease-in-out;
  transform-origin: bottom center;
}

.anim-wayang-perempuan {
  animation: wayangPerempuanMove 3s infinite ease-in-out;
  transform-origin: bottom center;
}