/* ==========================================================================
   THE WEDDING OF DIMAS & MELI - GHIBLI THEMED DIGITAL INVITATION
   Inspired by Howl's Moving Castle & Studio Ghibli Aesthetics
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Marcellus&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Caveat:wght@600;700&family=Amita:wght@700&display=swap');

:root {
  --ghibli-cream: #faf5ec;
  --ghibli-parchment: #f3ebd8;
  --ghibli-parchment-dark: #e8dcc4;
  --ghibli-gold: #c9933e;
  --ghibli-gold-light: #f3d89d;
  --ghibli-gold-dark: #8a5a18;
  --ghibli-navy: #1c2b39;
  --ghibli-navy-light: #2c4257;
  --ghibli-sky: #5b84b1;
  --ghibli-forest: #2c513e;
  --ghibli-rose: #d97d74;
  --calcifer-orange: #ff5e36;
  --calcifer-yellow: #ffc83b;
  --calcifer-glow: rgba(255, 110, 50, 0.45);
  --ghibli-text: #2f2519;
  --ghibli-text-muted: #6c6155;
  --border-frame: rgba(201, 147, 62, 0.4);
  
  --font-display: 'Cinzel Decorative', cursive, serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Caveat', cursive;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sub: 'Marcellus', serif;
}

/* Theme Variations (Controlled by Howl's Magical Knob) */
[data-theme="sunset"] {
  --ghibli-cream: #fff2e6;
  --ghibli-parchment: #fedac2;
  --ghibli-navy: #3b232e;
  --ghibli-sky: #d96b43;
  --ghibli-gold: #e76f51;
}

[data-theme="night"] {
  --ghibli-cream: #141c2b;
  --ghibli-parchment: #1d2738;
  --ghibli-parchment-dark: #26344a;
  --ghibli-navy: #0e1520;
  --ghibli-text: #f0e6d6;
  --ghibli-text-muted: #a9b5c7;
  --ghibli-gold: #f4c05b;
  --border-frame: rgba(244, 192, 91, 0.35);
}

[data-theme="meadow"] {
  --ghibli-cream: #f4f8f3;
  --ghibli-parchment: #e3ede1;
  --ghibli-navy: #1e3a2b;
  --ghibli-sky: #4e8d69;
  --ghibli-gold: #9ea03d;
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--ghibli-cream);
  color: var(--ghibli-text);
  overflow-x: hidden;
  line-height: 1.6;
  position: relative;
  transition: background-color 0.6s ease, color 0.6s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Canvas Particle Layer (Stardust & Sakura Petals) */
#magicCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
}

/* Background Texture & Floating Clouds */
.ghibli-bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  filter: blur(25px);
  opacity: 0.6;
  animation: floatCloud 45s linear infinite;
}

.cloud-1 { width: 450px; height: 180px; top: 8%; left: -200px; animation-duration: 50s; }
.cloud-2 { width: 600px; height: 220px; top: 40%; left: -300px; animation-duration: 70s; animation-delay: -25s; }
.cloud-3 { width: 380px; height: 150px; bottom: 15%; left: -150px; animation-duration: 60s; animation-delay: -10s; }

@keyframes floatCloud {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 600px)); }
}

/* Wrapper / Container */
.app-container {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--ghibli-cream);
  position: relative;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.12);
  z-index: 10;
  overflow: hidden;
  transition: background-color 0.6s ease;
}

@media (min-width: 768px) {
  body {
    background: radial-gradient(circle at 50% 20%, #e2dcd2, #c8bead);
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  .app-container {
    margin: 20px auto;
    border-radius: 28px;
    box-shadow: 0 15px 50px rgba(28, 43, 57, 0.25), 0 0 0 1px rgba(201, 147, 62, 0.2);
    min-height: calc(100vh - 40px);
  }
}

/* ==========================================================================
   COVER / HERO OVERLAY (LOCKED GATE)
   ========================================================================== */
.cover-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--ghibli-cream);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
  overflow-y: auto;
}

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

.cover-container {
  max-width: 500px;
  width: 100%;
  min-height: 100vh;
  padding: 35px 24px 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
  text-align: center;
  background: linear-gradient(180deg, rgba(243, 235, 216, 0.6) 0%, rgba(250, 245, 236, 0.95) 100%);
}

