/* =========================================================================
   Nav
   ========================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 14px 0;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--line-soft);
  transition:
    padding 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    transform 0.35s ease;
}
.site-header.scrolled {
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--line);
  box-shadow: var(--sh-sm);
}
.site-header.header-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  height: 22px;
  width: auto;
  display: block;
}
.brand-sub {
  color: var(--brand);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  font-family: var(--f-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1.1;
  margin-left: 2px;
}
.footer .brand-sub {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  padding: 4px;
}
.nav-links a {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-body);
  padding: 6px 14px;
  border-radius: 99px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.7);
}
.nav-links a.active {
  color: var(--brand);
  background: var(--surface);
  font-weight: 600;
  box-shadow: var(--sh-sm);
}
.nav-links a::after {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}
.site-header .btn-ghost {
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: 99px;
  transition: all 0.2s ease;
}
.site-header .btn-ghost:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.04);
}
.site-header .btn-primary {
  padding: 9px 20px;
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: 99px;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  box-shadow:
    0 4px 14px rgba(166, 2, 18, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.site-header .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(166, 2, 18, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}
