/* ==========================================================================
   FARNAZ & ALI — LUXURY PERSIAN WEDDING INVITATION STYLESHEET
   Colors & Aesthetic inspired by IMG_20260907_154244_597.PNG
   ========================================================================== */

/* ==========================================================================
   PERSIAN LOCAL FONTS (DORAN FANUM, TELEGRAPH)
   ========================================================================== */

@font-face {
  font-family: 'Doran';
  src: url('../fonts/Doran%20Pro/Doran%20FaNum/Webfonts/fonts/woff2/DoranFaNum-Regular.woff2') format('woff2'),
       url('../fonts/Doran%20Pro/Doran%20FaNum/Webfonts/fonts/woff/DoranFaNum-Regular.woff') format('woff'),
       url('../fonts/Doran%20Pro/Doran%20FaNum/TTF/DoranFaNum-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Doran';
  src: url('../fonts/Doran%20Pro/Doran%20FaNum/Webfonts/fonts/woff2/DoranFaNum-Medium.woff2') format('woff2'),
       url('../fonts/Doran%20Pro/Doran%20FaNum/Webfonts/fonts/woff/DoranFaNum-Medium.woff') format('woff'),
       url('../fonts/Doran%20Pro/Doran%20FaNum/TTF/DoranFaNum-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Doran';
  src: url('../fonts/Doran%20Pro/Doran%20FaNum/Webfonts/fonts/woff2/DoranFaNum-Bold.woff2') format('woff2'),
       url('../fonts/Doran%20Pro/Doran%20FaNum/Webfonts/fonts/woff/DoranFaNum-Bold.woff') format('woff'),
       url('../fonts/Doran%20Pro/Doran%20FaNum/TTF/DoranFaNum-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Telegraph';
  src: url('../fonts/Telegraph/TELEGRAPH_REGULAR.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Telegraph';
  src: url('../fonts/Telegraph/TELEGRAPH_BOLD.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'IranNastaliq';
  src: url('../fonts/IranNastaliq.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light only;
  forced-color-adjust: none;

  /* Primary Burgundy / Wine Palette */
  --burgundy-deep: #2E0511;
  --burgundy-dark: #430919;
  --burgundy-main: #5C1027;
  --burgundy-light: #7E1C3A;
  --burgundy-glow: rgba(126, 28, 58, 0.25);

  /* Midnight Navy / Foliage Palette */
  --navy-dark: #0D131C;
  --navy-main: #161F2C;
  --navy-light: #243044;

  /* Antique Gold Foil Palette */
  --gold-dark: #8C6A24;
  --gold-main: #B89047;
  --gold-light: #E7CF8C;
  --gold-sparkle: #FFF2C7;
  --gold-gradient: linear-gradient(135deg, #FAF0D2 0%, #E0BF73 30%, #C5A059 60%, #9B772E 100%);
  --gold-gradient-glow: linear-gradient(135deg, #FFE8A3 0%, #D4AF37 50%, #A07F37 100%);
  --gold-border: 1px solid rgba(184, 144, 71, 0.45);

  /* Luminous Cream, Champagne & Warm Ivory Paper Palette */
  --cream-pure: #FFFDF9;
  --ivory-light: #FAF5ED;
  --ivory-main: #F4EADF;
  --ivory-dark: #E8DBCB;
  --parchment: #F8F1E5;

  /* Text Colors */
  --text-dark: #2A141D;
  --text-muted: #5C4750;
  --text-gold: #916F2A;
  --text-light: #5C1027;
  --text-cream: #EFE8DA;

  /* Typography */
  --font-display: 'Doran', Tahoma, -apple-system, sans-serif;
  --font-script: 'IranNastaliq', 'Doran', Tahoma, sans-serif;
  --font-body: 'Doran', Tahoma, -apple-system, sans-serif;
  --font-sans: 'Doran', 'Telegraph', Tahoma, sans-serif;
  --font-serif: 'Doran', Georgia, serif;

  /* Shadows (Tuned for light parchment backgrounds) */
  --shadow-sm: 0 4px 12px rgba(74, 9, 26, 0.06);
  --shadow-md: 0 12px 30px rgba(74, 9, 26, 0.09);
  --shadow-lg: 0 20px 50px rgba(74, 9, 26, 0.12);
  --shadow-gold: 0 0 25px rgba(197, 160, 89, 0.35);

  /* Transitions */
  --transition-fast: 0.25s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  color-scheme: light only;
  forced-color-adjust: none;
  background-color: #FAF5ED;
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

/* Ensure letters never separate in Persian connected script */
html[dir="rtl"] * {
  letter-spacing: normal !important;
}

/* Explicit alignment for centered sections */
html[dir="rtl"] .card-content-frame,
html[dir="rtl"] .card-content-inner,
html[dir="rtl"] .envelope-intro-text,
html[dir="rtl"] .countdown-hero-card,
html[dir="rtl"] .countdown-grid,
html[dir="rtl"] .target-date-box,
html[dir="rtl"] .countdown-note,
html[dir="rtl"] .calendar-actions,
html[dir="rtl"] .luxury-footer,
html[dir="rtl"] .section-badge,
html[dir="rtl"] .section-title,
html[dir="rtl"] .ornament-divider,
html[dir="rtl"] .names-wrapper,
html[dir="rtl"] .date-time-block,
html[dir="rtl"] .venue-block {
  text-align: center;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color-scheme: light only;
  forced-color-adjust: none;
  background-color: #FAF5ED;
  background-image: 
    radial-gradient(circle at 50% 15%, #FFFFFF 0%, #FAF5ED 50%, #EDE1CE 100%),
    radial-gradient(circle at 15% 35%, rgba(197, 160, 89, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(126, 28, 58, 0.05) 0%, transparent 50%);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100%;
  position: relative;
}

@media (prefers-color-scheme: dark) {
  :root,
  html,
  body {
    color-scheme: dark;
    forced-color-adjust: none;
    background-color: #FAF5ED;
    color: #2A141D;
  }

  body {
    background-image:
      radial-gradient(circle at 50% 15%, #FFFFFF 0%, #FAF5ED 50%, #EDE1CE 100%),
      radial-gradient(circle at 15% 35%, rgba(197, 160, 89, 0.07) 0%, transparent 45%),
      radial-gradient(circle at 85% 65%, rgba(126, 28, 58, 0.05) 0%, transparent 50%);
  }
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

.is-hidden {
  display: none !important;
}

/* ==========================================================================
   AMBIENT PARTICLES & FLOATING CONTROLS
   ========================================================================== */
.ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  background: transparent;
  color-scheme: light only;
  forced-color-adjust: none;
}

/* ==========================================================================
   Audio Permission Prompt (iOS / Autoplay Policy Fallback)
   ========================================================================== */
.audio-permission-prompt {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: calc(100% - 32px);
  width: max-content;
}

.audio-permission-prompt.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.audio-prompt-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid rgba(197, 160, 89, 0.6);
  border-radius: 40px;
  padding: 8px 14px 8px 12px;
  box-shadow: 
    0 12px 36px rgba(74, 9, 26, 0.18),
    0 2px 10px rgba(197, 160, 89, 0.25);
}

.audio-permission-prompt.is-visible .audio-prompt-card {
  animation: promptGlow 3s infinite ease-in-out;
}

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

.audio-prompt-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-main));
  color: var(--burgundy-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(184, 144, 71, 0.3);
  flex-shrink: 0;
}

.audio-prompt-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.audio-prompt-title {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--burgundy-main);
  letter-spacing: 0.05em;
}

.audio-prompt-subtitle {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.audio-prompt-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 15px;
  background: var(--burgundy-main);
  border: 1px solid var(--gold-main);
  border-radius: 20px;
  color: var(--cream-pure);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.audio-prompt-btn:hover {
  background: var(--burgundy-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(93, 16, 39, 0.3);
}

.audio-prompt-play-icon {
  font-size: 0.65rem;
}

.audio-prompt-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: opacity 0.2s ease, color 0.2s ease;
  line-height: 1;
}

.audio-prompt-dismiss:hover {
  opacity: 1;
  color: var(--burgundy-main);
}

@media (max-width: 480px) {
  .audio-permission-prompt {
    bottom: 16px;
    width: calc(100% - 28px);
  }
  .audio-prompt-card {
    width: 100%;
    justify-content: space-between;
    padding: 8px 12px;
  }
  .audio-prompt-subtitle {
    display: none;
  }
}

/* ==========================================================================
   1. 3D SEALED ENVELOPE & UNIFIED CARD STAGE
   ========================================================================== */
.envelope-intro-text {
  text-align: center;
  color: var(--text-dark);
  margin-bottom: 24px;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.intro-whisper {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 6px;
  font-weight: 600;
  opacity: 0.95;
}

.intro-names {
  font-family: var(--font-script);
  font-size: clamp(3.4rem, 8.5vw, 5.4rem);
  font-weight: 400;
  line-height: 1.7;
  background: linear-gradient(135deg, #7A1735 0%, #A88132 45%, #4D091B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 2px 20px rgba(197, 160, 89, 0.25);
  padding: 4px 0;
}

/* Unified 3D Stage */
.envelope-and-card-stage {
  position: relative;
  width: min(92%, 640px);
  max-width: 100%;
  aspect-ratio: 1 / 1.414;
  perspective: 1600px;
  transform-style: preserve-3d;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.envelope-assembly {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Authentic 350gsm Tactile Cotton Paper Texture (Hardware-Accelerated PNG Tile) */
.paper-texture-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--paper-grain-texture, radial-gradient(circle at 50% 50%, rgba(160, 130, 95, 0.04) 1px, transparent 1px));
  background-size: 96px 96px;
  background-repeat: repeat;
  opacity: 0.85;
}

/* Layer 1: Envelope Back Wall & Interior Luxury Parchment Lining */
.envelope-back-wall {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #FDFBF7 0%, #F5EFE3 45%, #EBE0CD 100%);
  border-radius: 12px;
  border: 1px solid rgba(184, 144, 71, 0.35);
  box-shadow: 
    0 32px 75px -15px rgba(58, 38, 22, 0.18),
    0 14px 32px -6px rgba(58, 38, 22, 0.10),
    0 3px 8px rgba(58, 38, 22, 0.05),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1.5px 0 rgba(184, 144, 71, 0.2);
  z-index: 1;
  transform: translateZ(0);
  overflow: hidden;
  will-change: transform, opacity;
}

.envelope-interior-lining {
  position: absolute;
  inset: 8px;
  background: radial-gradient(circle at 50% 30%, #FFFDF9 0%, #FAF4EA 60%, #EFE4D2 100%);
  border-radius: 8px;
  border: 1px solid rgba(184, 144, 71, 0.25);
  box-shadow: 
    inset 0 24px 38px rgba(58, 38, 22, 0.14),
    inset 0 0 0 1px rgba(184, 144, 71, 0.2);
  overflow: hidden;
}

.damask-foil-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(184, 144, 71, 0.16) 2px, transparent 2px),
    radial-gradient(circle at 0% 0%, rgba(92, 16, 39, 0.05) 8px, transparent 8px);
  background-size: 24px 24px, 48px 48px;
  opacity: 0.8;
}

/* Layer 2: Master Invitation Card inside the Envelope */
.invitation-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(74, 52, 38, 0.1);
  transform-style: preserve-3d;
  z-index: 4; /* Sits between back wall (1) and front pocket (10) */
  transform: translateZ(4px);
  transform-origin: center center;
  will-change: transform, opacity, box-shadow;
  transition: box-shadow 0.4s ease;
  container-type: size;
  container-name: invite;
}

.invitation-card.hero-standing {
  z-index: 50;
  box-shadow: 
    0 20px 52px rgba(74, 52, 38, 0.14),
    0 6px 18px rgba(184, 144, 71, 0.15),
    inset 0 0 0 1px rgba(184, 144, 71, 0.45);
}

.invitation-card.hero-standing:hover {
  box-shadow: 
    0 28px 65px rgba(74, 52, 38, 0.18),
    0 8px 24px rgba(184, 144, 71, 0.3),
    inset 0 0 0 1px rgba(184, 144, 71, 0.7);
}

/* ==========================================================================
   4-WAY EMBOSSED BURGUNDY ORIGAMI FLAPS
   ========================================================================== */
.origami-flap {
  position: absolute;
  pointer-events: none;
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 4px 12px rgba(45, 8, 16, 0.28));
}

.flap-face {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flap-face-back {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.08) 0%, transparent 42%),
    linear-gradient(165deg, #6E1634 0%, #430919 52%, #2E0511 100%);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.22);
}

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

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

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

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

.origami-flap.is-folded-behind {
  z-index: 0;
  filter: drop-shadow(0 1px 4px rgba(45, 8, 16, 0.1));
  pointer-events: none;
}

.origami-flap-img {
  width: 100%;
  height: 100%;
  object-fit: fill;
  display: block;
  pointer-events: none;
}

/* Bottom Flap (folds down) */
.origami-flap.flap-bottom {
  bottom: 0;
  left: 0;
  width: 100%;
  height: 52%;
  z-index: 10;
  transform-origin: bottom center;
  transform: translateZ(6px);
}

/* Left Flap (folds left) */
.origami-flap.flap-left {
  top: 0;
  left: 0;
  width: 52%;
  height: 100%;
  z-index: 11;
  transform-origin: left center;
  transform: translateZ(8px);
}

/* Right Flap (folds right) */
.origami-flap.flap-right {
  top: 0;
  right: 0;
  width: 52%;
  height: 100%;
  z-index: 12;
  transform-origin: right center;
  transform: translateZ(10px);
}

/* Top Flap (folds up) */
.origami-flap.flap-top {
  top: 0;
  left: 0;
  width: 100%;
  height: 52%;
  z-index: 13;
  transform-origin: top center;
  transform: translateZ(12px);
}

/* Layer 4: Authentic Royal Wax Seal */
.wax-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(22px);
  width: clamp(102px, 23vw, 128px);
  height: clamp(102px, 23vw, 128px);
  z-index: 20;
  cursor: pointer;
  outline: none;
  user-select: none;
  will-change: transform, opacity;
}

.wax-seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 22px rgba(74, 9, 26, 0.35)) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  pointer-events: none;
}

.wax-seal:hover .wax-seal-img {
  transform: scale(1.08);
  filter: drop-shadow(0 14px 30px rgba(74, 9, 26, 0.45)) drop-shadow(0 0 22px rgba(184, 144, 71, 0.45));
}

.seal-callout {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  width: max-content;
  max-width: min(92vw, 340px);
  overflow: visible;
  background: rgba(255, 253, 249, 0.95);
  border: 1px solid var(--gold-main);
  padding: 7px 16px;
  border-radius: 20px;
  color: var(--burgundy-dark);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 20px rgba(74, 9, 26, 0.12), 0 0 15px rgba(197, 160, 89, 0.25);
  animation: sealPulse 2.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes sealPulse {
  0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 4px 15px rgba(74, 9, 26, 0.1), 0 0 10px rgba(197, 160, 89, 0.2); }
  50% { transform: translateX(-50%) scale(1.05); box-shadow: 0 8px 25px rgba(74, 9, 26, 0.16), 0 0 20px rgba(197, 160, 89, 0.45); }
}

/* ==========================================================================
   2. MAIN INVITATION CONTENT
   ========================================================================== */
.main-content {
  position: relative;
  z-index: 20;
}

.main-content.is-visible {
  opacity: 1;
}

/* Common Section Layout */
.section {
  padding: 100px 20px;
  position: relative;
}

.section-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--burgundy-main);
  padding: 5px 16px;
  background: rgba(184, 144, 71, 0.12);
  border: 1px solid rgba(184, 144, 71, 0.35);
  border-radius: 30px;
  margin-bottom: 14px;
  font-weight: 600;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--burgundy-deep);
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(184, 144, 71, 0.15);
}

.ornament-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--gold-main);
  font-size: 1.1rem;
  margin-bottom: 45px;
}

