/* ============================================================
   VISUAL SAINT VFX — Cinematic Preloader
   Self-contained. Does NOT touch any existing stylesheet rules.
   ============================================================ */

/* ── Lock body scroll while preloader is active ─────────────── */
body.vs-loading {
    overflow: hidden;
}

/* ── Overlay ─────────────────────────────────────────────────── */
#vs-preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #050507;
    overflow: hidden;

    /* Fade-out triggered by JS */
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 1;
    visibility: visible;

    /* GPU lift */
    will-change: opacity;
    -webkit-font-smoothing: antialiased;
}

#vs-preloader.vs-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── Particle canvas (light streaks) ─────────────────────────── */
#vs-pl-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ── Ambient glow orbs (pure CSS, zero JS) ───────────────────── */
.vs-pl-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}
.vs-pl-orb-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -100px;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
    filter: blur(80px);
    animation: vs-pl-drift 14s ease-in-out infinite alternate;
}
.vs-pl-orb-2 {
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -100px;
    background: radial-gradient(circle, rgba(212,175,55,0.02) 0%, transparent 70%);
    filter: blur(80px);
    animation: vs-pl-drift 18s ease-in-out infinite alternate-reverse;
}
.vs-pl-orb-3 {
    width: 400px;
    height: 400px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255,255,255,0.02) 0%, transparent 70%);
    filter: blur(60px);
    animation: vs-pl-pulse 8s ease-in-out infinite;
}

@keyframes vs-pl-drift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(30px, 40px); }
}
@keyframes vs-pl-pulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%,-50%) scale(1); }
    50%       { opacity: 1;   transform: translate(-50%,-50%) scale(1.15); }
}

/* ── Thin top cinematic letterbox lines ──────────────────────── */
.vs-pl-letterbox {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,255,255,0.05) 20%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0.05) 80%,
        transparent 100%);
    opacity: 0;
    animation: vs-pl-lb-in 1.2s ease forwards;
}
.vs-pl-letterbox.top    { top: 0;    animation-delay: 0.2s; }
.vs-pl-letterbox.bottom { bottom: 0; animation-delay: 0.4s; }
@keyframes vs-pl-lb-in {
    from { opacity: 0; } to { opacity: 1; }
}

/* ── Main content wrapper ────────────────────────────────────── */
.vs-pl-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    animation: vs-pl-rise 1s cubic-bezier(0.16,1,0.3,1) both;
    animation-delay: 0.1s;
}
@keyframes vs-pl-rise {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Founder photo ───────────────────────────────────────────── */
.vs-pl-founder-wrap {
    position: relative;
    margin-bottom: 28px;
    animation: vs-pl-float 4s ease-in-out infinite;
}
@keyframes vs-pl-float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-8px); }
}

/* Glassmorphism ring frame */
.vs-pl-founder-ring {
    position: absolute;
    inset: -6px;
    border-radius: 26px;
    background: linear-gradient(135deg,
        rgba(255,255,255,0.3) 0%,
        rgba(255,255,255,0.05) 40%,
        rgba(212,175,55,0.2) 70%,
        rgba(255,255,255,0.3) 100%);
    padding: 2px;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: vs-pl-ring-spin 6s linear infinite;
}
@keyframes vs-pl-ring-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Soft outer glow */
.vs-pl-founder-glow {
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(255,255,255,0.08) 0%,
        rgba(212,175,55,0.03) 50%,
        transparent 70%);
    filter: blur(12px);
    animation: vs-pl-glow-pulse 3s ease-in-out infinite;
}
@keyframes vs-pl-glow-pulse {
    0%, 100% { opacity: 0.7; transform: scale(1);    }
    50%       { opacity: 1.0; transform: scale(1.08); }
}

/* Glassmorphism frame circle */
.vs-pl-founder-glass {
    position: relative;
    width: auto;
    height: 240px;
    border-radius: 28px;
    background: rgba(10,10,12,0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.03),
        0 20px 60px rgba(0,0,0,0.85),
        0 0 80px rgba(255,255,255,0.02) inset;
}

.vs-pl-founder-img {
    width: auto;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    /* Soft cinematic tint */
    filter: saturate(0.85) contrast(1.1) brightness(0.95);
}

/* ── Brand text area ─────────────────────────────────────────── */
.vs-pl-brand {
    text-align: center;
    margin-bottom: 6px;
}

.vs-pl-vs-badge {
    display: inline-block;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 12px;
}

.vs-pl-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 600;
    letter-spacing: clamp(6px, 2vw, 14px);
    text-transform: uppercase;
    line-height: 1.1;
    background: linear-gradient(90deg,
        #ffffff 0%,
        #dcdcdc 40%,
        #ffffff 60%,
        #e8e8e8 80%,
        #ffffff 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: vs-pl-title-shine 4s linear infinite;
    margin: 0;
    text-shadow: 0 0 30px rgba(255,255,255,0.1);
}
@keyframes vs-pl-title-shine {
    0%   { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.vs-pl-tagline {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.28);
    margin-top: 10px;
    margin-bottom: 0;
}

/* ── Founder name below title ────────────────────────────────── */
.vs-pl-founder-name {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(212,175,55,0.7);
    margin-top: 18px;
    text-align: center;
}

/* ── Separator ───────────────────────────────────────────────── */
.vs-pl-sep {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
    margin: 18px auto 18px;
}

/* ── Loading bar track ───────────────────────────────────────── */
.vs-pl-bar-wrap {
    position: relative;
    width: clamp(200px, 40vw, 340px);
    height: 2px;
    background: rgba(255,255,255,0.07);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 14px;
}

/* Animated shimmer on the track */
.vs-pl-bar-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
    animation: vs-pl-shimmer 2s linear infinite;
}
@keyframes vs-pl-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Progress fill */
#vs-pl-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.2) 0%,
        rgba(255,255,255,0.6) 45%,
        #ffffff 80%,
        rgba(255,255,255,0.8) 100%);
    border-radius: 2px;
    transition: width 0.08s linear;
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
}

/* Leading glow dot */
#vs-pl-bar::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

/* ── Percentage counter ──────────────────────────────────────── */
.vs-pl-percent-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: clamp(200px, 40vw, 340px);
    gap: 8px;
}

#vs-pl-pct {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.55);
    min-width: 44px;
    text-align: right;
}

.vs-pl-status {
    font-family: 'Inter', sans-serif;
    font-size: 9.5px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
}

/* ── Responsive tweaks ───────────────────────────────────────── */
@media (max-width: 480px) {
    .vs-pl-founder-glass { width: auto; height: 170px; border-radius: 20px; }
    .vs-pl-founder-ring  { border-radius: 24px; }
    .vs-pl-orb-1 { width: 300px; height: 300px; filter: blur(60px); }
    .vs-pl-orb-2 { width: 260px; height: 260px; filter: blur(60px); }
}

/* Ensure preloader sits entirely above everything site-specific */
#vs-preloader * { box-sizing: border-box; }
