.works-page.container {
    max-width: 1229px;
    padding-right: 24px;
    padding-bottom: 78px;
    padding-left: 24px;
    color: #4c4c4c;
}

.works-intro h1 {
    margin: 0;
    font: 700 45px/1.2 var(--font-head);
}

.works-intro p {
    margin: 14px 0 0;
    font: 300 17px/1.4 "Roboto", sans-serif;
}

.works-gallery {
    margin-top: 52px;
}

.works-grid {
    display: grid;
    grid-template-columns: minmax(0, 381fr) minmax(0, 381fr) minmax(0, 389fr);
    grid-auto-flow: row dense;
    grid-auto-rows: 230px 245px 235px;
    gap: 15px;
}

.works-grid--reverse {
    grid-template-columns: minmax(0, 389fr) minmax(0, 381fr) minmax(0, 381fr);
}

.works-grid + .works-grid {
    margin-top: 15px;
}

.works-photo {
    display: block;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: 6px;
    background: #eee;
    cursor: zoom-in;
}

.works-photo--tall {
    grid-row: span 2;
}

.works-photo--wide {
    grid-column: span 2;
    grid-row: span 2;
}

.works-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.works-photo:focus-visible,
.works-gallery__more:focus-visible {
    outline: 3px solid #80c552;
    outline-offset: 4px;
}

.works-gallery__batch {
    margin-top: 15px;
}

.works-gallery__batch[hidden],
.works-gallery__more[hidden] {
    display: none;
}

.works-gallery__more {
    display: block;
    width: 100%;
    min-height: 70px;
    margin-top: 28px;
    padding: 18px;
    border: 1px solid #80c552;
    border-radius: 0;
    background: transparent;
    color: #80c552;
    font: 400 13px/1.3 "Roboto", sans-serif;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease;
}

.works-gallery__more:hover {
    background: #80c552;
    color: #fff;
}

@media (min-width: 1025px) and (max-width: 1228px) {
    .works-grid {
        grid-auto-rows: calc((100vw - 48px) * 230 / 1181) calc((100vw - 48px) * 245 / 1181) calc((100vw - 48px) * 235 / 1181);
    }
}

@media (max-width: 1024px) {
    .works-page.container {
        padding-right: 24px;
        padding-bottom: 60px;
        padding-left: 24px;
    }

    .works-intro h1 {
        max-width: 720px;
        font-size: 35px;
    }

    .works-intro p {
        margin-top: 18px;
        font-size: 16px;
    }

    .works-gallery {
        margin-top: 36px;
    }

    .works-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: clamp(180px, 25vw, 250px);
    }

    .works-photo--tall {
        grid-row: auto;
    }

    .works-photo--wide {
        grid-row: span 2;
    }

    .works-gallery__more {
        min-height: 54px;
    }
}

@media (max-width: 550px) {
    .works-page.container {
        padding-right: 12px;
        padding-bottom: 42px;
        padding-left: 12px;
    }

    .works-intro h1 {
        font-size: 25px;
    }

    .works-intro p {
        margin-top: 16px;
        font-size: 15px;
    }

    .works-gallery {
        margin-top: 28px;
    }

    .works-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: auto;
        gap: 12px;
    }

    .works-photo,
    .works-photo--tall,
    .works-photo--wide {
        grid-column: auto;
        grid-row: auto;
        aspect-ratio: 381 / 250;
    }

    .works-photo--tall {
        aspect-ratio: 389 / 490;
    }

    .works-photo--wide {
        aspect-ratio: 777 / 495;
    }

    .works-gallery__batch,
    .works-grid + .works-grid {
        margin-top: 12px;
    }

    .works-gallery__more {
        min-height: 48px;
        margin-top: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .works-gallery__more {
        transition: none;
    }
}
