@font-face {
  font-family: "Brygada";
  src: url("/fonts/brygada-1918-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Brygada";
  src: url("/fonts/brygada-1918-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Brygada";
  src: url("/fonts/brygada-1918-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Departure";
  src: url("/fonts/departure-mono.woff2") format("woff2");
  font-display: swap;
}

:root {
  --ground: #0b110e;
  --paper: #ebe8df;
  --paper-dim: #a9b2a8;
  --rule: #26332b;
  --phosphor: #3df58c;
  --phosphor-ink: #06170d;
  --serif: "Brygada", "Iowan Old Style", Georgia, serif;
  --mono: "Departure", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(1rem, 4vw, 3.5rem);
  --field-band: 34svh;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--rule) var(--ground);
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.55;
  caret-color: var(--phosphor);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, var(--phosphor) 70%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 160ms cubic-bezier(0.16, 1, 0.3, 1), text-decoration-color 160ms cubic-bezier(0.16, 1, 0.3, 1);
}

a:hover {
  color: var(--phosphor);
  text-decoration-color: var(--phosphor);
}

a:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 3px;
  border-radius: 2px;
}

/* The field sits behind everything; a mask keeps it off the reading column. */
.field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
  opacity: 0;
  transition: opacity 600ms ease-out;
  --field-mask: linear-gradient(90deg, transparent calc(var(--gutter) + 47rem), #000 calc(var(--gutter) + 47rem + 22vw));
  -webkit-mask-image: var(--field-mask);
  mask-image: var(--field-mask);
}

.field.is-live {
  opacity: 1;
}

/* On phones the field is a band under the masthead that scrolls away with the page. */
@media (max-width: 760px) {
  .field {
    position: absolute;
    bottom: auto;
    height: var(--field-band);
    --field-mask: linear-gradient(to bottom, transparent 3.5rem, #000 6rem, #000 55%, transparent 100%);
  }
}

.frame {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2.25rem) var(--gutter);
}

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.wordmark {
  font-weight: 500;
  font-size: 1.0625rem;
  letter-spacing: -0.005em;
  text-decoration: none;
}

/* Departure Mono is drawn on an 11px grid: set it only at 11px or 22px, and only for data. */
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.mono-lg {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}

p {
  text-wrap: pretty;
}

.masthead nav {
  display: flex;
  gap: 1.5rem;
}

.masthead nav a {
  font-size: 1rem;
  text-decoration: none;
  color: var(--paper-dim);
}

.masthead nav a:hover {
  color: var(--phosphor);
}

.arrow {
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.2em;
  vertical-align: 0.02em;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.colophon {
  font-size: 0.9375rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  color: var(--paper-dim);
}

.colophon a {
  text-decoration: none;
}

.colophon nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
}

/* Block caret: the one "live" signal in the type. */
.caret {
  display: inline-block;
  width: 0.48em;
  height: 0.92em;
  margin-left: 0.08em;
  vertical-align: -0.1em;
  background: var(--phosphor);
  animation: blink 1.1s steps(1) 4;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .caret {
    animation: none;
  }
  .field {
    transition: none;
  }
}

