/* ==========================================
   HERO SECTION
   Filename  : css/hero.css
   Depends on: global.css
   ==========================================

   From global.css — DO NOT redeclare here:
   ✓  h1 → font-family (DM Sans), font-weight: 600
   ✓  .container-xl → width constraint (1488px content)
   ✓  .container-lg  → navbar width (1480px content)
   ✓  --white, --primary-color, --accent-color (#E3001D)
   ✓  CSS reset & box-sizing

   ========================================== */


html {
    scrollbar-gutter: stable;
}

/* =========================================
   HERO — SECTION
   ========================================= */

.hero {
    position: relative;
    width: 100%;
    /* height: 100vh; */
    background: #000000;
    overflow: hidden;
    padding-top: 0;
    box-sizing: border-box;
}

/* Video background — full hero coverage from y=0 */
.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}



.hero__overlay {
    position: absolute;
    inset: 0;
    background: #0F172AB2;
    /* ~70% dark overlay, video goes behind this */
    z-index: 1;
}

/* Reusable Pixel Card container and Canvas */
.pixel-card {
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate !important;
}

.pixel-canvas {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999 !important;
    pointer-events: none !important;
    display: block !important;
}






/* =========================================
   HERO — CONTENT LAYER
   ========================================= */

.hero .container-xl {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* vertically centers content in 100vh */
    padding-top: 175px;
    /* min breathing room on short viewports */
    padding-bottom: 90px;
}

.hero__inner {
    display: flex;
    flex-direction: column;
}


/* =========================================
   HERO — BRAND BLOCK (Red Square + Heading)

   Layout:
   .hero__brand (relative wrapper, 390×390px)
   ├─ .hero__square  → 390×390 red block
   └─ .hero__heading → absolute, left: 64px, vertically centered to square
                        overflows rightward, max-width: 580px
   ========================================= */

.hero__brand {
    position: relative;
    width: 100%;
    min-height: 390px;
    margin-bottom: 90px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* vertically centers heading in 390px */
}

.hero__square {
    position: absolute;
    left: 0;
    top: 0;
    width: 390px;
    height: 390px;
    background: var(--accent-color);
    opacity: 1;
}

.hero__heading {
    position: relative;
    padding-left: var(--hero-heading-padding, 136px);
    /* fallback matching computed desktop position */
}

.hero__subheading {
    position: relative;
    padding-left: var(--hero-heading-padding, 136px);
    margin-top: 18px;
    font-size: 16px;
    line-height: 21px;
    max-width: 488px;
}


/* =========================================
   HERO — AI CHAT ELEMENT
   ========================================= */

.hero__ai {
    position: absolute;
    /* out of flow — pins to bottom of .container-xl */
    bottom: 35px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 24px;
    border-radius: 999px;
    border: 1px solid #B5B7BDCC;
    background: #0F172A80;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Left side: circle + input — stretches to fill all space before the icon button */
.hero__ai-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    height: 100%;
}

.hero__ai-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    margin-left: -1px;
    /* aligns avatar circle edge seamlessly with capsule border */
}

.hero__ai-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hero__ai-input {
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    height: 100%;
    letter-spacing: 0;
    color: var(--white);
    background: transparent;
    border: none;
    flex: 1;
    min-width: 0;
    padding-right: 16px;
}

.hero__ai-input::placeholder {
    color: var(--white);
    opacity: 1;
    /* Firefox default placeholder opacity is 0.54, explicitly set to 1 */
}

/* Right side: clickable icon button */
.hero__ai-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    flex-shrink: 0;
    padding: 0;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.hero__ai-btn:hover {
    opacity: 1;
}

.hero__ai-icon {
    display: block;
}


/* =========================================
   HERO — RESPONSIVE
   ========================================= */

/* Laptop / Small Desktop (1024px - 1280px) */
@media (max-width: 1280px) and (min-width: 1024px) {
    .hero .container-xl {
        padding-top: 140px;
        padding-bottom: 70px;
    }

    .hero__brand {
        min-height: 340px;
        margin-bottom: 70px;
    }

    .hero__square {
        width: 340px;
        height: 340px;
    }
}

