/* The site's header, laid over the top of the hero: the brand (mark and wordmark) as a
   link home, and the menu. They are real HTML, not part of the video, so they stay sharp,
   clickable, readable by search and screen readers, and editable without a render.

   The video keeps a clear strip at its top for them, and the header sits in exactly the
   place the brand bar had in the video, scaled with the picture: its left edge on the
   headline's, its right on the same margin. All lengths below are the video's own pixels
   (--x, --top, --h, --wm) times --u, one video pixel in CSS pixels, so the header stays
   in proportion to the picture at any size. Text sizes are clamped so they stay readable
   on a small screen and do not grow without end on a large one.

   Desktop: the links in the bar. On a phone (the same media queries as hero.css) the links
   fold into a menu button (header.js); without JavaScript they stay in the bar.

   Colours and type: Prax-Copperslate (platinum #ffffff, steel mist #b6c0cc, the
   ember accent #f0bd98 for focus; Inter, declared in site.css, as Matter's substitute). */

/* the page wrapper: the header and the hero copy measure themselves against this box */
.prax-top {
  position: relative;
  container-type: inline-size;
}

.prax-header {
  /* the picture's width; the video frame's width (px); one video px in CSS px */
  --fw: 100cqw;
  --W: 1600;
  --u: calc(var(--fw) / var(--W));
  /* the bar in the video (px): the copy's side margin, its top, its height, the
     wordmark's size */
  --x: 160;
  --top: 48;
  --h: 48;
  --wm: 24;
  position: absolute;
  z-index: 5;
  top: calc(var(--top) * var(--u));
  left: calc((100cqw - var(--fw)) / 2 + var(--x) * var(--u));
  right: calc((100cqw - var(--fw)) / 2 + var(--x) * var(--u));
  height: calc(var(--h) * var(--u));
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* With JavaScript the header stays at the top of the window as the page scrolls, in the
   same place (header.js adds .is-pinned); without it, it scrolls away with the hero.
   Behind the bar, a scrim in the page colour: solid down to the bar's foot, then fading out
   over the bar's top margin again, so whatever scrolls up under the bar, the film and then
   the page below it, fades away before it reaches the brand and the menu. The scrim comes
   up over the first scroll of the bar's own depth (--prax-scrim, set by header.js), so at
   the top of the page the hero is untouched. */
.prax-header.is-pinned {
  position: fixed;
}
.prax-header.is-pinned::before {
  content: "";
  position: fixed;
  z-index: -1;
  left: 0;
  right: 0;
  top: 0;
  height: calc((var(--top) * 2 + var(--h)) * var(--u));
  background: linear-gradient(
    to bottom,
    var(--prax-hero-bg, #0f1218) 0,
    var(--prax-hero-bg, #0f1218) calc((var(--top) + var(--h)) * var(--u)),
    transparent
  );
  opacity: var(--prax-scrim, 0);
  pointer-events: none;
}
/* a phone held upright, or any upright screen: the picture is 9:16, centred in the hero
   when the screen is wider than that (hero.css) */
@media (orientation: portrait) {
  .prax-header {
    --fw: min(100cqw, 100svh * 9 / 16);
    --W: 1080;
    --x: 80;
    --top: 80;
    --h: 91.2;
    --wm: 45.6;
  }
}
/* a phone held sideways (1920 x 888) */
@media (orientation: landscape) and (max-height: 500px) {
  .prax-header {
    --W: 1920;
    --x: 120;
    --top: 40;
    --h: 69.6;
    --wm: 34.8;
  }
}

/* the brand: the mark (the open single, in burnished copper) and the wordmark, in the video's
   pixels a 28 px mark beside a 24 px wordmark, 12 px apart */
.prax-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: clamp(15px, calc(var(--wm) * var(--u)), 32px);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-decoration: none;
}
.prax-brand__mark {
  width: 1.1667em;
  height: 1.1667em;
  flex: none;
  display: block;
  transition: opacity 250ms ease-out;
}
/* the mark in motion (mark-motion.js): a canvas over the flat mark, the two cross-fading as
   it starts and as it settles */
.prax-brand__motion {
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.1667em;
  height: 1.1667em;
  margin-top: -0.5833em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease-out;
}
.prax-brand.is-turning .prax-brand__motion {
  opacity: 1;
}
.prax-brand.is-turning .prax-brand__mark {
  opacity: 0;
}

/* the menu: small uppercase links, spaced as in the video */
.prax-nav {
  position: relative;
}
.prax-nav__list {
  display: flex;
  align-items: center;
  gap: max(20px, calc(24 * var(--u)));
  margin: 0;
  padding: 0;
  list-style: none;
}
.prax-nav__list a {
  display: block;
  padding: 8px 0;
  font-size: clamp(12px, calc(12 * var(--u)), 16px);
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b6c0cc;
  text-decoration: none;
}
.prax-nav__list a:hover,
.prax-nav__list a[aria-current] {
  color: #ffffff;
}
.prax-brand:focus-visible,
.prax-nav__list a:focus-visible,
.prax-nav__toggle:focus-visible {
  outline: 2px solid #f0bd98;
  outline-offset: 4px;
  border-radius: 4px;
}

/* the menu button: phones only, and only with JavaScript (header.js adds .has-js) */
.prax-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; /* a full touch target... */
  height: 44px;
  margin-right: -11px; /* ...with the icon itself on the copy's margin */
  padding: 0;
  border: 0;
  background: none;
  color: #ffffff;
  cursor: pointer;
}
.prax-nav__toggle svg {
  width: 22px;
  height: 22px;
}
.prax-nav__toggle .close,
.prax-nav__toggle[aria-expanded="true"] .open {
  display: none;
}
.prax-nav__toggle[aria-expanded="true"] .close {
  display: block;
}

@media (orientation: portrait), (orientation: landscape) and (max-height: 500px) {
  .prax-header.has-js .prax-nav__toggle {
    display: inline-flex;
  }
  .prax-header.has-js .prax-nav__list {
    display: none;
  }
  /* open: a panel under the bar, right aligned */
  .prax-header.has-js[data-open] .prax-nav__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    position: absolute;
    top: calc(100% + 8px);
    right: -8px;
    min-width: 200px;
    padding: 8px;
    background: rgba(9, 11, 15, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(9, 11, 15, 0.45); /* basalt deep */
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .prax-header.has-js[data-open] .prax-nav__list a {
    padding: 13px 16px; /* 44 px tall: a full touch target */
    font-size: 13px;
    border-radius: 8px;
  }
  .prax-header.has-js[data-open] .prax-nav__list a:hover {
    background: rgba(255, 255, 255, 0.06);
  }
}

/* Without JavaScript on a phone the links stay in the bar, wrapping under the brand where the
   bar is too narrow for all four, as full touch targets. On the other pages (.prax-top--page)
   the header sits in the page's flow above the text. On the home page it stays over the hero,
   except sideways under 446 px wide, where the wrapped links would cover the copy. */
@media (scripting: none) and (orientation: portrait),
  (scripting: none) and (orientation: landscape) and (max-height: 500px) {
  .prax-header {
    height: auto;
    flex-wrap: wrap;
  }
  .prax-nav__list {
    flex-wrap: wrap;
    gap: 0 16px;
  }
  .prax-nav__list a {
    padding-block: 14px; /* 44 px tall */
  }
  .prax-top--page .prax-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin: calc(var(--top) * var(--u)) calc((100cqw - var(--fw)) / 2 + var(--x) * var(--u)) 0;
  }
}
@media (scripting: none) and (orientation: landscape) and (max-height: 500px) and (max-width: 445px) {
  .prax-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin: calc(var(--top) * var(--u)) calc((100cqw - var(--fw)) / 2 + var(--x) * var(--u)) 0;
  }
}
