/* ---------------------------
   LOGO + COLORFUL RING PRELOADER
---------------------------- */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--ivory);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: opacity 0.4s ease;
}

.loader {
    position: relative;
    width: 110px;
    height: 110px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Center Logo */
.loader-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
    z-index: 10;
    animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {

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

    50% {
        transform: scale(1.1);
        opacity: 0.85;
    }
}

.loader span {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 6px solid transparent;
    animation: rotate 1.5s linear infinite;
}

/* Ring 1 */
.loader span:nth-child(2) {
    border-top-color: var(--french-blue);
    border-left-color: var(--french-blue);
    animation-duration: 1.3s;
    box-shadow: 0 0 20px var(--shadow-primary);
}

/* Ring 2 */
.loader span:nth-child(3) {
    border-right-color: var(--pumpkin);
    border-bottom-color: var(--pumpkin);
    animation-duration: 1.7s;
    box-shadow: 0 0 20px var(--shadow-accent);
}

/* Ring 3 */
.loader span:nth-child(4) {
    border-top-color: var(--linen);
    border-bottom-color: var(--linen);
    animation-duration: 2s;
    box-shadow: 0 0 20px var(--shadow-secondary);
}

@keyframes rotate {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.08);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .loader {
        width: 80px;
        height: 80px;
    }

    .loader-logo {
        width: 30px;
        height: 30px;
    }

    .loader span {
        border-width: 4px;
    }
}
