:root {
  /* Olive Green & Warm Cream Palette */
  --c-primary-bg: #fffdf0;
  /* Krem hangat utama */
  --c-secondary-bg: #f0edda;
  /* Krem lebih gelap untuk card/section */
  --c-accent: #596b45;
  /* Hijau Olive */
  --c-accent-dark: #3f4e30;
  --c-text-main: #2c3521;
  /* Olive gelap pekat */
  --c-text-light: #6b7a58;
  --c-border: #ccd5b8;

  /* Typography */
  --f-heading: 'Cormorant Garamond', serif;
  --f-body: 'Raleway', sans-serif;

  /* Utils */
  --border-radius: 16px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #dce0cc;
  /* Background for desktop wrapper */
  font-family: var(--f-body);
  color: var(--c-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--c-primary-bg);
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow-x: hidden;
}

/* Headings */
h1,
h2,
h3,
h4 {
  font-family: var(--f-heading);
  font-weight: 500;
  color: var(--c-accent-dark);
  letter-spacing: 0.02em;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* Utilities */
.section {
  padding: 2.5rem 2rem;
  text-align: center;
  scroll-margin-top: 130px;
  /* Prevents anchor links from hiding behind the top sticky menu */
}

.bg-sec {
  background-color: var(--c-secondary-bg);
}

.title-ornament {
  width: 60px;
  height: 2px;
  background-color: var(--c-accent);
  margin: 1rem auto;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 2.5rem;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
  color: #fff;
  border: none;
  border-radius: 30px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(89, 107, 69, 0.28);
  transition: var(--transition);
  margin-top: 1rem;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(89, 107, 69, 0.4);
}

/* ========================================
   COVER PAGE - Elegant & Luxurious
   ======================================== */

@keyframes coverFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatUp {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

#cover-page {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#cover-page.closing {
  opacity: 0;
  pointer-events: none;
}

/* Background — solid warm bisque/sand, giving a slightly warmer vibe than the content */
.cover-bg {
  position: absolute;
  inset: 0;
  background: #f0edda;
  /* Solid warm cream */
}

/* Subtle noise texture for depth */
.cover-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}


/* Couple Cat Illustration */
.cover-cat-img {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 2rem;
  animation: coverFadeIn 1.2s ease 1.1s both;
}

.cover-cat-img img {
  width: 70%;
  max-width: 100px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 16px rgba(89, 107, 69, 0.18));
}

/* Top & bottom gold-line ornaments */
.cover-ornament-top,
.cover-ornament-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2.5rem 2.5rem 0;
  width: 100%;
  animation: coverFadeIn 1s ease both;
}

.cover-ornament-bottom {
  padding: 0 2.5rem 2.5rem;
  animation-delay: 0.2s;
}

.ornament-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(89, 107, 69, 0.45), transparent);
}

.cover-ornament-bottom .ornament-line {
  background: linear-gradient(to left, transparent, rgba(89, 107, 69, 0.45), transparent);
}

.ornament-leaf {
  color: var(--c-accent);
  font-size: 0.75rem;
  opacity: 0.9;
}

/* Center content */
.cover-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 1.5rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0;
}

.cover-bismillah {
  font-size: 1.6rem;
  color: var(--c-accent-dark);
  /* Dark champagne gold */
  margin-bottom: 1.2rem;
  font-family: var(--f-arabic);
  font-size: 1.8rem;
  margin-bottom: 2rem;
  background: linear-gradient(to right,
      #3f4e30 0%,
      #8a9e72 20%,
      #fffdf0 40%,
      #8a9e72 60%,
      #3f4e30 100%);
  background-size: 200% auto;
  color: #000;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: coverFadeIn 1.2s ease 0s both, shimmer 3s linear 2s infinite;
}

.cover-subtitle {
  font-family: var(--f-body);
  font-size: 0.72rem;
  letter-spacing: 5px;
  color: var(--c-accent-dark);
  /* Dark champagne instead of bright gold */
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  animation: coverFadeIn 1.2s ease 0.5s both;
}

.cover-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--f-heading);
  font-size: 3.8rem;
  /* Restored to original large size */
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  color: var(--c-text-main);
  /* Dark brown — legible on cream */
  text-shadow: 0 1px 8px rgba(107, 168, 149, 0.25);
  margin-bottom: 1rem;
  padding: 0 10px;
  /* prevent edge hugging */
  animation: coverFadeIn 1.2s ease 0.7s both;
}



.cover-date {
  font-family: var(--f-heading);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--c-text-light);
  /* Muted dark on cream */
  letter-spacing: 1px;
  animation: coverFadeIn 1.2s ease 0.9s both;
  margin-bottom: 1.5rem;
}

