/* Sticky site header — loaded on every page, both bundles.
   No ancestor of <header> establishes a containing block (no overflow/transform),
   so position:sticky works without switching to fixed + body padding. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;                /* above the page's own overlays and animations */
  background: #fff;
  transition: box-shadow .18s ease;
}

/* JS adds .is-stuck to <html> once the page has scrolled. */
.is-stuck .site-header {
  box-shadow: 0 1px 12px rgba(0, 0, 0, .18);
}

/* In-page anchors must not land under the pinned bar. */
:target,
[id] { scroll-margin-top: 88px; }

/* The mobile drop-down hangs off the header, so it travels with it. */
.mainnav-mobile { z-index: 1029; }

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