@font-face {
  font-family: 'IranNastaliq';
  src: url('../assets/fonts/IranNastaliq.woff2') format('woff2'),
       url('../assets/fonts/IranNastaliq.woff') format('woff'),
       url('../assets/fonts/IranNastaliq.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
.nastaliq-font {
  font-family: 'IranNastaliq', 'Lalezar', 'Vazirmatn', sans-serif !important;
  font-size: clamp(2.5rem, 8vw, 4.5rem) !important;
  font-weight: normal !important;
  line-height: 1.8 !important;
}

/* GLOBAL / RESET */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}
html { 
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}
body { 
  font-family: 'Vazirmatn', sans-serif; 
  direction: rtl; 
  background: #0a0a0a; 
  color: #fff; 
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden; 
  touch-action: auto;
  -webkit-tap-highlight-color: transparent;
}

/* CSS VARIABLES */
:root {
  --wine: #6B1D3A;
  --wine-light: #8B2252;
  --gold: #D4A574;
  --gold-light: #E8C99B;
  --cream: #FFF8F0;
  --cream-dark: #FAF0E6;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.65);
}

/* VIDEO BACKGROUND */
.video-bg {
  position: fixed;
  pointer-events: none;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}
#bg-sequence {
  display: block;
  width: 100%;
  height: 100%;
}
.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(10,5,15,0.75) 100%);
}

/* SCROLL PROGRESS BAR */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 9999;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* MUSIC BUTTON */
.music-btn {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: max(20px, env(safe-area-inset-right));
  z-index: 1000;
  background: rgba(20, 10, 20, 0.65);
  border-radius: 50px;
  padding: 10px 16px;
  cursor: pointer;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.music-btn:hover, .music-btn:active {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}
.music-btn.playing {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(212, 165, 116, 0.4);
}
.music-icon {
  display: inline-block;
  font-size: 1.1rem;
}
.music-btn.playing .music-icon {
  animation: spin-slow 4s linear infinite;
}
.music-text {
  font-size: 0.8rem;
  white-space: nowrap;
}

/* SCROLL CONTAINER */
.scroll-container {
  position: relative;
  touch-action: pan-y;
  z-index: 1;
  width: 100%;
  overflow-x: hidden;
}

/* CONTAINER */
.container {
  width: 100%;
  max-width: 900px;
  margin: auto;
  padding: 0 20px;
}

/* GLASS CARD (Glassmorphism) */
.glass-card {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: clamp(16px, 4vw, 24px);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
  width: 100%;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
  transform: skewX(-25deg);
  opacity: 0.05;
  transition: all 0.5s;
}
.glass-card:hover::before {
  left: 150%;
}

/* SECTIONS */
.section {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0;
  margin: 10vh 0;
  position: relative;
  width: 100%;
}

/* SECTION 1: HERO */
.hero-section {
  min-height: 100vh;
  min-height: 100dvh;
  text-align: center;
  padding: 40px 0;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 10vh;
  width: 100%;
}
.photo-morph-container {
  margin-bottom: 1.5rem;
  position: relative;
}
.photo-frame {
  width: clamp(150px, 35vw, 220px);
  height: clamp(150px, 35vw, 220px);
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 0 24px rgba(212, 165, 116, 0.4);
  position: relative;
  z-index: 2;
}
.couple-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.5s ease;
}
.photo-frame:hover .couple-photo {
  transform: scale(1.05);
}
.photo-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
  opacity: 0.35;
  animation: pulse-glow 3s infinite alternate;
  z-index: 1;
}
.hero-text {
  text-align: center;
  width: 100%;
}
.couple-names-fa {
  margin: 0 auto 0.8rem;
  line-height: 1;
  width: 100%;
  display: flex;
  justify-content: center;
}
.couple-names-fa-image {
  display: block;
  width: clamp(240px, 42vw, 520px);
  max-width: 90vw;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.6));
}
.hero-poem {
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}
.hero-date-fa {
  font-size: clamp(1.05rem, 3.5vw, 1.25rem);
  color: var(--gold);
  font-weight: 500;
}
.couple-names-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 5vw, 2.5rem);
  font-style: italic;
  color: var(--gold);
  margin: 1.2rem 0 0.4rem;
  direction: ltr;
}
.hero-subtitle-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  color: var(--text-secondary);
  direction: ltr;
}
.hero-date-en {
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  color: var(--text-muted);
  direction: ltr;
}
.btn-invitation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 2rem;
  padding: clamp(12px, 3vw, 16px) clamp(24px, 6vw, 40px);
  background: rgba(212, 165, 116, 0.1);
  border: 2px solid var(--gold);
  color: var(--gold);
  border-radius: 50px;
  font-family: inherit;
  font-size: clamp(0.85rem, 2.8vw, 1rem);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  max-width: 90vw;
}
.btn-invitation:hover, .btn-invitation:active {
  background: var(--gold);
  color: #1a1a1a;
  transform: scale(1.03);
  box-shadow: 0 8px 24px rgba(212, 165, 116, 0.35);
}
.btn-arrow {
  animation: bounce-down 2s infinite;
  display: inline-block;
}
.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 12px;
  position: relative;
}
.scroll-wheel {
  width: 4px;
  height: 8px;
  background: white;
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 2s infinite;
}

