/* ============================================
   STAURAX FIRST-VISIT LOADER
   Premium split-screen reveal animation
   ============================================ */

/* Returning visitors: hide instantly */
html.stx-returning .stx-loader { display: none !important; }

/* Base overlay */
.stx-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: all;
    overflow: hidden;
}

/* ---- Two white halves ---- */
.stx-loader__half {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    background: #ffffff;
    will-change: transform;
    transition: none;
}
.stx-loader__half--top { top: 0; }
.stx-loader__half--bottom { top: 50%; }

/* Split triggered */
.stx-loader.is-splitting .stx-loader__half {
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);
}
.stx-loader.is-splitting .stx-loader__half--top {
    transform: translateY(-100%);
}
.stx-loader.is-splitting .stx-loader__half--bottom {
    transform: translateY(100%);
}

/* ---- Centered content ---- */
.stx-loader__content {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.stx-loader.is-splitting .stx-loader__content {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ---- Logo (fixed size, no transitions on size) ---- */
.stx-loader__logo {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif !important;
    font-size: 3rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    letter-spacing: -0.03em !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    user-select: none;
    display: inline-flex;
    align-items: flex-start;
    /* Fade in only — no size/transform change */
    opacity: 0;
    transition: opacity 0.6s ease;
}
.stx-loader.is-visible .stx-loader__logo {
    opacity: 1;
}

.stx-loader__logo-star {
    color: #1d4ed8 !important;
    font-size: 1.1rem !important;
    font-weight: 400 !important;
    position: relative;
    top: -0.5em;
    margin-left: 1px;
    line-height: 1 !important;
    animation: stxPulse 1.4s ease-in-out infinite;
}
@keyframes stxPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ---- Expanding line (sits right below logo) ---- */
.stx-loader__line-wrap {
    margin-top: 18px;
    width: 100vw;
    display: flex;
    justify-content: center;
    overflow: visible;
}

.stx-loader__line {
    height: 1px;
    width: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(37, 99, 235, 0.3) 10%,
        #2563eb 40%, 
        #1d4ed8 50%, 
        #2563eb 60%, 
        rgba(37, 99, 235, 0.3) 90%,
        transparent 100%
    );
    box-shadow: 0 0 6px rgba(37, 99, 235, 0.25);
    transition: width 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.stx-loader.is-line-expanding .stx-loader__line {
    width: 100vw;
}

/* Fade line when splitting */
.stx-loader.is-splitting .stx-loader__line {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* ---- Tagline ---- */
.stx-loader__tagline {
    margin-top: 14px;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-size: 0.72rem !important;
    font-weight: 400 !important;
    color: #c0c0c0 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}
.stx-loader.is-visible .stx-loader__tagline {
    opacity: 1;
}

/* Cleanup */
.stx-loader.is-done { display: none !important; }

/* ---- Mobile Responsive ---- */
@media (max-width: 768px) {
    .stx-loader__logo {
        font-size: 2.2rem !important;
    }
    .stx-loader__logo-star {
        font-size: 0.9rem !important;
    }
    .stx-loader__line-wrap {
        margin-top: 14px;
    }
    .stx-loader__tagline {
        font-size: 0.65rem !important;
        letter-spacing: 0.14em !important;
        margin-top: 12px;
    }
}

@media (max-width: 400px) {
    .stx-loader__logo {
        font-size: 1.8rem !important;
    }
    .stx-loader__logo-star {
        font-size: 0.75rem !important;
    }
    .stx-loader__tagline {
        font-size: 0.6rem !important;
    }
}
