@font-face {
  font-family: Manrope;
  src: url('../assets/fonts/manrope-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #111;
  --muted: #555;
  --line: #d6d6d6;
  --display: Manrope, 'Helvetica Neue', Arial, sans-serif;
  --body: Manrope, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Cascadia Mono', 'Roboto Mono', 'Courier New', monospace;
  --gutter: clamp(1.25rem, 4vw, 5rem);
  --header-logo-size: 7.25rem;
  --header-height: calc(var(--header-logo-size) + .5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
button:not(:disabled) { cursor: pointer; }
::selection { background: #222; color: white; }
:focus-visible { outline: 2px solid currentColor; outline-offset: .3rem; }
main:focus { outline: none; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: var(--gutter);
  padding: .65rem 1rem;
  color: var(--ink);
  background: var(--paper);
}

.eyebrow {
  font-family: var(--mono);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.site-header { position: relative; z-index: 5; min-height: var(--header-height); }

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 1rem;
  min-height: var(--header-height);
  padding: 0 var(--gutter);
}

.wordmark {
  display: block;
  justify-self: start;
  width: fit-content;
}

.wordmark img { width: 4.75rem; height: auto; }

/* Trim the transparent sides of the square logo in the header. */
.site-header .wordmark img {
  width: calc(var(--header-logo-size) / 2);
  height: var(--header-logo-size);
  object-fit: cover;
}

.category-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.6rem, 1.4vw, 1.15rem);
  font-family: var(--mono);
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.category-switch a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: .34rem;
}

.category-switch a:is(:hover, [aria-current]) { text-decoration-line: underline; }
.category-divider { width: 1px; height: .85rem; transform: rotate(18deg); background: currentColor; opacity: .55; }

.menu-toggle {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  justify-content: flex-end;
  gap: .85rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  background: transparent;
}

.menu-label { font-family: var(--mono); font-size: .875rem; font-weight: 600; text-transform: uppercase; }
.menu-icon { position: relative; display: block; width: 2rem; height: 1.25rem; }
.menu-icon span { position: absolute; right: 0; width: 100%; height: 1px; background: currentColor; transition: transform .25s var(--ease), width .25s var(--ease); }
.menu-icon span:first-child { top: .34rem; }
.menu-icon span:last-child { top: .88rem; width: 75%; }
.menu-toggle:hover .menu-icon span:last-child { width: 100%; }

[data-page='home'] .site-header { position: absolute; inset: 0 0 auto; color: #fff; }
[data-page='home'] .header-inner .wordmark img { filter: brightness(0) invert(1); }

.menu-open { overflow: hidden; }
.menu-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}

.menu-overlay[open] { animation: menu-in .3s var(--ease) both; }
.menu-overlay.is-closing { animation: menu-out .2s ease both; }
.menu-overlay::backdrop { background: rgb(0 0 0 / 18%); }

.menu-frame {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  padding: 0 var(--gutter);
}

.menu-top, .menu-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.menu-top { min-height: var(--header-height); }
.menu-close .menu-icon span:first-child { animation: menu-cross-top .3s var(--ease) both; }
.menu-close .menu-icon span:last-child { width: 100%; animation: menu-cross-bottom .3s var(--ease) both; }

.menu-links {
  display: grid;
  width: min(100%, 68rem);
  align-self: center;
  align-content: center;
  flex: 1;
  padding: clamp(2rem, 6vh, 5rem) 0;
}

.menu-links a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: .105em .05em .17em;
  border-bottom: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(3.2rem, 9vmin, 7.25rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.075em;
  text-decoration: none;
}

.menu-links a:first-child { border-top: 1px solid var(--line); }
.menu-links a::after { width: .2em; height: .2em; margin-right: .35em; border: 1px solid currentColor; content: ''; transition: background .2s; }
.menu-links a:is(:hover, :focus-visible, [aria-current])::after { background: currentColor; }

.menu-bottom {
  min-height: 4.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .875rem;
  font-weight: 600;
  text-transform: uppercase;
}

@keyframes menu-in { from { opacity: .45; transform: translateY(-1rem); } to { opacity: 1; transform: translateY(0); } }
@keyframes menu-out { to { opacity: 0; transform: translateY(-.75rem); } }
@keyframes menu-cross-top { to { transform: translateY(.27rem) rotate(45deg); } }
@keyframes menu-cross-bottom { from { width: 75%; } to { width: 100%; transform: translateY(-.27rem) rotate(-45deg); } }

.site-footer { border-top: 1px solid var(--line); }
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2rem;
  padding: 2.25rem var(--gutter);
}
.site-footer-inner nav { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.site-footer-inner nav a { text-decoration: none; text-underline-offset: .3rem; }
.site-footer-inner nav a:is(:hover, [aria-current]) { text-decoration: underline; }

@media (max-width: 38rem) {
  :root { --header-logo-size: 5.5rem; }
  .header-inner { column-gap: .375rem; }
  .category-switch { font-size: .75rem; }
  .menu-label { display: none; }
  .menu-icon { width: 1.75rem; }
  .menu-links a { font-size: clamp(2.9rem, 11vw, 4.7rem); }
  .menu-bottom { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
