/* Hero section — mobile-first, BEM */

.hero {
    position: relative;
    background-color: var(--color-bg);
    overflow: hidden;
    isolation: isolate;
}

/* Full-bleed background media — desktop only */
.hero__media {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero__video--bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border: 0;
    z-index: 1;
    background-color: #000000;
}

.hero__poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    z-index: 0;
    transition: opacity 0.35s ease;
}

.hero--has-video:has(.hero__video--bg.is-playing) .hero__poster {
    opacity: 0;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.45) 45%,
        rgba(0, 0, 0, 0.65) 100%
    );
    pointer-events: none;
}

.hero::after {
    content: none;
    display: none;
}

.hero__inner {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin-inline: auto;
    padding: 0 0 3rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Inline mobile video above content — full bleed */
.hero__showcase {
    display: block;
    width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 0;
    background-color: #000000;
}

.hero__video--inline {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center center;
    border: 0;
    background-color: #000000;
}

/* Content block */
.hero__content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 29.75rem;
    padding-inline: var(--container-padding);
}

.hero__title {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.0625rem;
    color: var(--color-text);
}

.hero__description {
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--color-text);
}

/* CTA buttons */
.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}

.hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.3125rem;
    padding: 0.625rem 1.4375rem;
    border-radius: 3.125rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero__btn--primary {
    background-color: var(--color-primary);
    color: var(--color-text);
    border: 1px solid transparent;
}

.hero__btn--primary:hover,
.hero__btn--primary:focus-visible {
    background-color: var(--color-primary-hover);
}

.hero__btn--secondary {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.hero__btn--secondary:hover,
.hero__btn--secondary:focus-visible {
    border-color: var(--color-border-hover);
    background-color: var(--color-text);
    color: var(--color-bg);
}

.hero__btn:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 2px;
}

/* Stats bar */
.hero__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin: 0;
    padding: 0 var(--container-padding);
    list-style: none;
}

.hero__stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.hero__stat-value {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--color-text-stat);
}

.hero__stat-label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: 0.0225rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
    opacity: 0.6;
}

/* Tablet — background video (inline mobile video only below this) */
@media (min-width: 48rem) {
    .hero {
        min-height: 42rem;
    }

    .hero__media {
        display: block;
    }

    .hero__showcase {
        display: none;
    }

    .hero::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 12rem;
        background: linear-gradient(360deg, #131315 50%, rgba(19, 19, 21, 0) 100%);
        pointer-events: none;
        z-index: 1;
    }

    .hero__inner {
        padding: 7.5rem var(--container-padding) 3.5rem;
        gap: 3rem;
        align-content: center;
        min-height: inherit;
    }

    .hero__content,
    .hero__stats {
        padding-inline: 0;
    }

    .hero__title {
        font-size: 2.5rem;
        letter-spacing: -0.078125rem;
    }

    .hero__description {
        font-size: 1.0625rem;
    }

    .hero__stats {
        width: 50%;
        max-width: 50%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem 2rem;
        align-items: start;
    }

    .hero__stat-value {
        font-size: 2rem;
    }

    .hero__video--bg,
    .hero__poster {
        object-position: 70% center;
        background-position: 70% center;
    }

    .hero__overlay {
        background: linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.72) 32%,
            rgba(0, 0, 0, 0.35) 58%,
            rgba(0, 0, 0, 0.1) 100%
        );
    }
}

/* Desktop — full-bleed background video */
@media (min-width: 64rem) {
    .hero {
        min-height: 50.625rem;
    }

    .hero::after {
        height: 23.875rem;
    }

    .hero__inner {
        min-height: 50.625rem;
        padding: 6rem var(--container-padding) 2.5rem;
        grid-template-rows: 1fr auto;
        align-content: stretch;
        gap: 2.5rem;
    }

    .hero__content {
        align-self: center;
        padding-top: 2rem;
    }

    .hero__stats {
        width: 50vw;
        max-width: 50%;
        align-self: end;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 3.5rem;
        padding-bottom: 1.5rem;
    }

    .hero__title {
        font-size: 3rem;
        letter-spacing: -0.09375rem;
    }

    .hero__description {
        font-size: 1.125rem;
    }

    .hero__video--bg,
    .hero__poster {
        object-position: right center;
        background-position: right center;
    }
}