.cover-badge {
  font-family: var(--font-sub);
  font-size: 0.85rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--ghibli-gold-dark);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cover-badge::before, .cover-badge::after {
  content: '';
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--ghibli-gold);
}

.cover-title {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ghibli-navy);
  line-height: 1.2;
  margin-bottom: 15px;
  text-shadow: 0 2px 8px rgba(201, 147, 62, 0.2);
}

.cover-title span {
  font-family: var(--font-script);
  font-size: 2.5rem;
  color: var(--calcifer-orange);
  display: inline-block;
  margin: 0 6px;
}

/* Portrait Frame on Cover */
.cover-portrait-wrapper {
  position: relative;
  width: 250px;
  height: 330px;
  margin: 15px auto;
  border-radius: 125px 125px 24px 24px;
  padding: 8px;
  background: linear-gradient(135deg, var(--ghibli-gold-light), var(--ghibli-gold), var(--ghibli-gold-dark));
  box-shadow: 0 16px 36px rgba(44, 66, 87, 0.22), 0 0 25px rgba(255, 190, 75, 0.35);
  animation: subtleFloat 6s ease-in-out infinite;
}

@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.cover-portrait {
  width: 100%;
  height: 100%;
  border-radius: 118px 118px 18px 18px;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Calcifer mini on cover corner */
.cover-calcifer-badge {
  position: absolute;
  bottom: -15px;
  right: -10px;
  background: #ffffff;
  border: 2px solid var(--calcifer-orange);
  border-radius: 50px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 6px 18px rgba(255, 94, 54, 0.35);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--calcifer-orange);
  animation: pulseCalcifer 2.5s infinite;
}

@keyframes pulseCalcifer {
  0%, 100% { transform: scale(1); box-shadow: 0 6px 18px rgba(255, 94, 54, 0.3); }
  50% { transform: scale(1.05); box-shadow: 0 8px 24px rgba(255, 94, 54, 0.55); }
}

/* Guest Card on Cover */
.guest-card {
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-frame);
  border-radius: 18px;
  padding: 16px 20px;
  margin-top: 15px;
  box-shadow: 0 8px 25px rgba(44, 66, 87, 0.08);
}

.guest-card .recipient-label {
  font-size: 0.8rem;
  color: var(--ghibli-text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.guest-card .guest-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ghibli-navy);
  margin-bottom: 2px;
}

.guest-card .guest-note {
  font-size: 0.75rem;
  color: var(--ghibli-text-muted);
  font-style: italic;
}

/* Open Button */
.btn-open-invitation {
  margin-top: 20px;
  background: linear-gradient(135deg, var(--calcifer-orange), #e84b2c);
  color: #ffffff;
  border: none;
  border-radius: 50px;
  padding: 14px 34px;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 26px rgba(255, 94, 54, 0.45), 0 0 0 3px rgba(255, 200, 59, 0.4);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-open-invitation:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 30px rgba(255, 94, 54, 0.6), 0 0 0 5px rgba(255, 200, 59, 0.6);
}

.btn-open-invitation:active {
  transform: scale(0.97);
}

/* ==========================================================================
   FLOATING MUSIC & NAVIGATION CONTROLS
   ========================================================================== */
.floating-music-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(28, 43, 57, 0.85);
  backdrop-filter: blur(10px);
  color: var(--ghibli-gold-light);
  border: 2px solid var(--ghibli-gold);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

.floating-music-btn.playing {
  animation: spinVinyl 6s linear infinite;
  border-color: var(--calcifer-yellow);
  box-shadow: 0 0 20px rgba(255, 200, 59, 0.5);
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Bottom Nav Bar (Mobile Friendly) */
.bottom-navbar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 460px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-frame);
  border-radius: 40px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 12px;
  z-index: 999;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--ghibli-text-muted);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 12px;
  transition: all 0.25s ease;
}

.bottom-nav-item i {
  font-size: 1.15rem;
  margin-bottom: 2px;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
  color: var(--calcifer-orange);
  transform: translateY(-2px);
}

/* ==========================================================================
   SECTIONS STYLING
   ========================================================================== */
section {
  padding: 60px 20px;
  position: relative;
  z-index: 1;
}

.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 30px 0;
}

.section-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ghibli-gold), transparent);
}

.section-divider i {
  color: var(--ghibli-gold);
  font-size: 1.1rem;
}

