/* ===== SITE LOADER ===== */

#site-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #182532;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.55s ease, visibility 0.55s ease;
}

#site-loader.loader--done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

body.loader-active {
    overflow: hidden;
}

/* ===== BRAND LOGO ===== */
.loader-brand {
    clip-path: inset(0 100% 0 0);
    animation: loaderBrandReveal 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes loaderBrandReveal {
    to { clip-path: inset(0 0% 0 0); }
}

.loader-logo-img {
    height: clamp(20px, 2.5vw, 36px);
    width: auto;
    display: block;
}

.loader-logo-fallback {
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    color: #CC4443;
    letter-spacing: 0.35em;
    text-transform: uppercase;
}

/* ===== TAGLINE ===== */
.loader-tagline {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 10px;
    opacity: 0;
    animation: loaderTaglineIn 0.5s ease 0.85s forwards;
}

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

/* ===== PROGRESS BAR ===== */
.loader-progress {
    margin-top: 36px;
    width: min(260px, 38vw);
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-progress::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #CC4443;
    transform: scaleX(0);
    transform-origin: left;
    animation: loaderBarFill 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.45s forwards;
}

@keyframes loaderBarFill {
    to { transform: scaleX(1); }
}

/* ===== DOT PULSE (ispod bara) ===== */
.loader-dots {
    display: flex;
    gap: 6px;
    margin-top: 20px;
}

.loader-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    animation: loaderDotPulse 1.2s ease infinite;
}

.loader-dot:nth-child(1) { animation-delay: 0s; }
.loader-dot:nth-child(2) { animation-delay: 0.2s; }
.loader-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loaderDotPulse {
    0%, 100% { background: rgba(255, 255, 255, 0.2); transform: scale(1); }
    50%       { background: #CC4443;                  transform: scale(1.5); }
}
