/* ============================================================
   ROYAL MUGHAL WEDDING INVITATION — PREMIUM DESIGN SYSTEM
   ============================================================ */

/* ── Google Font Import ── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Alex+Brush&family=Pinyon+Script&family=EB+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

/* ── Design Tokens ── */
:root {
  /* Deep Jewel Palette */
  --deep-maroon:   #1a0508;
  --rich-burgundy: #2e0a14;
  --velvet-wine:   #4a1020;
  --rose-ruby:     #6b1a30;
  --blush-rose:    #8d2a42;

  /* Gold System */
  --gold-deep:     #8B6914;
  --gold-mid:      #C9A227;
  --gold-warm:     #E8C874;
  --gold-bright:   #F5D98B;
  --gold-shine:    #FFF3C2;
  --candle:        #FFB347;

  /* Neutral Ivory */
  --ivory:         #F8F0E3;
  --parchment:     #EDE0C8;
  --cream:         #F5EFE8;

  /* Semantic Aliases */
  --bg:            var(--deep-maroon);
  --surface:       var(--rich-burgundy);
  --accent:        var(--gold-mid);
  --text-primary:  var(--ivory);
  --text-gold:     var(--gold-warm);
  --text-muted:    rgba(248, 240, 227, 0.65);

  /* Shadows */
  --shadow-gold:   0 0 24px rgba(201,162,39,0.25);
  --shadow-deep:   0 12px 48px rgba(0,0,0,0.8);
  --glow-gold:     0 0 18px rgba(232,200,116,0.55);

  /* Fonts */
  --font-display:  'Cinzel', serif;
  --font-script:   'Pinyon Script', cursive;
  --font-serif:    'Cormorant Garamond', serif;
  --font-body:     'EB Garamond', serif;
  --font-brush:    'Alex Brush', cursive;

  /* Transitions */
  --ease-smooth:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

body.modal-open { overflow: hidden !important; }

/* ── Mobile Canvas ── */
.max-width-wrapper {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: transparent;
  box-shadow:
    0 0 0 1px rgba(201,162,39,0.12),
    -6px 0 60px rgba(0,0,0,0.9),
     6px 0 60px rgba(0,0,0,0.9);
}

/* ============================================================
   FIXED BACKGROUND LAYERS
   ============================================================ */

/* Radial deep-burgundy base */
.fixed-bg {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: 100%;
  background:
    radial-gradient(ellipse at 50% 0%,   rgba(106,26,48,0.55) 0%, transparent 65%),
    radial-gradient(ellipse at 20% 80%,  rgba(74,16,32,0.4)  0%, transparent 55%),
    radial-gradient(ellipse at 80% 60%,  rgba(26,5,8,0.6)    0%, transparent 60%),
    linear-gradient(175deg, #200810 0%, #0f0307 60%, #1a0508 100%);
  z-index: -3;
  pointer-events: none;
}

/* Jali lattice overlay */
.jali-bg-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23C9A227' stroke-width='0.8'%3E%3Cpath d='M20 0 L40 20 L20 40 L0 20 Z'/%3E%3Cpath d='M20 8 L32 20 L20 32 L8 20 Z'/%3E%3Ccircle cx='20' cy='20' r='3'/%3E%3Ccircle cx='0'  cy='0'  r='1.5'/%3E%3Ccircle cx='40' cy='0'  r='1.5'/%3E%3Ccircle cx='0'  cy='40' r='1.5'/%3E%3Ccircle cx='40' cy='40' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* Ambient candle glow vignette */
#particle-container {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, var(--gold-shine) 0%, var(--gold-warm) 45%, rgba(201,162,39,0) 100%);
  border-radius: 50%;
  filter: drop-shadow(0 0 4px var(--candle));
  pointer-events: none;
}

/* ============================================================
   UTILITIES
   ============================================================ */

.hidden { display: none !important; }

.font-serif   { font-family: var(--font-serif); }
.font-display { font-family: var(--font-display); }
.garamond-italic { font-family: var(--font-serif); font-style: italic; }

/* ── Gold Shimmer Divider ── */
.gold-divider-small {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 200px;
  margin: 10px auto 18px;
}

.gold-divider-small::before,
.gold-divider-small::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-mid), transparent);
}

