/* Sticky keeps the existing header in normal document flow. */
:root { --selenia-header-height: 128px; }
html { scroll-padding-top: calc(var(--selenia-header-height) + 16px); }
body > header {
  position: sticky;
  top: 0;
  z-index: 10000;
}
@media (max-width: 1100px) {
  :root { --selenia-header-height: 104px; }
  body > header > nav {
    max-height: calc(100vh - var(--selenia-header-height));
    max-height: calc(100dvh - var(--selenia-header-height));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}
@media (max-width: 700px) {
  :root { --selenia-header-height: 88px; }
}

/* A discreet compact state; text and links keep their full opacity. */
body > header {
  transition: background-color 160ms ease, padding-top 160ms ease, padding-bottom 160ms ease;
}
body > header.selenia-is-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  background-color: rgba(255, 255, 255, .9);
}
@media (max-width: 1100px) {
  body > header.selenia-is-scrolled { padding-top: 12px; padding-bottom: 12px; }
}
@media (max-width: 700px) {
  body > header.selenia-is-scrolled { padding-top: 10px; padding-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  body > header { transition: none; }
}
