@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --ink: #202622;
    --forest: #1e4b3d;
    --moss: #668342;
    --ochre: #c88932;
    --paper: #f8f6f0;
    --line: #d8d5ca;
    --charcoal: #2a2a2a;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--paper);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

a {
    color: var(--forest);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.16em;
}

a:hover {
    color: var(--ochre);
}

.site-header {
    min-height: clamp(104px, 10vh, 144px);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    background: #050505;
    color: white;
}

.brand {
    display: flex;
    align-items: center;
    min-width: 0;
    color: white;
    text-decoration: none;
}

.brand img {
    width: clamp(108px, 13vw, 170px);
    height: clamp(104px, 10vh, 144px);
    padding: 10px 14px;
    object-fit: contain;
    background: #000;
}

.brand span {
    padding: 0 28px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.35rem, 2.3vw, 2.7rem);
    font-weight: 600;
    line-height: 1.1;
}

.menu-toggle {
    display: none;
    place-content: center;
    gap: 5px;
    width: 58px;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
}

.site-navigation {
    display: flex;
    padding: 0 max(24px, calc((100vw - 1180px) / 2));
    background: var(--charcoal);
}

.site-navigation a {
    padding: 0.9rem 1.2rem;
    color: #f8f7f2;
    text-decoration: none;
    font-size: 0.94rem;
    font-weight: 600;
}

.site-navigation a:hover,
.site-navigation a.is-active {
    background: var(--forest);
    color: white;
}

.site-content {
    width: min(100% - 40px, 920px);
    min-height: calc(100vh - 310px);
    margin: 0 auto;
    padding: clamp(2.8rem, 7vw, 5.5rem) 0;
}

.markdown-content,
.archive,
.gallery,
.notice {
    animation: appear 400ms ease-out both;
}

.markdown-content> :first-child,
.archive> :first-child,
.gallery> :first-child,
.notice> :first-child {
    margin-top: 0;
}

.markdown-content h1,
.archive h1,
.gallery h1,
.notice h1 {
    margin: 0.1em 0 0.65em;
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.1rem, 5vw, 3.5rem);
    line-height: 1.1;
    color: var(--forest);
}

.markdown-content h2 {
    margin-top: 2.25em;
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--forest);
}

.markdown-content h3 {
    margin-top: 1.8em;
    color: var(--forest);
}

.markdown-content p,
.markdown-content li {
    max-width: 72ch;
}

.markdown-content img {
    display: block;
    width: min(100%, 760px);
    height: auto;
    margin: 2rem 0;
    border-radius: 4px;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--line);
}

.markdown-content th,
.markdown-content td {
    padding: 0.7rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.markdown-content th {
    background: #e7eee2;
}

.markdown-content blockquote {
    margin-left: 0;
    padding-left: 1rem;
    border-left: 4px solid var(--ochre);
    color: #4b554b;
}

.markdown-content pre {
    overflow: auto;
    padding: 1rem;
    background: #e8e7e0;
}

.eyebrow {
    margin: 0;
    color: var(--ochre);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

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

.archive-list li {
    border-bottom: 1px solid var(--line);
}

.archive-list a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
}

.empty-state,
.notice p {
    color: #566056;
}

.back-link {
    margin-bottom: 2rem;
    font-weight: 600;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 12px;
    max-width: 920px;
    margin-top: 2rem;
}

.gallery-tile {
    aspect-ratio: 1;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #dfe4d9;
    cursor: zoom-in;
}

.gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

.gallery-tile:hover img,
.gallery-tile:focus-visible img {
    transform: scale(1.06);
}

.gallery-tile:focus-visible,
.lightbox button:focus-visible,
.menu-toggle:focus-visible {
    outline: 3px solid var(--ochre);
    outline-offset: 3px;
}

.lightbox {
    width: min(100vw - 30px, 1100px);
    max-width: none;
    padding: 1rem 3.8rem 1.7rem;
    border: 0;
    background: #121412;
    color: white;
}

.lightbox::backdrop {
    background: rgb(0 0 0 / 82%);
}

.lightbox figure {
    display: grid;
    place-items: center;
    gap: 0.65rem;
    margin: 0;
}

.lightbox figure img {
    display: block;
    max-width: 100%;
    max-height: min(75vh, 760px);
    object-fit: contain;
}

.lightbox figcaption {
    color: #e4e5df;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.lightbox button {
    position: absolute;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 16%);
    color: white;
    cursor: pointer;
}

.lightbox-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 1.8rem;
    line-height: 1;
}

.lightbox-previous,
.lightbox-next {
    top: 50%;
    width: 42px;
    height: 42px;
    font-size: 1.3rem;
    transform: translateY(-50%);
}

.lightbox-previous {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.4rem max(20px, calc((100vw - 1180px) / 2));
    background: var(--forest);
    color: #f8f6f0;
    font-size: 0.87rem;
}

.site-footer p {
    margin: 0;
    font-weight: 600;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer a {
    color: #f8f6f0;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 1440px) {
    .gallery-grid {
        grid-template-columns: repeat(7, 1fr);
    }
}

@media (max-width: 620px) {
    .site-header {
        min-height: 82px;
    }

    .brand img {
        width: 88px;
        height: 82px;
        padding: 8px;
    }

    .brand span {
        padding: 0 12px;
        font-size: 1.25rem;
    }

    .menu-toggle {
        display: grid;
    }

    .site-navigation {
        display: none;
        padding: 0;
        border-top: 1px solid #4a4a4a;
    }

    .site-navigation.is-open {
        display: grid;
    }

    .site-navigation a {
        padding: 0.85rem 20px;
    }

    .site-content {
        width: min(100% - 32px, 920px);
        padding: 2.7rem 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .site-footer {
        display: block;
    }

    .site-footer nav {
        margin-top: 0.65rem;
        gap: 0.7rem 1rem;
    }

    .lightbox {
        width: 100vw;
        min-height: 100vh;
        padding: 1rem 3rem 1rem;
    }
}