/* ==========================================================================
   Kromdraai Blomme — cinematic hero
   ========================================================================== */

.kb-hero {
    position: relative;
    /* The header takes its own space above the hero, so the hero is the rest of the screen, not a full screen on top of it. */
    min-height: calc(100vh - var(--kb-header-rest-h, 97px));
    min-height: calc(100svh - var(--kb-header-rest-h, 97px));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    background: var(--kb-forest-deep);
}

.kb-hero__stage {
    position: absolute;
    inset: 0;
}

.kb-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: opacity 1.1s var(--kb-ease), visibility 1.1s var(--kb-ease);
}

.kb-hero__slide.is-active {
    opacity: 1;
    visibility: visible;
}

.kb-hero__media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.kb-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.06);
    transition: transform 8s linear;
}

.kb-hero__slide.is-active .kb-hero__media img {
    transform: scale(1);
}

.kb-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(18, 28, 21, 0.78) 0%, rgba(18, 28, 21, 0.44) 48%, rgba(18, 28, 21, 0.14) 100%);
}

.kb-hero__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    width: 100%;
    max-width: var(--kb-container);
    margin-inline: auto;
    padding: 0 var(--kb-gutter) clamp(7rem, 14vh, 10rem);
}

.kb-hero__content {
    max-width: 42rem;
}

.kb-hero__slide[data-kb-align="right"] .kb-hero__body {
    text-align: right;
}

.kb-hero__slide[data-kb-align="right"] .kb-hero__content {
    margin-left: auto;
}

.kb-hero__slide[data-kb-align="right"] .kb-hero__text,
.kb-hero__slide[data-kb-align="right"] .kb-btn {
    margin-left: auto;
}

.kb-hero__eyebrow {
    display: block;
    font-size: var(--kb-fs-eyebrow);
    font-weight: 500;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(247, 245, 239, 0.78);
    margin-bottom: 1.5rem;
}

.kb-hero__title {
    font-family: var(--kb-font-display);
    font-weight: 500;
    font-size: var(--kb-fs-display);
    line-height: 1.03;
    color: var(--kb-ivory);
    margin: 0 0 1.5rem;
    text-wrap: balance;
}

.kb-hero__text {
    font-size: var(--kb-fs-lead);
    line-height: 1.75;
    color: rgba(247, 245, 239, 0.84);
    max-width: 44ch;
    margin: 0 0 2.4rem;
}

/* Footer rail */
.kb-hero__footer {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: var(--kb-container);
    margin-inline: auto;
    padding: 0 var(--kb-gutter) 2.4rem;
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    color: rgba(247, 245, 239, 0.85);
}

.kb-hero__counter {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    font-variant-numeric: tabular-nums;
}

.kb-hero__counter-rule {
    position: relative;
    width: clamp(60px, 9vw, 130px);
    height: 2px;
    background: rgba(247, 245, 239, 0.32);
    overflow: hidden;
}

.kb-hero__counter-rule i {
    position: absolute;
    inset: 0 auto 0 0;
    width: 33.33%;
    background: var(--kb-ivory);
    transition: transform 0.7s var(--kb-ease);
}

.kb-hero__controls {
    display: flex;
    gap: 0.6rem;
}

.kb-hero__control {
    width: 42px;
    height: 42px;
    border: 2px solid rgba(247, 245, 239, 0.6);
    background: transparent;
    color: var(--kb-ivory);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.4s var(--kb-ease), border-color 0.4s var(--kb-ease);
}

.kb-hero__control:hover {
    background: rgba(247, 245, 239, 0.12);
    border-color: rgba(247, 245, 239, 0.6);
}

.kb-hero__scroll {
    position: absolute;
    left: 50%;
    bottom: clamp(1.5rem, 3vh, 2.4rem);
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    color: rgba(247, 245, 239, 0.82);
    transform: translateX(-50%);
    transition: color 0.35s var(--kb-ease), transform 0.35s var(--kb-ease);
}

.kb-hero__scroll:hover,
.kb-hero__scroll:focus-visible {
    color: var(--kb-ivory);
    transform: translateX(-50%) translateY(2px);
}

.kb-hero__scroll-mouse {
    display: block;
    width: 26px;
    height: 42px;
    border: 2px solid currentColor;
    border-radius: 15px;
    position: relative;
    box-sizing: border-box;
}

.kb-hero__scroll-wheel {
    position: absolute;
    left: 50%;
    top: 8px;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 999px;
    background: currentColor;
    animation: kb-hero-mouse-wheel 1.85s var(--kb-ease-soft) infinite;
}

@keyframes kb-hero-mouse-wheel {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    65% {
        opacity: 0;
        transform: translateY(11px);
    }

    66%,
    100% {
        opacity: 0;
        transform: translateY(0);
    }
}

@media (max-width: 780px) {
    .kb-hero {
        min-height: 82vh;
    }

    .kb-hero__body {
        padding-bottom: 7rem;
    }

    .kb-hero__scroll {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kb-hero__media img {
        transition: none;
        transform: none;
    }

    .kb-hero__scroll-wheel {
        animation: none;
        opacity: 0.75;
    }
}
