.hnia-site-header {
    --header-progress: 0;
    --header-effective-progress: var(--header-progress);

    position: fixed;
    top: 0;
    left: 0;

    z-index: 1000;

    width: 100%;

    padding:
        calc(var(--header-effective-progress) * 14px)
        calc(5vw + (var(--header-effective-progress) * 10px))
        0;

    pointer-events: none;
}


/* Hero pages */

.hnia-site-header--overlay {
    --header-effective-progress:
        var(--header-progress);
}


/* Pages without hero */

.hnia-site-header--solid {
    --header-effective-progress: 1;
}

.hnia-site-header__shell {
    width: 100%;

    max-width:
        calc(
            100vw
            - (var(--header-effective-progress) * 300px)
        );

    min-height:
        calc(
            88px
            - (var(--header-effective-progress) * 20px)
        );

    margin: 0 auto;

    border:
        1px solid
        rgba(
            255,
            255,
            255,
            calc(var(--header-effective-progress) * 0.12)
        );

    border-radius:
        calc(
            var(--header-effective-progress) * 24px
        );

    background:
        rgba(
            18,
            12,
            9,
            calc(var(--header-effective-progress) * 0.94)
        );

    box-shadow:
        0
        calc(var(--header-effective-progress) * 18px)
        calc(var(--header-effective-progress) * 55px)
        rgba(
            0,
            0,
            0,
            calc(var(--header-effective-progress) * 0.24)
        );

    color: #fffdf9;

    pointer-events: auto;

    transition:
        background-color 180ms ease,
        border-color 180ms ease;
}

.hnia-site-header__inner {
    min-height: inherit;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    gap:
        calc(
            40px
            - (var(--header-effective-progress) * 8px)
        );

    padding:
        0
        calc(
            5vw
            - (var(--header-effective-progress) * 2vw)
        );
}


/* =========================================================
   BRAND LOCKUP
========================================================= */

.hnia-site-header__brand {
    justify-self: start;

    display: inline-flex;
    align-items: center;

    gap:
        calc(
            11px
            - (var(--header-effective-progress) * 2px)
        );

    color: inherit;

    text-decoration: none;

    white-space: nowrap;

    transition:
        color 300ms ease,
        opacity 300ms ease;
}


/* MONOGRAM */

.hnia-site-header__monogram {
    display: block;

    width:
        calc(
            26px
            - (var(--header-effective-progress) * 3px)
        );

    height:
        calc(
            26px
            - (var(--header-effective-progress) * 3px)
        );

    object-fit: contain;

    flex-shrink: 0;
}

.hnia-site-header__brand-name {
    transition:
        color 280ms ease;
}

.hnia-site-header__brand:hover
.hnia-site-header__brand-name {
    color: #c18b58;
}


/* BRAND NAME */

.hnia-site-header__brand-name {
    display: block;

    font-family:
        "Cormorant Garamond",
        Georgia,
        serif;

    font-size:
        calc(
            22px
            - (var(--header-effective-progress) * 1px)
        );

    font-weight: 500;

    line-height: 1;

    letter-spacing: .075em;
}


/* NAV */

.hnia-site-header__nav {
    display: flex;
    align-items: center;
    justify-content: center;

    gap:
        calc(
            34px
            - (var(--header-effective-progress) * 6px)
        );
}

.hnia-site-header__nav a {
    position: relative;

    padding: 10px 0;

    color: rgba(255, 253, 249, 0.74);

    font-family: "Manrope", Arial, sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;

    letter-spacing: 0.14em;
    text-transform: uppercase;

    text-decoration: none;

    transition:
        color 280ms ease,
        transform 280ms ease;
}

.hnia-site-header__nav a::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;

    height: 1px;

    background: #c18b58;

    transform: scaleX(0);
    transform-origin: right center;

    transition:
        transform 350ms cubic-bezier(.16, 1, .3, 1);
}

.hnia-site-header__nav a:hover {
    color: #fffdf9;
    transform: translateY(-1px);
}

.hnia-site-header__nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
}


/* ACTIONS */

.hnia-site-header__actions {
    justify-self: end;

    display: flex;
    align-items: center;

    gap:
        calc(
            20px
            - (var(--header-effective-progress) * 4px)
        );
}

.hnia-header-action {
    position: relative;

    display: grid;
    place-items: center;

    width: 24px;
    height: 24px;

    padding: 0;

    border: 0;
    background: transparent;

    color: #fffdf9;

    text-decoration: none;
    cursor: pointer;

    transition:
        color 250ms ease,
        transform 250ms ease;
}

