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

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

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

@keyframes serviceCardReveal {
  0% {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.975);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes textReveal {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0.2;
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

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

@keyframes modalContentIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes fadeRight {
  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 dividerReveal {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes btnReveal {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes iconPop {
  from {
    opacity: 0;
    transform: scale(0.55);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes strokeDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rotateWordIn {
  0% {
    opacity: 0;
    transform: rotateX(90deg);
  }
  100% {
    opacity: 1;
    transform: rotateX(0deg);
  }
}

@keyframes rotateWordOut {
  0% {
    opacity: 1;
    transform: rotateX(0deg);
  }
  100% {
    opacity: 0;
    transform: rotateX(-90deg);
  }
}

.text-rotate {
  display: inline-block;
  perspective: 300px;
  color: var(--color-accent);
}

.section-header__title .text-rotate {
  display: block;
}

.text-rotate__word {
  display: inline-block;
  transform-origin: 50% 100%;
}

.text-rotate__word.is-visible {
  animation: rotateWordIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.text-rotate__word.is-hidden {
  animation: rotateWordOut 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Scroll-triggered base states */
.reveal-text,
.animate-on-scroll,
.animate-fade-left,
.animate-fade-right,
.animate-scale-in,
.animate-divider,
.animate-btn,
.animate-icon {
  animation: none;
}

.reveal-text {
  clip-path: inset(0 100% 0 0);
  opacity: 0.2;
}

.reveal-text.is-visible {
  animation: textReveal 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
}

.animate-on-scroll.is-visible {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.service-card.animate-on-scroll {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.975);
}

.service-card.animate-on-scroll.is-visible {
  animation: serviceCardReveal 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.service-card:not(.is-visible) .service-card__bg img {
  transform: scale(1.06);
}

.service-card.is-visible .service-card__bg img {
  transform: scale(1);
  transition: transform 1.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card:not(.is-visible) .service-card__title,
.service-card:not(.is-visible) .service-card__desc {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}

.service-card.is-visible .service-card__title {
  animation: fadeInUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.14s forwards;
}

.service-card.is-visible .service-card__desc {
  animation: fadeInUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.24s forwards;
}

.stack-card.is-direct-target {
  animation: none !important;
  opacity: 1;
  transform: none;
}

.animate-fade-left {
  opacity: 0;
  transform: translateX(-40px);
}

.animate-fade-left.is-visible {
  animation: fadeLeft 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.animate-fade-right {
  opacity: 0;
  transform: translateX(40px);
}

.animate-fade-right.is-visible {
  animation: fadeRight 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.animate-scale-in {
  opacity: 0;
  transform: scale(0.92);
}

.animate-scale-in.is-visible {
  animation: scaleIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-divider {
  display: inline-block;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
}

.animate-divider.is-visible {
  animation: dividerReveal 0.9s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.animate-btn {
  opacity: 0;
  transform: translateY(18px) scale(0.96);
}

.animate-btn.is-visible {
  animation: btnReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-icon {
  opacity: 0;
  transform: scale(0.55);
}

.animate-icon.is-visible {
  animation: iconPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Micro-animações em filhos quando o bloco entra na tela */
.maq-feature-card:not(.is-visible) .maq-icon-box,
.feature-card:not(.is-visible) .feature-card__icon,
.solutions-benefits__column:not(.is-visible) .solutions-benefits__icon,
.stats-bar__item:not(.is-visible) .stats-bar__icon,
.contact-channel:not(.is-visible) .contact-channel__icon,
.contact-hero__blurb:not(.is-visible) .contact-hero__blurb-icon {
  opacity: 0;
  transform: scale(0.55);
}

.maq-feature-card.is-visible .maq-icon-box,
.feature-card.is-visible .feature-card__icon,
.solutions-benefits__column.is-visible .solutions-benefits__icon,
.stats-bar__item.is-visible .stats-bar__icon,
.contact-channel.is-visible .contact-channel__icon,
.contact-hero__blurb.is-visible .contact-hero__blurb-icon {
  animation: iconPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.maq-feature-card.is-visible .maq-icon-box svg path,
.maq-feature-card.is-visible .maq-icon-box svg line,
.maq-feature-card.is-visible .maq-icon-box svg rect,
.feature-card.is-visible .feature-card__icon svg path,
.feature-card.is-visible .feature-card__icon svg line,
.feature-card.is-visible .feature-card__icon svg rect {
  stroke-dasharray: 96;
  stroke-dashoffset: 96;
  animation: strokeDraw 0.75s ease forwards;
}

.service-card:not(.is-visible) .service-card__line {
  width: 0;
}

.service-card.is-visible .service-card__line {
  width: 42%;
  transition: width 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.32s;
}

.service-card.is-visible:hover .service-card__line {
  width: 100%;
  transition: width 0.7s ease;
}

.service-card:not(.is-visible) .service-card__tag-icon,
.service-card:not(.is-visible) .service-card__arrow {
  opacity: 0;
  transform: scale(0.7);
}

.service-card.is-visible .service-card__tag-icon {
  animation: iconPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s forwards;
}

.service-card.is-visible .service-card__arrow {
  animation: iconPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

.stack-card:not(.is-visible) .dv-stack-btn {
  opacity: 0;
  transform: translateY(14px) scale(0.96);
}

.stack-card.is-visible .dv-stack-btn {
  animation: btnReveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.22s forwards;
}

.footer-section__divider {
  transform-origin: left center;
}

.footer-contact:not(.is-visible) .footer-section__divider,
.footer-social:not(.is-visible) .footer-section__divider {
  transform: scaleX(0);
  opacity: 0.4;
}

.footer-contact.is-visible .footer-section__divider,
.footer-social.is-visible .footer-section__divider {
  animation: dividerReveal 0.8s cubic-bezier(0.77, 0, 0.175, 1) 0.1s forwards;
}

.modal.is-open {
  animation: modalBackdropIn 0.3s ease forwards;
}

.modal.is-open .modal__content {
  animation: modalContentIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.bg-gradient-animated {
  background: linear-gradient(-45deg, var(--color-primary), #264a33, #152b1d, var(--color-primary));
  background-size: 300% 300%;
  animation: gradientFlow 10s ease infinite;
}

.bg-noise::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--texture-noise);
  mix-blend-mode: overlay;
  opacity: 0.3;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-text,
  .animate-on-scroll,
  .animate-fade-left,
  .animate-fade-right,
  .animate-scale-in,
  .animate-divider,
  .animate-btn,
  .animate-icon {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    animation: none !important;
  }

  .btn-hubot::before,
  .btn-green::before,
  .btn-green-final::before,
  .btn-v4::before,
  .dv-stack-btn::before {
    animation: none !important;
  }

  .hero-slide,
  .hero-slide__media,
  .hero-slide__video,
  .hero-slide .hero__content {
    transition: none !important;
  }

  .hero-slide__media {
    transform: none !important;
  }

  .hero-slider__timer span {
    animation: none !important;
  }
}