/* ── Section Skeleton ── */
.scroll-section {
  padding: 56px 20px;
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-smooth), transform 0.9s var(--ease-smooth);
}

.scroll-section.active {
  opacity: 1;
  transform: translateY(0);
}

.section-header-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  color: rgba(232,200,116,0.7);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.eyebrow-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-gold);
}

/* ============================================================
   MUSIC TOGGLE
   ============================================================ */
.music-toggle-btn {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(26,5,8,0.75);
  border: 1px solid rgba(201,162,39,0.55);
  color: var(--gold-warm);
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5), var(--shadow-gold);
}

.music-toggle-btn:hover {
  border-color: var(--gold-warm);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), var(--glow-gold);
}

.music-toggle-btn .glow-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--candle);
  opacity: 0;
  pointer-events: none;
}

.music-toggle-btn.playing .glow-ring {
  animation: pulse-ring 2.2s infinite ease-out;
}

.music-toggle-btn.playing svg {
  animation: bob-icon 1.1s infinite ease-in-out alternate;
}

@keyframes pulse-ring {
  0%   { transform: scale(1);   opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0;   }
}

@keyframes bob-icon {
  from { transform: translateY(0);    }
  to   { transform: translateY(-2px); }
}

/* ============================================================
   1. OPENING ENVELOPE / VIDEO OVERLAY
   ============================================================ */
.envelope-overlay {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 430px;
  height: 100%;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #050102;
}

#opening-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#main-content {
  opacity: 1;
  z-index: 5;
}

/* ============================================================
   2. HERO SECTION — PREMIUM OVERHAUL
   ============================================================ */
.hero-section {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  padding: 36px 20px 28px;
  justify-content: space-between;
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow: hidden;
  background-color: transparent;
}

.details-content {
  position: relative;
  z-index: 1;
  width: 100%;
  background: transparent;
}

/* ── Snap Deck: fixed viewport panel for sections 0-2 ── */
#snap-deck {
  position: fixed;
  top: 0;
  left: 50%;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  overflow: hidden;
  z-index: 5;
  /* GSAP animates translateY on this element.
     translateX(-50%) centres it; GSAP preserves it. */
  transform: translateX(-50%) translateY(100vh); /* start below; hero animation brings it in */
  will-change: transform;
}

/* Snap sections fill the deck absolutely */
#snap-deck .scroll-section {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Override the old scroll-reveal transform — deck controls visibility */
  transform: none;
  opacity: 1;
}

/* Closing section: natural flow, revealed on screen 3 with higher z-index to cover slide deck */
#closing-section {
  position: relative;
  z-index: 20;
  display: none !important;
  background: linear-gradient(175deg, #f0e6d8 0%, #ede0c8 50%, #e8d8c0 100%);
  will-change: transform;
}

#closing-section.visible {
  display: block !important;
}

/* Hero Background Layers */
.hero-bg-base,
.hero-bg-transition {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}

.hero-bg-base {
  background-image:
    linear-gradient(to bottom,
      rgba(10,2,5,0.38) 0%,
      rgba(10,2,5,0.05) 30%,
      rgba(10,2,5,0.05) 65%,
      rgba(10,2,5,0.45) 100%),
    url("assets/images/after-intro.png");
  z-index: 1;
}

.hero-bg-transition {
  background-image:
    linear-gradient(to bottom,
      rgba(10,2,5,0.35) 0%,
      rgba(10,2,5,0.04) 30%,
      rgba(10,2,5,0.04) 65%,
      rgba(10,2,5,0.42) 100%),
    url("assets/images/after-intro.png");
  z-index: 2;
  opacity: 0;
}

