/* Floating header, on every page (loaded after css/responsive.css; behaviour in js/header-float.js).
   At the top of the page nothing changes. After about 100 px of scrolling the bar becomes a compact floating bar:
   a little lower (52 px), at most 1400 px wide, 16 px from the top, small 10 px corners, a very soft shadow. Same content, same places.
   The header keeps its original height, so nothing in the page moves (no layout shift); only the bar inside it changes, in 300 ms.
   No blur on the bar and no transform: that would trap the fixed mobile menu (see css/header.css). */
.site-header { height: var(--header-h); transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), padding 0.3s var(--ease); }
.header-inner {
  width: 100%; margin-inline: auto; border: 1px solid transparent; border-radius: 0; background: transparent; box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), border-radius 0.3s var(--ease), background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease), padding 0.3s var(--ease);
}
.site-header.is-floating { padding-top: 16px; background: transparent; border-bottom-color: transparent; pointer-events: none; }
.site-header.is-floating::before { opacity: 0; }
.site-header.is-floating .header-inner {
  pointer-events: auto; width: min(1400px, calc(100% - 32px)); height: 52px; padding-inline: clamp(14px, 1.8vw, 24px);
  border-color: rgba(255, 255, 255, 0.07); border-radius: 10px; background: #0b0b0d; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), 0 1px 2px rgba(0, 0, 0, 0.3);
}
.site-header.is-floating .logo img { height: 17px; }
.site-header.is-floating .icon-btn, .site-header.is-floating .menu-toggle { height: 40px; }
@media (min-width: 861px) { .site-header.is-floating .nav-link { height: 40px; } }
.site-header.is-floating .header-search { height: 38px; }
.logo img { transition: height 0.3s var(--ease); }
@media (max-width: 860px) {
  .site-header.is-floating .header-inner { width: calc(100% - 20px); height: 48px; }
  .site-header.is-floating { padding-top: 10px; }
}
/* Mobile menu that joins the floating bar: same width and colour, directly under it (no gap), rounded only at the bottom.
   While it is open the bar loses its bottom corners so the two read as one piece. */
@media (max-width: 860px) {
  .site-header.is-floating .main-nav {
    top: 58px !important; left: 10px; right: 10px;   /* !important: js/navigation.js sets an inline top under the full-width header */
    padding: 0 clamp(14px, 4vw, 20px) 20px; background: #0b0b0d;
    border: 1px solid rgba(255, 255, 255, 0.07); border-top-color: rgba(255, 255, 255, 0.05); border-radius: 0 0 10px 10px; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  }
  .site-header.is-floating .header-inner:has(.menu-toggle.is-open) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: transparent; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .header-inner, .logo img { transition: none; }
}
