:root {
    --bg: #F7F4EF;
    --surface: #FFFDF7;
    --surface-muted: #DFE8DC;
    --surface-elevated: rgba(255, 253, 247, .94);
    --text: #1B1D18;
    --muted: #5F665D;
    --line: #DFD4C3;
    --brand: #245A3B;
    --brand-strong: #183923;
    --brand-soft: #DFE8DC;
    --accent: #C86138;
    --accent-strong: #A64F31;
    --accent-soft: #FFF8EC;
    --cream: #FFF8EC;
    --primary: #245A3B;
    --primary-strong: #183923;
    --danger: #A64F31;
    --focus: #245A3B;
    --shadow-soft: 0 12px 32px rgba(27, 29, 24, .08);
    --radius: 8px;
    --tap-size: 44px;
    --page-max: 1680px;
    --page-gutter: max(clamp(14px, 2vw, 32px), env(safe-area-inset-left), env(safe-area-inset-right));
    --space-1: .25rem;
    --space-2: .5rem;
    --space-3: .75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

a {
    color: var(--primary);
    text-decoration: none;
    overflow-wrap: anywhere;
}

a:hover {
    text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
    outline-offset: 2px;
}

h1,
h2,
h3,
p,
dl {
    margin-block-start: 0;
}

h1 {
    font-size: clamp(1.6rem, 5vw, 2.25rem);
    line-height: 1.15;
}

h2 {
    font-size: clamp(1.15rem, 4vw, 1.4rem);
    line-height: 1.25;
}

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

.page-shell {
    min-height: calc(100svh - 76px);
    margin-block: clamp(16px, 4vw, 32px);
}

.brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: var(--tap-size);
    color: var(--accent-strong);
    font-weight: 900;
    letter-spacing: 0;
}

.brand:hover {
    text-decoration: none;
}

.heop-logo {
    display: block;
    width: clamp(116px, 24vw, 150px);
    height: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.nav-form,
.main-nav form {
    display: contents;
}

.nav-menu,
.nav-link {
    flex: 0 0 auto;
}

.nav-menu {
    position: relative;
    display: inline-flex;
}

.nav-summary,
.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap-size);
    max-width: 100%;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: color-mix(in srgb, var(--text) 88%, var(--brand));
    font-weight: 750;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
}

.nav-summary {
    gap: 8px;
    padding: 0 12px;
    list-style: none;
}

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

.nav-summary::after {
    content: "";
    width: 0;
    height: 0;
    border-inline: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 160ms ease;
}

.nav-menu[open] .nav-summary::after {
    transform: rotate(180deg);
}

.nav-link {
    padding: 0 12px;
}

.nav-link:hover,
.nav-summary:hover,
.nav-link.is-active,
.nav-summary.is-active {
    border-color: var(--line);
    background: var(--surface);
    color: var(--brand-strong);
    text-decoration: none;
}

.nav-link-primary {
    border-color: var(--accent);
    background: var(--accent);
    color: #FFFDF7;
    box-shadow: 0 8px 18px rgba(200, 97, 56, .18);
}

.nav-link-primary:hover {
    border-color: var(--accent-strong);
    background: var(--accent-strong);
    color: #FFFDF7;
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 60;
    display: grid;
    gap: 4px;
    min-width: min(220px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 8px 0 rgba(223, 212, 195, .72);
}

.nav-link-sub {
    justify-content: flex-start;
    width: 100%;
}

.container {
    width: min(var(--page-max), 100%);
    margin-inline: auto;
}

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

@media (min-width: 720px) {
    .main-nav {
        justify-content: flex-end;
    }

    .nav-submenu {
        right: 0;
        left: auto;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    .page-shell {
        margin-block: 12px;
    }
}

.site-footer {
    padding: 10px var(--page-gutter) calc(12px + var(--hp-bottom-nav-height, 0px) + env(safe-area-inset-bottom));
    background: #F7F4EF;
}

.site-footer__card {
    display: grid;
    gap: 8px;
    width: min(var(--page-max), 100%);
    margin-inline: auto;
    padding: 10px 12px;
    border: 1px solid rgba(223, 212, 195, .72);
    border-radius: 12px;
    color: var(--text);
    background: rgba(255, 253, 247, .86);
    box-shadow: none;
}

.site-footer__identity {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.site-footer__links,
.site-footer__bottom {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: var(--cream);
    font-weight: 900;
}

.site-footer__brand .heop-logo {
    width: 60px;
}

.site-footer__brand:hover {
    text-decoration: none;
}

.site-footer__identity p,
.site-footer__bottom,
.site-footer__links a,
.site-footer__bottom a {
    color: #596157;
    margin: 0;
    font-size: .6rem;
    font-weight: 700;
    line-height: 1.18;
}

.site-footer__identity p {
    max-width: 24ch;
    color: #596157;
    font-size: .58rem;
    font-weight: 820;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-footer__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px 14px;
    padding-block: 8px;
    border-block: 1px solid rgba(223, 212, 195, .56);
}

.site-footer__links a {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    min-height: 24px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #596157;
    font-size: .6rem;
    font-weight: 860;
    line-height: 1.1;
    text-decoration: none;
}

.site-footer__links a::after {
    color: rgba(89, 97, 87, .55);
    content: "›";
    font-size: .72rem;
    line-height: 1;
}

.site-footer__bottom a {
    color: #596157;
    font-size: .56rem;
    font-weight: 820;
    line-height: 1.1;
    text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__bottom a:hover {
    color: var(--brand);
    text-decoration: none;
}

.site-footer__bottom {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    color: #737A72;
    gap: 4px 8px;
    padding-top: 0;
}

.site-footer__bottom > span:first-child {
    color: #596157;
    font-size: .56rem;
    font-weight: 900;
    white-space: nowrap;
}

.site-footer__legal {
    justify-self: end;
    min-width: 0;
    max-width: 31ch;
    color: #737A72;
    font-size: .52rem;
    font-weight: 760;
    line-height: 1.13;
    text-align: right;
}

.site-footer__bottom nav {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0 7px;
    padding-top: 3px;
}

.site-footer__bottom nav a {
    width: auto;
    min-height: auto;
}

.site-footer__bottom nav a + a::before {
    display: inline-block;
    margin-right: 8px;
    color: rgba(89, 97, 87, .55);
    content: "/";
}

@media (min-width: 720px) {
    .site-footer {
        padding: 10px var(--page-gutter) calc(12px + var(--hp-bottom-nav-height, 0px) + env(safe-area-inset-bottom));
    }

    .site-footer__card {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 6px 16px;
        padding: 10px 14px;
    }

    .site-footer__identity {
        grid-column: 1;
        align-content: center;
        gap: 8px;
        justify-content: flex-start;
    }

    .site-footer__identity p {
        max-width: 20ch;
        text-align: left;
    }

    .site-footer__links {
        grid-column: 2;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        padding-block: 0;
        border: 0;
    }

    .site-footer__links a,
    .site-footer__bottom a {
        min-height: 20px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        font-size: .66rem;
        line-height: 1.1;
    }

    .site-footer__links a::after {
        display: none;
    }

    .site-footer__bottom {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding-top: 6px;
        border-top: 1px solid rgba(223, 212, 195, .52);
    }

    .site-footer__bottom nav {
        gap: 2px 10px;
    }

    .site-footer__bottom nav a + a::before {
        display: none;
    }

    .site-footer__legal {
        flex: 1 1 auto;
        max-width: none;
        min-width: 240px;
        text-align: center;
    }
}

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