:root {
    --ink: #1f2621;
    --muted: #677068;
    --paper: #f4f1e9;
    --paper-deep: #e8e2d4;
    --white: #fffdf8;
    --accent: #7b2f34;
    --line: rgba(31, 38, 33, 0.16);
    --shadow: 0 24px 70px rgba(44, 39, 31, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.site-header,
.hero,
.correspondence-section,
.gallery-section,
.site-footer {
    width: min(1180px, calc(100% - 48px));
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 88px;
    border-bottom: 1px solid var(--line);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home-link,
.site-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: color 180ms ease, gap 180ms ease;
}

.home-link:hover,
.site-footer a:hover {
    color: var(--accent);
    gap: 0.82rem;
}

.page-mark {
    color: var(--muted);
}

.hero {
    display: grid;
    grid-template-columns: minmax(290px, 0.78fr) minmax(0, 1.22fr);
    gap: clamp(2.5rem, 7vw, 7rem);
    align-items: center;
    min-height: calc(100vh - 88px);
    padding-block: clamp(3.5rem, 8vw, 7rem);
}

.eyebrow {
    margin: 0 0 1.15rem;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 400;
    line-height: 0.94;
    letter-spacing: -0.045em;
}

h1 {
    font-size: clamp(4rem, 8.5vw, 7.5rem);
}

h2 {
    font-size: clamp(2.8rem, 5.5vw, 5rem);
}

.study-title {
    max-width: 27rem;
    margin: clamp(2.5rem, 5vw, 4.5rem) 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.25rem, 2.1vw, 1.65rem);
    line-height: 1.35;
}

.study-subtitle {
    margin: 0.65rem 0 0;
    color: var(--muted);
    font-size: 0.93rem;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 2.4rem;
    padding-bottom: 0.28rem;
    border-bottom: 1px solid currentColor;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.hero-photo {
    position: relative;
    margin: 0;
}

.hero-photo::before {
    position: absolute;
    z-index: -1;
    inset: -1.15rem 1.3rem 1.2rem -1.2rem;
    border: 1px solid rgba(123, 47, 52, 0.38);
    content: "";
}

.hero-photo img {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: var(--shadow);
}

.correspondence-section {
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(2.5rem, 8vw, 8rem);
    align-items: start;
    padding-block: clamp(5rem, 11vw, 10rem);
    border-top: 1px solid var(--line);
}

.section-heading {
    position: sticky;
    top: 2.25rem;
}

.letter {
    position: relative;
    padding: clamp(2rem, 5.5vw, 5rem);
    background: var(--white);
    box-shadow: var(--shadow);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.05rem, 1.5vw, 1.2rem);
    line-height: 1.85;
}

.letter::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--accent);
    content: "";
}

.letter p {
    margin: 0 0 1.4em;
}

.letter .salutation {
    margin-bottom: 2em;
}

.letter .signoff {
    margin-top: 2.2em;
    margin-bottom: 0;
}

.letter em {
    color: var(--accent);
}

.gallery-section {
    padding-block: clamp(5rem, 9vw, 9rem);
    border-top: 1px solid var(--line);
}

.gallery-heading {
    position: static;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.gallery-heading .eyebrow {
    order: 2;
    margin-bottom: 0.35rem;
}

.photo-grid {
    columns: 3;
    column-gap: clamp(0.75rem, 1.6vw, 1.4rem);
}

.photo-grid figure {
    margin: 0 0 clamp(0.75rem, 1.6vw, 1.4rem);
    overflow: hidden;
    break-inside: avoid;
    background: var(--paper-deep);
}

.photo-grid img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 420ms ease;
}

.photo-grid figure:hover img {
    transform: scale(1.015);
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 112px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

:focus-visible {
    outline: 3px solid rgba(123, 47, 52, 0.42);
    outline-offset: 5px;
}

@media (max-width: 820px) {
    .hero,
    .correspondence-section {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-copy {
        max-width: 37rem;
    }

    .hero-photo {
        margin-left: 1.15rem;
    }

    .section-heading {
        position: static;
    }

    .correspondence-section {
        gap: 3rem;
    }
}

@media (max-width: 640px) {
    .site-header,
    .hero,
    .correspondence-section,
    .gallery-section,
    .site-footer {
        width: min(100% - 32px, 1180px);
    }

    .site-header {
        min-height: 72px;
    }

    .page-mark {
        display: none;
    }

    .hero {
        padding-block: 3.5rem 5rem;
    }

    .photo-grid {
        columns: 2;
    }

    .gallery-heading {
        display: block;
    }

    .gallery-heading .eyebrow {
        margin-bottom: 1rem;
    }
}

@media (max-width: 430px) {
    .photo-grid {
        columns: 1;
    }

    .site-footer {
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 0.65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
