.background {
    position: absolute;
    width: 100% !important;
    height: 100%;
    top: 0;
    left: 0;
    transform: skewY(-5deg);
    z-index: -1;
}
.phone-overlay {
    position: absolute;
    width: 115%;
    top: -10%;
    /* width: calc(100% + 3rem); */
    /* top: -4rem; */
    pointer-events: none;
}
#header {
    display: flex;
    background-color: var(--primary);
    justify-content: center;
    align-items: center;
    padding: 0 5rem 0;
    .background {
        background-color: var(--primary);
        top: -5rem;
        height: calc(100% + 20rem);
    }
    a.btn {
        max-width: 20rem;
    }
    > div {
        flex: 0 1 40rem;
        /* max-width: 40rem; */
        /* max-width: 50rem; */
    }
    img {
        flex: 0 1 40rem;
        max-width: 40rem;
        mask-image: radial-gradient(
            ellipse at center,
            black 60%,
            transparent 70%,
            transparent 100%
        );
    }
    h2 {
        font-size: 4rem;
        margin: 0 0 1rem 0;
    }
}

#features {
    padding: 0 5rem;
    > h2 {
        text-align: center;
        font-size: 3rem;
        margin: 4rem 0;
    }
    > div {
        display: grid;
        grid-template: "c a" auto "c b" auto;
        align-items: center;
        justify-content: center;
        margin: 5rem 0;
        gap: 0 4rem;
        &:first-of-type {
            margin-top: 0;
            > div:first-of-type,
            > h3 {
                max-width: 25rem;
            }
            > img {
                grid-area: c;
                max-width: 30rem;
            }
        }
        &:nth-child(2n) {
            grid-template: "a c" auto "b c" auto;
        }
        .image-standalone {
            grid-area: c;
            position: relative;
            align-self: center;
            justify-self: stretch;
            > img:first-child {
                min-width: 0;
                max-width: 20rem;
            }
            .phone-overlay {
                left: -1.5rem;
                max-width: none;
            }
        }
        .images-container {
            grid-area: c;
        }
        > img {
            justify-self: stretch;
        }
        h3 {
            max-width: 35rem;
            font-family: 'Roboto-Medium';
            font-size: 1.5rem;
            align-self: end;
            margin-bottom: 0;
        }
        > div:first-of-type {
            max-width: 35rem;
            align-self: start;
        }
    }
    .images-container.mobile {
        max-width: 20rem;
    }
}

#statistics {
    background-color: var(--primary);
    padding-top: 2rem;
    > div {
        padding-top: 1rem;
        .text {
            border-left-color: var(--secondary) !important;
        }
    }
}

@media (max-width: 650px) {
    #header {
        position: relative; /* Weird but to make navbar relative positioned elements show behind */
        background-color: var(--primary);
        padding: 2rem 1rem 2rem;
        flex-direction: column-reverse;
        > div {
            background-color: var(--primary);
            flex: none;
        }
        h2 {
            padding-top: 2rem;
            font-size: 3rem;
        }
        img {
            max-width: 100%;
            flex: none;
        }
    }
    #features {
        padding: 1rem;
        > h2 {
            margin: 1rem 0;
            font-size: 2.5rem;
        }
        > div {
            h3 {
                font-size: 2rem;
                margin-bottom: 4rem;
            }
            &:has(.image-standalone) {
                > div:first-of-type {
                    margin-top: 5rem;
                }
            }
            grid-template: "a" "c" "b" !important;
            margin: 2rem 0;
            &:nth-child(2n) {
                flex-direction: column-reverse;
            }
            .images-container.mobile {
                max-width: none;
            }
            .image-standalone > img:first-child {
                max-width: 100%;
            }
            > img {
                min-width: 0;
                max-width: 100%;
                flex: 0 1 auto;
                align-self: center;
            }
            &:first-of-type > img {
                max-width: 100%;
            }
            > div:first-of-type {
                margin-top: 3rem;
            }
        }
    }
}
