/* ==========================================================================
   DON BOSCO SCHOOL OF EXCELLENCE - CINEMATIC INTRO LOADER
   1. Animated Drawing Created: Artist line-by-line chalk sketch physically draws Don Bosco
   2. Painted: Dynamic paint wash flows outward, bringing full-color mosaic to life
   3. Website Opens in Color Sync: Theatrical curtain lift reveals homepage
   ========================================================================== */

/* Prevent scroll during loader */
html.dbs-intro-locked,
html.dbs-intro-locked body {
    overflow: hidden !important;
    height: 100% !important;
}

/* Master Overlay */
#dbs-site-preloader {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #070a0e !important;
    z-index: 999999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
    transition: clip-path 0.95s cubic-bezier(0.77, 0, 0.175, 1),
                -webkit-clip-path 0.95s cubic-bezier(0.77, 0, 0.175, 1),
                opacity 0.65s ease;
    will-change: clip-path, opacity;
}

/* Theatrical Curtain Lift (Reveal Website) */
#dbs-site-preloader.dbs-intro-out {
    clip-path: inset(0 0 100% 0) !important;
    -webkit-clip-path: inset(0 0 100% 0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Fullscreen Visual Container (Covers fully) */
.dbs-fullscreen-visual {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Layer 1: High-Performance 60 FPS Painter Canvas (Lines Drawn Progressively) */
.dbs-intro-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.dbs-intro-canvas.dbs-canvas-fade {
    opacity: 0.15;
}

/* Layer 2: Real Full-Color Don Bosco Mosaic Artwork (Paint Bloom) */
.dbs-intro-color {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    z-index: 4;
    pointer-events: none;
    clip-path: circle(0% at 50% 45%);
    -webkit-clip-path: circle(0% at 50% 45%);
    transition: clip-path 2.1s cubic-bezier(0.2, 0.85, 0.25, 1),
                -webkit-clip-path 2.1s cubic-bezier(0.2, 0.85, 0.25, 1),
                opacity 0.7s ease,
                filter 0.7s ease;
    filter: blur(4px);
    will-change: clip-path, opacity, filter;
}

/* When the painting blooms across the canvas */
.dbs-intro-color.dbs-painted {
    opacity: 1 !important;
    filter: blur(0px) !important;
    clip-path: circle(135% at 50% 45%) !important;
    -webkit-clip-path: circle(135% at 50% 45%) !important;
}

/* Golden Shimmer Sheen Sweep Across Completed Artwork */
.dbs-intro-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 25%,
        rgba(255, 255, 255, 0.22) 48%,
        rgba(245, 158, 11, 0.40) 50%,
        rgba(255, 255, 255, 0.22) 52%,
        transparent 75%
    );
    transform: translateX(-100%);
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    transition: transform 1.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}

.dbs-intro-sheen.dbs-sheen-active {
    opacity: 1 !important;
    transform: translateX(100%) !important;
}

/* Vignette & Ambient Glow */
.dbs-intro-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, transparent 40%, rgba(7, 10, 14, 0.72) 100%);
    z-index: 6;
}

.dbs-intro-ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.dbs-intro-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
}

.dbs-intro-orb-gold {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, #f59e0b 0%, transparent 70%);
    top: 15%;
    left: 20%;
}

.dbs-intro-orb-blue {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, #0284c7 0%, transparent 70%);
    bottom: 10%;
    right: 15%;
}

/* Skip Button (Mount Carmel Style, Bottom Right) */
.dbs-intro-skip-btn {
    position: absolute;
    bottom: 26px;
    right: 26px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(246, 241, 231, 0.85);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 9px 18px;
    border-radius: 100px;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dbs-intro-skip-btn:hover {
    background: rgba(242, 101, 34, 0.3);
    border-color: #F26522;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(242, 101, 34, 0.35);
}

@media (max-width: 768px) {
    .dbs-intro-skip-btn {
        bottom: 20px;
        right: 20px;
        padding: 7px 15px;
        font-size: 12px;
    }
}
