/* ============================================
   NORAH - The Greatest Invitation
   Luxury Editorial Warmth - 3 Screens
   ============================================ */

:root {
  --ivory: #FAF6F1;
  --cream: #F5EDE4;
  --sand: #E8DDD0;
  --linen: #F0E8DE;
  --maroon: #6B2036;
  --maroon-deep: #4A1525;
  --maroon-soft: #8B3A52;
  --gold: #C4A35A;
  --gold-light: #D4B978;
  --gold-muted: #B8A080;
  --teak: #8B6B4E;
  --text-primary: #3D2B1F;
  --text-body: #564438;
  --text-secondary: #6B5A4E;
  --text-muted: #9B8B7E;
  --text-light: #B8A898;
  --text-on-maroon: #FAF6F1;
  --shadow-card: 0 2px 16px rgba(107,75,56,0.06), 0 8px 32px rgba(107,75,56,0.08);
  --shadow-float: 0 12px 48px rgba(107,75,56,0.14);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Inter', -apple-system, sans-serif;
  --font-hand: 'Dancing Script', cursive;
  --ease-cin: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-full: 9999px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-serif);
  color: var(--text-body);
  background: var(--ivory);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

#app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
}

/* === SCREEN SYSTEM === */
.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.screen--hidden { display: none; }

.screen__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.screen__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

/* Film grain - removed for cleaner look */

/* Vignette */
.screen::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(61,43,31,0.06) 100%);
}

/* Center-strip overlays (matches reference mockups) */
.screen__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Screen 1 door: top fade + center glow */
.screen__overlay--center-top {
  display: none;
}

/* Screens 2 & 3: vertical center strip glow */
.screen__overlay--center {
  display: none;
}



/* === PARTICLES === */
.particles-container {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}

/* Sunlight */
.sunlight-beam {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,230,170,0.06) 0%, transparent 50%);
  animation: sunlightDrift 25s var(--ease-soft) infinite alternate;
  will-change: transform;
}

/* ============================================
   GLOWING CROSS
   ============================================ */
.cross-glow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.cross-glow--small { margin-bottom: 16px; }
.cross-glow__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 14px rgba(196,163,90,0.25));
}
.cross-glow--small .cross-glow__icon svg { width: 22px; height: 22px; }
.cross-glow__ring {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(196,163,90,0.1);
  animation: crossPulse 4s var(--ease-soft) infinite;
}
.cross-glow--small .cross-glow__ring { width: 42px; height: 42px; }

.cross-small {
  font-size: 20px;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(196,163,90,0.18);
  margin-bottom: 16px;
}

/* ============================================
   GOLD DIVIDER
   ============================================ */
.gold-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}
.gold-divider--compact { margin: 10px 0; }
.gold-divider span:not(.gold-divider__dot) {
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-muted), transparent);
}
.gold-divider__dot {
  font-size: 8px;
  color: var(--gold);
  line-height: 1;
}

/* ============================================
   SCRIPTURE
   ============================================ */
.scripture {
  text-align: center;
  margin-bottom: 14px;
  opacity: 0;
  transform: translateY(12px);
  animation: scriptureReveal 3s var(--ease-cin) 1s forwards;
}
.scripture__text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.75;
  max-width: 280px;
  margin: 0 auto 6px;
  text-shadow: 0 0 12px rgba(250,246,241,0.9), 0 0 24px rgba(250,246,241,0.6);
}
.scripture__ref {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--teak);
  font-style: normal;
  text-shadow: 0 0 10px rgba(250,246,241,0.85), 0 0 20px rgba(250,246,241,0.5);
}

/* ============================================
   FRAMER MOTION-STYLE STAGGERED ENTRANCE
   ============================================ */
.fm {
  opacity: 0;
  transform: translateY(28px);
  animation: fmEntrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.fm-1 { animation-delay: 0.3s; }
.fm-2 { animation-delay: 0.7s; }
.fm-3 { animation-delay: 1.1s; }
.fm-4 { animation-delay: 1.5s; }
.fm-5 { animation-delay: 1.9s; }
.fm-6 { animation-delay: 2.4s; }

@keyframes fmEntrance {
  0% { opacity: 0; transform: translateY(28px) scale(0.97); }
  60% { opacity: 1; transform: translateY(-3px) scale(1.005); }
  80% { transform: translateY(1px) scale(1); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================
   SCREEN 1 - DOOR
   ============================================ */
.door-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 24px 40px;
  position: relative;
  z-index: 10;
}
.door-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Small cross */
.door-cross {
  font-size: 18px;
  color: var(--text-body);
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(250,246,241,0.8);
  opacity: 0.7;
}

/* Bible verse */
.door-scripture {
  text-align: center;
  margin-bottom: 12px;
}
.door-scripture p {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: var(--maroon-deep);
  line-height: 1.75;
  max-width: 270px;
  margin: 0 auto 6px;
}
.door-scripture cite {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--maroon-deep);
  font-style: normal;
  opacity: 0.8;
}

/* Compact gold divider */
.gold-divider--compact {
  margin: 8px 0 10px;
}

/* Welcome */
.door-eyebrow {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--maroon-deep);
  margin-bottom: 2px;
}

