/* === hero.css — Full-viewport hero carousel === */

.hero {
    position: relative;
    width: 100%;
    height: 600px;
    min-height: 600px;
    overflow: hidden;
    background: var(--teal-dk);
}

body.page-home {
    --nav-h: 75px;
}

/* ── Slides ──────────────────────────────────────────────── */
.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 0 80px 0;
    z-index: 1;
}

.slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.08);
    opacity: 0;
    will-change: transform, opacity;
}

.slide-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Banner frame is 1920x1080; its pinwheel settles at x 1088-1532, y 196-636 of that frame.
   Placed so the pinwheel clears everything that would clip it — the fixed 75px nav above, the
   tab bar (from y 474) below, and the hero's right edge. 0.85 of the frame (1632x918, its own
   16:9, so nothing stretches) puts the pinwheel at x 925-1302, y 88-462: ~12px clear of both
   the nav and the tabs. Left/top anchored, so the frame still covers the hero at every width.
   The entrance swooshes are drawn flying in from outside the frame and are meant to run off. */
.slide--corporate .slide-video {
    width: 1632px;
    height: 918px;
    inset: -79px auto auto 0;
    object-fit: cover;
}

/* Dark gradient so text is always readable */
.slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.3) 45%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(30px);
    max-width: 750px;
}

.slide--corporate .slide-content {
    position: absolute;
    left: 61px;
    top: var(--nav-h);
    bottom: 126px;
    display: flex;
    align-items: center;
    z-index: 3;
    max-width: none;
}

/* .slide-content h1 {
    font-size: clamp(2.6rem, 5.5vw, 5.2rem);
    font-weight: 900;
    color: #f2f2f2;
    line-height: 1;
    letter-spacing: -1.5px;
    text-transform: uppercase;
    text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.25);
} */

.slide-content h1.corporate {
    font-size: 80px;
    font-weight: 700;
    color: #f2f2f2;
    line-height: 80px;
    letter-spacing: 0;
    text-transform: uppercase;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.45);
}

.slide-content h1.sustainability {
    font-weight: 700;
    font-size: 56px;
    line-height: 64px;
    text-transform: uppercase;
    vertical-align: bottom;
    white-space: nowrap;
}

.slide-content h1.esg {
    font-weight: 700;
    font-size: 56px;
    line-height: 64px;
    text-transform: uppercase;
    vertical-align: bottom;
    white-space: nowrap;
}

.slide-content h1.safety {
    font-weight: 700;
    font-size: 80px;
    line-height: 80px;
    text-transform: uppercase;
    vertical-align: bottom;
}

.slide-content h1.diversity {
    font-weight: 700;
    font-size: 80px;
    line-height: 80px;
    text-transform: uppercase;
    vertical-align: bottom;
    white-space: nowrap;
}

.slide-content h1.sustainability,
.slide-content h1.esg,
.slide-content h1.safety,
.slide-content h1.diversity {
    letter-spacing: 0;
    text-shadow: 4px 4px 10px rgba(0, 0, 0, 0.25);
}

.slide-content h1 strong {
    font-weight: 900;
    display: block;
}

/* ── Tab bar ─────────────────────────────────────────────── */
.carousel-tabs {
    position: absolute;
    bottom: 76px;
    left: 0;
    right: 0;
    height: 50px;
    width: 91%;
    margin: auto;
    display: flex;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18); /* subtle bottom line for whole bar */
}

.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 8px;
    cursor: pointer;
    position: relative;
    padding: 0 16px;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.2s;
}

.tab:last-child {
    border-right: none;
}

.tab-num {
    font-size: 1.25rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
    transition: color 0.3s;
    white-space: nowrap;
}

.tab-label {
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.04em;
    transition: color 0.3s;
    white-space: nowrap;
}

.tab.is-active .tab-num {
    color: #f2f2f2;
    font-size: 1.25rem;
}
.tab.is-active .tab-label {
    color: #f2f2f2;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Orange bottom line on active tab */
.tab::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.tab.is-active::after {
    transform: scaleX(1);
}

/* GSAP-driven progress bar */
.tab-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--orange);
    width: 0%;
    z-index: 2;
    pointer-events: none;
}

