.zh-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.zh-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.zh-header__brand {
  display: flex;
  align-items: center;
}

.zh-header__logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.zh-header__logo-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 24px;
  background: var(--gradient-primary);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.12), 0 14px 30px rgba(0, 0, 0, 0.7);
  position: relative;
}

.zh-header__logo-mark::before,
.zh-header__logo-mark::after {
  content: "";
  position: absolute;
  inset: 20%;
  border-radius: inherit;
}

.zh-header__logo-mark::before {
  border: 1px solid rgba(255, 255, 255, 0.55);
  opacity: 0.8;
}

.zh-header__logo-mark::after {
  inset: 35%;
  background: rgba(5, 8, 22, 0.9);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.7);
}

.zh-header__title {
  display: flex;
  flex-direction: column;
}

.zh-header__title-main {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.zh-header__title-sub {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.zh-header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-24);
}

.zh-header__nav-list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-24);
  margin: 0;
  padding: 0;
}

.zh-header__cta-wrap {
  display: flex;
}

.zh-header__cta {
  font-size: var(--text-xs);
}

/* Mobile toggle */
.zh-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(5, 8, 22, 0.9);
  cursor: pointer;
  color: var(--color-text);
}

.zh-header__toggle-bar {
  width: 1.25rem;
  height: 2px;
  border-radius: 999px;
  background: var(--gray-100);
  transition: transform var(--transition-normal), opacity var(--transition-normal), width var(--transition-normal);
}

/* Toggle animation when menu open */
.zh-header--menu-open .zh-header__toggle-bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.zh-header--menu-open .zh-header__toggle-bar:nth-child(2) {
  opacity: 0;
  width: 0.5rem;
}

.zh-header--menu-open .zh-header__toggle-bar:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

/* Responsive behavior */
@media (max-width: 768px) {
  .zh-header__toggle {
    display: inline-flex;
  }

  .zh-header__nav {
    position: fixed;
    inset: 3.5rem 0 auto 0;
    padding: 0.75rem var(--space-16) var(--space-16);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-16);
    background: radial-gradient(circle at top left, rgba(255, 51, 102, 0.25), transparent 55%),
                radial-gradient(circle at bottom right, rgba(0, 188, 255, 0.2), transparent 60%),
                rgba(5, 8, 22, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transform-origin: top;
    transform: scaleY(0.9);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-normal), transform var(--transition-normal), visibility var(--transition-normal);
  }

  .zh-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: var(--space-8);
  }

  .zh-header__cta-wrap {
    width: 100%;
  }

  .zh-header__cta {
    width: 100%;
    justify-content: center;
  }

  .zh-header--menu-open .zh-header__nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scaleY(1);
  }
}

@media (max-width: 520px) {
  .zh-header__title-sub {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zh-header__nav,
  .zh-header__toggle-bar {
    transition: none !important;
  }
}
