/* ============================================================
   BEINC — Contact Slideshow (Section CSS)

   100vh dark section, big media (image/video) at the back rotates
   every 7s, decorative carousel of thumbnails overlapping the
   bottom edge of the main media. View More Projects link sits in
   the bottom-right corner of the main media (desktop/tablet only).
   ============================================================ */

.contact-slideshow {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100lvh;
    background: var(--color-black2);
    overflow: hidden;
    isolation: isolate;
}

.contact-slideshow__inner {
    position: absolute;
    inset: 0;
    padding: 8vh var(--pad-x) 12vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* ── MAIN MEDIA STAGE ── */
.contact-slideshow__stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius);
}

.contact-slideshow__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.9s var(--ease-primary);
}
.contact-slideshow__media.is-active { opacity: 1; }

/* Left black gradient (~40vw, full height).
   z-index 6 so it sits ABOVE the carousel (z:4) — thumbnails rolling in
   from the left fade out as they enter the gradient instead of cutting
   sharply against it. Pointer-events:none so it doesn't block hover/click
   on anything underneath. */
.contact-slideshow__fade-left {
    position: absolute;
    inset: 0 auto 0 0;
    width: 40vw;
    background: linear-gradient(to right,
        var(--color-black2) 0%,
        rgba(25, 23, 22, 0.85) 30%,
        rgba(25, 23, 22, 0) 100%);
    pointer-events: none;
    z-index: 6;
}

/* Bottom black fade — sits behind the carousel */
.contact-slideshow__fade-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 28%;
    background: linear-gradient(to top,
        var(--color-black2) 0%,
        rgba(25, 23, 22, 0.6) 50%,
        rgba(25, 23, 22, 0) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Bottom-right diagonal gradient for the View More label.
   FULL-stage box (inset:0) with a "to top left" linear gradient — keeping
   the gradient inside a smaller box (e.g. 40% × 50%) showed visible cut-off
   edges where the gradient stopped. With inset:0 the gradient extends
   smoothly across the whole stage and only the bottom-right region ends
   up tinted (the gradient hits transparent by ~50% diagonal), so visually
   it's the same dark wedge — just no border line. */
.contact-slideshow__fade-corner {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top left,
        rgba(25, 23, 22, 0.85) 0%,
        rgba(25, 23, 22, 0.55) 18%,
        rgba(25, 23, 22, 0)    50%);
    pointer-events: none;
    z-index: 2;
}

/* View More projects link.
   Positioned ABOVE the carousel (carousel visual top sits at
   `bottom: calc(12vh + carousel_height/2)` from the stage bottom; carousel
   height is 158px so its top is at 12vh + 79px). 24px breathing room above
   that → bottom: calc(12vh + 103px). z-index 5 keeps it above the carousel
   (z:4) just in case any sub-pixel overlap occurs. */
.contact-slideshow__viewmore {
    position: absolute;
    right: 32px;
    bottom: calc(12vh + 103px);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--tracking-tight);
    font-size: var(--text-sm);
    line-height: 1.1;
    text-decoration: none;
    z-index: 5;
    max-width: 200px;
    /* Text inside the button is left-aligned (the button itself stays
       in the bottom-right corner of the stage via right:32px). */
    text-align: left;
    transition: opacity 0.3s var(--ease-primary);
}
.contact-slideshow__viewmore:hover { opacity: 0.7; }
/* Wrapper sized to the Beinc arrow's natural ~17×26 ratio so the diagonal
   arrow is visible at a comfortable size (a 20×20 square would letterbox
   it down to ~13×20). currentColor flows from the parent .contact-slideshow__viewmore
   (color: var(--color-white)) through to the SVG's `.arrow-path` rule. */
.contact-slideshow__viewmore-arrow {
    width: 18px;
    height: 26px;
    flex-shrink: 0;
    color: var(--color-white);
    transition: transform 0.4s var(--ease-out-expo);
}
.contact-slideshow__viewmore-arrow svg { width: 100%; height: 100%; display: block; }
/* Arrow points diagonally up-right already (built into the SVG); on hover
   nudge it along its own diagonal direction. NO rotate — the arrow has
   its own d-morph "breathe" animation built into the SVG (see <style>
   inside the SVG); rotating the wrapper would make the morph look off-axis. */
.contact-slideshow__viewmore:hover .contact-slideshow__viewmore-arrow {
    transform: translate(4px, -4px);
}


/* ── CAROUSEL ── */
.contact-slideshow__carousel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12vh;
    transform: translateY(50%);
    height: 158px;
    overflow: hidden;
    z-index: 4;
    pointer-events: none;
}
.contact-slideshow__carousel-track {
    display: flex;
    gap: 32px;
    height: 100%;
    align-items: center;
    will-change: transform;
}
.contact-slideshow__thumb {
    flex: 0 0 auto;
    width: 280px;
    height: 158px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-black);
}
.contact-slideshow__thumb img,
.contact-slideshow__thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* Show the View More button only above mobile */
@media (max-width: 767px) {
    .contact-slideshow {
        height: 70vh;
        height: 70lvh;
        min-height: 460px;
    }
    /* Mobile slideshow goes EDGE-TO-EDGE — no horizontal padding so the
       big media touches both viewport edges. Bottom padding cut to 0 and
       carousel offset reduced so the slideshow ENDS right after the carousel
       visually — small gap below to the View More button. */
    .contact-slideshow__inner { padding: 6vh 0 0; }
    /* No rounded corners on mobile since the stage runs to the screen edges
       — square corners read as full-bleed. */
    .contact-slideshow__stage { border-radius: 0; }
    .contact-slideshow__fade-left { display: none; }
    .contact-slideshow__fade-corner { display: none; }
    .contact-slideshow__viewmore { display: none; }
    /* Carousel `bottom: 6vh` + translateY(50%) leaves a small (~8px on
       vh=800) buffer between the carousel's visual bottom and the section
       bottom, so the carousel doesn't get clipped by the stage's
       overflow:hidden but still sits visually CLOSE to the section's edge. */
    .contact-slideshow__carousel {
        bottom: 6vh;
        height: 80px;
    }
    .contact-slideshow__thumb { width: 142px; height: 80px; }
}

/* Mobile View More button shown BELOW the slideshow on mobile only */
.contact-slideshow__viewmore-mobile { display: none; }
@media (max-width: 767px) {
    .contact-slideshow__viewmore-mobile {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        /* Tight top margin (4px) so the button hugs the slideshow above —
           reads as part of the slideshow group. Generous bottom margin
           (60px) creates clear visual separation from the brands marquee
           that follows. */
        margin: var(--space-1) auto var(--space-9);
        color: var(--color-white);
        font-family: var(--font-heading);
        font-weight: var(--font-weight-medium);
        letter-spacing: var(--tracking-tight);
        font-size: var(--text-sm);
        text-decoration: none;
        justify-content: center;
        width: 100%;
    }
    /* Sized to the Beinc Arrow's natural ~17×26 aspect ratio. The
       fill/animation come from the .vmore-arrow-path rule defined inside
       the desktop SVG's <style> block (it's a global stylesheet rule, so
       it applies to the mobile arrow too even though the desktop SVG is
       display:none on this viewport). */
    .contact-slideshow__viewmore-mobile .contact-slideshow__viewmore-arrow {
        display: inline-block;
        width: 14px;
        height: 20px;
        flex-shrink: 0;
        color: var(--color-white);
    }
    .contact-slideshow__viewmore-mobile .contact-slideshow__viewmore-arrow svg {
        width: 100%;
        height: 100%;
        display: block;
    }
}
