hgroup {
    margin: 0;
}

/* Home opts out of menu.css's generic content clearance: the hero image sits
   full-bleed under the transparent header, and .hero carries the clearance. */
.site-header + main {
    padding-top: 0;
}

.hero-section {
    position: relative;
    margin: 0;
    padding: 0;
    /* Wypełnia ekran, ale płynnie zatrzymuje się na 50rem (i nie spada poniżej 28rem). */
    min-height: clamp(28rem, 100svh, 50rem);
    display: flex;
    align-items: stretch;
}

.hero-section::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image: url("../../images/back4knew.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to top, transparent 0, whitesmoke 20%);
    mask-image: linear-gradient(to top, transparent 0, whitesmoke 20%);
    pointer-events: none;
}

.hero {
    /* Clears the fixed header: ~80px nav + subnav bar (wraps to 2 lines on phones). */
    padding-top: 160px;
    position: relative;
    z-index: 1;
    justify-content: space-around;
    row-gap: 0;
    width: 100%;
}

.hero__content {
    text-align: center;
}

.hero__content h1 {
    font-family: var(--font-title);
    /* Scales with the viewport so the name never wraps on small screens. */
    font-size: clamp(1.5rem, 8vw, calc(var(--text-h1) * 1.3));
    white-space: nowrap;
}

.hero__subtitle {
    text-align: center;
    font-family: var(--font-heading);
    font-size: calc(var(--text-h2) * 1.25);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 1px;
}

.hero__content hgroup::after {
    content: none;
}

.hero__media img {
    transform: scale(0.85);
    -webkit-mask-image: url("../../images/maskanowa2.png");
    mask-image: url("../../images/maskanowa2.png");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

@media (min-width: 48rem) {
    .hero {
        /* Subnav is a single line here, so the header is shorter. */
        padding-top: 140px;
        flex-direction: row;
        justify-content: space-between;
    }

    .hero__content,
    .hero__media {
        flex: 1;
    }
}