/* Divider with diamond */
.cover-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 70%;
  margin: 0 auto 2rem;
  animation: coverFadeIn 1.2s ease 1s both;
}

.cover-divider span:first-child,
.cover-divider span:last-child {
  flex: 1;
  height: 1px;
  background: rgba(89, 107, 69, 0.38);
}

.divider-diamond {
  color: var(--c-accent);
  font-size: 0.6rem;
}

/* Open Invitation button */
.cover-open-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.9rem 2.2rem;
  background: transparent;
  border: 1px solid rgba(89, 107, 69, 0.55);
  border-radius: 50px;
  color: var(--c-accent-dark);
  /* Dark gold text on cream bg */
  font-family: var(--f-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background-color: rgba(89, 107, 69, 0.08);
  transition: all 0.35s ease;
  animation: coverFadeIn 1.2s ease 1.2s both, floatUp 3s ease-in-out 2.5s infinite;
}

.cover-open-btn:hover {
  background-color: rgba(89, 107, 69, 0.18);
  border-color: var(--c-accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(63, 78, 48, 0.2);
}

.btn-open-icon {
  font-size: 1.1rem;
}

.pre-title {
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--c-text-light);
  margin-bottom: 1rem;
}

.couple-names {
  font-size: 3.2rem;
  margin: 1rem 0;
  color: var(--c-text-main);
  line-height: 1.1;
}

.wedding-date {
  font-size: 1.2rem;
  color: var(--c-accent-dark);
  margin-bottom: 2rem;
  font-style: italic;
  font-family: var(--f-heading);
}

/* Elegant Couple Overlap Layout */
.elegant-couple-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 420px;
  margin: 2.5rem auto 1rem;
  padding: 0 15px;
}

.couple-info {
  background: rgba(255, 255, 255, 0.92);
  padding: 1rem 1.3rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(89, 107, 69, 0.12);
  border: 1px solid rgba(89, 107, 69, 0.28);
  z-index: 2;
  position: relative;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.groom-info {
  align-self: flex-start;
  text-align: left;
  margin-left: -5%;
  /* Drag a bit left to prevent center overlap */
  margin-bottom: -50px;
  /* Overlaps top-left of image */
  width: 230px;
  /* Match exact width with bride */
  max-width: 85vw;
  flex-shrink: 0;
  z-index: 3;
}

.bride-info {
  align-self: flex-end;
  text-align: right;
  margin-right: -5%;
  /* Drag a bit right */
  margin-top: -50px;
  /* Overlaps bottom-right of image */
  width: 230px;
  /* Match exact width with groom */
  max-width: 85vw;
  flex-shrink: 0;
  z-index: 3;
}

.couple-name {
  font-family: var(--f-heading);
  color: var(--c-accent-dark);
  font-size: 1.15rem;
  /* Reduced to fit the long names perfectly */
  margin-bottom: 0.2rem;
  line-height: 1.1;
}

.couple-divider {
  width: 35px;
  height: 2px;
  background: var(--c-accent);
  margin: 10px 0;
}

.bride-info .couple-divider {
  margin-left: auto;
  /* Aligns line to right */
}

.couple-parents {
  font-size: 0.75rem;
  color: var(--c-text-light);
  line-height: 1.4;
  margin: 0;
}

.couple-portrait-box {
  width: 80%;
  align-self: center;
  position: relative;
  z-index: 1;
  /* Frame aesthetic styling */
  padding: 8px;
  background: linear-gradient(135deg, rgba(255, 253, 240, 1) 0%, rgba(240, 237, 218, 1) 100%);
  border-radius: 28px;
  box-shadow: inset 0 0 0 1px rgba(89, 107, 69, 0.35), 0 25px 45px rgba(0, 0, 0, 0.08);
}

.couple-portrait-box img {
  width: 100%;
  aspect-ratio: 3/5;
  object-fit: cover;
  border-radius: 20px;
  display: block;
}

/* Minimal Architecture Cards */
.minimal-card {
  background: rgba(255, 253, 240, 0.88);
  border: 1px solid rgba(89, 107, 69, 0.18);
  padding: 3rem 1.5rem;
  border-radius: 20px;
  margin-bottom: 1rem;
  box-shadow: 0 10px 30px rgba(63, 78, 48, 0.07);
  text-align: center;
}

/* Elegant Buttons */
.btn-elegant {
  display: inline-block;
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
  color: #fff;
  padding: 0.8rem 2rem;
  font-family: var(--f-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  box-shadow: 0 6px 20px rgba(89, 107, 69, 0.28);
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-elegant:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(63, 78, 48, 0.4);
  color: #fff;
}

.btn-elegant.outline {
  background: transparent;
  color: var(--c-accent-dark);
  border: 1px solid var(--c-accent);
  box-shadow: none;
}

.btn-elegant.outline:hover {
  background: var(--c-accent);
  color: #fff;
  box-shadow: 0 5px 20px rgba(89, 107, 69, 0.25);
}

/* Countdown */
.countdown-box {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.cd-item {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
  color: #fff;
  width: 70px;
  height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(89, 107, 69, 0.22);
}

.cd-number {
  font-family: var(--f-heading);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
}

.cd-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  margin-top: 5px;
  letter-spacing: 1px;
}

/* Forms (Only Ucapan allowed now) */
.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--c-text-main);
  font-weight: 700;
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-family: var(--f-body);
  background: #fff;
  transition: var(--transition);
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(89, 107, 69, 0.15);
}

