/* shared public navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: rgb(255 255 255 / 96%);
    backdrop-filter: blur(12px);
}

.site-header-inner {
    width: min(1520px, 100%);
    height: 64px;
    margin: auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    font-size: 19px;
    font-weight: 900;
    text-decoration: none;
    text-transform: lowercase;
}

.site-header .brand img {
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
}

.brand-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    transform: rotate(45deg);
}

.brand-icon + span {
    transform: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-nav > a,
.site-dropdown > summary {
    min-height: 64px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    list-style: none;
    color: var(--deep);
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    text-transform: lowercase;
}

.site-nav > a:hover,
.site-dropdown > summary:hover,
.site-dropdown:focus-within > summary {
    color: var(--brand);
}

.site-dropdown {
    position: relative;
}

.site-dropdown > summary {
    position: relative;
    padding-right: 14px;
}

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

.site-dropdown > summary::marker {
    content: '';
}

.site-dropdown > summary::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 1px;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transform-origin: 50% 50%;
    transition: transform .18s ease;
}

.site-dropdown:hover > summary::after,
.site-dropdown:focus-within > summary::after {
    transform: translateY(-25%) rotate(225deg);
}

.site-dropdown > div {
    position: absolute;
    top: calc(100% - 1px);
    left: 50%;
    width: 230px;
    transform: translateX(-50%) translateY(8px);
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.site-dropdown:hover > div,
.site-dropdown:focus-within > div {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.site-dropdown div a {
    padding: 10px 12px;
    border-radius: 5px;
    color: var(--deep);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    text-transform: lowercase;
}

.site-dropdown div a:hover {
    background: var(--surface);
    color: var(--brand);
}

.site-nav-cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--brand);
    color: #fff !important;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 900;
    text-decoration: none;
    text-transform: lowercase;
}

.site-menu-button,
.site-mobile-menu {
    display: none;
}

@media (min-width: 1024px) {
    .site-header .brand img {
        max-width: 180px;
        max-height: 38px;
    }
}

@media (max-width: 1023px) {
    .site-header-inner {
        position: relative;
        height: 76px;
        padding: 0 18px;
        gap: 14px;
    }

    .site-header .brand {
        min-width: 0;
    }

    .site-header .brand img {
        max-width: min(140px, 46vw);
        max-height: 34px;
    }

    .site-nav,
    .site-account {
        display: none;
    }

    .site-menu-button {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: 1px solid #d7dde6;
        border-radius: 8px;
        background: #fff;
        padding: 10px;
        box-shadow: 0 2px 8px rgb(24 49 83 / 6%);
        color: var(--deep);
        cursor: pointer;
        transition: border-color .18s ease, box-shadow .18s ease, color .18s ease;
    }

    .site-menu-button[aria-expanded="true"] {
        border-color: rgb(34 197 94 / 42%);
        box-shadow: 0 0 0 3px rgb(34 197 94 / 12%);
        color: var(--green);
    }

    .site-menu-button span {
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: currentColor;
    }

    .site-mobile-menu {
        width: calc(100% - 32px);
        margin: 0 16px 14px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 18px 40px rgb(24 49 83 / 12%);
    }

    .site-mobile-menu:not([hidden]) {
        display: grid;
        gap: 8px;
    }

    .site-mobile-menu a {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
        border: 1px solid #e7ebf0;
        border-radius: 8px;
        background: #f9fafb;
        color: var(--deep) !important;
        font-size: 15px;
        font-weight: 900;
        text-decoration: none;
        text-transform: lowercase;
    }

    .site-mobile-menu a::after {
        content: '';
        width: 7px;
        height: 7px;
        border-right: 2px solid currentColor;
        border-bottom: 2px solid currentColor;
        opacity: .45;
        transform: rotate(-45deg);
    }

    .site-mobile-menu a:hover,
    .site-mobile-menu a:focus {
        border-color: rgb(34 197 94 / 45%);
        background: #f1fbf5;
        color: var(--green) !important;
    }

    .site-mobile-menu .site-nav-cta {
        border-color: var(--green);
        background: var(--green);
        color: #fff !important;
    }

    .site-mobile-menu .site-nav-cta:hover,
    .site-mobile-menu .site-nav-cta:focus {
        background: #16a34a;
        color: #fff !important;
    }
}

@media (max-width: 430px) {
    .site-header-inner {
        padding: 0 14px;
    }

    .site-mobile-menu {
        width: calc(100% - 24px);
        margin-inline: 12px;
    }

    .site-header .brand img {
        max-width: min(130px, 44vw);
        max-height: 32px;
    }
}