.section-subtitle {
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.8rem;
  color: var(--ghibli-gold-dark);
  text-align: center;
  margin-bottom: 6px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--ghibli-navy);
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

/* ==========================================================================
   SKY HERO (blue sky title flowing into the flying couple illustration)
   ========================================================================== */
.sky-hero {
  --sky-progress: 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #4f8fc9 0%, #7fb6de 30%, #a6d0e6 62%, #b9dbea 100%);
  isolation: isolate;
}

.sky-hero-clouds {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
  z-index: 0;
}

.sky-cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: 0.85;
  filter: blur(1px);
  animation: skyCloudDrift 26s ease-in-out infinite alternate;
}

.sky-cloud::before,
.sky-cloud::after {
  content: '';
  position: absolute;
  background: inherit;
  border-radius: 50%;
}

.sky-cloud::before { width: 55%; height: 170%; left: 14%; bottom: 20%; }
.sky-cloud::after  { width: 40%; height: 130%; right: 12%; bottom: 25%; }

.sc-1 { width: 150px; height: 38px; top: 14%; left: -30px; }
.sc-2 { width: 190px; height: 46px; top: 30%; right: -50px; opacity: 0.75; animation-duration: 32s; animation-delay: -8s; }
.sc-3 { width: 120px; height: 30px; top: 58%; left: 12%; opacity: 0.6; animation-duration: 22s; animation-delay: -4s; }

@keyframes skyCloudDrift {
  from { transform: translateX(-18px); }
  to   { transform: translateX(26px); }
}

.sky-hero-title {
  position: relative;
  z-index: 2;
  min-height: 88vh;
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px 18vh;
  color: #fff;
  transform: translateY(calc(var(--sky-progress) * -60px));
  opacity: calc(1 - var(--sky-progress) * 1.1);
  will-change: transform, opacity;
}

.sky-hero-pre {
  font-family: var(--font-sub);
  text-transform: uppercase;
  letter-spacing: 6px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  text-shadow: 0 2px 10px rgba(28, 63, 102, 0.35);
  animation: skyFadeUp 1.2s ease both 0.2s;
}

.sky-hero-names {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 13vw, 3.6rem);
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 4px 22px rgba(28, 63, 102, 0.4);
  animation: skyFadeUp 1.4s ease both 0.45s;
}

.sky-hero-names span {
  display: block;
  font-family: var(--font-script);
  font-size: 0.75em;
  color: #fff4d6;
  margin: 2px 0;
}

.sky-hero-scroll {
  margin-top: 34px;
  font-size: 1rem;
  opacity: 0.85;
  animation: skyBob 2s ease-in-out infinite;
}

/* Hold the title entrance until the guest opens the invitation */
.cover-gate:not(.opened) ~ .app-container .sky-hero-pre,
.cover-gate:not(.opened) ~ .app-container .sky-hero-names {
  animation-play-state: paused;
}

@keyframes skyFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes skyBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(8px); }
}

/* The illustration's sky blends into the hero sky above it */
.sky-hero-art {
  position: relative;
  z-index: 1;
  margin-top: -22vh;
  margin-top: -22svh;
}

.sky-hero-img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 16%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 16%);
  transform: translateY(calc(var(--sky-progress) * -30px)) scale(calc(1 + var(--sky-progress) * 0.03));
  transform-origin: 50% 40%;
  will-change: transform;
}

/* Bottom of the town fades softly into the invitation paper */
.sky-hero-art::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background: linear-gradient(180deg, transparent, var(--ghibli-cream));
  pointer-events: none;
}

.walimah-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 9vw, 2.5rem);
  color: var(--ghibli-navy);
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
  padding: 0 34px;
}

.walimah-title::before,
.walimah-title::after {
  content: '\2726';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--ghibli-gold);
}

.walimah-title::before { left: 0; }
.walimah-title::after  { right: 0; }

@media (prefers-reduced-motion: reduce) {
  .sky-cloud, .sky-hero-pre, .sky-hero-names, .sky-hero-scroll { animation: none; }
  .sky-hero-title, .sky-hero-img { transform: none; opacity: 1; }
}

/* ==========================================================================
   HEADER / INTRO SECTION
   ========================================================================== */
.header-section {
  text-align: center;
  padding-top: 20px;
  padding-bottom: 40px;
}

