:root {
    --homepage-side-gap: clamp(30px, calc((100vw - 1024px) * 0.25 + 30px), 200px);
}

.services-hero {
    width: 100%;
    min-height: 450px;
    line-height: 0;
    position: relative;
    background-color: #101f3c;
    overflow: hidden;
}

.services-hero img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 450px;
    object-fit: cover;
}

.services-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .12) 0%, rgba(0, 0, 0, .45) 100%);
}

.services-hero__content {
    position: absolute;
    left: var(--homepage-side-gap);
    bottom: 30px;
    color: #fff;
    max-width: 700px;
    line-height: normal;
}

.services-hero__content h1 {
    margin: 0;
    font-size: 60px;
    line-height: 1.1;
    text-transform: uppercase;
    color: #fff;
}

.services-intro {
    background: #fff;
    padding: 60px 0 70px;
}

.services-intro__inner {
    width: 100%;
    margin: 0;
    display: flex;
    align-items: stretch;
}

.services-intro__content {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 85px 0 var(--homepage-side-gap);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.services-intro__heading {
    margin: 0 0 28px;
    color: #007161;
    font-family: "brother-1816", sans-serif;
    font-size: 30px;
    text-transform: uppercase;
}

.services-intro__text {
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 18px;
}

.services-intro__text > :first-child {
    margin-top: 0;
}

.services-intro__text > :last-child {
    margin-bottom: 0;
}

.services-intro__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    align-self: flex-start;
    background: #a1833f;
    color: #fff;
    font-family: "brother-1816", sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding: 12px 20px;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.services-intro__cta:hover,
.services-intro__cta:focus {
    background-color: #9f813f;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
}

.services-intro__cta-mobile-wrap,
.services-intro__cta--mobile {
    display: none;
}

.services-intro__media {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (min-width: 1025px) {
    .services-intro__media {
        display: flex;
        align-items: flex-start;
    }
}

.services-intro__media img {
    width: 100%;
    height: auto;
    aspect-ratio: 960 / 600;
    object-fit: cover;
    display: block;
}

.services-projects {
    background: #000;
    padding: 60px 0;
}

.services-projects__inner {
    width: calc(100% - (var(--homepage-side-gap) * 2));
    max-width: 1520px;
    margin: 0 auto;
}

.services-projects__viewport {
    overflow: hidden;
}

.services-projects__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, calc((100vw - 1024px) * 0.12 + 20px), 130px);
}

.services-projects__nav {
    display: none;
}

.services-projects__dot {
    border: 0;
    border-radius: 50%;
    background-color: #9f9f9f;
    width: 18px;
    height: 18px;
    padding: 0;
    cursor: pointer;
}

.services-projects__dot:focus,
.services-projects__dot:focus-visible {
    outline: none;
    box-shadow: none;
}

.services-projects__dot.is-active {
    background-color: #007161;
}

.services-project-card {
    display: block;
    text-decoration: none;
    color: #fff;
    background: #000;
    width: 420px;
    max-width: 100%;
    justify-self: center;
    transition: transform 0.25s ease;
}

.services-project-card:hover,
.services-project-card:focus {
    text-decoration: none;
    color: #fff;
    transform: translateY(-4px);
}

.services-project-card__image {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.services-project-card__meta {
    background: #007161;
    color: #fff;
    font-family: "brother-1816", sans-serif;
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 22px;
    min-height: calc((2 * 1.2em) + 24px);
    box-sizing: border-box;
}

.services-project-card__meta span {
    flex: 1;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.services-project-card__arrow {
    width: auto;
    height: 30px;
    display: block;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.services-project-card:hover .services-project-card__arrow,
.services-project-card:focus .services-project-card__arrow {
    transform: translateX(4px);
}

@media (min-width: 1921px) {
    .services-projects__inner {
        width: calc(100% - (var(--homepage-side-gap) * 2));
        max-width: none;
        margin-left: var(--homepage-side-gap);
        margin-right: 0;
    }

    .services-project-card {
        width: 100%;
        max-width: none;
        justify-self: stretch;
    }
}

@media (max-width: 1024px) {
    .services-project-card,
    .services-project-card__arrow {
        transition: none;
    }

    .services-project-card:hover,
    .services-project-card:focus,
    .services-project-card:hover .services-project-card__arrow,
    .services-project-card:focus .services-project-card__arrow {
        transform: none;
    }

    .services-project-card__arrow {
        width: 30px;
        height: auto;
    }

    .services-project-card__meta {
        height: 100px;
        font-size: 20px;
    }

    .services-project-card {
        width: 100%;
    }

    .services-projects__grid {
        display: flex;
        gap: 0;
        transition: none;
        will-change: auto;
    }

    .services-projects__viewport {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        touch-action: pan-y;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .services-projects__viewport::-webkit-scrollbar {
        display: none;
    }

    .services-project-card {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        scroll-snap-align: start;
        justify-self: auto;
    }

    .services-projects__nav {
        margin-top: 24px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 18px;
    }
}

@media (max-width: 800px) {
    .services-projects {
        padding: 40px 0 24px;
    }

    .services-project-card__image {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .services-project-card__meta {
        height: 70px;
        font-size: 20px;
    }

    .services-project-card__arrow {
        width: 21px;
    }
}

@media (min-width: 500px) and (max-width: 1024px) {
    .services-project-card__image {
        width: min(100%, 700px);
        max-width: 700px;
        height: auto;
        aspect-ratio: 1 / 1;
        margin-left: auto;
        margin-right: auto;
    }

    .services-project-card__meta {
        width: min(100%, 700px);
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }
}

.full-width-image {
    width: 100%;
    line-height: 0;
}

.full-width-image img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 1024px) {
    .services-hero__content h1 {
        font-size: 34px;
    }

    .services-projects__inner {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    .services-intro {
        padding: 60px 0 0;
    }

    .services-intro__inner {
        flex-direction: column;
    }

    .services-intro__content {
        max-width: 100%;
        flex-basis: auto;
        padding: 0 var(--homepage-side-gap);
    }

    .services-intro__cta--desktop {
        display: none;
    }

    .services-intro__cta-mobile-wrap {
        display: block;
        background: #fff;
        padding: 30px var(--homepage-side-gap);
    }

    .services-intro__cta--mobile {
        display: inline-flex;
    }

    .services-intro__heading {
        font-size: 24px;
    }

    .services-intro__media {
        margin-top: 20px;
        max-width: 100%;
        flex-basis: auto;
        padding: 0 var(--homepage-side-gap);
        box-sizing: border-box;
    }

    .services-intro__media img {
        max-width: 100%;
        height: auto;
        width: min(100%, 700px);
        margin-left: 0;
        margin-right: auto;
    }

    .full-width-image img {
        width: 100%;
        aspect-ratio: 1.75 / 1;
        object-fit: cover;
        object-position: center;
    }
}

@media (max-width: 800px) {
    .services-hero__content h1 {
        font-size: 30px;
    }

    .services-intro__heading {
        font-size: 24px;
    }

    .services-intro__text {
        font-size: 17px;
    }
}
