/* ── The nav without pills (DESIGN_SYSTEM.md, Shape). Plain text links; the current page
   is terracotta with the handwritten underline; Let's chat is the one button. Every page uses this
   markup; tools/site/nav-v2.js writes it. ── */
.nv-row { display: flex; align-items: center; justify-content: center; gap: var(--space-32); }
.nv-top { padding: var(--space-16) var(--space-32) 0; transition: opacity var(--duration-base) var(--ease); }
.nv-link { position: relative; display: inline-flex; align-items: center; min-height: var(--space-48); font-size: var(--small-size); line-height: var(--small-line); color: var(--ink); }
.nv-link:hover { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
/* the current page: terracotta text and the handwritten underline, so colour isn't the only signal */
.nv-link[aria-current], .nv-m-item[aria-current]:not(.nv-m-chat) { color: var(--accent-text); }
.nv-link[aria-current] { text-decoration: none; }
/* the current page: the handwriting font's underscore stroke, as on the active tab */
.nv-mark { position: absolute; left: calc(var(--space-4) * -1); right: calc(var(--space-4) * -1); bottom: var(--space-4); height: var(--space-8); color: var(--accent); pointer-events: none; }
.nv-mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.nv-mark path { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
/* Let's chat: a main button at --radius-control, slim enough to sit with the text line, with
   its tap area reaching past 44px above and below. Cream, with the rolling label on hover and
   focus (tokens.css), and ink with no roll on its own page. The outline is an inset shadow: a 1.5px border
   rounds to 1px on 1x screens and would change the width. */
.nv-cta { position: relative; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: calc(var(--small-line) + var(--space-12)); padding: 0 calc(var(--space-12) + 2px); border: 0; border-radius: var(--radius-control); background: var(--page); box-shadow: inset 0 0 0 var(--stroke-button) var(--ink); color: var(--ink); font-family: var(--font-sans); font-size: var(--small-size); line-height: var(--small-line); font-weight: var(--weight-medium); white-space: nowrap; cursor: pointer; }
.nv-cta { font-kerning: none; } /* the label's split letters can't kern, so every state measures the same */
.nv-cta::after { content: ''; position: absolute; inset: calc(var(--space-8) * -1) 0; }
.nv-cta:hover { color: var(--ink); }
.nv-cta[aria-current] { background: var(--ink); color: var(--ink-inverse); }
.nv-cta:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.nv-cta[aria-current] { cursor: default; }
.nv-link:focus-visible, .nv-burger:focus-visible, .nv-m-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: var(--space-4); }

/* scrolled: the same row on a lightly frosted bar with a hairline, sliding down. The page
   colour stays at 90%, the least that keeps the terracotta current page at 4.5:1 over the dark footer. */
.nv-fixed { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: var(--space-8) var(--space-32); background: color-mix(in srgb, var(--page) 90%, transparent); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--rule); transition: opacity var(--duration-base) var(--ease), transform var(--duration-base) var(--ease); }

/* phones: a flat bar (transparent at the top of the page, frosted once scrolled or open)
   and a list that drops down from behind it, on the same frost. The layers are stacked
   menu, frost, bar, so the list slides out from under the bar. */
.nv-m { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: none; }
.nv-m::before { content: ''; position: absolute; inset: 0; z-index: 1; background: color-mix(in srgb, var(--page) 90%, transparent); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--rule); opacity: 0; transition: opacity var(--duration-base) var(--ease); }
.nv-m[data-scrolled="1"]::before, .nv-m[data-open="1"]::before { opacity: 1; }
.nv-m-bar { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: var(--space-8); padding: var(--space-8) var(--space-16); }
.nv-m-actions { display: flex; align-items: center; gap: var(--space-8); }
.nv-burger { display: flex; align-items: center; justify-content: center; width: var(--space-48); height: var(--space-48); padding: 0; border: 1px solid var(--rule); border-radius: var(--radius-round); background: transparent; color: var(--ink); cursor: pointer; }
.nv-burger .nv-i-close, .nv-m[data-open="1"] .nv-burger .nv-i-open { display: none; }
.nv-m[data-open="1"] .nv-burger .nv-i-close { display: block; }
/* open, the bar's Let's chat steps aside for the list (it's the list's last item), except on
   its own page, where the filled frame is what marks the current page */
