/* ========================================
   SCROLL ANIMATIONS - Animações Modernas
   ======================================== */

/* Classes base para elementos que serão animados */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variação: Fade-in apenas (sem movimento) */
.animate-fade {
  opacity: 0;
  transition: opacity 0.8s ease-out;
}

.animate-fade.is-visible {
  opacity: 1;
}

/* Variação: Slide de baixo para cima */
.animate-slide-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Variação: Slide de esquerda */
.animate-slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Variação: Slide de direita */
.animate-slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Variação: Scale-in (aparece crescendo) */
.animate-scale-up {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-scale-up.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Variação: Fade-in com zoom suave */
.animate-fade-zoom {
  opacity: 0;
  transform: scale(0.95) translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fade-zoom.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Delays progressivos para staggered animation */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* Animação específica para cards em grid (depoimentos, etc) */
.card-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animação para títulos com underline que cresce */
.title-reveal {
  position: relative;
  display: inline-block;
}

.title-reveal::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--fel-brand), var(--fel-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.title-reveal.is-visible::after {
  transform: scaleX(1);
}

/* Animação para lista de benefícios (checkmarks aparecem um por um) */
.benefit-item-animate {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s ease-out, 
              transform 0.5s ease-out;
}

.benefit-item-animate.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Animação para FAQ - accordion items */
.faq-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, 
              transform 0.6s ease-out;
}

.faq-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animação suave para botões */
.button-hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 0.3s ease;
}

.button-hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(79, 45, 20, 0.25);
}

/* Animação para números/estatísticas (counter effect) */
.counter-animate {
  display: inline-block;
}

/* Efeito de parallax suave para backgrounds */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Animação de pulse suave para elementos importantes */
@keyframes soft-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.pulse-soft {
  animation: soft-pulse 3s ease-in-out infinite;
}

/* Animação de shimmer/gradient para loading states */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.1) 50%, 
    rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Smooth reveal para imagens */
.image-reveal {
  overflow: hidden;
  border-radius: inherit;
}

.image-reveal img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-reveal:hover img {
  transform: scale(1.05);
}

/* Animação para tags/badges */
.tag-pop-in {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
              transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tag-pop-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Animação de wave para separadores */
@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.wave-animate {
  animation: wave 3s ease-in-out infinite;
}

/* Animação para depoimentos - stars aparecem sequencialmente */
.star-reveal span {
  display: inline-block;
  opacity: 0;
  transform: scale(0);
}

.star-reveal.is-visible span:nth-child(1) { animation: starPop 0.3s forwards 0s; }
.star-reveal.is-visible span:nth-child(2) { animation: starPop 0.3s forwards 0.1s; }
.star-reveal.is-visible span:nth-child(3) { animation: starPop 0.3s forwards 0.2s; }
.star-reveal.is-visible span:nth-child(4) { animation: starPop 0.3s forwards 0.3s; }
.star-reveal.is-visible span:nth-child(5) { animation: starPop 0.3s forwards 0.4s; }

@keyframes starPop {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Fade-in sequencial para múltiplos elementos */
.sequential-fade > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, 
              transform 0.5s ease-out;
}

.sequential-fade.is-visible > *:nth-child(1) { animation: seqFade 0.5s forwards 0s; }
.sequential-fade.is-visible > *:nth-child(2) { animation: seqFade 0.5s forwards 0.15s; }
.sequential-fade.is-visible > *:nth-child(3) { animation: seqFade 0.5s forwards 0.3s; }
.sequential-fade.is-visible > *:nth-child(4) { animation: seqFade 0.5s forwards 0.45s; }
.sequential-fade.is-visible > *:nth-child(5) { animation: seqFade 0.5s forwards 0.6s; }

@keyframes seqFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Animação de ripple para botões */
.ripple-effect {
  position: relative;
  overflow: hidden;
}

.ripple-effect::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out, opacity 0.6s ease-out;
}

.ripple-effect:active::after {
  width: 300px;
  height: 300px;
  opacity: 0;
}

/* Animação de bounce-in-up */
@keyframes bounceInUp {
  from, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
  from { opacity: 0; transform: translate3d(0, 100px, 0); }
  60% { opacity: 1; transform: translate3d(0, -20px, 0); }
  75% { transform: translate3d(0, 10px, 0); }
  90% { transform: translate3d(0, -5px, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.bounce-in-up.is-visible {
  animation: bounceInUp 0.8s both;
}

/* ========================================
   RESPONSIVE ANIMATIONS
   ======================================== */

@media (max-width: 768px) {
  /* Reduzir intensidade das animações em mobile para performance */
  .animate-slide-up {
    transform: translateY(20px);
  }
  
  .animate-slide-left,
  .animate-slide-right {
    transform: translateX(0) translateY(20px);
  }
  
  /* Desabilitar parallax em mobile */
  .parallax-bg {
    background-attachment: scroll;
  }
}

/* Prefers-reduced-motion para acessibilidade */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   UTILITIES PARA DEBUG
   ======================================== */

.debug-boundary {
  border: 2px dashed red !important;
}

.debug-visible {
  background: rgba(0, 255, 0, 0.1) !important;
}