.ornament-divider .gem {
  font-size: 0.85rem;
  color: var(--gold-light);
}

/* ==========================================================================
   HERO: INVITATION CARD WITH AUTHENTIC ARTWORK FRAME
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  padding-top: 40px;
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

/* Card Artwork Frame (WebP with JPEG fallback) */
.card-artwork-bg {
  position: absolute;
  inset: 0;
  background-image: url("../card-artwork.jpg");
  background-image: image-set(
    url("../card-artwork.webp") type("image/webp"),
    url("../card-artwork.jpg") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* Specular Shimmer on mouse movement */
.card-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg, 
    rgba(255, 255, 255, 0) 30%, 
    rgba(255, 240, 200, 0.15) 50%, 
    rgba(255, 255, 255, 0) 70%
  );
  z-index: 2;
  pointer-events: none;
  opacity: 0.7;
}

/* Central Typography Container within the Image's Gold Filigree Frame */
.card-content-frame {
  position: absolute;
  /* Precisely positioned inside the inner gold frame of the provided artwork */
  top: 13%;
  bottom: 13%;
  left: 16%;
  right: 16%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: auto;
  min-height: 0;
  min-width: 0;
}

.card-content-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 6px 8px;
  min-height: 0;
  gap: 0.4cqh;
  transform-origin: center center;
}

