.bg-404 {
    padding-top: 3rem;
    flex-direction: column;
    color: var(--primary-dark);
    background-image: linear-gradient(180deg, var(--primary-light), var(--background-light));
}

.wrapper-404 {
    max-width: 35rem;
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
}

@media (min-width: 641px) {
    .wrapper-404 {
        padding: 0 24px;
    }
}

.container-404 {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container-404:nth-of-type(1) {
    min-height: 18rem;
}

.headline-404 {
    position: absolute;
    -webkit-align-self: flex-start;
    align-self: flex-start;
    text-align: left;
}

.headline-404 h1 {
    margin-bottom: 2rem;
    font-size: 3rem;
    line-height: 1.1;
}

.headline-404 h1 strong {
    color: var(--secondary-dark);
    font-size: 2em;
    line-height: 1;
}

.text-404 {
    max-width: 10rem;
    min-width: 3rem;
    font-size: 1rem;
    line-height: 1.2rem;
}

.wrapper-404 img {
    position: absolute;
    z-index: 10;
    bottom: 13px;
    max-height: 11rem;
    max-width: none;
    margin-top: 8.25rem;
    -webkit-align-self: flex-end;
    align-self: flex-end;
}

.paragraph {
    font-size: 1rem;
        line-height: 1.2rem;
    text-align: center;
}

.maillink-404 {
    color: var(--primary-dark);
    font-size: 1.4rem;
    font-weight: 700;
}

@media (min-width: 374px) {
    .wrapper-404 img {
        max-height: 17rem;
    }
}

@media (min-width: 524px) {
    .headline-404 h1 {
        font-size: 4rem;
    }

    .headline-404 h1 strong {
        font-size: 2.3em;
    }

    .container-404:nth-of-type(1) {
        min-height: 27.75rem;
    }

    .text-404 {
        max-width: 15rem;
        min-width: 13.75rem;
        font-size: 1.2rem;
        line-height: 1.4rem;
    }

    .paragraph {
        font-size: 1.2rem;
        line-height: 1.4rem;
        text-align: center;
    }

    .home-btn {
        padding: 1.2rem 0;
        font-size: 1.75rem;
    }

    .wrapper-404 img {
        max-height: 28rem;
        margin-top: 3rem;
        bottom: 4px;
    }
}
