/* Fjord: one quiet column, a serif with a good italic, and code given room. */

:root {
  --paper: #ffffff;
  --ink: #161514;
  --soft: #6b6862;
  --faint: #a7a39b;
  --rule: #e7e4dd;
  --ground: #f8f7f4;
  --string: #7d3b2a;
  --blue: #275d8c;
  --blue-soft: rgba(39, 93, 140, 0.35);
  --type: #275d8c;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --measure: 640px;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.65;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#site {
  max-width: calc(var(--measure) + 48px);
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--blue-soft);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 160ms;
}
a:hover { color: var(--blue); text-decoration-color: var(--blue); }
::selection { background: rgba(39, 93, 140, 0.16); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* The masthead: a wordmark and two words. */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 44px 0 0;
}
.wordmark {
  font-size: 24px;
  font-style: italic;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--blue);
}
.masthead nav { display: flex; gap: 28px; }
.masthead nav a {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--soft);
}
.masthead nav a:hover, .masthead nav a.here { color: var(--ink); }

main { padding-bottom: 96px; }

/* Type. */

h1, h2 {
  font-weight: 300;
  letter-spacing: -0.012em;
  margin: 0;
}
h1 { font-size: 64px; line-height: 1.04; }
h2 { font-size: 34px; line-height: 1.18; }
h1 em, h2 em { font-weight: 300; }
p { margin: 0 0 1em; }

.numeral {
  font-style: italic;
  font-size: 22px;
  color: var(--blue);
  margin: 0;
}

.kicker, .count {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0;
}

/* The home page. */

.hero { padding: 13vh 0 0; }
.hero h1 { font-size: 60px; }
.hero h1 em { white-space: nowrap; }
.lede {
  margin-top: 30px;
  font-size: 23px;
  line-height: 1.55;
  color: #3c3a36;
}
.onward { margin-top: 24px; font-style: italic; }
.onward .sep { margin: 0 14px; color: var(--faint); font-style: normal; }

.first-look { padding-top: 60px; }
.switch {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin-bottom: 18px;
}
.switch button, .marks button {
  font-style: italic;
  font-size: 18px;
  color: var(--soft);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 160ms, border-color 160ms;
}
.switch button:hover, .marks button:hover { color: var(--blue); }
.switch button.here, .marks button.here { color: var(--ink); border-bottom-color: var(--blue); }

.idea { padding-top: 140px; }
.idea .numeral { margin-bottom: 10px; }
.idea h2 { margin-bottom: 22px; }
.idea p { color: #34322e; }

/* Code: a pale ground, no frame, room to breathe. */

pre {
  margin: 30px -28px 0;
  padding: 26px 28px 28px;
  background: var(--ground);
  border-radius: 3px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 1.75;
  font-variant-ligatures: none;
  color: var(--ink);
  tab-size: 4;
}
pre code { font-family: inherit; }
pre .k { font-weight: 500; }
pre .t { color: var(--type); }
pre .s { color: var(--string); }
pre .n { color: var(--string); }
pre .c {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16.5px;
  color: var(--soft);
}

/* The tour. */

.tour { padding-top: 14vh; }
.marks { display: flex; gap: 22px; margin: 22px 0 64px; }
.step h1 { font-size: 52px; margin-bottom: 26px; }
.step p { color: #34322e; }
.turn {
  display: flex;
  justify-content: space-between;
  margin-top: 56px;
  font-style: italic;
}
.turn button { color: var(--soft); transition: color 160ms; }
.turn button:hover { color: var(--blue); }
.turn .next { margin-left: auto; }

/* Packages. */

.packages { padding-top: 14vh; }
.packages h1 { font-size: 46px; line-height: 1.12; margin: 22px 0 56px; }
.packages input {
  width: 100%;
  font: inherit;
  font-style: italic;
  font-size: 22px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 6px 0 10px;
  outline: none;
  transition: border-color 160ms;
}
.packages input:focus { border-bottom-color: var(--blue); }
.packages input::placeholder { color: var(--faint); }
.packages .count { margin: 16px 0 36px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.list li:last-child { border-bottom: 1px solid var(--rule); }
.list code { font-family: var(--mono); font-size: 15px; padding-top: 4px; }
.list p { margin: 0; color: #34322e; }

.missing { padding-top: 24vh; }
.missing h1 { margin-bottom: 28px; }

/* The colophon. */

.colophon {
  border-top: 1px solid var(--rule);
  padding: 32px 0 64px;
  font-size: 15px;
  font-style: italic;
  color: var(--soft);
}
.colophon em { font-style: normal; font-family: var(--mono); font-size: 13.5px; }

@media (max-width: 640px) {
  body { font-size: 18px; }
  .masthead { padding-top: 28px; }
  h1, .hero h1 { font-size: 40px; }
  .hero h1 em { white-space: normal; }
  h2 { font-size: 28px; }
  .hero { padding-top: 12vh; }
  .lede { font-size: 20px; }
  .first-look { padding-top: 80px; }
  .idea { padding-top: 96px; }
  pre { margin-left: -24px; margin-right: -24px; padding: 22px 24px; border-radius: 0; font-size: 13.5px; }
  .step h1 { font-size: 38px; }
  .packages h1 { font-size: 32px; }
  .list li { grid-template-columns: 1fr; gap: 6px; }
}