/* Top/Bottom Gold SVG Flourishes */
.flourish-top, .flourish-bottom {
  width: min(90px, 28cqw);
  height: min(20px, 2.8cqh);
  flex-shrink: 0;
  opacity: 0.9;
}

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

.invite-hosts {
  font-family: var(--font-body);
  font-size: clamp(0.62rem, 2.2cqh, 1.05rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy-main);
  font-weight: 600;
  flex-shrink: 0;
}

.names-wrapper {
  margin: 0;
  flex: 0 1 auto;
  min-height: 0;
}

.couple-name {
  font-family: var(--font-script);
  font-size: clamp(1.45rem, 7.2cqh, 4.6rem);
  font-weight: 400;
  line-height: 1.32;
  color: var(--burgundy-dark);
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8), 0 2px 8px rgba(67, 9, 25, 0.15);
  padding: 0.06em 0;
}

.ampersand-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.6cqh, 12px);
  margin: 0;
}

.ampersand-divider .gold-line {
  width: min(35px, 10cqw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-main), transparent);
}

.ampersand-divider .ampersand {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 3.2cqh, 2rem);
  font-weight: 600;
  color: var(--gold-dark);
  line-height: 1;
}

.invite-honor {
  font-family: var(--font-body);
  font-size: clamp(0.62rem, 2.15cqh, 1rem);
  line-height: 1.35;
  font-style: italic;
  color: var(--text-muted);
  max-width: 100%;
  flex-shrink: 1;
}

