/* ─── Preloader overlay ─────────────────────────────────── */

#slux-preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
    background: radial-gradient(circle at 50% 45%,
        #200916    0%,
        #200916   22%,
        #15060c   48%,
        #0c0407   72%,
        #060202   90%,
        #030102  100%);
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

#slux-preloader::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 55%,
        transparent 50%, rgba(20, 4, 10, .35) 100%);
    pointer-events: none;
    z-index: 4;
}

#slux-preloader::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        radial-gradient(rgba(0,0,0,.04)       1px, transparent 1px);
    background-size: 3px 3px, 5px 5px;
    background-position: 0 0, 1px 2px;
    mix-blend-mode: overlay;
    opacity: .5;
    pointer-events: none;
    z-index: 6;
}

#slux-preloader.spl-done {
    opacity: 0;
    visibility: hidden;
}

/* ─── Scan grid ─────────────────────────────────────────── */

.spl-scan-grid {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right,  rgba(255,41,86,.08) 1px, transparent 1px) 0 0/40px 40px,
        linear-gradient(to bottom, rgba(255,41,86,.08) 1px, transparent 1px) 0 0/40px 40px;
    mask: radial-gradient(ellipse at 50% 50%, black 40%, transparent 75%);
    -webkit-mask: radial-gradient(ellipse at 50% 50%, black 40%, transparent 75%);
    z-index: 1;
}

/* ─── Stage ─────────────────────────────────────────────── */

.spl-stage {
    position: relative;
    width: min(36vmin, 400px);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* ─── Mark (logo) ───────────────────────────────────────── */

.spl-mark {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transform: scale(.74);
    filter: drop-shadow(0 8px 24px rgba(255,41,86,.35));
    animation: spl-orbit-pulse 4s ease-in-out infinite;
}

.spl-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes spl-orbit-pulse {
    0%, 100% { transform: scale(.74); }
    50%       { transform: scale(.80); }
}

/* ─── Orbit rings ───────────────────────────────────────── */

.spl-orbit-ring {
    position: absolute;
    inset: 6%;
    border-radius: 50%;
    border: 1px dashed rgba(255,95,125,.55);
    pointer-events: none;
    animation: spl-rot 14s linear infinite;
    z-index: 2;
}

.spl-r2 {
    inset: -2%;
    border: 1px dotted rgba(255,41,86,.55);
    animation: spl-rot-rev 18s linear infinite;
}

.spl-r3 {
    inset: 14%;
    border: 1px solid rgba(255,255,255,.06);
    animation: spl-rot 26s linear infinite;
}

@keyframes spl-rot     { to { transform: rotate(360deg);  } }
@keyframes spl-rot-rev { to { transform: rotate(-360deg); } }

/* ─── Orbit arc ─────────────────────────────────────────── */

.spl-orbit-arc {
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: #ff2956;
    border-right-color: rgba(255,41,86,.4);
    animation: spl-rot 1.6s cubic-bezier(.7,0,.3,1) infinite;
    filter: drop-shadow(0 0 12px rgba(255,41,86,.6));
    z-index: 3;
    pointer-events: none;
}

/* ─── LOADING tick ──────────────────────────────────────── */

.spl-tick {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    font-size: .75rem;
    letter-spacing: .4em;
    color: rgba(255,41,86,.75);
    z-index: 7;
    text-transform: uppercase;
    white-space: nowrap;
}

.spl-tick::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #ff2956;
    border-radius: 50%;
    margin-right: .6em;
    vertical-align: middle;
    animation: spl-blink 1.2s steps(2, end) infinite;
    box-shadow: 0 0 8px #ff2956;
}

@keyframes spl-blink { 50% { opacity: .15; } }

/* ─── Reduced motion ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .spl-mark,
    .spl-orbit-ring,
    .spl-orbit-arc,
    .spl-tick::before {
        animation: none;
    }
}
