/* ============================================
   CYBERSYS — Animações
   Ficheiro: css/animations.css
   ============================================ */


/* ----------------------------------------
   ANIMAÇÃO FADE-IN-UP
   Usada nos elementos ao aparecerem no ecrã
   ---------------------------------------- */

/* Estado inicial: invisível e deslocado para baixo */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Estado visível: quando a classe é activada pelo JS */
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delays progressivos para efeito em cascata */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }


/* ----------------------------------------
   ANIMAÇÃO DO TÍTULO (typewriter-style glow)
   ---------------------------------------- */
.hero-title .text-orange,
.hero-title .text-teal {
    display: inline;
    transition: text-shadow 0.4s ease;
}

.hero-title.visible .text-orange {
    animation: glowOrange 2s ease-in-out infinite alternate;
}

.hero-title.visible .text-teal {
    animation: glowTeal 2s ease-in-out infinite alternate;
}

@keyframes glowOrange {
    from {
        text-shadow: 0 0 4px rgba(232, 146, 42, 0.0);
    }
    to {
        text-shadow: 0 0 18px rgba(232, 146, 42, 0.25);
    }
}

@keyframes glowTeal {
    from {
        text-shadow: 0 0 4px rgba(26, 158, 143, 0.0);
    }
    to {
        text-shadow: 0 0 18px rgba(26, 158, 143, 0.25);
    }
}


/* ----------------------------------------
   ANIMAÇÃO DOS CARDS (hover pulse)
   ---------------------------------------- */
.sobre-card,
.step-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sobre-card:hover .sobre-icon,
.step-card:hover .step-number {
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}


/* ----------------------------------------
   ANIMAÇÃO DO BADGE (fade suave)
   ---------------------------------------- */
.hero-badge.visible {
    animation: badgeFade 1s ease forwards;
}

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


/* ----------------------------------------
   ANIMAÇÃO DOS BOTÕES (entrada suave)
   ---------------------------------------- */
.hero-buttons.visible .btn {
    animation: buttonSlide 0.6s ease forwards;
}

.hero-buttons.visible .btn:nth-child(2) {
    animation-delay: 0.15s;
}

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


/* ----------------------------------------
   ANIMAÇÃO PARTÍCULAS FLUTUANTES (Hero)
   ---------------------------------------- */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.hero-particles span {
    position: absolute;
    display: block;
    width: 4px;
    height: 4px;
    background: rgba(26, 158, 143, 0.4);
    border-radius: 50%;
    animation: floatParticle linear infinite;
}

.hero-particles span:nth-child(1) { left: 10%; width: 3px; height: 3px; animation-duration: 18s; animation-delay: 0s; }
.hero-particles span:nth-child(2) { left: 25%; width: 5px; height: 5px; animation-duration: 22s; animation-delay: 2s; background: rgba(232, 146, 42, 0.3); }
.hero-particles span:nth-child(3) { left: 40%; width: 3px; height: 3px; animation-duration: 20s; animation-delay: 4s; }
.hero-particles span:nth-child(4) { left: 55%; width: 6px; height: 6px; animation-duration: 24s; animation-delay: 1s; background: rgba(232, 146, 42, 0.25); }
.hero-particles span:nth-child(5) { left: 70%; width: 4px; height: 4px; animation-duration: 19s; animation-delay: 3s; }
.hero-particles span:nth-child(6) { left: 85%; width: 3px; height: 3px; animation-duration: 21s; animation-delay: 5s; background: rgba(232, 146, 42, 0.3); }
.hero-particles span:nth-child(7) { left: 50%; width: 5px; height: 5px; animation-duration: 25s; animation-delay: 0s; }
.hero-particles span:nth-child(8) { left: 15%; width: 4px; height: 4px; animation-duration: 17s; animation-delay: 6s; background: rgba(232, 146, 42, 0.2); }

@keyframes floatParticle {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-10vh) rotate(720deg);
        opacity: 0;
    }
}


/* ----------------------------------------
   HOVER GLOW NOS CARDS DE SERVIÇO
   ---------------------------------------- */
.servico-card:hover {
    box-shadow: 0 8px 30px rgba(232, 146, 42, 0.12);
}

.produto-card:hover {
    box-shadow: 0 8px 30px rgba(26, 158, 143, 0.12);
}
