/* ==========================================================================
   Fayyad & Sumayyah Wedding Invitation
   Color Theme: Sage Green, Ivory White, and Gold Accents
   Fully Mobile-Optimized
/* Suppress Powered by Netlify Badge & Drawer */
#nl-badge-frame,
iframe#nl-badge-frame,
iframe[title="Powered by Netlify"],
iframe[data-nl-ready],
.netlify-badge,
[data-netlify-badge] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  clip: rect(0, 0, 0, 0) !important;
  z-index: -99999 !important;
}

:root {
  /* Botanical Forest & Sage Palette (Extracted from Invitation Artwork) */
  --emerald-noir: #16221A;
  --emerald-deep: #1F2E23;
  --sage-dark: #1F2E23;
  --sage-primary: #3E4D3A;
  --sage-medium: #606E57;
  --sage-soft: #8A9A82;
  --sage-light: #E8E2D5;
  --sage-ultra-light: #F4F0E8;
  --sage-mist: rgba(62, 77, 58, 0.08);

  /* Brushed Antique Gold Palette (#B88B4A / #C59B53) */
  --gold-primary: #B88B4A;
  --gold-light: #E5C888;
  --gold-medium: #C59B53;
  --gold-dark: #8F682E;
  --gold-gradient: linear-gradient(135deg, #E5C888 0%, #B88B4A 45%, #F4DFB0 65%, #8F682E 100%);
  --gold-gradient-soft: linear-gradient(135deg, rgba(184, 139, 74, 0.2) 0%, rgba(229, 200, 136, 0.4) 100%);
  --gold-border: linear-gradient(135deg, #E5C888, #B88B4A, #8F682E);

  /* Vintage Parchment & Ivory Blossom (#F4F0E8 / #E8E2D5 / #FDFBF7) */
  --color-white: #FDFBF7;
  --color-ivory: #F4F0E8;
  --color-cream: #E8E2D5;
  --color-cream-border: #D8CFC0;

  /* Typography Colors */
  --text-dark: #16221A;
  --text-body: #1F2E23;
  --text-muted: #606E57;
  --text-gold: #B88B4A;

  /* Fonts */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Cinzel', serif;
  --font-script: 'Alex Brush', cursive;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Elevations & Shadows */
  --shadow-sm: 0 4px 12px rgba(63, 80, 61, 0.05);
  --shadow-md: 0 8px 24px rgba(63, 80, 61, 0.08);
  --shadow-lg: 0 16px 40px rgba(63, 80, 61, 0.12);
  --shadow-gold: 0 8px 30px rgba(212, 175, 55, 0.25);
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(212, 175, 55, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-ivory);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 10% 20%, rgba(94, 114, 90, 0.03) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(212, 175, 55, 0.04) 0%, transparent 40%);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

button, input, select, textarea {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

.text-center {
  text-align: center;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(250, 248, 243, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(250, 248, 243, 0.98);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo .logo-initials {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 3px;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 28px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  position: relative;
  padding: 6px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--gold-gradient);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links .nav-rsvp-btn {
  background: var(--gold-gradient);
  color: #FFFFFF !important;
  padding: 9px 22px;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-links .nav-rsvp-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.nav-links .nav-rsvp-btn::after {
  display: none;
}

.audio-btn {
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--gold-medium);
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  flex-shrink: 0;
  color: #263524;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  touch-action: manipulation;
}

.audio-btn .audio-btn-label {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .audio-btn {
    padding: 0 10px;
    height: 34px;
    font-size: 0.68rem;
  }
}

.audio-btn:hover {
  transform: translateY(-1px);
  background: #FFFFFF;
  border-color: var(--gold-primary);
}

.audio-btn.playing {
  border-color: var(--gold-primary);
  box-shadow: 0 0 14px rgba(212, 175, 55, 0.6);
  animation: pulseAudio 2.5s infinite;
}

@keyframes pulseAudio {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  transition: var(--transition);
  border-radius: 2px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px 20px 80px;
  background-image: url('assets/hero_bg.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(250, 248, 243, 0.74) 0%, rgba(250, 248, 243, 0.95) 85%);
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 44px 32px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 35px rgba(212, 175, 55, 0.12);
}

/* Bismillah & Calligraphy */
.bismillah-wrapper {
  margin-bottom: 20px;
}

.bismillah-arabic {
  font-family: 'Amiri', serif;
  font-size: clamp(1.65rem, 4.2vw, 2.25rem);
  direction: rtl;
  unicode-bidi: isolate;
  letter-spacing: 0 !important;
  word-spacing: normal;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
  color: var(--sage-dark);
  line-height: 1.45;
  margin: 0 auto 4px;
  filter: drop-shadow(0 2px 4px rgba(212, 175, 55, 0.2));
}

.bismillah-translation {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  letter-spacing: 0.5px;
  color: var(--sage-medium);
  margin-top: 4px;
}

/* Quranic Verse Box */
.quran-verse {
  margin: 20px auto;
  max-width: 660px;
  padding: 18px 20px;
  background: rgba(235, 241, 234, 0.65);
  border-left: 2.5px solid var(--gold-primary);
  border-right: 2.5px solid var(--gold-primary);
  border-radius: var(--radius-sm);
}

.arabic-quote {
  font-family: 'Amiri', serif;
  font-size: clamp(1.25rem, 3.2vw, 1.5rem);
  direction: rtl;
  unicode-bidi: isolate;
  letter-spacing: 0 !important;
  word-spacing: normal;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
  color: var(--sage-dark);
  margin-bottom: 10px;
  line-height: 2;
}

.english-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 6px;
}

.quran-verse cite {
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-gold);
  font-weight: 600;
  display: block;
}

/* Couple Names & Title */
.invitation-lead {
  margin: 28px 0 20px;
}

.sub-greeting {
  display: block;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 3.5px;
  color: var(--sage-medium);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-weight: 600;
}

.couple-names {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.name-groom, .name-bride {
  display: inline-block;
  background: linear-gradient(135deg, var(--sage-dark) 20%, #202A1F 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.name-ampersand {
  font-family: var(--font-script);
  font-size: 1.2em;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0 12px;
  font-weight: 400;
}

.invitation-text {
  font-size: 1.02rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 12px;
}

.wedding-tag {
  display: inline-block;
  padding: 5px 18px;
  border-radius: 40px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--gold-medium);
}

.tag-accent {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 2.5px;
  color: var(--gold-dark);
  font-weight: 700;
}

/* Meta Information */
.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}

.meta-icon {
  font-size: 1.5rem;
}

.meta-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  color: var(--text-dark);
  letter-spacing: 0.5px;
}

.meta-text small {
  color: var(--sage-primary);
  font-size: 0.88rem;
  font-weight: 500;
}

.meta-divider {
  color: var(--gold-medium);
  font-weight: 300;
  font-size: 1.4rem;
}

/* Countdown Timer */
.countdown-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 32px auto;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 460px;
  width: 100%;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 58px;
}

.count-number {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sage-dark);
  line-height: 1;
}

.count-label {
  font-size: 0.7rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-gold);
  margin-top: 5px;
  font-weight: 600;
}

