/* ============================================
   KR-CLI DOMINION - Animations & Effects
   Glitch, Glow, and Futuristic Effects
   ============================================ */

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

.glitch::before,
.glitch::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #00FFFF;
    clip-path: inset(0 0 0 0);
    animation: glitch-1 2s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: 2px 0 #0066FF;
    clip-path: inset(0 0 0 0);
    animation: glitch-2 3s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
    0% {
        clip-path: inset(40% 0 61% 0);
    }

    20% {
        clip-path: inset(92% 0 1% 0);
    }

    40% {
        clip-path: inset(43% 0 1% 0);
    }

    60% {
        clip-path: inset(25% 0 58% 0);
    }

    80% {
        clip-path: inset(54% 0 7% 0);
    }

    100% {
        clip-path: inset(58% 0 43% 0);
    }
}

@keyframes glitch-2 {
    0% {
        clip-path: inset(65% 0 17% 0);
    }

    20% {
        clip-path: inset(35% 0 2% 0);
    }

    40% {
        clip-path: inset(87% 0 8% 0);
    }

    60% {
        clip-path: inset(12% 0 76% 0);
    }

    80% {
        clip-path: inset(45% 0 23% 0);
    }

    100% {
        clip-path: inset(78% 0 12% 0);
    }
}

/* ===== Glitch Text Effect ===== */
.glitch-text {
    position: relative;
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

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

.glitch-text::before {
    left: 2px;
    text-shadow: -2px 0 #00FFFF;
    clip-path: inset(45% 0 40% 0);
    animation: glitch-text-1 0.5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: 2px 0 #0066FF;
    clip-path: inset(50% 0 30% 0);
    animation: glitch-text-2 0.5s infinite linear alternate-reverse;
}

@keyframes glitch-text-1 {
    0% {
        clip-path: inset(5% 0 80% 0);
    }

    10% {
        clip-path: inset(25% 0 50% 0);
    }

    20% {
        clip-path: inset(45% 0 30% 0);
    }

    30% {
        clip-path: inset(65% 0 10% 0);
    }

    40% {
        clip-path: inset(85% 0 5% 0);
    }

    50% {
        clip-path: inset(5% 0 60% 0);
    }

    60% {
        clip-path: inset(35% 0 40% 0);
    }

    70% {
        clip-path: inset(55% 0 20% 0);
    }

    80% {
        clip-path: inset(75% 0 10% 0);
    }

    90% {
        clip-path: inset(15% 0 70% 0);
    }

    100% {
        clip-path: inset(45% 0 40% 0);
    }
}

@keyframes glitch-text-2 {
    0% {
        clip-path: inset(80% 0 5% 0);
    }

    10% {
        clip-path: inset(50% 0 25% 0);
    }

    20% {
        clip-path: inset(30% 0 45% 0);
    }

    30% {
        clip-path: inset(10% 0 65% 0);
    }

    40% {
        clip-path: inset(5% 0 85% 0);
    }

    50% {
        clip-path: inset(60% 0 5% 0);
    }

    60% {
        clip-path: inset(40% 0 35% 0);
    }

    70% {
        clip-path: inset(20% 0 55% 0);
    }

    80% {
        clip-path: inset(10% 0 75% 0);
    }

    90% {
        clip-path: inset(70% 0 15% 0);
    }

    100% {
        clip-path: inset(50% 0 30% 0);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
    }

    10% {
        transform: skew(0.5deg);
    }

    20% {
        transform: skew(-0.5deg);
    }

    30% {
        transform: skew(0.3deg);
    }

    40% {
        transform: skew(-0.3deg);
    }

    50% {
        transform: skew(0deg);
    }

    60% {
        transform: skew(-0.2deg);
    }

    70% {
        transform: skew(0.2deg);
    }

    80% {
        transform: skew(-0.4deg);
    }

    90% {
        transform: skew(0.4deg);
    }

    100% {
        transform: skew(0deg);
    }
}

/* ===== Neon Pulse ===== */
.neon-pulse {
    animation: neon-pulse 2s infinite;
}

@keyframes neon-pulse {

    0%,
    100% {
        box-shadow:
            0 0 5px var(--cyan),
            0 0 10px var(--cyan),
            0 0 20px var(--cyan),
            0 0 40px var(--electric-blue);
    }

    50% {
        box-shadow:
            0 0 10px var(--cyan),
            0 0 20px var(--cyan),
            0 0 40px var(--cyan),
            0 0 80px var(--electric-blue);
    }
}

/* ===== Text Glow ===== */
.text-glow {
    animation: text-glow 2s infinite alternate;
}

@keyframes text-glow {
    0% {
        text-shadow:
            0 0 5px var(--cyan),
            0 0 10px var(--cyan);
    }

    100% {
        text-shadow:
            0 0 10px var(--cyan),
            0 0 20px var(--cyan),
            0 0 30px var(--electric-blue);
    }
}

/* ===== Scan Line Effect (DISABLED) ===== */
.scanlines::after {
    display: none;
    /* Disabled - no animated lines */
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(4px);
    }
}

/* ===== Typing Effect ===== */
.typing {
    overflow: hidden;
    border-right: 2px solid var(--cyan);
    white-space: nowrap;
    animation:
        typing 3s steps(30, end),
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--cyan);
    }
}

/* ===== Fade In Up ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fade-in-up 0.6s ease forwards;
}

@keyframes fade-in-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered delays */
.fade-in-up:nth-child(1) {
    animation-delay: 0.1s;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.2s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in-up:nth-child(4) {
    animation-delay: 0.4s;
}

/* ===== Scale In ===== */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    animation: scale-in 0.5s ease forwards;
}

@keyframes scale-in {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== Slide In ===== */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slide-in-left 0.6s ease forwards;
}

@keyframes slide-in-left {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slide-in-right 0.6s ease forwards;
}

@keyframes slide-in-right {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== Particle Float ===== */
.particle {
    position: absolute;
    background: var(--cyan);
    border-radius: 50%;
    opacity: 0.5;
    animation: particle-float 10s infinite;
}

@keyframes particle-float {

    0%,
    100% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-100vh) translateX(50px);
        opacity: 0;
    }
}

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

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.2);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow:
        0 0 10px var(--cyan),
        0 0 20px var(--cyan),
        0 0 30px var(--electric-blue);
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 255, 255, 0.2);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Pulse Ring ===== */
.pulse-ring {
    position: relative;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid var(--cyan);
    border-radius: 50%;
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ===== Matrix Rain Effect (DISABLED - Pure black background) ===== */
.matrix-bg {
    position: relative;
    overflow: hidden;
}

.matrix-bg::before {
    display: none;
    /* Disabled - no animated lines */
}

@keyframes matrix-fall {
    0% {
        transform: translateY(-50px);
    }

    100% {
        transform: translateY(0);
    }
}

/* ===== Border Animation ===== */
.animated-border {
    position: relative;
    background: var(--black-card);
    z-index: 1;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(90deg, var(--cyan), var(--electric-blue), var(--cyan));
    border-radius: inherit;
    z-index: -1;
    animation: border-rotate 3s linear infinite;
    background-size: 300% 300%;
}

@keyframes border-rotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* ===== Counter Animation Trigger ===== */
.stat-number.counted {
    animation: count-up 0.5s ease-out;
}

@keyframes count-up {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}