/* ================================================
   Page Loader / Transition — Wilsol Tech
   ================================================ */

/* Prevents white flash before loader renders on page load */
html {
    background: #0C0C0C;
}

#wt-loader {
    position: fixed;
    inset: 0;
    background: #0C0C0C;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    transition: transform 0.85s cubic-bezier(0.77, 0, 0.18, 1);
    will-change: transform;

    transform: translateY(0);
}

/* ---- Reveal state: panel is above the viewport ---- */
#wt-loader.wt-out {
    transform: translateY(-100%);
    pointer-events: none;
}

/* ---- Exit mode: hide logo/bar, show clean dark curtain only ---- */
#wt-loader.wt-exit .wt-loader-inner {
    visibility: hidden;
}

/* ---- Inner wrapper ---- */
.wt-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0vw;
}

/* ---- Logo ---- */
.wt-loader-logo {
    width: 18vw;
    opacity: 0;
    animation: wtLogoIn 0.65s 0.15s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ---- Progress bar ---- */
.wt-loader-bar-wrap {
    width: 10vw;
    height: 1px;
    background: #2a2a2a;
    overflow: hidden;
    opacity: 0;
    animation: wtBarWrapIn 0.01s 0.2s forwards;
}

.wt-loader-bar {
    height: 100%;
    width: 38%;
    background: #ffffff;
    animation: wtBarSlide 1.1s 0.3s ease-in-out infinite alternate;
}

/* ---- Keyframes ---- */
@keyframes wtLogoIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wtBarWrapIn {
    to { opacity: 1; }
}

@keyframes wtBarSlide {
    from { transform: translateX(-100%); }
    to   { transform: translateX(264%); }
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .wt-loader-logo {
        width: 52vw;
    }

    .wt-loader-bar-wrap {
        width: 52vw;
    }

    .wt-loader-inner {
        gap: 4vw;
    }
}