.date-time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15cqh;
  margin: 0;
  flex-shrink: 0;
}

.formal-date {
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 2.2cqh, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--burgundy-main);
}

.formal-year {
  font-family: var(--font-display);
  font-size: clamp(0.56rem, 1.95cqh, 0.9rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--burgundy-dark);
}

.gold-dot-separator {
  color: var(--gold-main);
  font-size: clamp(0.45rem, 1.4cqh, 0.65rem);
  margin: 0;
}

.formal-time {
  font-family: var(--font-body);
  font-size: clamp(0.58rem, 2.05cqh, 0.95rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dark);
}

.venue-block {
  margin: 0;
  flex-shrink: 0;
}

.venue-name {
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 2.25cqh, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--navy-main);
}

.venue-city {
  font-family: var(--font-body);
  font-size: clamp(0.56rem, 1.95cqh, 0.92rem);
  font-style: italic;
  color: var(--text-muted);
}

.reception-notice {
  font-family: var(--font-sans);
  font-size: clamp(0.48rem, 1.7cqh, 0.72rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
  border-top: 1px solid rgba(197, 160, 89, 0.35);
  border-bottom: 1px solid rgba(197, 160, 89, 0.35);
  padding: 0.4cqh 8px;
  flex-shrink: 0;
  max-width: 100%;
}

/* Scroll Cue below card */
.scroll-cue {
  margin-top: 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gold-dark);
  opacity: 0.9;
}