.countdown-colon {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-primary);
  margin-top: -10px;
}

/* Buttons */
.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  min-height: 46px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.4px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
}

.btn-gold {
  background: var(--gold-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.35);
}

.btn-gold:hover, .btn-gold:active {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.45);
}

.shimmer-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 80%
  );
  transform: rotate(30deg) translateX(-100%);
  animation: shimmer 4s infinite;
}

@keyframes shimmer {
  0% { transform: rotate(30deg) translateX(-120%); }
  30%, 100% { transform: rotate(30deg) translateX(120%); }
}

.btn-outline-sage {
  background: transparent;
  color: var(--sage-dark);
  border: 1.5px solid var(--sage-primary);
}

.btn-outline-sage:hover, .btn-outline-sage:active {
  background: var(--sage-primary);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-ghost-gold {
  background: rgba(255, 255, 255, 0.8);
  color: var(--gold-dark);
  border: 1px solid var(--gold-medium);
}

.btn-ghost-gold:hover, .btn-ghost-gold:active {
  background: #FFFFFF;
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 9px 18px;
  font-size: 0.86rem;
  min-height: 40px;
}

.btn-large {
  padding: 16px 36px;
  font-size: 1.05rem;
  width: 100%;
  max-width: 320px;
  min-height: 52px;
}

.scroll-indicator {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--sage-medium);
  font-size: 0.76rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mouse-icon {
  width: 18px;
  height: 30px;
  border: 2px solid var(--sage-soft);
  border-radius: 12px;
  position: relative;
}

.mouse-icon::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 6px;
  background: var(--gold-primary);
  border-radius: 2px;
  animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 12px); }
}

/* ==========================================================================
   Section Headers & Ornaments
   ========================================================================== */
.section {
  padding: 88px 0;
  position: relative;
}

.gold-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px auto;
  color: var(--gold-primary);
}

.gold-ornament .line {
  display: inline-block;
  width: 60px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-primary), transparent);
}

.gold-ornament .star {
  font-size: 0.95rem;
  color: var(--gold-primary);
}

.section-header {
  margin-bottom: 48px;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 3.5px;
  color: var(--text-gold);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.25;
}

.section-subtitle {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 10px auto 0;
}

/* ==========================================================================
   Official Invitation Flyer Showcase Section
   ========================================================================== */
.invitation-card-section {
  background: linear-gradient(180deg, var(--color-ivory) 0%, #FFFFFF 100%);
  padding: 80px 0;
}

.flyer-card-wrapper {
  max-width: 520px;
  margin: 0 auto;
}

.flyer-card-frame {
  background: var(--color-white);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--gold-primary);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(212, 175, 55, 0.2);
  transition: var(--transition);
}

.flyer-card-frame:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 45px rgba(212, 175, 55, 0.3);
}

.flyer-img {
  width: 100%;
  border-radius: calc(var(--radius-lg) - 8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  cursor: pointer;
}

.flyer-card-frame:hover .flyer-img {
  transform: scale(1.01);
}

.flyer-caption {
  margin: 16px 0 14px;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--gold-dark);
  font-weight: 600;
}

.flyer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Events & Schedule Section
   ========================================================================== */
.events-section {
  background: #FAF8F3;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-bottom: 56px;
}

.event-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg), 0 0 25px rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
}

.event-image-wrap {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: #EAE6DE;
}

.event-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.event-card:hover .event-img {
  transform: scale(1.05);
}

.event-badge {
  position: absolute;
  bottom: 14px;
  left: 16px;
  background: rgba(32, 42, 31, 0.88);
  backdrop-filter: blur(8px);
  color: var(--gold-light);
  padding: 5px 14px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 1.5px;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.event-content {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.event-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 12px;
}

.event-title {
  font-family: var(--font-serif);
  font-size: 1.65rem;
  color: var(--text-dark);
}

.event-time {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-gold);
  white-space: nowrap;
}

.event-date {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sage-primary);
  margin-bottom: 14px;
}

.event-venue-info {
  background: var(--sage-mist);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border-left: 3px solid var(--sage-soft);
  font-size: 0.9rem;
}

.event-venue-info strong {
  color: var(--text-dark);
}

.event-desc {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 18px;
}

.event-perks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 0.88rem;
  color: var(--sage-dark);
  font-weight: 500;
}

.event-card-actions {
  margin-top: auto;
}

.btn-card-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gold-gradient-soft);
  border: 1px solid var(--gold-primary);
  color: var(--gold-dark);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-card-gold:hover, .btn-card-gold:active {
  background: var(--gold-gradient);
  color: #FFFFFF;
}

/* Timeline Flow Bar */
.timeline-box {
  background: var(--color-white);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 28px;
}

.timeline-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.timeline-step {
  text-align: center;
  padding: 16px 12px;
  background: var(--sage-ultra-light);
  border-radius: var(--radius-sm);
  border-top: 3px solid var(--sage-soft);
  transition: var(--transition);
}

.timeline-step.active {
  background: rgba(212, 175, 55, 0.08);
  border-top-color: var(--gold-primary);
}

.step-time {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--text-gold);
  margin-bottom: 4px;
}

.step-title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.step-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Venue & Real Masjid Section
   ========================================================================== */
.venue-section {
  background: linear-gradient(180deg, #FAF8F3 0%, #FFFFFF 100%);
}

.venue-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.venue-subtitle {
  font-size: 1.12rem;
  color: var(--sage-primary);
  font-weight: 500;
  margin-top: 4px;
}

.venue-lead-text {
  font-size: 1.02rem;
  color: var(--text-body);
  margin: 18px 0 24px;
}

.venue-features-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 28px;
}

.venue-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.vf-icon {
  font-size: 1.6rem;
  background: var(--sage-light);
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  flex-shrink: 0;
}

.venue-feature strong {
  display: block;
  color: var(--text-dark);
  font-size: 0.98rem;
}

