/* AIA LB/SB — WordPress two-tier header + slide-out drawer (L1/L2) + breadcrumb.
   Ported from the prototype; scoped to its own components and --aia-* tokens so
   it does not collide with the theme. */
:root {
  --aia-ink: #1a1a1a;
  --aia-paper: #fff;
  --aia-mist: #f4f4f2;
  --aia-line: #e3e2df;
  --aia-muted: #6e6c66;
  --aia-accent: #fa4132;
  --aia-bar: #000;
  --aia-r: 10px;
  --aia-display: Archivo, "Helvetica Neue", Arial, sans-serif;
  --aia-dw: min(372px, 88vw);
  --aia-ease: cubic-bezier(0.4, 0, 0.2, 1);
  /* Header height for the fixed drawer/scrim offsets. The header is now 154px
     at rest (80 eyebrow + 74 main) and reduces to 122px on scroll — body.aia-scrolled
     (toggled in aia-nav.js) swaps the value so the drawer keeps meeting the header. */
  --aia-header-h: 154px;
}
body.aia-scrolled {
  --aia-header-h: 122px;
}
body.aia-no-scroll {
  overflow: hidden;
}

/* ---- two-tier header (sticky, 122px = 48 eyebrow + 74 main) ---- */
.aia-hdr {
  position: sticky;
  top: 0;
  z-index: 300;
  font-family: Inter, system-ui, sans-serif;
}
.aia-hdr ~ * {
  transition: transform 0.34s var(--aia-ease);
}
body.aia-menu-open .aia-hdr ~ * {
  transform: translateX(calc(-1 * var(--aia-dw)));
}
.aia-hdr * {
  box-sizing: border-box;
}
.aia-eyebrow {
  height: 48px;
  background: var(--aia-bar);
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}
.aia-eyebrow__inner {
  max-width: var(--aia-wide, var(--container-xl, 1600px));
  margin: 0 auto;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
}
.aia-enav {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-self: center;
}
.aia-eyebrow a {
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 8px;
  white-space: nowrap;
  line-height: 1;
}
.aia-eyebrow a:hover {
  background: rgba(255, 255, 255, 0.12);
}
.aia-eyebrow a.aia-cta,
.aia-eyebrow .menu-item.aia-cta > a {
  background: var(--aia-accent);
  color: #fff;
  font-weight: 600;
}
.aia-eyebrow ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}
.aia-eyebrow .mem {
  justify-self: end;
}
.aia-mainbar {
  height: 74px;
  background: var(--aia-paper);
  box-shadow: 0 1px 0 var(--aia-line);
}
.aia-mainbar__inner {
  max-width: var(--container-xl, 1600px);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 14px;
}
.aia-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  margin-right: auto;
}
.aia-brand img,
.aia-brand .custom-logo {
  width: auto;
  height: 60px;
  max-width: none;
  display: block;
}
.aia-brand .aia-brand__secondary {
  display: none;
}
.aia-brand .wm {
  font-family: var(--aia-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--aia-ink);
}
.aia-iconbtn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--aia-r);
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.aia-iconbtn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.aia-iconbtn:focus-visible {
  outline: 2px solid var(--aia-accent);
  outline-offset: 2px;
}
.aia-iconbtn.dk {
  width: 38px;
  height: 38px;
}
.aia-iconbtn.line {
  border-color: var(--aia-line);
  color: var(--aia-ink);
}
.aia-iconbtn.line:hover,
.aia-iconbtn.line.active {
  background: var(--aia-mist);
}
/* animated hamburger <-> X */
.aia-burger {
  position: relative;
}
.aia-burger span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.3s var(--aia-ease),
    opacity 0.18s var(--aia-ease);
  transform-origin: center;
}
.aia-burger span:nth-child(1) {
  top: 14px;
}
.aia-burger span:nth-child(2) {
  top: 20px;
}
.aia-burger span:nth-child(3) {
  top: 26px;
}
.aia-burger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.aia-burger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}
.aia-burger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
@media (max-width: 560px) {
  .aia-eyebrow__inner {
    grid-template-columns: auto 1fr auto;
    padding: 0 10px;
  }
  .aia-enav {
    gap: 0;
    justify-self: start;
  }
  .aia-eyebrow a {
    font-size: 12.5px;
    padding: 6px 9px;
  }
  .aia-brand .wm {
    display: none;
  }
}

