.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    overflow: hidden;
}

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

/* Cosmic Gold Spark (Starts tiny and bursts) */
.preloader-spark {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d0ae6b;
    box-shadow: 0 0 20px 10px rgba(208, 174, 107, 0.8),
        0 0 60px 30px rgba(208, 174, 107, 0.4);
    animation: sparkBurst 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    z-index: 4;
}

/* Fast Expanding Shockwave Ripple */
.preloader-ripple {
    position: absolute;
    border: 2px solid #d0ae6b;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    opacity: 0;
    z-index: 3;
    animation: rippleExpand 1.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
    animation-delay: 0.6s;
}

/* Orbiting Architectural blueprint rings */
.preloader-blueprint-ring {
    position: absolute;
    width: 280px;
    height: 280px;
    border: 1px dashed rgba(208, 174, 107, 0.15);
    border-radius: 50%;
    opacity: 0;
    animation: fadeInRing 2s ease forwards;
    animation-delay: 0.8s;
    z-index: 1;
}

.preloader-blueprint-ring::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    animation: rotateRing 15s linear infinite;
}

/* Logo container that materializes out of the blur */
.preloader-logo-wrap {
    position: relative;
    width: 220px;
    opacity: 0;
    /* filter: blur(20px) brightness(2); */
    z-index: 2;
    animation: materializeLogo 1.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.7s;
    /* overflow: hidden; */
}

.preloader-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(208, 174, 107, 0.3));
    animation: pulseLogo 3s ease-in-out infinite;
    animation-delay: 2.1s;
}

/* Dynamic Gold Light Sweep across logo */

@keyframes sparkBurst {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    30% {
        transform: scale(3);
        opacity: 1;
    }

    50% {
        transform: scale(0.1);
        opacity: 0.5;
    }

    60% {
        transform: scale(0);
        opacity: 0;
    }

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

@keyframes rippleExpand {
    0% {
        width: 10px;
        height: 10px;
        opacity: 1;
        border-width: 3px;
        box-shadow: 0 0 10px rgba(208, 174, 107, 0.5);
    }

    100% {
        width: 320px;
        height: 320px;
        opacity: 0;
        border-width: 0.5px;
        box-shadow: 0 0 40px rgba(208, 174, 107, 0);
    }
}

@keyframes fadeInRing {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }

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

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

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

@keyframes materializeLogo {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
        filter: blur(20px) brightness(2);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0px) brightness(1);
    }
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(208, 174, 107, 0.3));
    }

    50% {
        transform: scale(1.05);
        filter: brightness(0) invert(1) drop-shadow(0 0 25px rgba(208, 174, 107, 0.6));
    }
}

@keyframes lightSweep {
    0% {
        left: -150%;
    }

    50% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}