/**
 * Site Loader Styles
 * Word-by-word typing animation loader
 */

/* ==========================
   LOADER CONTAINER
   ========================== */

.site-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.site-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Prevent body scroll when loader is active */
body.loader-active {
    overflow: hidden;
}

/* ==========================
   LOADER CONTENT
   ========================== */

.loader-content {
    text-align: center;
    animation: softFadeIn 0.6s ease-out;
}

/* Logo Animation */
.loader-logo {
    margin-bottom: 30px;
}

.loader-logo img {
    max-width: 180px;
    height: auto;
    animation: gentleReveal 0.8s ease-out;
}

/* ==========================
   TYPING TEXT
   ========================== */

.loader-text {
    font-size: 42px;
    font-weight: 600;
    color: white;
    margin: 25px 0;
    min-height: 50px;
    font-family: var(--font-primary);
    letter-spacing: 0.5px;
}

.typed-word {
    display: inline;
    opacity: 0;
    animation: wordFadeIn 0.4s ease-out forwards;
}

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

/* Cursor Blink */
.cursor {
    display: inline-block;
    margin-left: 3px;
    opacity: 1;
    animation: blink 0.8s infinite;
}

/* ==========================
   PROGRESS BAR
   ========================== */

.loader-progress {
    width: 250px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px auto 0;
}

.progress-bar {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 2s ease-out;
    border-radius: 10px;
}

/* ==========================
   RESPONSIVE
   ========================== */

@media (max-width: 768px) {
    .loader-logo img {
        max-width: 140px;
    }

    .loader-text {
        font-size: 32px;
        padding: 0 20px;
    }

    .loader-progress {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .loader-logo img {
        max-width: 120px;
    }

    .loader-text {
        font-size: 24px;
        min-height: 35px;
    }

    .loader-progress {
        width: 150px;
    }
}