/* SECTION 2: INVITATION */
.invitation-card {
  text-align: center;
  max-width: 750px;
  margin: auto;
}
.card-decoration {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px 0;
}
.invitation-photo {
  width: clamp(140px, 30vw, 200px);
  height: clamp(140px, 30vw, 200px);
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  border: 3px solid var(--gold);
}
.invitation-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.5s;
}
.invitation-photo:hover .invitation-img {
  transform: scale(1.05);
}
.invitation-lead {
  font-size: clamp(1rem, 3.2vw, 1.2rem);
  color: var(--gold);
  margin-bottom: 1.2rem;
  line-height: 1.8;
}
.invitation-title {
  font-size: clamp(1.4rem, 4.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.invitation-body {
  line-height: 2;
  font-size: clamp(0.95rem, 3vw, 1.05rem);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}
.invitation-body p {
  margin-bottom: 0.8rem;
}
.invitation-quote {
  font-size: clamp(0.9rem, 2.8vw, 1rem);
  line-height: 2;
  color: var(--gold-light);
  border-right: 3px solid var(--gold);
  padding-right: 16px;
  margin: 1.5rem 0;
  font-style: normal;
  text-align: right;
}
.invitation-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  color: var(--gold);
  direction: ltr;
  margin-top: 1.5rem;
  font-style: italic;
}

/* SECTION 3: COUNTDOWN */
.countdown-card {
  text-align: center;
}
.section-title-fa {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: white;
}
.countdown-poem {
  font-size: clamp(0.9rem, 2.8vw, 1.05rem);
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.countdown-timer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 2vw, 16px);
  flex-wrap: nowrap;
  direction: ltr;
  width: 100%;
}
.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: clamp(48px, 15vw, 90px);
  background: rgba(255,255,255,0.04);
  padding: clamp(8px, 2vw, 16px) clamp(4px, 1.5vw, 12px);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}
.countdown-number {
  font-size: clamp(1.6rem, 6vw, 3.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}
.countdown-label {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.65rem, 2vw, 0.85rem);
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.countdown-label-fa {
  font-size: clamp(0.7rem, 2.2vw, 0.8rem);
  color: var(--text-muted);
}
.countdown-separator {
  font-size: clamp(1.2rem, 4vw, 2.5rem);
  color: var(--gold);
  font-weight: 200;
  opacity: 0.5;
  user-select: none;
}

/* SECTION 4: SAVE THE DATE */
.savedate-card {
  text-align: center;
}
.savedate-title-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 6vw, 3rem);
  color: var(--gold);
  direction: ltr;
  margin-bottom: 0.8rem;
}
.savedate-subtitle-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  color: var(--text-secondary);
  direction: ltr;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}
.savedate-divider {
  text-align: center;
  margin: 1rem 0;
  font-size: 1.3rem;
}
.savedate-subtitle-fa {
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}
.savedate-dates {
  margin-bottom: 2rem;
}
.savedate-date-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  color: white;
  direction: ltr;
}
.savedate-date-fa {
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  color: var(--gold);
  margin-top: 0.4rem;
}
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 1.5rem;
}
.schedule-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}
.schedule-item:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
}
.schedule-icon {
  font-size: 1.8rem;
}
.schedule-time {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 700;
  color: var(--gold);
  direction: ltr;
}
.schedule-label {
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  color: var(--text-secondary);
}

