/* =========================================
   KEYFRAMES
   ========================================= */

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(20% 0 80% 0); transform: translate(-2px, 2px); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(40% 0 50% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(10% 0 70% 0); transform: translate(-2px, 2px); }
    100% { clip-path: inset(30% 0 50% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(10% 0 60% 0); transform: translate(2px, -2px); }
    20% { clip-path: inset(30% 0 20% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(70% 0 10% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(20% 0 50% 0); transform: translate(-2px, 2px); }
    80% { clip-path: inset(50% 0 30% 0); transform: translate(2px, -2px); }
    100% { clip-path: inset(5% 0 80% 0); transform: translate(-2px, 2px); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 5px var(--accent-green); }
    50% { box-shadow: 0 0 20px var(--accent-green); }
    100% { box-shadow: 0 0 5px var(--accent-green); }
}

@keyframes bounce-down {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

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

/* =========================================
   ANIMATION CLASSES
   ========================================= */

/* Glitch Effect */
.glitch {
    position: relative;
    color: white;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--accent-magenta);
    clip-path: inset(24% 0 58% 0);
    animation: glitch-anim-1 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--accent-cyan);
    clip-path: inset(54% 0 7% 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-terminal);
    color: var(--text-dim);
    font-size: 0.8rem;
    animation: bounce-down 2s infinite;
}

.scroll-indicator .arrow {
    font-size: 1.5rem;
    color: var(--accent-green);
    margin-top: 5px;
}

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Pulse dot */
.pulse {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: red;
    box-shadow: 0 0 10px red;
    animation: blink 1s infinite;
    margin-right: 10px;
}

/* Nuevas animaciones interactivas */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}
.hover-scale:hover {
    transform: translateY(-25px) scale(1.02) !important;
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.2);
}

.hover-zoom {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-zoom:hover {
    transform: scale(1.1) !important;
    z-index: 10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5) !important;
}

.float-animation {
    animation: float-slow 6s ease-in-out infinite;
}
.float-animation-alt {
    animation: float-slow-alt 7s ease-in-out infinite;
}

@keyframes float-slow {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

@keyframes float-slow-alt {
    0% { transform: translateY(0px); }
    50% { transform: translateY(8px); }
    100% { transform: translateY(0px); }
}
