.site-header {
    border-bottom: 1px solid var(--line);
    position: relative;
    z-index: 10;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px -22px rgba(21, 23, 20, 0);
    transition: background-color 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
}

.site-header.is-scrolled {
    background: var(--paper);
    box-shadow: 0 12px 28px -22px rgba(21, 23, 20, .45);
}

.site-header.is-smart-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    transform: translateY(0);
    transition: transform 240ms ease, background-color 280ms ease, border-color 280ms ease, box-shadow 280ms ease;
    will-change: transform;
}

.site-header.is-smart-nav.is-smart-nav-hidden {
    transform: translateY(-100%);
}

.site-header-spacer {
    display: none;
    height: 0;
}

.site-header-spacer.is-active {
    display: block;
}

.nav-wrap {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(14px, 2.2vw, 24px);
}

.brand {
    display: flex;
    position: relative;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
    font-family: var(--font-heading);
    letter-spacing: .08em;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1;
}

.brand strong {
    font-size: 14px;
    font-weight: 700;
}

.brand small {
    margin-top: 4px;
    font-size: .625rem;
    letter-spacing: .18em;
    color: var(--muted);
}

.desktop-nav {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(16px, 2.5vw, 36px);
    margin-left: auto;
    margin-right: clamp(8px, 2vw, 32px);
    white-space: nowrap;
    font-size: .875rem;
    font-weight: 500;
    color: var(--muted);
}

.desktop-nav a,
.mobile-menu a,
.phone-link {
    position: relative;
    transition: color 280ms ease;
}

.nav-contact-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hours-status {
    position: relative;
    color: var(--ink);
    font-size: var(--type-label);
}

.hours-status summary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
    transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

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

.hours-status summary:focus-visible {
    outline: 3px solid var(--nav-green);
    outline-offset: 3px;
}

.hours-status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #858b82;
}

.hours-status[data-status="open"] .hours-status-dot {
    background: #4c9b54;
    animation: hours-status-pulse 2.8s ease-in-out infinite;
}

.hours-status[data-status="closed"] .hours-status-dot {
    background: #858b82;
}

.hours-status-popover {
    position: absolute;
    z-index: 12;
    top: calc(100% + 9px);
    right: 0;
    width: min(290px, calc(100vw - 40px));
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
    box-shadow: 0 10px 28px rgba(21, 23, 20, .14);
    color: var(--ink);
    white-space: normal;
}

.hours-status-popover p {
    margin: 0;
    font-size: var(--type-label);
    line-height: 1.5;
}

@keyframes hours-status-pulse {
    50% { opacity: .55; }
}

.desktop-nav a::after,
.mobile-menu a::after,
.phone-link::after {
    position: absolute;
    right: 0;
    bottom: -6px;
    left: 0;
    height: 2px;
    background: var(--nav-green);
    content: "";
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 280ms ease;
}

.desktop-nav a[aria-current="location"],
.mobile-menu a[aria-current="location"] {
    color: var(--nav-green);
}

.desktop-nav a[aria-current="location"]::after,
.mobile-menu a[aria-current="location"]::after {
    transform: scaleX(1);
}

.brand[aria-current="location"]::after {
    position: absolute;
    right: 0;
    bottom: -7px;
    left: 0;
    height: 2px;
    background: var(--nav-green);
    content: "";
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 15px;
}

.phone-link {
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
}

.phone-link span {
    display: inline-block;
    color: #55982a;
    transition: transform 280ms ease;
}

.theme-toggle,
.menu-toggle {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 17px;
    transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

.menu-toggle {
    display: none;
    border: 0;
    font-size: 22px;
}

.mobile-menu {
    display: none;
    grid-template-rows: 0fr;
    visibility: hidden;
    transition: grid-template-rows 320ms ease, visibility 0s linear 320ms;
}

.mobile-menu.is-open {
    grid-template-rows: 1fr;
    visibility: visible;
    transition-delay: 0s;
}

.mobile-menu-inner {
    display: flex;
    min-height: 0;
    overflow: hidden;
    padding: 0 32px;
    gap: 18px;
    flex-direction: column;
    font-size: var(--type-secondary);
    font-weight: 500;
    opacity: 0;
    transition: opacity 240ms ease;
}

.mobile-menu.is-open .mobile-menu-inner {
    opacity: 1;
}

.mobile-menu-inner > :first-child {
    margin-top: 8px;
}

.mobile-menu-inner > :last-child {
    margin-bottom: 20px;
}

.mobile-menu a {
    width: fit-content;
    padding: 3px 0;
}

.mobile-menu .hours-status {
    align-self: flex-start;
    margin-top: 2px;
}

.mobile-menu .hours-status-popover {
    position: static;
    width: min(290px, calc(100vw - 60px));
    margin-top: 8px;
    box-shadow: none;
}

.brand:focus-visible,
.desktop-nav a:focus-visible,
.mobile-menu a:focus-visible,
.phone-link:focus-visible,
.theme-toggle:focus-visible,
.menu-toggle:focus-visible {
    outline: 3px solid var(--nav-green);
    outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
    .desktop-nav a:hover,
    .mobile-menu a:hover,
    .phone-link:hover {
        color: var(--nav-green-hover);
    }

    .desktop-nav a:hover::after,
    .mobile-menu a:hover::after,
    .phone-link:hover::after {
        transform: scaleX(1);
    }

    .phone-link:hover span {
        transform: translate(2px, -2px);
    }

    .hours-status summary:hover,
    .theme-toggle:hover,
    .menu-toggle:hover {
        border-color: var(--nav-green);
        color: var(--nav-green);
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header.is-smart-nav {
        transition: none;
    }

    .phone-link:hover span {
        transform: none;
    }

    .hours-status[data-status="open"] .hours-status-dot {
        animation: none;
    }
}
