/* Header specific styles - builds on base.css */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.site-header__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 0.6rem;
  padding-bottom: 0.5rem;
}

/* Logo */
.site-logo__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  text-decoration: none;
}

.site-logo__mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-xl);
  background-image: var(--gradient-rainbow-soft);
  box-shadow: var(--shadow-md);
}

.site-logo__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  color: var(--color-text);
}

/* Mobile nav toggle */
.site-header__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.22rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background-color: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-xs);
  margin-top: 0.4rem;
}

.site-header__toggle-bar {
  width: 1.25rem;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7fd3ff, #ffb7d5);
}

.site-header__toggle:focus-visible {
  outline: 3px solid var(--color-accent-pink);
  outline-offset: 2px;
}

/* Nav */
.site-header__nav {
  width: 100%;
  max-width: var(--layout-max-width);
  margin-top: 0.5rem;
}

.site-header__nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0 0.25rem;
  margin: 0;
}

.site-header__nav-link {
  position: relative;
  font-size: var(--font-size-sm);
  color: var(--gray-700);
  text-decoration: none;
  padding: 0.25rem 0;
}

.site-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background-image: var(--gradient-pink-lavender);
  transition: width var(--transition-normal);
}

.site-header__nav-link:hover::after,
.site-header__nav-link[aria-current="page"]::after {
  width: 100%;
}

.site-header__nav-link[aria-current="page"] {
  color: var(--color-text);
  font-weight: 600;
}

.site-header__nav-item--cta {
  margin-top: 0.25rem;
}

.site-header__nav-cta {
  font-size: var(--font-size-xs);
  padding-inline: 1.4rem;
}

/* Mobile-first: nav collapses when JS adds class */
.site-header__nav {
  max-height: none;
  overflow: visible;
  transition: max-height var(--transition-normal), opacity var(--transition-normal), visibility var(--transition-normal);
}

.site-header__nav.is-collapsed {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
}

.site-header__nav.is-open {
  max-height: 18rem;
  opacity: 1;
  visibility: visible;
}

/* Desktop layout */
@media (min-width: 768px) {
  .site-header__inner {
    flex-direction: column;
  }

  .site-header__toggle {
    display: none;
  }

  .site-header__nav {
    margin-top: 0.4rem;
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .site-header__nav-list {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.6rem;
  }

  .site-header__nav-item--cta {
    margin-top: 0;
  }
}

/* Large screens: tighter spacing */
@media (min-width: 1024px) {
  .site-header__nav-list {
    gap: 0.85rem 2rem;
  }
}

/* Utility when mobile menu is open to prevent body scroll */
.body--nav-open {
  overflow: hidden;
}