.nv-m[data-open="1"] .nv-m-actions .nv-cta:not([aria-current]) { display: none; }
.nv-m-menu { position: absolute; top: 100%; left: 0; right: 0; z-index: 0; display: flex; flex-direction: column; padding: 0 var(--space-16) var(--space-24); background: color-mix(in srgb, var(--page) 90%, transparent); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); border-bottom: 1px solid var(--rule); visibility: hidden; opacity: 0; transform: translate3d(0, -100%, 0); transition: opacity var(--duration-base) var(--ease), transform var(--duration-base) var(--ease), visibility 0s linear var(--duration-base); }
.nv-m[data-open="1"] .nv-m-menu { visibility: visible; opacity: 1; transform: none; transition: opacity var(--duration-base) var(--ease), transform var(--duration-slow) var(--ease), visibility 0s; }
.nv-m-item { display: flex; align-items: center; min-height: var(--space-64); border-bottom: 1px solid var(--rule); font-family: var(--font-serif); font-size: var(--h2-size); line-height: var(--h2-line); letter-spacing: var(--serif-tracking); color: var(--ink); opacity: 0; transform: translate3d(0, calc(var(--space-12) * -1), 0); transition: opacity var(--duration-quick) var(--ease), transform var(--duration-quick) var(--ease); }
.nv-m-item:last-child { border-bottom: 0; }
/* opening, the items settle in one after another as the list drops; closing, they go together */
.nv-m[data-open="1"] .nv-m-item { opacity: 1; transform: none; transition: opacity var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease); }
.nv-m[data-open="1"] .nv-m-item:nth-child(1) { transition-delay: 60ms; }
.nv-m[data-open="1"] .nv-m-item:nth-child(2) { transition-delay: 110ms; }
.nv-m[data-open="1"] .nv-m-item:nth-child(3) { transition-delay: 160ms; }
.nv-m[data-open="1"] .nv-m-item:nth-child(4) { transition-delay: 210ms; }
.nv-m-text { position: relative; }
.nv-m-item .nv-mark { bottom: calc(var(--space-4) * -1); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .nv-fixed, .nv-m::before, .nv-m-menu { background: var(--page); } }
@media (prefers-reduced-motion: reduce) {
  .nv-top, .nv-fixed, .nv-m::before, .nv-m-menu, .nv-m[data-open="1"] .nv-m-menu, .nv-m-item, .nv-m[data-open="1"] .nv-m-item { transition: none; }
  .nv-m-menu, .nv-m-item { transform: none; }
}

/* the pixel page theme (/cat-tree only): the current page's underline is drawn in pixels, from the
   top of the handwritten one's box, so nothing around it moves (cat-tree.js draws it). */
[data-theme="pixel"] .nv-mark svg { position: absolute; left: 0; top: 0; width: auto; height: auto; }
[data-theme="pixel"] .nv-mark path { fill: currentColor; stroke: none; }
[data-theme="pixel"] .nv-mark:not([data-px]) svg { visibility: hidden; }

/* Let's chat in the pixel frame, at the standard
   button's exact size (2px frame + 4px and 12px padding = the same box), with its hover,
   focus and no press */
[data-theme="pixel"] .nv-cta.px-frame { height: auto; padding: var(--s); border-radius: 0; background: none; box-shadow: none; }
[data-theme="pixel"] .nv-cta.px-frame:hover, [data-theme="pixel"] .nv-cta.px-frame:focus-visible { background: none; color: var(--ink); }
[data-theme="pixel"] .nv-cta.px-frame:hover .px-frame-fill, [data-theme="pixel"] .nv-cta.px-frame:focus-visible .px-frame-fill { color: var(--ink-inverse); }
[data-theme="pixel"] .nv-cta.px-frame:active { transform: none; }
/* no arrow here, so this padding takes its place and the nav doesn't shift between pages */
/* the frame is one pixel unit thick, so the padding gives back whatever it takes over 2px */
[data-theme="pixel"] .nv-cta.px-frame .px-frame-fill { padding-top: calc(var(--space-4) + 2px - var(--s)); padding-bottom: calc(var(--space-4) + 2px - var(--s)); }
@media (min-width: 768px) { [data-theme="pixel"] .nv-cta.px-frame .px-frame-fill { padding-left: calc(var(--space-12) + var(--space-8) + 2px - var(--s)); padding-right: calc(var(--space-12) + var(--space-8) + 2px - var(--s)); } }