.bismillah-text {
  font-family: 'Amita', serif;
  font-size: 1.7rem;
  color: var(--ghibli-navy);
  margin-bottom: 18px;
}

.holy-verse-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-frame);
  border-radius: 20px;
  padding: 24px 20px;
  position: relative;
  margin: 20px 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.holy-verse-arabic {
  font-family: 'Amita', serif;
  font-size: 1.15rem;
  line-height: 2;
  color: var(--ghibli-navy);
  margin-bottom: 14px;
  direction: rtl;
}

.holy-verse-trans {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ghibli-text-muted);
  line-height: 1.7;
  margin-bottom: 10px;
}

.holy-verse-ref {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ghibli-gold-dark);
  letter-spacing: 1px;
}

.ghibli-quote-card {
  margin-top: 25px;
  padding: 16px;
  border-left: 3px solid var(--calcifer-orange);
  background: rgba(255, 240, 230, 0.5);
  border-radius: 0 16px 16px 0;
  text-align: left;
}

.ghibli-quote-card p {
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--calcifer-orange);
  line-height: 1.4;
}

.ghibli-quote-card span {
  font-size: 0.75rem;
  color: var(--ghibli-text-muted);
  font-style: italic;
}

/* ==========================================================================
   COUPLE (MEMPELAI) SECTION
   ========================================================================== */
.couple-view-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0 auto 30px;
  background: rgba(243, 235, 216, 0.8);
  border-radius: 40px;
  padding: 4px;
  width: fit-content;
  border: 1px solid var(--border-frame);
}

.btn-toggle-view {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ghibli-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.btn-toggle-view.active {
  background: var(--ghibli-navy);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(28, 43, 57, 0.25);
}

/* Couple Cards */
.couple-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-frame);
  border-radius: 24px;
  padding: 26px 20px;
  text-align: center;
  position: relative;
  margin-bottom: 30px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
}

.couple-card:hover {
  transform: translateY(-4px);
}

.couple-photo-wrapper {
  width: 170px;
  height: 170px;
  margin: 0 auto 18px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--ghibli-gold-light), var(--ghibli-gold), var(--ghibli-gold-dark));
  box-shadow: 0 10px 24px rgba(201, 147, 62, 0.3);
  position: relative;
  overflow: hidden;
}

.couple-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.couple-card .name {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ghibli-navy);
  margin-bottom: 6px;
}

.couple-card .role-title {
  font-family: var(--font-script);
  font-size: 1.25rem;
  color: var(--calcifer-orange);
  margin-bottom: 12px;
}

.couple-card .parents-info {
  font-size: 0.88rem;
  color: var(--ghibli-text-muted);
  line-height: 1.6;
}

.couple-card .parents-names {
  font-weight: 600;
  color: var(--ghibli-text);
}

.couple-separator-heart {
  text-align: center;
  margin: -15px auto 15px;
  position: relative;
  z-index: 2;
}

.couple-separator-heart .badge-ampersand {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 52px;
  height: 52px;
  background: #ffffff;
  border: 2px solid var(--ghibli-gold);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--calcifer-orange);
}

/* ==========================================================================
   COUNTDOWN SECTION
   ========================================================================== */
.countdown-box {
  background: linear-gradient(135deg, rgba(28, 43, 57, 0.95), rgba(44, 66, 87, 0.95));
  border-radius: 28px;
  padding: 30px 20px;
  color: #ffffff;
  text-align: center;
  border: 2px solid var(--ghibli-gold);
  box-shadow: 0 15px 40px rgba(28, 43, 57, 0.35);
  position: relative;
  overflow: hidden;
}

.countdown-box::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255, 200, 59, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 24px 0 20px;
}

.countdown-item {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(243, 216, 157, 0.3);
  border-radius: 16px;
  padding: 12px 6px;
}

.countdown-num {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--calcifer-yellow);
  line-height: 1.1;
  display: block;
}

.countdown-label {
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 4px;
  display: block;
}

.btn-calendar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--ghibli-gold), var(--ghibli-gold-dark));
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 30px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease;
}

.btn-calendar:hover {
  transform: translateY(-2px);
}

/* ==========================================================================
   EVENT (RANGKAIAN ACARA) & VENUE SECTION
   ========================================================================== */
.event-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-frame);
  border-radius: 24px;
  padding: 26px 20px;
  position: relative;
  margin-bottom: 24px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
}

