/* ==========================================================================
   NIVED & ANUSHA — PREMIUM WEDDING E-INVITATION
   Design: Romantic Cherry Blossom Theme
   Mobile-First, Fully Responsive (320px to 1920px+ & Landscape), Accessible
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties / Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color Palette */
  --bg-primary: #FFF7FA;
  --bg-soft-pink: #F8DDE8;
  --bg-light-pink: #FCECF2;
  --accent-pink: #D96A91;
  --accent-pink-rgb: 217, 106, 145;
  --primary-burgundy: #8A2148;
  --primary-burgundy-rgb: 138, 33, 72;
  --dark-burgundy: #681737;
  --text-body: #4D3A42;
  --text-muted: #7A616B;
  --text-light: #9E828E;
  --white: #FFFFFF;
  --gold-accent: #C89758;

  /* Typography */
  --font-calligraphy: 'Great Vibes', 'Allura', cursive;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing & Container Widths */
  --container-max-width: 1100px;
  --text-max-width: 700px;
  --section-padding-y: clamp(3rem, 7vw, 5.5rem);
  --section-padding-x: clamp(1rem, 3.5vw, 2.5rem);
  
  /* Borders & Radius */
  --radius-card: 22px;
  --radius-btn: 999px;
  --radius-input: 16px;
  --border-subtle: 1px solid rgba(217, 106, 145, 0.22);
  --border-card: 1px solid rgba(217, 106, 145, 0.18);

  /* Shadows */
  --shadow-subtle: 0 4px 20px rgba(138, 33, 72, 0.05);
  --shadow-card: 0 10px 30px rgba(138, 33, 72, 0.06), 0 2px 8px rgba(217, 106, 145, 0.06);
  --shadow-float: 0 8px 24px rgba(138, 33, 72, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 35px rgba(217, 106, 145, 0.35);

  /* Transitions */
  --transition-smooth: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-fast: all 0.2s ease-in-out;
}

/* --------------------------------------------------------------------------
   2. Reset & Global Styles
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  width: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text-body);
  background-color: var(--bg-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessible hidden text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   3. Background Cherry Blossom Canvas
   -------------------------------------------------------------------------- */
#petal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10;
}

/* --------------------------------------------------------------------------
   4. Floating Action Controls (Music & Location) — iPhone Safe Area Supported
   -------------------------------------------------------------------------- */
/* Body Lock while opening screen is active */
body.invitation-locked {
  overflow: hidden !important;
  height: 100vh !important;
  height: 100svh !important;
}

/* Opening Screen Overlay */
.opening-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.opening-screen.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 247, 250, 0.95) 0%, rgba(248, 221, 232, 0.96) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.opening-card {
  position: relative;
  z-index: 2;
  max-width: 440px;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(217, 106, 145, 0.35);
  border-radius: 26px;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.5rem, 4vw, 2.2rem);
  text-align: center;
  box-shadow: 0 16px 45px rgba(138, 33, 72, 0.16), 0 0 30px rgba(217, 106, 145, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: openingFloat 4s ease-in-out infinite;
}

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

.opening-floral-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.opening-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-pink);
  margin-bottom: 0.85rem;
}

.opening-names {
  font-family: var(--font-calligraphy);
  font-size: clamp(2.8rem, 8vw, 4.2rem);
  color: var(--primary-burgundy);
  line-height: 1.1;
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.opening-amp {
  font-size: 0.75em;
  color: var(--accent-pink);
  margin: 0 0.15em;
}

.opening-divider {
  width: 44px;
  height: 2px;
  background-color: var(--accent-pink);
  margin: 0.6rem auto 0.9rem auto;
  border-radius: 2px;
}

.opening-date {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-body);
  margin-bottom: 0.35rem;
}

.opening-subtitle {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 1.8rem;
}

.btn-open-invitation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius-btn);
  background: var(--primary-burgundy);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 8px 24px rgba(138, 33, 72, 0.3), 0 0 16px rgba(217, 106, 145, 0.4);
  transition: var(--transition-smooth);
}

