/* Shared visual header; its caller supplies the existing design tokens. */
body.shd-has-site-header .shd-home-header,
body.shd-has-site-header .shd-home-header * { box-sizing: border-box; }
body.shd-has-site-header .shd-home-header [hidden] { display: none; }
body.shd-has-site-header .shd-home-header__inner { width: min(100% - 2 * var(--shd-gutter), var(--shd-container)); margin-inline: auto; }
body.shd-has-site-header :where(.shd-home-header) a { color: inherit; text-decoration: none; transition: color var(--shd-transition), background-color var(--shd-transition); }
body.shd-has-site-header .shd-home-header a:focus-visible,
body.shd-has-site-header .shd-home-header button:focus-visible { outline: 3px solid currentColor !important; outline-offset: 5px; }
body.shd-has-site-header .shd-home-header { position: sticky; top: 0; z-index: 1000; background: var(--shd-surface); border-bottom: 1px solid var(--shd-line); color: var(--shd-ink); }
@supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
    body.shd-has-site-header .shd-home-header { background: rgba(246,245,242,.7); border-bottom-color: rgba(32,35,39,.08); }
    body.shd-has-site-header .shd-home-header.is-scrolled { background: rgba(246,245,242,.75); border-bottom-color: rgba(32,35,39,.05); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
}
body.shd-has-site-header.admin-bar .shd-home-header { top: 32px; }
body.shd-has-site-header .shd-home-header__inner { min-height: var(--shd-header-height); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; padding-block: 0.6rem; }
body.shd-has-site-header .shd-home-logo { display: flex; align-items: center; max-width: 12.5rem; font: 600 1rem/1.2 var(--shd-font-display); }
body.shd-has-site-header .shd-home-logo img { display: block; position: static; width: auto; max-width: 100%; height: 3rem; object-fit: contain; }
body.shd-has-site-header .shd-home-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.75rem; margin: 0; padding: 0; list-style: none; }
body.shd-has-site-header .shd-home-menu li { margin: 0; padding: 0; }
body.shd-has-site-header .shd-home-menu a { display: inline-flex; align-items: center; min-height: 44px; font: 500 0.875rem/1.4 var(--shd-font-display); }
body.shd-has-site-header .shd-home-menu a:hover { color: var(--shd-accent); }
body.shd-has-site-header .shd-home-menu li:last-child a { padding-inline: 1.2rem; border: 1px solid var(--shd-line); border-radius: var(--shd-radius); }
body.shd-has-site-header .shd-home-toggle { min-height: 44px; gap: 0.75rem; align-items: center; padding: 0.5rem 0.75rem; border: 1px solid var(--shd-line); border-radius: var(--shd-radius); background: transparent; color: var(--shd-ink); font: 500 0.875rem/1.4 var(--shd-font-display); cursor: pointer; }
body.shd-has-site-header .shd-home-toggle span { font-size: 1rem; }
@media (max-width: 782px) {
    body.shd-has-site-header.admin-bar .shd-home-header { top: 46px; }
}
@media (max-width: 767px) {
    body.shd-has-site-header { --shd-header-height: 4.25rem; }
    /* Reserve only the closed row when the animated surface overlays content. */
    body.shd-has-site-header .shd-home-header.is-menu-overlay { height: calc(var(--shd-header-height) + 1px); background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
    body.shd-has-site-header .shd-home-header.is-menu-overlay .shd-home-header__surface { position: absolute; inset: 0 0 auto; background: var(--shd-surface); border-bottom: 1px solid var(--shd-line); }
    @supports ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
        body.shd-has-site-header .shd-home-header.is-menu-overlay .shd-home-header__surface { background: rgba(246,245,242,.7); border-bottom-color: rgba(32,35,39,.08); }
        body.shd-has-site-header .shd-home-header.is-menu-overlay.is-scrolled .shd-home-header__surface { background: rgba(246,245,242,.75); border-bottom-color: rgba(32,35,39,.05); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
    }
    /* Keep the first row's existing height, excluding its 0.6rem block padding. */
    body.shd-has-site-header .shd-home-header__inner { display: grid; align-content: start; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: minmax(calc(var(--shd-header-height) - 1.2rem), auto) minmax(0, 0fr); row-gap: 0; transition: grid-template-rows 300ms cubic-bezier(.16, 1, .3, 1); }
    body.shd-has-site-header .shd-home-header.is-open .shd-home-header__inner { grid-template-rows: minmax(calc(var(--shd-header-height) - 1.2rem), auto) minmax(0, 1fr); }
    body.shd-has-site-header .shd-home-logo { max-width: min(40vw, 10rem); }
    body.shd-has-site-header .shd-home-logo img { height: 2.5rem; }
    body.shd-has-site-header .shd-home-toggle:not([hidden]) { display: inline-flex; }
    body.shd-has-site-header .shd-home-navigation { grid-column: 1 / -1; align-self: stretch; width: 100%; min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s 300ms; }
    body.shd-has-site-header .shd-home-menu { display: grid; gap: 0.25rem; padding-block: 0.5rem 0.75rem; }
    body.shd-has-site-header .shd-home-menu a { width: 100%; min-height: 48px; justify-content: flex-start; text-align: left; text-transform: capitalize; }
    body.shd-has-site-header .shd-home-menu a:focus-visible { outline-offset: -3px; }
    body.shd-has-site-header .shd-home-menu li:last-child a { padding-inline: 0; border: 0; border-radius: 0; background: transparent; }
    /* Zero-height and hidden before JS; inert prevents focus during closing. */
    body.shd-has-site-header .shd-home-header.is-open .shd-home-navigation { visibility: visible; transition-delay: 0s; }
    body.shd-has-site-header .shd-home-menu { max-height: calc(100svh - 8rem); overflow-y: auto; }
}
@media (min-width: 768px) {
    body.shd-has-site-header .shd-home-toggle { display: none; }
}
@media (max-width: 600px) {
    /* WordPress's mobile admin bar scrolls away instead of remaining fixed. */
    body.shd-has-site-header.admin-bar .shd-home-header { top: 0; }
}
@media (prefers-reduced-motion: reduce) {
    body.shd-has-site-header .shd-home-header * { transition: none; scroll-behavior: auto; }
}

/* Native Halva routes: isolate home-equivalent inheritance to the header. */
body.shd-has-site-header:not(.shd-front-page) .shd-home-header { -webkit-font-smoothing: antialiased; }
body.shd-has-site-header .shd-site-skip { position: fixed; top: -10rem; left: 1rem; z-index: 100001; padding: 0.75rem 1rem; color: var(--shd-ink); background: white; }
body.shd-has-site-header .shd-site-skip:focus { top: 3rem; }
/* Retain Halva's separate search/sidebar utilities, but not its duplicate menu. */
body.shd-has-site-header:not(.shd-front-page) .bwp-mobile-menu-container { display: none; }
/* Halva normally hides this on small screens in favour of search in that menu. */
body.shd-has-site-header:not(.shd-front-page) .bwp-sticky-buttons-container .bwp-dropdown-search { display: block; }

/* Shared CF7 CTA: this stylesheet is loaded after Halva on every public route. */
.wpcf7 .wpcf7-form .wpcf7-submit[type="submit"] { min-height: 48px; max-width: 100%; padding: 0.75rem 1.5rem; border: 1px solid #ad4e10; border-radius: var(--shd-radius, 0.5rem); background: #ad4e10; color: #fff; font: 500 1rem/1.5 var(--shd-font-body, 'Open Sans', sans-serif); cursor: pointer; transition: background-color 180ms ease, border-color 180ms ease; }
.wpcf7 .wpcf7-form .wpcf7-submit[type="submit"]:hover { background: #913f0b; border-color: #913f0b; color: #fff; }
/* Halva suppresses form outlines with !important. */
.wpcf7 .wpcf7-form .wpcf7-submit[type="submit"]:focus-visible { outline: 3px solid #d6c2a7 !important; outline-offset: 3px; }
