:root {
  --paper: #e8ecf1;
  --paper-2: #dde3ea;
  --ink: #14171d;
  --ink-soft: #3d4450;
  --rule: #b9c2cd;
  --amber: #b45309;
  --amber-text: #8f4206;
  --on-amber: #fff8ef;
  --display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, serif;
  --gutter: clamp(16px, 5vw, 72px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14171d;
    --paper-2: #1c2029;
    --ink: #eceef2;
    --ink-soft: #b6bcc7;
    --rule: #3a404c;
    --amber: #f5b653;
    --amber-text: #f5b653;
    --on-amber: #14171d;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--text);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
  padding: 0;
}

h2,
h3,
dt {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  margin-bottom: 40px;
}

h3 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

a {
  color: var(--amber-text);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--amber-text);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 2;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
}

.skip:focus {
  top: 16px;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 20px var(--gutter);
}

.top__brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--ink);
  font: 800 1.35rem var(--display);
  text-decoration: none;
}

.top ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  list-style: none;
}

.top nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
}

.top nav a:hover {
  text-decoration: underline;
}

/* The page opens like a manuscript: an illuminated initial in the shape and
   colour of the logo's block, with the rest of the name running from it. */
.hero {
  padding: clamp(24px, 5vw, 64px) var(--gutter) clamp(56px, 9vw, 112px);
}

.hero__title {
  display: flex;
  align-items: flex-end;
  margin-bottom: clamp(32px, 5vw, 56px);
  font: 800 clamp(4.5rem, 19vw, 20rem) / 0.8 var(--display);
  letter-spacing: -0.045em;
}

.hero__initial {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.12em;
  height: 1.12em;
  margin-right: 0.08em;
  border-radius: 0.06em;
  background: var(--amber);
  color: var(--on-amber);
}

.hero__rest {
  padding-bottom: 0.06em;
}

.hero__lead {
  max-width: 34em;
  margin-left: clamp(0px, 23vw, 25rem);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.4;
}

.hero__lead p + p {
  margin-top: 16px;
  color: var(--ink-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 28px;
  padding: 0 22px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--paper);
  font: 700 1.05rem var(--display);
  text-decoration: none;
}

.button:hover {
  background: var(--amber-text);
  color: var(--paper);
}

.problems,
.tools,
.flow,
.authors {
  padding: clamp(56px, 8vw, 96px) var(--gutter);
}

.problems {
  background: var(--paper-2);
}

.problems dl > div {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 8px 48px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
}

.problems dt {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.problems dd {
  max-width: 34em;
  color: var(--ink-soft);
}

.tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 56px;
}

.tools h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.tool {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-content: start;
  gap: 8px 20px;
}

.tool p {
  max-width: 34em;
}

.tool--wide {
  grid-column: 1 / -1;
}

.tool--wide ul {
  columns: 2;
  column-gap: 40px;
  max-width: 44em;
  margin-top: 16px;
  padding-left: 1.1em;
}

.tool--wide li {
  break-inside: avoid;
  margin-bottom: 4px;
}

.tool__shots {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.tool__shots img {
  width: 100%;
  border-radius: 6px;
}

.tool__shots figcaption {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 1rem;
}

.flow {
  background: var(--ink);
  color: var(--paper);
}

.flow ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 40px;
  list-style: none;
  counter-reset: step;
}

.flow li {
  counter-increment: step;
}

.flow li::before {
  content: counter(step);
  display: block;
  margin-bottom: 8px;
  color: var(--amber-on-ink, #f5b653);
  font: 800 clamp(3rem, 6vw, 4.5rem) / 1 var(--display);
}

@media (prefers-color-scheme: dark) {
  .flow {
    --amber-on-ink: #8f4206;
  }
}

.people {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin-bottom: 28px;
  list-style: none;
}

.people li {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 700 1.25rem var(--display);
}

.people img {
  width: 72px;
  height: 72px;
  border: 3px solid var(--amber);
  border-radius: 50%;
}

.flow li p {
  max-width: 30em;
}

/* Which product carries the step, so the diagram doubles as a map of the tools. */
.flow__tool {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 12px;
  font: 700 1rem var(--display);
}

.flow__tool img {
  flex: none;
  padding: 2px;
  border-radius: 6px;
  background: #eceef2;
}

.authors p {
  max-width: 36em;
}

.authors p + p {
  margin-top: 16px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 32px;
  padding: 24px var(--gutter);
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 1rem;
}

.missing {
  display: grid;
  align-content: center;
  min-height: 100vh;
  padding: var(--gutter);
}

.missing h1 {
  font: 800 clamp(2.5rem, 8vw, 5rem) / 1 var(--display);
}

@media (max-width: 860px) {
  .hero__lead {
    margin-left: 0;
  }

  .problems dl > div,
  .tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .flow ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool--wide ul {
    columns: 1;
  }

  .tool__shots {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .flow ol {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .tool > img {
    width: 56px;
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
