/* ============================================================
   Preloader Styles (Clean Code External CSS)
   ============================================================ */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center,
                rgba(18, 18, 24, 0.6) 0%,
                rgba(8, 8, 12, 0.92) 70%);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.preloader-stack {
    position: relative;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.preloader-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #c9a84c;
    border-right-color: rgba(201, 168, 76, 0.45);
    animation: preloader-spin 1.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.preloader-ring::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: rgba(101, 31, 255, 0.4);
    animation: preloader-spin 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite reverse;
}
.preloader-logo {
    width: 72px;
    height: auto;
    animation: preloader-pulse 1.8s ease-in-out infinite;
    filter: drop-shadow(0 0 18px rgba(201, 168, 76, 0.5));
}
.preloader-status {
    margin-top: 36px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
.preloader-dots {
    display: inline-flex;
    gap: 5px;
}
.preloader-dots span {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c9a84c;
    animation: preloader-dot 1.2s ease-in-out infinite;
}
.preloader-dots span:nth-child(2) { animation-delay: 0.15s; }
.preloader-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes preloader-spin { to { transform: rotate(360deg); } }
@keyframes preloader-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.07); }
}
@keyframes preloader-dot {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.35; }
    40%           { transform: scale(1);   opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .preloader-ring,
    .preloader-ring::after,
    .preloader-logo,
    .preloader-dots span { animation: none; }
}
/* ponytail: iOS Safari mataba el tab — backdrop-filter fullscreen a DPR 3
   ~12MB VRAM por snapshot. Reemplazo por fondo sólido equivalente, coste 0. */
@supports (-webkit-touch-callout: none) {
    #preloader {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(8, 8, 18, 0.92) !important;
    }
}
