.services {
    margin-top: calc(-1 * var(--site-header-height));
    padding-block: calc(var(--site-header-height) + 3rem) var(--home-section-gap);
    background: #f5f5f5 url("../images/services/hero-bg.svg") center top / 120rem auto no-repeat;
}

.services-hero {
    display: grid;
    justify-items: center;
    gap: 1rem;
    text-align: center;
}

/* The marker stroke stretches with the words, so it fits both languages. */
.services-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 1.75rem 0.625rem 1.25rem;
    background: url("../images/services/eyebrow-mark.svg") center / 100% 100% no-repeat;
    color: var(--color-dark-blue-100);
    font-size: var(--text-h6);
    font-variation-settings: var(--opsz-medium);
    font-weight: 600;
    line-height: var(--leading-h6);
}

.services-hero__title {
    color: var(--color-blue-300);
    font-weight: 700;
    text-transform: uppercase;
    text-wrap: balance;
}

.services-list {
    display: grid;
    gap: 2.75rem;
    margin-block: 3rem 0;
    padding-block: 0;
    list-style: none;
}

/* The coloured block starts below the top of the card, which stands out of it on three sides. */
.service {
    position: relative;
    display: flex;
    padding: 0 1.25rem 2.25rem;
}

.service::before {
    content: "";
    position: absolute;
    inset: 3.5rem 0 0;
    border-radius: 1.5rem;
    background: center bottom / cover no-repeat;
    box-shadow: 0 0.75rem 2rem rgb(9 18 49 / 0.16);
}

.service--blue::before {
    background-image: url("../images/services/website-bg.svg");
}

.service--aqua::before {
    background-image: url("../images/services/webapp-bg.svg");
}

.service--orange::before {
    background-image: url("../images/services/mobileapp-bg.svg");
}

.service--navy::before {
    background-image: url("../images/services/fire-bg.svg");
}

.service__card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 1.5rem 1.5rem 2.5rem;
    border-radius: 1.5rem;
    background: var(--color-white);
    box-shadow: 0 0.25rem 1.5625rem rgb(112 112 112 / 0.3);
    text-align: center;
}

/* Wider than the card's padding allows: the illustration has its own white margins. */
.service__art {
    display: block;
    flex: none;
    width: min(100% + 2rem, 22rem);
    height: auto;
}

.service__title {
    margin: 0.75rem 0 0;
    color: var(--color-dark-blue-100);
    font-size: var(--text-h6);
    font-variation-settings: var(--opsz-medium);
    font-weight: 600;
    line-height: 1.5;
}

.service__title::after {
    content: "";
    display: block;
    width: 6rem;
    height: 0.5rem;
    margin: 0.5rem auto 1rem;
    background: url("../images/services/wave.svg") center / contain no-repeat;
}

@media (min-width: 48rem) {
    .services {
        padding-top: calc(var(--site-header-height) + 5rem);
    }

    .services-list {
        max-width: 42rem;
    }

    .service {
        padding: 0 2.75rem 2.75rem;
    }

    .service::before {
        inset: 5.25rem 0 0;
    }

    .service__card {
        padding: 2rem 2.5rem 2.5rem;
    }
}

@media (min-width: 64rem) {
    .services-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: calc(var(--container-max) + 2 * var(--page-margin));
    }
}

@media (min-width: 77.5rem) {
    .services-hero__title {
        font-size: var(--text-h2);
        line-height: var(--leading-h2);
    }

    .services-list {
        margin-top: 3.5rem;
    }
}