.venue-feature p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.venue-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.venue-media-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.masjid-real-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gold-medium);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.masjid-photo {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.masjid-real-card:hover .masjid-photo {
  transform: scale(1.02);
}

.masjid-caption-bar {
  background: #FAF8F3;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  color: var(--sage-dark);
  font-weight: 600;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.map-card-frame {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.35);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-card-header {
  background: #FAF8F3;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.map-dot.red { background: #FF5F56; }
.map-dot.yellow { background: #FFBD2E; }
.map-dot.green { background: #27C93F; }

.map-location-title {
  margin-left: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dark);
}

.map-embed-container {
  position: relative;
  background: #E8ECE6;
}

/* ==========================================================================
   Guest Guide Section
   ========================================================================== */
.guide-section {
  background: var(--sage-ultra-light);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.guide-card {
  background: var(--color-white);
  padding: 28px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(212, 175, 55, 0.2);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold-medium);
}

.guide-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.guide-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.6;
}

.palette-swatches {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.swatch:hover {
  transform: scale(1.15);
}

.swatch.sage { background: #60725B; }
.swatch.light-sage { background: #9CAF88; }
.swatch.ivory { background: #FAF8F3; }
.swatch.white { background: #FFFFFF; }
.swatch.gold { background: linear-gradient(135deg, #ECC880, #D4AF37); }

/* ==========================================================================
   RSVP Section & Forms (No Dietary)
   ========================================================================== */
.rsvp-section {
  background: #FAF8F3;
  padding: 90px 0;
}

.rsvp-card-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.rsvp-card-border {
  background: var(--gold-border);
  padding: 2px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(212, 175, 55, 0.15);
}

.rsvp-inner {
  background: var(--color-white);
  border-radius: calc(var(--radius-lg) - 2px);
  padding: 48px 36px;
}

.rsvp-intro {
  margin-bottom: 36px;
}

.rsvp-instructions {
  font-size: 0.98rem;
  color: var(--text-muted);
  max-width: 580px;
  margin: 10px auto 0;
}

.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-cream-border);
  background: #FAF8F3;
  color: var(--text-dark);
  font-size: 16px; /* Prevents auto-zoom on iOS Safari */
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
}

.form-textarea {
  resize: vertical;
}

/* Number Stepper */
.number-stepper {
  display: flex;
  align-items: center;
  max-width: 180px;
  width: 100%;
  background: #FAF8F3;
  border: 1.5px solid var(--color-cream-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.step-btn {
  width: 48px;
  height: 44px;
  background: rgba(212, 175, 55, 0.1);
  border: none;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  touch-action: manipulation;
}

.step-btn:hover, .step-btn:active {
  background: rgba(212, 175, 55, 0.25);
}

.step-input {
  width: calc(100% - 96px);
  text-align: center;
  border: none;
  background: transparent;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-dark);
  pointer-events: none;
}

.form-submit-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

/* RSVP Success State */
.rsvp-success-box {
  text-align: center;
  padding: 30px 16px;
  animation: fadeIn 0.5s ease;
}

.success-icon {
  font-size: 3.2rem;
  margin-bottom: 10px;
}

.success-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.success-subtitle {
  font-size: 1.02rem;
  color: var(--sage-primary);
  margin-bottom: 22px;
}

.success-summary-card {
  background: var(--sage-ultra-light);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius-md);
  padding: 22px;
  max-width: 500px;
  margin: 0 auto 26px;
  text-align: left;
  line-height: 1.8;
}

.success-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Host Portal Toggle */
.host-portal-toggle {
  text-align: center;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px dashed var(--color-cream-border);
}

.host-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.host-link:hover {
  color: var(--text-gold);
}

/* ==========================================================================
   Host Management Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(32, 42, 31, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gold-medium);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 920px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-cream-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAF8F3;
}

.modal-title-group h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--text-dark);
}

.modal-title-group p {
  font-size: 0.82rem;
  color: var(--sage-primary);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: var(--text-dark);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-badge {
  background: var(--sage-ultra-light);
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 175, 55, 0.2);
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sage-dark);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.modal-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-input {
  flex-grow: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-cream-border);
  font-size: 16px;
}

.btn-danger {
  background: #FFF2F2;
  color: #D32F2F;
  border: 1px solid #FFCDD2;
}

.btn-danger:hover {
  background: #D32F2F;
  color: #FFFFFF;
}

.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--color-cream-border);
  border-radius: var(--radius-sm);
}

.rsvp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.rsvp-table th, .rsvp-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--color-cream-border);
}

.rsvp-table th {
  background: #FAF8F3;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
}

.rsvp-table tr:hover {
  background: rgba(235, 241, 234, 0.4);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.badge-gold {
  background: rgba(212, 175, 55, 0.18);
  color: #8C6A1E;
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.badge-sage {
  background: var(--sage-light);
  color: var(--sage-dark);
  border: 1px solid var(--sage-soft);
}

.badge-decline {
  background: #FFF2F2;
  color: #C62828;
  border: 1px solid #FFCDD2;
}

.empty-notice {
  padding: 32px 16px;
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   Sticky Mobile RSVP Bar
   ========================================================================== */
.mobile-sticky-rsvp {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 990;
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-sticky-rsvp.visible {
  transform: translateY(0);
}

.sticky-text {
  display: flex;
  flex-direction: column;
}

.sticky-text strong {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.2;
}

.sticky-text span {
  font-size: 0.76rem;
  color: var(--sage-primary);
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--sage-dark);
  color: #FAF8F3;
  padding: 70px 0 80px; /* Extra bottom padding for mobile sticky bar */
  position: relative;
}

.footer-seal {
  margin-bottom: 18px;
}

.gold-monogram {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border: 2px solid var(--gold-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-light);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.footer-names {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.footer-location {
  font-size: 0.92rem;
  color: var(--gold-light);
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-dua {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 18px;
  color: #E2EADF;
}

.arabic-subtext {
  font-family: 'Amiri', serif;
  font-style: normal;
  font-size: 1.35rem;
  direction: rtl;
  unicode-bidi: isolate;
  letter-spacing: 0 !important;
  word-spacing: normal;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
  line-height: 1.8;
  display: block;
  margin-top: 10px;
  color: var(--gold-light);
}

.copyright {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 20px;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.animate-fade-in { animation: fadeIn 1s ease forwards; }
.animate-fade-down { animation: fadeDown 1s ease forwards; }
.animate-fade-up { animation: fadeUp 1s ease forwards; }

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */
@media (max-width: 900px) {
  .venue-wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(250, 248, 243, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.05rem;
    padding: 8px 0;
    width: 100%;
    text-align: center;
  }

  .nav-links .nav-rsvp-btn {
    width: 100%;
    max-width: 260px;
    margin: 6px auto 0;
  }

  .hero-section {
    padding: 110px 16px 50px;
    background-attachment: scroll; /* Smoother scrolling on mobile */
  }

  .hero-container {
    padding: 28px 18px;
    border-radius: var(--radius-md);
  }

  .bismillah-arabic {
    font-size: 1.55rem;
  }

  .arabic-quote {
    font-size: 1.2rem;
  }

  .english-quote {
    font-size: 0.95rem;
  }

  .hero-meta {
    flex-direction: column;
    gap: 14px;
    margin: 22px 0;
  }

  .meta-divider {
    display: none;
  }

  .countdown-container {
    gap: 6px;
    padding: 12px 8px;
  }

  .countdown-unit {
    min-width: 48px;
  }

  .count-number {
    font-size: 1.45rem;
  }

  .count-label {
    font-size: 0.65rem;
    letter-spacing: 0.8px;
  }

  .countdown-colon {
    font-size: 1.1rem;
    margin-top: -8px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 290px;
  }

  .section {
    padding: 64px 0;
  }

  .section-header {
    margin-bottom: 36px;
  }

  .events-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .event-image-wrap {
    height: 210px;
  }

  .event-content {
    padding: 22px 18px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rsvp-inner {
    padding: 32px 18px;
    border-radius: var(--radius-md);
  }

  .timeline-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .timeline-step {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 14px 16px;
  }

  .step-time {
    margin-bottom: 0;
    font-size: 0.92rem;
  }

  .masjid-photo {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .hero-container {
    padding: 22px 14px;
  }

  .couple-names {
    font-size: 2.3rem;
  }

  .name-ampersand {
    padding: 0 6px;
  }

  .count-number {
    font-size: 1.3rem;
  }

  .count-label {
    font-size: 0.62rem;
  }

  .btn-large {
    max-width: 100%;
  }

  .modal-card {
    max-height: 94vh;
  }

  .modal-body {
    padding: 16px 14px;
  }

  .modal-header {
    padding: 14px 18px;
  }
}

/* ==========================================================================
   Global Animated Arabian / Islamic Geometric Ambient Background
   ========================================================================== */
.arabian-site-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.arabian-pattern-drift {
  position: absolute;
  inset: -120px;
  opacity: 0.14;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23C59B27' stroke-width='0.9'%3E%3Crect x='25' y='25' width='70' height='70' rx='2'/%3E%3Crect x='25' y='25' width='70' height='70' rx='2' transform='rotate(45 60 60)'/%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3Cpolygon points='60,4 64,14 60,24 56,14' fill='%23C59B27' opacity='0.4'/%3E%3Cpolygon points='60,96 64,106 60,116 56,106' fill='%23C59B27' opacity='0.4'/%3E%3Cpolygon points='4,60 14,64 24,60 14,56' fill='%23C59B27' opacity='0.4'/%3E%3Cpolygon points='96,60 106,64 116,60 106,56' fill='%23C59B27' opacity='0.4'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  animation: arabianPatternDrift 42s linear infinite;
}

.site-mandala {
  position: absolute;
  width: clamp(240px, 34vw, 460px);
  height: clamp(240px, 34vw, 460px);
  pointer-events: none;
}

.site-mandala-tr {
  top: -110px;
  right: -110px;
  animation: spinMandalaSlow 90s linear infinite;
}

.site-mandala-bl {
  bottom: -110px;
  left: -110px;
  animation: spinMandalaReverse 90s linear infinite;
}

/* ==========================================================================
   Full-Screen 3D Interactive Envelope Experience (Animated Arabian Backdrop)
   ========================================================================== */
body.envelope-active {
  overflow: hidden !important;
}

.envelope-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 10000;
  background:
    radial-gradient(circle at 50% 38%, #FDFBF7 0%, #F4F0E8 52%, #E8E2D5 88%, #DDD5C5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(14px, 3vw, 32px);
  box-sizing: border-box;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s ease, visibility 0.85s ease;
}

.envelope-overlay.opened {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.04);
}

.envelope-backdrop-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Animated Drifting Islamic 8-Pointed Star (Rub el Hizb) Tessellation */
.arabesque-tessellation-layer {
  position: absolute;
  inset: -120px;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='110' viewBox='0 0 110 110'%3E%3Cg fill='none' stroke='%23B68922' stroke-width='0.85'%3E%3Crect x='23' y='23' width='64' height='64' rx='2'/%3E%3Crect x='23' y='23' width='64' height='64' rx='2' transform='rotate(45 55 55)'/%3E%3Ccircle cx='55' cy='55' r='16' stroke-dasharray='2 2'/%3E%3Cpolygon points='55,49 58,55 55,61 52,55' fill='%23C59B27' opacity='0.45'/%3E%3Cpath d='M0,55 L12,55 M98,55 L110,55 M55,0 L55,12 M55,98 L55,110' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 110px 110px;
  animation: arabianPatternDrift 34s linear infinite;
}

@keyframes arabianPatternDrift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(110px, 110px, 0); }
}

/* Moorish Pointed Islamic Archway Frame */
.moorish-arch-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Rotating Islamic Rub el Hizb Mandalas */
.arabesque-mandala {
  position: absolute;
  pointer-events: none;
}

.arabesque-mandala.mandala-tl {
  top: clamp(-95px, -8vw, -60px);
  left: clamp(-95px, -8vw, -60px);
  width: clamp(210px, 32vw, 360px);
  height: clamp(210px, 32vw, 360px);
  opacity: 0.34;
  animation: spinMandalaSlow 68s linear infinite;
}

.arabesque-mandala.mandala-br {
  bottom: clamp(-95px, -8vw, -60px);
  right: clamp(-95px, -8vw, -60px);
  width: clamp(210px, 32vw, 360px);
  height: clamp(210px, 32vw, 360px);
  opacity: 0.34;
  animation: spinMandalaReverse 68s linear infinite;
}

.arabesque-mandala.mandala-center-halo {
  top: 52%;
  left: 50%;
  width: min(92vw, 560px);
  height: min(92vw, 560px);
  opacity: 0.18;
  animation: spinMandalaHalo 85s linear infinite;
}

@keyframes spinMandalaSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes spinMandalaReverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

@keyframes spinMandalaHalo {
  0% { transform: translate(-50%, -50%) rotate(0deg) scale(0.98); }
  50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.03); }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(0.98); }
}

/* Swaying Moroccan / Arabian Hanging Fanous Lanterns */
.arabian-lantern {
  position: absolute;
  top: -6px;
  width: clamp(46px, 7.5vw, 76px);
  transform-origin: top center;
  filter: drop-shadow(0 8px 18px rgba(212, 175, 55, 0.42));
}

.arabian-lantern svg {
  width: 100%;
  height: auto;
  display: block;
}

.arabian-lantern.lantern-left {
  left: clamp(14px, 7vw, 90px);
  animation: lanternSway 5.5s ease-in-out infinite alternate;
}

.arabian-lantern.lantern-right {
  right: clamp(14px, 7vw, 90px);
  animation: lanternSway 6.2s ease-in-out infinite alternate-reverse;
}

@keyframes lanternSway {
  0% { transform: rotate(-4.5deg); }
  100% { transform: rotate(4.5deg); }
}

/* Floating Classical Arabic Calligraphy Watermarks */
.arabic-bg-calligraphy {
  position: absolute;
  font-family: 'Amiri', serif;
  font-size: clamp(1.35rem, 3.2vw, 2.3rem);
  direction: rtl;
  unicode-bidi: isolate;
  letter-spacing: 0 !important;
  word-spacing: normal;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
  color: #9A7425;
  opacity: 0.16;
  pointer-events: none;
  white-space: nowrap;
  animation: calligraphyFloat 9s ease-in-out infinite alternate;
}

.arabic-bg-calligraphy.cal-left {
  top: 26%;
  left: clamp(14px, 5vw, 70px);
}

.arabic-bg-calligraphy.cal-right {
  bottom: 20%;
  right: clamp(14px, 5vw, 70px);
  animation-delay: -4s;
}

@keyframes calligraphyFloat {
  0% { transform: translateY(0) scale(0.98); opacity: 0.12; }
  100% { transform: translateY(-12px) scale(1.03); opacity: 0.24; }
}

.gold-sparkle {
  position: absolute;
  color: #B6861E;
  font-size: 1.15rem;
  opacity: 0.5;
  animation: sparkleTwinkle 3.2s ease-in-out infinite alternate;
}

.gold-sparkle.s-1 { top: 20%; right: 16%; animation-delay: 0.2s; }
.gold-sparkle.s-2 { bottom: 24%; left: 15%; animation-delay: 1.1s; }
.gold-sparkle.s-3 { top: 62%; right: 12%; animation-delay: 2s; }
.gold-sparkle.s-4 { top: 36%; left: 12%; animation-delay: 1.6s; }

@keyframes sparkleTwinkle {
  0% { opacity: 0.18; transform: scale(0.8) rotate(0deg); }
  100% { opacity: 0.78; transform: scale(1.2) rotate(25deg); }
}

.envelope-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  margin: auto;
  position: relative;
  z-index: 2;
  perspective: 1400px;
  animation: fadeUp 0.8s ease forwards;
}

.envelope-intro-text {
  text-align: center;
  margin-bottom: 24px;
  max-height: 210px;
  overflow: hidden;
  transition: opacity 0.45s ease, transform 0.45s ease, max-height 0.5s ease, margin-bottom 0.5s ease;
}

.envelope-wrapper.is-revealed .envelope-intro-text {
  opacity: 0;
  max-height: 0;
  margin-bottom: 0;
  transform: translateY(-16px);
  pointer-events: none;
}

.envelope-bismillah {
  display: block;
  font-family: 'Amiri', serif;
  font-size: clamp(1.45rem, 3.8vw, 1.85rem);
  direction: rtl;
  unicode-bidi: isolate;
  letter-spacing: 0 !important;
  word-spacing: normal;
  font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
  color: #8A661B;
  line-height: 1.45;
  margin-bottom: 6px;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.envelope-diamond-rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 10px;
}

.envelope-diamond-rule .rule-line {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #C59B27, transparent);
}

.envelope-diamond-rule .rule-diamond {
  font-size: 0.65rem;
  color: #B68922;
  line-height: 1;
}

.envelope-kicker {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 1.4vw, 0.72rem);
  letter-spacing: 3.5px;
  color: #53644F;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 4px;
}

.envelope-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5.2vw, 2.85rem);
  font-weight: 600;
  color: #1E2B1E;
  line-height: 1.15;
  letter-spacing: 0.5px;
}

.envelope-title .env-amp {
  font-style: italic;
  font-weight: 400;
  color: #B6861E;
  padding: 0 4px;
}

.envelope-for {
  font-family: var(--font-serif);
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  color: #5C6B57;
  font-style: italic;
  margin-top: 4px;
}

/* Couture 3D Envelope Base */
.envelope {
  position: relative;
  width: min(90vw, 420px);
  height: 276px;
  border-radius: 10px;
  cursor: pointer;
  transform-style: preserve-3d;
  border: 1.5px solid rgba(212, 175, 55, 0.65);
  box-shadow:
    0 28px 60px -12px rgba(24, 36, 23, 0.42),
    0 12px 24px -8px rgba(24, 36, 23, 0.25),
    0 0 0 1px rgba(255, 245, 210, 0.4) inset;
  transition: width 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), height 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease, border-color 0.5s ease;
  animation: envelopeGentleFloat 4.5s ease-in-out infinite;
}

.envelope:hover {
  transform: translateY(-5px);
  box-shadow:
    0 36px 70px -12px rgba(24, 36, 23, 0.48),
    0 0 32px rgba(212, 175, 55, 0.28);
}

.envelope.is-open {
  animation: none;
}

/* When card is revealed, transition envelope container to portrait card proportions */
.envelope-wrapper.is-revealed .envelope {
  width: min(88vw, 405px);
  height: clamp(350px, 65vh, 570px);
  box-shadow: none;
  border-color: transparent;
  cursor: default;
}

.envelope-wrapper.is-revealed .envelope:hover {
  transform: none;
  box-shadow: none;
}

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

.envelope-stage {
  perspective: 1400px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

/* Keep stage 100% opaque so child .envelope-card renders at full crisp opacity */
.envelope-wrapper.is-revealed .envelope-stage {
  transform: none;
  opacity: 1;
}

/* Smoothly fade & glide out the envelope pocket panels when the card is fully pulled out */
.envelope-back,
.envelope-fold-left,
.envelope-fold-right,
.envelope-fold-bottom {
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.envelope-wrapper.is-revealed .envelope-back,
.envelope-wrapper.is-revealed .envelope-fold-left,
.envelope-wrapper.is-revealed .envelope-fold-right,
.envelope-wrapper.is-revealed .envelope-fold-bottom {
  opacity: 0;
  transform: translate3d(0, 56px, 0) scale(0.88);
  pointer-events: none;
}

.envelope-wrapper.is-revealed .envelope-flap-top {
  opacity: 0;
  transform: translate3d(0, 56px, 0) rotateX(176deg) scale(0.88);
  pointer-events: none;
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: #283526;
  border-radius: 9px;
  z-index: 1;
  overflow: hidden;
  box-shadow: inset 0 10px 28px rgba(0, 0, 0, 0.45);
}

.envelope-interior-gold-pattern {
  position: absolute;
  inset: 5px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background-color: #FAF5E8;
  background-image:
    radial-gradient(#C59B27 0.9px, transparent 0.9px),
    radial-gradient(#9A7425 0.9px, #FAF5E8 0.9px);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  opacity: 0.92;
}

/* Inside Invitation Card Flyer (Anchored at 50%/50% for Silky-Smooth 4-Stage Choreography) */
.envelope-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -47%, 0) scale(0.97);
  width: 88%;
  height: 86%;
  background: transparent;
  border-radius: 8px;
  z-index: 2;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  transition:
    transform 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.78s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.78s ease,
    border-color 0.78s ease,
    border-radius 0.78s ease;
  border: 1px solid rgba(184, 139, 74, 0.45);
  cursor: pointer;
  perspective: 1600px;
  will-change: transform, width, height;
}

.envelope-card .card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.78s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: inherit;
}

.envelope-card.is-flipped .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: inherit;
  overflow: hidden;
  background: #F4F0E8;
}

.card-face-front {
  transform: rotateY(0deg);
}

.card-face-back {
  transform: rotateY(180deg);
}

.envelope-card .card-paper-frame {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: inherit;
  background: #F4F0E8;
}

.envelope-flyer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: inherit;
  transition: object-fit 0.3s ease;
}

/* Corner Flip Button on Revealed Front Card */
.card-corner-flip-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 12;
  padding: 6px 13px;
  border-radius: 999px;
  background: rgba(22, 34, 26, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #F4F0E8;
  border: 1px solid #B88B4A;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.3s ease, background 0.3s ease;
  box-shadow: 0 6px 16px rgba(22, 34, 26, 0.28);
}

.envelope-wrapper.is-revealed .card-corner-flip-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.card-corner-flip-btn:hover {
  background: #1F2E23;
  border-color: #E5C888;
  transform: translateY(-2px);
}

/* Tucked Vintage Grooved Vinyl Record Widget (Top-Right of Revealed Card) */
.vinyl-record-widget {
  position: absolute;
  top: 18px;
  right: 8px;
  width: 106px;
  height: 106px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-34px, 6px, 0) scale(0.72);
  transition:
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.55s ease,
    right 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.envelope-wrapper.is-revealed .vinyl-record-widget {
  opacity: 1;
  pointer-events: auto;
  right: -46px;
  transform: translate3d(0, 0, 0) scale(1);
}

.envelope-wrapper.is-revealed .vinyl-record-widget.is-playing {
  right: -56px;
  transform: translate3d(4px, -2px, 0) scale(1.03);
}

.envelope-wrapper.is-revealed .vinyl-record-widget:hover {
  transform: translate3d(8px, -3px, 0) scale(1.06);
}

.vinyl-disc {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 12px 24px rgba(22, 34, 26, 0.45));
  animation: vinylSpin 7.5s linear infinite;
  animation-play-state: paused;
}

.vinyl-record-widget.is-playing .vinyl-disc {
  animation-play-state: running;
}

@keyframes vinylSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.vinyl-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.vinyl-pill-badge {
  position: absolute;
  bottom: -10px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(244, 240, 232, 0.96);
  border: 1px solid #B88B4A;
  color: #16221A;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(22, 34, 26, 0.25);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.vinyl-record-widget.is-playing .vinyl-pill-badge {
  background: linear-gradient(135deg, #1F2E23, #16221A);
  color: #F4DFB0;
  border-color: #C59B53;
}

@media (max-width: 600px) {
  .vinyl-record-widget {
    width: 84px;
    height: 84px;
    top: -22px;
    right: -12px;
  }
  .envelope-wrapper.is-revealed .vinyl-record-widget {
    right: -18px;
    top: -24px;
  }
  .envelope-wrapper.is-revealed .vinyl-record-widget.is-playing {
    right: -22px;
    top: -28px;
  }
}

/* Back Face: Luxury Gift Registry Card (#F4F0E8 Parchment & #1F2E23 Deep Emerald) */
.registry-card-surface {
  width: 100%;
  height: 100%;
  padding: clamp(12px, 2.5vw, 18px);
  background: radial-gradient(circle at 50% 30%, #FDFBF7 0%, #F4F0E8 65%, #E8E2D5 100%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.registry-card-border {
  flex: 1;
  border: 1.5px solid #B88B4A;
  border-radius: 10px;
  padding: clamp(14px, 3vw, 22px) clamp(12px, 2.8vw, 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  background: rgba(253, 251, 247, 0.68);
  box-shadow: inset 0 0 0 4px rgba(184, 139, 74, 0.12);
}

.registry-kicker {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #B88B4A;
  text-transform: uppercase;
}

.registry-diamond-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 6px;
}

.registry-diamond-divider .reg-line {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #B88B4A, transparent);
}

.registry-diamond-divider .reg-diamond {
  font-size: 0.65rem;
  color: #B88B4A;
}

.registry-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 3.2vw, 1.55rem);
  font-weight: 600;
  color: #16221A;
  line-height: 1.25;
  margin: 0 0 6px;
}

.registry-body {
  font-family: var(--font-serif);
  font-size: clamp(0.88rem, 2.1vw, 0.98rem);
  color: #1F2E23;
  line-height: 1.45;
  margin: 0 0 10px;
  max-width: 340px;
}

.registry-qr-box {
  width: 100%;
  background: #FDFBF7;
  border: 1px solid rgba(184, 139, 74, 0.55);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(22, 34, 26, 0.07);
}

.registry-qr-frame {
  width: clamp(88px, 18vh, 114px);
  height: clamp(88px, 18vh, 114px);
  padding: 5px;
  background: #FDFBF7;
  border: 1.5px solid #B88B4A;
  border-radius: 8px;
}

.registry-qr-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.registry-meta-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 100%;
}