.cue-text {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
}

.cue-arrow {
  font-size: 1.2rem;
  color: var(--burgundy-main);
}

.scroll-cue.is-visible .cue-arrow {
  animation: bounceArrow 1.8s infinite ease-in-out;
}

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

/* ==========================================================================
   COUNTDOWN TIMER SECTION
   ========================================================================== */
.countdown-section {
  background: linear-gradient(180deg, transparent 0%, rgba(244, 234, 223, 0.65) 50%, transparent 100%);
  position: relative;
}

.countdown-hero-card {
  position: relative;
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid rgba(184, 144, 71, 0.35);
  border-radius: 24px;
  padding: 56px 36px 48px;
  box-shadow: 
    0 16px 45px rgba(74, 52, 38, 0.08),
    0 0 25px rgba(184, 144, 71, 0.08);
  max-width: 920px;
  margin: 0 auto;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 2.5vw, 24px);
  margin-bottom: 30px;
  direction: ltr !important;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.countdown-card {
  position: relative;
  width: clamp(65px, 16vw, 110px);
  height: clamp(75px, 18vw, 120px);
  background: linear-gradient(145deg, #FFFFFF 0%, #FAF4EB 60%, #F3E5D4 100%);
  border: 1px solid rgba(184, 144, 71, 0.45);
  border-radius: 12px;
  box-shadow: 
    0 12px 28px rgba(74, 9, 26, 0.08),
    0 4px 12px rgba(184, 144, 71, 0.12),
    inset 0 1px 0 #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.countdown-card:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 16px 36px rgba(74, 9, 26, 0.12),
    0 6px 16px rgba(184, 144, 71, 0.22),
    inset 0 1px 0 #FFFFFF;
}

.countdown-card .number {
  font-family: var(--font-body);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  background: linear-gradient(135deg, #5C1027 0%, #7E1C3A 50%, #8C6A24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 1px 2px rgba(184, 144, 71, 0.2));
  line-height: 1.2;
}

.card-shimmer-effect {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
  pointer-events: none;
}

.countdown-separator {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--gold-dark);
  opacity: 0.75;
  margin-bottom: 25px;
}

.countdown-item .label {
  font-family: var(--font-sans);
  font-size: clamp(0.68rem, 1.5vw, 0.82rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy-main);
  font-weight: 600;
}

.target-date-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(184, 144, 71, 0.09);
  border: 1px solid rgba(184, 144, 71, 0.35);
  border-radius: 30px;
  padding: 8px 24px;
  margin: 10px auto 20px;
}