/* 768px - 1023px (Tablet) */
@media (max-width: 1023px) and (min-width: 768px) {
    .hero .container-xl {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .hero__brand {
        min-height: 290px;
        margin-bottom: 60px;
    }

    .hero__square {
        width: 290px;
        height: 290px;
    }

    .hero__heading {
        font-size: 54px;
        line-height: 58px;
        padding-left: 100px;
    }

    .hero__subheading {
        font-size: 16px;
        max-width: 480px;
        padding-left: 100px;
    }
}

/* Mobile (< 768px) — keep text INSIDE the red square, scaled down */
@media (max-width: 767px) {
    .hero .container-xl {
        padding-top: 140px;
        padding-bottom: 80px;
    }

    .hero__brand {
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 220px;
        margin-bottom: 60px;
    }

    .hero__square {
        position: absolute;
        width: 220px;
        height: 220px;
        top: 0;
        left: 0;
    }

    .hero__heading {
        padding-left: 72px;
        font-size: 30px;
        line-height: 36px;
        width: 100%;
        max-width: 100%;
    }

    .hero__subheading {
        padding-left: 72px;
        font-size: 14px;
        line-height: 20px;
        max-width: 100%;
        margin-top: 12px;
    }

    .hero__ai {
        width: calc(100% - 32px);
        bottom: 24px;
        height: 50px;
        padding-right: 16px;
    }

    .hero__ai-circle {
        width: 50px;
        height: 50px;
    }

    .hero__ai-input {
        font-size: 15px;
        padding-right: 10px;
    }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
    .hero .container-xl {
        padding-top: 130px;
        padding-bottom: 70px;
    }

    .hero__brand {
        min-height: 170px;
        margin-bottom: 50px;
    }

    .hero__square {
        width: 170px;
        height: 170px;
    }

    .hero__heading {
        padding-left: 56px;
        font-size: 26px;
        line-height: 32px;
    }

    .hero__subheading {
        padding-left: 56px;
        font-size: 13px;
        line-height: 18px;
        margin-top: 10px;
    }
}

/* Extra small mobile (< 360px) */
@media (max-width: 359px) {
    .hero .container-xl {
        padding-top: 70px;
    }

    .hero__brand {
        min-height: 140px;
        margin-bottom: 24px;
    }

    .hero__square {
        width: 140px;
        height: 140px;
    }

    .hero__heading {
        padding-left: 44px;
        font-size: 22px;
        line-height: 28px;
    }

    .hero__subheading {
        padding-left: 44px;
        font-size: 12px;
        line-height: 17px;
    }
}


/* =========================================
   HERO — VIDEO-HERO (concom.tv scroll-zoom)
   ========================================= */

.hero.video-hero {
    position: relative;
    width: 100%;
    height: 300vh;
    /* scrollable track */
    background: #000000;
    overflow: visible;
    padding-top: 0;
}

.hero.video-hero .container-xl {
    position: relative;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.hero.video-hero .text-wrapper {
    position: relative;
    height: 100vh;
    /* text occupies the first viewport */
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: auto;
    z-index: 20;
    padding-top: 104px;
}

/* Video wrapper that sticks to the bottom of the viewport during the scroll track */
.hero.video-hero .video-wrapper {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    transform: translate3d(0px, 70%, 0px);
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    will-change: transform;
    pointer-events: auto;
}

.hero.video-hero .scroll-video {
    width: 100%;
    height: 100%;
    transform: scale(0.3);
    border-radius: 24px;
    overflow: hidden;
    will-change: transform, border-radius;
}

.hero.video-hero .scroll-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero.video-hero .video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

/* Background video stage */
.hero.video-hero .sticky-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero.video-hero .sticky-bg-inner {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.hero.video-hero .sticky-bg-inner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}