.registry-store-badge {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  color: #16221A;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.registry-acct-line {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  color: #3E4D3A;
  margin: 0;
}

.registry-card-btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.btn-registry-copy,
.btn-registry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 13px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-registry-copy {
  background: linear-gradient(135deg, #1F2E23, #16221A);
  color: #F4DFB0;
  border: 1px solid #B88B4A;
}

.btn-registry-copy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 34, 26, 0.25);
}

.btn-registry-link {
  background: #F4F0E8;
  color: #1F2E23;
  border: 1px solid rgba(184, 139, 74, 0.65);
}

.btn-registry-link:hover {
  background: #E8E2D5;
}

.btn-flip-back {
  margin-top: 8px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(184, 139, 74, 0.55);
  color: #1F2E23;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 2px 6px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-flip-back:hover {
  color: #B88B4A;
}

/* Stage 3 (is-extracting): Card glides straight up out of the V-pocket (lower edge still inside pocket folds!) */
.envelope.is-extracting .envelope-card {
  transform: translate3d(-50%, -106%, 0) scale(1);
  z-index: 2;
  box-shadow: 0 22px 48px rgba(20, 32, 20, 0.38);
}

/* Stage 4 (is-revealed): Card steps forward over the pocket & expands smoothly to center stage */
.envelope-wrapper.is-revealed .envelope.is-open .envelope-card,
.envelope.is-revealed .envelope-card {
  top: 50%;
  left: 50%;
  transform: translate3d(-50%, -50%, 0) scale(1);
  width: 100%;
  height: 100%;
  z-index: 25;
  opacity: 1;
  overflow: visible;
  border-radius: 14px;
  box-shadow: 0 30px 75px rgba(22, 34, 26, 0.38), 0 0 0 1px rgba(184, 139, 74, 0.35);
  border: 2px solid #B88B4A;
  background: transparent;
}

