/**
 * AI20 Visual Identity v1 — Header Visual Foundation
 * Scope: #masthead / #mobile-header. Tokens live in tokens.css (fallback below).
 * Temporary text brand until approved logo masters are supplied.
 */

:root {
  --ai20-vi-midnight: #071a2b;
  --ai20-vi-azure: #147dff;
  --ai20-vi-cyan: #25d9e8;
  --ai20-vi-platinum: #c9b98f;
  --ai20-vi-future-white: #f7f9fc;
  --ai20-vi-graphite: #202a33;
  --ai20-vi-header-height: 80px;
  --ai20-vi-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ai20-vi-radius: 2px;
}

/* -------------------------------------------------------------------------
   Header shell — Future White, 80px
   ------------------------------------------------------------------------- */
body.ai20-vi-header-foundation #masthead.site-header,
body.ai20-vi-header-foundation #masthead .site-header-wrap,
body.ai20-vi-header-foundation #masthead .site-main-header-wrap,
body.ai20-vi-header-foundation #masthead .site-header-row-container-inner,
body.ai20-vi-header-foundation #mobile-header,
body.ai20-vi-header-foundation #mobile-header .site-header-wrap,
body.ai20-vi-header-foundation #mobile-header .site-main-header-wrap,
body.ai20-vi-header-foundation #mobile-header .site-header-row-container-inner {
  background-color: var(--ai20-vi-future-white) !important;
  background-image: none !important;
}

body.ai20-vi-header-foundation #masthead.site-header,
body.ai20-vi-header-foundation #mobile-header {
  min-height: var(--ai20-vi-header-height);
  border-bottom: 1px solid rgba(32, 42, 51, 0.08);
  box-shadow: none;
}

body.ai20-vi-header-foundation #masthead .site-main-header-wrap,
body.ai20-vi-header-foundation #masthead .site-header-row-container-inner,
body.ai20-vi-header-foundation #masthead .site-main-header-inner-wrap,
body.ai20-vi-header-foundation #mobile-header .site-main-header-wrap,
body.ai20-vi-header-foundation #mobile-header .site-header-row-container-inner,
body.ai20-vi-header-foundation #mobile-header .site-main-header-inner-wrap {
  min-height: var(--ai20-vi-header-height);
}

body.ai20-vi-header-foundation #masthead .site-container,
body.ai20-vi-header-foundation #mobile-header .site-container {
  max-width: 1290px;
  padding-left: 24px;
  padding-right: 24px;
}

body.ai20-vi-header-foundation #masthead .site-main-header-inner-wrap {
  align-items: center;
  column-gap: clamp(1rem, 2.5vw, 2rem);
}

/* -------------------------------------------------------------------------
   Temporary text brand — logo-swap ready
   When Custom Logo is uploaded, Kadence typically shows .custom-logo and
   can hide .site-title. Both paths are styled so no header redesign is needed.
   ------------------------------------------------------------------------- */
body.ai20-vi-header-foundation #masthead .site-branding,
body.ai20-vi-header-foundation #mobile-header .site-branding {
  display: flex;
  align-items: center;
  min-height: 40px;
}

body.ai20-vi-header-foundation #masthead .site-branding .brand,
body.ai20-vi-header-foundation #mobile-header .site-branding .brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

body.ai20-vi-header-foundation #masthead .site-title,
body.ai20-vi-header-foundation #mobile-header .site-title {
  margin: 0;
  font-family: var(--ai20-vi-font);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--ai20-vi-graphite);
  text-transform: none;
}

body.ai20-vi-header-foundation #masthead .site-branding .brand:hover .site-title,
body.ai20-vi-header-foundation #mobile-header .site-branding .brand:hover .site-title,
body.ai20-vi-header-foundation #masthead .site-branding .brand:focus-visible .site-title,
body.ai20-vi-header-foundation #mobile-header .site-branding .brand:focus-visible .site-title {
  color: var(--ai20-vi-azure);
}

/* Reserved logo slot — approved master will use Custom Logo / img.custom-logo */
body.ai20-vi-header-foundation #masthead .custom-logo,
body.ai20-vi-header-foundation #mobile-header .custom-logo,
body.ai20-vi-header-foundation #masthead .site-branding img,
body.ai20-vi-header-foundation #mobile-header .site-branding img {
  display: block;
  height: 32px;
  width: auto;
  max-height: 36px;
  max-width: 220px;
  object-fit: contain;
}