/* NORAH title */
.door-title {
  font-family: var(--font-serif);
  font-size: clamp(52px, 15vw, 76px);
  font-weight: 500;
  color: var(--maroon-deep);
  letter-spacing: 4px;
  line-height: 1;
  position: relative;
}

/* Subtitle */
.door-subtitle {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 500;
  font-style: italic;
  color: var(--maroon-deep);
  line-height: 1.65;
  margin-top: 8px;
}

/* Footer */
.door-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.door-quote {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 500;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.55;
  text-align: center;
  text-shadow: 0 0 14px rgba(250,246,241,0.9), 0 0 28px rgba(250,246,241,0.5);
}
/* Tap to Open Button */
.door-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--maroon);
  color: var(--text-on-maroon);
  border: none;
  border-radius: var(--r-full);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(107, 32, 54, 0.3);
  transition: all 0.4s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  animation: ctaPulse 3s var(--ease-soft) infinite;
}
.door-cta-btn:active { transform: scale(0.92); }
.door-cta-btn:hover {
  background: var(--maroon-deep);
  box-shadow: 0 8px 36px rgba(107, 32, 54, 0.4);
}
.door-cta-btn svg { color: var(--gold-light); flex-shrink: 0; }

/* Animated hand tap gesture */
.hand-icon {
  animation: handTap 1.8s ease-in-out infinite;
  transform-origin: 50% 85%;
}
@keyframes handTap {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  15% { transform: translateY(2px) rotate(-8deg) scale(0.92); }
  30% { transform: translateY(0) rotate(0deg) scale(1); }
  50% { transform: translateY(0); }
}

/* ============================================
   SCREEN 2 - INVITATION
   ============================================ */
