/* Custom Font */
@font-face {
  font-family: 'Baskvill';
  src: url('../../fonts/BASKVILL.woff2') format('woff2'),
       url('../../fonts/BASKVILL.woff') format('woff'),
       url('../../fonts/BASKVILL.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Baskvill', serif;
  background-color: #1a1a1a;
  overflow-x: hidden;
}

/* Layout Wrapper Desktop Side-by-Side */
.wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Cover Kiri (Desktop Only & Fixed) */
.desktop-cover {
  flex: 1;
  height: 100vh;
  position: sticky;
  top: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Container Undangan Utama (Sisi Kanan / Mobile Size) */
.main-invitation {
  width: 100%;
  max-width: 480px;
  height: 100vh; /* Kunci 100vh agar pas di layar */
  margin: 0 auto;
  position: relative;
  background-color: #70020d;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  overflow-y: auto; /* Scroll aktif untuk section dalam nanti */
}

@media (max-width: 991px) {
  .desktop-cover {
    display: none;
  }
  .main-invitation {
    max-width: 100%;
  }
}

/* Mengunci scroll pada kontainer utama saat cover masih terbuka */
.main-invitation.lock-scroll {
  overflow: hidden !important;
}



/* Kunci scroll & sembunyikan overflow saat cover masih terbuka */
.main-invitation.lock-scroll {
  overflow: hidden !important;
  height: 100vh; /* Memastikan height terkunci di layar mobile */
}

/* Sembunyikan semua section di bawah cover tanpa merusak layout internalnya */
.main-invitation.lock-scroll > section:not(.section-pembuka) {
  display: none !important;
}

/* ----------------------------------
   SECTION PEMBUKA (COVER INVITATION)
---------------------------------- */
.section-pembuka {
  position: relative;
  width: 100%;
  height: 100vh; /* Pas 100% tinggi viewport, tidak bisa di-scroll */
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  color: #ffffff;
  padding: 40px 20px 0 20px; /* Padding atas dinaikkan ke 40px agar elemen atas & teks turun sedikit */
  overflow: hidden; /* Mengunci elemen keluar garis */
  z-index: 10;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Class Animasi Keluar (Smooth Fade & Scale) */
.section-pembuka.fade-out {
  opacity: 0;
  transform: scale(0.92);
  pointer-events: none;
}

/* Phoenix Absolute Position */
.phoenix-1 {
  position: absolute;
  top: 35px; /* Disesuaikan turun sedikit mengikuti layout */
  left: 15px;
  width: 75px;
  height: auto;
  z-index: 5;
}

.phoenix-2 {
  position: absolute;
  bottom: 150px;
  right: 15px;
  width: 105px;
  height: auto;
  z-index: 5;
}

/* Frame Pengantin */
.gate-frame-wrapper {
  margin-top: 15px; /* Ditambah agar posisi gambar pengantin turun sedikit */
  position: relative;
  width: 70%;
  max-width: 260px;
  z-index: 2;
}

.gate-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Content Text & Details */
.content-info {
  margin-top: 15px; /* Ditambah agar area teks turun sedikit */
  position: relative;
  z-index: 2;
  width: 100%;
}

.subtitle {
  font-size: 1rem;
  margin-bottom: 4px;
}

.title-names {
  font-size: 2rem;
  font-weight: normal;
  margin-bottom: 6px;
  line-height: 1.1;
}

.date-text {
  font-size: 1.2rem;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

/* Garis Putih Tapis Runcing */
.tapered-line {
  width: 2px;
  height: 35px;
  margin: 0 auto 8px auto;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%);
}

.dear-text {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.request-text {
  font-size: 0.85rem;
  margin-bottom: 15px;
  opacity: 0.9;
}

/* Button Open Invitation */
.btn-open {
  background: linear-gradient(180deg, #fceaa7 0%, #e6be68 50%, #c49633 100%);
  color: #5c0505;
  font-family: 'Baskvill', serif;
  font-size: 0.95rem;
  font-weight: bold;
  padding: 8px 24px;
  border: 1px solid #fff5cb;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 10px;
}

.btn-open:hover {
  transform: scale(1.05);
}

/* Flower Frame Bawah (Nempel Ujung ke Ujung Layar) */
.flower-bottom {
  width: calc(100% + 40px); /* Menetralkan padding kanan-kiri parent (20px + 20px) */
  margin-left: -20px;       /* Mendorong ke kiri agar pas di pinggir layar */
  margin-right: -20px;      /* Mendorong ke kanan agar pas di pinggir layar */
  margin-bottom: 0;
  position: relative;
  z-index: 3;
}

.flower-bottom img {
  width: 100%;
  display: block;
}

/* ----------------------------------
   SECTION DALEM (WELCOME / HERO INNER)
---------------------------------- */
.section-dalem {
  display: none;
  width: 100%;
  height: 100vh; /* Kunci 100% tinggi viewport */
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  position: relative;
  text-align: center;
  color: #ffffff;
  padding: 40px 20px;
  overflow: hidden;
}

.section-dalem.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* Icon Double Happiness (Xi) */
.icon-dalem {
  width: 55px;
  height: auto;
  margin-top: 10px;
  margin-bottom: 15px;
}

/* Typography Section Dalem */
.dalem-subtitle {
  font-size: 0.95rem;
  letter-spacing: 1px;
  margin-bottom: 10px;
  opacity: 0.9;
}

.dalem-names {
  font-size: 2.1rem;
  font-weight: normal;
  line-height: 1.25;
  margin-bottom: 12px;
}

.dalem-names .ampersand {
  display: block;
  font-size: 1.5rem;
  margin: 4px 0;
}

.dalem-date {
  font-size: 1.25rem;
  letter-spacing: 4px;
  margin-bottom: 25px;
}

/* Quote Text & Verse */
.dalem-quote-wrapper {
  max-width: 320px;
  margin: 0 auto;
}

.dalem-quote {
  font-size: 0.82rem;
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 6px;
  opacity: 0.9;
}

.dalem-verse {
  font-size: 0.85rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

/* ----------------------------------
   ANIMASI PREMIUM (FADE-IN UP STAGGERED)
---------------------------------- */
.animate-item {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Efek Muncul saat Observer Trigger Class 'show' */
.section-dalem.show .animate-item {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delay untuk Kesan High-End/Elegan */
.section-dalem.show .animate-item:nth-child(1) { transition-delay: 0.2s; } /* Icon */
.section-dalem.show .animate-item:nth-child(2) { transition-delay: 0.4s; } /* Subtitle */
.section-dalem.show .animate-item:nth-child(3) { transition-delay: 0.6s; } /* Names */
.section-dalem.show .animate-item:nth-child(4) { transition-delay: 0.8s; } /* Date */
.section-dalem.show .animate-item:nth-child(5) { transition-delay: 1.0s; } /* Quote */


/* ----------------------------------
   SECTION GROOM & BRIDE
---------------------------------- */
.section-groom-bride {
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  text-align: center;
  position: relative;
}

/* Container Teks Bagian Merah */
.gb-content-wrapper {
  padding: 50px 20px 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-phoenix-merge {
  width: 110px;
  height: auto;
  margin-bottom: 12px;
}

.gb-title {
  font-family: 'Baskvill', serif;
  font-size: 2.2rem;
  font-weight: normal;
  line-height: 1.15;
  margin-bottom: 15px;
}

.gb-divider {
  width: 80%;
  max-width: 280px;
  height: auto;
  margin-bottom: 20px;
}

.gb-intro-text {
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0.9;
  margin-bottom: 25px;
}

.gb-name {
  font-size: 1.9rem;
  font-weight: normal;
  margin-bottom: 4px;
}

.gb-parents {
  font-size: 0.78rem;
  opacity: 0.85;
}

.gb-ampersand {
  font-size: 1.8rem;
  margin: 15px 0;
}

.gb-person-box {
  margin-bottom: 5px;
}

.gb-closing-text {
  font-size: 0.78rem;
  line-height: 1.5;
  margin-top: 25px;
  opacity: 0.9;
}

/* ----------------------------------
   SAVE THE DATES (EDGE-TO-EDGE)
---------------------------------- */
.std-banner-wrapper {
  width: 100%;
  min-height: 380px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  margin: 0; /* Menempel sempurna dari ujung ke ujung */
}

.std-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.std-title {
  font-size: 2.1rem;
  font-weight: normal;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.std-main-text {
  font-size: 2.6rem;
  font-weight: normal;
  margin-bottom: 25px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* Button Set Reminder */
.btn-std {
  background: linear-gradient(180deg, #fceaa7 0%, #e6be68 50%, #c49633 100%);
  color: #5c0505;
  font-family: 'Baskvill', serif;
  font-size: 0.9rem;
  font-weight: bold;
  padding: 9px 26px;
  border: 1px solid #fff5cb;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s;
}

.btn-std:hover {
  transform: scale(1.05);
}

/* ----------------------------------
   ANIMASI PREMIUM (NEW & DIFFERENT CLASS)
---------------------------------- */
/* Base States */
.gb-anim-scale {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.gb-anim-blur {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(-15px);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), filter 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.gb-anim-rise {
  opacity: 0;
  transform: translateY(35px) scale(0.98);
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Trigger Class 'gb-active' saat Viewport Masuk */
.section-groom-bride.gb-active .gb-anim-scale {
  opacity: 1;
  transform: scale(1);
}

.section-groom-bride.gb-active .gb-anim-blur {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.section-groom-bride.gb-active .gb-anim-rise {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered Delay Halus */
.section-groom-bride.gb-active .icon-phoenix-merge { transition-delay: 0.1s; }
.section-groom-bride.gb-active .gb-title               { transition-delay: 0.3s; }
.section-groom-bride.gb-active .gb-divider             { transition-delay: 0.45s; }
.section-groom-bride.gb-active .gb-intro-text          { transition-delay: 0.6s; }
.section-groom-bride.gb-active .gb-person-box:nth-of-type(1) { transition-delay: 0.75s; }
.section-groom-bride.gb-active .gb-ampersand           { transition-delay: 0.9s; }
.section-groom-bride.gb-active .gb-person-box:nth-of-type(2) { transition-delay: 1.05s; }
.section-groom-bride.gb-active .gb-closing-text        { transition-delay: 1.2s; }

/* Delay Khusus Banner Save the Dates */
.section-groom-bride.gb-active .std-title     { transition-delay: 1.35s; }
.section-groom-bride.gb-active .std-main-text { transition-delay: 1.5s; }
.section-groom-bride.gb-active .btn-std       { transition-delay: 1.65s; }


/* ----------------------------------
   SECTION DATE & LOCATION
---------------------------------- */
.section-date-location {
  width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 50px 20px 20px 20px; /* Padding bawah dirapatkan dari 60px ke 20px */
  text-align: center;
  color: #5c0505;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dl-main-title {
  font-family: 'Baskvill', serif;
  font-size: 2.3rem;
  font-weight: normal;
  color: #ffffff;
  margin-bottom: 35px;
}

/* Container Pagoda (Raw Image as Background) */
.dl-card {
  width: 100%;
  max-width: 400px;
  background-size: 100% 100%; /* Memastikan asset PNG ter-fit dengan sempurna */
  background-position: center;
  background-repeat: no-repeat;
  padding: 85px 25px 80px 25px; /* Padding atas & bawah dinaikkan ~25% agar bentuk pagoda lebih tinggi/jangkung */
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Menghilangkan margin berlebih di kartu paling bawah */
.dl-card:last-child {
  margin-bottom: 0;
}

.icon-phoenix-red {
  width: 80px;
  height: auto;
  margin-bottom: 12px;
}

.dl-event-title {
  font-family: 'Baskvill', serif;
  font-size: 2.1rem;
  font-weight: normal;
  color: #7a020d;
  margin-bottom: 10px;
}

.dl-date {
  font-size: 1.05rem;
  font-weight: normal;
  margin-bottom: 2px;
}

.dl-time {
  font-size: 1rem;
  margin-bottom: 20px;
}

.dl-venue {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 6px;
}

.dl-address {
  font-size: 0.82rem;
  line-height: 1.45;
  margin-bottom: 22px;
  max-width: 280px;
  opacity: 0.95;
}

/* Button Direction */
.btn-location {
  display: inline-block;
  background: linear-gradient(180deg, #fceaa7 0%, #e6be68 50%, #c49633 100%);
  color: #5c0505;
  font-family: 'Baskvill', serif;
  font-size: 0.95rem;
  font-weight: bold;
  text-decoration: none;
  padding: 8px 26px;
  border: 1px solid #fff5cb;
  border-radius: 25px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  margin-bottom: 18px;
}

.btn-location:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

/* Garis Merah Runcing Manual */
.tapered-line-red {
  width: 2px;
  height: 45px;
  margin: 0 auto 16px auto;
  background: linear-gradient(to bottom, rgba(122,2,13,0) 0%, rgba(122,2,13,1) 50%, rgba(122,2,13,0) 100%);
}

.dl-rsvp {
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.9;
}

/* ----------------------------------
   ANIMASI VIEWPORT (REPLAYABLE)
---------------------------------- */
.dl-anim-blur {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(-20px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.dl-anim-rise {
  opacity: 0;
  transform: translateY(45px) scale(0.95);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* State Aktif saat Masuk Viewport */
.section-date-location.dl-active .dl-anim-blur {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.section-date-location.dl-active .dl-anim-rise {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Delay Animasi Staggered */
.section-date-location.dl-active .dl-main-title { transition-delay: 0.1s; }
.section-date-location.dl-active .dl-card:nth-of-type(1) { transition-delay: 0.25s; }
.section-date-location.dl-active .dl-card:nth-of-type(2) { transition-delay: 0.5s; }



/* ----------------------------------
   SECTION WEDDING GIFT
---------------------------------- */
.section-wedding-gift {
  width: 100%;
  height: auto; /* Menggunakan auto agar tinggi fleksibel dan normal */
  min-height: 100vh; /* Tetap menjaga batas minimal layar tanpa memaksa memanjang */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 50px 20px 40px 20px; /* Padding disesuaikan agar proporsional */
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.icon-golden-flower {
  width: 85px; /* Diperbesar sedikit agar lebih jelas */
  height: auto;
  margin-bottom: 10px;
}

.wg-main-title {
  font-family: 'Baskvill', serif;
  font-size: 2.5rem; /* Ukuran font judul dinaikkan */
  font-weight: normal;
  margin-bottom: 12px;
}

.wg-intro-text {
  font-size: 0.95rem; /* Diperbesar dari 0.76rem agar mudah dibaca */
  line-height: 1.5;
  opacity: 0.95;
  max-width: 350px;
  margin-bottom: 18px;
}

.wg-divider {
  width: 80%;
  max-width: 280px;
  height: auto;
  margin-bottom: 22px;
}

.wg-block {
  width: 100%;
  max-width: 340px;
  margin-bottom: 10px;
}

.wg-sub-title {
  font-family: 'Baskvill', serif;
  font-size: 1.85rem; /* Ukuran font sub-judul dinaikkan */
  font-weight: normal;
  margin-bottom: 6px;
}

.wg-label {
  font-size: 0.9rem; /* Ukuran label dinaikkan */
  opacity: 0.9;
  margin-bottom: 5px;
}

.wg-masked-text {
  font-size: 1.15rem; /* Ukuran teks bertopeng dinaikkan */
  letter-spacing: 3px;
  margin-bottom: 12px;
  transition: all 0.3s ease;
  min-height: 26px;
  line-height: 1.4;
}

.wg-masked-text.revealed {
  letter-spacing: 0.5px;
  font-size: 0.95rem; /* Ukuran teks terbuka diperbesar agar tetap terbaca jelas */
  font-weight: bold;
  color: #fceaa7;
}

/* Button Wedding Gift */
.btn-wg {
  background: linear-gradient(180deg, #fceaa7 0%, #e6be68 50%, #c49633 100%);
  color: #5c0505;
  font-family: 'Baskvill', serif;
  font-size: 0.95rem; /* Ukuran font tombol diperbesar */
  font-weight: bold;
  padding: 8px 24px;
  border: 1px solid #fff5cb;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-wg:hover {
  transform: scale(1.05);
}

/* Garis Emas Runcing Manual */
.tapered-line-gold {
  width: 2px;
  height: 38px;
  margin: 15px auto 15px auto;
  background: linear-gradient(to bottom, rgba(230, 190, 104, 0) 0%, rgba(230, 190, 104, 1) 50%, rgba(230, 190, 104, 0) 100%);
}

/* Custom Toast Alert */
.wg-toast {
  position: absolute;
  bottom: 25px;
  background: rgba(0, 0, 0, 0.85);
  color: #fceaa7;
  border: 1px solid #e6be68;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 20;
}

.wg-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ----------------------------------
   ANIMASI VIEWPORT WEDDING GIFT (UNIQUE CLASS)
---------------------------------- */
.wg-anim-scale {
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.wg-anim-blur {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(-15px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.wg-anim-rise {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* State Active saat Viewport Masuk */
.section-wedding-gift.wg-active .wg-anim-scale {
  opacity: 1;
  transform: scale(1);
}

.section-wedding-gift.wg-active .wg-anim-blur {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.section-wedding-gift.wg-active .wg-anim-rise {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delay */
.section-wedding-gift.wg-active .icon-golden-flower { transition-delay: 0.1s; }
.section-wedding-gift.wg-active .wg-main-title      { transition-delay: 0.25s; }
.section-wedding-gift.wg-active .wg-intro-text      { transition-delay: 0.4s; }
.section-wedding-gift.wg-active .wg-divider         { transition-delay: 0.55s; }
.section-wedding-gift.wg-active .wg-block:nth-of-type(1) { transition-delay: 0.7s; }
.section-wedding-gift.wg-active .tapered-line-gold { transition-delay: 0.85s; }
.section-wedding-gift.wg-active .wg-block:nth-of-type(2) { transition-delay: 1.0s; }


/* ----------------------------------
   SECTION MEMORIES
---------------------------------- */
.section-memories {
  width: 100%;
  padding: 60px 20px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mem-title {
  font-family: 'Baskvill', serif;
  font-size: 2.2rem;
  font-weight: normal;
  line-height: 1.25;
  margin-bottom: 35px;
  color: #ffffff;
}

/* Grid Layout (2 Kolom Presisi) */
.mem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  width: 100%;
  max-width: 380px;
}

.mem-item {
  width: 100%;
  aspect-ratio: 1 / 1; /* Memastikan bentuk selalu Kotak Sempurna */
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  background-color: #e6be68; /* Fallback placeholder color */
}

.mem-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.mem-item:hover img {
  transform: scale(1.08);
}

/* ----------------------------------
   LIGHTBOX MODAL STYLES
---------------------------------- */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 85%;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 6px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.8);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #ffffff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 100000;
  transition: color 0.2s;
}

.lightbox-close:hover {
  color: #fceaa7;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 22px;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100000;
  transition: background 0.2s, color 0.2s;
}

.lightbox-btn:hover {
  background: #e6be68;
  color: #5c0505;
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

/* ----------------------------------
   ANIMASI VIEWPORT MEMORIES (ONCE-ONLY)
---------------------------------- */
.mem-anim-blur {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(-15px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.mem-anim-scale {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-memories.mem-active .mem-anim-blur {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.section-memories.mem-active .mem-anim-scale {
  opacity: 1;
  transform: scale(1);
}

/* Staggered Delay untuk Grid Items */
.section-memories.mem-active .mem-title { transition-delay: 0.1s; }
.section-memories.mem-active .mem-item:nth-child(1) { transition-delay: 0.25s; }
.section-memories.mem-active .mem-item:nth-child(2) { transition-delay: 0.35s; }
.section-memories.mem-active .mem-item:nth-child(3) { transition-delay: 0.45s; }
.section-memories.mem-active .mem-item:nth-child(4) { transition-delay: 0.55s; }
.section-memories.mem-active .mem-item:nth-child(5) { transition-delay: 0.65s; }
.section-memories.mem-active .mem-item:nth-child(6) { transition-delay: 0.75s; }


/* ----------------------------------
   SECTION CLOSING & WISHES
---------------------------------- */
.section-closing {
  width: 100%;
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  padding: 50px 20px 60px 20px;
  text-align: center;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.cls-main-title {
  font-family: 'Baskvill', serif;
  font-size: 2.5rem;
  font-weight: normal;
  margin-bottom: 25px;
  color: #ffffff;
}

/* Card Form Krem Gading */
.cls-card {
  width: 100%;
  max-width: 380px;
  background-color: #fdfbf2; /* Warna krem halus gading */
  border-radius: 28px;
  padding: 30px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  text-align: left;
  margin-bottom: 25px;
}

.cls-card-title {
  font-family: 'Baskvill', serif;
  font-size: 1.8rem;
  color: #7a020d;
  margin-bottom: 20px;
  font-weight: normal;
  text-align: left;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-family: 'Baskvill', serif;
  font-size: 0.95rem;
  color: #7a020d;
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background-color: #7a020d; /* Background input merah marun */
  color: #fceaa7; /* Teks ketikan warna emas krem */
  border: 1px solid #5c0505;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  box-sizing: border-box;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(252, 234, 167, 0.5);
}

.btn-send-wish {
  display: block;
  margin: 22px auto 0 auto;
  background: linear-gradient(180deg, #fceaa7 0%, #e6be68 50%, #c49633 100%);
  color: #5c0505;
  font-family: 'Baskvill', serif;
  font-size: 0.95rem;
  font-weight: bold;
  padding: 9px 28px;
  border: 1px solid #fff5cb;
  border-radius: 25px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-send-wish:hover {
  transform: scale(1.04);
}

/* Wishes Preview Box */
.wishes-preview-container {
  width: 100%;
  max-width: 380px;
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

/* Custom Scrollbar Preview Wishes */
.wishes-preview-container::-webkit-scrollbar {
  width: 4px;
}
.wishes-preview-container::-webkit-scrollbar-thumb {
  background: #e6be68;
  border-radius: 4px;
}

.wish-item {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(230, 190, 104, 0.4);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: left;
}

.wish-author {
  font-family: 'Baskvill', serif;
  font-size: 1rem;
  color: #fceaa7;
  font-weight: bold;
  margin-bottom: 4px;
}

.wish-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #ffffff;
  opacity: 0.9;
}

/* Closing Content */
.closing-content {
  margin-top: 40px;
  margin-bottom: 30px;
  max-width: 360px;
}

.closing-title {
  font-family: 'Baskvill', serif;
  font-size: 1.2rem;
  font-weight: normal;
  color: #ffffff;
  margin-bottom: 12px;
  line-height: 1.3;
}

.closing-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  opacity: 0.9;
}

/* Top Toast Alert */
.top-toast {
  position: fixed;
  top: -70px;
  left: 50%;
  transform: translateX(-50%);
  background: #fdfbf2;
  color: #7a020d;
  border: 1px solid #e6be68;
  padding: 10px 22px;
  border-radius: 30px;
  font-family: 'Baskvill', serif;
  font-size: 0.95rem;
  font-weight: bold;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99999;
  transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.top-toast.show {
  top: 25px;
}

/* ----------------------------------
   FOOTER VERUSA DESIGN
---------------------------------- */
.verusa-footer {
  width: 100%;
  background-color: #ffffff;
  color: #7a020d;
  padding: 14px 10px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.verusa-link {
  color: #7a020d;
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s;
}

.verusa-link:hover {
  opacity: 0.8;
}

.verusa-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* ----------------------------------
   ANIMASI CLOSING VIEWPORT (UNIQUE CLASS)
---------------------------------- */
.cls-anim-blur {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(-15px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
              filter 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.cls-anim-rise {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-closing.cls-active .cls-anim-blur {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.section-closing.cls-active .cls-anim-rise {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered Delay */
.section-closing.cls-active .cls-main-title { transition-delay: 0.1s; }
.section-closing.cls-active .cls-card       { transition-delay: 0.25s; }
.section-closing.cls-active .wishes-preview-container { transition-delay: 0.4s; }
.section-closing.cls-active .closing-content { transition-delay: 0.55s; }

/* Posisi Sticky & Styling Dasar Vinyl */
.music-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 45px;
  height: 45px;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  z-index: 9999;
  cursor: pointer;
  display: none; /* Disembunyikan sebelum open invitation */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.3s ease;
}

/* Munculkan tombol saat aktif */
.music-toggle-btn.show {
  display: block;
}

/* Animasi Putar Terus (Infinite) */
.music-toggle-btn.playing {
  animation: spinVinyl 3s linear infinite;
}

/* Berhenti berputar saat di-pause */
.music-toggle-btn.paused {
  animation-play-state: paused;
}

@keyframes spinVinyl {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Container pembungkus efek fireflies */
.firefly-container {
  position: fixed; /* GANTI JADI FIXED biar ngikutin layar pas di-scroll */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Supaya tidak menghalangi klik button/elemen lain */
  overflow: hidden;
  z-index: 99; /* Pastikan di atas background tapi di bawah modal/popup */
}

/* Elemen partikel firefly */
.firefly {
  position: absolute;
  width: 4px;
  height: 4px;
  background-color: #ffd700; /* Warna emas */
  border-radius: 50%;
  box-shadow: 0 0 8px #ffd700, 0 0 12px #ffae00; /* Glow emas */
  opacity: 0;
  animation: floatFirefly linear infinite;
}

/* Animasi melayang & naik turun opacity */
@keyframes floatFirefly {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  30% {
    opacity: 0.8; /* Terang berkilau */
  }
  70% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(-120px) translateX(20px) scale(1.2); /* Bergerak ke atas pelan */
  }
}

/* ==========================================
   SECTION PEMBUKA CUSTOM (DISCLAIMER ORIENTAL)
   ========================================== */
.pembuka-custom {
  display: none; /* Sembunyikan awal, di-activate via JS */
  width: 100%;
  min-height: 100vh;
  padding: 40px 20px;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #70020d; /* Latar merah marun oriental */
  background-image: url('../../images/oriental/bg.webp'); /* Background patterned oriental jika ada */
  background-size: cover;
  background-position: center;
  text-align: center;
  color: #ffffff;
  position: relative;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

/* State Aktif saat dipicu JS */
.pembuka-custom.active {
  display: flex !important;
  opacity: 1;
}

.custom-disclaimer-box {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto 0;
}

/* Badge dengan aksen emas gradasi */
.disclaimer-badge {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fceaa7;
  border: 1px solid #e6be68;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.disclaimer-title {
  font-size: 2rem;
  font-weight: normal;
  color: #ffffff;
  margin: 0 0 14px 0;
  line-height: 1.2;
}

.disclaimer-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #f0f0f0;
  margin: 0 0 35px 0;
  opacity: 0.95;
}

/* Navigasi Scroll Down (Teks & Panah Emas) */
.scroll-down-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #fceaa7;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.3s ease;
}

.scroll-down-wrapper:hover {
  opacity: 0.85;
  transform: translateY(2px);
}

.scroll-text {
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-bottom: 8px;
  color: #fceaa7;
}

.scroll-arrow {
  font-size: 1.4rem;
  color: #e6be68;
  animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

