.site-header {
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.site-header--hero {
  background: rgba(11, 18, 24, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.site-header--hero .brand-link,
.site-header--hero .nav-link.is-active {
  color: #fff;
}

.site-header--hero .nav-links {
  color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

.site-header--hero .nav-pill {
  background: rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 6px 16px -10px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.site-header--hero .brand-logo-dark {
  display: none;
}

.site-header--hero .brand-logo-light {
  display: block;
}

.site-header--hero .nav-cta {
  background: #fff;
  color: var(--ink);
}

.site-header--hero .nav-cta:hover {
  background: var(--mint);
}

.site-header--light {
  background: rgba(247, 246, 242, 0.88);
  border-bottom-color: rgba(228, 225, 218, 0.9);
}

.site-header--light .brand-link,
.site-header--light .nav-link.is-active {
  color: var(--ink);
}

.site-header--light .nav-links {
  color: var(--mute);
  background: rgba(16, 24, 32, 0.045);
  box-shadow: inset 0 0 0 1px rgba(16, 24, 32, 0.04);
}

.site-header--light .nav-link:hover {
  color: var(--ink);
}

.site-header--light .brand-logo-light {
  display: none;
}

.site-header--light .brand-logo-dark {
  display: block;
}

.site-header--light .nav-cta {
  background: var(--ink);
  color: #fff;
}

.site-header--light .nav-cta:hover {
  background: rgba(16, 24, 32, 0.9);
}

.site-header--light .nav-pill {
  /* Cream glass — not pure white (avoids a tap flash) */
  background: rgba(247, 246, 242, 0.96);
  box-shadow:
    0 1px 2px rgba(16, 24, 32, 0.05),
    0 8px 18px -12px rgba(16, 24, 32, 0.22),
    inset 0 0 0 1px rgba(16, 24, 32, 0.04);
}

/* Apple-style segmented nav */
.nav-links {
  position: relative;
  gap: 0.15rem;
  padding: 0.2rem;
  border-radius: 999px;
}

.nav-pill {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 0;
  height: 0;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  transition:
    transform 0.52s cubic-bezier(0.32, 0.72, 0, 1),
    width 0.52s cubic-bezier(0.32, 0.72, 0, 1),
    height 0.52s cubic-bezier(0.32, 0.72, 0, 1),
    opacity 0.25s ease;
  will-change: transform, width;
}

.nav-pill.is-ready {
  opacity: 1;
}

.nav-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  transition: color 0.25s ease, font-size 0.3s cubic-bezier(0.32, 0.72, 0, 1), font-weight 0.25s ease;
}

.nav-link:hover,
.nav-link:active,
.nav-link:focus,
.nav-link.is-active {
  background: transparent;
  box-shadow: none;
}

.nav-link:focus {
  outline: none;
}

.nav-link:focus-visible {
  outline: 2px solid rgba(32, 185, 154, 0.55);
  outline-offset: 2px;
}

.nav-link.is-active {
  font-size: 1rem;
  font-weight: 600;
}

.nav-cta {
  transition: background 0.25s ease, transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
}

.nav-cta:hover {
  transform: translateY(-1px);
}

.brand-name {
  line-height: 1.15;
}

@media (max-width: 640px) {
  .site-header nav {
    gap: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
  }

  .brand-link {
    gap: 0.55rem;
    min-width: 0;
    font-size: 0.95rem;
  }

  .brand-link img {
    width: 2.15rem;
    height: 2.15rem;
  }

  .brand-name {
    max-width: 7.25rem;
    font-size: 0.92rem;
  }

  .nav-cta {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-pill {
    transition: none;
  }

  .nav-cta:hover {
    transform: none;
  }
}
