:root {
    --paper: #f1f0ed;
    --ink: #2d2c29;
    --muted: #827d75;
    --line: #d2cec7;
    --max: 1500px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

.site-header {
    max-width: var(--max);
    margin: auto;
    padding: 30px 34px 22px;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 24px;
}

.brand {
    grid-column: 2;
    display: block;
    width: min(440px, 42vw);
}

.header-instagram {
    grid-column: 3;
    justify-self: end;
    align-self: center;
    margin-right: 34px;
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--ink);
    letter-spacing: 0.08em;
    font-size: 13px;
}

.header-instagram svg {
    width: 24px;
    height: 24px;
    display: block;
    flex: 0 0 auto;
}

.brand img {
    width: 100%;
    height: auto;
    display: block;
}

.site-nav {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: clamp(24px, 4vw, 72px);
    padding-top: 15px;
}

.site-nav a {
    text-decoration: none;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 12px;
}

.site-nav a:hover,
.site-nav a.current {
    border-bottom: 1px solid var(--ink);
}

.menu-button {
    display: none;
    background: none;
    border: 1px solid var(--ink);
    padding: 8px 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.page-section {
    display: none;
    max-width: var(--max);
    margin: 0 auto;
    padding: 72px 34px 100px;
    min-height: 65vh;
}

.page-section.active {
    display: block;
}

.text-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.text-wrap h1,
.section-heading h1 {
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 17px;
    margin: 0 0 40px;
}

.text-wrap p {
    margin: 0 0 24px;
}

.contact-block {
    margin-top: 54px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.contact-block p {
    margin: 6px 0;
}

.contact-block span {
    display: inline-block;
    min-width: 170px;
    color: var(--muted);
}

a {
    color: inherit;
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 0 0 44px;
    border-top: 1px solid var(--line);
}

.services-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.section-heading {
    margin-bottom: 36px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 46px 24px;
    align-items: start;
}

.gallery-card {
    margin: 0;
    cursor: zoom-in;
    min-width: 0;
}

.gallery-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
}

.gallery-card figcaption {
    font-size: 16px;
    line-height: 1.5;
    margin-top: 12px;
    color: var(--ink);
    min-height: 2.8em;
    font-weight: 400;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(25, 24, 22, 0.94);
    z-index: 20;
    padding: 50px;
    display: grid;
    place-items: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox img {
    max-width: min(1200px, 90vw);
    max-height: 78vh;
}

.lightbox p {
    color: #eee;
    max-width: 900px;
    text-align: center;
    font-size: 13px;
}

.lightbox-close {
    position: absolute;
    right: 24px;
    top: 15px;
    background: none;
    border: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

@media (max-width: 980px) and (min-width: 701px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .site-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 22px 20px 15px;
    }

    .brand {
        width: min(240px, 58vw);
    }

    .header-instagram {
        margin-left: auto;
        margin-right: 10px;
    }

    .header-instagram svg {
        width: 23px;
        height: 23px;
    }

    .menu-button {
        display: block;
    }

    .site-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 0;
        padding: 14px 0 0;
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav a {
        padding: 11px 0;
        border-top: 1px solid var(--line);
    }

    .site-nav a:hover,
    .site-nav a.current {
        border-bottom: 0;
    }

    .page-section {
        padding: 46px 20px 70px;
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .gallery-card img {
        aspect-ratio: auto;
        object-fit: contain;
        background: transparent;
    }

    .gallery-card {
        margin-bottom: 28px;
    }

    .text-wrap h1,
    .section-heading h1 {
        margin-bottom: 28px;
    }

    .contact-block span {
        display: block;
        min-width: 0;
    }

    .lightbox {
        padding: 45px 16px;
    }

    .lightbox img {
        max-width: 100%;
        max-height: 72vh;
    }
}
