@font-face {
  font-family: 'enhanced_dot_digital-7';
  src: url('../fonts/enhanced_dot_digital-7.ttf') format('truetype');
}
/* ================= LAYOUT FIX MOBILE STYLE ================= */
body {
  background: #fff;            /* warna pinggir laptop */
}

.app {
  max-width: 420px;            /* lebar ala HP */
  margin: 0 auto;              /* tengah */
  background: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Reset & basic */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { font-family: "Times New Roman", serif; overflow-x:hidden; background:#fff; }

/* ================= OPENING ================= */
.opening { width:100%; }
.opening img { width:100%; display:block; }

/* ================= OVERLAY GIF + BUTTON ================= */
.overlay {
  position: fixed; inset:0;
  display:none;
  flex-direction: column;
  justify-content:center;
  align-items:center;
  background: rgba(0,0,0,0.35);
  z-index:999;
}
.overlay img {
  width:220px;
  opacity:0;
  transform:translateY(80px);
  transition: all 1.4s ease-out;
}
.overlay .button { margin-top:36px; opacity:0; transition: opacity 1.2s ease; }
.overlay .button a {
  color:#f5f1e6; text-decoration:none; letter-spacing:3px;
  font-size:14px; border-bottom:1px solid #f5f1e6; padding-bottom:6px;
}

/* ================= INFO SECTION ================= */
#info { display:none; min-height:100vh; background:url('../assets/bg-info.jpg') center/cover no-repeat; color:#f5f1e6; position:relative; text-align:center;  /* Tambahan supaya anak-anak vertikal */
  flex-direction: column;
  align-items: center;
  justify-content: center}

#info .overlay-img { width:350px; opacity:0; transform:translateY(20px); transition: all 1.2s ease; margin-top: 10px; }
#info .overlay-img.active { opacity:1; transform:translateY(0); }

#info .save { font-family:'Libre Baskerville', serif; font-size:16px; letter-spacing:3px;margin-top: 20px; opacity:0; transition: all 1s ease; }
#info .save.active { opacity:1; }

.line {
  width: 220px;          /* panjang garis */
  height: 1px;           /* ketebalan */
  background: #f5f1e6;   /* putih tulang */
  margin: 10px auto;     /* jarak atas-bawah & auto center */
}
#info .day { font-family:'Parisienne', serif; font-size:22px; opacity:0; margin-top: 20px; transition: all 1s ease; }
#info .day.active { opacity:1; }
#info .date { font-family:'Playfair Display', serif; font-size:40px; letter-spacing:2px;margin-top:5px; opacity:0; transition: all 1s ease; }
#info .date.active { opacity:1; }
#info .countdown { font-family:'enhanced_dot_digital-7', monospace; font-size:30px; letter-spacing: 1px;min(400px, 80vw); margin-top:20px; opacity:0; transition: all 1s ease; }
#info .countdown.active { opacity:1; }

.bg-2, .bg-3, .bg-4 { display:none; }

/* ================= SECTION BG2 ================= */
.section { min-height:100vh; position:relative; background-size:cover; background-position:center; display:flex; justify-content:center; align-items:center; flex-direction:column; text-align:center; }
.bg-2 {
  display: none; /* tetep hidden sebelum tombol dibuka */
  position: relative;
  min-height: 100vh;
  background-image: url('../assets/bg-2.jpg');
  background-size: cover;
  background-position: center;
  text-align: center;
  flex-direction: column;
}

/* Text fade-in */
.bg2-text {
  font-family:'Libre Baskerville', serif;
  color: #f5f1e6;
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s ease;
  z-index: 2;
  margin: 30px auto;
  max-width: 60vw;          /* lebar maksimum 80% viewport */
  word-wrap: break-word;    /* pecah kata kalau terlalu panjang */
  line-height: 1.5;         /* jarak antarbaris */
  font-size: 10px;  
}
.bg2-text.active {
  opacity: 1;
  transform: translateY(0);
}

/* Container tombol overlay */
.bg2-buttons-container {
  position: relative;
  display: flex;
  flex-direction: column; /* ← biar tombol vertikal */
  align-items: center;    /* center horizontal */
  gap: 20px;              /* jarak antar tombol */
  margin-top: 20px;
}

/* Tombol overlay */
.bg2-btn img {
  width: min(420px, 85vw);
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s ease;
  cursor: pointer;
}
.bg2-btn img.active {
  opacity: 1;
  transform: translateY(0);
}
.line-bg2 {
  width: 320px;          /* panjang garis */
  height: 3px;           /* ketebalan */
  background: #871a1a;   /* putih tulang */
  margin-top: 50px;     /* jarak atas-bawah & auto center */
}
/* ================= BG3 ================= */
.bg-3 {
  display: none; /* penting supaya ga muncul sebelum tombol */
  min-height: 100vh;
  background-image: url('../assets/bg-3.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index:1;
  position: relative;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* supaya overlay & text vertikal */
}
.bg3-container {
  position: relative;       /* parent absolute untuk text */
  display: flex;
  justify-content: center;  /* horizontal center */
  align-items: center;      /* vertical center overlay */
  flex-direction: column;
}
/* Overlay bg3 */
.bg3-overlay {
  width: min(430px, 90vw);
  display: block;
}

.bg3-link-text {
  position: absolute;   /* absolute relatif ke .bg3-container */
  left: 50%;
  top: 45%;
  text-align: center;
  transform: translateX(-50%);
  color: #871a1a!important;
  font-family: 'Libre Baskerville', serif;
  font-size: 10px;
  text-decoration: underline;
  letter-spacing: 1px;
  z-index: 5;               /* di atas overlay */
}
.bg3-link-text2 {
  position: absolute;       /* absolute relatif ke .bg3-container */
  left: 50%;
  bottom: 12%;
  text-align: center;
  transform: translateX(-50%);
  color: #871a1a!important;
  font-family: 'Libre Baskerville', serif;
  font-size: 10px;
  text-decoration: underline;
  letter-spacing: 1px;
  z-index: 5;               /* di atas overlay */
}

/* Posisi vertical sesuai kebutuhan */
.bg3-link-text { top: 45%; }     /* adjust sesuai keinginan */
.bg3-link-text2 { bottom: 12%; } /* adjust sesuai keinginan */
/* ================= BG4 ================= */
.bg-4 {
  display: none; /* penting supaya ga muncul sebelum tombol */
  min-height: 100vh;
  background-image: url('../assets/bg-3.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column; /* supaya overlay & text vertikal */
}
.bg4-text  { font-family:'Libre Baskerville', serif; font-weight: normal;font-size: 8px; color: #871a1a; opacity:0; transform:translateY(20px); transition: all 1s ease; z-index:2;max-width: 50vw;     word-wrap: break-word;    /* pecah kata kalau terlalu panjang */
  line-height: 1.5;         /* jarak antarbaris */
}
.bg4-text.active { opacity:1; transform:translateY(0); }
.qris-content {
  display: none; /* sembunyikan dulu */
  margin-top: 10px;
}

.qris-btn-img {
  margin-top: 25px;
  width: 260px;
  max-width: 80vw;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.qris-btn-img:hover {
  transform: scale(1.05);
}

.qris-img {
  width: 200px; /* sesuaikan ukuran QRIS */
  max-width: 80vw;
  margin-bottom: 10px;
}
.rsvp-title {
  font-family: 'Playfair display', serif;
  color: #871a1a;
  margin-bottom: 20px;
}

.rsvp-form {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rsvp-form input,
.rsvp-form select {
  padding: 12px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
}

.rsvp-form button {background: #f5f1e6;
  color: #897968;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.rsvp-note {
  display: none;
  margin-top: 16px;
  font-size: 12px;
  opacity: .7;
}
.ucapan-title {
  font-family: 'Playfair display', serif;
  color: #871a1a;
  margin-top: 40px;
  margin-bottom: 20px;
}
.ucapan-form {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ucapan-form input,
.ucapan-form textarea {
  padding: 12px;
  border: none;
  color: #897968;
  border-radius: 6px;
  font-size: 14px;
}

.ucapan-form textarea {
  min-height: 100px;
  resize: none;
}

.ucapan-form button {
  background: #f5f1e6;
  color: #897968;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.line-ucapan {
  width: 320px;          /* panjang garis */
  height: 3px;           /* ketebalan */
  background: #871a1a;   /* putih tulang */
  margin-top: 30px;     /* jarak atas-bawah & auto center */
}
.bg-5 {
  display: none; /* penting supaya ga muncul sebelum tombol */
  min-height: auto;
  background-image: url('../assets/bgg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column; /* supaya overlay & text vertikal */
}

.ucapan-wrapper {
  width: 100%;
  max-width: 320px;
  height: 330px;              /* tinggi kotak */
  overflow-y: auto;           /* SCROLL DI DALAM */
  padding: 14px;
  margin-top: 30px;

  background: rgba(0,0,0,0.35);  /* kaca gelap */
  border: 1px solid rgba(245,241,230,0.4);
  border-radius: 10px;
}
.ucapan-list {
  margin-top: 10px;
  max-width: 420px;
  width: 100%;
}
.ucapan-item {
  background: rgba(255,255,255,0.08);
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 8px;
}

.ucapan-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: #f5f1e6;
}

.ucapan-item p {
  font-size: 12px;
  color: #ddd;
  line-height: 1.5;
}
.ucapan-wrapper::-webkit-scrollbar {
  width: 6px;
}

.ucapan-wrapper::-webkit-scrollbar-thumb {
  background: rgba(245,241,230,0.4);
  border-radius: 6px;
}
.line-live {
  width: 320px;          /* panjang garis */
  height: 3px;           /* ketebalan */
  background: #871a1a;   /* putih tulang */
  margin-top: 50px;     /* jarak atas-bawah & auto center */
}
.line-live2 {
  width: 320px;          /* panjang garis */
  height: 1px;           /* ketebalan */
  background: #871a1a;   /* putih tulang */
  margin-top: 5px;     /* jarak atas-bawah & auto center */
}
.overlay-bg5 {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  flex-direction: column;
  pointer-events: none;
  justify-content: flex-start;
  align-items: center;
  padding-top: 15vh;
  background: transparent; /* ❌ ga ngeblok */
  z-index: 5;
}

.overlay-bg5 img {
  width: 60vw;
  max-width: 280px;
  opacity: 0;
  transform: translateY(0);
  transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.overlay-bg5 img.active {
  opacity: 1;
  animation: float 4s ease-in-out infinite;
}
.bg5-text {
  margin-top: 5vh; /* jarak antara gif dan text */
  text-align: center;
  font-weight: normal;
  font-family: 'Playfair Display', serif;
  color: #6f6039;
  opacity: 0;
  transition: all 1s ease;
  pointer-events: auto;
  max-width: 50vw;          /* lebar maksimum 80% viewport */
  word-wrap: break-word;    /* pecah kata kalau terlalu panjang */
  line-height: 1.5;         /* jarak antarbaris */
  font-size: 10px;  
}

.bg5-text.active {
  opacity: 1;
}

/* Float animation untuk GIF */
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Responsive adjustments */
@media(max-width: 500px) {
  .overlay-bg5 {
    padding-top: 10vh;
  }
  .bg5-text {
    font-size: 14px;
    margin-top: 1.5vh;
  }
}

@media(min-width: 1200px) {
  .overlay-bg5 {
    padding-top: 20vh;
  }
  .bg5-text {
    font-size: 20px;
    margin-top: 2.5vh;
  }
}
/* Responsive spacing */
@media(max-width:500px){
  #info .overlay-img{ width:180px; }
  #info .date{ font-size:32px; }
  #info .countdown{ font-size:32px; }
  .bg2-overlay{ width:85vw; }
}