:root {
    --paper: #f5f3ee;
    --ink: #171717;
    --muted: #66635e;
    --line: #d8d4cc;
    --accent: #8d3e30;
    --max: 1240px;
    --wide: 1560px;
    --gutter: clamp(20px, 4vw, 64px);
    --space: clamp(72px, 10vw, 150px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { color: inherit; }
code { font-size: .88em; }
[hidden] { display: none !important; }

.shell,
.shell-wide {
    width: min(100% - (2 * var(--gutter)), var(--max));
    margin-inline: auto;
}
.shell-wide { width: min(100% - (2 * var(--gutter)), var(--wide)); }

.skip-link {
    position: fixed;
    z-index: 9999;
    left: 12px;
    top: 12px;
    transform: translateY(-160%);
    padding: 10px 14px;
    background: var(--ink);
    color: white;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
    position: relative;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: rgba(245, 243, 238, .96);
}
.header-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}
.brand { display: grid; gap: 2px; }
.brand-name { font-weight: 650; letter-spacing: -.02em; }
.brand-tagline { color: var(--muted); font-size: .78rem; }
.main-nav { display: flex; align-items: center; gap: clamp(22px, 3vw, 44px); }
.main-nav a {
    position: relative;
    padding-block: 9px;
    font-size: .95rem;
}
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: 2px;
    height: 1px;
    background: currentColor;
    transition: right .2s ease;
}
.main-nav a:hover::after,
.main-nav a.is-active::after { right: 0; }
.menu-toggle { display: none; }

.hero { padding-top: clamp(24px, 4vw, 56px); }
.hero-image-link { position: relative; display: block; overflow: hidden; background: #ddd; }
.hero-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.hero-image-link:hover .hero-image { transform: scale(1.012); }
.hero-overlay {
    position: absolute;
    inset: auto 0 0;
    display: grid;
    gap: 2px;
    padding: clamp(22px, 4vw, 54px);
    color: white;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
}
.hero-overlay strong { font-size: clamp(2rem, 5vw, 5rem); line-height: 1; letter-spacing: -.05em; }
.hero-overlay > span:last-child { opacity: .9; }

.section-block { padding-block: var(--space); }
.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, .75fr);
    gap: clamp(40px, 8vw, 130px);
    align-items: end;
}
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; }
.intro-grid h1,
.page-intro h1,
.about-intro h1 {
    margin-bottom: 0;
    font-size: clamp(2.7rem, 6vw, 6.2rem);
    font-weight: 520;
}
.intro-grid p { margin-bottom: .35rem; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.25rem); }
.eyebrow {
    margin-bottom: 12px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: clamp(32px, 5vw, 70px);
}
.section-heading h2 { margin: 0; font-size: clamp(2rem, 3vw, 3.25rem); font-weight: 520; }
.text-link { border-bottom: 1px solid currentColor; }

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(44px, 7vw, 100px) clamp(22px, 4vw, 54px);
}
.project-grid-home .project-card:first-child { grid-column: 1 / -1; }
.project-card-image-wrap { overflow: hidden; background: #ddd; }
.project-card-image {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .35s ease;
}
.project-card a:hover .project-card-image { transform: scale(1.018); filter: brightness(.97); }
.project-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 15px;
}
.project-card-meta h2,
.project-card-meta h3 { margin-bottom: 4px; font-size: clamp(1.35rem, 2vw, 2rem); font-weight: 540; }
.project-card-meta p,
.project-card-meta > span { margin: 0; color: var(--muted); font-size: .86rem; }

.statement {
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) auto;
    gap: 40px;
    align-items: end;
}
.statement p { max-width: 850px; margin: 0; font-size: clamp(2rem, 4vw, 4.4rem); line-height: 1.1; letter-spacing: -.04em; }
.button-link,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid var(--ink);
    background: transparent;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.button-link:hover,
.button:hover { background: var(--ink); color: white; }

.page-intro {
    padding-top: clamp(80px, 10vw, 150px);
    padding-bottom: clamp(35px, 5vw, 70px);
}
.page-intro > p:last-child { max-width: 700px; color: var(--muted); font-size: 1.1rem; }
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: clamp(35px, 5vw, 70px);
}
.filter-button {
    border: 1px solid var(--line);
    background: transparent;
    padding: 9px 14px;
    cursor: pointer;
}
.filter-button:hover,
.filter-button.is-active { border-color: var(--ink); background: var(--ink); color: white; }