.target-date-box .date-icon {
  color: var(--burgundy-main);
  flex-shrink: 0;
}

.target-date-display {
  font-family: var(--font-body);
  font-size: 1.15rem;
  color: var(--burgundy-dark);
  letter-spacing: 0.06em;
  margin-bottom: 0;
  font-weight: 600;
}

.countdown-note {
  font-family: var(--font-body);
  font-size: clamp(0.92rem, 2vw, 1.05rem);
  line-height: 1.9;
  color: var(--burgundy-dark);
  max-width: 36em;
  margin: 0 auto;
  opacity: 0.88;
}

/* Calendar Add Buttons */
.calendar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
}

.btn-icon {
  flex-shrink: 0;
}

.btn-gold-outline {
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid var(--gold-main);
  color: var(--burgundy-dark);
  box-shadow: 0 4px 15px rgba(74, 9, 26, 0.06);
}

.btn-gold-outline:hover {
  background: var(--gold-gradient);
  color: var(--burgundy-deep);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 144, 71, 0.35);
}

.btn-burgundy {
  background: linear-gradient(135deg, #7E1C3A 0%, #540D22 100%);
  color: #FFFDF9;
  border: 1px solid rgba(184, 144, 71, 0.3);
  box-shadow: 0 6px 18px rgba(92, 16, 39, 0.25);
}

.btn-burgundy:hover {
  background: linear-gradient(135deg, #962245 0%, #68122B 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(92, 16, 39, 0.35);
}

.btn-gold {
  background: var(--gold-gradient);
  color: var(--burgundy-deep);
  box-shadow: 0 6px 18px rgba(184, 144, 71, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 144, 71, 0.5);
}

.btn-outline {
  background: rgba(255, 253, 249, 0.85);
  border: 1px solid rgba(184, 144, 71, 0.4);
  color: var(--burgundy-dark);
  box-shadow: 0 4px 12px rgba(74, 9, 26, 0.04);
}

.btn-outline:hover {
  border-color: var(--gold-main);
  background: rgba(184, 144, 71, 0.12);
  color: var(--burgundy-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(184, 144, 71, 0.2);
}

.btn-dark {
  background: var(--burgundy-dark);
  border: 1px solid rgba(184, 144, 71, 0.4);
  color: #FFFDF9;
  box-shadow: 0 6px 18px rgba(74, 9, 26, 0.15);
}

.btn-dark:hover {
  background: var(--burgundy-deep);
  border-color: var(--gold-main);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(74, 9, 26, 0.25);
}

/* ==========================================================================
   VENUE, MAP & LOCATION SECTION
   ========================================================================== */
.venue-section {
  background: radial-gradient(circle at 50% 50%, rgba(244, 234, 223, 0.7) 0%, transparent 80%);
}

.venue-layout-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: stretch;
  text-align: right;
}

.venue-details-card {
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid rgba(184, 144, 71, 0.35);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: right;
  box-shadow: 0 16px 45px rgba(74, 9, 26, 0.08), 0 0 25px rgba(184, 144, 71, 0.1);
}

.venue-badge-pill {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy-main);
  padding: 5px 14px;
  background: rgba(184, 144, 71, 0.12);
  border: 1px solid rgba(184, 144, 71, 0.35);
  border-radius: 20px;
  display: inline-block;
  margin-bottom: 14px;
  font-weight: 600;
}

.venue-title-large {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--burgundy-deep);
  line-height: 1.25;
  margin-bottom: 10px;
}

