/* ===========================
   LOGATTO MARKETING – ANIMATIONS.CSS
   =========================== */

/* Particle canvas */
#particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Typing cursor */
.typing-cursor::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
  color: #00c9ff;
}
@keyframes blink { 50% { opacity: 0; } }

/* Float animation */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.float { animation: floatY 5s ease-in-out infinite; will-change: transform; }
.float-slow { animation: floatY 7s ease-in-out infinite; will-change: transform; }
.float-delay { animation: floatY 5s ease-in-out infinite 1.5s; will-change: transform; }

/* Rotate */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.spin-slow { animation: rotate 20s linear infinite; will-change: transform; }

/* Glow pulse */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0,201,255,0.4); }
  50% { box-shadow: 0 0 50px rgba(0,201,255,0.8), 0 0 80px rgba(0,201,255,0.3); }
}
.glow-pulse { animation: glowPulse 3s ease-in-out infinite; }

/* Shimmer */
@keyframes shimmer {
  0% { background-position: -500px 0; }
  100% { background-position: 500px 0; }
}
.shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
  background-size: 500px 100%;
  animation: shimmer 2s infinite linear;
}

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

/* Fade in up */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Scale in */
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Slide in from left */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Slide in from right */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Gradient border */
@keyframes gradientBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hero animated gradient orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: orbFloat 12s ease-in-out infinite;
  pointer-events: none;
  will-change: transform; /* Crucial para performance por causa do filtro blur(80px) */
}

.orb-1 {
  width: 500px; height: 500px;
  background: #00c9ff;
  top: -100px; right: 10%;
  animation-duration: 15s;
}

.orb-2 {
  width: 300px; height: 300px;
  background: #0077b6;
  bottom: 0; left: 20%;
  animation-duration: 10s;
  animation-delay: -5s;
}

.orb-3 {
  width: 200px; height: 200px;
  background: #f0a500;
  top: 40%; right: 30%;
  animation-duration: 8s;
  animation-delay: -3s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Stagger animation helper */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  will-change: transform, opacity; /* Otimiza as animações de entrada (reveal) */
}

.stagger.animated > *:nth-child(1)  { animation: fadeInUp 0.6s ease forwards 0s; }
.stagger.animated > *:nth-child(2)  { animation: fadeInUp 0.6s ease forwards 0.1s; }
.stagger.animated > *:nth-child(3)  { animation: fadeInUp 0.6s ease forwards 0.2s; }
.stagger.animated > *:nth-child(4)  { animation: fadeInUp 0.6s ease forwards 0.3s; }
.stagger.animated > *:nth-child(5)  { animation: fadeInUp 0.6s ease forwards 0.4s; }
.stagger.animated > *:nth-child(6)  { animation: fadeInUp 0.6s ease forwards 0.5s; }
.stagger.animated > *:nth-child(7)  { animation: fadeInUp 0.6s ease forwards 0.6s; }
.stagger.animated > *:nth-child(8)  { animation: fadeInUp 0.6s ease forwards 0.7s; }
.stagger.animated > *:nth-child(n+9) { animation: fadeInUp 0.6s ease forwards 0.8s; }

/* Loading bar */
.loading-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, #00c9ff, #0077b6);
  z-index: 9999;
  width: 0;
  transition: width 0.3s ease;
  will-change: width;
}

/* Active nav indicator */
@keyframes navIndicator {
  from { width: 0; }
  to { width: 100%; }
}

/* Card hover glow */
.service-card:hover .service-icon,
.hero-card:hover .icon {
  animation: glowPulse 1.5s ease-in-out infinite;
}

/* Parallax tilt effect setup */
.tilt {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
  will-change: transform;
}

/* Text reveal */
.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: block;
  animation: slideInLeft 0.8s ease forwards;
  will-change: transform, opacity;
}

/* Previne que as animações de reveal causem overflow no mobile */
@media (max-width: 768px) {
  .reveal-left { transform: translateX(-20px); }
  .reveal-right { transform: translateX(20px); }
  .reveal { transform: translateY(20px); }
  .stagger > * { transform: translateY(20px); }
}