.btn-open-invitation:hover {
  background: var(--dark-burgundy);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(104, 23, 55, 0.4), 0 0 24px rgba(217, 106, 145, 0.6);
}

.btn-open-invitation svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.btn-open-invitation:hover svg {
  transform: scale(1.2);
}

/* Floating Action Controls */
.floating-controls {
  position: fixed;
  bottom: calc(clamp(1rem, 3.5vw, 1.8rem) + env(safe-area-inset-bottom, 0px));
  left: calc(clamp(1rem, 3.5vw, 1.8rem) + env(safe-area-inset-left, 0px));
  right: calc(clamp(1rem, 3.5vw, 1.8rem) + env(safe-area-inset-right, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 999;
}

.floating-btn {
  pointer-events: auto;
  width: 52px;
  height: 52px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: var(--border-subtle);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-burgundy);
  transition: var(--transition-smooth);
  position: relative;
}

.floating-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 28px rgba(138, 33, 72, 0.22);
  background: #FFFFFF;
  color: var(--dark-burgundy);
}

.floating-btn:focus-visible {
  outline: 2px solid var(--accent-pink);
  outline-offset: 3px;
}

.floating-btn svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

/* Music Icon Toggle */
.icon-music-playing {
  display: none;
}
.icon-music-muted {
  display: block;
}

.music-btn.is-playing .icon-music-playing {
  display: block;
}
.music-btn.is-playing .icon-music-muted {
  display: none;
}

/* Music Pulsing State */
.music-btn.is-playing {
  border-color: var(--accent-pink);
  box-shadow: 0 0 20px rgba(217, 106, 145, 0.4);
}

.music-btn.is-playing svg {
  animation: pulseRotate 4s ease-in-out infinite;
}

.music-waves {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid rgba(217, 106, 145, 0.5);
  opacity: 0;
  pointer-events: none;
}

.music-btn.is-playing .music-waves {
  animation: waveRipple 2s cubic-bezier(0.1, 0.7, 0.1, 1) infinite;
}

@keyframes pulseRotate {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(12deg); }
}

@keyframes waveRipple {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* --------------------------------------------------------------------------
   5. Section Headers & Layout Containers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
  position: relative;
  width: 100%;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(1.8rem, 4.5vw, 2.8rem);
}

