/* ============================================================
   D-Fin Solutions — Animations
   animations.css
   ============================================================ */

/* ---------- Particle Animation ---------- */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: particle-float linear infinite;
}

@keyframes particle-float {
  0%   { opacity: 0; transform: translateY(0) scale(0.5); }
  10%  { opacity: 0.25; }
  90%  { opacity: 0.15; }
  100% { opacity: 0; transform: translateY(-60px) scale(1); }
}

/* ---------- Scroll Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

[data-reveal="left"] {
  opacity: 0;
  transform: translateX(-32px);
}

[data-reveal="right"] {
  opacity: 0;
  transform: translateX(32px);
}

[data-reveal="scale"] {
  opacity: 0;
  transform: scale(0.93);
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* Reveal delay helpers */
[data-delay="100"] { transition-delay: 0.10s; }
[data-delay="200"] { transition-delay: 0.20s; }
[data-delay="300"] { transition-delay: 0.30s; }
[data-delay="400"] { transition-delay: 0.40s; }
[data-delay="500"] { transition-delay: 0.50s; }
[data-delay="600"] { transition-delay: 0.60s; }
[data-delay="700"] { transition-delay: 0.70s; }

/* ---------- Hero Cards Float ---------- */
.hero__cards .card:nth-child(1) {
  animation: card-float-1 6s ease-in-out infinite;
}
.hero__cards .card:nth-child(2) {
  animation: card-float-2 7s ease-in-out 1s infinite;
}
.hero__cards .card:nth-child(3) {
  animation: card-float-3 5.5s ease-in-out 0.5s infinite;
}

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

@keyframes card-float-2 {
  0%, 100% { transform: translateY(0) translateX(0); }
  50%       { transform: translateY(-7px) translateX(5px); }
}

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

/* ---------- Badge Pulse ---------- */
.hero__badge-dot {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}

/* ---------- WhatsApp Bounce ---------- */
.whatsapp-float {
  animation: wa-bounce 3s ease-in-out 5s infinite;
}

@keyframes wa-bounce {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.07); }
}

/* ---------- Navbar Logo Hover ---------- */
.navbar__logo:hover .logo-mark {
  transform: rotate(-5deg) scale(1.08);
  transition: transform 0.25s ease;
}

/* ---------- Page Transition Fade ---------- */
.page-fade {
  animation: page-fade-in 0.4s ease forwards;
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Counter Tick ---------- */
@keyframes counter-tick {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Glow Pulse (on .card--glow) ---------- */
.stats__inner {
  animation: glow-pulse 4s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 28px rgba(200,150,42,0.22), 0 0 56px rgba(200,150,42,0.10); }
  50%       { box-shadow: 0 0 40px rgba(200,150,42,0.32), 0 0 80px rgba(200,150,42,0.16); }
}

/* ---------- Progress Bar Animation ---------- */
@keyframes progress-fill {
  from { width: 0%; }
}

.progress-bar__fill {
  animation: progress-fill 1.2s ease forwards;
}

/* ---------- Service Card Hover Glow ---------- */
.service-card:hover,
.service-full-card:hover {
  box-shadow: 0 0 28px rgba(200,150,42,0.14), 0 8px 32px rgba(0,0,0,0.4);
}

/* ---------- CTA Banner Glow Breathe ---------- */
.cta-banner {
  animation: cta-glow 6s ease-in-out infinite;
}

@keyframes cta-glow {
  0%, 100% { box-shadow: var(--shadow-gold); }
  50%       { box-shadow: 0 0 48px rgba(200,150,42,0.32), 0 0 80px rgba(200,150,42,0.16); }
}

/* ---------- Loader (optional page load spinner) ---------- */
.page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--gold-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Hover Lift (generic) ---------- */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

/* ---------- Typing Cursor ---------- */
.typing-cursor::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--gold-mid);
  margin-left: 2px;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ---------- Mouse Glow Effect (JS-driven) ---------- */
.mouse-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,150,42,0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: left 0.1s ease, top 0.1s ease;
  top: -200px;
  left: -200px;
}
