/* ==========================================================================
   Reza & Azka — Blue Floral Wedding Theme
   Inspired by elegant mobile-first wedding invitation layout
   ========================================================================== */

:root {
  --dusty: #5b7a8c;
  --dusty-dark: #4a6375;
  --dusty-light: #e8eef2;
  --floral-bg: #f4f7fc;
  --white: #ffffff;
  --text-dark: #3d4f5c;
  --text-muted: #7a8f9e;
  --rose-blue: #6b8fa8;
  --gold: #b89947;
  --gold-light: #d4bc7a;
  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans: "Montserrat", system-ui, sans-serif;
  --max-w: 430px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --bg-floral-image: url("../assets/background.png");
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  background-color: var(--white);
  color: var(--text-dark);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--white);
  background-image: var(--bg-floral-image);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  pointer-events: none;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  margin: 0 auto;
}

.content-wrapper {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Floral Background (assets/background.png via body::before) ─── */
.section-floral,
.cover-section {
  background: transparent;
}

.section-blue {
  background: linear-gradient(165deg, #4a6375 0%, var(--dusty) 45%, #6b8fa8 100%);
  color: var(--white);
  padding: 3.5rem 0;
  position: relative;
  overflow: hidden;
}

.section-blue::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.section-blue > .content-wrapper {
  position: relative;
  z-index: 1;
}

/* ─── Language Toggle ─────────────────────────────────────────────── */
.lang-toggle {
  position: fixed;
  top: 0.875rem;
  right: 0.875rem;
  z-index: 200;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(91, 122, 140, 0.2);
  border-radius: 9999px;
  padding: 0.15rem;
}

.lang-toggle button {
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.65rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 9999px;
  transition: all 0.3s var(--ease);
}

.lang-toggle button.lang-active {
  background: var(--dusty);
  color: var(--white);
}

.lang-divider {
  width: 1px;
  height: 0.75rem;
  background: rgba(91, 122, 140, 0.25);
}

/* ─── Music Toggle (Fixed Top Left) ───────────────────────────────── */
.music-toggle {
  position: fixed;
  top: 0.875rem;
  left: 0.875rem;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(91, 122, 140, 0.2);
  border-radius: 50%;
  color: var(--dusty);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.15s;
}

.music-toggle[hidden] {
  display: none;
}

.music-toggle:hover {
  background: var(--dusty);
  color: var(--white);
}

.music-toggle:active {
  transform: scale(0.95);
}

.music-toggle.is-playing {
  background: var(--dusty);
  color: var(--white);
}

.music-icon {
  display: block;
}

.music-toggle.is-playing .music-icon-off {
  display: none;
}

.music-toggle:not(.is-playing) .music-icon-on {
  display: none;
}

/* ─── Bottom Navigation ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%) translateY(1.5rem);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(184, 153, 71, 0.28);
  box-shadow:
    0 8px 30px rgba(74, 99, 117, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-premium), transform 0.5s var(--ease-premium);
}

.bottom-nav.nav-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.bottom-nav[hidden] { display: none; }

body.invitation-opened #main-content {
  padding-bottom: 4.5rem;
}

.bottom-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--dusty);
  cursor: pointer;
  transition: background 0.35s var(--ease-premium), color 0.35s var(--ease-premium), transform 0.2s;
}

.bottom-nav-btn svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.bottom-nav-btn:hover {
  color: var(--dusty-dark);
  transform: translateY(-2px);
}

.bottom-nav-btn:active {
  transform: scale(0.92);
}

.bottom-nav-btn.nav-active {
  background: linear-gradient(160deg, var(--dusty) 0%, var(--dusty-dark) 100%);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(74, 99, 117, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .bottom-nav,
  .bottom-nav-btn { transition: none; }
}

/* ─── Arch Frame (Hero + Cards) ───────────────────────────────────── */
.arch-frame {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid rgba(91, 122, 140, 0.35);
  border-radius: 9999px 9999px 1rem 1rem;
  overflow: hidden;
}

.arch-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(91, 122, 140, 0.12);
  border-radius: 9999px 9999px 1.25rem 1.25rem;
  padding: 2rem 1.5rem 2.5rem;
  margin-top: 1rem;
}

/* ─── Cover / Hero ────────────────────────────────────────────────── */
#cover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  transition:
    opacity 1.1s var(--ease-out-expo),
    transform 1.1s var(--ease-out-expo),
    filter 1s var(--ease-out-expo);
}