.section-title {
  font-family: var(--font-calligraphy);
  font-size: clamp(2.6rem, 6.5vw, 4rem);
  color: var(--primary-burgundy);
  line-height: 1.15;
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.section-divider {
  width: 48px;
  height: 2px;
  background-color: var(--accent-pink);
  margin: 0.5rem auto 0.9rem auto;
  border-radius: 2px;
}

.section-subtitle {
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-style: italic;
  color: var(--text-muted);
  max-width: var(--text-max-width);
  margin: 0 auto;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.25s; }
.reveal-delay-3 { transition-delay: 0.38s; }

/* --------------------------------------------------------------------------
   6. Section 01: Hero Section (Full Viewport & Landscape Safe)
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  height: 100svh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: calc(clamp(2rem, 5vh, 3.5rem) + env(safe-area-inset-top, 0px)) var(--section-padding-x) calc(clamp(1.5rem, 4vh, 2.5rem) + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
  background-color: var(--dark-burgundy);
}

.hero-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.90) contrast(1.05);
}

@media (min-width: 768px) {
  .hero-bg-img {
    object-position: center 38%;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(104, 23, 55, 0.38) 0%,
    rgba(138, 33, 72, 0.32) 35%,
    rgba(104, 23, 55, 0.72) 75%,
    rgba(104, 23, 55, 0.88) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 4;
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  max-width: 600px;
  margin: auto;
  padding: 0.5rem 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.4rem;
  border-radius: var(--radius-btn);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-family: var(--font-sans);
  font-size: clamp(0.72rem, 1.8vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: clamp(0.75rem, 2.5vh, 1.5rem);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.hero-names {
  margin: 0.25rem 0;
}

.hero-name {
  font-family: var(--font-calligraphy);
  font-size: clamp(3.2rem, 9.5vw, 5.5rem);
  line-height: 1.05;
  color: var(--white);
  font-weight: 400;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.4);
  display: block;
}

.hero-ampersand {
  font-family: var(--font-calligraphy);
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  color: var(--bg-soft-pink);
  margin: -0.2rem 0;
  display: block;
  opacity: 0.95;
}

.hero-divider {
  width: 44px;
  height: 1px;
  background: rgba(255, 255, 255, 0.6);
  margin: 1rem auto;
}

.hero-date {
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 2.2vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.3rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.hero-location {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-style: italic;
  color: var(--bg-soft-pink);
  letter-spacing: 0.05em;
}

.hero-scroll-hint {
  position: relative;
  z-index: 4;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  padding-bottom: 0.25rem;
  animation: bounceHint 2.4s ease-in-out infinite;
}

.hero-scroll-hint svg {
  width: 16px;
  height: 16px;
  stroke: var(--white);
}

@keyframes bounceHint {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(5px); }
  60% { transform: translateY(2px); }
}

/* Landscape Mode Adjustments for Hero */
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 100svh;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
  .hero-name {
    font-size: 2.8rem;
  }
  .hero-badge {
    margin-bottom: 0.5rem;
    padding: 0.35rem 1rem;
  }
  .hero-divider {
    margin: 0.5rem auto;
  }
  .hero-scroll-hint {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   7. Section 02: The Couple (Heart Masks & Layout)
   -------------------------------------------------------------------------- */
.couple-section {
  background-color: var(--bg-primary);
  position: relative;
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.couple-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(0.75rem, 3.5vw, 2.5rem);
  margin-top: 1rem;
  flex-wrap: nowrap;
}

.couple-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 1 auto;
}

.heart-frame-outer {
  position: relative;
  width: clamp(125px, 36vw, 200px);
  height: clamp(125px, 36vw, 200px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 125%;
  height: 125%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(217, 106, 145, 0.35) 0%, rgba(248, 221, 232, 0) 70%);
  border-radius: 50%;
  filter: blur(12px);
  z-index: 1;
  pointer-events: none;
}

.heart-frame {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
  clip-path: url(#heart-mask);
  -webkit-clip-path: url(#heart-mask);
  background-color: var(--bg-soft-pink);
  transition: var(--transition-smooth);
}

.heart-frame:hover {
  transform: scale(1.03);
}

.heart-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.couple-role {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-pink);
  margin-top: 0.75rem;
  font-weight: 600;
}

.couple-name {
  font-family: var(--font-calligraphy);
  font-size: clamp(2.2rem, 5.5vw, 3.2rem);
  color: var(--primary-burgundy);
  line-height: 1.1;
  margin-top: 0.2rem;
}

.couple-connector {
  font-family: var(--font-calligraphy);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  color: var(--accent-pink);
  margin: 0 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   8. Section 03: In Full Bloom
   -------------------------------------------------------------------------- */
.bloom-section {
  background-color: var(--bg-primary);
  text-align: center;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.bloom-card {
  max-width: var(--text-max-width);
  margin: 0 auto;
  padding: clamp(1.8rem, 4.5vw, 2.8rem) clamp(1.2rem, 3.5vw, 2.2rem);
  background: rgba(255, 255, 255, 0.75);
  border: var(--border-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  position: relative;
}

.bloom-icon-top {
  width: 32px;
  height: 32px;
  margin: 0 auto 0.75rem auto;
  color: var(--accent-pink);
}

.bloom-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.6vw, 1.4rem);
  line-height: 1.75;
  font-style: italic;
  color: var(--primary-burgundy);
  margin-bottom: 1rem;
}

.bloom-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--accent-pink);
  margin-top: 1.25rem;
}

.bloom-line {
  width: 36px;
  height: 1px;
  background-color: var(--accent-pink);
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   9. Section 04: Our Moments (Gallery Carousel & Desktop Centering)
   -------------------------------------------------------------------------- */
.gallery-section {
  background-color: var(--bg-primary);
  overflow: hidden;
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  width: 100%;
}

.gallery-container {
  position: relative;
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0.5rem auto 0 auto;
}

.gallery-track {
  display: flex;
  gap: clamp(0.85rem, 2.5vw, 1.5rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.75rem var(--section-padding-x) 1.5rem var(--section-padding-x);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-pink) var(--bg-light-pink);
  width: 100%;
}

.gallery-track::-webkit-scrollbar {
  height: 6px;
}

.gallery-track::-webkit-scrollbar-track {
  background: var(--bg-light-pink);
  border-radius: 999px;
}

.gallery-track::-webkit-scrollbar-thumb {
  background: var(--accent-pink);
  border-radius: 999px;
}

.gallery-card {
  flex: 0 0 clamp(220px, 65vw, 310px);
  aspect-ratio: 3 / 4;
  scroll-snap-align: center;
  border-radius: var(--radius-card);
  overflow: hidden;
  position: relative;
  background: var(--white);
  border: 1px solid rgba(217, 106, 145, 0.2);
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  cursor: pointer;
}

.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(138, 33, 72, 0.14);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gallery-card:hover .gallery-img {
  transform: scale(1.04);
}

.gallery-overlay-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--primary-burgundy);
  border: 1px solid rgba(217, 106, 145, 0.2);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Lightbox Modal */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(104, 23, 55, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
  padding: 1.5rem;
}

.lightbox.is-active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-card);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   10. Section 05: Counting Down (Responsive 4x1 & 2x2 Grid)
   -------------------------------------------------------------------------- */
