/* =========================================
   VIDEO TRIPTYCH BACKGROUND
   ========================================= */

/* Main Container - Fixed Fullscreen */
.triptych-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    display: grid;
    /* Desktop: 3 equal split columns */
    grid-template-columns: 1fr 1fr 1fr;
    overflow: hidden;
    background: #000;
    /* Fallback */
    pointer-events: none;
    /* No interaction */
}

/* Individual Video Items */
.triptych-item {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.triptych-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    /* Base opacity */
}

/* CINEMATIC SEPARATION: Atmosphere & Seams */

/* 
   SEAM LAYERS
   Dedicated gradient overlays added via JS to the edges of columns.
   This creates a "Fog of War" effect between videos.
*/
.triptych-seam {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 25%;
    /* Wide spread for softness */
    z-index: 2;
    pointer-events: none;
}

/* Right Seam (for Left & Center columns) */
.seam-right {
    right: 0;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 46, 99, 0.05) 40%,
            /* Very subtle glow start */
            rgba(5, 5, 8, 0.8) 85%,
            /* Deep dark transition */
            #000 100%);
}

/* Left Seam (for Center & Right columns) */
.seam-left {
    left: 0;
    background: linear-gradient(to left,
            transparent 0%,
            rgba(255, 46, 99, 0.05) 40%,
            rgba(5, 5, 8, 0.8) 85%,
            #000 100%);
}

/* Vignette for global depth */
.triptych-item::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}


/* Global Overlay */
.triptych-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Darken & Gradient for readability */
    background: rgba(0, 0, 0, 0.65);
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.9) 100%);
    pointer-events: none;
}

/* 
   RESPONSIVE LOGIC 
   ----------------
   Desktop (> 1024px): Show all 3
   Tablet (768px - 1024px): Show 2 (Left & Center), Hide Right
   Mobile (< 768px): Show 1 (Center only)
*/

/* Tablet View: 2 Columns */
@media (max-width: 1024px) {
    .triptych-container {
        grid-template-columns: 1fr 1fr;
    }

    /* Hide the 3rd video (Right) */
    .triptych-item:nth-child(3) {
        display: none;
    }
}

/* Mobile View: 1 Column */
@media (max-width: 768px) {
    .triptych-container {
        grid-template-columns: 1fr;
    }

    /* Hide 1st and 3rd, show only Center (2nd) */
    .triptych-item:nth-child(1),
    .triptych-item:nth-child(3) {
        display: none;
    }

    /* Center video takes full width */
    .triptych-item:nth-child(2) {
        display: block;
        width: 100%;
    }
}

/* Animation / Smooth Entry */
.triptych-item {
    animation: fadeInVideo 1.5s ease-out;
}

@keyframes fadeInVideo {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}