.envelope-wrapper.is-revealed .envelope-flyer-img {
  object-fit: contain;
  background: #F4F0E8;
}

/* SVG Folds (Left, Right, Bottom) */
.env-fold-svg,
.env-flap-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.envelope-fold-left {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 9px;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(3px 0 6px rgba(0, 0, 0, 0.25));
}

.envelope-fold-right {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: 9px;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(-3px 0 6px rgba(0, 0, 0, 0.25));
}

.envelope-fold-bottom {
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: 9px;
  overflow: hidden;
  pointer-events: none;
  filter: drop-shadow(0 -5px 10px rgba(0, 0, 0, 0.28));
}

.envelope-calligraphy-seal {
  position: absolute;
  bottom: 16px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
  z-index: 5;
  padding: 0 14px;
}

.front-script, .env-couple-name {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  color: #FAF3E0;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.front-sub, .env-date-stamp {
  font-family: var(--font-display);
  font-size: clamp(0.5rem, 1.2vw, 0.58rem);
  color: #E8C978;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.92;
}

/* Couture Dual-Sided 3D Top V-Flap (Olive-Gold Exterior + Cream-Gold Damask Interior) */
.envelope-flap-top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 58%;
  transform-origin: top center;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.6s ease;
  z-index: 6;
  border-top-left-radius: 9px;
  border-top-right-radius: 9px;
  overflow: visible;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.36));
  will-change: transform;
}

