/**
 * Blackford — Nav v2.0
 *
 * Fixed transparent header with bf-container padding fix.
 * wordmark + nav + CTA inside max-width:1280px with clamp() padding.
 * Scrolled: translucent dark band, blur, lilac hairline.
 *
 * @package Blackford
 * @version 2.0.0
 */

/* ─── Outer header shell ────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: clamp(0.875rem, 1.5vw, 1.25rem) 0;
  background: transparent;
  color: var(--wp--custom--nav--color-on-hero, #F4F5F6);
  transition:
    background 240ms cubic-bezier(0.22, 0.61, 0.36, 1),
    color 240ms ease,
    backdrop-filter 240ms ease,
    border-color 240ms ease;
  border-bottom: 1px solid transparent;
}

/* ─── Container: constrains width and adds horizontal padding ───────────────── */

.site-header__container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.5rem, 4vw, 3rem);
  padding-right: clamp(1.5rem, 4vw, 3rem);
}

/* ─── Inner flex row: wordmark | nav | cta ──────────────────────────────────── */

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 3vw, 3rem);
}

/* ─── Brand / wordmark ──────────────────────────────────────────────────────── */

.site-header__brand {
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.site-header__wordmark {
  font-family: var(--wp--preset--font-family--fraunces);
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: block;
  line-height: 1;
}

/* ─── Navigation block ──────────────────────────────────────────────────────── */

.site-header__nav,
.site-header__nav .wp-block-navigation__container,
.site-header__nav .wp-block-page-list {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__nav li,
.site-header__nav .wp-block-navigation-item,
.site-header__nav .wp-block-pages-list__item,
.site-header__nav .wp-block-page-list__item {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__nav a,
.site-header__nav .wp-block-navigation-item__content,
.site-header__nav .wp-block-pages-list__item a,
.site-header__nav .wp-block-page-list__item a {
  font-family: var(--wp--preset--font-family--inter);
  font-size: 0.9375rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease;
  position: relative;
}

.site-header__nav a:hover,
.site-header__nav .wp-block-navigation-item__content:hover,
.site-header__nav .wp-block-pages-list__item a:hover,
.site-header__nav .wp-block-page-list__item a:hover {
  color: var(--wp--preset--color--lilac-accent, #B5A8D6);
}

/* Animated underline on hover */
.site-header__nav a::after,
.site-header__nav .wp-block-navigation-item__content::after,
.site-header__nav .wp-block-pages-list__item a::after,
.site-header__nav .wp-block-page-list__item a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transition: right 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.site-header__nav a:hover::after,
.site-header__nav .wp-block-navigation-item__content:hover::after,
.site-header__nav .wp-block-pages-list__item a:hover::after,
.site-header__nav .wp-block-page-list__item a:hover::after {
  right: 0;
}

/* ─── CTA button ────────────────────────────────────────────────────────────── */

.site-header__cta {
  font-family: var(--wp--preset--font-family--inter);
  font-size: 0.9375rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  padding: 0.625rem 1.125rem;
  border: 1px solid currentColor;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
  flex-shrink: 0;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.site-header__cta:hover {
  background: var(--wp--preset--color--lilac-accent, #B5A8D6);
  color: var(--wp--preset--color--concrete-900, #16181B);
  border-color: var(--wp--preset--color--lilac-accent, #B5A8D6);
}

/* ─── Scrolled state ────────────────────────────────────────────────────────── */

body.is-scrolled-past-hero .site-header,
body.no-hero .site-header {
  background: var(--wp--custom--nav--bg-scrolled, rgba(12, 13, 15, 0.78));
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: rgba(181, 168, 214, 0.18);
  color: var(--wp--custom--nav--color-scrolled, #F4F5F6);
}

/* Mobile drawer open: always scrolled bg */
body.nav-drawer-open .site-header {
  background: var(--wp--custom--nav--bg-scrolled, rgba(12, 13, 15, 0.78));
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: rgba(181, 168, 214, 0.18);
}

/* ─── Hero sentinel ─────────────────────────────────────────────────────────── */

.hero-sentinel {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  visibility: hidden;
  z-index: -1;
}

/* ─── Main content offset for fixed nav ─────────────────────────────────────── */

.wp-site-blocks {
  padding-top: 0;
}

/* Hero sections extend under nav */
.wp-block-cover.is-hero,
.wp-block-cover.site-hero,
[data-is-hero="true"] {
  margin-top: 0;
}

/* ─── Mobile ────────────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .site-header__nav {
    display: none;
  }

  /* core/navigation overlay menu handles hamburger */
}

/* ─── Reduced motion ────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header * {
    transition: none !important;
    animation: none !important;
  }
}

/* ─── Forced contrast ───────────────────────────────────────────────────────── */

@media (prefers-contrast: more) {
  .site-header {
    background: #16181B !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #F4F5F6 !important;
  }

  .site-header a,
  .site-header .site-header__wordmark {
    color: #F4F5F6 !important;
  }
}