.hnia-header-action:hover {
    color: #d0a06d;
    transform: translateY(-1px);
}

.hnia-header-action svg {
    width: 19px;
    height: 19px;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hnia-cart-count {
    position: absolute;

    top: -6px;
    right: -8px;

    min-width: 15px;
    height: 15px;

    padding: 0 4px;

    display: grid;
    place-items: center;

    border-radius: 999px;

    background: #c18b58;
    color: #fffdf9;

    font-size: 8px;
    line-height: 1;
}

/* =========================================================
   MOBILE HEADER / NAVIGATION
========================================================= */

.hnia-mobile-menu-toggle,
.hnia-mobile-menu {
    display: none;
}

@media (max-width: 900px) {
    body.hnia-mobile-menu-open {
        overflow: hidden;
    }

    .hnia-site-header {
        --header-effective-progress: 1;

        padding: 10px 12px 0;
    }

    body.admin-bar .hnia-site-header {
        top: 46px;
    }

    .hnia-site-header__shell {
        max-width: none;
        min-height: 62px;

        border-radius: 18px;

        background: rgba(18, 12, 9, .96);
        border-color: rgba(255, 255, 255, .10);
        box-shadow: 0 16px 40px rgba(0, 0, 0, .20);
    }

    .hnia-site-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;

        min-height: 62px;
        padding: 0 14px 0 16px;
    }

    .hnia-site-header__brand {
        min-width: 0;
        gap: 8px;
    }

    .hnia-site-header__monogram {
        width: 22px;
        height: 22px;
    }

    .hnia-site-header__brand-name {
        overflow: hidden;
        text-overflow: ellipsis;

        font-size: 18px;
        letter-spacing: .055em;
        white-space: nowrap;
    }

    .hnia-site-header__nav {
        display: none;
    }

    .hnia-site-header__actions {
        gap: 6px;
    }

    .hnia-header-action,
    .hnia-mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }

    .hnia-header-action svg {
        width: 18px;
        height: 18px;
    }

    .hnia-cart-count {
        top: 3px;
        right: 2px;
    }

    .hnia-mobile-menu-toggle {
        position: relative;

        display: grid;
        place-items: center;

        padding: 0;
        border: 0;
        border-radius: 999px;

        background: transparent;
        color: #fffdf9;
        cursor: pointer;
    }

    .hnia-mobile-menu-toggle span {
        position: absolute;

        width: 18px;
        height: 1px;

        background: currentColor;

        transition:
            transform 300ms cubic-bezier(.16,1,.3,1),
            top 300ms cubic-bezier(.16,1,.3,1),
            opacity 200ms ease;
    }

    .hnia-mobile-menu-toggle span:first-child {
        top: 16px;
    }

    .hnia-mobile-menu-toggle span:last-child {
        top: 23px;
    }

    .hnia-site-header.is-mobile-menu-open
    .hnia-mobile-menu-toggle span:first-child {
        top: 20px;
        transform: rotate(45deg);
    }

    .hnia-site-header.is-mobile-menu-open
    .hnia-mobile-menu-toggle span:last-child {
        top: 20px;
        transform: rotate(-45deg);
    }

    .hnia-mobile-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;

        display: grid;
        grid-template-rows: repeat(4, auto);

        padding: 10px 18px 16px;

        border: 1px solid rgba(255,255,255,.10);
        border-radius: 18px;

        background: rgba(18, 12, 9, .985);
        box-shadow: 0 26px 70px rgba(0, 0, 0, .28);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-8px) scale(.985);
        transform-origin: top center;

        transition:
            opacity 220ms ease,
            visibility 220ms ease,
            transform 320ms cubic-bezier(.16,1,.3,1);
    }

    .hnia-site-header.is-mobile-menu-open
    .hnia-mobile-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0) scale(1);
    }

    .hnia-mobile-menu a {
        display: flex;
        align-items: center;
        justify-content: space-between;

        min-height: 52px;
        padding: 0 2px;

        border-bottom: 1px solid rgba(255,255,255,.08);

        color: #fffdf9;

        font-family: "Manrope", Arial, sans-serif;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .13em;
        text-transform: uppercase;
        text-decoration: none;
    }

    .hnia-mobile-menu a::after {
        content: ">";

        color: #c18b58;
        font-size: 13px;
        font-weight: 400;
    }

    .hnia-mobile-menu a:last-child {
        border-bottom: 0;
    }
}

