/* ===================================================
   ANIMATIONS — Bawar Salah Saeed IR Website
   =================================================== */

/* ─── Keyframes ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

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

@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
  50%       { box-shadow: 0 0 0 12px rgba(201,168,76,0.08); }
}

@keyframes ringRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

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

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes dotBlink {
  0%, 80%, 100% { opacity: 0; }
  40%           { opacity: 1; }
}

@keyframes barGrow {
  from { width: 0; }
  to   { width: var(--target-width, 100%); }
}

/* ─── Scroll Reveal Classes ─── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible { opacity: 1; transform: none; }

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible { opacity: 1; transform: none; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* Staggered children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.05s; }
.stagger.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.15s; }
.stagger.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.25s; }
.stagger.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.35s; }
.stagger.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.45s; }
.stagger.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.55s; }

/* ─── Hero Entrance ─── */
.hero-eyebrow  { animation: fadeUp 0.7s ease 0.2s both; }
.hero-title    { animation: fadeUp 0.7s ease 0.35s both; }
.hero-title-sub{ animation: fadeUp 0.7s ease 0.45s both; }
.hero-desc     { animation: fadeUp 0.7s ease 0.55s both; }
.hero-actions  { animation: fadeUp 0.7s ease 0.65s both; }
.hero-stats    { animation: fadeUp 0.7s ease 0.75s both; }
.hero-image-wrap { animation: fadeLeft 0.8s ease 0.4s both; }

/* ─── Floating card animation ─── */
.hero-image-card { animation: float 6s ease-in-out infinite; }

/* ─── Ring decoration ─── */
.hero-deco-ring { animation: ringRotate 30s linear infinite; }

/* ─── Gold pulse on CTA ─── */
.btn-primary { animation: goldPulse 3s ease-in-out infinite; }

/* ─── Navbar entrance ─── */
#navbar { animation: slideDown 0.5s ease both; }

/* ─── Shimmer loading effect ─── */
.shimmer {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.0) 0%,
    rgba(255,255,255,0.06) 50%,
    rgba(255,255,255,0.0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ─── Loading dots ─── */
.loading-dots span {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  margin: 0 2px;
  animation: dotBlink 1.4s infinite both;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ─── Page transition ─── */
.page-enter {
  animation: fadeIn 0.5s ease both;
}

/* ─── Glow text effect ─── */
.glow-text {
  text-shadow: 0 0 20px rgba(201,168,76,0.3), 0 0 40px rgba(201,168,76,0.1);
}

/* ─── Smooth hover scale ─── */
.hover-scale {
  transition: transform 0.3s ease;
}
.hover-scale:hover { transform: scale(1.03); }
