/* Shared navigation: the single source of header styling. */

#siteHeader {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: #3a2e2a;
  color-scheme: light;
  background: rgba(255, 249, 237, 0.50);
  border-bottom: 3px solid rgba(58, 46, 42, 0.08);
  box-shadow: 0 4px 18px rgba(58, 46, 42, 0.06);
  font: 16px/1.6 "Trebuchet MS", ui-rounded, system-ui, sans-serif;
}

#siteHeader .header-inner,
#siteHeader .site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1120px, 100%);
  min-height: 76px;
  margin-inline: auto;
  padding: 12px 24px;
}

#siteHeader .brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

#siteHeader nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

#siteHeader nav a {
  padding: 9px 14px;
  border-radius: 999px;
  color: inherit;
  font-weight: 800;
  text-decoration: none;
  transition: background 160ms ease;
}

#siteHeader nav a:hover { background: #e0f2ff; }
#siteHeader nav a[aria-current="page"] { background: #ffdc75; }

#siteHeader #menuToggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 15px;
  border: 2px solid #3a2e2a;
  border-radius: 999px;
  background: #fff;
  color: #3a2e2a;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

#siteHeader a:focus-visible,
#siteHeader button:focus-visible {
  outline: 4px solid #155e91;
  outline-offset: 6px;
}

.skip-link { z-index: 2000; }

/* Fixed scenery extends behind the translucent header.
   About's scenery is inside its stage, so it is excluded. */
body > .scenery { top: 0; }

@media (max-width: 760px) {
  #siteHeader .header-inner,
  #siteHeader .site-header__inner {
    flex-wrap: wrap;
    gap: 10px;
    padding-inline: 18px;
  }

  #siteHeader nav {
    width: 100%;
    justify-content: center;
  }

  /* Without JavaScript the nav stays visible. */
  #siteHeader[data-nav-ready] #menuToggle { display: inline-flex; }
  #siteHeader[data-nav-ready] nav { display: none; }

  #siteHeader[data-nav-ready] #menuToggle[aria-expanded="true"] + nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-block: 8px;
    max-height: calc(100svh - 90px);
    overflow-y: auto;
  }

  #siteHeader nav a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  #siteHeader * { transition: none !important; }
}