.countdown-section {
  background-color: var(--bg-primary);
  text-align: center;
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.4rem, 2vw, 1.25rem);
  max-width: 520px;
  margin: 1.5rem auto 0 auto;
  width: 100%;
}

.countdown-card {
  background: var(--white);
  border: 1px solid rgba(217, 106, 145, 0.25);
  border-radius: clamp(14px, 3vw, 20px);
  padding: clamp(0.9rem, 2.5vw, 1.4rem) clamp(0.3rem, 1.2vw, 0.8rem);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-smooth);
  min-width: 0;
}

.countdown-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-pink);
  box-shadow: 0 10px 24px rgba(217, 106, 145, 0.15);
}

.countdown-number {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 5.5vw, 3rem);
  font-weight: 600;
  line-height: 1;
  color: var(--primary-burgundy);
  margin-bottom: 0.3rem;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-family: var(--font-sans);
  font-size: clamp(0.65rem, 1.6vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-pink);
}

.countdown-finished {
  display: none;
  font-family: var(--font-calligraphy);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--primary-burgundy);
  margin-top: 1rem;
}

/* --------------------------------------------------------------------------
   11. Section 06: Celebrations (Event Cards)
   -------------------------------------------------------------------------- */
.celebrations-section {
  background-color: var(--bg-primary);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 3vw, 1.8rem);
  max-width: 580px;
  margin: 0 auto;
  width: 100%;
}

.event-card {
  background: var(--white);
  border: 1px solid rgba(217, 106, 145, 0.25);
  border-radius: var(--radius-card);
  padding: clamp(1.4rem, 3.8vw, 2.2rem);
  box-shadow: var(--shadow-card);
  position: relative;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.event-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-pink);
  box-shadow: 0 14px 32px rgba(138, 33, 72, 0.1);
}

.event-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  width: 100%;
}

.event-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-light-pink);
  color: var(--primary-burgundy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-icon svg {
  width: 18px;
  height: 18px;
}

.event-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 700;
  color: var(--primary-burgundy);
  line-height: 1.2;
}