@media (min-width: 783px) and (max-width: 900px) {
    body.admin-bar .hnia-site-header {
        top: 32px;
    }
}

@media (max-width: 390px) {
    .hnia-site-header__brand-name {
        font-size: 16px;
        letter-spacing: .04em;
    }

    .hnia-site-header__inner {
        padding-left: 13px;
        padding-right: 8px;
    }

    .hnia-header-action,
    .hnia-mobile-menu-toggle {
        width: 38px;
        height: 38px;
    }
}


/* =========================================================
   1.0.8 — MOBILE HEADER HARDENING
   Keep desktop clean; make real-phone layout deterministic.
========================================================= */

/* Never expose mobile controls on desktop, even if a plugin/global
   button rule tries to override our component styles. */
@media (min-width: 901px) {
    .hnia-mobile-menu-toggle,
    .hnia-mobile-menu {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .hnia-site-header {
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        padding: 10px 10px 0 !important;
        box-sizing: border-box !important;
    }

    .hnia-site-header__shell {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        min-height: 60px !important;
        margin: 0 !important;
        border-radius: 18px !important;
        box-sizing: border-box !important;
    }

    .hnia-site-header__inner {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        min-width: 0 !important;
        min-height: 60px !important;
        gap: 8px !important;
        padding: 0 10px 0 13px !important;
        box-sizing: border-box !important;
    }

    .hnia-site-header__brand {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: calc(100% - 92px) !important;
        gap: 7px !important;
        overflow: hidden !important;
    }

    .hnia-site-header__monogram {
        flex: 0 0 auto !important;
        width: 20px !important;
        height: 20px !important;
    }

    .hnia-site-header__brand-name {
        display: block !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        font-size: clamp(14px, 4.4vw, 17px) !important;
        line-height: 1 !important;
        letter-spacing: .045em !important;
    }

    .hnia-site-header__actions {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
        min-width: 82px !important;
        justify-content: flex-end !important;
    }

    .hnia-header-action,
    .hnia-mobile-menu-toggle {
        flex: 0 0 40px !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .hnia-mobile-menu-toggle {
        -webkit-appearance: none !important;
        appearance: none !important;
        display: grid !important;
        place-items: center !important;
        position: relative !important;
        border: 0 !important;
        outline: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        color: #fffdf9 !important;
        font: inherit !important;
        line-height: 1 !important;
        cursor: pointer !important;
    }

    .hnia-mobile-menu-toggle::before,
    .hnia-mobile-menu-toggle::after {
        content: none !important;
        display: none !important;
    }

    .hnia-mobile-menu-toggle:hover,
    .hnia-mobile-menu-toggle:focus,
    .hnia-mobile-menu-toggle:active {
        border: 0 !important;
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        color: #fffdf9 !important;
        transform: none !important;
    }

    .hnia-mobile-menu-toggle span {
        display: block !important;
        position: absolute !important;
        left: 11px !important;
        width: 18px !important;
        height: 1.5px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 999px !important;
        background: #fffdf9 !important;
        box-shadow: none !important;
        opacity: 1 !important;
    }

    .hnia-mobile-menu-toggle span:first-child {
        top: 16px !important;
    }

    .hnia-mobile-menu-toggle span:last-child {
        top: 23px !important;
    }

    .hnia-site-header.is-mobile-menu-open .hnia-mobile-menu-toggle span:first-child {
        top: 20px !important;
        transform: rotate(45deg) !important;
    }

    .hnia-site-header.is-mobile-menu-open .hnia-mobile-menu-toggle span:last-child {
        top: 20px !important;
        transform: rotate(-45deg) !important;
    }

    .hnia-mobile-menu {
        display: grid !important;
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 380px) {
    .hnia-site-header {
        padding-left: 7px !important;
        padding-right: 7px !important;
    }

    .hnia-site-header__inner {
        padding-left: 10px !important;
        padding-right: 6px !important;
        gap: 4px !important;
    }

    .hnia-site-header__brand {
        max-width: calc(100% - 80px) !important;
        gap: 6px !important;
    }

    .hnia-site-header__monogram {
        width: 18px !important;
        height: 18px !important;
    }

    .hnia-site-header__brand-name {
        font-size: 14px !important;
        letter-spacing: .025em !important;
    }

    .hnia-site-header__actions {
        min-width: 76px !important;
    }

    .hnia-header-action,
    .hnia-mobile-menu-toggle {
        flex-basis: 38px !important;
        width: 38px !important;
        min-width: 38px !important;
    }
}
