/* =====================================================================
   ORIENTED NETWORKS - Base layer

   Fonts, reset, typographic defaults and layout primitives.
   Load order: tokens.css, base.css, components.css
   ===================================================================== */

/* ---------------------------------------------------------------------
   Fonts

   Self-hosted, so no request leaves Cloudflare's edge and nothing
   depends on a third party staying up. swap keeps text readable while
   the file loads.
   --------------------------------------------------------------------- */
@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-height: 100vh;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: var(--lh-body);
  font-variation-settings: "wdth" var(--wdth-tight);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ---------------------------------------------------------------------
   Headings

   The width axis does the work here. Expanded headings against normal
   width body is what separates this from a default sans-serif page.
   --------------------------------------------------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: var(--track-head);
  font-variation-settings: "wdth" var(--wdth-wide);
  text-wrap: balance;
}

h1 {
  font-size: var(--size-display);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-hero);
}

h2 {
  font-size: var(--size-h2);
}

h3 {
  font-size: var(--size-h3);
  font-weight: 600;
}

h4 {
  font-size: var(--size-h4);
  font-weight: 600;
  font-variation-settings: "wdth" var(--wdth-tight);
}

p {
  text-wrap: pretty;
}

strong {
  font-weight: 600;
}

/* ---------------------------------------------------------------------
   Focus

   Keyboard users get a visible gold ring everywhere. This is never
   removed, only restyled.
   --------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* ---------------------------------------------------------------------
   Layout primitives
   --------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  padding-block: var(--section-y);
}

.band-sunk {
  background-color: var(--ink-sunk);
}

.band-raised {
  background-color: var(--ink-raised);
}

/* A hairline that fades at both ends rather than butting into the
   gutters, so sections separate without hard rules across the page. */
.band-edge {
  border-top: var(--hair) solid transparent;
  border-image: linear-gradient(90deg, transparent, var(--edge) 22%, var(--edge) 78%, transparent) 1;
}

.stack > * + * {
  margin-top: var(--s-4);
}

.stack-lg > * + * {
  margin-top: var(--s-6);
}

.grid {
  display: grid;
  gap: var(--s-5);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

/* ---------------------------------------------------------------------
   Text utilities
   --------------------------------------------------------------------- */
.lead {
  font-size: var(--size-lead);
  color: var(--paper-dim);
  max-width: 62ch;
}

.muted {
  color: var(--paper-dim);
}

.fine {
  font-size: var(--size-fine);
  color: var(--paper-faint);
}

.measure {
  max-width: 62ch;
}

/* Gold on a headline word. Restricted to one phrase per page so it
   stays an emphasis and not a decoration. */
.gilt {
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--size-fine);
  letter-spacing: var(--track-mono);
}

.tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Visible to screen readers only. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Jumps a keyboard user past the navigation. */
.skip {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  z-index: var(--z-top);
  padding: var(--s-3) var(--s-5);
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
  border-radius: var(--r-sm);
  transition: top var(--t-fast) var(--ease);
}

.skip:focus {
  top: var(--s-4);
}

/* ---------------------------------------------------------------------
   Reduced motion

   Everything decorative stops. Nothing that carries meaning depends on
   movement, so the page loses nothing.
   --------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
