/* ---------- 页头 ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--border);
  box-shadow: 0 6px 18px rgba(10, 17, 32, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 76px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-zh {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  transition: color 0.2s ease;
}

.brand-en {
  margin-top: 2px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s ease;
}

.site-header.scrolled .brand-zh {
  color: var(--text);
}

.site-header.scrolled .brand-en {
  color: var(--text-muted);
}

.brand.light .brand-zh {
  color: #fff;
}

.brand.light .brand-en {
  color: rgba(255, 255, 255, 0.55);
}

.main-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-link:hover {
  color: #fff;
}

.site-header.scrolled .nav-link {
  color: var(--text-secondary);
}

.site-header.scrolled .nav-link:hover {
  color: var(--primary);
}

.nav-admin {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.6);
}

.site-header.scrolled .nav-admin {
  color: var(--text-muted);
}

.btn-header-cta {
  height: 40px;
  margin-left: 12px;
  padding: 0 20px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.btn-header-cta:hover {
  background: #eef3fb;
}

.site-header.scrolled .btn-header-cta {
  background: var(--primary);
  color: #fff;
}

.site-header.scrolled .btn-header-cta:hover {
  background: #1666d0;
}

.menu-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.site-header.scrolled .menu-button {
  color: var(--text);
}

.menu-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-header.scrolled .menu-button:hover {
  background: rgba(10, 17, 32, 0.06);
}

/* ---------- 移动端抽屉 ---------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(4, 8, 16, 0.46);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.drawer-backdrop.open {
  opacity: 1;
}

.site-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: 304px;
  max-width: 86vw;
  padding: 20px 24px 24px;
  background: var(--ink);
  transform: translateX(-102%);
  visibility: hidden;
  transition: transform 0.25s cubic-bezier(0.22, 0.7, 0.3, 1),
    visibility 0.25s;
}

.site-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.drawer-nav {
  margin-top: 28px;
}

.drawer-nav a {
  display: block;
  padding: 15px 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
}

.drawer-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.drawer-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.drawer-admin {
  display: block;
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.drawer-legal {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  line-height: 1.7;
}

body.drawer-open {
  overflow: hidden;
}

