:root {
    --public-nav-offset: 111px;
}

.site-header {
    --header-ink: #302824;
    --header-text: #574b44;
    --header-brand: #493a32;
    --header-accent: #d9a441;
    --header-line: #e9e2dc;
    --header-hover: #f7f3ef;
    --header-gutter: clamp(16px, 3vw, 36px);
    --header-width: 1280px;
    position: fixed;
    inset: 0 0 auto;
    z-index: 1030;
    background: #fff;
    border-bottom: 1px solid var(--header-line);
    box-shadow: 0 4px 18px rgba(48, 40, 36, .08);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.site-header-inner,
.site-utility-inner {
    display: flex;
    align-items: center;
    max-width: var(--header-width);
    margin-inline: auto;
    padding-inline: var(--header-gutter);
}

.site-header-inner {
    justify-content: space-between;
    gap: clamp(14px, 2vw, 30px);
    min-height: 76px;
    padding-block: 8px;
}

.site-header .site-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: var(--header-ink);
    text-decoration: none;
}

.site-brand-logo {
    flex: 0 0 auto;
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.site-brand-name {
    display: block;
    margin-bottom: 4px;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .035em;
}

.site-brand-expansion {
    display: block;
    max-width: 230px;
    color: var(--header-text);
    font-size: .75rem;
    font-weight: 500;
    line-height: 1.25;
}

.site-header-panel {
    flex: 1;
    min-width: 0;
}

.site-utility-inner {
    gap: 12px;
    min-height: 34px;
}

.site-header .site-header-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    font-size: .8125rem;
    font-weight: 500;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.site-header .site-header-email:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-social-links {
    display: flex;
    gap: 4px;
    margin-inline-start: auto;
}

.site-header .site-social-link {
    display: grid;
    place-items: center;
    width: 32px;
    height: 30px;
    border-radius: 4px;
    color: inherit;
    font-size: .875rem;
    text-decoration: none;
}

.site-header .site-social-link:hover {
    color: var(--header-ink);
    background: #f0d59b;
}

.site-nav-panel,
.site-nav-list {
    display: flex;
    align-items: center;
}

.site-nav-panel {
    justify-content: space-between;
    gap: clamp(14px, 2vw, 26px);
}

.site-nav-list,
.site-nav-submenu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav-list {
    gap: 2px;
    margin-inline: auto;
}

.site-header .site-nav-link,
.site-header .site-nav-donate,
.site-menu-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    border-radius: 6px;
    font-size: .9375rem;
    font-weight: 650;
    line-height: 1.25;
    text-decoration: none;
}

.site-header .site-nav-link {
    gap: 8px;
    padding-inline: clamp(8px, 1vw, 14px);
    color: var(--header-text);
    white-space: nowrap;
}

.site-header .site-nav-link:hover,
.site-header .site-nav-link.is-current,
.site-header .site-nav-dropdown[open] > .site-nav-link {
    color: var(--header-ink);
    background: var(--header-hover);
}

.site-header .site-nav-link.is-current {
    box-shadow: inset 0 -2px var(--header-accent);
}

.site-nav-dropdown {
    position: relative;
}

.site-nav-dropdown > summary {
    cursor: pointer;
    list-style: none;
}

.site-nav-dropdown > summary::-webkit-details-marker {
    display: none;
}

.site-nav-chevron {
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg);
}

.site-nav-dropdown[open] .site-nav-chevron {
    margin-top: 3px;
    transform: rotate(225deg);
}

