/* Animation Styles for HanabiAI */

/* 1. Scroll Reveal Animation */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

.reveal-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for lists/grids */
.reveal-delay-100 {
    transition-delay: 0.1s;
}

.reveal-delay-200 {
    transition-delay: 0.2s;
}

.reveal-delay-300 {
    transition-delay: 0.3s;
}

/* 2. Glitch Effect for Buttons (AI Theme) */
@keyframes glitch-anim-1 {
    0% {
        clip: rect(20px, 9999px, 10px, 0);
    }

    20% {
        clip: rect(60px, 9999px, 70px, 0);
    }

    40% {
        clip: rect(20px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    80% {
        clip: rect(50px, 9999px, 20px, 0);
    }

    100% {
        clip: rect(30px, 9999px, 60px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(10px, 9999px, 80px, 0);
    }

    20% {
        clip: rect(80px, 9999px, 10px, 0);
    }

    40% {
        clip: rect(30px, 9999px, 50px, 0);
    }

    60% {
        clip: rect(70px, 9999px, 30px, 0);
    }

    80% {
        clip: rect(20px, 9999px, 60px, 0);
    }

    100% {
        clip: rect(50px, 9999px, 10px, 0);
    }
}

.btn-glitch {
    position: relative;
    overflow: hidden;
}

.btn-glitch:hover::before,
.btn-glitch:hover::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(231, 231, 231, 1);
    /* Match button bg */
    color: rgba(51, 51, 51, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-glitch:hover::before {
    left: 2px;
    text-shadow: -1px 0 red;
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.btn-glitch:hover::after {
    left: -2px;
    text-shadow: -1px 0 blue;
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

/* 3. Neural Network Canvas Container */
#neural-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind content */
    pointer-events: none;
    opacity: 0.6;
}

/* Ensure Hero content is above canvas */
.home-hero-section .home-container,
.tech-hero-section .tech-container,
.vision-hero-section .vision-container,
.company-hero-section .company-container,
.news-hero-section .news-container,
.careers-hero-section .careers-container,
.contact-hero-section .contact-container {
    position: relative;
    z-index: 2;
}

/* 4. Typewriter Cursor */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    background-color: #333;
    animation: blink 1s step-end infinite;
    margin-left: 5px;
    vertical-align: middle;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}