/* Our work */

.our-work {
    padding: 48px clamp(24px, 4vw, 72px) 72px;
    background: #fff;
    color: #171717;
}

.our-work__inner {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Centred introduction */

.our-work__intro {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 0 auto 48px;
    text-align: center;
}

.our-work h2 {
    margin: 0;
    font-size: clamp(40px, 4vw, 64px);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.05em;
    text-wrap: balance;
}

.our-work__highlight {
    text-decoration-line: underline;
    text-decoration-color: var(--colour-yellow);
    text-decoration-thickness: 4px;
    text-underline-offset: 0.14em;
    text-decoration-skip-ink: auto;
}

.our-work__intro p {
    max-width: 720px;
    margin: 28px auto 0;
    color: #626262;
    font-size: 17px;
    line-height: 1.85;
}

/* Three-column gallery */

.our-work__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    padding: 0;
    align-items: stretch;
    gap: 44px 32px;
}

.work-project {
    display: flex;
    min-width: 0;
    margin: 0;
    flex-direction: column;
}

/* Landscape photographs */

.work-project__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eee;
}

.work-project__media img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transition: transform 450ms ease;
}

.work-project__view {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 8px 12px;
    border: 1px solid rgb(255 255 255 / 25%);
    border-radius: 3px;
    background: rgb(0 0 0 / 75%);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
}

/* Captions below images */

.work-project__caption {
    display: flex;
    flex: 1;
    padding: 26px 8px 28px;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid #dedede;
    text-align: center;
    transition: border-bottom-color 180ms ease;
}

.work-project__caption h3 {
    margin: 0 0 14px;
    color: #171717;
    font-size: clamp(24px, 1.8vw, 30px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.work-project__caption p {
    width: 100%;
    max-width: 440px;
    margin: 0;
    color: #626262;
    font-size: 16px;
    line-height: 1.85;
}

/* Closing CTA */

.our-work__footer {
    max-width: 680px;
    margin: 48px auto 0;
    text-align: center;
}

.our-work__footer p {
    margin: 0 0 24px;
    color: #626262;
    font-size: 17px;
    line-height: 1.8;
}

.our-work__footer .button {
    min-height: 54px;
    padding-inline: 32px;
}

/* Hover and keyboard focus */

.work-project:focus-within .work-project__caption {
    border-bottom-color: var(--colour-yellow);
}

@media (hover: hover) and (pointer: fine) {
    .work-project__media:hover img {
        transform: scale(1.025);
    }

    .work-project:hover .work-project__caption {
        border-bottom-color: var(--colour-yellow);
    }
}

/* Tablet */

@media (min-width: 768px) and (max-width: 1099px) {
    .our-work {
        padding: 40px 32px 64px;
    }

    .our-work h2 {
        font-size: 46px;
    }

    .our-work__intro {
        margin-bottom: 40px;
    }

    .our-work__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 36px 28px;
    }

    .work-project__caption h3 {
        font-size: 26px;
    }
}

/* Mobile */

@media (max-width: 767px) {
    .our-work {
        padding: 32px 24px 56px;
    }

    .our-work__intro {
        margin-bottom: 32px;
    }

    .our-work h2 {
        font-size: clamp(34px, 6.8vw, 48px);
        line-height: 1.28;
    }

    .our-work__highlight {
        text-decoration-thickness: 3px;
    }

    .our-work__intro p {
        margin-top: 24px;
        font-size: 16px;
        line-height: 1.8;
    }

    .our-work__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .work-project__caption {
        padding: 22px 0 26px;
    }

    .work-project__caption h3 {
        margin-bottom: 12px;
        font-size: 26px;
    }

    .work-project__caption p {
        max-width: 520px;
        font-size: 16px;
        line-height: 1.8;
    }

    .our-work__footer {
        margin-top: 36px;
    }

    .our-work__footer .button {
        width: 100%;
    }
}

@media (max-width: 359px) {
    .our-work {
        padding-inline: 20px;
    }

    .our-work h2 {
        font-size: 32px;
    }

    .work-project__caption h3 {
        font-size: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .work-project__media img,
    .work-project__caption {
        transition: none;
    }
}