/* ============================================================
   site-header.css — shared site header for jimmcgeecoaching.com
   Direction A · "Refined Classic" — left logo · single sticky row.

   PORTABLE COMPONENT. Used on BOTH the static glossary pages AND
   (eventually) the WordPress site. Therefore:
     • all colors are hard-coded brand hex (NO :root tokens that
       could collide with a host page / WP theme)
     • everything is scoped under .site-header
     • the search button uses [data-open-search] so the glossary's
       glossary.js wires it automatically; on WP, point that hook at
       whatever search you use (or remove it)

   Brand: Cinzel(logo art) · Montserrat(nav) · Source Serif 4 · Lato
   sage #748572 · sage-deep #5A6858 · paper #F8F6F1 · ink #1A1A1A
   body #3C3C3C · muted #666 · hairline #E4E0D6
   ============================================================ */

.site-header{position:sticky;top:0;z-index:200;display:block;height:auto;
  font-family:'Montserrat',system-ui,sans-serif;
  background:#fff;border-bottom:1px solid #E4E0D6;
  box-shadow:0 1px 0 rgba(45,57,70,0);transition:box-shadow .25s cubic-bezier(.4,0,.2,1);}
.site-header.is-shrunk{box-shadow:0 6px 22px rgba(45,57,70,.09);}
.site-header a{text-decoration:none;}
.site-header *,.site-header *::before,.site-header *::after{box-sizing:border-box;}

.site-header .hbar__in{
  max-width:1240px;margin:0 auto;padding:0 32px;height:78px;
  display:flex;align-items:center;justify-content:space-between;gap:24px;
  transition:height .28s cubic-bezier(.4,0,.2,1);}
.site-header.is-shrunk .hbar__in{height:60px;}

/* brand / logo — max 40px tall, vertically centered in the bar */
.site-header .brand{display:flex;align-items:center;flex:none;}
.site-header .brand__img{display:block;width:auto;height:40px;transition:height .28s cubic-bezier(.4,0,.2,1);}
.site-header.is-shrunk .brand__img{height:36px;}
/* light logo by default; dark variant swaps in via dark.css */
.site-header .brand__img--dark{display:none;}

/* primary nav */
.site-header .primary{display:flex;align-items:center;gap:22px;margin-left:auto;}
.site-header .nlink{
  position:relative;display:inline-flex;align-items:center;gap:6px;
  font-family:'Montserrat',sans-serif;font-weight:700;font-size:12px;
  letter-spacing:.12em;text-transform:uppercase;color:#3C3C3C;
  background:none;border:none;cursor:pointer;padding:8px 2px;line-height:1;
  white-space:nowrap;transition:color .16s cubic-bezier(.4,0,.2,1);}
