/* banzaidefense.com: the shared site header (17 Oct; a navigation menu from 20 Oct, approved by
 * Animal). One file, linked by all 12 pages (the parent, /capability, /banzai-defense and its 9
 * sub-pages), so every page draws the same header from the same rules. Self-contained: it carries
 * its own tokens (the parent's), so it looks the same on a page whose own stylesheet differs.
 *
 * Sticky, never hides. Solid on the parent's ground (--ink) by default, which is also what a reader
 * without script gets. Over the parent's and the landing page's photo heroes it is transparent: a
 * tiny inline script in <head> marks <html> .sh-js and toggles .over only while nothing but the
 * hero's photograph is under it (21 Oct: solid the moment any text, button or image reaches it). The change uses the parent's button timing (.2s), and none under reduced motion.
 *
 * Menu: logo, then four plain text links in one style (21 Oct). Below 620px (they fit on one row from 594px,
 * measured with tools/verify/menu_fit.js) the links move into a full-screen panel behind a "Menu" button: a <details>,
 * so it opens and closes with no script; /assets/js/site-head.js adds Escape, closing on a link,
 * and the focus trap.
 */
@font-face { font-family: 'Archivo Expanded'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/assets/fonts/archivo-exp-regular.woff2) format('woff2'); }
@font-face { font-family: 'Archivo Expanded'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/assets/fonts/archivo-exp-medium.woff2) format('woff2'); }

:root { --sh-h: 56px; }
@media (min-width: 900px) { :root { --sh-h: 64px; } }
/* Every in-page anchor lands below the header, with the parent's 16px breathing room. */
html { scroll-padding-top: calc(var(--sh-h) + 16px + env(safe-area-inset-top)); }

.site-head {
  --sh-ink: #0b1017; --sh-on: #ffffff; --sh-on-2: #c3cbd6;
  /* The parent's gutter: 5vw, held to the spine's clearance (64px + 40px) from 900px. */
  --sh-px: clamp(16px, 5vw, 80px);
  position: sticky; top: 0; z-index: 130;
  box-sizing: border-box; height: calc(var(--sh-h) + env(safe-area-inset-top)); margin: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: env(safe-area-inset-top) calc(var(--sh-px) + env(safe-area-inset-right)) 0 calc(var(--sh-px) + env(safe-area-inset-left));
  background: var(--sh-ink); color: var(--sh-on);
  font-family: 'Archivo Expanded', Arial, sans-serif; font-weight: 400; line-height: 1.2;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  transition: background-color .2s;
}
@media (min-width: 900px) { .site-head { --sh-px: max(clamp(20px, 5vw, 80px), 104px); gap: 24px; } }
html.sh-js .site-head.over { background-color: transparent; }
/* An open menu always sits on the dark ground. */
html.sh-js .site-head.over:has(.sh-menu[open]) { background-color: var(--sh-ink); }
@media (prefers-reduced-motion: reduce) { .site-head { transition: none; } }

/* The parent's focus: a white inner ring and an ink outer ring, so one always shows. */
.site-head a:focus-visible, .site-head summary:focus-visible { outline: 2px solid var(--sh-ink); outline-offset: 3px; box-shadow: 0 0 0 3px #fff; border-radius: 2px; }

.site-head .sh-home { display: inline-flex; align-items: center; min-height: 44px; flex: none; transition: opacity .2s; }
/* Where the hero shows the big lockup (data-head-lockup, the parent), the header's logo steps aside
   while the lockup is in view and fades back once it has scrolled out (the state script sets
   .sh-logo-off). Only its opacity changes: it stays in the tab order and the accessibility tree,
   and shows whenever it has keyboard focus or the phone menu is open. */
html.sh-js .site-head.sh-logo-off .sh-home { opacity: 0; }
html.sh-js .site-head.sh-logo-off .sh-home:focus-visible,
html.sh-js .site-head.sh-logo-off:has(.sh-menu[open]) .sh-home { opacity: 1; }
/* After the rule it overrides: no fade under reduced motion. */
@media (prefers-reduced-motion: reduce) { .site-head .sh-home { transition: none; } }
.site-head .sh-home img { display: block; width: auto; height: 28px; }
@media (min-width: 900px) { .site-head .sh-home img { height: 34px; } }

/* The links: the child pages' top-bar link rule (.bar-nav .nl) and its spacing (.bar-nav's gap),
   one style for all five. The current section: white, with the parent's link underline. */
.site-head .sh-list { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); margin: 0; padding: 0; list-style: none; }
.site-head .sh-list li { margin: 0; padding: 0; }
.site-head .sh-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--sh-on-2);
  text-decoration: none; white-space: nowrap; transition: none; }
.site-head .sh-link:hover { color: var(--sh-on); }
.site-head .sh-link[aria-current] { color: var(--sh-on); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 6px; text-decoration-color: rgba(255, 255, 255, .45); }