@media (max-width: 767px) {
  body.ai20-vi-header-foundation #mobile-header .custom-logo,
  body.ai20-vi-header-foundation #mobile-header .site-branding img {
    height: 28px;
    max-height: 32px;
  }

  body.ai20-vi-header-foundation #mobile-header .site-title {
    font-size: 1rem;
    max-width: 14rem;
  }
}

/* -------------------------------------------------------------------------
   Navigation — Inter / Graphite / Azure
   ------------------------------------------------------------------------- */
body.ai20-vi-header-foundation #masthead .header-navigation,
body.ai20-vi-header-foundation #masthead .header-navigation .menu,
body.ai20-vi-header-foundation #masthead #site-navigation,
body.ai20-vi-header-foundation #mobile-header .mobile-navigation,
body.ai20-vi-header-foundation #mobile-drawer .drawer-nav-drop-wrap,
body.ai20-vi-header-foundation .drawer-navigation {
  font-family: var(--ai20-vi-font);
}

body.ai20-vi-header-foundation #masthead #primary-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.1rem 0.2rem;
}

body.ai20-vi-header-foundation #masthead #primary-menu > .menu-item:not(.ai20-header-cta-item) > a,
body.ai20-vi-header-foundation #masthead .header-navigation .menu > .menu-item:not(.ai20-header-cta-item) > a {
  font-family: var(--ai20-vi-font);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ai20-vi-graphite) !important;
  padding: 0.55rem 0.7rem !important;
  text-decoration: none;
  border-radius: 2px;
  transition: color 160ms ease, background-color 160ms ease;
}

body.ai20-vi-header-foundation #masthead #primary-menu > .menu-item:not(.ai20-header-cta-item) > a:hover,
body.ai20-vi-header-foundation #masthead .header-navigation .menu > .menu-item:not(.ai20-header-cta-item) > a:hover {
  color: var(--ai20-vi-azure) !important;
  background-color: transparent;
}

body.ai20-vi-header-foundation #masthead #primary-menu > .menu-item:not(.ai20-header-cta-item).current-menu-item > a,
body.ai20-vi-header-foundation #masthead #primary-menu > .menu-item:not(.ai20-header-cta-item).current_page_item > a,
body.ai20-vi-header-foundation #masthead #primary-menu > .menu-item:not(.ai20-header-cta-item).current-menu-ancestor > a,
body.ai20-vi-header-foundation #masthead .header-navigation .menu > .menu-item:not(.ai20-header-cta-item).current-menu-item > a,
body.ai20-vi-header-foundation #masthead .header-navigation .menu > .menu-item:not(.ai20-header-cta-item).current_page_item > a {
  color: var(--ai20-vi-azure) !important;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--ai20-vi-azure);
}

/* Keyboard focus — visible Azure ring */
body.ai20-vi-header-foundation #masthead a:focus-visible,
body.ai20-vi-header-foundation #mobile-header a:focus-visible,
body.ai20-vi-header-foundation #mobile-header button:focus-visible,
body.ai20-vi-header-foundation #masthead button:focus-visible,
body.ai20-vi-header-foundation .drawer-navigation a:focus-visible {
  outline: 2px solid var(--ai20-vi-azure);
  outline-offset: 3px;
}

/* -------------------------------------------------------------------------
   Join AI20 CTA — institutional (not pill)
   ------------------------------------------------------------------------- */
body.ai20-vi-header-foundation #masthead .ai20-header-cta-item,
body.ai20-vi-header-foundation #mobile-header .ai20-header-cta-item,
body.ai20-vi-header-foundation .drawer-navigation .ai20-header-cta-item {
  display: flex;
  align-items: center;
  margin-left: 0.5rem;
}