#screen-invitation {
  min-height: auto;
  padding-bottom: 60px;
}
.invitation-content {
  position: relative;
  z-index: 10;
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.invitation-eyebrow {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--teak);
  margin-bottom: 16px;
}
.invitation-hosts {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  font-style: italic;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.invitation-invite {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.65;
  margin-bottom: 36px;
}
.invitation-name {
  font-family: var(--font-display);
  font-size: clamp(44px, 13vw, 64px);
  font-weight: 600;
  color: var(--maroon);
  letter-spacing: 12px;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
}
.invitation-name::after {
  content: 'NORAH';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 25%, rgba(196,163,90,0.08) 50%, transparent 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 8s var(--ease-soft) infinite;
}
.invitation-tagline {
  font-family: var(--font-serif);
  font-size: 17px;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 48px;
  max-width: 260px;
}

/* Details Card */
.details-card {
  width: 100%;
  max-width: 356px;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.5);
  border: 1px solid rgba(232,221,208,0.3);
  margin-bottom: 32px;
}
.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  text-align: left;
}
.detail-row + .detail-row { border-top: 1px solid rgba(184,160,128,0.1); }
.detail-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(184,160,128,0.1);
}
.detail-icon svg { width: 18px; height: 18px; color: var(--maroon-soft); }
.detail-info { display: flex; flex-direction: column; gap: 2px; }
.detail-label {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--maroon-soft);
}
.detail-value {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
.detail-extra {
  font-family: var(--font-serif);
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.45;
}

/* Action Cards */
.action-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 356px;
}
.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.5s var(--ease-soft);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.action-card:active { transform: scale(0.95); }
.action-card--primary {
  background: var(--maroon);
  color: var(--text-on-maroon);
  box-shadow: 0 4px 24px rgba(107,32,54,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
}
.action-card--secondary {
  background: rgba(255,255,255,0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  border: 1px solid rgba(232,221,208,0.35);
}
.action-card__icon { display: flex; align-items: center; justify-content: center; }
.action-card__icon svg { width: 24px; height: 24px; }
.action-card--primary .action-card__icon svg { color: var(--text-on-maroon); }
.action-card--secondary .action-card__icon svg { color: var(--maroon-soft); }
.action-card__title {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.action-card__desc {
  font-family: var(--font-serif);
  font-size: 12px;
  font-style: italic;
  opacity: 0.8;
  text-align: center;
}

/* ============================================
   SCREEN 3 - CLOSING
   ============================================ */
#screen-closing {
  min-height: auto;
  padding-bottom: 60px;
}
.closing-content {
  position: relative;
  z-index: 10;
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.closing-heading {
  font-family: var(--font-display);
  font-size: clamp(40px, 11vw, 52px);
  font-weight: 500;
  color: var(--maroon);
  line-height: 1.1;
  margin-bottom: 8px;
}
.closing-quote {
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: 8px;
  max-width: 280px;
}
.closing-quote strong { font-weight: 700; color: var(--text-primary); }
.closing-subquote {
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 48px;
  max-width: 250px;
}

/* Prayer Card */
.prayer-card {
  width: 100%;
  max-width: 300px;
  background: linear-gradient(155deg, rgba(255,252,245,0.9), rgba(245,237,228,0.9));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255,255,255,0.6);
  border: 1px solid rgba(232,221,208,0.2);
  margin-bottom: 40px;
}
.prayer-card__cross {
  font-size: 18px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 16px;
  text-shadow: 0 0 12px rgba(196,163,90,0.2);
}
.prayer-card__text {
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.8;
  text-align: center;
}
.prayer-card__amen {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  font-style: italic;
  color: var(--maroon);
  text-align: center;
  margin-top: 20px;
  letter-spacing: 2px;
}

/* Hosts Card */
.hosts-card {
  width: 100%;
  max-width: 280px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--r-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(232,221,208,0.25);
  margin-bottom: 32px;
  text-align: center;
}
.hosts-card__names {
  font-family: var(--font-hand);
  font-size: 28px;
  color: var(--maroon);
  margin-bottom: 4px;
}
.hosts-card__tagline {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--teak);
}

/* Handwritten */
.handwritten {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 36px;
  max-width: 260px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 2.5s var(--ease-cin), transform 2.5s var(--ease-cin);
}
.handwritten.is-visible { opacity: 1; transform: translateY(0); }

/* CTA */
.cta-final {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 40px;
  background: var(--maroon);
  color: var(--text-on-maroon);
  border: none;
  border-radius: var(--r-full);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(107,32,54,0.2), inset 0 1px 0 rgba(255,255,255,0.08);
  transition: all 0.5s var(--ease-soft);
  animation: breathe 5s var(--ease-soft) infinite;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 40px;
}
.cta-final:active { transform: scale(0.95); }
.cta-final svg { width: 15px; height: 15px; }

/* Presence Note */
.presence-note {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  font-style: italic;
  color: #FFFFFF !important;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 4px rgba(0,0,0,0.3);
}

/* Closing Scripture */
.closing-scripture {
  text-align: center;
  margin-bottom: 32px;
  max-width: 280px;
}
.closing-scripture p {
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.75;
  margin-bottom: 6px;
}
.closing-scripture cite {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teak);
  font-style: normal;
}

.closing-signoff {
  font-family: var(--font-serif);
  font-size: 14px;
  font-style: italic;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================================
   CANDLE GLOW
   ============================================ */
.candle-glow {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,200,100,0.08) 0%, transparent 65%);
  animation: candleFlicker 4s ease-in-out infinite alternate;
}
.candle-glow--1 { bottom: 15%; right: -20%; }
.candle-glow--2 { top: 25%; left: -15%; animation-delay: 2s; }

/* ============================================
   AUDIO TOGGLE
   ============================================ */
.audio-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 60;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(184,160,128,0.25);
  background: rgba(250,246,241,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.5s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  opacity: 0;
  transform: scale(0.8);
  padding: 0;
}
.audio-toggle--visible { opacity: 1; transform: scale(1); }
.audio-toggle:active { transform: scale(0.88); }

.audio-bars { display: flex; align-items: flex-end; gap: 2.5px; height: 16px; }
.audio-bar {
  width: 2.5px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: background 0.4s;
  height: 3px;
}
.audio-toggle--playing .audio-bar { background: var(--maroon); }

.audio-bar:nth-child(1) { animation: ab1 1.2s ease-in-out infinite paused; }
.audio-bar:nth-child(2) { animation: ab2 1.0s ease-in-out .15s infinite paused; }
.audio-bar:nth-child(3) { animation: ab3 1.4s ease-in-out .3s infinite paused; }
.audio-bar:nth-child(4) { animation: ab4 0.9s ease-in-out .1s infinite paused; }

.audio-toggle--playing .audio-bar { animation-play-state: running; }