#cover.cover-exiting {
  opacity: 0;
  transform: scale(1.04) translateY(-4%);
  filter: blur(6px);
  pointer-events: none;
}

#cover.cover-hidden { display: none; }

.cover-frame {
  width: 100%;
  max-width: 340px;
  position: relative;
}

.cover-vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 45%, transparent 30%, rgba(74, 99, 117, 0.06) 100%);
  pointer-events: none;
  z-index: 99;
}

.cover-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    transparent 35%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 65%
  );
  opacity: 0;
  animation: coverShine 4s var(--ease-premium) 1.2s infinite;
  pointer-events: none;
}

@keyframes coverShine {
  0%, 70%, 100% { opacity: 0; transform: translateX(-30%); }
  85% { opacity: 0.6; transform: translateX(30%); }
}

/* Cover staggered entrance */
.cover-anim {
  opacity: 0;
  transform: translateY(18px);
  animation: coverReveal 0.9s var(--ease-out-expo) forwards;
}

.cover-anim-1 { animation-delay: 0.15s; }
.cover-anim-2 { animation-delay: 0.3s; }
.cover-anim-3 { animation-delay: 0.45s; }
.cover-anim-4 { animation-delay: 0.6s; }
.cover-anim-5 { animation-delay: 0.8s; }

@keyframes coverReveal {
  to { opacity: 1; transform: translateY(0); }
}

.cover-amp {
  font-weight: 400;
  color: var(--gold);
  display: inline-block;
  animation: ampPulse 3s ease-in-out 1.5s infinite;
}

@keyframes ampPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.85; }
}

.cover-frame-inner {
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}

.cover-label {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dusty);
  margin: 0 0 0.75rem;
}

.cover-names {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 9vw, 2.75rem);
  font-weight: 600;
  color: var(--dusty-dark);
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

.cover-names span {
  font-weight: 400;
  color: var(--dusty);
}

.cover-names .cover-amp {
  color: var(--gold);
}

.cover-date {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.guest-box {
  margin: 0 auto 1.5rem;
  max-width: 16rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(184, 153, 71, 0.25);
  border-bottom: 1px solid rgba(184, 153, 71, 0.25);
}

.guest-prefix {
  font-size: 0.625rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}

.guest-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--dusty-dark);
  margin: 0;
}

.couple-illustration {
  max-width: 260px;
  margin: 0 auto 1.5rem;
  animation: portraitFloat 6s ease-in-out infinite;
}

.couple-photo {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* ─── Buttons ─────────────────────────────────────────────────────── */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.8rem 2rem;
  background: var(--dusty-dark);
  color: var(--white);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  transition: background 0.35s var(--ease-premium), transform 0.2s, box-shadow 0.35s;
  position: relative;
  overflow: hidden;
}

.btn-premium {
  box-shadow: 0 4px 20px rgba(74, 99, 117, 0.35);
}

.btn-premium::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease-premium);
}

.btn-premium:hover::after {
  transform: translateX(100%);
}

.btn-pill:hover {
  background: var(--dusty);
  box-shadow: 0 6px 24px rgba(74, 99, 117, 0.4);
}
.btn-pill:active { transform: scale(0.97); }

.btn-pill-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: var(--font-sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.65rem 1.5rem;
  background: transparent;
  color: var(--dusty);
  border: 1.5px solid var(--dusty);
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.btn-pill-outline:hover {
  background: var(--dusty);
  color: var(--white);
}

.btn-pill-light {
  background: var(--white);
  color: var(--dusty);
  width: 100%;
}

.btn-pill-light:hover {
  background: var(--dusty-light);
}

.btn-pill.is-loading,
.btn-pill:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.btn-pill.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-pill.is-loading::after {
  display: none;
}

.btn-spinner {
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: btnSpin 0.7s linear infinite;
}

@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}

.btn-copy {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  background: var(--dusty);
  color: var(--white);
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-copy:hover { background: var(--dusty-dark); }
.btn-copy.copied { background: #4a8a6a; }

/* ─── Main Content ────────────────────────────────────────────────── */
#main-content {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s var(--ease-out-expo) 0.2s, transform 0.8s var(--ease-out-expo) 0.2s;
}

#main-content.main-visible {
  opacity: 1;
  transform: translateY(0);
}
#main-content[hidden] { display: none; }

/* ─── Quote Section ───────────────────────────────────────────────── */
.quote-section {
  padding: 3.5rem 0;
  text-align: center;
}

.monogram {
  font-family: var(--font-serif);
  font-size: 2.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
  animation: monogramGlow 4s ease-in-out infinite;
}

