/* ==========================================================================
   Hero Section Background Video Styles
   - Sits at the very back (cover)
   - Plays smoothly behind all elements & square box grid pattern
   - Subtle & elegant visibility with dark cinematic overlay
   ========================================================================== */

.tmp-banner-one-area {
    position: relative !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
}

/* Ensure the main container and all content elements are layered on top */
.tmp-banner-one-area > .container,
.tmp-banner-one-area .banner-one-main-wrapper {
    position: relative;
    z-index: 2;
}

/* Square boxes grid pattern - smoothly moving continuously over the video */
.tmp-banner-one-area.add-pattern::before {
    z-index: -1 !important;
    pointer-events: none;
    opacity: 0.16 !important; /* Clearly defined square grid boxes over the playing video */
    background-attachment: scroll !important; /* Enable smooth continuous background-position movement */
    background-size: 100px 100px, 100px 100px !important;
    animation: moveSquareBoxes 25s linear infinite !important;
    will-change: background-position;
}

/* Continuous smooth loop: 0px to 100px matches exact grid cell size for seamless loop */
@keyframes moveSquareBoxes {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 100px 100px, 100px 100px;
    }
}

/* Hero Background Video Wrapper (Lowest z-index layer) */
.hero-video-bg-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
    z-index: -2; /* Sits behind the square box grid (::before) and all hero elements */
}

/* The Background Video Element */
.hero-video-bg-wrap video.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    opacity: 0.40; /* Moderately increased visibility - clear developer ambient motion without overpowering text */
    filter: brightness(0.95) contrast(1.1);
    transition: opacity 0.6s ease;
    will-change: transform;
}

/* Subtle Gradient & Vignette Overlay */
.hero-video-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 60% 50%, rgba(1, 10, 16, 0.05) 0%, rgba(1, 10, 16, 0.38) 60%, rgba(1, 10, 16, 0.82) 100%),
        linear-gradient(180deg, rgba(1, 10, 16, 0.25) 0%, transparent 40%, rgba(1, 10, 16, 0.88) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Mobile & Tablet Optimizations */
@media (max-width: 991px) {
    .hero-video-bg-wrap video.hero-video-bg {
        opacity: 0.34;
    }
}

@media (max-width: 575px) {
    .hero-video-bg-wrap video.hero-video-bg {
        opacity: 0.30;
    }
}