.event-icon-badge {
  width: 50px;
  height: 50px;
  background: var(--ghibli-parchment);
  border: 1.5px solid var(--ghibli-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--calcifer-orange);
  margin: 0 auto 14px;
}

.event-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ghibli-navy);
  text-align: center;
  margin-bottom: 12px;
}

.event-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  color: var(--ghibli-text);
}

.event-detail-item i {
  color: var(--ghibli-gold-dark);
  font-size: 1.05rem;
  margin-top: 3px;
  flex-shrink: 0;
}

/* Venue Map Box */
.venue-map-card {
  background: #ffffff;
  border: 1px solid var(--border-frame);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  margin-top: 24px;
}

.map-container {
  width: 100%;
  height: 220px;
  position: relative;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.venue-info-box {
  padding: 20px;
  text-align: center;
}

.venue-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ghibli-navy);
  margin-bottom: 6px;
}

.venue-address {
  font-size: 0.82rem;
  color: var(--ghibli-text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.btn-gmaps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ghibli-navy);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 30px;
  transition: background 0.3s ease;
}

.btn-gmaps:hover {
  background: var(--ghibli-navy-light);
}

/* ==========================================================================
   LOVE STORY (KISAH CINTA)
   ========================================================================== */
.story-timeline {
  position: relative;
  padding-left: 28px;
  margin: 30px 0;
}

.story-timeline::before {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--ghibli-gold), var(--calcifer-orange), var(--ghibli-gold));
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 20px;
  height: 20px;
  background: var(--ghibli-cream);
  border: 2px solid var(--calcifer-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--calcifer-orange);
  border-radius: 50%;
}

.timeline-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-frame);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--calcifer-orange);
  letter-spacing: 1px;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ghibli-navy);
  margin: 4px 0 6px;
}

.timeline-desc {
  font-size: 0.82rem;
  color: var(--ghibli-text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   INTERACTIVE CALCIFER CORNER & HOWL'S KNOB
   ========================================================================== */
.interactive-calcifer-box {
  background: radial-gradient(circle at 50% 30%, #fff0e3, #ffd8be);
  border: 2px solid var(--calcifer-orange);
  border-radius: 24px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  margin: 30px 0;
  box-shadow: 0 10px 30px rgba(255, 94, 54, 0.2);
}

.calcifer-character-svg {
  width: 85px;
  height: 95px;
  margin: 0 auto 12px;
  cursor: pointer;
  filter: drop-shadow(0 6px 16px rgba(255, 94, 54, 0.45));
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.calcifer-character-svg:hover {
  transform: scale(1.1) rotate(4deg);
}

.calcifer-character-svg:active {
  transform: scale(0.95);
}

.calcifer-speech-bubble {
  background: #ffffff;
  border: 1.5px solid var(--calcifer-orange);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--ghibli-text);
  font-style: italic;
  position: relative;
  display: inline-block;
  margin-top: 10px;
  max-width: 90%;
  box-shadow: 0 4px 14px rgba(255, 94, 54, 0.15);
}

.calcifer-speech-bubble::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent var(--calcifer-orange) transparent;
}

/* Howl's Magical 4-Color Theme Knob */
.howl-knob-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.howl-knob-dial {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--ghibli-gold);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dial-green { background: #4e8d69; }
.dial-blue { background: #3c6e91; }
.dial-red { background: #d9534f; }
.dial-black { background: #1c232f; }

.howl-knob-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ghibli-text-muted);
  margin-top: 8px;
}

/* Susuwatari (Soot Sprites) */
.soot-sprite {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: #111111;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  animation: sootJiggle 3s infinite;
}

.soot-sprite::before, .soot-sprite::after {
  content: '';
  position: absolute;
  width: 9px;
  height: 9px;
  background: #ffffff;
  border-radius: 50%;
  top: 9px;
}
.soot-sprite::before { left: 5px; }
.soot-sprite::after { right: 5px; }

.soot-pupil-l, .soot-pupil-r {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #000;
  border-radius: 50%;
  top: 11px;
}
.soot-pupil-l { left: 8px; }
.soot-pupil-r { right: 8px; }

@keyframes sootJiggle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.08) rotate(-4deg); }
  75% { transform: scale(0.96) rotate(4deg); }
}

/* ==========================================================================
   RSVP & WISHES SECTION
   ========================================================================== */
.rsvp-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-frame);
  border-radius: 24px;
  padding: 26px 20px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ghibli-navy);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(201, 147, 62, 0.35);
  background: var(--ghibli-cream);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--ghibli-text);
  outline: none;
  transition: all 0.25s ease;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--calcifer-orange);
  box-shadow: 0 0 0 3px rgba(255, 94, 54, 0.2);
  background: #ffffff;
}