@keyframes monogramGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(255, 255, 255, 0.2); }
  50% { text-shadow: 0 0 35px rgba(255, 255, 255, 0.45); }
}

.ornament-line {
  width: 4rem;
  height: 1px;
  margin: 0 auto 1.75rem;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
}

.ornament-line--dark {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.6;
}

.section-heading-premium {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.15rem;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 auto 1rem;
  max-width: 22rem;
  border: none;
  padding: 0;
}

.quote-source {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  font-style: normal;
}

/* ─── Couple Section ──────────────────────────────────────────────── */
.couple-section {
  padding: 2.5rem 0 3rem;
}

.opening-text {
  font-size: 0.78rem;
  line-height: 1.85;
  color: var(--text-dark);
  text-align: center;
  margin: 0 auto 0.75rem;
  max-width: 22rem;
}

.profile-block { padding: 1rem 0; text-align: center; }

.profile-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--dusty-dark);
  margin: 0 0 0.35rem;
}

.profile-parents {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.profile-divider {
  display: block;
  width: 100%;
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--gold);
  opacity: 0.75;
  padding: 0.25rem 0;
  text-align: center;
  margin: 0 auto;
}

/* ─── Section Headings ────────────────────────────────────────────── */
.section-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dusty-dark);
  text-align: center;
  margin: 0 0 1.5rem;
}

.section-heading-white {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  text-align: center;
  margin: 0 0 1.5rem;
}

/* ─── Countdown ───────────────────────────────────────────────────── */
.countdown-section { padding: 3rem 0; }

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  max-width: 22rem;
  margin: 0 auto;
}

.countdown-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0.85rem;
  padding: 0.85rem 0.25rem;
  min-height: 4.75rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease-premium), box-shadow 0.3s;
}

.countdown-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.countdown-num {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  display: inline-block;
  transition: transform 0.35s var(--ease-out-expo), opacity 0.35s;
}

.countdown-num.tick {
  animation: countdownTick 0.45s var(--ease-out-expo);
}

@keyframes countdownTick {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  40% { transform: translateY(-6px) scale(1.08); opacity: 0.7; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.countdown-label {
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.35rem;
}

/* ─── Event Card ──────────────────────────────────────────────────── */
.event-section { padding: 3rem 0; }

.event-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 22rem;
  margin: 0 auto;
}

.event-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(91, 122, 140, 0.1);
  border-radius: 1.1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  margin: 0;
  transition: transform 0.4s var(--ease-premium), box-shadow 0.4s;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(91, 122, 140, 0.12);
}

.event-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
}

.event-icon svg { width: 100%; height: 100%; }

.event-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dusty-dark);
  margin: 0 0 0.75rem;
}

.event-date {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--dusty);
  margin: 0 0 0.25rem;
}

.event-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dusty-dark);
  margin: 0 0 1rem;
}

.event-venue {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dusty-dark);
  margin: 0 0 0.35rem;
}

.event-address {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 1.25rem;
}

.event-address:has(+ .event-note:not([hidden])) {
  margin-bottom: 0.5rem;
}

.event-note {
  font-size: 0.72rem;
  font-weight: 600;
  font-style: italic;
  color: var(--dusty-dark);
  line-height: 1.5;
  margin: 0 0 1.25rem;
}

.event-note[hidden] {
  display: none;
}

/* ─── Love Story Timeline ─────────────────────────────────────────── */
.story-section { padding: 2.5rem 0 3rem; }

.story-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.story-header .section-heading { margin: 0; }

.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: rgba(91, 122, 140, 0.25);
}

.timeline-item {
  position: relative;
  background: var(--dusty-light);
  border-radius: 0.75rem;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  text-align: left;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.35rem;
  top: 1.1rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dusty);
  border: 2px solid var(--white);
}

.timeline-date {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dusty);
  margin-bottom: 0.2rem;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dusty-dark);
  margin: 0 0 0.25rem;
}

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

/* ─── Gift Section ────────────────────────────────────────────────── */
.gift-section { padding: 3rem 0; }

.gift-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gift-header .section-heading-white { margin: 0; }

.gift-desc {
  font-size: 0.75rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  max-width: 22rem;
  margin: 0 auto 1.25rem;
}

/* ─── Gift Accordion ──────────────────────────────────────────────── */
.gift-accordion {
  max-width: 22rem;
  margin: 0 auto;
}