/* ---- breadcrumb (below the header, scrolls with content) ---- */
.aia-crumb {
  font-family: Inter, system-ui, sans-serif;
  font-size: 12.5px;
  color: var(--aia-muted);
  padding: 12px 22px;
  border-bottom: 1px solid var(--aia-line);
  background: var(--aia-paper);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.aia-crumb__link {
  color: var(--aia-muted);
  text-decoration: none;
}
.aia-crumb__link:hover {
  color: var(--aia-accent);
}
.aia-crumb__sep {
  color: #c9c7c1;
}
.aia-crumb__current {
  color: var(--aia-ink);
  font-weight: 600;
}

/* ---- scrim ---- */
.aia-scrim {
  position: fixed;
  left: 0;
  top: var(--aia-header-h);
  right: 0;
  bottom: 0;
  background: rgba(20, 18, 14, 0.44);
  z-index: 290;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s var(--aia-ease),
    visibility 0.3s var(--aia-ease);
}
.aia-scrim.open {
  opacity: 1;
  visibility: visible;
}

/* ---- drawer ---- */
.aia-drawer {
  position: fixed;
  top: var(--aia-header-h);
  right: 0;
  bottom: 0;
  width: var(--aia-dw);
  background: #eae8e3;
  z-index: 295;
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 28px rgba(0, 0, 0, 0.16);
  border-left: 1px solid var(--aia-line);
  font-family: Inter, system-ui, sans-serif;
  transform: translateX(100%);
  transition: transform 0.34s var(--aia-ease);
}
.aia-drawer.open {
  transform: translateX(0);
}
.aia-dbody {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.aia-track {
  display: flex;
  width: 200%;
  height: 100%;
  transform: translateX(0);
  transition: transform 0.32s var(--aia-ease);
}
.aia-track.l2 {
  transform: translateX(-50%);
}
.aia-panel {
  width: 50%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.aia-panel.l1 {
  display: flex;
  flex-direction: column;
}
.aia-dlist {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}
.aia-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 22px;
  text-decoration: none;
  color: var(--aia-ink);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.aia-item:hover {
  background: var(--aia-mist);
}
.aia-item:focus,
.aia-item:active {
  color: var(--aia-ink);
}
.aia-item:focus-visible {
  outline: 2px solid var(--aia-accent);
  outline-offset: -2px;
}
.aia-item.active:focus,
.aia-item.active:active {
  color: var(--aia-accent);
}
.aia-item .lab {
  flex: 1;
}
.aia-item .chev {
  color: #a9a69e;
  display: flex;
}
.aia-item .ext {
  color: #a9a69e;
  font-size: 13px;
}
.aia-item.active {
  color: var(--aia-accent);
}
.aia-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  background: var(--aia-accent);
  border-radius: 0 2px 2px 0;
}
.aia-l2head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--aia-line);
  cursor: pointer;
  color: var(--aia-muted);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
}
.aia-l2head:hover {
  background: var(--aia-mist);
}
.aia-l2head:focus-visible {
  outline: 2px solid var(--aia-accent);
  outline-offset: -2px;
}
.aia-l2title {
  font-family: var(--aia-display);
  padding: 16px 22px 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--aia-accent);
}
.aia-dfoot {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid var(--aia-line);
}
.aia-dfoot a {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 13px;
  border-radius: var(--aia-r);
  text-decoration: none;
}
.aia-dfoot .p {
  background: var(--aia-accent);
  color: #fff;
}
.aia-dfoot .s {
  border: 1px solid var(--aia-ink);
  color: var(--aia-ink);
}

@media (prefers-reduced-motion: reduce) {
  .aia-scrim,
  .aia-drawer,
  .aia-track,
  .aia-burger span,
  .aia-hdr ~ * {
    transition: none;
  }
}

/* Topbar + menu only: above 1600px drop the inner container so the bars run
   edge-to-edge (content elsewhere stays capped at 1600). Added 2026-06-29. */
@media (min-width: 1600px) {
  .aia-eyebrow__inner,
  .aia-mainbar__inner {
    max-width: none;
  }
}

/* ============================================================================
   Eyebrow adjustments — matches the homepage mockup (localhost:8892/header-nav).
   Bigger at rest (154px), reduces to the shipped 122px on scroll; circular icon
   buttons; square "Join" CTA carrying the style-guide arrow. Added 2026-07-29.
   ============================================================================ */

