/* RESET */
* { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; overflow-x:hidden; font-family: 'Montserrat', sans-serif; background: #faf9f7; color: #3c2f2f; line-height:1.8; }

/* BACKGROUND */
.watercolor-bg {
  position: fixed;
  inset: 0;
  background: url('/background/watercolor.png') center/cover;
  opacity: 0.3;
  z-index: -2;
}
.watercolor-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(240,248,255,0.5), rgba(255,248,240,0.7));
}

/* PARTICLE CANVAS */
#particle-canvas { position:fixed; inset:0; z-index:-1; pointer-events:none; }

/* LANDING PAGE FULLSCREEN RESPONSIVE */
#cover {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #000; /* full black overlay */
  overflow: hidden;
  height: min(100dvh, 100vh); /* aman di desktop + mobile */
  width: 100vw;
  padding: 2rem;
  box-sizing: border-box;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(135deg, rgba(59,130,166,0.3), rgba(255,182,157,0.3)),
    url('/background/watercolor.png') center/cover;
  z-index: 1;
}

.cover-content {
  position: relative;
  z-index: 2;
  padding: 1rem;
  max-width: 90vw;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  animation: fadeIn 2s ease-out;
  box-sizing: border-box;
}


/* Subtitle & Title */
.subtitle {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.5rem, 4vw, 3rem); /* sedikit lebih kecil buat mobile */
  opacity: 0.9;
  margin:0;
}
.title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 8vw, 6rem); /* responsive untuk mobile */
  margin: 0.5rem 0;
}
.title span { font-size:70%; }

.date {
  font-size: clamp(1.5rem, 4vw, 3rem);
  letter-spacing: 8px;
  margin: 1.5rem 0;
  font-weight: 300;
}

/* Tombol Buka Undangan */
.btn-open {
  position: relative;
  padding: clamp(10px,2vw,18px) clamp(30px,6vw,70px);
  font-size: clamp(1rem, 4vw, 1.6rem); /* responsive */
  font-weight: 600;
  background: rgba(255,255,255,0.3);
  border: 3px solid white;
  border-radius: 60px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: 0.4s, transform 0.4s;
  z-index: 100001;
}
.btn-open:hover {
  background: white;
  color: #2c5f7e;
  transform: scale(1.08);
}

/* Animasi masuk lebih smooth dengan blur */
@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(8px);
  }
  60% {
    opacity: 0.8;
    transform: translateY(-5px);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Gunakan animasi pada cover-content */
.cover-content {
  animation: fadeSlideIn 1.2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 90vw;
  padding: 1rem;
  text-align: center;
}

/* Fade out smooth + blur saat buka undangan */
.fade-out {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(6px);
  transition: opacity 1s ease-in-out, transform 1s ease-in-out, filter 1s ease-in-out;
  pointer-events: none;
}

/* RESPONSIVE TABLET & MOBILE */
@media screen and (max-width: 1024px) {
  .title { font-size: clamp(3.5rem, 10vw, 5.5rem); }
  .subtitle { font-size: clamp(1.4rem,4vw,2.5rem); }
  .date { font-size: clamp(1.2rem,4vw,2.5rem); }
  .btn-open { padding: clamp(8px,2.5vw,16px) clamp(25px,6vw,60px); font-size: clamp(1rem,4vw,1.4rem); }
}

@media screen and (max-width: 768px) {
  .title { font-size: clamp(2.5rem, 12vw, 4.5rem); }
  .subtitle { font-size: clamp(1.2rem,4vw,2rem); }
  .date { font-size: clamp(1rem,4vw,2rem); }
  .btn-open { padding: clamp(6px,3vw,14px) clamp(20px,6vw,50px); font-size: clamp(0.9rem,4vw,1.2rem); }
}

@media screen and (max-height: 600px) {
  .cover-content { max-height: 85%; justify-content:flex-start; }
}

/* Overlay landing fade + blur saat buka undangan */
#cover.fade-out {
  opacity: 0;
  transform: scale(1.02); /* zoom-in sedikit */
  filter: blur(6px);
  transition: opacity 1s ease-in-out, transform 1s ease-in-out, filter 1s ease-in-out;
}

/* Main content muncul smooth */
#main-content {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

#main-content.show {
  opacity: 1;
  transform: translateY(0);
}




/* MAIN CONTENT */
#main-content { position:relative; z-index:2; background:rgba(255,255,255,0.96); min-height:100vh; padding-bottom:6rem; }
.hidden { display:none !important; }
.show { display: block !important; }

