@font-face {
  font-family: "Familjen Grotesk";
  src: url("/familjen.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ice: #eef3f6;
  --paper: #ffffff;
  --fjord: #102a43;
  --slate: #4f5d6b;
  --rule: #c9d4db;
  --current: #166963;
  --current-soft: #8fc3bd;
  --beacon: #f0a202;
  --measure: 40rem;
  --wide: 74rem;
}
/* Two content widths, no more (smaller-sites/README.md): --measure the text column (headings, the lede, the text),
   --wide the full page (the bar, the opening, the bands, the trades list, the inner pages' sheet, the footer). */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ice);
  color: var(--fjord);
  font: 400 1.0625rem/1.6 "Familjen Grotesk", system-ui, sans-serif;
  font-kerning: normal;
}

a { color: var(--current); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--beacon); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); font-weight: 650; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0 0 1em; }

/* helm */
.helm {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 2rem;
}
.signature {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--fjord);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.compass { width: 1.5rem; height: 1.5rem; fill: var(--fjord); }
.compass path { stroke: var(--beacon); stroke-width: 2; stroke-linejoin: round; paint-order: stroke; }
.helm ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; }
.helm nav a { color: var(--fjord); text-decoration: none; font-weight: 500; padding: 0.3rem 0; display: inline-block; }
.helm nav a:hover { color: var(--current); }
.helm nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--beacon); }

main { display: block; }

/* the front page's opening */
.landfall {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
}
.landfall .lede { font-size: 1.3rem; line-height: 1.5; color: var(--slate); }
.landfall .lede strong { color: var(--fjord); font-weight: 600; }
.ask {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.85rem 1.4rem;
  background: var(--fjord);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  border-radius: 999px;
}
.ask:hover { background: var(--current); }

.confluence { width: 100%; height: auto; display: block; }
.confluence .stream { fill: none; stroke: var(--current-soft); stroke-width: 2.5; stroke-linecap: round; }
.confluence .trunk { fill: none; stroke: var(--current); stroke-width: 7; stroke-linecap: round; }
.confluence .source { fill: var(--paper); stroke: var(--current); stroke-width: 2; }
.confluence .node { fill: var(--beacon); }
.confluence .node-ring { fill: none; stroke: var(--beacon); stroke-width: 2; opacity: 0.45; }
.confluence text { font: 500 15px "Familjen Grotesk", system-ui, sans-serif; fill: var(--fjord); }
.confluence .label-end { font-weight: 700; font-size: 17px; }
.confluence .label-node { font-size: 13px; fill: var(--slate); }
.confluence .visitor { fill: var(--current-soft); stroke: var(--paper); stroke-width: 2; }
.confluence .stream.stopped { stroke-dasharray: 3 6; }
.confluence .cut { fill: none; stroke: var(--slate); stroke-width: 2.5; stroke-linecap: round; }
.sheet-figure { margin: 0 0 2.4rem; padding: 1.4rem 1.4rem 1rem; background: var(--paper); border-radius: 6px; }
.sheet-figure .confluence { max-width: 30rem; margin: 0 auto; }
.sheet-figure figcaption { margin-top: 0.8rem; font-size: 0.95rem; color: var(--slate); }
.helm-toggle { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .confluence .stream:not(.stopped), .confluence .trunk { stroke-dasharray: 600; stroke-dashoffset: 600; animation: flow 1.4s ease-out forwards; }
  .confluence .trunk { animation-delay: 0.9s; }
  @keyframes flow { to { stroke-dashoffset: 0; } }
}

/* bands on the front page */
.band { background: var(--paper); }
.band-inner, .passage-inner, .closing {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}
.band-inner > h2, .passage-inner > h2, .band-inner > p, .passage-inner > p { max-width: var(--measure); }
.band-inner > p, .passage-inner > p { color: var(--slate); }
.trades { list-style: none; margin: 2rem 0 0; padding: 0; }
.trades li {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) 11rem;
  gap: 1rem 2.5rem;
  align-items: baseline;
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
}
.trades li:last-child { border-bottom: 1px solid var(--rule); }
.trades h3 { font-size: 1.45rem; margin: 0; }
.trades p { margin: 0; color: var(--slate); }
.trades .onward { white-space: nowrap; font-weight: 600; justify-self: end; }