.venue-address-full {
  font-family: var(--font-body);
  font-size: 1.18rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.venue-action-group {
  margin-bottom: 30px;
}

.venue-primary-action {
  width: 100%;
  margin-bottom: 10px;
  padding: 13px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  box-shadow: 0 6px 20px rgba(184, 144, 71, 0.35);
}

.venue-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  gap: 8px;
}

.venue-secondary-actions .btn {
  padding: 10px 8px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  gap: 5px;
  white-space: nowrap;
}

.venue-info-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-card {
  background: rgba(250, 245, 237, 0.85);
  padding: 18px;
  border-radius: 10px;
  border: 1px solid rgba(184, 144, 71, 0.25);
  box-shadow: 0 4px 12px rgba(74, 9, 26, 0.04);
}

.info-card-text h4 {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--burgundy-main);
  font-weight: 600;
  margin-bottom: 4px;
}

.info-card-text p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Map Frame & Styling */
.map-frame-wrapper {
  position: relative;
  min-height: 440px;
  display: flex;
}

.map-ornate-border {
  position: relative;
  width: 100%;
  min-height: 440px;
  flex: 1;
  border-radius: 16px;
  border: 2px solid var(--gold-main);
  box-shadow: 0 16px 45px rgba(74, 9, 26, 0.1), 0 0 25px rgba(184, 144, 71, 0.15);
}

.map-iframe-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 14px;
  isolation: isolate;
  contain: paint;
  transform: translateZ(0);
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(#fff 0 100%, transparent 100%);
}

.wedding-map,
.neshan-map-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--ivory-light);
  border: none;
  display: block;
  pointer-events: none;
  overscroll-behavior: none;
}

.map-scroll-shield {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  touch-action: pan-y;
}

.map-iframe-clip.is-interactive .neshan-map-iframe {
  pointer-events: auto;
}

.map-iframe-clip.is-interactive .map-scroll-shield {
  display: none;
}

.map-badge-overlay {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid var(--gold-main);
  border-radius: 30px;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--burgundy-dark);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(74, 9, 26, 0.1);
}

.map-badge-overlay .monogram-badge {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-dark);
}

/* ==========================================================================
   FOOTER & REPLAY
   ========================================================================== */
