/* ── Skyline Peptides Preloader ── */

#skyline-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    pointer-events: all;
}

.spl-overlay {
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #1a3faa 0%, #2251cc 50%, #1a3faa 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Subtle grid texture overlay */
.spl-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.spl-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    position: relative;
    z-index: 1;
}

/* ── Brand / Logo ── */
.spl-brand {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spl-logo {
    width: 220px;
    height: auto;
    filter: brightness(0) invert(1);
    display: block;
}

/* ── Spinner ring ── */
.spl-spinner-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spl-ring {
    width: 80px;
    height: 80px;
    position: absolute;
    inset: 0;
    animation: spl-rotate 1.4s linear infinite;
    transform-origin: center;
}

.spl-ring-track {
    stroke: rgba(255, 255, 255, 0.15);
}

.spl-ring-head {
    stroke: #ffffff;
    animation: spl-dash 1.4s ease-in-out infinite;
}

@keyframes spl-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes spl-dash {
    0%   { stroke-dasharray: 10 154; stroke-dashoffset: 0; }
    50%  { stroke-dasharray: 100 64; stroke-dashoffset: -30; }
    100% { stroke-dasharray: 10 154; stroke-dashoffset: -164; }
}

/* ── DNA dots inside spinner ── */
.spl-dna {
    display: flex;
    gap: 5px;
    align-items: center;
}

.spl-dna span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    animation: spl-pulse 1.2s ease-in-out infinite;
}

.spl-dna span:nth-child(1) { animation-delay: 0s;    width: 5px; height: 5px; }
.spl-dna span:nth-child(2) { animation-delay: 0.1s;  width: 7px; height: 7px; }
.spl-dna span:nth-child(3) { animation-delay: 0.2s;  width: 5px; height: 5px; }
.spl-dna span:nth-child(4) { animation-delay: 0.3s;  width: 7px; height: 7px; }
.spl-dna span:nth-child(5) { animation-delay: 0.4s;  width: 5px; height: 5px; }
.spl-dna span:nth-child(6) { animation-delay: 0.5s;  width: 7px; height: 7px; }

@keyframes spl-pulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50%       { opacity: 1;   transform: scaleY(1.6); }
}

/* ── Loading text ── */
.spl-text {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

.spl-dots span {
    animation: spl-blink 1.4s infinite;
}
.spl-dots span:nth-child(2) { animation-delay: 0.2s; }
.spl-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes spl-blink {
    0%, 80%, 100% { opacity: 0; }
    40%           { opacity: 1; }
}

/* ── Fade out state ── */
#skyline-preloader.spl-hidden {
    pointer-events: none;
}
#skyline-preloader.spl-hidden .spl-overlay {
    opacity: 0;
    visibility: hidden;
}

/* ── Prevent body scroll while loading ── */
body.spl-loading {
    overflow: hidden;
}
