/* Header component styles (builds on base.css) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: saturate(140%) blur(6px);
  background-color: color-mix(in oklab, var(--color-surface) 88%, transparent);
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: 8px 12px;
  border-radius: var(--radius-md);
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  z-index: 1001;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--space-4);
}

/* Brand */
.brand { display: inline-flex; align-items: center; gap: var(--space-3); color: inherit; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand__logo { inline-size: 36px; block-size: 36px; border-radius: var(--radius-md); }
.brand__name { font-weight: 750; letter-spacing: -0.015em; font-size: clamp(1.05rem, 1.4vw + 0.6rem, 1.375rem); color: var(--color-text); }

/* Nav */
.header__nav { position: relative; }
.primary-nav { display: flex; align-items: center; gap: var(--space-4); }
.nav-item { list-style: none; }
.nav-link { display: inline-flex; align-items: center; padding: 10px 12px; border-radius: var(--radius-pill); color: var(--color-text); text-decoration: none; }
.nav-link:hover { background: color-mix(in oklab, var(--color-primary) 7%, transparent); text-decoration: none; }
.nav-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

/* CTA link styled as button is already styled via .btn classes */
.nav-cta .nav-link-cta { padding-block: 10px; padding-inline: 14px; }

/* Toggle */
.nav-toggle { display: inline-flex; align-items: center; gap: 8px; border-color: var(--gray-300); }
.nav-toggle[aria-expanded="true"] { background: color-mix(in oklab, var(--color-primary) 10%, transparent); }

/* Responsive behavior */
@media (max-width: 1023px) {
  /* Progressive enhancement: hide only when JS is present */
  .js .primary-nav { position: absolute; right: 0; top: calc(100% + 8px); display: none; flex-direction: column; gap: var(--space-2); min-width: min(92vw, 360px); padding: var(--space-4); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-lg); }
  .js .primary-nav.is-open { display: flex; }
  .nav-toggle { display: inline-flex;
  position: absolute;
        top: 15px;
        right: 20px;
  }
}

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .primary-nav { position: static; display: flex !important; }
}

/* Subtle divider when header overlays content */
.site-header::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 1px; background: var(--gray-200); opacity: 0.8; }
