/* ============================================================
   layout.css — the page chrome duplicated on every page
   Load order: base -> layout -> components -> home -> responsive
   ============================================================ */

/* NAVIGATION */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(244,246,242,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-mid);
  box-shadow: 0 1px 16px rgba(53,109,91,0.06);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 40px;
}
/* White-bg logo: mix-blend-mode multiply makes white pixels invisible on light bg */
.nav-logo img {
  height: 48px;
  width: auto;
  mix-blend-mode: multiply;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--vg); }
.nav-cta {
  padding: 9px 22px !important;
  border: 1px solid var(--border-gold) !important;
  color: var(--gold) !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--gold-tint) !important; color: var(--gold) !important; }

/* MOBILE NAV — hamburger toggle + drawer.
   Both are display:none HERE and are switched on ONLY inside
   @media (max-width: 900px) in responsive.css, which loads last. Never give
   either an unconditional `display` in this file: that is the single edit
   that would change the desktop nav at every width. */
.nav-toggle {
  display: none;               /* -> flex at <=900px, in responsive.css */
  align-items: center;
  justify-content: center;
  width: 44px;                 /* minimum comfortable touch target */
  height: 44px;
  margin-right: -10px;         /* pull the 44px hit area back onto the 40px gutter */
  background: none;
  border: 1px solid var(--border-mid);
  color: var(--text-mid);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
/* 0,2,0 — outranks the display:flex in responsive.css, so the `hidden`
   attribute still wins inside the media query. This is what keeps a no-JS
   visitor from seeing a button that does nothing. */
.nav-toggle[hidden] { display: none; }
.nav-toggle:hover { color: var(--vg); border-color: var(--vg); }
.nav-toggle:focus-visible { outline: 2px solid var(--vg); outline-offset: 2px; }
.nav-toggle svg { display: block; }
/* Icon is driven straight off aria-expanded, so a wrong attribute is a
   visibly wrong icon. */
.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Sibling of <nav>, never a child — see the comment in partials/nav.html.
   top:72px mirrors .nav-inner's height (line 21 above); keep them in sync. */
.nav-drawer {
  display: none;               /* -> block at <=900px, in responsive.css */
  position: fixed;
  top: 72px;
  left: 0; right: 0; bottom: 0;
  z-index: 99;                 /* below nav's 100: the bar stays on top and clickable */
  background: var(--bg);
  border-top: 1px solid var(--border-mid);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  visibility: hidden;          /* removes the subtree from the a11y tree AND the
                                  tab order — no aria-hidden to keep in sync */
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
}
/* transform here is safe: the panel is a sibling of <nav>, not an ancestor of
   the logo <img>, so the logo's mix-blend-mode is untouched. */
body.nav-open .nav-drawer {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s;
}
.nav-drawer-links { list-style: none; padding: 8px 40px 40px; }
.nav-drawer-links li { border-bottom: 1px solid var(--border); }
.nav-drawer-links li:last-child { border-bottom: none; }
.nav-drawer-links a {
  display: block;
  padding: 20px 0;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  transition: color 0.2s;
}
.nav-drawer-links a:hover,
.nav-drawer-links a:focus-visible { color: var(--vg); }
/* Written as `a.nav-drawer-cta` (0,3,0) to outrank `.nav-drawer-links a`
   (0,2,0) — the same collision that forced the !important pile on .nav-cta
   above, solved with specificity instead. Do NOT add !important, and do NOT
   reuse class="nav-cta": its `padding: 9px 22px !important` would destroy the
   touch target. */
.nav-drawer-links a.nav-drawer-cta {
  margin-top: 28px;
  padding: 18px 0;
  border: 1px solid var(--border-gold);
  color: var(--gold);
  text-align: center;
  transition: background 0.2s;
}
.nav-drawer-links a.nav-drawer-cta:hover { background: var(--gold-tint); color: var(--gold); }

/* FOOTER */
footer {
  border-top: 1px solid var(--border-mid);
  background: var(--vg-dark);
  position: relative;
  z-index: 1;
}
.footer-grid {
  padding: 60px 40px 44px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 48px;
}
/* Dark footer — use the black-bg logo with screen blend */
.footer-brand img {
  height: 72px;
  width: auto;
  mix-blend-mode: screen;
  margin-bottom: 18px;
  display: block;
}
.footer-brand p {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  line-height: 1.75;
  max-width: 240px;
}
.footer-col h4 {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-col ul a {
  font-family: var(--font-ui);
  font-size: var(--fs-ui-sm);
  font-weight: 400;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: rgba(255,255,255,0.9); }
.footer-bottom {
  padding: 22px 40px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.footer-bottom p {
  font-family: var(--font-ui);
  font-size: var(--fs-ui-sm);
  font-weight: 400;
  color: rgba(255,255,255,0.35);
}
.itar-badge {
  font-family: var(--font-ui);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(184,137,30,0.4);
  padding: 5px 12px;
}