/* Golden vignette frame overlay — subtle edge only */
.hero-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 5%,  rgba(201,162,39,0.06) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 100%, rgba(10,2,5,0.55) 0%, transparent 35%);
  z-index: 3;
  pointer-events: none;
}

/* ── Main Arch Card ── */
.hero-arch-container {
  width: 88%;
  max-width: 350px;
  margin: auto;
  padding: 30px 24px 28px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  /* Lighter glass so bg image shows through */
  background:
    linear-gradient(145deg, rgba(20,4,10,0.48) 0%, rgba(10,2,5,0.52) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(232,200,116,0.22);
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(232,200,116,0.15),
    inset 0 0 60px rgba(0,0,0,0.5),
    0 20px 60px rgba(0,0,0,0.7),
    var(--shadow-gold);
  opacity: 0;
  animation: shimmer-border 4s infinite ease-in-out;
}

@keyframes shimmer-border {
  0%,100% { box-shadow: inset 0 1px 0 rgba(232,200,116,0.15), inset 0 0 60px rgba(0,0,0,0.5), 0 20px 60px rgba(0,0,0,0.7), 0 0 22px rgba(201,162,39,0.20); }
  50%      { box-shadow: inset 0 1px 0 rgba(232,200,116,0.30), inset 0 0 60px rgba(0,0,0,0.5), 0 20px 60px rgba(0,0,0,0.7), 0 0 36px rgba(232,200,116,0.38); }
}

/* Corner brackets */
.hero-arch-container::before,
.hero-arch-container::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border-color: rgba(232,200,116,0.7);
  border-style: solid;
}

.hero-arch-container::before {
  top: 8px; left: 8px;
  border-width: 1.5px 0 0 1.5px;
}

.hero-arch-container::after {
  bottom: 8px; right: 8px;
  border-width: 0 1.5px 1.5px 0;
}

/* Inner corner brackets via child pseudo */
.hero-arch-outline {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  border: none;
}

.hero-arch-outline::before,
.hero-arch-outline::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border-color: rgba(232,200,116,0.4);
  border-style: solid;
}

.hero-arch-outline::before {
  bottom: 0; left: 0;
  border-width: 0 0 1px 1px;
}

.hero-arch-outline::after {
  top: 0; right: 0;
  border-width: 1px 1px 0 0;
}

/* ── Card Content ── */
.hero-arch-content {
  text-align: center;
  padding: 16px 8px;
  width: 100%;
  z-index: 5;
  color: var(--gold-warm);
}

.bismillah-img {
  width: 140px;
  max-width: 62%;
  margin: 0 auto 10px;
  display: block;
  filter: brightness(0) saturate(100%) invert(82%) sepia(35%) saturate(763%) hue-rotate(355deg) brightness(105%) contrast(90%);
  opacity: 0;
  filter: drop-shadow(0 0 8px rgba(232,200,116,0.4)) brightness(0) saturate(100%) invert(82%) sepia(35%) saturate(763%) hue-rotate(355deg) brightness(105%) contrast(90%);
}

.bismillah-translation {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(248,240,227,0.85);
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
  margin-bottom: 4px;
  text-align: center;
  opacity: 0;
}