/* 1 — icon buttons go circular. .aia-eyebrow a (0,1,1) already sets
   border-radius:8px and the member icon is an <a>, so it needs the
   eyebrow-scoped selector too or only the hamburger (a <button>) would round. */
.aia-iconbtn,
.aia-eyebrow a.aia-iconbtn {
  border-radius: 50%;
}

/* 2 — "Join" CTA: square corners + the style-guide arrow. The (0,3,1) selector
   beats .aia-eyebrow a's border-radius:8px. a.aia-cta covers the no-menu fallback. */
.aia-eyebrow .menu-item.aia-cta > a,
.aia-eyebrow a.aia-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 14px;
  border-radius: 0;
}
.aia-cta__arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  border: 1px solid #000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  transition: transform 0.3s cubic-bezier(0.625, 0.05, 0, 1);
}
.aia-cta__arrow svg {
  width: 11px;
  height: 12px;
  display: block;
}
.aia-eyebrow .menu-item.aia-cta > a:hover,
.aia-eyebrow a.aia-cta:hover {
  background: var(--aia-accent);
}
.aia-eyebrow .menu-item.aia-cta > a:hover .aia-cta__arrow,
.aia-eyebrow a.aia-cta:hover .aia-cta__arrow {
  transform: translateX(3px);
}

/* 3 — INITIAL (unscrolled): +16px padding top/bottom, controls at 1.25x.
   80px = 48 content + 32 padding. .aia-hdr * sets box-sizing:border-box, so the
   padding is added to the height rather than eating the 48px row. */
.aia-eyebrow {
  height: 80px;
  padding: 16px 0;
  transition:
    height 0.3s var(--aia-ease),
    padding 0.3s var(--aia-ease);
}
.aia-enav,
.aia-eyebrow .mem {
  transition: transform 0.3s var(--aia-ease);
}
/* scale the nav as a GROUP — scaling Directory and Join separately would leave
   their layout boxes at 1x (transforms don't reflow) and the two would overlap. */
.aia-enav {
  transform: scale(1.25);
  transform-origin: center center;
}
.aia-eyebrow .mem {
  transform: scale(1.25);
  transform-origin: right center;
}

/* 4 — ON SCROLL: reduce to the shipped sizes. */
.aia-hdr.is-scrolled .aia-eyebrow {
  height: 48px;
  padding: 0;
}
.aia-hdr.is-scrolled .aia-enav,
.aia-hdr.is-scrolled .aia-eyebrow .mem {
  transform: scale(1);
}

/* 5 — sign-in icon sized up. .aia-iconbtn.dk (0,2,0) sets 38px, so this needs
   the eyebrow-scoped selector to win. */
.aia-eyebrow .aia-iconbtn.dk {
  width: 44px;
  height: 44px;
}
.aia-eyebrow .mem svg {
  width: 22px;
  height: 22px;
}

/* 6 — MOBILE (<=600px): left-aligned, no scale, tighter bar. */
@media (max-width: 600px) {
  .aia-eyebrow__inner {
    grid-template-columns: auto 1fr auto;
    padding: 0 10px;
  }
  .aia-enav {
    justify-self: start;
    transform-origin: left center;
  }
  .aia-enav,
  .aia-eyebrow .mem {
    transform: none;
  }
  .aia-eyebrow {
    height: 64px;
    padding: 8px 0;
  }
  .aia-hdr.is-scrolled .aia-eyebrow {
    height: 48px;
    padding: 0;
  }
  .aia-brand .aia-brand__primary {
    display: none;
  }
  .aia-brand .aia-brand__secondary {
    display: block;
    width: auto;
    height: auto;
    max-height: 50px;
  }
}

/* 7 — PAST THE BREAKPOINT (<=560px): Directory drops; sign-in back to 38px. Not
   keyed to "Directory" by name, so it holds if more secondary links are added. */
@media (max-width: 560px) {
  .aia-enav .menu-item:not(.aia-cta) {
    display: none;
  }
  .aia-eyebrow .aia-iconbtn.dk {
    width: 38px;
    height: 38px;
  }
  .aia-eyebrow .mem svg {
    width: 20px;
    height: 20px;
  }
}