.gift-accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.85rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.35s var(--ease-premium),
    border-color 0.35s var(--ease-premium),
    box-shadow 0.35s var(--ease-premium),
    transform 0.2s;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}

.gift-accordion-trigger:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(212, 188, 122, 0.55);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
}

.gift-accordion-trigger:active {
  transform: scale(0.98);
}

.gift-accordion.is-open .gift-accordion-trigger {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(212, 188, 122, 0.65);
}

.gift-accordion-icon,
.gift-accordion-chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gift-accordion-label {
  flex: 1;
  text-align: center;
}

.gift-accordion-chevron {
  transition: transform 0.45s var(--ease-premium);
}

.gift-accordion.is-open .gift-accordion-chevron {
  transform: rotate(180deg);
}

.gift-accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease-out-expo);
}

.gift-accordion.is-open .gift-accordion-panel {
  grid-template-rows: 1fr;
}

.gift-accordion-inner {
  overflow: hidden;
  min-height: 0;
}

.gift-accordion-inner .bank-cards {
  padding-top: 1.1rem;
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.45s var(--ease-premium) 0.08s,
    transform 0.45s var(--ease-premium) 0.08s;
}

.gift-accordion.is-open .gift-accordion-inner .bank-cards {
  opacity: 1;
  transform: translateY(0);
}

.gift-accordion.is-open .bank-card {
  animation: giftCardIn 0.5s var(--ease-out-expo) both;
}

.gift-accordion.is-open .bank-card:nth-child(1) { animation-delay: 0.12s; }
.gift-accordion.is-open .bank-card:nth-child(2) { animation-delay: 0.22s; }
.gift-accordion.is-open .bank-card:nth-child(3) { animation-delay: 0.32s; }

@keyframes giftCardIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .gift-accordion-panel,
  .gift-accordion-chevron,
  .gift-accordion-inner .bank-cards,
  .gift-accordion.is-open .bank-card {
    transition: none;
    animation: none;
  }
}

.bank-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.bank-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--white);
  border-radius: 0.85rem;
  padding: 0.875rem 1rem;
  transition: transform 0.35s var(--ease-premium), box-shadow 0.35s;
}

.bank-card:hover {
  transform: translateX(3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.bank-info { text-align: left; flex: 1; min-width: 0; }

.bank-name {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--dusty);
  margin-bottom: 0.15rem;
}

.bank-holder {
  font-size: 0.7rem;
  color: var(--text-dark);
  margin-bottom: 0.1rem;
}

.bank-number {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dusty-dark);
  letter-spacing: 0.05em;
}

.address-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--white);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
}

.address-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--dusty);
  margin-bottom: 0.15rem;
}

.address-value {
  font-size: 0.7rem;
  color: var(--text-dark);
  line-height: 1.5;
}

/* ─── Wishes Form ─────────────────────────────────────────────────── */
.wishes-section { padding: 3rem 0; }

.wishes-form {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1.1rem;
  padding: 1.5rem;
  max-width: 22rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dusty);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--text-dark);
  background: var(--floral-bg);
  border: 1px solid rgba(91, 122, 140, 0.15);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--dusty);
}

.form-group textarea { resize: vertical; min-height: 5rem; }

.wish-success {
  font-size: 0.75rem;
  color: #4a8a6a;
  text-align: center;
  margin-top: 0.75rem;
}

.wish-error {
  font-size: 0.75rem;
  color: #b85c5c;
  text-align: center;
  margin-top: 0.75rem;
}

.wish-error[hidden],
.wish-success[hidden] {
  display: none;
}

.wish-meta {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  margin: 0;
}

.wish-meta-error {
  color: #ffc9c9;
}

.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 22rem;
  margin: 0 auto;
}

.wishes-list.is-scrollable {
  max-height: 22rem;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.25rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.wishes-list.is-scrollable.has-more {
  mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
}

.wishes-list.is-scrollable::-webkit-scrollbar {
  width: 4px;
}

.wishes-list.is-scrollable::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.wishes-load-more {
  display: block;
  width: fit-content;
  max-width: 22rem;
  margin: 0.85rem auto 0;
  padding: 0.55rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s var(--ease), transform 0.15s;
}

.wishes-load-more:hover {
  background: rgba(255, 255, 255, 0.22);
}

.wishes-load-more:active {
  transform: scale(0.97);
}

.wish-item {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: left;
}

.wish-item-name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.15rem;
}

.wish-item-status {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.5rem;
}

.wish-item-msg {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin: 0;
}

