/* Custom styles for Kiso Tech */

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Scroll Animation Utilities */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Child Reveal */
.reveal-stagger>* {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

/* TRIGGER: When parent .reveal has .active, reveal children */
.reveal.active .reveal-stagger>* {
    opacity: 1;
    transform: translateY(0);
}

.reveal.active .reveal-stagger>*:nth-child(1) {
    transition-delay: 0.1s;
}

.reveal.active .reveal-stagger>*:nth-child(2) {
    transition-delay: 0.2s;
}

.reveal.active .reveal-stagger>*:nth-child(3) {
    transition-delay: 0.3s;
}

.reveal.active .reveal-stagger>*:nth-child(4) {
    transition-delay: 0.4s;
}

/* Logo Animation (Tech Pulse) */
@keyframes tech-pulse {
    0% {
        filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.4));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.8));
        transform: scale(1.05);
    }

    100% {
        filter: drop-shadow(0 0 2px rgba(59, 130, 246, 0.4));
        transform: scale(1);
    }
}

.logo-animate:hover {
    animation: tech-pulse 2s infinite ease-in-out;
}


/* Smooth variable transitions */
body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism utility not covered by default Tailwind */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .glass {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

/* Active Nav Link */
.nav-link.active {
    color: #3b82f6;
}

/* Remove default underline */
.nav-link.active::after {
    display: none;
}

/* Nav Indicator - Complex Animation States */
#nav-indicator {
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa, #3b82f6);
    background-size: 200% 100%;
    animation: electric-flow 2s linear infinite;
    box-shadow: 0 0 10px #3b82f6, 0 0 5px #60a5fa;
    border-radius: 2px;
    pointer-events: none;
    z-index: 10;
    opacity: 1;
    /* Line visible by default */
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.15s ease-in-out;
}

/* Dots - hidden by default */
#nav-indicator::before,
#nav-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px #fff, 0 0 4px #3b82f6;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

#nav-indicator::before {
    left: 0;
}

#nav-indicator::after {
    right: 0;
}

/* TRAVELING STATE: Hide line, show dots */
#nav-indicator.traveling {
    opacity: 0;
    /* Hide line during travel */
}

#nav-indicator.traveling::before,
#nav-indicator.traveling::after {
    opacity: 1;
    /* Show dots during travel */
}

@keyframes electric-flow {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* Tech Decoding Text Style */
.tech-decode {
    font-family: 'Inter', monospace;
    display: inline-block;
}

/* 3D Tilt Container */
.tech-tilt {
    transition: transform 0.1s ease-out;
    will-change: transform;
    transform-style: preserve-3d;
}

/* Card Content Depth */
.tech-tilt>* {
    transform: translateZ(20px);
}