.btn-submit-rsvp {
  width: 100%;
  background: linear-gradient(135deg, var(--calcifer-orange), #e84b2c);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(255, 94, 54, 0.35);
  transition: transform 0.25s ease;
}

.btn-submit-rsvp:hover {
  transform: translateY(-2px);
}

/* Wishes Wall */
.wishes-wall-container {
  margin-top: 30px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.wishes-wall-container::-webkit-scrollbar {
  width: 5px;
}
.wishes-wall-container::-webkit-scrollbar-thumb {
  background: var(--ghibli-gold);
  border-radius: 10px;
}

.wish-item {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--border-frame);
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
  animation: fadeInWish 0.5s ease;
}

@keyframes fadeInWish {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.wish-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.wish-author {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ghibli-navy);
}

.wish-status-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
}

.badge-hadir {
  background: rgba(46, 125, 50, 0.15);
  color: #2e7d32;
}

.badge-tidak-hadir {
  background: rgba(198, 40, 40, 0.15);
  color: #c62828;
}

.badge-ragu {
  background: rgba(239, 108, 0, 0.15);
  color: #ef6c00;
}

.wish-message {
  font-size: 0.82rem;
  color: var(--ghibli-text);
  line-height: 1.5;
}

.wish-time {
  font-size: 0.68rem;
  color: var(--ghibli-text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   DIGITAL GIFT / WEDDING GIFT SECTION
   ========================================================================== */
.gift-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(243, 235, 216, 0.8));
  border: 1px solid var(--border-frame);
  border-radius: 24px;
  padding: 24px 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  position: relative;
  text-align: center;
}

.bank-logo-badge {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #005a9c;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.bank-logo-mandiri {
  color: #003366;
}

.bank-number {
  font-family: 'Courier New', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ghibli-navy);
  letter-spacing: 2px;
  margin: 8px 0;
}

.bank-holder {
  font-size: 0.85rem;
  color: var(--ghibli-text-muted);
  margin-bottom: 14px;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ghibli-navy);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-copy:hover {
  background: var(--calcifer-orange);
  transform: translateY(-2px);
}

