/* VoiceAlign marketing topbar. One definition, four pages.
 *
 * Why this file exists: index, how-it-works, inspiration and agents each carried their own
 * hand-copied nav block. They were identical on the day they were written and had drifted by
 * 2026-09-11 into a topbar that visibly moved as you navigated. Measured at 1440px:
 *
 *   page            body fs   CTA box        .nav-link h   .nav-actions w
 *   /               15px      159.8 x 47.3   20.1          357.4
 *   /how-it-works   15px      155.8 x 44.0   44.0          354.2
 *   /inspiration    16px      167.9 x 49.6   20.8          366.3
 *   /agents         16px      167.9 x 49.6   20.8          365.5
 *
 * Three separate causes. (1) `.button` never declared a font-size, so the CTA inherited `body`,
 * which is 15px on two pages and 16px on the other two. (2) how-it-works had been rewritten onto
 * the token scale and so used a third pill geometry. (3) `.nav-link` was a 44px inline-flex box on
 * one page and bare inline text on the rest. Because `.site-nav` is `space-between` with the brand
 * pinned left, every width change slid the whole right cluster: 12px of travel, plus a CTA pill
 * that changed size inside a bar whose height never did.
 *
 * HOW TO USE IT, and the part that is load-bearing:
 * link this file in <head> BEFORE the page's own inline <style>. The nav-owned rules below are
 * written at two-class specificity (`.nav-actions .button`, `.site-nav .nav-link`) so they beat a
 * page's single-class `.button`, which each page still needs for its hero and footer buttons. The
 * ordering matters for the reverse case: a page's own `.nav-actions .button` inside a media query
 * ties on specificity and wins on source order, which is how the mobile overrides still apply.
 *
 * Anything that differs per page belongs in the page, not here. Right now that is exactly one
 * thing: which link carries aria-current="page".
 *
 * Guarded by voicealign-nav.test.js. Adding a fifth page means linking this file, not copying it.
 */

.site-header {
  position: sticky;
  top: 0;
  /* Deliberately below every page's skip-link (100 on index, 40 on inspiration and agents, 200 on
     how-it-works). how-it-works previously matched its skip-link at 200 and covered it on DOM
     order, so the keyboard entry point was invisible on the one page that set it highest. */
  z-index: 20;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--paper-rule);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}

.site-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  color: var(--ink);
}

.site-nav .brand-mark {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1;
}

.nav-actions { display: flex; align-items: center; gap: 20px; }

/* 44px tall so the link is a real tap target, which it was on one page out of four. The height
   does not move anything: .nav-actions centres its children. */
.site-nav .nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav .nav-link[aria-current="page"] { color: var(--ink); font-weight: 700; }
.site-nav .nav-link:hover, .site-nav .nav-link:active { color: var(--ink); }

/* The CTA. font-size is stated, never inherited, because inheriting from body is what made this
   pill three different sizes. */
.nav-actions .button {
  min-height: 44px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.nav-burger { display: none; }
.nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  border-bottom: 1px solid var(--paper-rule);
  background: var(--paper);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--ink) 10%, transparent);
}
.nav-menu[hidden] { display: none; }
.nav-menu-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--paper-rule);
  color: var(--ink-2);
  font-size: 15px;
  /* Stated, not inherited. body line-height is 1.55 on two pages and 1.6 on the other two, which
     is the same drift as the CTA font-size, one layer down: it made the open menu 92.5px on two
     pages and 94px on the rest. */
  line-height: 1.35;
  font-weight: 600;
  text-decoration: none;
}
.nav-menu-link:first-child { border-top: 0; }
.nav-menu-link[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav-menu-link:hover { color: var(--ink); }
.nav-menu-open { display: none; }

@media (max-width: 39.999rem) {
  .site-nav { min-height: 68px; }
  .site-nav .nav-link { display: none; }
  .nav-burger {
    display: grid;
    gap: 4px;
    place-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 0;
    border: 1px solid var(--paper-rule);
    border-radius: 10px;
    background: var(--paper);
    cursor: pointer;
  }
  .nav-burger span { width: 16px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform 160ms ease, opacity 160ms ease; }
  .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-actions { gap: 10px; }
  .nav-actions .button { min-height: 40px; padding: 8px 13px; font-size: 13.5px; }
}

@media (max-width: 22rem) {
  .nav-actions > .button { display: none; }
  .nav-menu-open { display: flex; }
}