/* SECTION UMUM */
.section, .hero { max-width:1200px; margin:0 auto; padding:6rem 2rem; text-align:center; }
h2 { font-family:'Playfair Display',serif; font-size:clamp(2.5rem,6vw,4.2rem); color:#2c5f7e; margin-bottom:2.5rem; }

/* HERO */
.hero {
  background: linear-gradient(rgba(0,0,0,0.25), rgba(0,0,0,0.25)), 
              url('/background/watercolor.png') center/cover;
  color: white;
  padding: 10rem 2rem;
  text-shadow: 0 3px 20px rgba(0,0,0,0.7);
}

.hero-title { font-family:'Dancing Script',cursive; font-size:clamp(5rem,12vw,9rem); margin-bottom:1rem; }
.hero-subtitle { font-size:clamp(1.4rem,4vw,2rem); margin:1.5rem 0; }
.hero-text { font-size:clamp(1.1rem,3vw,1.6rem); margin:2rem 0; }
.hero-date { font-size:clamp(1.6rem,5vw,2.8rem); letter-spacing:8px; }

/* COUPLE */
.couple { background:rgba(255,248,243,0.97); }
.bride-groom { display:flex; align-items:center; justify-content:center; gap:5rem; flex-wrap:wrap; max-width:1000px; margin:0 auto; }
.person h3 { font-family:'Dancing Script',cursive; font-size:clamp(3rem,8vw,5.5rem); color:#d47a6a; margin-bottom:1rem; }
.person p { font-size:1.1rem; color:#555; }
.ampersand { font-family:'Dancing Script',cursive; font-size:clamp(4rem,10vw,8rem); color:#7ab8d4; }

/* COUNTDOWN */
/* COUNTDOWN - HORIZONTAL FIXED, RESPONSIVE UNTUK DESKTOP & HP */
#timer {
  display: flex;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 1.5rem); /* jarak antar box */
  flex-wrap: nowrap;   /* jangan turun ke baris baru */
  align-items: center;
  overflow-x: auto;    /* scroll horizontal jika viewport sempit */
  padding: 0 1rem;     /* padding kiri-kanan di HP */
  box-sizing: border-box;
}

#timer div {
  background: rgba(255, 255, 255, 0.9);
  padding: clamp(1rem, 2vw, 1.8rem);
  border-radius: 25px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.12);
  min-width: 90px;      /* minimal box */
  max-width: 130px;     /* maksimal box desktop */
  text-align: center;
  flex: 0 0 auto;       /* fixed box size, jangan shrink */
}

#timer span {
  font-size: clamp(1.5rem, 6vw, 3.5rem);
  font-weight: bold;
  color: #2c5f7e;
  display: block;
}

#timer div:nth-child(4) {
  color: #d47a6a;
}

/* Scrollbar mini & halus untuk HP */
#timer::-webkit-scrollbar {
  height: 5px;
}
#timer::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.2);
  border-radius: 3px;
}

/* MEDIA QUERIES - tetap horizontal tapi responsive */
@media screen and (max-width: 768px) {
  #timer div {
    min-width: 70px;
    padding: 1rem;
  }
  #timer span {
    font-size: clamp(1.2rem, 8vw, 2.5rem);
  }
}

@media screen and (max-width: 480px) {
  #timer div {
    min-width: 60px;
    padding: 0.8rem 1rem;
  }
  #timer span {
    font-size: clamp(1rem, 10vw, 2rem);
  }
}



/* EVENT */
.event-card { background:white; padding:3rem 2rem; border-radius:25px; box-shadow:0 15px 40px rgba(0,0,0,0.1); margin:2rem auto; max-width:600px; }
.btn-location { display:inline-block; margin-top:2rem; padding:16px 50px; background:#7ab8d4; color:white; text-decoration:none; border-radius:50px; font-weight:600; transition:0.3s; }
.btn-location:hover { background:#d47a6a; transform:scale(1.05); }

/* GALLERY */
.gallery-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:2rem; max-width:1200px; margin:2rem auto; }
.gallery-grid img { width:100%; border-radius:25px; box-shadow:0 15px 40px rgba(0,0,0,0.15); transition:0.5s; }
.gallery-grid img:hover { transform:translateY(-15px) scale(1.02); }

/* RSVP */
.rsvp form { max-width:600px; margin:3rem auto; display:flex; flex-direction:column; gap:1.2rem; }
.rsvp input, .rsvp select, .rsvp textarea { padding:18px; border-radius:15px; border:1px solid #ddd; font-family:inherit; font-size:1rem; }
.rsvp button { padding:18px; background:#7ab8d4; color:white; border:none; border-radius:15px; font-size:1.2rem; font-weight:600; cursor:pointer; transition:0.3s; }
.rsvp button:hover { background:#d47a6a; }

/* CLOSING */
.quote { font-style:italic; font-size:1.3rem; color:#555; margin:2rem 0; }
.verse { font-weight:bold; color:#2c5f7e; margin:1.5rem 0; }
.sign { margin-top:3rem; font-size:1.2rem; }

/* MUSIC BUTTON - updated */
.music-btn {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.6); /* lebih transparan */
  padding: 10px 16px; /* lebih kecil */
  border-radius: 50px;
  font-size: 1.4rem; /* lebih kecil */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}

.music-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.8);
}

/* RESPONSIVE MOBILE */
@media screen and (max-width: 768px) {
  .music-btn {
    top: 10px;
    right: 10px;
    padding: 8px 12px;
    font-size: 1.2rem;
  }
}


/* ANIMATION */
@keyframes fadeIn { from { opacity:0; transform:translateY(40px); } to { opacity:1; transform:translateY(0); } }





/* ============================================ */
/* OVERRIDE POPUP SHARED UNTUK TEMA INI       */
/* ============================================ */

/* Pastikan popup selalu fullscreen & di tengah */
#rmrnPopup {
    position: fixed !important;     /* tetap relatif ke viewport */
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 99999 !important;
    pointer-events: auto !important; /* supaya bisa klik */
}

/* Konten popup animasi tetap jalan */
#rmrnPopup .popup-content {
    transform: translateY(0) !important; /* jangan ikut transform parent */
    opacity: 1 !important;               /* muncul normal */
}

/* Override overflow parent yang “mengunci” scroll */
body, html {
    overflow: auto !important;
}



#rmrnPopup {
    display: none;        /* jangan aktif di awal */
    pointer-events: none; /* jangan menahan klik */
}
#rmrnPopup.show {
    display: flex;        /* muncul saat script menambahkan class show */
    pointer-events: auto;
}