/* ============================================
   DOOR TRANSITION
   ============================================ */
.door-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle, rgba(255,230,170,0.82) 0%, rgba(250,246,241,0.92) 40%, var(--ivory) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 2.2s var(--ease-cin);
  display: flex;
  align-items: center;
  justify-content: center;
}
.door-transition-overlay--active { opacity: 1; pointer-events: all; }

.door-transition-cross {
  font-size: 32px;
  color: var(--gold);
  opacity: 0;
  transform: scale(0.5);
  transition: all 1.5s var(--ease-cin) 0.3s;
  text-shadow: 0 0 36px rgba(196,163,90,0.35);
}
.door-transition-overlay--active .door-transition-cross {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   PETAL BURST & CONFETTI
   ============================================ */
.petal-burst {
  position: fixed;
  inset: 0;
  z-index: 99;
  pointer-events: none;
  overflow: hidden;
}
.petal {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50% 0 50% 50%;
  opacity: 0;
  will-change: transform, opacity;
}
.confetti-container {
  position: fixed;
  inset: 0;
  z-index: 1500;
  pointer-events: none;
  overflow: hidden;
}
.confetti-heart {
  position: absolute;
  font-size: 16px;
  opacity: 0;
  will-change: transform, opacity;
}

/* ============================================
   RSVP MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(61,43,31,0.28);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-soft);
}
.modal-overlay--active { opacity: 1; pointer-events: all; }

.modal-content {
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: var(--ivory);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 24px 24px 56px;
  transform: translateY(100%);
  transition: transform 0.7s var(--ease-cin);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 -8px 40px rgba(107,75,56,0.1);
}
.modal-overlay--active .modal-content { transform: translateY(0); }

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--sand);
  border-radius: var(--r-full);
  margin: 0 auto 24px;
}
.modal-header { text-align: center; margin-bottom: 20px; }
.modal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  color: var(--maroon);
  letter-spacing: 5px;
}
.modal-subtitle {
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(232,221,208,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.modal-close:active { transform: scale(0.85); }
.modal-question {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 24px;
}

.rsvp-options { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.rsvp-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.6);
  border: 1.5px solid rgba(232,221,208,0.35);
  cursor: pointer;
  transition: all 0.4s var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  color: inherit;
}
.rsvp-option:active { transform: scale(0.98); }
.rsvp-option:hover {
  border-color: rgba(196,163,90,0.3);
  background: rgba(255,255,255,0.8);
}
.rsvp-option--selected {
  border-color: var(--maroon);
  background: rgba(107,32,54,0.05);
  box-shadow: 0 2px 16px rgba(107,32,54,0.08);
}
.rsvp-option__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--cream);
  color: var(--text-secondary);
}
.rsvp-option__icon--heart {
  background: var(--maroon);
  color: var(--text-on-maroon);
}
.rsvp-option__text { flex: 1; text-align: left; }
.rsvp-option__title { font-family: var(--font-serif); font-size: 16px; font-weight: 600; color: var(--text-primary); }
.rsvp-option__subtitle { font-family: var(--font-serif); font-size: 12px; font-style: italic; color: var(--text-secondary); }
.rsvp-option__arrow { color: var(--text-light); font-size: 20px; }

.modal-contact { text-align: center; margin-top: 8px; }
.modal-contact__blessing { font-family: var(--font-hand); font-size: 18px; color: var(--text-body); margin-bottom: 12px; }
.modal-contact__name { font-family: var(--font-serif); font-size: 15px; font-style: italic; color: var(--text-body); margin-bottom: 4px; }
.modal-contact__phone {
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--maroon-soft);
  text-decoration: none;
  letter-spacing: 1px;
  font-weight: 500;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.4s var(--ease-cin), transform 1.4s var(--ease-cin);
}
.reveal--visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.15s; }
.reveal-d2 { transition-delay: 0.3s; }
.reveal-d3 { transition-delay: 0.45s; }
.reveal-d4 { transition-delay: 0.6s; }
.reveal-d5 { transition-delay: 0.75s; }
.reveal-d6 { transition-delay: 0.9s; }

/* Scroll Progress */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-muted), var(--maroon-soft), var(--gold));
  z-index: 999;
  transition: width 0.08s linear;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--maroon);
  color: var(--text-on-maroon);
  padding: 14px 28px;
  border-radius: var(--r-full);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  box-shadow: 0 8px 36px rgba(107,32,54,0.3);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.6s var(--ease-cin);
  white-space: nowrap;
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================
   COUNTDOWN TIMER
   ============================================ */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 24px;
}
.countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding: 10px 6px;
  background: rgba(107, 32, 54, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(196, 163, 90, 0.2);
}
.countdown__number {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--maroon);
  line-height: 1;
  letter-spacing: 1px;
}
.countdown__label {
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}
.countdown__sep {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 300;
  color: var(--gold-muted);
  padding-bottom: 14px;
}

