@property --header-progress {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}
:root { --header-height: 100px; --admin-bar-height: 0px; --header-shrink-distance: 590px; }
html { scroll-padding-top: calc(var(--admin-bar-height) + var(--header-height) + 20px); }
.site-header-shell {
  position: sticky;
  top: var(--admin-bar-height);
  z-index: 100;
  height: var(--header-height);
  pointer-events: none;
}
.site-header-surface {
  height: calc(var(--header-height) * (1 - var(--header-progress) * .5));
  background: var(--cream);
  box-shadow: 0 1px 0 rgb(53 76 67 / 12%);
  pointer-events: auto;
  position: relative;
  transition: height 220ms ease-out;
}
.site-header { height: 100%; min-height: 0; padding-block: 0; flex-wrap: nowrap; }
.site-header .brand {
  font-size: calc(1.9rem - var(--header-progress) * .35rem);
  height: 100%;
  display: flex;
  align-items: center;
  min-width: 0;
  transition: font-size 220ms ease-out;
}
.site-header .custom-logo-link { display: flex; align-items: center; height: 100%; }
.site-header .custom-logo { max-height: calc(var(--header-height) * (1 - var(--header-progress) * .5) - 10px); width: auto; transition: max-height 220ms ease-out; }
.site-header .menu a { display: flex; align-items: center; min-height: 44px; }
@keyframes compact-header { to { --header-progress: 1; } }
@supports (animation-timeline: scroll()) and (animation-range: 0px 100px) {
  .site-header-shell:not(.uses-observed-progress) .site-header-surface {
    animation: compact-header linear both;
    animation-timeline: scroll(root block);
    animation-range: 0px var(--header-shrink-distance);
  }
}
@media (max-width: 760px) {
  :root { --header-height: 96px; }
  .site-header .brand { font-size: calc(1.5rem - var(--header-progress) * .15rem); }
  .site-header .custom-logo { max-height: calc(86px - var(--header-progress) * 48px); }
  .menu-toggle { min-height: 44px; padding-block: 4px; }
  .site-header #primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: calc(100dvh - var(--admin-bar-height) - var(--header-height));
    overflow-y: auto;
    padding: 12px 20px 20px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
  }
  .site-header #primary-nav .menu { flex-direction: column; gap: 0; }
  html:not(.has-menu-js) .site-header-shell { position: relative; height: auto; }
  html:not(.has-menu-js) .site-header-surface { height: auto; animation: none; }
  html:not(.has-menu-js) .site-header { min-height: 96px; flex-wrap: wrap; }
  html:not(.has-menu-js) .site-header #primary-nav { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header-surface, .site-header .brand, .site-header .custom-logo { transition: none; }
}