body.ai20-vi-header-foundation #masthead #primary-menu > .ai20-header-cta-item > a.ai20-header-cta,
body.ai20-vi-header-foundation #masthead .header-navigation .menu > .ai20-header-cta-item > a.ai20-header-cta,
body.ai20-vi-header-foundation #masthead .ai20-header-cta,
body.ai20-vi-header-foundation #mobile-header .ai20-header-cta,
body.ai20-vi-header-foundation .drawer-navigation .ai20-header-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-family: var(--ai20-vi-font) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: #ffffff !important;
  background-color: var(--ai20-vi-action, #0f6ae0) !important;
  border: 1px solid var(--ai20-vi-action, #0f6ae0) !important;
  border-radius: 2px !important;
  padding: 0.55rem 1rem !important;
  text-decoration: none !important;
  box-shadow: none !important;
  transition: background-color 160ms ease, border-color 160ms ease;
}

body.ai20-vi-header-foundation #masthead #primary-menu > .ai20-header-cta-item > a.ai20-header-cta:hover,
body.ai20-vi-header-foundation #masthead #primary-menu > .ai20-header-cta-item > a.ai20-header-cta:focus-visible,
body.ai20-vi-header-foundation #masthead .header-navigation .menu > .ai20-header-cta-item > a.ai20-header-cta:hover,
body.ai20-vi-header-foundation #masthead .header-navigation .menu > .ai20-header-cta-item > a.ai20-header-cta:focus-visible,
body.ai20-vi-header-foundation #masthead .ai20-header-cta:hover,
body.ai20-vi-header-foundation #mobile-header .ai20-header-cta:hover,
body.ai20-vi-header-foundation .drawer-navigation .ai20-header-cta:hover,
body.ai20-vi-header-foundation #masthead .ai20-header-cta:focus-visible,
body.ai20-vi-header-foundation #mobile-header .ai20-header-cta:focus-visible,
body.ai20-vi-header-foundation .drawer-navigation .ai20-header-cta:focus-visible {
  background-color: var(--ai20-vi-action-hover, #0b5fc7) !important;
  border-color: var(--ai20-vi-action-hover, #0b5fc7) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* -------------------------------------------------------------------------
   Mobile header / drawer
   ------------------------------------------------------------------------- */
body.ai20-vi-header-foundation #mobile-header .menu-toggle-open,
body.ai20-vi-header-foundation #mobile-header .drawer-toggle {
  color: var(--ai20-vi-graphite) !important;
}

body.ai20-vi-header-foundation #mobile-header .menu-toggle-open:hover,
body.ai20-vi-header-foundation #mobile-header .menu-toggle-open:focus-visible {
  color: var(--ai20-vi-azure) !important;
}

body.ai20-vi-header-foundation #mobile-drawer,
body.ai20-vi-header-foundation .drawer-header,
body.ai20-vi-header-foundation .drawer-inner {
  background-color: var(--ai20-vi-future-white);
  font-family: var(--ai20-vi-font);
}

body.ai20-vi-header-foundation .drawer-navigation .menu > .menu-item:not(.ai20-header-cta-item) > a,
body.ai20-vi-header-foundation #mobile-drawer .menu > .menu-item:not(.ai20-header-cta-item) > a,
body.ai20-vi-header-foundation #mobile-site-navigation .menu > .menu-item:not(.ai20-header-cta-item) > a {
  font-family: var(--ai20-vi-font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ai20-vi-graphite) !important;
  padding: 0.85rem 0;
}

body.ai20-vi-header-foundation .drawer-navigation .menu > .menu-item:not(.ai20-header-cta-item) > a:hover,
body.ai20-vi-header-foundation .drawer-navigation .menu > .menu-item:not(.ai20-header-cta-item).current-menu-item > a,
body.ai20-vi-header-foundation .drawer-navigation .menu > .menu-item:not(.ai20-header-cta-item).current_page_item > a {
  color: var(--ai20-vi-azure) !important;
}

body.ai20-vi-header-foundation .drawer-navigation .ai20-header-cta-item,
body.ai20-vi-header-foundation #mobile-drawer .ai20-header-cta-item,
body.ai20-vi-header-foundation #mobile-site-navigation .ai20-header-cta-item {
  margin: 1rem 0 0;
}

body.ai20-vi-header-foundation .drawer-navigation .ai20-header-cta,
body.ai20-vi-header-foundation #mobile-drawer .ai20-header-cta,
body.ai20-vi-header-foundation #mobile-site-navigation .ai20-header-cta {
  width: 100%;
  padding: 0.85rem 1rem !important;
  color: #ffffff !important;
  background-color: var(--ai20-vi-action, #0f6ae0) !important;
}

/* Prevent horizontal overflow from header chrome */
body.ai20-vi-header-foundation #masthead,
body.ai20-vi-header-foundation #mobile-header {
  max-width: 100%;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  body.ai20-vi-header-foundation #masthead a,
  body.ai20-vi-header-foundation #mobile-header a,
  body.ai20-vi-header-foundation .ai20-header-cta {
    transition: none !important;
  }
}
