/* ==========================================================================
   wosh.productions — shared site navigation
   --------------------------------------------------------------------------
   Lifted out of the July 2026 redesign (the block fenced as WOSH NAV CSS).
   Pairs with the markup in every page's <nav class="site-nav"> and with
   /nav.js, which handles the burger, the scroll hairline and marking the
   current page.

   Self-contained on purpose: it sets its own font-family, line-height and
   list resets so it cannot inherit a page's article typography. That drift —
   a shared block quietly picking up `li { font-size }` from prose CSS — is
   exactly what broke the footer before it was centralised.

   Load after /site.css (it uses the tokens) and before the page's own
   <style>. See the load-order note at the top of /site.css.
   ========================================================================== */

@font-face {
  font-family: 'Google Sans';
  src: url('/Google_Sans/GoogleSans-VariableFont_GRAD,opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* The bar is position:fixed, so it takes no space in flow. Pages that were
   built before it existed have no top offset of their own; this spacer gives
   them one without touching their own layout rules. Pages built on site.css
   use .page-head's padding instead and never render a spacer. */
/* The bar is fixed, so anything the browser scrolls to would land underneath
   it. scroll-padding-top on the scroll container fixes both cases at once:
   #anchor jumps, and scroll-snap layouts like /en/ where `scroll-snap-type: y
   mandatory` snaps a 100svh section flush to y=0 and puts its heading behind
   the bar. This replaces the per-section scroll-margin-top that site.css used
   to set, so the offset is applied once rather than twice. */
html {
  scroll-padding-top: var(--nav-h, 68px);
}

.site-nav-spacer {
  height: var(--nav-h, 68px);
  flex: none;
}

.site-nav {
  /* margin/padding reset explicitly: several older pages carry a bare
     `nav { padding: … }` rule, and .site-nav wins on specificity only for the
     properties it actually declares. */
  margin: 0;
  padding: 0;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  height: var(--nav-h, 68px);
  font-family: var(--font, 'Google Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  line-height: normal;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), background .3s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.site-nav[data-scrolled="true"] {
  border-bottom-color: var(--hairline, rgba(0, 0, 0, 0.12));
}

/* Self-sufficient rather than relying on .shell: the markup keeps the .shell
   class for pages built on site.css, but these declarations mean the bar is
   also correctly gutter-aligned on older pages that never load it. Same values
   as .shell, so the two agree wherever both apply. */
.site-nav__inner {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--shell, 1320px);
  margin-inline: auto;
  padding-inline: var(--gutter, clamp(1.25rem, 5vw, 4.5rem));
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav *,
.site-nav *::before,
.site-nav *::after {
  box-sizing: border-box;
}

.site-nav__brand {
  /* Explicit colour, not inherited. site.css sets `a { color: inherit }`, but on
     pages that do not load it there is nothing to stop the UA default link
     colour applying — which rendered the wordmark in #0000EE on all 27
     pages that carry only nav.css. */
  color: var(--ink, #000000);
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  text-decoration: none;
  white-space: nowrap;
  margin-right: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 1.8vw, 1.9rem);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .9rem;
}

.site-nav__list li {
  margin: 0;
  padding: 0;
  font-size: inherit;
  line-height: normal;
}

.site-nav__list a {
  position: relative;
  text-decoration: none;
  color: var(--muted, rgba(0, 0, 0, 0.58));
  white-space: nowrap;
  transition: color .25s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.site-nav__list a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.site-nav__list a:hover {
  color: var(--ink, #000000);
}

.site-nav__list a:hover::after {
  transform: scaleX(1);
}

/* /nav.js sets aria-current="page" from location.pathname, so the markup is
   byte-identical on every page and there is no per-page value to forget. */
.site-nav__list a[aria-current="page"] {
  color: var(--ink, #000000);
}

.site-nav__list a[aria-current="page"]::after {
  transform: scaleX(1);
}

/* Carries the whole pill button, not just its overrides. On pages built on
   site.css the markup also has .btn.btn--solid and the two agree; on older
   pages there is no .btn rule at all and this is the only thing keeping the
   CTA from rendering as bare text. */
.site-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font: inherit;
  font-size: .88rem;
  font-weight: 500;
  line-height: normal;
  padding: .55rem 1.15rem;
  border-radius: 100px;
  border: 1px solid var(--ink, #000000);
  background: var(--ink, #000000);
  color: var(--paper, #ffffff);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .3s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.site-nav__cta:hover {
  transform: translateY(-2px);
  color: var(--paper, #ffffff);
}

.site-nav__lang {
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted, rgba(0, 0, 0, 0.58));
  padding-left: 1.1rem;
  border-left: 1px solid var(--hairline, rgba(0, 0, 0, 0.12));
}

.site-nav__lang:hover {
  color: var(--ink, #000000);
}

.site-nav__burger {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--ink, #000000);
}

.site-nav__burger span {
  display: block;
  width: 22px;
  height: 1.5px;
  margin: 5px auto;
  background: currentColor;
  transition: transform .3s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), opacity .2s var(--ease, cubic-bezier(0.16, 1, 0.3, 1));
}

body[data-menu="open"] .site-nav__burger span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

body[data-menu="open"] .site-nav__burger span:nth-child(2) {
  opacity: 0;
}

body[data-menu="open"] .site-nav__burger span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 900px) {

  /* backdrop-filter makes .site-nav a containing block for its position:fixed
     descendants, which would anchor the overlay to the 68px bar instead of the
     viewport. The bar is solid at this width anyway. */
  .site-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--paper, #ffffff);
  }

  .site-nav__burger {
    display: block;
  }

  .site-nav__menu {
    position: fixed;
    inset: var(--nav-h, 68px) 0 0 0;
    background: var(--paper, #ffffff);
    padding: clamp(1.5rem, 6vw, 3rem) var(--gutter, clamp(1.25rem, 5vw, 4.5rem)) 3rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.75rem;
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    /* visibility is a discrete property: given a duration it flips halfway
       through the transition and the links inside are unfocusable until then.
       Delayed to the very end on close, applied instantly on open. */
    transition: opacity .28s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), transform .28s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), visibility 0s linear .28s;
  }

  body[data-menu="open"] {
    overflow: hidden;
  }

  body[data-menu="open"] .site-nav__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .28s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), transform .28s var(--ease, cubic-bezier(0.16, 1, 0.3, 1)), visibility 0s;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.35rem;
    font-size: 1.6rem;
  }

  .site-nav__list a {
    color: var(--ink, #000000);
    letter-spacing: -0.02em;
    text-decoration: none;
  }

  .site-nav__lang {
    padding-left: 0;
    border-left: 0;
    font-size: .9rem;
  }
}

@media (min-width: 901px) {
  .site-nav__menu {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 2rem);
  }
}
