:root {
    color-scheme: light;
    --background: #e8e1d0;
    --surface: #f5f1e8;
    --ink: #172a2e;
    --green: #4a6b53;
    --copper: #b56545;
    --border: rgba(23, 42, 46, 0.22);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: "IBM Plex Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration-color: var(--copper);
    text-decoration-thickness: 0.12em;
    text-underline-offset: 0.22em;
}

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

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--copper);
    outline-offset: 4px;
}

.shell {
    width: min(72rem, calc(100% - 2.5rem));
    margin-inline: auto;
}

.site-header {
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 5rem;
    gap: 2rem;
}

.site-identity {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.site-name {
    flex: none;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
    text-decoration: none;
}

.experiment-identity {
    min-width: 0;
    margin-left: 1.25rem;
    padding-left: 1.25rem;
    border-left: 1px solid var(--border);
}

.experiment-subtitle {
    margin: 0;
    max-width: 35rem;
    color: var(--green);
    font-size: 0.75rem;
    line-height: 1.35;
}

.desktop-navigation {
    flex: none;
}

.nav-list,
.text-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.75rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-list {
    align-items: center;
}

.nav-list a,
.menu-button,
.hamburger-button {
    font: inherit;
    font-weight: 600;
}

.nav-list a {
    text-decoration: none;
}

.menu-button,
.hamburger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    border: 1px solid #a97861;
    border-radius: 0.35rem;
    padding: 0.45rem 0.85rem;
    background: #d8c4b3;
    color: #172a2e;
    line-height: 1.2;
    appearance: none;
    cursor: pointer;
}

.menu-button:hover,
.hamburger-button:hover,
.menu-button[aria-expanded="true"],
.hamburger-button[aria-expanded="true"] {
    background: #cdb09c;
    color: #172a2e;
}

.resources-menu,
.mobile-navigation {
    position: relative;
}

.resources-dropdown {
    position: absolute;
    z-index: 10;
    top: calc(100% + 0.8rem);
    right: 0;
    width: max-content;
    min-width: 14rem;
    max-width: min(22rem, calc(100vw - 2.5rem));
    margin: 0;
    padding: 0.65rem;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 0.75rem 2rem rgba(23, 42, 46, 0.12);
    list-style: none;
}

.resources-dropdown a {
    display: block;
    padding: 0.55rem 0.75rem;
    overflow-wrap: anywhere;
}

[data-menu-panel][hidden] {
    display: none;
}

.mobile-navigation {
    display: none;
}

.hamburger-button {
    gap: 0.65rem;
}

.hamburger-icon {
    display: grid;
    gap: 0.22rem;
    width: 1.25rem;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    background: currentColor;
}

.mobile-menu {
    position: absolute;
    z-index: 10;
    top: calc(100% + 1rem);
    right: 0;
    width: min(22rem, calc(100vw - 2.5rem));
    padding: 1.25rem;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 0.75rem 2rem rgba(23, 42, 46, 0.12);
}

.mobile-primary-links,
.mobile-resource-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mobile-menu a {
    display: block;
    padding: 0.45rem 0;
    overflow-wrap: anywhere;
}

.mobile-primary-links a {
    font-weight: 600;
}

.mobile-resources-label {
    margin: 1rem 0 0.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

main > section {
    padding-block: clamp(2.75rem, 6vw, 5.5rem);
}

main > section + section {
    border-top: 1px solid var(--border);
}

.intro-section {
    min-height: min(42rem, 72vh);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.intro-content {
    max-width: 48rem;
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--green);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

h1,
h2 {
    max-width: 14ch;
    margin: 0;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

h1 {
    font-size: clamp(2.75rem, 8vw, 6.5rem);
}

.experiment-title {
    max-width: none;
    margin: 0 0 2rem;
    font-size: clamp(1.8rem, 2vw + 1rem, 3.1rem);
    line-height: 1.35;
    letter-spacing: -0.03em;
}

.experiment-title em {
    font-style: italic;
    font-weight: inherit;
}

.experiment-title span {
    font-style: normal;
    font-weight: inherit;
}

.home-intro-title {
    max-width: none;
    font-size: clamp(1.75rem, 2.6vw, 2.5rem);
    line-height: 1.15;
    white-space: nowrap;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.75rem);
}

.placeholder {
    max-width: 40rem;
    margin: 1.5rem 0 2rem;
    color: #31464a;
}

.intro-copy {
    margin-top: 1.5rem;
}

.intro-copy p {
    margin: 0;
}

.intro-copy p + p {
    margin-top: 1.25rem;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2.5rem;
}

.resource-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 600;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.resource-card:hover {
    border-color: var(--green);
}

.messenger-status {
    display: block;
    margin: 0.65rem 0 0;
    color: var(--green);
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.45;
}

.messenger-page {
    max-width: 48rem;
}

.messenger-page h1 {
    max-width: none;
    font-size: clamp(2.25rem, 5vw, 4.5rem);
}

.messenger-copy {
    margin-top: 1.75rem;
}

.messenger-copy p {
    margin: 0;
}

.messenger-copy p + p {
    margin-top: 1.25rem;
}

.back-link {
    display: inline-block;
    margin-top: 1rem;
}

.site-footer {
    padding-block: 2rem;
    border-top: 1px solid var(--border);
    color: var(--green);
    font-size: 0.875rem;
}

@media (max-width: 64rem) {
    .desktop-navigation {
        display: none;
    }

    .mobile-navigation {
        display: block;
        flex: none;
    }
}

@media (max-width: 48rem) {
    .home-intro-title {
        white-space: normal;
    }

    .header-inner {
        position: relative;
        min-height: 5rem;
        padding-right: 6.5rem;
        gap: 1rem;
    }

    .site-identity {
        overflow: hidden;
        padding-block: 0.75rem;
    }

    .mobile-navigation {
        position: absolute;
        right: 0;
    }

    .resource-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 36rem) {
    .experiment-identity {
        display: none;
    }
}

@media (min-width: 58rem) {
    /* The final card spans the row to keep the five-item grid balanced. */
    .resource-card:last-child {
        grid-column: span 2;
    }
}