/* ── Decorative SVG Dividers ── */
.hero-divider {
  width: 180px;
  height: 18px;
  margin: 6px auto;
  color: var(--gold-warm);
  filter: drop-shadow(0 1px 6px rgba(201,162,39,0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.hero-divider-small {
  width: 110px;
  height: 16px;
  margin: 6px auto;
  color: var(--gold-warm);
  filter: drop-shadow(0 1px 6px rgba(201,162,39,0.5));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
}

.divider-svg { width: 100%; height: 100%; }

/* ── Initials "L & L" ── */
.hero-initials {
  font-family: var(--font-script);
  font-size: 90px;
  line-height: 1;
  background: linear-gradient(160deg, var(--gold-shine) 0%, var(--gold-warm) 40%, var(--gold-mid) 75%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.7));
  margin: 10px 0 6px;
  text-align: center;
  opacity: 0;
  animation: text-shimmer 5s infinite linear;
  background-size: 200% auto;
}

@keyframes text-shimmer {
  0%   { background-position: 0%   center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0%   center; }
}

/* ── Couple Names ── */
.hero-couple-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 6px 0;
  opacity: 0;
}

.hero-couple-name {
  font-family: var(--font-brush);
  font-size: 44px;
  font-weight: 400;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--gold-shine) 0%, var(--gold-warm) 55%, var(--gold-mid) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.8));
}

.hero-couple-ampersand {
  font-family: var(--font-brush);
  font-size: 30px;
  line-height: 1;
  color: rgba(248,240,227,0.75);
  margin: 3px 0;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.8));
}

/* ── Scroll Cue ── */
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--gold-warm);
  animation: bounce-cue 2.2s infinite ease-in-out;
  margin-top: 8px;
  opacity: 0;
  z-index: 4;
  cursor: pointer;
  gap: 4px;
}

.scroll-cue .eyebrow-text,
.scroll-arrow { color: var(--gold-warm) !important; }

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

/* ============================================================
   3. WEDDING CARD SECTION
   ============================================================ */
.wedding-card-section {
  min-height: 100vh;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  /* position: absolute is set by #snap-deck .scroll-section */
}

/* Radial ambient glow behind scroll */
.wedding-card-section::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(201,162,39,0.14) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambient-pulse 3.5s infinite ease-in-out;
}

@keyframes ambient-pulse {
  0%,100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1);    }
  50%      { opacity: 1;   transform: translate(-50%,-50%) scale(1.12); }
}

.scroll-entry-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1;
}

.tap-cue-text {
  font-size: 15px;
  color: var(--gold-warm);
  margin-bottom: 20px;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
  letter-spacing: 0.3px;
  animation: glow-pulse 2.5s infinite ease-in-out;
}

@keyframes glow-pulse {
  0%,100% { opacity: 0.8;  text-shadow: 0 0 6px rgba(232,200,116,0.3), 0 2px 6px rgba(0,0,0,0.7); }
  50%      { opacity: 1;    text-shadow: 0 0 14px rgba(232,200,116,0.8), 0 2px 6px rgba(0,0,0,0.7); }
}

.open-card-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  outline: none;
  width: 100%;
  max-width: 240px;
  position: relative;
  transition: transform 0.35s var(--ease-bounce);
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.65)) drop-shadow(0 0 12px rgba(201,162,39,0.25));
}

.open-card-btn:hover,
.open-card-btn:focus {
  transform: scale(1.06) translateY(-3px);
  filter: drop-shadow(0 18px 36px rgba(0,0,0,0.7)) drop-shadow(0 0 20px rgba(232,200,116,0.45));
}

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

.seal-glow-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90px; height: 90px;
  border-radius: 50%;
  border: 1px solid rgba(232,200,116,0.4);
  animation: seal-pulse 2.8s infinite ease-out;
  pointer-events: none;
}

@keyframes seal-pulse {
  0%   { transform: translate(-50%,-50%) scale(1);   opacity: 0.8; }
  100% { transform: translate(-50%,-50%) scale(1.9); opacity: 0;   }
}

.scroll-stamped-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   WEDDING CARD MODAL
   ============================================================ */
.card-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card-modal.hidden { display: none !important; }

.card-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,2,4,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-modal-content {
  position: relative;
  z-index: 151;
  width: 100%;
  max-width: 340px;
  animation: modal-pop-in 0.45s var(--ease-bounce) forwards;
}