/* ─── Closing ─────────────────────────────────────────────────────── */
.closing-section {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.closing-illustration {
  width: 110px;
  height: 110px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(184, 153, 71, 0.35);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 28px rgba(91, 122, 140, 0.15);
  animation: portraitFloat 5s ease-in-out infinite;
}

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

.closing-couple-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.closing-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--dusty-dark);
  margin: 0 0 0.5rem;
}

.closing-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 20rem;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}

.families-list { margin-bottom: 1.5rem; }

.family-card { margin-bottom: 0.75rem; }

.family-side {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dusty);
  margin-bottom: 0.2rem;
}

.family-names {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--dusty-dark);
}

.closing-names {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--dusty-dark);
  margin: 1rem 0 0.5rem;
}

.closing-credit {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding-bottom: 1rem;
}

/* ─── Floating Animation ──────────────────────────────────────────── */
.floral-float {
  animation: floatSlow 7s ease-in-out infinite;
}

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

/* ─── Premium Glass & Ambient ─────────────────────────────────────── */
.premium-glass {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 4px 24px rgba(91, 122, 140, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.arch-frame.premium-glass {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(184, 153, 71, 0.2);
  box-shadow:
    0 8px 40px rgba(91, 122, 140, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

/* ─── Falling Leaves & Petals ───────────────────────────────────── */
.fall-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.fall-particle {
  position: absolute;
  top: -8vh;
  opacity: 0;
  will-change: transform, opacity;
}

/* Daun — bentuk organik dengan clip-path */
.fall-leaf {
  width: 14px;
  height: 20px;
  clip-path: ellipse(45% 48% at 50% 50%);
  border-radius: 0 70% 0 70%;
  animation: leafFall linear infinite;
}

.fall-leaf--1 {
  left: 6%;
  background: linear-gradient(145deg, rgba(91, 122, 140, 0.55), rgba(74, 99, 117, 0.35));
  animation-duration: 14s;
  animation-delay: 0s;
  --sway: 42px;
}

.fall-leaf--2 {
  left: 18%;
  width: 11px;
  height: 16px;
  background: linear-gradient(145deg, rgba(107, 143, 168, 0.5), rgba(91, 122, 140, 0.3));
  animation-duration: 18s;
  animation-delay: 3s;
  --sway: -36px;
}

.fall-leaf--3 {
  left: 32%;
  width: 16px;
  height: 22px;
  background: linear-gradient(145deg, rgba(184, 153, 71, 0.45), rgba(212, 188, 122, 0.25));
  animation-duration: 16s;
  animation-delay: 7s;
  --sway: 50px;
}

.fall-leaf--4 {
  left: 48%;
  width: 12px;
  height: 18px;
  background: linear-gradient(145deg, rgba(230, 200, 193, 0.55), rgba(214, 175, 165, 0.3));
  animation-duration: 20s;
  animation-delay: 1s;
  --sway: -44px;
}

.fall-leaf--5 {
  left: 62%;
  width: 13px;
  height: 19px;
  background: linear-gradient(145deg, rgba(91, 122, 140, 0.5), rgba(107, 143, 168, 0.28));
  animation-duration: 15s;
  animation-delay: 5s;
  --sway: 38px;
}

.fall-leaf--6 {
  left: 82%;
  width: 10px;
  height: 15px;
  background: linear-gradient(145deg, rgba(184, 153, 71, 0.4), rgba(184, 153, 71, 0.2));
  animation-duration: 19s;
  animation-delay: 9s;
  --sway: -32px;
}

/* Kelopak bunga kecil */
.fall-petal {
  width: 9px;
  height: 13px;
  background: radial-gradient(ellipse at 30% 30%, rgba(230, 200, 193, 0.65), rgba(214, 175, 165, 0.2));
  border-radius: 50% 50% 50% 0;
  animation: petalFall linear infinite;
}

.fall-petal--1 {
  left: 12%;
  animation-duration: 12s;
  animation-delay: 2s;
  --sway: -28px;
}

.fall-petal--2 {
  left: 28%;
  width: 7px;
  height: 10px;
  background: radial-gradient(ellipse at 30% 30%, rgba(107, 143, 168, 0.5), rgba(91, 122, 140, 0.15));
  animation-duration: 16s;
  animation-delay: 6s;
  --sway: 34px;
}

.fall-petal--3 {
  left: 44%;
  width: 8px;
  height: 11px;
  animation-duration: 13s;
  animation-delay: 4s;
  --sway: -30px;
}

.fall-petal--4 {
  left: 58%;
  width: 6px;
  height: 9px;
  background: radial-gradient(ellipse at 30% 30%, rgba(212, 188, 122, 0.55), rgba(184, 153, 71, 0.2));
  animation-duration: 17s;
  animation-delay: 8s;
  --sway: 26px;
}

.fall-petal--5 {
  left: 72%;
  animation-duration: 14s;
  animation-delay: 0.5s;
  --sway: -36px;
}

.fall-petal--6 {
  left: 90%;
  width: 7px;
  height: 10px;
  background: radial-gradient(ellipse at 30% 30%, rgba(230, 200, 193, 0.5), transparent);
  animation-duration: 15s;
  animation-delay: 11s;
  --sway: 30px;
}

/* Kilau halus */
.fall-sparkle {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, rgba(212, 188, 122, 0.4) 60%, transparent 100%);
  animation: sparkleFall linear infinite;
}

.fall-sparkle--1 {
  left: 22%;
  animation-duration: 10s;
  animation-delay: 1.5s;
  --sway: 20px;
}

.fall-sparkle--2 {
  left: 40%;
  width: 3px;
  height: 3px;
  animation-duration: 11s;
  animation-delay: 5.5s;
  --sway: -18px;
}

.fall-sparkle--3 {
  left: 66%;
  animation-duration: 9s;
  animation-delay: 3.5s;
  --sway: 22px;
}

.fall-sparkle--4 {
  left: 86%;
  width: 3px;
  height: 3px;
  animation-duration: 12s;
  animation-delay: 7.5s;
  --sway: -16px;
}

@keyframes leafFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -5vh, 0) rotate(0deg) scale(0.8);
  }
  8% { opacity: 0.75; }
  25% { transform: translate3d(calc(var(--sway) * 0.4), 25vh, 0) rotate(90deg) scale(1); }
  50% { transform: translate3d(calc(var(--sway) * -0.3), 50vh, 0) rotate(200deg) scale(0.95); }
  75% { transform: translate3d(calc(var(--sway) * 0.6), 75vh, 0) rotate(300deg) scale(1); }
  92% { opacity: 0.4; }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--sway) * 0.2), 108vh, 0) rotate(420deg) scale(0.85);
  }
}

