/* ============================================================
   ASA TRANSPORTES — Animations CSS
   Fade in, slide, hover, scroll-driven animations
   ============================================================ */

/* ── Scroll Reveal: elemento oculto inicialmente ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

[data-reveal="scale"] {
  transform: scale(0.92);
}

[data-reveal="fade"] {
  transform: none;
}

/* Elemento visível após scroll */
[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* Delays escalonados para grids */
[data-reveal][data-delay="100"] { transition-delay: 100ms; }
[data-reveal][data-delay="200"] { transition-delay: 200ms; }
[data-reveal][data-delay="300"] { transition-delay: 300ms; }
[data-reveal][data-delay="400"] { transition-delay: 400ms; }
[data-reveal][data-delay="500"] { transition-delay: 500ms; }
[data-reveal][data-delay="600"] { transition-delay: 600ms; }

/* ── Shimmer para loading de imagens ── */
.img-placeholder {
  background: linear-gradient(90deg, var(--color-cinza-100) 25%, var(--color-cinza-50) 50%, var(--color-cinza-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* ── Pulse para botões de destaque ── */
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4); }
  50%       { box-shadow: 0 4px 30px rgba(37, 99, 235, 0.7); }
}

.btn--pulse {
  animation: btn-pulse 2s infinite;
}

/* ── Fade In classes utilitárias ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

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

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

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

.animate-fadeIn      { animation: fadeIn 0.6s ease forwards; }
.animate-fadeInUp    { animation: fadeInUp 0.6s ease forwards; }
.animate-fadeInLeft  { animation: fadeInLeft 0.6s ease forwards; }
.animate-fadeInRight { animation: fadeInRight 0.6s ease forwards; }
.animate-scaleIn     { animation: scaleIn 0.5s ease forwards; }

/* ── Hero bounce suave ── */
@keyframes hero-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

/* ── Spin para ícones de loading ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ── Blink para cursor ── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── Typing efeito ── */
@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── Counter increment ── */
@keyframes countUp {
  from { transform: translateY(10px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Hover scale para cards ── */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* ── Linha de progresso ── */
@keyframes lineGrow {
  from { width: 0; }
  to   { width: var(--target-width, 100%); }
}

/* ── Rotação de logo ── */
@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 4px 20px rgba(37, 99, 235, 0.3)); }
  50%       { filter: drop-shadow(0 4px 40px rgba(37, 99, 235, 0.7)); }
}

/* ── Prefers Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

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