@keyframes modal-pop-in {
  from { transform: scale(0.82); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.golden-card-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  padding: 10px;
  background: rgba(26,5,8,0.97);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 3px;
  box-shadow: 0 24px 56px rgba(0,0,0,0.9), 0 0 36px rgba(201,162,39,0.2);
}

/* Gold gradient border */
.golden-card-frame::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 4px;
  padding: 2px;
  background: linear-gradient(135deg, var(--gold-shine), var(--gold-mid), var(--gold-deep), var(--gold-mid), var(--gold-shine));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background-size: 300% 300%;
  animation: border-shimmer 4s infinite linear;
}

@keyframes border-shimmer {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

.wedding-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 1px;
}

.card-modal-close {
  position: absolute;
  top: -48px; right: 0;
  background: rgba(26,5,8,0.7);
  border: 1px solid rgba(232,200,116,0.35);
  color: var(--gold-warm);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  z-index: 152;
  padding: 6px 12px;
  border-radius: 30px;
  backdrop-filter: blur(6px);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.card-modal-close:hover {
  color: var(--ivory);
  background: rgba(74,16,32,0.9);
  transform: scale(1.1) rotate(90deg);
}

/* ============================================================
   5. NIKKAH CEREMONY SECTION
   ============================================================ */
.schedule-section {
  height: 100vh;
  min-height: 100vh;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Ambient top glow */
.schedule-section::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%;
  transform: translateX(-50%);
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,162,39,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Palace Silhouette */
.palace-bottom-graphic-wrap {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 360px;
  text-align: center;
  pointer-events: none;
  z-index: 1;
}

.palace-bottom-img {
  width: 95%;
  max-height: 80px;
  object-fit: contain;
  opacity: 0.5;
  filter:
    drop-shadow(0 -4px 10px rgba(232,200,116,0.25))
    brightness(0) saturate(100%) invert(82%) sepia(35%) saturate(600%) hue-rotate(355deg) brightness(90%) contrast(85%);
}

/* Floating Petals */
.petal {
  position: absolute;
  font-size: 14px;
  color: rgba(232,200,116,0.2);
  animation: petal-drift 9s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
  user-select: none;
}

.p1  { top:  8%; left:  8%; animation-delay: 0s;    font-size: 12px; }
.p2  { top: 15%; right: 10%; animation-delay: 1.5s; font-size: 16px; }
.p3  { top: 70%; left:  6%; animation-delay: 2.8s;  font-size: 10px; }
.p4  { top: 78%; right:  8%; animation-delay: 0.9s; font-size: 14px; }
.p5  { top: 42%; left:  4%; animation-delay: 3.8s;  font-size: 11px; }
.pc1 { top: 10%; left: 12%; animation-delay: 0.6s;  font-size: 13px; }
.pc2 { top: 20%; right:  7%; animation-delay: 2.2s; font-size: 16px; }
.pc3 { top: 72%; right: 12%; animation-delay: 1.9s; font-size: 11px; }

@keyframes petal-drift {
  0%   { transform: translateY(0)   rotate(0deg);  opacity: 0.18; }
  50%  { transform: translateY(-10px) rotate(12deg); opacity: 0.42; }
  100% { transform: translateY(0)   rotate(0deg);  opacity: 0.18; }
}

/* ── Royal Date Frame ── */
.royal-date-container {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.royal-arch-frame {
  width: 100%;
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 24px;
  background: linear-gradient(145deg, rgba(74,16,32,0.45), rgba(26,5,8,0.65));
  border: 1px solid rgba(232,200,116,0.2);
  border-radius: 4px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.4), 0 16px 48px rgba(0,0,0,0.7), var(--shadow-gold);
  position: relative;
}

/* Corner accents on date frame */
.royal-arch-frame::before,
.royal-arch-frame::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-color: rgba(232,200,116,0.55);
  border-style: solid;
}

.royal-arch-frame::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.royal-arch-frame::after  { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }

.royal-day {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 5px;
  color: var(--gold-warm);
  margin-bottom: 4px;
  opacity: 0.85;
}

.royal-date-number {
  font-family: var(--font-display);
  font-size: 88px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(160deg, var(--gold-shine) 0%, var(--gold-warm) 45%, var(--gold-mid) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.6));
  margin: 4px 0;
}