.site-header .nlink:hover,.site-header .nlink:focus-visible{color:#5A6858;}
.site-header .nlink.is-on{color:#5A6858;}
.site-header .nlink.is-on::after{content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;background:#748572;border-radius:2px;}
/* split nav item: .nlink is now a real link; .nlink-caret is the dropdown toggle beside it */
.site-header .nlink-caret{display:inline-flex;align-items:center;justify-content:center;
  background:none;border:none;cursor:pointer;color:#3C3C3C;padding:8px 2px;margin-left:2px;line-height:1;
  transition:color .16s cubic-bezier(.4,0,.2,1);}
.site-header .nlink-caret:hover,.site-header .nlink-caret:focus-visible{color:#5A6858;}
.site-header .nlink-caret .caret{transition:transform .2s cubic-bezier(.4,0,.2,1);}
.site-header .hasmenu.is-open > .nlink-caret .caret{transform:rotate(180deg);}

/* Invisible hover-bridge so mouse can travel from trigger → menu
   without the mouseleave closing the dropdown mid-transit */
.site-header .hasmenu::after{
  content:'';position:absolute;top:100%;left:-12px;right:-12px;
  height:16px;display:none;}
.site-header .hasmenu.is-open::after{display:block;}

/* dropdown menu */
.site-header .hasmenu{position:relative;}
.site-header .menu{
  position:absolute;top:calc(100% + 14px);left:50%;transform:translate(-50%,8px);
  min-width:236px;background:#fff;border:1px solid #E4E0D6;border-radius:12px;
  box-shadow:0 14px 40px rgba(45,57,70,.16);padding:8px;
  opacity:0;visibility:hidden;pointer-events:none;z-index:30;
  transition:opacity .18s cubic-bezier(.4,0,.2,1),transform .18s cubic-bezier(.4,0,.2,1),visibility .18s;}
.site-header .hasmenu.is-open .menu{opacity:1;visibility:visible;pointer-events:auto;transform:translate(-50%,0);}
.site-header .menu::before{content:"";position:absolute;top:-7px;left:50%;transform:translateX(-50%) rotate(45deg);
  width:12px;height:12px;background:#fff;border-left:1px solid #E4E0D6;border-top:1px solid #E4E0D6;}
.site-header .menu a{display:flex;flex-direction:column;gap:3px;padding:11px 14px;border-radius:8px;
  color:#1A1A1A;transition:background .14s cubic-bezier(.4,0,.2,1);}
.site-header .menu a:hover{background:#F8F6F1;}
.site-header .menu .mi-t{font-family:'Montserrat',sans-serif;font-weight:700;font-size:12px;letter-spacing:.07em;text-transform:uppercase;line-height:1.2;}
.site-header .menu .mi-d{font-family:'Lato',sans-serif;font-weight:400;font-size:12.5px;letter-spacing:0;text-transform:none;color:#666;line-height:1.35;}

/* actions */
.site-header .haction{display:flex;align-items:center;gap:8px;margin-left:8px;}
.site-header .iconbtn{display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:50%;border:1px solid transparent;background:none;color:#666;cursor:pointer;
  transition:.16s cubic-bezier(.4,0,.2,1);}
.site-header .iconbtn:hover{color:#5A6858;background:#F8F6F1;}

/* sage CTA (carries a dropdown) */
.site-header .cta{display:inline-flex;align-items:center;gap:7px;background:#5A6858;color:#fff;
  padding:12px 18px;border-radius:8px;border:none;cursor:pointer;
  font-family:'Montserrat',sans-serif;font-weight:700;font-size:11px;letter-spacing:.1em;text-transform:uppercase;
  white-space:nowrap;line-height:1;transition:background .16s cubic-bezier(.4,0,.2,1),box-shadow .16s cubic-bezier(.4,0,.2,1);}
.site-header .cta:hover{background:#748572;box-shadow:0 6px 18px rgba(116,133,114,.35);}
.site-header .cta .caret{transition:transform .2s cubic-bezier(.4,0,.2,1);}
.site-header .hasmenu.is-open > .cta .caret{transform:rotate(180deg);}

/* split CTA pill: label is a link (-> work-with-me), caret is the dropdown toggle.
   The pill (.cta--split) keeps the sage background + hover; inner parts supply padding. */
.site-header .cta.cta--split{padding:0;gap:0;overflow:hidden;}
.site-header .cta__label{display:inline-flex;align-items:center;color:#fff;line-height:1;white-space:nowrap;
  font-family:'Montserrat',sans-serif;font-weight:700;font-size:11px;letter-spacing:.1em;text-transform:uppercase;
  padding:12px 9px 12px 18px;}
.site-header .cta__label:hover,.site-header .cta__label:focus-visible{color:#fff;}
.site-header .cta__caret{display:inline-flex;align-items:center;justify-content:center;
  background:none;border:none;cursor:pointer;color:#fff;line-height:1;
  padding:12px 14px 12px 9px;border-left:1px solid rgba(255,255,255,.22);}

/* burger (mobile, WP use) */
.site-header .burger{display:none;width:44px;height:44px;border:none;background:none;cursor:pointer;
  flex-direction:column;justify-content:center;align-items:center;gap:5px;}
.site-header .burger span{display:block;width:23px;height:2px;background:#1A1A1A;border-radius:2px;transition:.25s cubic-bezier(.4,0,.2,1);}
.site-header .burger.is-active span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.site-header .burger.is-active span:nth-child(2){opacity:0;}
.site-header .burger.is-active span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}

/* ---- injected theme toggle (glossary.js puts it in .haction) ---- */
.site-header .nag-theme-toggle{display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:50%;border:1px solid transparent;background:none;color:#666;cursor:pointer;
  transition:.16s cubic-bezier(.4,0,.2,1);}
.site-header .nag-theme-toggle:hover{color:#5A6858;background:#F8F6F1;}

/* ============================================================
   MOBILE DRAWER (shared) — used on WP; on glossary pages the
   existing mobile-bar/sheet owns mobile, so the glossary markup
   omits this and the header itself is hidden < 900px (below).
   ============================================================ */
.site-drawer-scrim{position:fixed;inset:0;background:rgba(26,26,26,.42);backdrop-filter:blur(2px);
  opacity:0;visibility:hidden;transition:opacity .3s cubic-bezier(.4,0,.2,1),visibility .3s;z-index:998;}
.site-drawer-scrim.is-open{opacity:1;visibility:visible;}
.site-drawer{position:fixed;top:0;right:0;height:100%;width:min(360px,86vw);background:#F8F6F1;
  box-shadow:none;transform:translateX(100%);
  transition:transform .34s cubic-bezier(.4,0,.2,1),box-shadow .34s cubic-bezier(.4,0,.2,1);z-index:999;display:flex;flex-direction:column;overflow-y:auto;
  font-family:'Montserrat',sans-serif;}
.site-drawer.is-open{transform:translateX(0);box-shadow:-18px 0 50px rgba(26,26,26,.22);}
/* minimal top bar — just the close button, no logo */
.site-drawer__bar{display:flex;align-items:center;justify-content:flex-end;padding:10px 14px 2px;}
.site-drawer__close{width:42px;height:42px;border:none;background:none;cursor:pointer;color:#1A1A1A;
  display:flex;align-items:center;justify-content:center;border-radius:50%;}
.site-drawer__close:hover{background:#fff;}
/* cta inside drawer — sits between nav and browse */
.site-drawer__cta{margin:4px 22px 12px;}
.site-drawer__search{margin:18px 22px 6px;display:flex;align-items:center;gap:10px;background:#fff;
  border:1.5px solid #E4E0D6;border-radius:12px;padding:13px 16px;color:#666;
  font-family:'Lato',sans-serif;font-size:14px;cursor:pointer;width:calc(100% - 44px);}
.site-drawer__search:hover{border-color:#748572;}
.site-drawer__nav{display:flex;flex-direction:column;padding:10px 12px 20px;}
.site-drawer__nav > a,.site-dacc__btn{font-family:'Montserrat',sans-serif;font-weight:700;font-size:13px;letter-spacing:.08em;
  text-transform:uppercase;color:#1A1A1A;padding:15px 14px;border-radius:10px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;background:none;border:none;width:100%;cursor:pointer;text-align:left;}
.site-drawer__nav > a:hover,.site-dacc__btn:hover{background:#fff;color:#5A6858;}
.site-drawer__nav > a.is-on{color:#5A6858;}
.site-dacc__btn .caret{transition:transform .22s cubic-bezier(.4,0,.2,1);}
.site-dacc.is-open .site-dacc__btn .caret{transform:rotate(180deg);}
.site-dacc__panel{max-height:0;overflow:hidden;transition:max-height .3s cubic-bezier(.4,0,.2,1);}
.site-dacc.is-open .site-dacc__panel{max-height:240px;}
.site-dacc__panel a{display:block;font-family:'Lato',sans-serif;font-size:14.5px;color:#3C3C3C;padding:11px 16px 11px 28px;border-radius:8px;}
.site-dacc__panel a:hover{background:#fff;color:#5A6858;}
.site-drawer__cta{margin:8px 22px 26px;}
.site-drawer__cta .cta{display:flex;width:100%;justify-content:center;padding:15px;font-size:12px;
  background:#5A6858;color:#fff;border-radius:8px;font-family:'Montserrat',sans-serif;font-weight:700;letter-spacing:.1em;text-transform:uppercase;}
.site-drawer__foot{margin-top:auto;padding:20px 24px;border-top:1px solid #E4E0D6;
  font-family:'Lato',sans-serif;font-size:12.5px;color:#666;line-height:1.5;}

/* ============================================================
   GLOSSARY DRAWER — browse list injected by glossary.js into
   .site-drawer__glossary (categories + terms). Keeps the header
   component generic; glossary.js fills the container on glossary
   pages so mobile users can navigate the 78 terms from the drawer.
   ============================================================ */
.site-drawer__glossary{padding:6px 12px 10px;border-top:1px solid #E4E0D6;margin-top:2px;}
.site-drawer__lbl{font-family:'Montserrat',sans-serif;font-weight:700;font-size:11px;letter-spacing:.14em;text-transform:uppercase;color:#666;padding:12px 14px 6px;margin:0;}
.site-drawer__hub{display:block;font-family:'Source Serif 4',Georgia,serif;font-weight:700;font-size:15.5px;color:#1A1A1A;padding:10px 14px;border-radius:8px;text-decoration:none;}
.site-drawer__hub:hover{background:#fff;color:#5A6858;}
.site-dcat{border-bottom:1px solid #EFECE4;}
.site-dcat__btn{font-family:'Source Serif 4',Georgia,serif;font-weight:600;font-size:15px;color:#1A1A1A;padding:13px 14px;border-radius:8px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:none;border:none;width:100%;cursor:pointer;text-align:left;}
.site-dcat__btn:hover{color:#5A6858;}
.site-dcat__btn .caret{transition:transform .22s cubic-bezier(.4,0,.2,1);flex:none;}
.site-dcat.is-open .site-dcat__btn .caret{transform:rotate(180deg);}
.site-dcat__terms{list-style:none;margin:0;padding:0;max-height:0;overflow:hidden;transition:max-height .32s cubic-bezier(.4,0,.2,1);}
.site-dcat.is-open .site-dcat__terms{max-height:1800px;}
.site-dcat__terms a{display:block;font-family:'Lato',sans-serif;font-size:14px;color:#3C3C3C;padding:9px 16px 9px 26px;border-radius:6px;text-decoration:none;}
.site-dcat__terms a:hover{background:#fff;color:#5A6858;}
.site-dcat__terms a.is-on{color:#5A6858;font-weight:700;}

/* ============================================================
   RESPONSIVE
   Collapsed mode hides the inline nav + CTA dropdown and shows the
   burger. The search icon + theme toggle STAY in the bar so they
   are always one tap away. The base component (WP) collapses
   < 920px; the .site-header--glossary modifier collapses < 1024px
   (its logo lockup is wide and the glossary reading layout shifts
   around 900–1024, so it drops to the drawer a little earlier).
   ============================================================ */
@media (max-width:920px){
  .site-header:not(.site-header--glossary) .primary,
  .site-header:not(.site-header--glossary) .haction .hasmenu{display:none;}
  .site-header:not(.site-header--glossary) .burger{display:flex;}
  .site-header:not(.site-header--glossary) .hbar__in{height:64px;}
  .site-header:not(.site-header--glossary) .brand__img{height:38px;}
}
@media (max-width:1023px){
  .site-header--glossary .primary,
  .site-header--glossary .haction .hasmenu{display:none;}
  .site-header--glossary .burger{display:flex;}
  .site-header--glossary .hbar__in{height:64px;padding:0 28px;}
  .site-header--glossary .brand__img{height:38px;}
}
/* Phone — logo + search + burger must fit a 375px viewport */
@media (max-width:599px){
  .site-header--glossary .hbar__in{height:58px;padding:0 16px;gap:16px;}
  .site-header--glossary .brand__img{height:30px;}
  /* No shrink on mobile — keep the bar the same size when scrolled */
  .site-header--glossary.is-shrunk .hbar__in{height:58px;}
  .site-header--glossary.is-shrunk .brand__img{height:30px;}
}