/* ============================================
   ADD TO CALENDAR
   ============================================ */
.add-to-calendar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding: 14px 28px;
  background: var(--maroon);
  border: none;
  border-radius: var(--r-full);
  color: var(--text-on-maroon);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(107, 32, 54, 0.25);
  transition: all 0.4s var(--ease-cin);
  -webkit-tap-highlight-color: transparent;
}
.add-to-calendar:active {
  transform: scale(0.95);
}
.add-to-calendar:hover {
  background: var(--maroon-deep);
  box-shadow: 0 6px 28px rgba(107, 32, 54, 0.35);
}
.add-to-calendar svg {
  color: var(--gold-light);
  flex-shrink: 0;
}

/* ============================================
   CONFETTI BURST (for RSVP)
   ============================================ */
.confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  will-change: transform, opacity;
  animation: confettiBurst 2.5s ease-out forwards;
}

@keyframes fadeInUp { from { opacity:0; transform:translateY(28px); } to { opacity:1; transform:translateY(0); } }
@keyframes scriptureReveal { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
@keyframes breathe { 0%,100% { transform:scale(1); } 50% { transform:scale(1.05); } }
@keyframes ctaPulse { 0%,100% { opacity:1; box-shadow: 0 2px 20px rgba(107,32,54,0.1); } 50% { opacity:0.88; box-shadow: 0 2px 28px rgba(107,32,54,0.18); } }
@keyframes ripple { 0% { transform:scale(1); opacity:.35; } 60% { transform:scale(1.2); opacity:0; } 100% { transform:scale(1); opacity:0; } }
@keyframes shimmer { 0% { background-position:-200% center; } 100% { background-position:200% center; } }
@keyframes crossPulse { 0%,100% { transform:scale(1); opacity:.35; } 50% { transform:scale(1.12); opacity:.1; } }
@keyframes sunlightDrift { 0% { transform:translate(0,0); } 100% { transform:translate(20px,10px); } }
@keyframes candleFlicker { 0% { opacity:.45; transform:scale(1); } 25% { opacity:.7; transform:scale(1.03); } 50% { opacity:.4; transform:scale(.97); } 75% { opacity:.75; transform:scale(1.02); } 100% { opacity:.5; transform:scale(1); } }
@keyframes ab1 { 0%,100% { height:30%; } 50% { height:70%; } }
@keyframes ab2 { 0%,100% { height:60%; } 50% { height:30%; } }
@keyframes ab3 { 0%,100% { height:40%; } 50% { height:80%; } }
@keyframes ab4 { 0%,100% { height:70%; } 50% { height:40%; } }
@keyframes particleDrift { 0% { transform:translateY(0) scale(0); opacity:0; } 10% { opacity:.4; transform:translateY(-10vh) scale(1); } 90% { opacity:.15; } 100% { transform:translateY(-105vh) translateX(30px) scale(.2); opacity:0; } }
@keyframes petalFall { 0% { opacity:1; transform:translateY(0) translateX(0) rotate(0deg) scale(1); } 100% { opacity:0; transform:translateY(80vh) translateX(var(--drift)) rotate(var(--spin)) scale(.3); } }
@keyframes confettiFall { 0% { opacity:1; transform:translateY(0) scale(1); } 100% { opacity:0; transform:translateY(60vh) scale(.5); } }
@keyframes confettiBurst {
  0% { opacity:1; transform:translateY(0) translateX(0) rotate(0deg) scale(1); }
  100% { opacity:0; transform:translateY(var(--fall-y, 80vh)) translateX(var(--drift-x, 0px)) rotate(var(--spin, 720deg)) scale(0.3); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width:481px) { #app { box-shadow:0 0 100px rgba(107,75,56,0.05); } }
@media (max-width:360px) {
  .door-title, .invitation-name { letter-spacing:5px; }
  .details-card { padding:16px 18px; }
  .door-content { padding:44px 20px 36px; }
  .scripture__text { font-size:13px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; }
  .reveal { opacity:1; transform:none; }
  .screen::before,.screen::after { display:none; }
}
@supports (padding-top:env(safe-area-inset-top)) {
  .door-content { padding-top:calc(56px + env(safe-area-inset-top)); }
}
