/* ==========================================================================
   MotorGarage Performance Workshop - Animations & Micro-Interactions
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Animações de Entrada do Hero (Carregamento da Página)
   -------------------------------------------------------------------------- */
@keyframes heroFadeUp {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-loaded .section-tag {
  animation: heroFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-loaded .hero-headline {
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-loaded .hero-description {
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.hero-loaded .hero-actions {
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.45s both;
}

.hero-loaded .hero-trust-bar {
  animation: heroFadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

/* --------------------------------------------------------------------------
   2. Sistema de Revelação ao Rolar a Página (Scroll Reveal)
   -------------------------------------------------------------------------- */
.reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   3. Micro-Interação: Reflexo de Luz (Shimmer) no Botão Primário
   -------------------------------------------------------------------------- */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -70%;
  width: 40%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.28) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(25deg);
  transition: all 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.btn-primary:hover::after {
  left: 140%;
}

/* --------------------------------------------------------------------------
   4. Pulso Discreto no Botão Flutuante WhatsApp
   -------------------------------------------------------------------------- */
@keyframes fabPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6), 0 6px 25px rgba(37, 211, 102, 0.4);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(37, 211, 102, 0), 0 6px 25px rgba(37, 211, 102, 0.4);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 6px 25px rgba(37, 211, 102, 0.4);
  }
}

.whatsapp-fab {
  animation: fabPulse 2.8s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-fab:hover {
  animation: none;
}

/* --------------------------------------------------------------------------
   5. Brilho Sutil dos Badges Superiores
   -------------------------------------------------------------------------- */
@keyframes badgeGlow {
  0%, 100% {
    border-color: rgba(234, 179, 8, 0.25);
    box-shadow: 0 0 10px rgba(234, 179, 8, 0.05);
  }
  50% {
    border-color: rgba(234, 179, 8, 0.5);
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.2);
  }
}

.section-tag {
  animation: badgeGlow 4s infinite ease-in-out;
}

/* --------------------------------------------------------------------------
   6. Transições Suaves em Cards Interativos
   -------------------------------------------------------------------------- */
.service-card,
.diff-card,
.step-card,
.depoimento-card,
.faq-item {
  transition: transform var(--transition-normal),
              border-color var(--transition-normal),
              box-shadow var(--transition-normal);
}

/* --------------------------------------------------------------------------
   7. Acessibilidade: 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;
  }

  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .whatsapp-fab {
    animation: none !important;
  }

  .section-tag {
    animation: none !important;
  }

  .btn-primary::after {
    display: none !important;
  }

  .service-card:hover,
  .diff-card:hover,
  .step-card:hover,
  .depoimento-card:hover,
  .btn:hover,
  .gallery-item:hover .gallery-img {
    transform: none !important;
  }
}