/* QRIS Modal / Toggle */
.btn-qris-toggle {
  background: transparent;
  border: 1.5px dashed var(--ghibli-gold);
  border-radius: 16px;
  padding: 12px;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ghibli-navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.qris-container {
  display: none;
  padding: 16px;
  text-align: center;
  animation: fadeInWish 0.4s ease;
}

.qris-container.active {
  display: block;
}

.qris-img {
  max-width: 200px;
  border-radius: 16px;
  border: 2px solid var(--ghibli-gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

/* ==========================================================================
   CLOSING & FOOTER
   ========================================================================== */
.closing-section {
  text-align: center;
  padding-bottom: 100px; /* space for bottom nav */
}

.closing-text {
  font-size: 0.88rem;
  color: var(--ghibli-text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.closing-signature {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--ghibli-navy);
  font-weight: 700;
}

.closing-family {
  font-size: 0.82rem;
  color: var(--ghibli-gold-dark);
  margin-top: 6px;
}

.footer-credit {
  margin-top: 35px;
  font-size: 0.72rem;
  color: var(--ghibli-text-muted);
}

.footer-credit i {
  color: var(--calcifer-orange);
}

/* ==========================================================================
   TOAST NOTIFICATION
   ========================================================================== */
.toast-msg {
  position: fixed;
  bottom: 85px;
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  background: rgba(28, 43, 57, 0.95);
  color: #ffffff;
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 2000;
}

.toast-msg.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   COUPLE SECTION - FADE IN / FADE OUT ANIMATIONS
   ========================================================================== */

/* Photo cross-fade when switching Ghibli / real mode */
.couple-photo {
  transition: opacity 0.45s ease, filter 0.45s ease, scale 0.45s ease;
}

.couple-photo.is-fading {
  opacity: 0;
  filter: blur(4px);
  scale: 0.94;
}

/* Scroll reveal: elements fade in when entering the screen and out when leaving.
   Only hidden once JS is ready, so content stays visible if scripts fail. */
.fade-ready .fade-reveal {
  opacity: 0;
  translate: 0 40px;
  transition: opacity 0.9s ease, translate 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              scale 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.3s ease;
}

.fade-ready .fade-reveal.fade-from-left { translate: -50px 20px; }
.fade-ready .fade-reveal.fade-from-right { translate: 50px 20px; }
.fade-ready .fade-reveal.fade-zoom { translate: 0 0; scale: 0.4; }

.fade-ready .fade-reveal.is-visible {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

/* Photo frame gently fades in slightly after its card */
.fade-ready .fade-reveal .couple-photo-wrapper {
  opacity: 0;
  scale: 0.85;
  transition: opacity 0.8s ease 0.25s, scale 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
}

.fade-ready .fade-reveal.is-visible .couple-photo-wrapper {
  opacity: 1;
  scale: 1;
}

/* Soft glowing halo pulse around the photo frames */
.couple-card .couple-photo-wrapper {
  animation: couplePhotoGlow 3.2s ease-in-out infinite;
}

@keyframes couplePhotoGlow {
  0%, 100% { box-shadow: 0 10px 24px rgba(201, 147, 62, 0.3); }
  50% { box-shadow: 0 10px 34px rgba(255, 170, 60, 0.6), 0 0 0 6px rgba(255, 200, 120, 0.18); }
}

@media (prefers-reduced-motion: reduce) {
  .fade-ready .fade-reveal,
  .fade-ready .fade-reveal .couple-photo-wrapper {
    opacity: 1;
    translate: 0 0;
    scale: 1;
    transition: none;
  }
  .couple-card .couple-photo-wrapper { animation: none; }
}

/* ==========================================================================
   COUPLE SECTION - FULL BODY PORTRAIT CARDS
   ========================================================================== */
.couple-card {
  padding: 0;
  overflow: hidden;
  border-radius: 28px;
  border: 3px solid var(--ghibli-gold-light);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
  background: var(--ghibli-navy);
}

.couple-card .couple-photo-wrapper {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  max-height: 82vh;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  animation: none;
}

.couple-card .couple-photo {
  border-radius: 0;
  display: block;
}

/* Caption sits over the lower part of the photo, on a blurred fade */
.couple-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 90px 20px 26px;
  text-align: center;
  z-index: 2;
}

.couple-caption::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom,
    rgba(20, 28, 48, 0) 0%,
    rgba(20, 28, 48, 0.45) 35%,
    rgba(20, 28, 48, 0.82) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* Blur fades in softly from top to bottom instead of a hard edge */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 45%);
}

.couple-card .couple-caption .name {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.couple-card .couple-caption .role-title {
  color: var(--calcifer-yellow, #ffc857);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.couple-card .couple-caption .parents-info {
  color: rgba(255, 255, 255, 0.85);
}

.couple-card .couple-caption .parents-names {
  color: #fff;
}

/* Caption text fades and un-blurs in after the card appears */
.fade-ready .fade-reveal .couple-caption > * {
  opacity: 0;
  filter: blur(6px);
  translate: 0 14px;
  transition: opacity 0.8s ease, filter 0.8s ease, translate 0.8s ease;
}
.fade-ready .fade-reveal.is-visible .couple-caption > * { opacity: 1; filter: blur(0); translate: 0 0; }
.fade-ready .fade-reveal.is-visible .couple-caption > :nth-child(1) { transition-delay: 0.45s; }
.fade-ready .fade-reveal.is-visible .couple-caption > :nth-child(2) { transition-delay: 0.6s; }
.fade-ready .fade-reveal.is-visible .couple-caption > :nth-child(3) { transition-delay: 0.75s; }

/* Photo fades in (no shrinking now that it fills the card) */
.fade-ready .fade-reveal .couple-photo-wrapper { scale: 1.06; }

/* Keep the "&" badge overlapping the gap between the two cards */
.couple-separator-heart { margin: -18px auto 12px; }

@media (prefers-reduced-motion: reduce) {
  .fade-ready .fade-reveal .couple-caption > *,
  .fade-ready .fade-reveal .couple-photo-wrapper {
    opacity: 1; filter: none; translate: 0 0; scale: 1; transition: none;
  }
}
