/* ============================================================
   LUXURY PRELOADER — Meenakshi Bansal Makeover
   Premium bridal beauty brand intro animation
   ============================================================ */

/* ---------- Preloader Container ---------- */
#luxe-preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;

    /* Deep charcoal base with warm undertone */
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%, rgba(60, 30, 35, 0.95) 0%, transparent 70%),
        radial-gradient(ellipse 60% 80% at 80% 70%, rgba(80, 40, 40, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse 50% 50% at 20% 30%, rgba(60, 35, 50, 0.3) 0%, transparent 60%),
        #0d0a0b;
}

/* Prevent scroll while preloader is active */
body.preloader-active {
    overflow: hidden !important;
}

/* ---------- Canvas Layer (Particles) ---------- */
#luxe-preloader canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ---------- Ambient Glow Orbs ---------- */
.preloader-ambient {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    z-index: 0;
    animation: ambientPulse 4s ease-in-out infinite alternate;
}

.preloader-ambient--rose {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(244,123,126,0.25) 0%, transparent 70%);
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.preloader-ambient--gold {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(205,170,109,0.2) 0%, transparent 70%);
    bottom: 15%;
    right: 10%;
    animation-delay: 1.5s;
}

.preloader-ambient--blush {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(251,241,240,0.12) 0%, transparent 70%);
    top: 60%;
    left: 55%;
    animation-delay: 0.8s;
}

@keyframes ambientPulse {
    0%   { opacity: 0.3; transform: scale(0.9) translate(0, 0); }
    100% { opacity: 0.7; transform: scale(1.15) translate(10px, -10px); }
}

/* ---------- Content Wrapper (Logo + Text) ---------- */
.preloader-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* ---------- Brush SVG Animation ---------- */
.preloader-brush {
    position: absolute;
    z-index: 5;
    width: 120px;
    height: auto;
    opacity: 0;
    filter: drop-shadow(0 0 20px rgba(244,123,126,0.4));
    transform: translate(-200px, 0) rotate(-25deg);
}

/* ---------- Shimmer Trail ---------- */
.preloader-trail {
    position: absolute;
    z-index: 4;
    width: 300px;
    height: 4px;
    opacity: 0;
    border-radius: 4px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(244,123,126,0.6) 30%,
        rgba(205,170,109,0.8) 60%,
        rgba(251,241,240,0.5) 80%,
        transparent 100%
    );
    filter: blur(2px);
    transform-origin: left center;
    transform: scaleX(0);
}

/* ---------- Logo Mark (Compact Mirror Icon) ---------- */
.preloader-logo-mark {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 30px;
    opacity: 0;
    transform: scale(0.6);
}

.preloader-logo-mark svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 30px rgba(244,123,126,0.5));
}

/* Glow ring behind the logo mark */
.preloader-logo-ring {
    position: absolute;
    inset: -15px;
    border-radius: 50%;
    border: 1.5px solid rgba(244,123,126,0.3);
    opacity: 0;
    animation: ringPulse 2.5s ease-in-out infinite;
}

.preloader-logo-ring--outer {
    inset: -30px;
    border-color: rgba(205,170,109,0.15);
    animation-delay: 0.5s;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50%      { transform: scale(1.08); opacity: 0.8; }
}

/* ---------- Brand Name ---------- */
.preloader-brand {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: rgba(251, 241, 240, 0.95);
    opacity: 0;
    transform: translateY(15px);
    text-align: center;
    margin-bottom: 8px;
    text-shadow: 0 0 40px rgba(244,123,126,0.3);
}

/* ---------- Tagline ---------- */
.preloader-tagline {
    font-family: 'Jost', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(205, 170, 109, 0.8);
    opacity: 0;
    transform: translateY(10px);
    text-align: center;
}

/* ---------- Progress Line ---------- */
.preloader-progress {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 1px;
    background: rgba(255,255,255,0.08);
    border-radius: 1px;
    overflow: hidden;
    z-index: 10;
}

.preloader-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, rgba(244,123,126,0.8), rgba(205,170,109,0.9));
    border-radius: 1px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 8px rgba(244,123,126,0.5);
}

/* ---------- Exit Transition ---------- */
#luxe-preloader.preloader-exit {
    animation: preloaderExit 1s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes preloaderExit {
    0%   { opacity: 1; transform: scale(1); }
    60%  { opacity: 0.5; transform: scale(1.02); }
    100% { opacity: 0; transform: scale(1.05); pointer-events: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .preloader-brand {
        font-size: 1.4rem;
        letter-spacing: 2px;
    }

    .preloader-tagline {
        font-size: 0.7rem;
        letter-spacing: 3px;
    }

    .preloader-logo-mark {
        width: 70px;
        height: 70px;
        margin-bottom: 24px;
    }

    .preloader-brush {
        width: 80px;
    }

    .preloader-ambient--rose { width: 250px; height: 250px; }
    .preloader-ambient--gold { width: 200px; height: 200px; }
    .preloader-ambient--blush { width: 180px; height: 180px; }
}

@media (max-width: 480px) {
    .preloader-brand {
        font-size: 1.15rem;
    }

    .preloader-logo-mark {
        width: 55px;
        height: 55px;
        margin-bottom: 18px;
    }
}
