/* Shared site header. Loaded by the landing (lab/shell.html) and injected into the subpages by lab/serve.py,
   so every page carries the same header. Self-contained: no dependency on the page's own tokens.
   Behaviour follows the reference header: full-width row; on hover the whole header turns white and a
   full-width sheet opens under it, items aligned with the first link, appearing one after another. */
@font-face { font-family: 'Alexandria Brand Display'; src: url('/home/assets/AlexandriaBrandDisplay-SemiBold.woff2') format('woff2'); font-weight: 600; }
.alx-nav { --ink: #0B0B0A; --paper: #F7F7F5; --line: #E6E6E2; --muted: #7C807D; --pad: 24px; --h: 60px; --x: 194px;
  position: fixed; inset: 0 0 auto; z-index: 50; color: var(--ink); font: 400 16px/1.3 'Geist', system-ui, sans-serif; letter-spacing: 0; transition: color .25s, background .3s, box-shadow .3s; }
.alx-nav *, .alx-nav *::before, .alx-nav *::after { box-sizing: border-box; }
.alx-nav a { color: inherit; text-decoration: none; }
.alx-nav button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.alx-nav .nw { position: relative; display: flex; align-items: center; height: var(--h); padding-inline: var(--pad); }
.alx-nav .wm { font-family: 'Alexandria Brand Display', serif; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 22px; line-height: 1; }
.alx-nav .links { height: 100%; margin-left: clamp(28px, 4vw, 56px); display: flex; align-items: stretch; gap: clamp(24px, 3vw, 42px); }
.alx-nav .top { display: inline-flex; align-items: center; height: 100%; transition: opacity .2s; }
.alx-nav.open .grp:not(.open) .top { opacity: .55; }
.alx-nav .cta { margin-left: auto; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; background: var(--ink); color: #fff; border: 1px solid var(--ink); white-space: nowrap; transition: background .25s, border-color .25s, color .25s; }
.alx-nav .cta:hover { background: #2a2a28; }
/* the white sheet: covers the header row and opens downward to the height of the open menu (--mh from nav.js) */
.alx-nav::before { content: ''; position: absolute; inset: 0 0 auto; height: calc(var(--h) + var(--mh, 0px)); background: linear-gradient(268deg, #fff 0%, #FAFAFA 100%); border-bottom: 1px solid var(--line); z-index: -1; opacity: 0; clip-path: inset(0 0 calc(100% - var(--h)) 0); transition: clip-path .34s cubic-bezier(.2,.7,.2,1), height .34s cubic-bezier(.2,.7,.2,1), opacity .2s; pointer-events: none; }
.alx-nav.open::before { opacity: 1; clip-path: inset(0); }
.alx-nav.open { color: var(--ink) !important; background: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; box-shadow: none !important; }
.alx-nav.open .cta { color: #fff; background: var(--ink); border-color: var(--ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
.alx-nav .menu { position: fixed; top: var(--h); left: 0; width: 100%; color: var(--ink); visibility: hidden; pointer-events: none; }
.alx-nav .grp.open .menu { visibility: visible; pointer-events: auto; }
.alx-nav .mi { padding: 10px var(--pad) 26px var(--x); }
.alx-nav .items { display: grid; grid-auto-flow: column; grid-template-rows: repeat(var(--r, 3), auto); justify-content: start; gap: 2px clamp(40px, 5vw, 80px); }
.alx-nav .items a { display: block; padding: 6px 0; white-space: nowrap; }
.alx-nav .items b { font-weight: 400; font-size: 17px; line-height: 1.25; transition: color .15s; }
.alx-nav .items a:hover b, .alx-nav .items a:focus-visible b { color: var(--muted); } .alx-nav .items a:focus-visible { outline: none; }
/* a product without a page yet: listed, not a link, with a small tag behind its name */
.alx-nav .items a.na { cursor: default; } .alx-nav .items a.na:hover b { color: inherit; } .alx-nav .items small { margin-left: 7px; font-size: 12px; color: var(--muted); }
/* items and the feature come in one after another, as the sheet opens */
.alx-nav .items a { opacity: 0; transform: translateY(6px); transition: opacity .12s, transform .12s; }
.alx-nav .grp.open .items a { opacity: 1; transform: none; transition: opacity .42s calc(.1s + var(--i, 0) * .055s), transform .5s calc(.1s + var(--i, 0) * .055s) cubic-bezier(.2,.7,.2,1); }
.alx-nav .burger { display: none; margin-left: 10px; height: 36px; padding: 0 12px; border: 1px solid currentColor; border-radius: 999px; font-size: 14px; }
/* states */
.alx-nav.scrolled { background: rgba(247,247,245,.94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.alx-nav.dark-under, .alx-nav.on-dark { color: #fff; background: linear-gradient(rgba(8,9,9,.55), rgba(8,9,9,0)); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.alx-nav.dark-under .cta, .alx-nav.on-dark .cta { color: var(--ink); background: #fff; border-color: #fff; }
.alx-nav.dark-under .cta:hover, .alx-nav.on-dark .cta:hover { background: #ECECE8; }
.alx-nav.on-dark.scrolled { background: rgba(18,20,19,.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(255,255,255,.1); }
/* open always wins over the on-photo / on-dark look */
.alx-nav.open .cta, .alx-nav.open.dark-under .cta, .alx-nav.open.on-dark .cta { color: #fff; background: var(--ink); border-color: var(--ink); }
/* narrow: links fold into one panel under the header */
@media (max-width: 820px) {
  .alx-nav { --pad: 16px; }
  .alx-nav::before { display: none; }
  .alx-nav .burger { display: inline-flex; align-items: center; }
  .alx-nav .links { display: none; position: absolute; inset: var(--h) 0 auto; margin-left: 0; height: auto; padding: 8px var(--pad) 20px; background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100svh - var(--h)); overflow: auto; }
  .alx-nav.menu-open .links { display: flex; }
  .alx-nav .grp { border-bottom: 1px solid var(--line); padding-block: 8px; } .alx-nav .grp:last-child { border-bottom: 0; }
  .alx-nav .top { height: auto; padding: 8px 0; color: var(--muted); pointer-events: none; }
  .alx-nav .menu { position: static; width: auto; visibility: visible; pointer-events: auto; }
  .alx-nav .mi { display: block; padding: 0; } .alx-nav .items { display: block; }
  .alx-nav .items a, .alx-nav .grp.open .items a { display: block; padding: 8px 0; opacity: 1; transform: none; transition: none; } .alx-nav .items b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .alx-nav, .alx-nav::before, .alx-nav .items a { transition: none !important; } }

/* In-page anchors (#apply, #products-top ...) land below the fixed header. */
html { scroll-padding-top: 88px; }

/* Footer and header links: at least 44 px tall to tap on phones. */
@media (pointer: coarse), (max-width: 760px) {
  .b-ft .grp a, .b-ft a.wm, .im-rows a { display: inline-block; padding-block: 11px; margin-block: -11px; }
  .alx-nav .wm { display: inline-block; padding-block: 11px; margin-block: -11px; }
}