/* Guestbook Display */
.ucapan-list {
  margin-top: 2.5rem;
  text-align: left;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 10px;
}

.ucapan-list::-webkit-scrollbar {
  width: 6px;
}

.ucapan-list::-webkit-scrollbar-thumb {
  background: var(--c-border);
  border-radius: 10px;
}

.ucapan-item {
  background: #fff;
  padding: 1.2rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  border-left: 4px solid var(--c-accent);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.ucapan-name {
  font-family: var(--f-heading);
  font-weight: 700;
  color: var(--c-accent-dark);
  font-size: 1.2rem;
  margin-bottom: 0.3rem;
}

/* Attendance Icons */
.attendance-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
}

.attendance-icon.attend {
  color: #5a7a4a;
  background: rgba(90, 122, 74, 0.12);
}

.attendance-icon.absent {
  color: #9e5a5a;
  background: rgba(158, 90, 90, 0.12);
}

.attendance-icon.unsure {
  color: #8a7a3a;
  background: rgba(138, 122, 58, 0.12);
}

.ucapan-message {
  font-size: 0.95rem;
  color: var(--c-text-main);
  line-height: 1.5;
}


/* =========================================
   Top Floating Navigation Menu
========================================= */
.floating-nav {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  /* Hidden off-screen above initially */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 253, 240, 0.9);
  /* Semi-transparent cream matching content bg */
  border: 1px solid rgba(89, 107, 69, 0.22);
  /* Soft gold border */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  z-index: 900;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease;
  opacity: 0;
  pointer-events: none;
}

/* Shown class when content is open */
.floating-nav.nav-show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--c-text-light);
  /* Muted brown */
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-item svg {
  transition: transform 0.3s ease;
}

.nav-item:hover,
.nav-item.nav-active {
  background: var(--c-accent-dark);
  /* Dark champagne */
  color: #fff;
  box-shadow: 0 4px 12px rgba(89, 107, 69, 0.28);
}

.nav-item:hover svg,
.nav-item.nav-active svg {
  transform: scale(1.1);
}

/* Desktop tooltips */
@media (hover: hover) and (pointer: fine) {
  .nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    top: auto;
    bottom: -35px;
    /* Spawn below the nav items since the menu is at the top */
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--c-text-main);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-family: var(--f-body);
    letter-spacing: 1px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
  }

  .nav-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Music Toggle Button — icon-only, no background */
#music-toggle-btn {
  background: transparent !important;
  color: var(--c-accent-dark);
  box-shadow: none !important;
}

#music-toggle-btn:hover {
  background: transparent !important;
  color: var(--c-accent);
  box-shadow: none !important;
}

/* Time Ago Label */
.ucapan-time {
  font-size: 0.7rem;
  color: var(--c-text-light);
  opacity: 0.75;
  white-space: nowrap;
  margin-top: 4px;
  font-style: italic;
}

/* Pagination */
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 50%;
  font-family: var(--f-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-text-light);
  background: transparent;
  border: 1px solid var(--c-border);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.page-btn:hover {
  background: var(--c-secondary-bg);
  color: var(--c-accent-dark);
  border-color: var(--c-accent);
}

.page-btn.page-active {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dark));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(89, 107, 69, 0.25);
}

/* =========================================
   SPA Content Transitions
========================================= */
#spa-content {
  transition: opacity 0.2s ease;
}

#spa-content.spa-fade-out {
  opacity: 0;
}

#spa-content.spa-fade-in {
  animation: spaFadeIn 0.3s ease forwards;
}

@keyframes spaFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}