.royal-month-year {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--gold-warm);
  margin-bottom: 12px;
  opacity: 0.85;
}

.royal-frame-divider {
  width: 120px;
  height: 10px;
  margin: 4px auto 12px;
}

.frame-divider-svg { width: 100%; height: 100%; }

.royal-time {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ivory);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.royal-venue {
  font-family: var(--font-serif);
  font-size: 14px;
  color: rgba(248,240,227,0.8);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: 22px;
  max-width: 240px;
}

/* ── Calendar Button ── */
.ceremony-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: linear-gradient(135deg, var(--velvet-wine), var(--rich-burgundy));
  color: var(--gold-warm);
  border: 1px solid rgba(232,200,116,0.5);
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4), 0 0 12px rgba(201,162,39,0.15);
}

.ceremony-btn::before {
  content: '🗓';
  font-size: 13px;
}

.ceremony-btn:hover {
  background: linear-gradient(135deg, var(--rose-ruby), var(--velvet-wine));
  border-color: var(--gold-warm);
  box-shadow: 0 8px 28px rgba(0,0,0,0.5), var(--glow-gold);
  transform: translateY(-2px);
}

.ceremony-btn:active {
  transform: scale(0.97) translateY(0);
}

/* ============================================================
   5b. THE COUPLE SECTION
   ============================================================ */
.couple-section {
  height: 100vh;
  min-height: 100vh;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.couple-card-container {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.couple-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

/* Individual profile card */
.couple-profile {
  text-align: center;
  padding: 22px 20px;
  width: 100%;
  background: linear-gradient(145deg, rgba(74,16,32,0.4), rgba(26,5,8,0.55));
  border: 1px solid rgba(232,200,116,0.16);
  border-radius: 4px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin: 6px 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(232,200,116,0.1);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.couple-profile:hover {
  border-color: rgba(232,200,116,0.3);
  box-shadow: 0 10px 40px rgba(0,0,0,0.6), var(--shadow-gold), inset 0 1px 0 rgba(232,200,116,0.18);
}

.couple-title {
  font-family: var(--font-brush);
  font-size: 38px;
  background: linear-gradient(135deg, var(--gold-shine), var(--gold-warm), var(--gold-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.7));
}

.parent-details {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 260px;
  margin: 0 auto;
}

.couple-ampersand-divider {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0;
  padding: 8px 0;
}

.couple-ampersand-divider::before,
.couple-ampersand-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,200,116,0.35), transparent);
}

