/* Shared Refraction chrome: navigation, menu and About overlay. */
/* One wordmark for every page: the home page used to restate it lighter
   and smaller than the case studies did. */
.brand__text {
  font-family: var(--ref-font-display);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.045em;
}

.mainnav__crumb,
.mainnav__cta,
.mainnav__cv-btn {
  font-family: var(--ref-font-label);
  font-weight: var(--label-weight);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* The crumb scrambles when the section under the bar changes (JN.scramble
   on the home page); its symbols take the crumb's own ink on every ground. */
.mainnav__crumb { --glyph-ink: var(--label-ink); font-size: 10px; }
.mainnav__cv-btn { min-height: 44px; }
/* Contact: a ghost label beside a solid Klein box carrying the arrow. Hover
   fills the whole control. Every colour is a custom property, so a ground
   only has to re-point the variables (below, prism-hero.css and
   project-refraction.css) — the rules that paint stay here, once.
   Defaults are for the black ground. */
.mainnav__cta {
  --cta-ink: var(--ref-white);
  --cta-box: var(--ref-klein);
  --cta-arrow: var(--ref-white);
  --cta-fill: var(--ref-white);
  --cta-fill-ink: var(--ref-black);
  --cta-fill-box: var(--ref-klein);
  --cta-fill-arrow: var(--ref-white);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 4px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cta-ink);
  font-size: 11px;
  transition: background var(--ref-hover-duration) ease, color var(--ref-hover-duration) ease;
}
.mainnav__cta-box {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  background: var(--cta-box);
  color: var(--cta-arrow);
  transition: background var(--ref-hover-duration) ease, color var(--ref-hover-duration) ease;
}
.mainnav__cta-box .ph { width: 16px; height: 16px; transition: transform var(--ref-hover-duration) ease; }
.mainnav__cta:hover,
.mainnav__cta:focus-visible { background: var(--cta-fill); color: var(--cta-fill-ink); }
.mainnav__cta:hover .mainnav__cta-box,
.mainnav__cta:focus-visible .mainnav__cta-box { background: var(--cta-fill-box); color: var(--cta-fill-arrow); }
.mainnav__cta:hover .mainnav__cta-box .ph { transform: translateX(2px); }
/* On a phone the label is clipped (style.css) and the box is the button. */
@media (max-width: 600px) {
  .mainnav__cta { padding: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .mainnav__cta, .mainnav__cta-box, .mainnav__cta-box .ph { transition: none; }
}

/* CV picker: a button that shows one link per language. The nav's drops
   below the bar, right-aligned to its button; the footer's opens upwards
   over its cell (showcase.css). The list is always the black ground, so it
   reads the same over every section the bar passes. */
.cvpick { position: relative; }
.cvpick__chev { transition: transform var(--ref-hover-duration) ease; }
.cvpick.is-open .cvpick__chev { transform: rotate(180deg); }
.cvpick__list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  right: 0;
  min-width: 212px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--ref-black);
  border: 1px solid var(--ref-line-control);
  box-shadow: 0 18px 40px rgb(0 0 0 / .45);
}
.cvpick__list[hidden] { display: none; }
.cvpick__item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ref-text);
  font: 500 14px/1.2 var(--ref-font-display);
  letter-spacing: -.01em;
  text-transform: none;
  transition: background var(--ref-hover-duration) ease, color var(--ref-hover-duration) ease;
}
.cvpick__code {
  min-width: 2.2em;
  color: var(--label-ink);
  font: var(--label-weight) 11px/1 var(--ref-font-label);
  letter-spacing: .08em;
}
.cvpick__name { flex: 1; }
.cvpick__go { width: 14px; height: 14px; color: var(--label-ink); }
.cvpick__item:hover,
.cvpick__item:focus-visible { background: var(--ref-klein); color: var(--ref-white); outline: none; }
.cvpick__item:hover .cvpick__code,
.cvpick__item:hover .cvpick__go,
.cvpick__item:focus-visible .cvpick__code,
.cvpick__item:focus-visible .cvpick__go { color: var(--ref-white); }
@media (prefers-reduced-motion: reduce) {
  .cvpick__chev, .cvpick__item { transition: none; }
}