/* SECTION 5: VENUE */
.venue-card {
  text-align: center;
}
.venue-title {
  font-size: clamp(1.3rem, 4.5vw, 1.8rem);
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: white;
}
.venue-address {
  font-size: clamp(0.9rem, 2.8vw, 1rem);
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.venue-name {
  font-size: clamp(1.2rem, 3.8vw, 1.5rem);
  font-weight: 700;
  color: var(--gold);
  margin-top: 0.4rem;
}
.venue-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.venue-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 50px;
  text-decoration: none;
  font-family: inherit;
  font-size: clamp(0.85rem, 2.6vw, 0.95rem);
  transition: all 0.3s ease;
  background: rgba(212, 165, 116, 0.08);
}
.venue-link-btn:hover, .venue-link-btn:active {
  background: var(--gold);
  color: #1a1a1a;
}
.map-container {
  width: 100%;
  height: clamp(220px, 45vh, 350px);
  border-radius: 16px;
  overflow: hidden;
  margin-top: 1.5rem;
  border: 1px solid var(--glass-border);
  z-index: 1;
}

/* SECTION 6: OUR STORY / TIMELINE */
.story-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--gold);
  direction: ltr;
  margin-bottom: 0.4rem;
}
.timeline {
  position: relative;
  padding: 1rem 0;
  width: 100%;
}
.timeline-line {
  position: absolute;
  right: 50%;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--gold), var(--gold), transparent);
  transform: translateX(50%);
}
.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  display: flex;
  width: 100%;
}
.timeline-item:nth-child(odd) {
  justify-content: flex-start;
  padding-left: calc(50% + 24px);
  padding-right: 0;
}
.timeline-item:nth-child(even) {
  justify-content: flex-end;
  padding-right: calc(50% + 24px);
  padding-left: 0;
}
.timeline-dot {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--gold);
  border-radius: 50%;
  border: 3px solid var(--wine);
  box-shadow: 0 0 10px var(--gold);
  z-index: 2;
  top: 24px;
  right: calc(50% - 7px);
}
.timeline-card {
  padding: 20px;
  max-width: 400px;
  width: 100%;
}
.timeline-badge {
  display: inline-block;
  font-family: 'Playfair Display', serif;
  font-size: 0.8rem;
  color: var(--gold);
  background: rgba(212,165,116,0.15);
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  direction: ltr;
}
.timeline-card h4 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: white;
}
.timeline-date {
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 10px;
}
.timeline-card p {
  line-height: 1.9;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.timeline-en {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  color: var(--gold);
  direction: ltr;
  margin-top: 10px;
}

/* SECTION 8: CLOSING */
.closing-section {
  align-items: flex-end;
  padding-bottom: 4vh !important;
  margin-bottom: 0 !important;
}
.closing-card {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.closing-photo {
  width: clamp(110px, 25vw, 170px);
  height: clamp(110px, 25vw, 170px);
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.2rem;
  border: 3px solid var(--gold);
  transition: transform 0.5s ease;
  box-shadow: 0 0 24px rgba(212, 165, 116, 0.35);
}
.closing-photo:hover {
  transform: scale(1.05);
}
.closing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.closing-content {
  line-height: 2.1;
}
.closing-content p {
  margin-bottom: 0.8rem;
  font-size: clamp(0.9rem, 2.5vw, 1rem);
  color: var(--text-secondary);
}
.closing-waiting {
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  color: white;
  font-weight: 600;
}
.closing-en {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.1rem, 3.5vw, 1.3rem);
  color: var(--gold);
  direction: ltr;
  font-style: italic;
}
.closing-names {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  color: var(--gold);
  direction: ltr;
  margin-top: 0.8rem;
}
.floating-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.heart {
  position: absolute;
  animation: float-up linear infinite;
  opacity: 0;
  color: var(--wine-light);
}

/* ANIMATIONS */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.1); }
}
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 0 15px var(--gold); }
  100% { transform: scale(1); }
}
@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(16px); }
}
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes float-up {
  0% { opacity: 0; transform: translateY(100vh) rotate(0deg); }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-100vh) rotate(720deg); }
}

