﻿.block__hero {
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    padding: 2rem;
    background-color: var(--purple);
    box-sizing: border-box;
}

    .block__hero > div {
        height: 100%;
        padding: 0;
        line-height: 0;
    }

    .block__hero.block__hero--noborder {
        padding: 0;
    }

.hero__image {
    width: 100%;
    height: auto;
    position: relative;
}

    .hero__image picture,
    .hero__image img {
        width: 100%;
        height: auto;
    }

        .hero__image picture:first-of-type img {
            display: inline !important;
        }

    .hero__image img {
        clip-path: polygon(0 2%, 98% 0, 100% 100%, 0 98%);
    }

.block__hero.block__hero--noborder-sm {
    padding: 0;
}

    .block__hero.block__hero--noborder-sm .hero__image img {
        clip-path: none;
    }

.hero__text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: column;
    justify-content: flex-end;
    padding: 0 2rem 4rem;
    color: var(--white);
    line-height: 1;
    box-sizing: border-box;
}

    .hero__text h1 {
        margin-bottom: 2rem;
    }

    .hero__text .button {
        margin-right: auto;
    }

.hero__text--light:before {
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    bottom: 0;
    background-image: linear-gradient(190deg, rgba(0, 0, 0, 0) 60%, rgba(0,0, 0, .4) 100%);
    z-index: 0;
    clip-path: polygon(0 2%, 98% 0, 100% 100%, 0 98%);
}

.block__hero.block__hero--noborder-sm .hero__text--light:before {
    clip-path: none;
}

.hero__text--light > * {
    position: relative;
}


@media(min-width: 992px) {
    .block__hero {
        padding: 3.5rem 2rem 3rem 3rem;
    }

    .hero__image img {
        display: none;
    }

    .block__hero .hero__image picture:has(+picture),
    .block__hero .hero__image picture:has(+picture) img {
        display: none !important;
    }

    .hero__image picture:last-of-type img {
        display: block !important;
    }

    .block__hero.block__hero--noborder-lg {
        padding: 0;
    }

        .block__hero.block__hero--noborder-lg .hero__image img {
            clip-path: none;
        }

    .hero__text {
        padding: 0 10rem 10rem;
    }
}

.block__texthero {
    text-align: center;
    padding: 4rem 0;
}

    .block__texthero h1 {
        margin-bottom: 1.5rem;
    }

        .block__texthero h1 > span {
            display: inline-flex;
            padding: 1rem 1rem 0.5rem;
            clip-path: var(--polygon-title);
            background-color: var(--polygoncolor);
            transform: rotate(-1deg);
            position: relative;
            z-index: 1;
        }

            .block__texthero h1 > span span {
                display: inline-block;
                transform: rotate(-1.5deg);
            }

            .block__texthero h1 > span:nth-child(even) {
                transform: rotate(1deg);
            }

                .block__texthero h1 > span:nth-child(even) span {
                    transform: rotate(-.5deg);
                }


@media(min-width: 992px) {
    .block__texthero {
        text-align: center;
        padding: 10rem 0 2rem;
    }

        .block__texthero h1 > span {
            padding: 1.5rem 2.5rem 0.5rem;
        }

            .block__texthero h1 > span span {
                transform: rotate(-.5deg);
            }
}