.passage { counter-reset: step; list-style: none; margin: 2.2rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.passage li { counter-increment: step; }
.passage li::before {
  content: counter(step);
  display: block;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  color: var(--current);
  margin-bottom: 0.8rem;
}
.passage h3 { margin-bottom: 0.4rem; }
.passage p { color: var(--slate); margin: 0; }

.closing { padding-top: 0; }
.closing-card {
  background: var(--fjord);
  color: var(--paper);
  border-radius: 1.25rem;
  padding: 2.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem 3rem;
}
.closing-card h2 { margin: 0 0 0.3rem; }
.closing-card p { margin: 0; color: #c7d3dd; max-width: var(--measure); }
.closing-card .ask { background: var(--beacon); color: var(--fjord); margin: 0; }
.closing-card .ask:hover { background: var(--paper); }

/* inner pages */
.sheet {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(14rem, 20rem);
  gap: 3rem 5rem;
  align-items: start;
}
.sheet > header { grid-column: 1 / -1; max-width: var(--measure); }
.sheet > header .lede { font-size: 1.25rem; line-height: 1.5; color: var(--slate); }
.sheet article h2 { margin-top: 2.2rem; }
.sheet article h2:first-child { margin-top: 0; }
.sheet article ul { padding-left: 1.2rem; }
.sheet article li { margin-bottom: 0.45rem; }
.sheet aside {
  position: sticky;
  top: 1.5rem;
  background: var(--paper);
  border-radius: 1rem;
  padding: 1.5rem 1.6rem;
}
.sheet aside h2 { font-size: 1.1rem; margin-bottom: 0.8rem; }
.sheet aside ul { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.sheet aside li { padding: 0.45rem 0; border-top: 1px solid var(--rule); }
.sheet aside li:first-child { border-top: 0; }
.sheet aside p { margin: 0; color: var(--slate); font-size: 0.98rem; }
.sheet aside a[aria-current="page"] { color: var(--fjord); font-weight: 650; text-decoration: none; box-shadow: inset 3px 0 0 var(--beacon); padding-left: 0.7rem; }

.letter { max-width: var(--measure); margin: 0 auto; padding: 3rem 1.5rem 5rem; }

.reach { list-style: none; margin: 1.5rem 0 2rem; padding: 0; display: grid; gap: 1rem; }
.reach li { background: var(--paper); border-radius: 1rem; padding: 1.3rem 1.5rem; }
.reach h2 { font-size: 1.05rem; margin: 0 0 0.3rem; color: var(--slate); font-weight: 600; }
.reach p { margin: 0; font-size: 1.2rem; }

/* footer */
.baseline { border-top: 1px solid var(--rule); }
.baseline-inner {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.5rem 2.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 4rem;
  color: var(--slate);
  font-size: 0.95rem;
}
.baseline-inner p { margin: 0; }
.baseline-name { color: var(--fjord); font-weight: 600; }

@media (max-width: 60rem) {
  .landfall { grid-template-columns: 1fr; gap: 2rem; padding-top: 1.5rem; }
  .trades li { grid-template-columns: 1fr; gap: 0.5rem; }
  .trades .onward { justify-self: start; }
  .passage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .sheet aside { position: static; }
}
@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .helm { padding: 1rem 1.1rem; }
  .helm { position: relative; flex-wrap: nowrap; }
  .helm ul { gap: 0.1rem 1rem; }
  .helm nav.folding .helm-toggle { display: inline-flex; align-items: center; font: inherit; font-weight: 600;
    color: var(--fjord); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
    padding: 0.45rem 0.8rem; cursor: pointer; }
  .helm nav.folding .helm-toggle:focus-visible { outline: 3px solid var(--beacon); outline-offset: 2px; }
  .helm nav.folding ul { display: none; }
  .helm nav.folding.open ul { display: flex; flex-direction: column; gap: 0; position: absolute; left: 0; right: 0;
    top: 100%; z-index: 5; background: var(--paper); padding: 0.4rem 1.1rem 0.8rem; border-bottom: 2px solid var(--rule); }
  .helm nav.folding.open a { display: block; padding: 0.65rem 0; }
  .helm nav.folding.open a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--beacon); padding-left: 0.7rem; }
  .sheet-figure { padding: 1rem 0.8rem 0.8rem; }
  .landfall, .band-inner, .passage-inner, .sheet, .letter { padding-left: 1.1rem; padding-right: 1.1rem; }
  .closing { padding-left: 1.1rem; padding-right: 1.1rem; }
  .passage { grid-template-columns: 1fr; }
  .closing-card { padding: 1.8rem 1.4rem; }
  .landfall .lede { font-size: 1.15rem; }
  .confluence text { font-size: 21px; }
  .confluence .label-end { font-size: 23px; }
  .confluence .label-node { font-size: 18px; }
}