.flap-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flap-face-front {
  transform: rotateX(0deg);
}

.flap-face-back {
  transform: rotateX(180deg);
}

.envelope.is-open .envelope-flap-top {
  transform: rotateX(176deg);
}

.envelope.flap-behind .envelope-flap-top {
  z-index: 1;
  filter: drop-shadow(0 -4px 10px rgba(0, 0, 0, 0.18));
}

/* Bespoke 3D Embossed Gold Wax Seal (SVG Medallion + Golden Shockwave Burst) */
.wax-seal {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78px;
  height: 78px;
  border-radius: 50%;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.38s ease, filter 0.38s ease;
  filter: drop-shadow(0 8px 16px rgba(15, 22, 14, 0.5)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  animation: sealLuxuryPulse 2.8s ease-in-out infinite;
}

.wax-seal-shockwave {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px solid #F7E39C;
  opacity: 0;
  pointer-events: none;
}

.wax-seal-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.wax-seal:hover {
  transform: translate(-50%, -50%) scale(1.08);
  filter: drop-shadow(0 12px 22px rgba(15, 22, 14, 0.55)) drop-shadow(0 0 14px rgba(212, 175, 55, 0.45));
}

@keyframes sealLuxuryPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.04);
  }
}

@keyframes sealShockwaveExpand {
  0% {
    transform: scale(0.9);
    opacity: 0.95;
  }
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

.envelope.is-unsealing .wax-seal {
  animation: none;
  transform: translate(-50%, -58%) scale(1.16);
  opacity: 0;
  pointer-events: none;
}

.envelope.is-unsealing .wax-seal-shockwave {
  animation: sealShockwaveExpand 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Envelope Actions & Buttons (Initial Couture Style) */
.envelope-actions-box {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  transition: opacity 0.4s ease;
}

.tap-seal-prompt {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: #3E4D3A;
  letter-spacing: 0.8px;
  animation: promptPulse 2.4s ease-in-out infinite;
}

@keyframes promptPulse {
  0%, 100% { opacity: 0.65; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.btn-open-envelope {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 32px;
  border-radius: 50px;
  background: linear-gradient(135deg, #16221A 0%, #1F2E23 50%, #141E17 100%);
  color: #F4F0E8;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 2.8px;
  text-transform: uppercase;
  border: 1.5px solid #B88B4A;
  cursor: pointer;
  box-shadow:
    0 10px 26px -6px rgba(22, 34, 26, 0.42),
    0 0 0 1px rgba(244, 223, 176, 0.22) inset;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.btn-open-envelope .btn-ornament {
  color: #E6C465;
  font-size: 0.72rem;
}

.btn-open-envelope:hover, .btn-open-envelope:active {
  transform: translateY(-2px);
  border-color: #F3DF9D;
  box-shadow:
    0 14px 32px -6px rgba(28, 42, 28, 0.48),
    0 0 18px rgba(212, 175, 55, 0.32);
}

.btn-skip-envelope {
  background: none;
  border: none;
  font-family: var(--font-serif);
  color: #4D5E49;
  font-size: 0.96rem;
  font-style: italic;
  letter-spacing: 0.4px;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid rgba(92, 107, 87, 0.35);
  padding: 2px 4px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.btn-skip-envelope:hover {
  color: #1E2B1E;
  border-bottom-color: #B6861E;
}

/* Revealed Card Actions (After Open) */
.revealed-card-actions {
  margin-top: clamp(14px, 2.5vh, 24px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 480px;
  animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 30;
  position: relative;
}

.btn-refold-envelope {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--gold-medium);
  border-radius: 50px;
  padding: 8px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--sage-dark);
  cursor: pointer;
  transition: var(--transition);
}

.btn-refold-envelope:hover {
  background: #FFFFFF;
  border-color: var(--gold-dark);
  color: var(--text-dark);
  transform: translateY(-1px);
}

/* Nav Actions Container & Reopen Envelope Button */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.envelope-nav-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--gold-medium);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  min-height: 40px;
}

.envelope-nav-btn:hover {
  background: #FFFFFF;
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

@media (max-width: 480px) {
  .envelope-wrapper {
    padding: 4px;
    max-width: 360px;
  }

  .envelope-intro-text {
    margin-bottom: 14px;
  }

  .envelope-sub {
    font-size: 0.6rem;
    letter-spacing: 2px;
  }

  .envelope-title {
    font-size: 1.55rem;
  }

  .envelope-for {
    font-size: 0.84rem;
  }

  .envelope {
    width: min(92vw, 345px);
    height: 232px;
  }

  .envelope-card {
    height: 86%;
  }

  .envelope-flap-top {
    height: 58%;
  }

  .wax-seal {
    top: 55%;
    width: 66px;
    height: 66px;
  }

  .envelope.is-extracting .envelope-card {
    transform: translate3d(-50%, -105%, 0) scale(1);
  }

  .envelope-wrapper.is-revealed .envelope-stage {
    transform: none;
    opacity: 1;
  }

  .envelope-wrapper.is-revealed .envelope {
    width: min(90vw, 340px);
    height: clamp(320px, 60vh, 480px);
  }

  .envelope-wrapper.is-revealed .envelope.is-open .envelope-card,
  .envelope.is-revealed .envelope-card {
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0) scale(1);
    width: 100%;
    height: 100%;
    z-index: 25;
  }

  .revealed-card-actions {
    margin-top: 12px;
    gap: 6px;
  }

  .revealed-card-actions .btn {
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  .envelope-actions-box {
    margin-top: 18px;
  }

  .btn-open-envelope {
    padding: 11px 24px;
    font-size: 0.86rem;
  }
}

/* Revealed Countdown Pill on Envelope */
.revealed-countdown-pill {
  width: 100%;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--gold-medium);
  border-radius: 30px;
  padding: 8px 16px;
  font-size: clamp(0.76rem, 2vw, 0.86rem);
  color: var(--sage-dark);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.revealed-countdown-pill strong {
  color: var(--gold-dark);
  font-family: var(--font-display);
  font-size: clamp(0.84rem, 2.2vw, 0.94rem);
}

.revealed-buttons-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

/* ==========================================================================
   Dedicated Wedding Countdown Showcase Section
   ========================================================================== */
.countdown-showcase-section {
  padding: clamp(56px, 8vw, 90px) 0 clamp(44px, 6vw, 70px);
  background: radial-gradient(circle at center, rgba(250, 248, 243, 0.85) 0%, rgba(240, 245, 238, 0.95) 100%);
  position: relative;
  overflow: hidden;
}

.countdown-glass-card {
  max-width: 840px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 20px;
  padding: clamp(28px, 5vw, 48px) clamp(16px, 4vw, 40px);
  box-shadow: 0 20px 50px rgba(45, 60, 44, 0.08), 0 0 35px rgba(212, 175, 55, 0.16);
  position: relative;
}

.countdown-pill-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(0.68rem, 1.5vw, 0.78rem);
  letter-spacing: 3px;
  color: var(--gold-dark);
  font-weight: 700;
  margin-bottom: 10px;
}

.countdown-section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 5vw, 3rem);
  color: var(--text-dark);
  margin-bottom: 8px;
}

.countdown-subtext {
  font-size: clamp(0.86rem, 2vw, 0.96rem);
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: clamp(22px, 4vw, 32px);
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 16px);
  margin: 0 auto clamp(24px, 4vw, 32px);
  max-width: 620px;
}

.countdown-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF8F2 100%);
  border: 1.5px solid rgba(212, 175, 55, 0.35);
  border-radius: 14px;
  padding: clamp(10px, 2.2vw, 18px) clamp(6px, 1.5vw, 12px);
  box-shadow: 0 8px 20px rgba(45, 60, 44, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.countdown-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(212, 175, 55, 0.25);
  border-color: var(--gold-medium);
}

