/* Shared site header. Kept under .site-* classes to avoid conflicts with page styles. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 10, 18, 0.74);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  width: min(var(--max, 1240px), calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.site-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

.site-brand-logo-frame {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-brand-logo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.site-brand-text {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.site-brand-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text, #eef4ff);
}

.site-brand-subtitle {
  max-width: 360px;
  color: var(--muted, #a9b7cc);
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: rgba(238, 244, 255, 0.85);
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active,
.site-nav a.active {
  color: var(--text, #eef4ff);
}

.site-nav a.is-active,
.site-nav a.active {
  font-weight: 650;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-header-button {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #06101c;
  background: linear-gradient(135deg, #c5ebff, #9fd6ff 60%, #b2b2ff 100%);
  box-shadow: 0 18px 40px rgba(127, 208, 255, 0.22);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-header-button:hover {
  transform: translateY(-1px);
}

.site-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text, #eef4ff);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.site-menu-toggle span {
  width: 19px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.site-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
  .site-header-inner {
    min-height: 72px;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(4, 10, 18, 0.94);
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    box-shadow: var(--shadow, 0 18px 60px rgba(0, 0, 0, 0.35));
  }

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

  .site-header-button {
    display: none;
  }

  .site-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .site-header-inner {
    width: min(100% - 28px, var(--max, 1240px));
  }

  .site-brand-subtitle {
    display: none;
  }
}
