/*
 * Saga public header — canonical visual contract.
 *
 * This file is loaded after page-local CSS on every indexed public route.
 * Keep all header geometry here so page-specific styles cannot move, resize,
 * or re-font the menu while a visitor navigates between pages.
 */

.site-header,
.site-header * {
  box-sizing: border-box;
}

html {
  background: #08090a;
  scrollbar-gutter: stable;
}

.site-header {
  position: fixed !important;
  z-index: 1000;
  top: 12px;
  right: 0;
  left: 0;
  width: 100%;
  height: 64px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f5f6f3;
  font: 400 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: none;
}

body.site-header-flow {
  padding-top: 76px;
}

.site-header .shell {
  width: min(1180px, calc(100% - 48px));
  max-width: none;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 auto;
  padding: 0 10px 0 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(10, 11, 12, .78);
  box-shadow: 0 14px 42px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .055);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  backdrop-filter: blur(22px) saturate(1.18);
  pointer-events: auto;
}

.site-header .brand {
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  color: #f5f6f3;
  text-decoration: none;
}

.site-header .brand img {
  width: auto;
  height: 31px;
  display: block;
  margin: 0;
}

.site-header .site-nav {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.site-header .site-nav a {
  min-height: 42px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  margin: 0;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.55;
  letter-spacing: normal;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .site-nav a:hover {
  background: rgba(255, 255, 255, .07);
  color: #fff;
  transform: none;
}

.site-header .site-nav a[aria-current="page"] {
  background: transparent;
  color: rgba(255, 255, 255, .72);
  box-shadow: none;
}

.site-header .site-nav > a:nth-child(n+7) {
  display: none !important;
}

.site-header .session-nav {
  width: 246px;
  min-width: 246px;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin: 0 0 0 auto;
  padding: 0;
  visibility: visible;
}

html.saga-js:not(.saga-session-ready) .site-header .session-nav {
  visibility: hidden;
}

html.saga-session-ready .site-header .session-nav {
  visibility: visible;
}

.site-header .button,
.site-header .btn {
  min-width: 0;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  color: #f5f6f3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
  letter-spacing: normal;
  text-decoration: none;
  white-space: nowrap;
}

.site-header .session-nav .primary {
  width: 152px;
  min-width: 152px;
  max-width: 152px;
}

.site-header .button:hover,
.site-header .btn:hover {
  border-color: rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .07);
  color: #f5f6f3;
  transform: translateY(-1px);
}

.site-header .button.primary,
.site-header .btn.primary {
  border-color: #8bdccc;
  background: #8bdccc;
  color: #071713;
}

.site-header .button.primary:hover,
.site-header .btn.primary:hover {
  border-color: #b4f0e4;
  background: #b4f0e4;
  color: #071713;
}

.site-header .mobile-menu {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  background: rgba(10, 11, 12, .72);
  color: #fff;
  cursor: pointer;
}

.site-header .mobile-menu::before {
  content: "Menu";
  font: 600 11px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 980px) {
  .site-header .shell {
    gap: 16px;
  }

  .site-header .site-nav a {
    padding-inline: 9px;
    font-size: 13px;
  }

  .site-header .session-nav {
    width: 152px;
    min-width: 152px;
  }

  .site-header .session-nav .button:not(.primary),
  .site-header .session-nav .btn:not(.primary) {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 8px;
    height: 60px;
  }

  body.site-header-flow {
    padding-top: 68px;
  }

  .site-header .shell {
    position: relative;
    width: min(1180px, calc(100% - 28px));
    height: 60px;
    gap: 10px;
    padding: 0 10px 0 14px;
    border-radius: 16px;
  }

  .site-header .brand img {
    height: 27px;
  }

  .site-header .site-nav {
    position: absolute;
    z-index: 2;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: rgba(12, 14, 15, .97);
    box-shadow: 0 32px 100px rgba(0, 0, 0, .42);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }

  .site-header .site-nav.open {
    display: flex;
  }

  .site-header .site-nav a {
    min-height: 46px;
    padding: 0 12px;
    font-size: 13px;
  }

  .site-header .session-nav .button:not(.primary),
  .site-header .session-nav .btn:not(.primary) {
    display: none;
  }

  .site-header .session-nav .button.primary,
  .site-header .session-nav .btn.primary {
    min-height: 42px;
    padding: 0 12px;
    font-size: 12px;
  }

  .site-header .mobile-menu {
    display: grid;
    margin-left: auto;
  }

  .site-header .session-nav {
    margin-left: 0;
  }
}

@media (max-width: 470px) {
  .site-header .session-nav {
    display: none;
  }
}