/* RESPONSIVE MEDIA QUERIES FOR ALL MOBILE DEVICES */
@media (max-width: 768px) {
  .section { 
    min-height: auto; 
    padding: 80px 0;
    margin: 8vh 0;
  }
  .hero-section { 
    min-height: 100dvh; 
    padding: 30px 0; 
    display: flex;
    align-items: center;
  }
  .hero-content { 
    padding-top: 20px; 
    gap: 10px; 
  }
  .schedule-grid { 
    grid-template-columns: 1fr; 
    gap: 10px; 
  }
  
  /* Timeline Mobile Layout */
  .timeline-line { 
    right: 18px; 
    transform: none; 
  }
  .timeline-item:nth-child(odd),
  .timeline-item:nth-child(even) { 
    padding-right: 36px; 
    padding-left: 0; 
    width: 100%; 
    justify-content: flex-start;
  }
  .timeline-dot {
    right: 11px;
    left: auto;
  }
  .timeline-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  .hero-content { 
    padding-top: 10px; 
  }
  .btn-invitation {
    width: 100%;
  }
  .music-btn {
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(14px, env(safe-area-inset-right));
    padding: 8px 14px;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 8px;
  }
  .countdown-item {
    min-width: 44px;
    padding: 6px 2px;
  }
  .countdown-separator {
    font-size: 1rem;
  }
}


/* Reliable audible-music entry fallback for browsers that block autoplay */
.audio-entry-gate {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.audio-entry-gate.active { display: flex; pointer-events: none; }
.audio-entry-btn {
  pointer-events: auto;
  touch-action: manipulation;
  appearance: none;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  padding: 14px 24px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-family: 'Vazirmatn', sans-serif;
  font-size: clamp(0.95rem, 2.6vw, 1.1rem);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(0,0,0,0.28);
}
.audio-entry-btn:active { transform: scale(0.98); }
.audio-entry-icon { font-size: 1.3em; }
body.audio-gated { overflow-y: auto !important; }

/* Initial sequence loader: blocks early scrolling until GSAP frames are cached */
body.is-loading {
  overflow: hidden !important;
  touch-action: none;
  overscroll-behavior: none;
}
body.is-loading .scroll-container {
  pointer-events: none;
}
.site-loader {
  position: fixed;
  inset: 0;
  z-index: 1000001;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(212,165,116,0.10), transparent 36%),
    rgba(7, 7, 9, 0.985);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.site-loader-inner {
  width: min(82vw, 460px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.site-loader-names {
  display: block;
  width: min(72vw, 390px);
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.5));
}
.site-loader-text {
  color: rgba(255,255,255,0.86);
  font-family: 'Vazirmatn', sans-serif;
  font-size: clamp(0.88rem, 2.7vw, 1rem);
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}
.site-loader-track {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.13);
}
.site-loader-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  box-shadow: 0 0 14px rgba(212,165,116,0.45);
  transition: width 0.16s linear;
}
.site-loader-percent {
  margin-top: 10px;
  color: rgba(255,255,255,0.62);
  font-family: 'Playfair Display', serif;
  font-size: 0.82rem;
  direction: ltr;
}


/* Mobile performance mode: keep the visual style while avoiding expensive
   dynamic viewport relayouts and backdrop-filter compositing over the canvas. */
@media (max-width: 900px) and (pointer: coarse) {
  html {
    touch-action: auto;
    overflow-y: auto;
    overscroll-behavior-y: auto;
  }
  body {
    touch-action: pan-y;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .scroll-container,
  .section,
  .hero-content {
    touch-action: pan-y;
  }
  .video-bg {
    height: auto;
    min-height: 0;
    overflow: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
  #bg-sequence {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
  .section {
    min-height: auto;
    margin: 48px 0;
    padding-top: 64px;
    padding-bottom: 64px;
  }
  .hero-section {
    min-height: 100svh;
    margin-top: 0;
    margin-bottom: 32px;
  }
  .glass-card {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(18, 12, 20, 0.74);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.24);
  }
  .glass-card::before {
    display: none;
  }
  .music-btn {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(20, 10, 20, 0.86);
    transition: background 0.2s ease, border-color 0.2s ease;
  }
  .music-btn:hover,
  .music-btn:active {
    transform: none;
  }
  .music-btn.playing .music-icon {
    animation: none;
  }
  .audio-entry-gate {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(8, 8, 10, 0.985);
  }
  .map-container {
    touch-action: pan-y;
  }
  .site-loader-bar {
    transition-duration: 0.1s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-loader,
  .site-loader-bar { transition: none; }
}
