/* ============================================================
   BEINC — Hero Statement Component
   Rotating industry/service text containers in hero section
   Depends on: global.css
   ============================================================ */

/* ── LAYOUT WRAPPER ── */
.hero-statement {
    position: absolute;
    bottom: var(--pad-x);
    left: var(--pad-x);
    right: var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: var(--z-hamburger);
    gap: var(--space-5);
    pointer-events: none; /* let clicks pass through to 3D canvas behind */
}

/* ── CONTAINERS (left & right) ── */
.hs-container {
    background: var(--color-black);
    border-radius: var(--radius);
    padding: clamp(12px, 1.5vw, 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(4px, 0.5vw, 8px);
    z-index: calc(var(--z-3d-shape) + 1);
    position: relative;
    pointer-events: auto; /* re-enable on containers (parent is pointer-events: none) */
    /* Width calculated by JS to match nav bar contracted edges */
}

/* ── TEXT LINES ── */
.hs-line {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    white-space: nowrap;
}

.hs-static-text {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--tracking-tight);
    font-size: clamp(16px, 2vw, 28px);
    line-height: var(--leading-tight);
    color: var(--color-white);
}

/* ── PILL ── */
.hs-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    padding: 1px 1px;
    overflow: hidden;
    position: relative;
}

.hs-pill-inner {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--tracking-tight);
    font-size: clamp(16px, 2vw, 28px);
    line-height: var(--leading-tight);
    color: var(--color-black2);
    display: inline-flex;
    position: relative;
}

/* Individual letter spans created by JS */
.hs-letter {
    display: inline-block;
    position: relative;
}

/* ── PILL WRAPPER (pill + chevron + dropdown) ── */
.hs-pill-wrapper {
    display: inline-flex;
    align-items: center;
    gap: clamp(12px, 1.6vw, 24px);
    cursor: pointer;
    position: relative;
}

/* ── CHEVRON ── */
.hs-chevron {
    width: clamp(10px, 1.2vw, 14px);
    height: auto;
    color: var(--color-white);
    flex-shrink: 0;
    /* rotation handled by GSAP to avoid transform conflicts */
}

/* ── DROPDOWN ── */
.hs-dropdown {
    position: absolute;
    bottom: calc(100% + 4px); /* gap between pill and dropdown */
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-white);
    border-radius: var(--radius);
    padding: clamp(12px, 1.5vw, 20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: var(--z-modal);
    min-width: max-content;
}

.hs-dropdown.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Close button */
.hs-dropdown-close {
    display: none; /* hidden on desktop/tablet — chevron acts as close */
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-bottom: clamp(8px, 1vw, 12px);
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-black2);
}

.hs-dropdown-close svg {
    width: clamp(10px, 1.2vw, 14px);
    height: auto;
}

/* List */
.hs-dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(4px, 0.6vw, 8px);
}

.hs-dropdown-item {
    font-family: var(--font-heading);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--tracking-tight);
    font-size: clamp(16px, 2vw, 28px);
    line-height: var(--leading-tight);
    color: var(--color-black2);
    cursor: pointer;
    padding: 2px 0;
    position: relative;
    white-space: nowrap;
    display: inline-block;
}

/* Hover underline animation — width matches text only */
.hs-dropdown-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-black);
    transition: width 0.3s ease;
}

.hs-dropdown-item:hover::after {
    width: 100%;
}

/* Selected highlight flash */
.hs-dropdown-item.is-selected {
    opacity: 0.5;
}

/* ── HERO 3D ELEMENT — absolute, doesn't affect flex layout ── */
.hs-shuffle {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    /* top set by JS to align canvas center with container top edge */
}

.hs-shuffle-btn {
    width: clamp(500px, 65vw, 1100px);
    height: clamp(450px, 65vw, 900px);
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}


/* ── GUIDE LINES ── */
.hs-guide-lines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: var(--z-base);
}

.hs-guide {
    position: absolute;
    opacity: 0;
}

/* Horizontal lines — full screen width, at top and bottom of containers */
.hs-guide--h-top,
.hs-guide--h-bottom {
    left: 0;
    right: 0;
    width: 100vw;
    height: 0;
    border-top: var(--guide-border);
    /* Positioned by JS to match container top/bottom edges */
}

/* Vertical lines — full viewport height, on outer edges of containers */
.hs-guide--v-left,
.hs-guide--v-right {
    top: 0;
    width: 0;
    border-left: var(--guide-border);
    /* Height and position set by JS */
}


/* ── RESPONSIVE — Tablet ── */
@media (max-width: 1023px) {
    .hero-statement {
        gap: var(--space-4);
    }
}

/* ── RESPONSIVE — Phone ── */
@media (max-width: 767px) {
    .hero-statement {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1px;
        bottom: calc(100lvh - 100svh + 4%);
    }

    .hs-shuffle-btn {
        width: 90vw;
        height: 110vw;
    }

    /* Containers merge into one row */
    .hs-container {
        flex: 1;
        min-width: 0;
    }

    .hs-container--left {
        border-radius: var(--radius) 0 0 var(--radius);
    }

    .hs-container--right {
        border-radius: 0 var(--radius) var(--radius) 0;
    }

    /* Mobile: container is the click target */
    .hs-container {
        cursor: pointer;
        overflow: visible;
    }

    /* Mobile dropdown hugs text, covers pill + chevron */
    .hs-dropdown {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        min-width: max-content;
        bottom: 0;
    }

    /* Show X close button on mobile */
    .hs-dropdown-close {
        display: flex;
    }

    /* Hide outer vertical guide lines on mobile */
    .hs-guide--v-left,
    .hs-guide--v-right {
        display: none;
    }
}