/* The menu button and panel exist only below 620px. */
.site-head .sh-menu { display: none; }
@media (max-width: 619.98px) {
  .site-head .sh-nav { display: none; }
  .site-head .sh-menu { display: block; }
  .site-head .sh-menu > summary { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
    min-width: 44px; min-height: 44px; padding: 0 2px; font-size: 14px; color: var(--sh-on); cursor: pointer; list-style: none;
    -webkit-tap-highlight-color: transparent; }
  .site-head .sh-menu > summary::-webkit-details-marker { display: none; }
  .site-head .sh-menu .sh-close, .site-head .sh-menu[open] .sh-open { display: none; }
  .site-head .sh-menu[open] .sh-close { display: inline; }
  /* The panel: the rest of the screen below the header row, on the dark ground. */
  .site-head .sh-panel { position: fixed; left: 0; right: 0; bottom: 0; top: calc(var(--sh-h) + env(safe-area-inset-top));
    overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; background: var(--sh-ink);
    padding: 24px calc(var(--sh-px) + env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) calc(var(--sh-px) + env(safe-area-inset-left));
    border-top: 1px solid rgba(255, 255, 255, .12); animation: sh-in .2s ease; }
  .site-head .sh-panel .sh-list { flex-direction: column; align-items: flex-start; gap: 4px; }
  .site-head .sh-panel .sh-link { min-height: 56px; font-size: clamp(24px, 7vw, 32px); font-weight: 500; letter-spacing: -.01em; color: var(--sh-on); }
  /* Nothing behind the open menu scrolls (works with no script too). */
  html:has(.site-head .sh-menu[open]) { overflow: hidden; }
}
@keyframes sh-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .site-head .sh-panel { animation: none; } }

/* A page whose hero sits under the header (data-head-over) pulls it up by the header's height, so
   the photograph runs to the top of the window behind the transparent header. */
.opening[data-head-over] { margin-top: calc(-1 * (var(--sh-h) + env(safe-area-inset-top))); }

/* /capability's skip link (the other pages carry their own .skip). */
.sh-skip { position: absolute; left: 12px; top: -80px; z-index: 140; padding: 12px 16px; background: #fff; color: #0b1017;
  font: 14px/1.2 'Archivo Expanded', Arial, sans-serif; text-decoration: none; }
.sh-skip:focus { top: calc(12px + env(safe-area-inset-top)); }

/* ---------- the shared footer's layout (21 Oct, approved by Animal) ----------
   Logo; "Menu" (the header's four items); on the parent only, "Brands" (Contrails, Banzai Vector:
   Banzai Defense is in the menu, so it appears once); then the legal lines, CAGE, the SDVOSB line
   and the address. Below 900px the two lists sit side by side under the logo; from 900px, four
   columns. The Banzai Defense pages carry no brands column (the parent-only block is taken out at
   build). Column labels "Menu" and "Brands" approved by Animal, 21 Oct; the label style. */
.foot .wrap { display: grid; gap: 24px 20px; align-items: start; }
.foot .foot-list, .foot .foot-brands ul { margin: 0; padding: 0; list-style: none; }
.foot .foot-list li, .foot .foot-brands li { margin: 0; }
.foot .foot-label { margin: 0 0 6px; font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  line-height: 1.4; color: #9aa4b2; }
.foot .foot-list a, .foot .foot-brands a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px;
  color: #c3cbd6; text-decoration: none; }
.foot .foot-list a:hover, .foot .foot-brands a:hover { color: #fff; }
.foot .foot-list a[aria-current] { color: #fff; text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 6px; text-decoration-color: rgba(255, 255, 255, .45); }
.foot .foot-brands a span { margin-left: 5px; }   /* the external mark (a space collapses in a flex link) */
.foot .foot-brands li:not(:has(a)) { display: flex; align-items: center; min-height: 44px; font-size: 14px; color: #9aa4b2; }
.foot .foot-list a:focus-visible, .foot .foot-brands a:focus-visible, .foot .foot-email a:focus-visible {
  outline: 2px solid #0b1017; outline-offset: 3px; box-shadow: 0 0 0 3px #fff; border-radius: 2px; }
@media (max-width: 899.98px) {
  .foot .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot .wrap > .mark, .foot .foot-legal { grid-column: 1 / -1; }
  /* tighter rows on phones; still above the 24px minimum target size */
  .foot .foot-list a, .foot .foot-brands a, .foot .foot-brands li:not(:has(a)) { min-height: 36px; }
}
@media (min-width: 900px) {
  .foot .wrap { grid-template-columns: 240px 170px 170px minmax(0, 1fr); gap: 40px; }
  .foot .wrap:not(:has(.foot-brands)) { grid-template-columns: 240px 170px minmax(0, 1fr); }
}