.project-header {
    padding-top: clamp(80px, 10vw, 150px);
    padding-bottom: clamp(50px, 7vw, 100px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr);
    gap: 36px clamp(40px, 8vw, 120px);
}
.project-header h1 { margin-bottom: 0; font-size: clamp(3.2rem, 8vw, 8rem); font-weight: 500; }
.project-facts { margin: 0; align-self: end; }
.project-facts div {
    display: grid;
    grid-template-columns: 65px 1fr;
    gap: 18px;
    padding-block: 10px;
    border-top: 1px solid var(--line);
}
.project-facts div:last-child { border-bottom: 1px solid var(--line); }
.project-facts dt { color: var(--muted); }
.project-facts dd { margin: 0; }
.project-excerpt {
    grid-column: 1 / -1;
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    font-size: clamp(1.1rem, 1.6vw, 1.45rem);
}
.gallery { display: grid; gap: clamp(50px, 8vw, 130px); }
.gallery-item { margin: 0; }
.gallery-open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}
.gallery-open img { width: 100%; height: auto; }
.gallery:not(.gallery-single) .gallery-item:nth-child(3n+2) { width: min(78%, 1120px); justify-self: end; }
.gallery:not(.gallery-single) .gallery-item:nth-child(3n) { width: min(72%, 1020px); justify-self: start; }
.zoom-symbol {
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(245,243,238,.93);
    font-size: 1.4rem;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity .2s ease, transform .2s ease;
}
.gallery-open:hover .zoom-symbol,
.gallery-open:focus-visible .zoom-symbol { opacity: 1; transform: translateY(0); }
.gallery-item figcaption { margin-top: 10px; color: var(--muted); font-size: .85rem; }
.next-project { padding-block: var(--space); border-top: 1px solid var(--line); margin-top: var(--space); }
.next-project a { display: flex; justify-content: space-between; gap: 24px; font-size: clamp(2.3rem, 6vw, 6rem); line-height: 1; letter-spacing: -.05em; }

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
    gap: clamp(50px, 10vw, 150px);
    border-top: 1px solid var(--line);
}
.about-copy { max-width: 780px; }
.about-copy .lead { font-size: clamp(1.8rem, 3vw, 3rem); line-height: 1.2; letter-spacing: -.03em; }
.about-copy p:not(.lead) { color: var(--muted); }
.about-facts dl { margin: 0; }
.about-facts div { padding-block: 15px; border-top: 1px solid var(--line); }
.about-facts div:last-child { border-bottom: 1px solid var(--line); }
.about-facts dt { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.about-facts dd { margin: 5px 0 0; }

.contact-intro h1 { max-width: 1050px; }
.email-link { display: inline-block; margin-top: 24px; border-bottom: 1px solid; font-size: clamp(1.3rem, 2.4vw, 2.3rem); }
.contact-section { max-width: 850px; margin-left: max(var(--gutter), calc((100vw - var(--max)) / 2)); }
.contact-form { display: grid; gap: 28px; }
.form-row { display: grid; gap: 8px; }
.form-row label { font-size: .85rem; }
.form-row input,
.form-row textarea {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--ink);
    border-radius: 0;
    background: transparent;
    padding: 12px 0;
    color: var(--ink);
}
.form-row textarea { border: 1px solid var(--ink); padding: 14px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; }
.form-errors { border-left: 3px solid #a51f1f; padding-left: 16px; margin-bottom: 24px; }
.form-errors p { margin: 0; }
.form-status { border-left: 3px solid #3c6f43; padding-left: 16px; }
.note-box { border-top: 1px solid var(--line); }
.note-box p { max-width: 800px; color: var(--muted); }

.legal-page { padding-block: clamp(80px, 10vw, 150px); }
.legal-page h1 { font-size: clamp(3rem, 7vw, 7rem); font-weight: 500; }
.legal-copy { max-width: 800px; margin-top: 70px; }
.legal-copy h2 { margin-top: 50px; font-size: 1.6rem; }
.legal-copy a { border-bottom: 1px solid; }
.not-found { min-height: 60vh; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner {
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    color: var(--muted);
    font-size: .83rem;
}
.footer-inner p { margin: 0; }
.footer-inner nav { display: flex; gap: 24px; }
.footer-inner a:hover { color: var(--ink); }

body.lightbox-open { overflow: hidden; }
.lightbox {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 70px;
    align-items: center;
    background: rgba(245,243,238,.985);
    padding: 28px;
}
.lightbox-figure { margin: 0; display: grid; place-items: center; gap: 12px; max-height: 100%; }
.lightbox-image { max-height: calc(100vh - 100px); max-width: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox-caption { color: var(--muted); font-size: .82rem; }
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 1;
}
.lightbox-close {
    position: absolute;
    right: 24px;
    top: 18px;
    z-index: 2;
    color: #111;
    font-size: 3rem;
}
.lightbox-prev,
.lightbox-next { font-size: 3.5rem; padding: 20px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

@media (max-width: 820px) {
    body { font-size: 16px; }
    .header-inner { min-height: 76px; }
    .brand-tagline { display: none; }
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        border: 0;
        background: transparent;
        padding: 8px 0;
        cursor: pointer;
    }
    .menu-toggle-lines,
    .menu-toggle-lines::before {
        width: 21px;
        height: 1px;
        display: block;
        background: currentColor;
        content: "";
    }
    .menu-toggle-lines::before { transform: translateY(6px); }
    .main-nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 20px var(--gutter) 28px;
        border-bottom: 1px solid var(--line);
        background: var(--paper);
    }
    .main-nav.is-open { display: flex; }
    .main-nav a { width: 100%; padding: 12px 0; font-size: 1.15rem; }
    .hero-image { aspect-ratio: 4 / 5; }
    .intro-grid,
    .statement,
    .project-header,
    .about-grid { grid-template-columns: 1fr; }
    .intro-grid { align-items: start; }
    .project-grid { grid-template-columns: 1fr; }
    .project-grid-home .project-card:first-child { grid-column: auto; }
    .section-heading { align-items: flex-start; flex-direction: column; }
    .statement { align-items: start; }
    .project-header { gap: 40px; }
    .project-excerpt { grid-column: auto; }
    .gallery,
    .gallery:not(.gallery-single) .gallery-item:nth-child(n) { width: 100%; gap: 42px; }
    .zoom-symbol { opacity: 1; transform: none; width: 38px; height: 38px; }
    .lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 16px 5px; }
    .lightbox-prev,
    .lightbox-next { padding: 8px; font-size: 2.5rem; }
    .lightbox-close { top: 10px; right: 13px; font-size: 2.7rem; }
    .footer-inner { align-items: flex-start; flex-direction: column; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
