:root {
    --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-serif: "Libre Baskerville", Georgia, serif;
    --ink: #161716;
    --paper: #f7f4ee;
    --cream: #fffaf1;
    --sage: #66735f;
    --clay: #a75f46;
    --rose: #d8b7ad;
    --stone: #a8a49a;
    --charcoal: #242525;
    --line: rgba(22, 23, 22, 0.16);
    --header-height: 76px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

body.nav-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

button,
input,
textarea {
    font: inherit;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    color: var(--cream);
    background: rgba(22, 23, 22, 0.42);
    border-bottom: 1px solid rgba(255, 250, 241, 0.18);
    backdrop-filter: blur(18px);
    transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.home .site-header {
    color: #fff;
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
}

.site-header.is-scrolled,
body:not(.home) .site-header {
    color: var(--ink);
    background: rgba(247, 244, 238, 0.92);
    border-bottom-color: var(--line);
}

.home .site-header.is-scrolled {
    color: #fff;
    background: transparent;
    border-bottom-color: transparent;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    width: min(100% - 32px, 1280px);
    margin: 0 auto;
    gap: 2rem;
}

.home .site-header__inner {
    justify-content: flex-end;
    width: min(100% - 56px, 1440px);
}

.home .brand {
    display: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-family: var(--font-serif);
}

.brand__text {
    font-size: 0.86rem;
}

.custom-logo-link img {
    width: auto;
    max-height: 48px;
}

.brand__wordmark {
    display: block;
    width: auto;
    max-height: 155px;
}

@media (max-width: 620px) {
    .brand__wordmark {
        max-height: 155px;
    }
}

.primary-nav .menu {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
    padding: 0;
    margin: 0;
    list-style: none;
}

.primary-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.home .primary-nav a {
    color: #fff;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.34);
}

.primary-nav a::after {
    position: absolute;
    right: 0;
    bottom: 0.6rem;
    left: 0;
    height: 1px;
    content: "";
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 180ms ease;
}

.primary-nav a:hover::after,
.primary-nav a:focus-visible::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
}

.nav-toggle span:not(.screen-reader-text) {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: currentColor;
}

.slide-section {
    position: relative;
    background: var(--paper);
    scroll-margin-top: 0;
}

.slide-section img {
    display: block;
    width: 100%;
    height: auto;
}

.has-scroll-fade .slide-section,
.has-scroll-fade .story-section {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 900ms ease, transform 900ms ease;
    will-change: opacity, transform;
}

.has-scroll-fade .slide-section.is-visible,
.has-scroll-fade .story-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .has-scroll-fade .slide-section,
    .has-scroll-fade .story-section {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

.section-anchor {
    display: block;
    position: relative;
    top: calc(var(--header-height) * -1);
    width: 0;
    height: 0;
    overflow: hidden;
}

.story-section {
    position: relative;
    display: grid;
    min-height: 100svh;
    overflow: hidden;
    color: var(--cream);
    --section-image: none;
    isolation: isolate;
}

.story-section__media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(120deg, rgba(22, 23, 22, 0.34), rgba(22, 23, 22, 0.68)),
        var(--section-image),
        linear-gradient(135deg, var(--charcoal), var(--sage));
    background-position: center;
    background-size: cover;
}

.story-section.no-image .story-section__media {
    background:
        linear-gradient(135deg, var(--charcoal), var(--sage));
}

.story-section--light,
.story-section--stone,
.story-section--rose {
    color: var(--ink);
}

.story-section--light .story-section__media {
    background:
        linear-gradient(120deg, rgba(247, 244, 238, 0.78), rgba(247, 244, 238, 0.5)),
        var(--section-image),
        linear-gradient(135deg, var(--paper), #d7d0c3);
}

.story-section--stone .story-section__media {
    background:
        linear-gradient(120deg, rgba(247, 244, 238, 0.5), rgba(36, 37, 37, 0.22)),
        var(--section-image),
        linear-gradient(135deg, var(--stone), #ece7dc);
}

.story-section--rose .story-section__media {
    background:
        linear-gradient(120deg, rgba(255, 250, 241, 0.62), rgba(167, 95, 70, 0.24)),
        var(--section-image),
        linear-gradient(135deg, var(--rose), #f5efe8);
}

.story-section--sage .story-section__media {
    background:
        linear-gradient(120deg, rgba(22, 23, 22, 0.24), rgba(22, 23, 22, 0.58)),
        var(--section-image),
        linear-gradient(135deg, var(--sage), #2f3c35);
}

.story-section--ink .story-section__media {
    background:
        linear-gradient(120deg, rgba(22, 23, 22, 0.1), rgba(22, 23, 22, 0.72)),
        var(--section-image),
        linear-gradient(135deg, #111, #2e3538);
}

.story-section__content {
    align-self: end;
    width: min(100% - 32px, 1160px);
    margin: 0 auto;
    padding: calc(var(--header-height) + 6rem) 0 clamp(4rem, 9vw, 8rem);
}

.story-section__content h1,
.page-hero h1,
.connect-copy h1 {
    max-width: 930px;
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 7.75rem);
    font-weight: 400;
    line-height: 0.98;
    letter-spacing: 0;
}

.story-section__content p:not(.eyebrow) {
    max-width: 650px;
    margin: 1.4rem 0 0;
    font-size: clamp(1.05rem, 1.7vw, 1.35rem);
}

.eyebrow {
    margin: 0 0 1.1rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.text-link {
    display: inline-flex;
    margin-top: 2rem;
    padding-bottom: 0.2rem;
    font-weight: 800;
    border-bottom: 1px solid currentColor;
}

.newsletter-form {
    display: flex;
    width: min(100%, 560px);
    margin-top: 2rem;
    gap: 0.7rem;
}

.newsletter-form input,
.contact-form input,
.contact-form textarea {
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 1rem;
    color: var(--ink);
    background: rgba(255, 250, 241, 0.9);
    border: 1px solid rgba(22, 23, 22, 0.24);
    border-radius: 4px;
    outline: none;
}

.newsletter-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--clay);
    box-shadow: 0 0 0 3px rgba(167, 95, 70, 0.18);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0.9rem 1.2rem;
    color: var(--cream);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 4px;
}

.button:hover,
.button:focus-visible {
    background: var(--clay);
    border-color: var(--clay);
}

.page-hero,
.connect-hero {
    padding: calc(var(--header-height) + 5rem) 0 5rem;
    background: var(--paper);
}

.page-hero__inner,
.content-section__inner,
.journal-list__inner,
.connect-hero__inner,
.newsletter-band__inner,
.site-footer__inner {
    width: min(100% - 32px, 1160px);
    margin: 0 auto;
}

.page-hero p {
    max-width: 720px;
    font-size: 1.2rem;
}

.content-section {
    padding: 4rem 0 6rem;
    background: var(--cream);
}

.prose {
    max-width: 760px;
}

.prose h2,
.journal-card h2,
.newsletter-band h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 400;
    line-height: 1.05;
}

.prose p {
    font-size: 1.08rem;
}

.connect-hero {
    min-height: calc(100svh - var(--header-height));
    display: grid;
    align-items: center;
}

.connect-hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.connect-copy p:not(.eyebrow) {
    max-width: 650px;
    font-size: 1.16rem;
}

.contact-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 2rem;
}

.contact-list a {
    width: fit-content;
    border-bottom: 1px solid currentColor;
}

.connect-panel {
    padding: clamp(1.25rem, 3vw, 2rem);
    background: var(--cream);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form label {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
}

.contact-form textarea {
    resize: vertical;
}

.notice {
    padding: 0.9rem 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.notice--success {
    color: #103524;
    background: #dcefe2;
}

.notice--error {
    color: #5f1f16;
    background: #f4d8d1;
}

.newsletter-band {
    padding: 4rem 0;
    color: var(--cream);
    background: var(--sage);
}

.newsletter-band__inner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.journal-list {
    padding: 4rem 0 7rem;
    background: var(--cream);
}

.journal-list__inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.journal-card a,
.journal-card--placeholder {
    display: grid;
    min-height: 280px;
    padding: 1.5rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.journal-card p:last-child {
    align-self: end;
}

.site-footer {
    padding: 2rem 0;
    color: var(--cream);
    background: var(--ink);
}

.site-footer__inner,
.site-footer__links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer p {
    margin: 0;
}

.site-footer__links a {
    border-bottom: 1px solid rgba(255, 250, 241, 0.44);
}

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
        position: relative;
        z-index: 111;
    }

    .primary-nav {
        position: fixed;
        inset: 0;
        z-index: 110;
        display: none;
        padding: calc(var(--header-height) + 2rem) 1.5rem 2rem;
        color: var(--cream);
        background: rgba(22, 23, 22, 0.96);
    }

    .home .primary-nav {
        color: var(--cream);
        background: rgba(22, 23, 22, 0.96);
    }

    .home .site-header__inner {
        width: min(100% - 32px, 1280px);
    }

    body.nav-open .primary-nav {
        display: block;
    }

    .primary-nav .menu {
        display: grid;
        gap: 0.5rem;
    }

    .primary-nav a {
        min-height: 58px;
        font-size: 1.1rem;
    }

    .story-section__content h1,
    .page-hero h1,
    .connect-copy h1 {
        font-size: clamp(2.7rem, 15vw, 5rem);
    }

    .connect-hero__inner,
    .journal-list__inner {
        grid-template-columns: 1fr;
    }

    .newsletter-band__inner,
    .site-footer__inner,
    .site-footer__links {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    :root {
        --header-height: 68px;
    }

    .site-header__inner {
        width: min(100% - 24px, 1280px);
    }

    .brand__text {
        font-size: 0.75rem;
    }

    .story-section__content {
        width: min(100% - 24px, 1160px);
        padding-bottom: 3rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .page-hero__inner,
    .content-section__inner,
    .journal-list__inner,
    .connect-hero__inner,
    .newsletter-band__inner,
    .site-footer__inner {
        width: min(100% - 24px, 1160px);
    }
}
