/* Height follows the width in the image's 16:9 ratio, but never exceeds the
   viewport minus the header (121px = USP bar + nav), so hero + header always
   fit on one screen. When capped, the image crops at the sides (cover). */
.hero-cover {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 121px);
}

.hero-cover__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}

.hero-cover__overlay {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    box-sizing: border-box;
    padding: 40px 24px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.3) 100%
    );
    color: #fff;
}

.hero-cover__headline {
    font-size: 40px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
    color: #fff;
    max-width: 640px;
}

.hero-cover__text {
    font-size: 13px;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
}

/* Headline authored inside the page text (no separate headline field) */
.hero-cover__text h1,
.hero-cover__text h2,
.hero-cover__text h3 {
    font-size: 40px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
    color: #fff;
}

.hero-cover__text p {
    margin: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

.hero-cover__text span,
.hero-cover__text p span {
    font-size: inherit !important;
}

.hero-cover__text .button,
.hero-cover__text a.button {
    display: none;
}

@media (min-width: 770px) {
    .hero-cover__overlay {
        padding: 80px 60px;
    }

    .hero-cover__headline {
        font-size: 64px;
        margin: 0 0 20px;
        max-width: 760px;
    }

    .hero-cover__text {
        font-size: 15px;
        max-width: 640px;
    }

    .hero-cover__text h1,
    .hero-cover__text h2,
    .hero-cover__text h3 {
        font-size: 64px;
        margin: 0 0 20px;
    }
}