@keyframes petalFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -5vh, 0) rotate(0deg);
  }
  10% { opacity: 0.65; }
  30% { transform: translate3d(calc(var(--sway) * 0.5), 30vh, 0) rotate(120deg); }
  60% { transform: translate3d(calc(var(--sway) * -0.4), 60vh, 0) rotate(260deg); }
  90% { opacity: 0.35; }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--sway) * 0.3), 108vh, 0) rotate(380deg);
  }
}

@keyframes sparkleFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -5vh, 0) scale(0.5);
  }
  15% { opacity: 0.9; }
  50% {
    opacity: 0.6;
    transform: translate3d(calc(var(--sway) * 0.5), 50vh, 0) scale(1.2);
  }
  85% { opacity: 0.3; }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--sway) * 0.2), 108vh, 0) scale(0.6);
  }
}

body.invitation-opened .fall-layer {
  opacity: 1;
}

.music-toggle.is-playing {
  animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91, 122, 140, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(91, 122, 140, 0); }
}

/* ─── Scroll Reveal (Premium) ───────────────────────────────────── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(4px);
  transition:
    opacity 0.85s var(--ease-out-expo),
    transform 0.85s var(--ease-out-expo),
    filter 0.85s var(--ease-out-expo);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.reveal-scale {
  transform: translateY(20px) scale(0.95);
}

.reveal-scale.is-visible {
  transform: translateY(0) scale(1);
}

.reveal-stagger-item:nth-child(1) { transition-delay: 0s; }
.reveal-stagger-item:nth-child(2) { transition-delay: 0.15s; }

.event-cards .reveal-stagger-item.is-visible:nth-child(2) {
  transition-delay: 0.15s;
}

.reveal-stagger .reveal-on-scroll:nth-child(1) { transition-delay: 0s; }
.reveal-stagger .reveal-on-scroll:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger .reveal-on-scroll:nth-child(3) { transition-delay: 0.24s; }
.reveal-stagger .reveal-on-scroll:nth-child(4) { transition-delay: 0.36s; }

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (min-width: 640px) {
  :root { --max-w: 460px; }
  .cover-frame { max-width: 380px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-on-scroll {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .cover-anim { opacity: 1; transform: none; }
  .fall-layer { display: none; }
}
