/* ==========================================================
   عيادة د. بدر الكميم لطب وجراحة الفم والأسنان
   الافتتاحية الملكية المتصلة بالهيرو (The Royal Morph Reveal)
   حركة انسيابية متصلة بدون تقطيع أو شاشات تحميل مقلدة
   ========================================================== */

/* 1. ستارة الافتتاحية الملكية: تطابق لون خلفية الموقع الصريح تماماً */
.intro-reveal-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #122A6B;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.85s ease;
  will-change: opacity;
}

.intro-reveal-curtain.is-fading {
  opacity: 0;
  pointer-events: none;
}

.intro-reveal-curtain.is-hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* 2. مسرح الشعار المركزي في منتصف الشاشة */
.intro-reveal-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 600px;
  padding: 0 24px;
  user-select: none;
}

.intro-brand-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* وهج ضوئي ناعم يحاكي بريق الابتسامة النقية */
.intro-glow-aura {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.20) 0%, rgba(56, 189, 248, 0.10) 45%, rgba(18, 42, 107, 0) 75%);
  border-radius: 50%;
  pointer-events: none;
  animation: introGlowPulse 2.8s ease-in-out infinite alternate;
  filter: blur(14px);
  will-change: transform, opacity;
}

@keyframes introGlowPulse {
  0% { transform: translate(-50%, -50%) scale(0.9); opacity: 0.55; }
  100% { transform: translate(-50%, -50%) scale(1.18); opacity: 1; }
}

/* صورة الشعار في منتصف الافتتاحية */
.intro-logo-img {
  position: relative;
  z-index: 2;
  display: block;
  width: min(80vw, 320px);
  height: auto;
  max-height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 14px 32px rgba(0, 0, 0, 0.4));
  opacity: 0;
  transform: scale(0.90);
  transition: opacity 0.75s ease,
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.intro-logo-img.is-entered {
  opacity: 1;
  transform: scale(1);
}

/* حالة التحول والتحليق نحو النافبار (Morphing State) - حركة متمهلة وفخمة */
.intro-logo-img.is-morphing {
  transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.95s ease !important;
}

/* الشارة السفلية الأنيقة تحت الشعار في اللحظة الأولى */
.intro-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  padding: 7px 18px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  color: #FFFFFF;
  font-family: "Alexandria", "Tajawal", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.65s ease 0.2s,
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.intro-sub-badge.is-entered {
  opacity: 1;
  transform: translateY(0);
}

.intro-sub-badge.is-leaving {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.intro-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38ef7d;
  box-shadow: 0 0 8px #38ef7d;
}

/* 3. تهيئة عناصر الهيرو والنافبار للانبثاق المتدفق بعد الافتتاحية */
body.is-intro-active {
  overflow: hidden !important;
}

/* في وضع البداية: عناصر الهيرو تبدأ في وضعية الاستعداد غير المرئية بانسيابية */
body.is-intro-active .hero-eyebrow,
body.is-intro-active .hero-headline,
body.is-intro-active .hero-description,
body.is-intro-active .hero-trust-points > li,
body.is-intro-active .cta-group,
body.is-intro-active .hero-info-strip {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.65s ease,
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

body.is-intro-active .nav-links,
body.is-intro-active .nav-actions,
body.is-intro-active .mobile-menu-toggle {
  opacity: 0;
  transform: translate3d(0, -10px, 0);
  transition: opacity 0.5s ease,
              transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* وضع الكشف: تدفق العناصر بتعاقب زمني سينمائي (Staggered Cascade) */
body.intro-revealed .hero-eyebrow {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.04s;
}

body.intro-revealed .hero-headline {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.12s;
}

body.intro-revealed .hero-description {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.20s;
}

body.intro-revealed .hero-trust-points > li:nth-child(1) {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.26s;
}

body.intro-revealed .hero-trust-points > li:nth-child(2) {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.32s;
}

body.intro-revealed .hero-trust-points > li:nth-child(3) {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.38s;
}

body.intro-revealed .cta-group {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.44s;
}

body.intro-revealed .hero-info-strip {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.50s;
}

body.intro-revealed .nav-links,
body.intro-revealed .nav-actions,
body.intro-revealed .mobile-menu-toggle {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition-delay: 0.16s;
}

/* دعم وضع تقليل الحركة (Accessibility & Reduced Motion) */
@media (prefers-reduced-motion: reduce) {
  .intro-reveal-curtain {
    display: none !important;
  }
  body.is-intro-active .hero-eyebrow,
  body.is-intro-active .hero-headline,
  body.is-intro-active .hero-description,
  body.is-intro-active .hero-trust-points > li,
  body.is-intro-active .cta-group,
  body.is-intro-active .hero-info-strip,
  body.is-intro-active .nav-links,
  body.is-intro-active .nav-actions,
  body.is-intro-active .mobile-menu-toggle {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