.luxury-footer {
  padding: 80px 20px 60px;
  background: linear-gradient(180deg, transparent 0%, rgba(244, 234, 223, 0.75) 60%, rgba(237, 225, 206, 0.95) 100%);
  border-top: 1px solid rgba(184, 144, 71, 0.3);
  text-align: center;
}

.footer-content {
  max-width: 700px;
  margin: 0 auto;
}

.footer-quote {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--text-dark);
  line-height: 1.5;
  margin-bottom: 24px;
}

.footer-names {
  font-family: var(--font-script);
  font-size: 4.2rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--burgundy-dark);
  margin-bottom: 6px;
}

.footer-name {
  white-space: nowrap;
}

.footer-date {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 35px;
}

.replay-action-wrapper {
  margin-bottom: 35px;
}

.btn-replay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 30px;
  border: 1px solid var(--gold-main);
  background: rgba(255, 253, 249, 0.9);
  color: var(--burgundy-dark);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(74, 9, 26, 0.06);
  transition: all var(--transition-fast);
}

.btn-replay:hover {
  background: var(--gold-gradient);
  color: var(--burgundy-deep);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(184, 144, 71, 0.35);
}

.footer-credits {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Toast Alert Notification */
.toast-notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(255, 253, 249, 0.96);
  border: 1px solid var(--gold-main);
  color: var(--burgundy-dark);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 30px rgba(74, 9, 26, 0.15), 0 0 20px rgba(184, 144, 71, 0.25);
  z-index: 999;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

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

/* Hidden Utility */
.svg-defs-hidden {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 900px) {
  .venue-layout-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .map-frame-wrapper,
  .map-ornate-border {
    min-height: 380px;
  }

  .countdown-hero-card {
    padding: 45px 20px 38px;
  }

  .countdown-grid {
    gap: clamp(4px, 1.5vw, 12px);
  }

  .footer-quote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
  }

  .footer-quote .verse-sep {
    display: none;
  }

  .footer-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.25;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 70px 15px;
  }

  .venue-details-card {
    padding: 28px 20px;
  }

  .venue-secondary-actions {
    grid-template-columns: 1fr;
  }

  .target-date-box {
    padding: 8px 16px;
    font-size: 0.95rem;
    max-width: 100%;
  }

  .countdown-note {
    font-size: 0.9rem;
    padding: 0 8px;
  }

  .venue-info-cards {
    grid-template-columns: 1fr;
  }

  .card-content-inner {
    padding: 4px 5px;
    gap: 0.25cqh;
  }

  .couple-name {
    font-size: clamp(1.28rem, 6.8cqh, 2.35rem);
    line-height: 1.28;
    padding: 0.04em 0;
  }

  .countdown-card {
    width: clamp(52px, 18vw, 80px);
    height: clamp(62px, 20vw, 90px);
  }

  .footer-names {
    font-size: clamp(2.6rem, 12vw, 3.8rem);
  }
}

@container invite (min-height: 680px) {
  .couple-name {
    font-size: clamp(2.4rem, 8.4cqh, 4.6rem);
    line-height: 1.7;
    padding: 0.1em 0;
  }

  .card-content-inner {
    padding: 10px 12px;
    gap: 0.6cqh;
  }
}

@container invite (max-height: 480px) {
  .flourish-top,
  .flourish-bottom {
    width: min(58px, 24cqw);
    height: min(12px, 2.2cqh);
  }

  .invite-honor br {
    display: none;
  }
}

@media (max-width: 380px) {
  .envelope-and-card-stage {
    width: min(96%, 640px);
  }

  .card-content-frame {
    top: 12%;
    bottom: 12%;
    left: 12.5%;
    right: 12.5%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-canvas {
    display: none;
  }

  .seal-callout,
  .audio-permission-prompt.is-visible .audio-prompt-card,
  .scroll-cue.is-visible .cue-arrow {
    animation: none;
  }
}

.envelope-assembly.is-settled .origami-flap,
.envelope-assembly.is-settled .invitation-card,
.envelope-assembly.is-settled .envelope-back-wall,
.envelope-assembly.is-settled .wax-seal {
  will-change: auto;
}