/* ── Arrows ──────────────────────────────────────────────── */
.arrow {
    position: absolute;
    bottom: 18px;
    z-index: 20;
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    transition:
        border-color 0.2s,
        background 0.2s;
}

.arrow:hover {
    border-color: #f2f2f2;
    background: rgba(255, 255, 255, 0.15);
}
.arrow svg {
    width: 14px;
    height: 14px;
}
.arrow--left {
    left: 70px;
}
.arrow--right {
    right: 70px;
}

/* Remove default border-bottom from .tab itself */
.tab {
    border-bottom: none; /* ← important */
}

/* Subtle bottom border for ALL tabs (inactive look) */
.tab::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(
        255,
        255,
        255,
        0.18
    ); /* light / subtle - adjust opacity/color to taste */
    z-index: 1;
}

/* Orange indicator ONLY for active tab */
.tab::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--orange);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: 2; /* above the subtle line */
}

.tab.is-active::after {
    transform: scaleX(1);
}

/* Optional: make hover more visible */
.tab:hover::before {
    background: rgba(255, 255, 255, 0.35);
}

/* If you still want the GSAP progress bar, keep it — but make it match ::after */
.tab-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--orange);
    width: 0%;
    z-index: 3; /* on top if needed */
    pointer-events: none;
    transform-origin: left;
}

/* When tab becomes active via click, you can instantly set progress to 0 and let GSAP animate */
.tab.is-active .tab-progress {
    width: 0%; /* reset when switching */
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 767px) {
    .hero {
        height: 800px;
        min-height: 800px;
    }

    /* plain hero photo on phones — drop the dark readability gradient */
    .slide::after { display: none; }

    /* the desktop rule frames the banner for the 1440 stage; re-fit it to the phone hero */
    .slide--corporate .slide-video {
        width: 100%;
        height: 100%;
        inset: 0;
        object-position: center top;
    }

    .slide {
        padding: 0 30px 130px;
    }

    .slide--corporate .slide-content {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        display: block;
    }

    .slide-content h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        letter-spacing: -0.5px;
    }

    .carousel-tabs {
        height: 60px;
    }

    .tab {
        flex-direction: column;
        gap: 2px;
        padding: 0 8px;
    }
    .tab-num {
        font-size: 0.6rem;
    }
    .tab-label {
        font-size: 0.65rem;
    }

    .arrow--left {
        left: 10px;
    }
    .arrow--right {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .tab-num {
        display: none;
    }
}

/* "Build" unbolded in the corporate hero headline */
.slide-content h1.corporate .corporate-light { font-weight: 400; }

/* ── Full-bleed past the 16" cap ──────────────────────────────────────────
   The page freezes + centres past 1728px (stage-scale.js). Break the hero back
   out to the full viewport so the banner spans edge-to-edge, and push the slide
   text right by the same amount so it stays in the centred 1440 column. */
@media (min-width: 1729px) {
    .hero {
        width: calc(100vw / var(--cap-zoom));
        margin-left: calc((1440px - 100vw / var(--cap-zoom)) / 2);
        margin-right: 0;
    }
    /* Shift only the text wrapper into the centred column — leave .slide and its
       inset:0 .slide-bg alone so the banner image/video still fills the hero. */
    .slide-content {
        margin-left: calc((100vw / var(--cap-zoom) - 1440px) / 2);
    }
    /* The corporate slide's video is a fixed 1632px frame (left-anchored for the
       pinwheel); widen it to the full hero so it covers instead of leaving a gap.
       The corporate copy is absolutely positioned (left:61px), so re-anchor it to
       the centred column too. */
    .slide--corporate .slide-video {
        width: calc(100vw / var(--cap-zoom));
    }
    .slide--corporate .slide-content {
        left: calc((100vw / var(--cap-zoom) - 1440px) / 2 + 61px);
        margin-left: 0;
    }
}