.site-nav-submenu {
    position: absolute;
    inset-block-start: calc(100% + 9px);
    inset-inline-start: 0;
    min-width: 180px;
    padding: 6px;
    border: 1px solid var(--header-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(48, 40, 36, .15);
}

.site-header .site-nav-submenu .site-nav-link {
    display: flex;
}

.site-header .site-nav-donate {
    justify-content: center;
    padding-inline: 22px;
    color: var(--header-ink);
    background: var(--header-accent);
    font-weight: 750;
}

.site-header .site-nav-donate:hover {
    color: var(--header-ink);
    background: #e7b95e;
}

.site-header :is(a, button, summary):focus-visible {
    outline: 2px solid #9a6b20;
    outline-offset: 2px;
}

.site-menu-toggle {
    display: none;
}

.public-navbar + .carousel {
    margin-top: var(--public-nav-offset);
}

.public-navbar + .carousel .carousel-item {
    height: calc(100vh - var(--public-nav-offset));
}

@media (min-width: 1024px) {
    .site-header.has-utility {
        padding-top: 34px;
    }

    .site-header-utility {
        position: absolute;
        inset: 0 0 auto;
        color: #fff;
        background: var(--header-brand);
    }

    .site-header-utility a:focus-visible {
        outline-color: #f0d59b;
    }

    .site-nav-submenu::before {
        position: absolute;
        inset-block-end: 100%;
        inset-inline: 0;
        height: 10px;
        content: "";
    }
}

@media (max-width: 1023.98px) {
    :root {
        --public-nav-offset: 73px;
    }

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

    .site-brand-logo {
        width: 46px;
        height: 46px;
    }

    .site-brand-name {
        font-size: 1.2rem;
    }

    .site-brand-expansion {
        max-width: 185px;
        font-size: .71875rem;
    }

    .site-menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
        gap: 8px;
        padding: 0 12px;
        border: 1px solid var(--header-line);
        color: var(--header-ink);
        background: #fff;
        cursor: pointer;
    }

    .site-menu-toggle:hover,
    .site-menu-toggle[aria-expanded="true"] {
        background: var(--header-hover);
    }

    .site-menu-icon {
        position: relative;
        width: 15px;
        height: 12px;
        background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat;
    }

    .site-menu-icon::before,
    .site-menu-icon::after {
        position: absolute;
        inset-inline: 0;
        height: 2px;
        border-radius: 1px;
        background: currentColor;
        content: "";
    }

    .site-menu-icon::before { top: 0; }
    .site-menu-icon::after { bottom: 0; }
    .site-menu-toggle[aria-expanded="true"] .site-menu-icon { background: none; }
    .site-menu-toggle[aria-expanded="true"] .site-menu-icon::before { top: 5px; transform: rotate(45deg); }
    .site-menu-toggle[aria-expanded="true"] .site-menu-icon::after { bottom: 5px; transform: rotate(-45deg); }

    .site-header-panel {
        position: absolute;
        inset: 100% 0 auto;
        display: none;
        max-height: calc(100vh - var(--public-nav-offset));
        max-height: calc(100dvh - var(--public-nav-offset));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 10px var(--header-gutter) 16px;
        border-top: 1px solid var(--header-line);
        background: #fff;
        box-shadow: 0 12px 30px rgba(48, 40, 36, .14);
    }

    .site-menu-toggle[aria-expanded="true"] + .site-header-panel,
    .site-nav-panel {
        display: block;
    }

    .site-nav-list {
        display: grid;
        gap: 2px;
    }

    .site-header .site-nav-link {
        display: flex;
        justify-content: space-between;
        min-height: 46px;
        padding-inline: 12px;
        font-size: 1rem;
    }

    .site-header .site-nav-link.is-current {
        box-shadow: inset 3px 0 var(--header-accent);
    }

    .site-nav-submenu {
        position: static;
        margin: 2px 0 6px 12px;
        padding: 0 0 0 8px;
        border: 0;
        border-inline-start: 1px solid var(--header-line);
        border-radius: 0;
        box-shadow: none;
    }

    .site-header .site-nav-donate {
        width: 100%;
        margin-top: 10px;
    }

    .site-header-utility {
        margin-top: 16px;
        padding-top: 12px;
        border-top: 1px solid var(--header-line);
        color: var(--header-text);
    }

    .site-utility-inner {
        flex-wrap: wrap;
        padding-inline: 0;
    }

    .site-header .site-header-email {
        min-height: 44px;
    }

    .site-header .site-social-link {
        width: 44px;
        height: 44px;
        background: var(--header-hover);
    }
}

@media (max-width: 359.98px) {
    .site-header {
        --header-gutter: 12px;
    }

    .site-utility-inner {
        gap: 6px;
    }

    .site-social-links {
        margin-inline-start: 0;
    }
}