.ampersand-char {
  font-family: var(--font-script);
  font-size: 28px;
  background: linear-gradient(135deg, var(--gold-warm), var(--gold-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding: 0 14px;
}

/* ============================================================
   6+7. CLOSING CREAM SECTION
   ============================================================ */
.cream-section {
  background: linear-gradient(175deg, #f0e6d8 0%, #ede0c8 50%, #e8d8c0 100%);
  padding: 44px 20px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Subtle pattern on cream section */
.cream-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M10 0 L20 10 L10 20 L0 10 Z' fill='none' stroke='%23C9A227' stroke-width='0.3' opacity='0.25'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

/* ── Compact Venue Card ── */
.venue-card-compact {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  max-width: 360px;
  margin: 0 auto 32px;
  box-shadow: 0 4px 24px rgba(61,15,28,0.15), 0 1px 4px rgba(61,15,28,0.08);
  border: 1px solid rgba(201,162,39,0.15);
  position: relative;
  z-index: 1;
}

.venue-map-compact {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.venue-map-compact iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.venue-info-compact {
  padding: 16px 18px 18px;
  text-align: left;
}

.venue-name-compact {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: #1e0a10;
  margin-bottom: 3px;
  line-height: 1.3;
}

.venue-address-compact {
  font-size: 12.5px;
  color: #7a5c4a;
  margin-bottom: 14px;
  line-height: 1.5;
  font-family: var(--font-body);
}

.venue-btns-compact { display: flex; gap: 8px; }

.cream-btn {
  flex: 1;
  padding: 9px 12px;
  background: linear-gradient(135deg, #4a1020, #2e0a14);
  color: #f5efe6;
  border: none;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 3px 12px rgba(61,15,28,0.25);
}

.cream-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.cream-btn:active { opacity: 0.8; transform: scale(0.97); }

.cream-btn-outline {
  background: transparent;
  color: #3D0F1C;
  border: 1px solid rgba(61,15,28,0.35);
  box-shadow: none;
}

/* ── Cream Divider ── */
.cream-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 200px;
  margin: 0 auto 32px;
  position: relative;
  z-index: 1;
}

.cream-divider::before,
.cream-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(61,15,28,0.25), transparent);
}

.cream-divider::before { content: '❖'; position: static; color: rgba(61,15,28,0.25); font-size: 10px; }
/* Override: simplify to a plain line */
.cream-divider {
  width: 60px;
  height: 1px;
  background: rgba(61,15,28,0.18);
  display: block;
}

/* ── Thank You Block ── */
.closing-card {
  max-width: 310px;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}

.closing-thank-you {
  font-family: var(--font-brush);
  font-size: 52px;
  color: #2e0a14;
  margin-bottom: 10px;
  line-height: 1;
}

.closing-message {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: #5c3a28;
  line-height: 1.65;
  margin-bottom: 20px;
}

.closing-names {
  font-family: var(--font-brush);
  font-size: 30px;
  color: #3D0F1C;
  margin-bottom: 8px;
}

.closing-details {
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: #7a5c4a;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.closing-dot {
  margin: 0 5px;
  opacity: 0.35;
}

/* ── Share Button ── */
.cream-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  background: transparent;
  color: #2e0a14;
  border: 1.5px solid rgba(61,15,28,0.4);
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cream-share-btn::before { content: '✉'; font-size: 13px; }

.cream-share-btn:hover {
  background: rgba(61,15,28,0.06);
  border-color: rgba(61,15,28,0.65);
  transform: translateY(-1px);
}

.cream-share-btn:active { transform: scale(0.97); }

/* ── Credits ── */
.cream-credits {
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: 10px;
  color: rgba(61,15,28,0.28);
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   CALENDAR MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: linear-gradient(145deg, #f8f0e3, #ede0c8);
  color: #1e0a10;
  width: 90%;
  max-width: 330px;
  border-radius: 10px;
  border: 1px solid rgba(201,162,39,0.4);
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.65), 0 0 24px rgba(201,162,39,0.1);
  transform: translateY(24px);
  transition: transform 0.35s var(--ease-bounce);
}

.modal-overlay:not(.hidden) .modal-card { transform: translateY(0); }

.modal-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: #3D0F1C;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.modal-event-info {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14.5px;
  color: var(--gold-deep);
  margin-bottom: 22px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.modal-btn {
  display: block;
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #4a1020, #2e0a14);
  color: var(--gold-warm);
  border: 1px solid rgba(201,162,39,0.4);
  border-radius: 6px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: all 0.2s ease;
  cursor: pointer;
}

.modal-btn:hover {
  background: linear-gradient(135deg, #6b1a30, #4a1020);
  border-color: rgba(232,200,116,0.55);
}

.modal-btn:active { opacity: 0.85; }

.btn-text {
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: rgba(61,15,28,0.5);
  cursor: pointer;
  font-weight: 600;
  transition: color 0.2s;
}

.btn-text:hover { color: #3D0F1C; }

/* ── Toast ── */
.share-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(60px);
  background: linear-gradient(135deg, var(--gold-warm), var(--gold-mid));
  color: var(--rich-burgundy);
  padding: 12px 28px;
  border-radius: 40px;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4), var(--glow-gold);
  z-index: 300;
  opacity: 0;
  transition: all 0.4s var(--ease-bounce);
  pointer-events: none;
}

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

/* ============================================================
   HERO DATE BADGE (top pill)
   ============================================================ */
.hero-top-badge {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 20px;
  border: 1px solid rgba(232,200,116,0.45);
  border-radius: 40px;
  background: rgba(26,5,8,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 4;
  position: relative;
  opacity: 0;
  animation: badge-fade-in 1s 2.5s var(--ease-smooth) forwards;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 14px rgba(201,162,39,0.12);
}

.badge-text {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--gold-warm);
  text-transform: uppercase;
}

@keyframes badge-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0);     }
}

