/* ── Preloader Overlay ── */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(7, 11, 20, 0.98); /* Deep Navy matching LexVault theme */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

/* ── Content Container ── */
.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* ── Bouncing Favicon/Icon ── */
.preloader-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 0.8s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.preloader-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(201, 168, 76, 0.3));
}

.preloader-icon i {
    font-size: 4rem;
    color: #c9a84c; /* var(--clr-gold) */
    text-shadow: 0 0 30px rgba(201, 168, 76, 0.5);
}

/* ── Loading Text ── */
.preloader-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #f0f2f7;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.8;
    animation: pulse 1.5s infinite;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes bounce {
    from {
        transform: translateY(0) scale(1);
    }
    to {
        transform: translateY(-25px) scale(1.05);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.98); }
    50% { opacity: 1; transform: scale(1); }
}

/* ── Fade Out State ── */
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}
