/* ========================================
   BIT Website - Lightspeed Intro Animation
   Fullscreen warp/hyperspace effect
   ======================================== */

/* Intro Container */
.lightspeed-intro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.8s ease-out;
}

.lightspeed-intro.finished {
    opacity: 0;
    pointer-events: none;
}

/* Canvas */
#lightspeed-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Center Glow Effect */
.warp-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 180, 255, 0.4) 0%, transparent 70%);
    filter: blur(20px);
    opacity: 0;
    transition: all 1s ease-out;
    pointer-events: none;
}

.lightspeed-intro.warping .warp-glow {
    width: 200vw;
    height: 200vh;
    opacity: 1;
    animation: warp-flash 2s ease-out forwards;
}

@keyframes warp-flash {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    30% {
        opacity: 0.3;
    }

    60% {
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
        background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(0, 180, 255, 0.8) 30%, transparent 60%);
    }
}

/* Logo */
.intro-logo {
    position: relative;
    z-index: 10;
    text-align: center;
    opacity: 0;
    animation: logo-appear 0.6s ease-out 0.3s forwards;
}

.lightspeed-intro.warping .intro-logo {
    animation: logo-warp 1.8s ease-in forwards;
}

@keyframes logo-appear {
    0% {
        opacity: 0;
        transform: scale(0.8);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

@keyframes logo-warp {
    0% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
        filter: blur(2px);
    }

    80% {
        opacity: 0.8;
        transform: scale(2);
        filter: blur(5px);
    }

    100% {
        opacity: 0;
        transform: scale(5);
        filter: blur(20px);
    }
}

.logo-text {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 800;
    letter-spacing: -5px;
    text-shadow: 0 0 60px rgba(0, 180, 255, 0.5);
}

.logo-b,
.logo-i,
.logo-t {
    display: inline-block;
    opacity: 0;
    background: linear-gradient(135deg, #ffffff 0%, #00b4ff 50%, #0066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: letter-appear 0.4s ease-out forwards;
}

.logo-b {
    animation-delay: 0.1s;
}

.logo-i {
    animation-delay: 0.2s;
}

.logo-t {
    animation-delay: 0.3s;
}

@keyframes letter-appear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.5);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.logo-tagline {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.7rem, 2vw, 1rem);
    font-weight: 500;
    letter-spacing: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    margin-top: 15px;
    opacity: 0;
    animation: tagline-appear 0.5s ease-out 0.5s forwards;
}

@keyframes tagline-appear {
    0% {
        opacity: 0;
        letter-spacing: 20px;
    }

    100% {
        opacity: 1;
        letter-spacing: 8px;
    }
}

/* Body styles during intro */
body:not(.intro-complete) {
    overflow: hidden;
}

body:not(.intro-complete) .header,
body:not(.intro-complete) main,
body:not(.intro-complete) .footer {
    opacity: 0;
}

body.intro-complete .header,
body.intro-complete main,
body.intro-complete .footer {
    animation: content-reveal 0.8s ease-out forwards;
}

@keyframes content-reveal {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* Star streak glow effect */
.lightspeed-intro.warping::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        0 0 20px 10px rgba(255, 255, 255, 0.8),
        0 0 60px 30px rgba(0, 180, 255, 0.6),
        0 0 100px 50px rgba(0, 100, 255, 0.4);
    animation: center-expand 1.5s ease-out forwards;
}

@keyframes center-expand {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
    }

    50% {
        width: 50px;
        height: 50px;
        opacity: 1;
    }

    100% {
        width: 300vw;
        height: 300vh;
        opacity: 0;
        border-radius: 0;
    }
}

/* Vignette effect during warp */
.lightspeed-intro::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.lightspeed-intro.warping::after {
    opacity: 0;
}