.event-datetime {
  font-family: var(--font-sans);
  font-size: clamp(0.88rem, 2vw, 1rem);
  font-weight: 500;
  font-style: italic;
  color: var(--accent-pink);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.event-venue {
  font-family: var(--font-sans);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  color: var(--text-body);
  line-height: 1.5;
  margin-bottom: 1.15rem;
}

.event-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.5rem;
  min-height: 44px;
  border-radius: var(--radius-btn);
  background: var(--bg-light-pink);
  border: 1px solid rgba(217, 106, 145, 0.35);
  color: var(--primary-burgundy);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: var(--transition-smooth);
}

.event-btn:hover {
  background: var(--primary-burgundy);
  color: var(--white);
  border-color: var(--primary-burgundy);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(138, 33, 72, 0.2);
}

.event-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.event-btn:hover svg {
  transform: translateX(2px);
}

/* --------------------------------------------------------------------------
   12. Section 07: Family Blessings
   -------------------------------------------------------------------------- */
.family-section {
  background-color: var(--bg-primary);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.family-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1rem, 3vw, 1.6rem);
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 600px) {
  .family-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.family-card {
  background: var(--white);
  border: 1px solid rgba(217, 106, 145, 0.22);
  border-radius: var(--radius-card);
  padding: clamp(1.4rem, 3.5vw, 2rem);
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: var(--transition-smooth);
  position: relative;
  width: 100%;
}

.family-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-pink);
}

.family-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-pink);
  margin-bottom: 0.5rem;
}

.family-names {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  font-weight: 600;
  color: var(--primary-burgundy);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.family-residence-toggle {
  margin-top: 0.6rem;
  font-size: 0.76rem;
  color: var(--text-light);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  transition: var(--transition-fast);
}

.family-residence-toggle:hover {
  color: var(--accent-pink);
}

.family-residence {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(217, 106, 145, 0.2);
  display: none;
}

.family-residence.is-open {
  display: block;
}

/* --------------------------------------------------------------------------
   13. Section 08: Send Us Your Wishes (Guestbook)
   -------------------------------------------------------------------------- */
.wishes-section {
  background-color: var(--bg-primary);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
}

.wishes-card {
  max-width: 540px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid rgba(217, 106, 145, 0.25);
  border-radius: var(--radius-card);
  padding: clamp(1.5rem, 4.5vw, 2.4rem);
  box-shadow: var(--shadow-card);
  width: 100%;
}

.form-group {
  margin-bottom: 1.15rem;
  position: relative;
  width: 100%;
  text-align: left;
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--primary-burgundy);
  margin-bottom: 0.4rem;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 0.8rem 1.15rem;
  border-radius: var(--radius-input);
  background: var(--bg-primary);
  border: 1px solid rgba(217, 106, 145, 0.35);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-light);
  font-style: italic;
}

.form-input:focus, .form-textarea:focus {
  background: var(--white);
  border-color: var(--accent-pink);
  box-shadow: 0 0 0 3px rgba(217, 106, 145, 0.15);
}

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

.btn-submit, .wish-submit-btn {
  width: 100%;
  padding: 0.9rem 1.4rem;
  min-height: 48px;
  border-radius: var(--radius-btn);
  background: var(--primary-burgundy);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
  box-shadow: 0 6px 18px rgba(138, 33, 72, 0.22);
}

.btn-submit:hover, .wish-submit-btn:hover {
  background: var(--dark-burgundy);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(104, 23, 55, 0.32);
}

.btn-submit:active, .wish-submit-btn:active {
  transform: translateY(0);
}

.wishes-feedback {
  margin-top: 0.9rem;
  padding: 0.8rem 1.1rem;
  border-radius: var(--radius-input);
  background: var(--bg-light-pink);
  border: 1px solid var(--accent-pink);
  color: var(--primary-burgundy);
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
  display: none;
  animation: fadeIn 0.4s ease;
}

/* Wishes List Display */
.wishes-display-container {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(217, 106, 145, 0.18);
  display: none;
}

.wishes-display-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-burgundy);
  margin-bottom: 0.9rem;
  text-align: center;
}

.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 0.3rem;
}