/* ============================================================
   RESPONSIVE SAFE CLAMPS
   ============================================================ */
@media (max-height: 700px) {
  .hero-arch-container  { padding: 20px 18px; }
  .hero-initials        { font-size: 70px; }
  .hero-couple-name     { font-size: 36px; }
  .royal-date-number    { font-size: 72px; }
}

@media (max-width: 360px) {
  .hero-arch-container  { width: 94%; padding: 18px; }
  .hero-couple-name     { font-size: 38px; }
  .hero-initials        { font-size: 74px; }
}

/* ── Smooth entrance for main content ── */
#main-content {
  animation: none;
}

/* ============================================================
   COUNTDOWN TIMER BLOCK
   ============================================================ */
.countdown-block {
  text-align: center;
  padding: 36px 20px 28px;
  position: relative;
  z-index: 1;
  max-width: 390px;
  margin: 0 auto;
}

.countdown-label-top {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(61,15,28,0.45);
  margin-bottom: 4px;
}

.countdown-wedding-title {
  font-family: var(--font-brush);
  font-size: 42px;
  color: #2e0a14;
  line-height: 1.1;
  margin-bottom: 24px;
}

/* ── Countdown Grid ── */
.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* The digit card */
.cd-flip-box {
  width: 66px;
  height: 72px;
  background: linear-gradient(160deg, #2e0a14 0%, #1a0508 100%);
  border: 1px solid rgba(201,162,39,0.35);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow:
    0 6px 24px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(232,200,116,0.12),
    0 0 12px rgba(201,162,39,0.10);
  overflow: hidden;
}

/* Center horizontal groove line */
.cd-flip-box::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: rgba(201,162,39,0.18);
  pointer-events: none;
}

/* Top gloss sheen */
.cd-flip-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 45%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.06), transparent);
  border-radius: 8px 8px 0 0;
  pointer-events: none;
}

.cd-number {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  background: linear-gradient(160deg, var(--gold-shine) 0%, var(--gold-warm) 50%, var(--gold-mid) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  letter-spacing: -1px;
  transition: transform 0.18s ease, opacity 0.18s ease;
  position: relative;
  z-index: 1;
}

/* Flash animation when digit changes */
.cd-number.tick {
  animation: cd-tick 0.22s ease;
}

@keyframes cd-tick {
  0%   { transform: translateY(-6px); opacity: 0.4; }
  100% { transform: translateY(0);    opacity: 1;   }
}

.cd-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(61,15,28,0.55);
}

/* Date pill below the countdown */
.countdown-date-pill {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  color: rgba(61,15,28,0.45);
  text-transform: uppercase;
  border-top: 1px solid rgba(61,15,28,0.12);
  padding-top: 14px;
  width: 100%;
}

/* ── Post-wedding message ── */
.countdown-done-msg {
  font-family: var(--font-brush);
  font-size: 32px;
  color: #2e0a14;
  text-align: center;
  padding: 20px;
  animation: cd-unit-enter 0.8s var(--ease-bounce) both;
}