/* The scrim colour is not set here: .is-ondark means "a dark block is under
   the bar", and which colour that block is depends on the page — the home
   page names its grounds (prism-hero.css), the case study's is the Klein
   closing panel (project-refraction.css). The CTA's colours follow the same
   split. */

.navmenu {
  justify-content: stretch;
  padding: calc(var(--nav-top) + var(--nav-h) + 48px) var(--ref-gutter) 40px;
  background: rgb(var(--ref-black-rgb) / .98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.navmenu__tree {
  width: min(920px, 100%);
  margin: 0 auto;
  gap: 0;
  counter-reset: ref-menu;
  font-family: var(--ref-font-display);
}
.navmenu__tree > .navmenu__item {
  counter-increment: ref-menu;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 66px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--ref-line-control);
  border-radius: 0;
  color: var(--ref-text-note);
  font-family: var(--ref-font-display);
  font-size: clamp(32px, 5vw, 68px);
  font-weight: 800;
  line-height: .94;
  letter-spacing: -.055em;
}
.navmenu__tree > .navmenu__item::before {
  content: "[0" counter(ref-menu) "]";
  color: var(--label-ink);
  font: var(--label-weight) 10px/1 var(--ref-font-label);
  letter-spacing: .08em;
}
.navmenu__tree > .navmenu__item:hover,
.navmenu__tree > .navmenu__item:active,
.navmenu__tree > .navmenu__item.is-active {
  background: transparent;
  color: var(--ref-white);
}
.navmenu__tree > .navmenu__item:hover::before,
.navmenu__tree > .navmenu__item.is-active::before { color: var(--ref-klein); }
.navmenu__cta {
  min-height: 52px;
  margin-top: 24px;
  padding: 12px 0 0 68px !important;
  border-radius: 0 !important;
  color: var(--ref-white) !important;
  font: 700 14px/1 var(--ref-font-label) !important;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.navmenu__cta:hover { color: var(--ref-klein) !important; }
.navmenu__tools { margin-top: 24px; padding: 20px 0 0 68px; border-top: 1px solid var(--ref-line-control); }
.navmenu__tools .mainnav__lang { color: var(--ref-text-nav); }

.step {
  background: rgb(var(--ref-black-rgb) / .99);
  color: var(--ref-text);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: calc(var(--nav-top) + var(--nav-h) + 6vh) var(--ref-gutter) 10vh;
}
.step__inner { max-width: 920px; }
.step__pre {
  color: var(--label-ink);
  font: var(--label-weight) 11px/1.3 var(--ref-font-label);
  letter-spacing: .14em;
}
.step__h {
  max-width: 12ch;
  margin: 18px 0 42px;
  color: var(--ref-text);
  font-family: var(--ref-font-display);
  font-size: clamp(48px, 8vw, 112px);
  font-weight: var(--ref-display-weight);
  line-height: .9;
  letter-spacing: var(--ref-heading-tracking);
}
.step:not([hidden]) .step__h { animation: none; }
.step p {
  max-width: 66ch;
  margin: 0 0 20px;
  color: var(--ref-text-note);
  font: 16px/1.7 var(--ref-font-display);
}
.step__cta { padding-top: 20px; border-top: 1px solid var(--ref-line-control); }
.step__cta button {
  min-height: 44px;
  color: var(--ref-white);
  border-bottom-color: var(--ref-klein);
  font: 700 14px/1.2 var(--ref-font-label);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.step__close {
  top: calc(var(--nav-top) + 4px);
  width: 44px;
  height: 44px;
  border: 1px solid var(--ref-line-control);
  border-radius: 0;
  color: var(--ref-text-nav);
}
.step__close:hover { background: var(--ref-klein); color: var(--ref-white); }

@media (max-width: 600px) {
  .navmenu { padding-inline: var(--ref-gutter-mobile); }
  .navmenu__tree > .navmenu__item {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 60px;
    font-size: clamp(30px, 10vw, 44px);
  }
  .navmenu__cta,
  .navmenu__tools { padding-left: 54px !important; }
  .step { padding-inline: var(--ref-gutter-mobile); }
  .step__h { font-size: clamp(48px, 15vw, 70px); }
}

@media (prefers-reduced-motion: reduce) {
  .navmenu__tree > *,
  .step:not([hidden]) .step__inner > * { animation: none !important; transition: none !important; }
}
