/* Sticky header baseline */
:root {
  --hdr-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: box-shadow 200ms ease, border-color 200ms ease;
}

.site-header--scrolled,
.site-header.is-sticky,
.site-header.sticky {
  box-shadow: var(--hdr-shadow);
  border-color: transparent;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding-inline: 12px;
  max-width: min(1200px, 100%);
  margin-inline: auto;
  gap: 16px;
}

.site-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.site-header__brand a {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  gap: 8px;
}

.site-logo-link,
.custom-logo-link,
.site-title {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.125rem;
  color: inherit;
  text-decoration: none;
}

.site-logo {
  display: block;
  width: auto;
  max-height: 40px;
}

.custom-logo {
  width: auto;
  max-height: 40px;
  height: auto;
}

.site-header__toggle,
.hamburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: transform 150ms ease;
}

.site-header__toggle:focus-visible,
.hamburger:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.site-header__toggle:hover,
.hamburger:hover {
  background: transparent !important;
  transform: scale(1.05);
}

.site-header__toggle-box {
  position: relative;
  width: 20px;
  height: 16px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.site-header__toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: #000;
  border-radius: 999px;
  transition: transform 200ms ease, opacity 200ms ease;
}

.site-header__toggle--close .site-header__toggle-bar {
  position: absolute;
  top: 50%;
  left: 0;
  transform-origin: center;
}

.site-header__toggle--close .site-header__toggle-bar:nth-child(1) {
  transform: translateY(-50%) rotate(45deg);
}

.site-header__toggle--close .site-header__toggle-bar:nth-child(2) {
  transform: translateY(-50%) rotate(-45deg);
}

.site-header__nav {
  display: none;
}

.site-header__nav--desktop .menu {
  display: flex;
  gap: 24px;
  align-items: center;
}

.site-header__nav--desktop .menu > li > a {
  display: inline-flex;
  align-items: center;
  padding: 10px 0;
  font-weight: 500;
  background: transparent;
  transition: color 150ms ease;
}

.site-header__nav--desktop .menu > li > a:hover,
.site-header__nav--desktop .menu > li > a:focus-visible {
  color: var(--color-mana, #00d4aa);
  background: transparent;
}

.site-header__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.site-header--menu-open .site-header__overlay {
  opacity: 1;
  pointer-events: auto;
}

.site-header__drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 80vw);
  max-width: 100%;
  background: #fff;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.site-header--menu-open .site-header__drawer {
  transform: translateX(0);
}

.site-header__drawer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  gap: 24px;
}

.site-header__drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__nav--mobile .menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.site-header__nav--mobile .menu > li > a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  transition: background 150ms ease, color 150ms ease;
}

.site-header__nav--mobile .menu > li > a:hover,
.site-header__nav--mobile .menu > li > a:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-mana, #00d4aa);
}

.site-header__nav--mobile .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-header__nav--mobile .sub-menu a {
  min-height: 40px;
  padding: 0 8px;
}

.site-header__drawer:focus-visible {
  outline: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body.site-header-lock-scroll {
  overflow: hidden;
  touch-action: none;
}

@media (min-width: 768px) {
  .site-header__inner {
    padding-inline: 16px;
  }
}

@media (min-width: 1024px) {
  .site-header__inner {
    height: 72px;
    padding-inline: 24px;
    gap: 32px;
  }

  .site-header__toggle,
  .site-header__overlay,
  .site-header__drawer {
    display: none;
  }

  .site-header__nav {
    display: block;
  }
}
