.navend { display: flex; align-items: center; gap: var(--sp-3); }
.sitenav .theme { appearance: none; width: 40px; height: 40px; border-radius: 50%; border: var(--border-w) solid var(--border-subtle); background: transparent; color: var(--icon); display: grid; place-items: center; cursor: pointer; padding: 0; transition: border-color .2s ease, transform .3s cubic-bezier(.2,.7,.2,1); }
.sitenav .theme .icon { font-size: 20px; }
.sitenav .theme:hover { border-color: var(--link); }
.sitenav .theme:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* ---- the logo top left: a hover lift and the press pop the icon buttons have (owner-directed 2026-09-28) ---- */
.sitenav .brand svg { transition: transform .3s cubic-bezier(.2, .7, .2, 1), filter .18s ease; }
@media (hover: hover) { .sitenav .brand:hover svg { filter: brightness(1.12); } }
.sitenav .brand:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { .sitenav .brand svg { transition: none; } .sitenav .brand:hover svg { transform: none; } }
/* ---- page to page: an elegant fade, the nav bar holding still (owner-directed 2026-09-27) ---- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; types: page; }
  .sitenav { view-transition-name: sitenav; }
  html:active-view-transition-type(page)::view-transition-old(root) { animation: pg-out .22s cubic-bezier(.4, 0, 1, 1) both; }
  html:active-view-transition-type(page)::view-transition-new(root) { animation: pg-in .42s cubic-bezier(.2, .7, .2, 1) .05s both; }
  @keyframes pg-out { to { opacity: 0; transform: translateY(-6px); filter: blur(2px); } }
  @keyframes pg-in { from { opacity: 0; transform: translateY(10px); filter: blur(2px); } }
}
/* ---- mobile (owner-directed 2026-09-24) ---- */
/* no page is ever wider than the phone: clip, not hidden, so the sticky nav keeps working (both must be clip) */
html, body { overflow-x: clip; }
/* 12-column grids: 11 gaps of 32px outgrew a 375px phone (382px wide page). The gap scales with the grid there */
@media (max-width: 860px) {
  html body .g12, html body .contact .g12, html body .history, html body .mosaic, html body .products, html body .rebrand,
  html body .beat.word, html body .qs, html body .qsec { column-gap: min(var(--sp-5), 2.4%); }
}
/* the menu button and its rollout panel, below 861px where the nav links are hidden */
.navmenu-btn { display: none; appearance: none; width: 40px; height: 40px; border-radius: 50%; border: var(--border-w) solid var(--border-subtle); background: transparent; color: var(--icon); place-items: center; cursor: pointer; padding: 0; transition: border-color .2s ease; }
.navmenu-btn .icon { font-size: 22px; }
.navmenu-btn:hover, .navmenu-btn[aria-expanded="true"] { border-color: var(--link); }
.navmenu-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* the panel drops out from behind the bar: the clip box starts at the bottom edge of the bar (owner-directed 2026-09-24) */
.navmenu-clip { position: fixed; left: 0; right: 0; top: 80px; bottom: 0; z-index: 29; overflow: hidden; pointer-events: none; }
.navmenu { position: absolute; left: 0; right: 0; top: 0; background: var(--background); border-bottom: var(--border-w) solid var(--border-subtle); padding: var(--sp-2) var(--margin) var(--sp-5); max-height: 100%; overflow-y: auto; box-shadow: 0 24px 48px rgba(5, 5, 20, .35);
  transform: translateY(-101%); visibility: hidden; pointer-events: none; transition: transform .42s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .42s; }
.navmenu.open { transform: none; visibility: visible; pointer-events: auto; transition: transform .42s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
.navmenu a.item { display: flex; align-items: center; gap: var(--sp-3); padding: 16px 0; border-bottom: var(--border-w) solid var(--border-subtle); text-decoration: none; color: var(--text-heading); font-family: var(--f-03); font-size: 16px; letter-spacing: .15em; text-transform: uppercase;
  opacity: 0; transform: translateY(-8px); transition: opacity .25s ease, transform .32s cubic-bezier(.2, .7, .2, 1), color .18s ease; }
.navmenu.open a.item { opacity: 1; transform: none; }
.navmenu a.item .icon { font-size: 22px; color: var(--link); margin: 0; }
.navmenu a.item[aria-current="page"] { color: var(--link); }
.navmenu a.item:hover { color: var(--link); }
.navmenu .btn { display: flex; justify-content: center; width: 100%; margin-top: var(--sp-5); }
@media (max-width: 860px) { .navmenu-btn { display: grid; } }
.navscrim { position: fixed; left: 0; right: 0; top: 80px; bottom: 0; z-index: 28; background: color-mix(in srgb, var(--ground-deep) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); touch-action: none;
  opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s; }
.navscrim.open { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
html.navlock { overflow-y: hidden; }
@media (min-width: 861px) { .navmenu-clip, .navmenu, .navscrim { display: none; } }
@media (prefers-reduced-motion: reduce) { .navmenu, .navmenu a.item, .navscrim { transition: none; transform: none; } }
:root { color-scheme: dark; } :root[data-theme="light"] { color-scheme: light; }
/* ---- the theme change, animated (owner-directed 2026-09-22) ---- */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
  /* only while the switch is running: a standing rule here would lag every hover on the site */
  .theming, .theming *, .theming *::before, .theming *::after {
    transition: background-color .34s ease, color .34s ease, border-color .34s ease, fill .34s ease, outline-color .34s ease !important;
  }
  .sitenav .theme.turning .icon { animation: theme-turn .42s cubic-bezier(.2, .7, .2, 1); }
  /* the icon pop on press, every button and link with an icon (owner-directed 2026-09-24) */
  .ic-pop { animation: ic-pop .42s cubic-bezier(.2, .7, .2, 1); }
  @keyframes ic-pop { 0% { transform: scale(1); } 40% { transform: scale(1.3); } 100% { transform: scale(1); } }
  @keyframes theme-turn {
    0%   { transform: scale(1); opacity: 1; }
    45%  { transform: scale(.7); opacity: .25; }
    100% { transform: scale(1); opacity: 1; }
  }
}