.wish-item {
  background: var(--bg-primary);
  border: 1px solid rgba(217, 106, 145, 0.18);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
}

.wish-author {
  font-weight: 600;
  color: var(--primary-burgundy);
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.2rem;
}

.wish-time {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 400;
}

.wish-text {
  color: var(--text-body);
  font-style: italic;
  line-height: 1.4;
}

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

/* --------------------------------------------------------------------------
   14. Section 09: Thank You (Footer)
   -------------------------------------------------------------------------- */
.thankyou-section {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-soft-pink) 100%);
  text-align: center;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: calc(clamp(4.5rem, 9vw, 7rem) + env(safe-area-inset-bottom, 0px));
  position: relative;
  overflow: hidden;
  width: 100%;
}

.thankyou-content {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.thankyou-title {
  font-family: var(--font-calligraphy);
  font-size: clamp(3rem, 8vw, 5rem);
  color: var(--primary-burgundy);
  line-height: 1.1;
  font-weight: 400;
  margin-bottom: 0.85rem;
}

.thankyou-message {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  font-style: italic;
  color: var(--text-body);
  margin-bottom: 1.8rem;
  line-height: 1.7;
}

.thankyou-names {
  font-family: var(--font-calligraphy);
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  color: var(--primary-burgundy);
  margin-bottom: 0.4rem;
}

.thankyou-date {
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--accent-pink);
}

.thankyou-ornament {
  margin: 1.6rem auto 0 auto;
  width: 50px;
  height: 2px;
  background: var(--accent-pink);
  border-radius: 2px;
  opacity: 0.6;
}

/* Domain Ads Footer Promo Card */
.footer-promo-card {
  margin-top: clamp(2.2rem, 5vw, 3.5rem);
  padding: clamp(1.4rem, 3.5vw, 2rem) clamp(1.1rem, 3vw, 1.8rem);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(217, 106, 145, 0.3);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 24px rgba(138, 33, 72, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-promo-title {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--primary-burgundy);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

.footer-promo-text {
  font-family: var(--font-sans);
  font-size: clamp(0.85rem, 2vw, 0.92rem);
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  max-width: 480px;
}

.btn-footer-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  min-height: 42px;
  border-radius: var(--radius-btn);
  background: var(--primary-burgundy);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 14px rgba(138, 33, 72, 0.2);
  transition: var(--transition-smooth);
  margin-bottom: 1.1rem;
}

.btn-footer-wa:hover {
  background: var(--dark-burgundy);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(104, 23, 55, 0.3);
}

.btn-footer-wa svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.footer-credits {
  font-family: var(--font-sans);
  font-size: clamp(0.72rem, 1.8vw, 0.8rem);
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  line-height: 1.5;
}

.footer-credits strong {
  color: var(--primary-burgundy);
}

.footer-sep {
  color: var(--accent-pink);
  opacity: 0.7;
}

.footer-link {
  color: var(--primary-burgundy);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(217, 106, 145, 0.4);
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: var(--dark-burgundy);
  text-decoration-color: var(--primary-burgundy);
}

/* --------------------------------------------------------------------------
   15. Accessibility & Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  #petal-canvas {
    display: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   16. Breakpoint Fine-Tuning
   -------------------------------------------------------------------------- */
/* Small Mobile (320px - 360px) */
@media (max-width: 360px) {
  :root {
    --section-padding-x: 0.85rem;
  }

  .hero-name {
    font-size: 2.9rem;
  }

  .countdown-grid {
    gap: 5px;
  }

  .countdown-card {
    padding: 0.75rem 0.2rem;
  }

  .countdown-number {
    font-size: 1.5rem;
  }

  .floating-btn {
    width: 48px;
    height: 48px;
  }

  .floating-btn svg {
    width: 18px;
    height: 18px;
  }

  .heart-frame-outer {
    width: 120px;
    height: 120px;
  }
}

/* Large Desktop (> 1440px) */
@media (min-width: 1440px) {
  :root {
    --container-max-width: 1140px;
  }
}
