/* ============================================================
 * Hero Slider (ContentBlock: hero-slider)
 * NOTE: hero-* animation/structure classes (.hero-img-slide, .hero-corner)
 *       live in main.css.
 *       This file owns layout / inline-style replacements and the control
 *       bar (counter, progress bars, arrows).
 * ============================================================ */

.hero-slider {
    position: relative;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
    height: var(--hero-min-h, calc(100dvh - var(--hero-offset, 110px)));
    display: flex;
    flex-direction: column;
}

.hero-slider__inner {
    padding-top: 16px;
    padding-bottom: 24px;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    width: 100%;
    align-self: stretch;
}

.hero-slider__stack {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.hero-slider__image-col {
    grid-area: 1 / 1;
    position: absolute;
    z-index: 1;
    right: 0;
    top: 0;
    bottom: 0;
    max-width: 50%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
}

.hero-slider__poster {
    width: clamp(180px, 42vw, 620px);
    aspect-ratio: 4 / 5;
    padding: 8%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--accent);
    color: var(--bg);
    font-size: clamp(44px, 10vw, 140px);
    line-height: .9;
    border-top: 12px solid var(--bone);
}
.hero-slider__poster-note { font-size: 12px; letter-spacing: .12em; }
.hero-slider [data-hero-cta][hidden],
.hero-slider [data-hero-cta][href=""] { display: none; }

@media (prefers-reduced-motion: reduce) {
    .hero-slider *, .hero-slider *::before, .hero-slider *::after {
        animation: none !important;
        transition: none !important;
    }
    .hero-slider .hero-title-in, .hero-slider .hero-kicker-in,
    .hero-slider .hero-meta-in, .hero-slider .hero-btn-in,
    .hero-slider .hero-img-in {
        opacity: 1;
        transform: none;
    }
}

.hero-slider__content-col {
    grid-area: 1 / 1;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    min-height: 0;
    overflow: hidden;
}
.hero-slider__content-inner { width: 100%; }

.hero-slider__kicker {
    margin-bottom: 14px;
    color: var(--accent);
}

.hero-slider__title {
    font-size: var(--hero-title-size, clamp(72px, min(15vw, 22vh), 240px));
    margin: 0;
    mix-blend-mode: difference;
    color: #f4f1ea;
    position: relative;
    z-index: 3;
    padding-bottom: .05em;
    display: block;
    width: 100%;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
}

.hero-title-word {
    display: inline-block;
    white-space: nowrap;
}

.hero-slider__meta-row {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: center;
    flex-wrap: wrap;
    max-width: 58%;
}
.hero-slider__sub,
.hero-slider__date {
    font-size: 14px;
    letter-spacing: .08em;
}
.hero-slider__sub { color: var(--bone); }
.hero-slider__divider {
    width: 40px;
    height: 1px;
    background: var(--mute);
}

.hero-slider__buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.hero-slider__controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    flex: 0 0 auto;
}

.hero-slider__counter {
    font-size: 11px;
    letter-spacing: .18em;
    color: var(--mute);
    flex: 0 0 auto;
}

.hero-slider__progress {
    display: flex;
    gap: 8px;
    flex: 1;
    align-items: center;
}

/* Autoplay progress: each bar is a 24px tap target (WCAG 2.2, 2.5.8)
   around a 3px track, the fill sits on the track. */
.hero-prog {
    position: relative;
    flex: 1;
    height: 24px;
    padding: 10.5px 0;
    background: rgba(138,134,124,.25);
    background-clip: content-box;
    overflow: hidden;
    cursor: pointer;
    min-width: 80px;
    border: 0;
    appearance: none;
    color: inherit;
    font: inherit;
}
.hero-prog-fill {
    position: absolute;
    inset: 10.5px 0;
    width: 0;
    background: var(--accent);
    transform-origin: left center;
}
.hero-prog-fill.is-active { animation: progFill 6s linear forwards; }
.hero-prog-fill.is-done { width: 100%; }
@keyframes progFill { from { width: 0; } to { width: 100%; } }

.hero-slider__nav {
    display: flex;
    gap: 8px;
}
.hero-slider__nav .btn { padding: 8px 12px; }

/* Below 768px the poster stands in the flow below the text, so no word of
   eyebrow or title lies under it (bru#7 item 8, ENT-5826). Width, ratio and
   the full-bleed phone margin come from the .hero-* rules in main.css, which
   the absolute column above used to override. From 768px the title lies over
   the poster as before. */
@media (max-width: 767px) {
    .hero-slider { height: auto; }
    .hero-slider__stack {
        display: flex;
        flex-direction: column;
        overflow: visible;
    }
    .hero-slider__content-col { order: 1; }
    .hero-slider__image-col {
        order: 2;
        position: relative;
        inset: auto;
        max-width: none;
        margin-top: 24px;
    }
    .hero-slider__image-col .hero-slider__poster {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 600px) {
    .hero-slider__meta-row { max-width: 100%; }
}

/* Phones: counter and arrows share the first row, the bars take the full
   second row, so nothing overlaps and every control gets its own tap. */
@media (max-width: 600px) {
    .hero-slider__controls {
        flex-wrap: wrap;
        justify-content: space-between;
        row-gap: 12px;
    }
    .hero-slider__progress {
        order: 1;
        flex-basis: 100%;
    }
    .hero-prog {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* Landscape phones/tablets: do not let a viewport-height hero crowd the
   sticky header or clip the title. */
@media (max-height: 500px) {
    .hero-slider {
        height: auto;
        min-height: 0;
    }
    .hero-slider__inner {
        padding-top: 40px;
    }
    .hero-slider__stack {
        overflow: visible;
    }
}