.box-digit-wrap .box-number {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4.5vw, 2.9rem);
  font-weight: 700;
  color: var(--sage-dark);
  line-height: 1;
  display: block;
}

.box-label {
  font-family: var(--font-sans);
  font-size: clamp(0.62rem, 1.4vw, 0.75rem);
  letter-spacing: clamp(0.8px, 0.2vw, 1.5px);
  text-transform: uppercase;
  color: var(--text-gold);
  font-weight: 600;
  margin-top: 8px;
}

.countdown-separator {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3.5vw, 2rem);
  color: var(--gold-primary);
  font-weight: 700;
  margin-top: -14px;
}

.countdown-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Multi-Device Fluid Responsive Optimization (Mobile, Tablet, Laptop, Desktop)
   ========================================================================== */

/* Global Fluid Container & Section Adjustments */
.container {
  width: 100%;
  max-width: var(--container-max, 1140px);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

/* 1. Extra-Small Mobile Phones (<= 380px, e.g., iPhone SE, Galaxy Fold cover) */
@media (max-width: 380px) {
  .nav-container {
    padding: 0 12px;
  }
  .brand-monogram {
    font-size: 1.05rem;
  }
  .envelope-nav-btn {
    padding: 5px 10px;
    font-size: 0.74rem;
  }
  .couple-names {
    font-size: 2rem;
  }
  .countdown-container {
    gap: 4px;
    padding: 10px 6px;
  }
  .countdown-unit {
    min-width: 42px;
  }
  .count-number {
    font-size: 1.15rem;
  }
  .envelope-wrapper.is-revealed .envelope {
    width: 92vw;
    height: clamp(290px, 56vh, 420px);
  }
  .revealed-buttons-row .btn,
  .btn-refold-envelope {
    width: 100%;
    justify-content: center;
  }
}

/* 2. Short Viewport / Landscape Mobile & Compact Laptop Screens (max-height: 700px) */
@media (max-height: 700px) {
  .envelope-overlay {
    align-items: flex-start;
    padding: 14px 16px;
  }
  .envelope-wrapper {
    margin: auto;
  }
  .envelope-intro-text {
    margin-bottom: 10px;
  }
  .envelope-title {
    font-size: 1.45rem;
  }
  .envelope {
    height: 210px;
    max-width: 330px;
  }
  .envelope-card {
    height: 184px;
  }
  .envelope-flap-top {
    height: 58%;
  }
  .wax-seal {
    top: 55%;
    width: 60px;
    height: 60px;
  }
  .envelope-wrapper.is-revealed .envelope {
    height: clamp(260px, 60vh, 420px);
    width: min(84vw, 310px);
  }
  .revealed-card-actions {
    margin-top: 10px;
    gap: 6px;
  }
}

/* 3. Tablet Portrait & Landscape (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-container {
    padding: 0 20px;
  }
  .nav-links {
    gap: 14px;
  }
  .nav-links a {
    font-size: 0.84rem;
  }
  .nav-links .nav-rsvp-btn {
    padding: 8px 16px;
    font-size: 0.82rem;
  }
  .envelope-nav-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
  .hero-container {
    max-width: 760px;
    padding: 44px 36px;
  }
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .event-content {
    padding: 24px 20px;
  }
  .timeline-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .venue-wrapper {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .envelope-wrapper.is-revealed .envelope {
    width: min(76vw, 410px);
    height: clamp(380px, 64vh, 575px);
  }
}

/* 4. Standard Laptops (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
  .nav-links {
    gap: 22px;
  }
  .hero-container {
    max-width: 860px;
    padding: 52px 48px;
  }
  .envelope-wrapper.is-revealed .envelope {
    width: min(65vw, 405px);
    height: clamp(390px, 66vh, 570px);
  }
}

/* 5. Large Desktop & Ultra-Wide Monitors (1441px+) */
@media (min-width: 1441px) {
  :root {
    --container-max: 1240px;
  }
  .hero-container {
    max-width: 940px;
    padding: 64px 60px;
  }
  .invitation-card-frame {
    max-width: 680px;
  }
  .countdown-glass-card {
    max-width: 920px;
    padding: 54px 48px;
  }
  .envelope-wrapper {
    max-width: 540px;
  }
  .envelope-wrapper.is-revealed .envelope {
    width: 430px;
    height: clamp(440px, 68vh, 605px);
  }
}

/* ==========================================================================
   Floating Nasheed Audio Pill on Envelope Overlay
   ========================================================================== */
.envelope-audio-pill {
  position: fixed;
  top: clamp(14px, 2.5vw, 24px);
  right: clamp(14px, 2.5vw, 24px);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(253, 250, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(197, 155, 39, 0.55);
  box-shadow: 0 6px 20px rgba(38, 53, 36, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  color: #263524;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  touch-action: manipulation;
}

.envelope-audio-pill:hover {
  transform: translateY(-2px);
  border-color: #C59B27;
  box-shadow: 0 10px 26px rgba(197, 155, 39, 0.28);
}

.envelope-audio-pill.playing {
  background: linear-gradient(135deg, rgba(255, 250, 235, 0.96), rgba(248, 236, 200, 0.94));
  border-color: #C59B27;
  box-shadow: 0 6px 22px rgba(197, 155, 39, 0.34);
}

.envelope-audio-pill .env-audio-icon {
  font-size: 0.95rem;
  line-height: 1;
}

