/* ============================================
   GESTOR DA AUTOMAÇÃO — ANIMAÇÕES CSS
   ============================================ */

/* ===== SCROLL REVEAL (AOS manual) ===== */
[data-aos] {
    transition-delay: calc(var(--aos-delay, 0) * 1ms);
}

/* ===== PARTÍCULAS / EFEITOS TECNOLÓGICOS ===== */
.tech-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: particleFly 8s infinite;
}

@keyframes particleFly {
    0%   { opacity: 0; transform: translateY(100px) scale(0); }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.3; }
    100% { opacity: 0; transform: translateY(-400px) scale(1.5); }
}

/* ===== SHIMMER LOADING ===== */
@keyframes shimmer {
    0%   { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton {
    background: linear-gradient(90deg,
        rgba(255,255,255,0.04) 25%,
        rgba(255,255,255,0.08) 50%,
        rgba(255,255,255,0.04) 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
    border-radius: var(--radius);
}

/* ===== GLOW PULSE ===== */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 200, 150, 0.2),
                    0 0 40px rgba(0, 200, 150, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 200, 150, 0.4),
                    0 0 80px rgba(0, 200, 150, 0.2);
    }
}

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

/* ===== TYPING CURSOR ===== */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

.typing-cursor::after {
    content: '|';
    color: var(--accent);
    animation: blink 0.8s ease-in-out infinite;
    margin-left: 2px;
}

/* ===== SCAN LINE ===== */
@keyframes scanLine {
    0%   { top: -2px; }
    100% { top: 100%; }
}

.scan-effect {
    position: relative;
    overflow: hidden;
}

.scan-effect::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.4;
    animation: scanLine 3s linear infinite;
}

/* ===== ROTATE SLOW ===== */
@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.rotate-slow {
    animation: rotateSlow 20s linear infinite;
}

/* ===== COUNTER NUMBER ===== */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== CARD FLIP HOVER ===== */
.card-flip {
    perspective: 1000px;
}

.card-flip__inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
    position: relative;
}

.card-flip:hover .card-flip__inner {
    transform: rotateY(180deg);
}

.card-flip__front,
.card-flip__back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.card-flip__back {
    transform: rotateY(180deg);
    position: absolute;
    inset: 0;
}

/* ===== SLIDE IN FROM VARIOUS DIRECTIONS ===== */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-60px); }
    to   { opacity: 1; transform: translateX(0); }
}

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

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

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

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

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

/* ===== GRADIENT SHIFT ===== */
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background: linear-gradient(270deg,
        var(--accent),
        #00e5ff,
        var(--accent-dark),
        #0a2463
    );
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== PROGRESS BAR FILL ===== */
@keyframes progressFill {
    from { width: 0%; }
    to   { width: var(--progress, 100%); }
}

/* ===== HERO PARTICLES ===== */
.hero-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: heroParticle linear infinite;
    opacity: 0;
}

@keyframes heroParticle {
    0%   { opacity: 0; transform: translateY(0) scale(1); }
    10%  { opacity: 0.5; }
    90%  { opacity: 0.2; }
    100% { opacity: 0; transform: translateY(-300px) scale(0.5); }
}

/* ===== SPIN ICON ===== */
@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.fa-spin-slow {
    animation: spinSlow 4s linear infinite;
}

/* ===== RIPPLE BUTTON ===== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: rippleOut 0.6s linear;
    pointer-events: none;
}

@keyframes rippleOut {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== NOTIFICATION BADGE ===== */
@keyframes notificationBadge {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.2); }
}

/* ===== WORD ROTATE ===== */
.word-rotate {
    display: inline-block;
    position: relative;
    overflow: hidden;
    height: 1.2em;
    vertical-align: bottom;
}

.word-rotate__word {
    display: block;
    animation: wordSlide 12s infinite;
}

@keyframes wordSlide {
    0%, 20%  { transform: translateY(0); opacity: 1; }
    25%, 95% { transform: translateY(-100%); opacity: 0; }
    100%     { transform: translateY(0); opacity: 1; }
}

/* ===== HOVER LIFT ===== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* ===== BORDER GLOW ===== */
.border-glow {
    position: relative;
}

.border-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), transparent, var(--primary-light));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.border-glow:hover::before {
    opacity: 1;
}

/* ===== SMOOTH PROGRESS STEPS ===== */
.step-animation {
    animation: stepIn 0.5s ease forwards;
}

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

/* ===== ORBIT ===== */
@keyframes orbit {
    from { transform: rotate(0deg) translateX(80px) rotate(0deg); }
    to   { transform: rotate(360deg) translateX(80px) rotate(-360deg); }
}

/* ===== PAGE TRANSITIONS ===== */
.page-enter {
    animation: pageEnter 0.4s ease forwards;
}

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

/* ===== MARQUEE PAUSE ON HOVER ===== */
.clients__logos:hover {
    animation-play-state: paused;
}

/* ===== ACTIVE PROCESS PULSE ===== */
.process-step.active {
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 150, 0.3); }
    50%       { box-shadow: 0 0 0 8px rgba(0, 200, 150, 0); }
}

/* ===== SECTION DIVIDERS ===== */
.wave-divider {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    display: block;
    width: 100%;
}

/* ===== TOAST NOTIFICATION ===== */
@keyframes toastSlide {
    from { transform: translateX(100px); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.toast {
    animation: toastSlide 0.3s ease forwards;
}

/* ===== LOADING DOTS ===== */
@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0; }
    40%            { transform: scale(1); opacity: 1; }
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

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