/* Gradient Ascend — "a well-typeset paper, in the Swiss tradition". See BRIEF.md. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-latin-opsz-normal.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url(/fonts/newsreader-latin-opsz-italic.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Plex Mono";
  font-weight: 500;
  font-display: swap;
  src: url(/fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2");
}

:root {
  --paper: #f4f1ea;
  --paper-2: #ebe7dd;
  --ink: #1c1b18;
  --ink-2: #5a564d;
  --rule: #d6d0c3;
  --red: #c4271b;
  --red-ink: #ffffff;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --label: 190px;
  color-scheme: light;
}

/* Always light: the site is meant to look like printed paper, whatever the visitor's system setting. */

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

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration-line: underline; text-decoration-color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--red); }
::selection { background: var(--red); color: var(--red-ink); }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 13px; line-height: 1.5; letter-spacing: 0.01em; }
.muted { color: var(--ink-2); }
.red { color: var(--red); }

/* Header */
.masthead { border-bottom: 1px solid var(--ink); }
.masthead .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-top: 22px; padding-bottom: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.wordmark svg { width: 22px; height: 22px; position: relative; top: 1px; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 26px; font-family: var(--mono); font-size: 13px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); }

/* Labelled rows: a margin column for "§1"-style labels, like notes in a paper. */
.row { display: grid; grid-template-columns: var(--label) minmax(0, 1fr); column-gap: 40px; }
.row > .label { padding-top: 8px; }
.label { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.label b { display: block; font-weight: 500; color: var(--red); }

section.part { border-top: 1px solid var(--rule); padding: 72px 0 80px; }
section.part.tight { padding: 48px 0 56px; }

h1, h2, h3 { font-weight: 400; margin: 0; }
h1 { font-size: clamp(42px, 6.2vw, 90px); line-height: 1.02; letter-spacing: -0.025em; font-weight: 340; }
h1 em, h2 em { font-style: italic; font-weight: 300; }
h2 { font-size: clamp(32px, 3.8vw, 52px); line-height: 1.08; letter-spacing: -0.018em; font-weight: 360; max-width: 18em; }
h3 { font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(20px, 1.9vw, 24px); line-height: 1.45; color: var(--ink-2); max-width: 34em; }
.measure { max-width: 36em; }
.stack > * + * { margin-top: 28px; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 112px) 0 clamp(48px, 6vw, 88px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.hero h1 { margin: 18px 0 32px; max-width: 12em; }
.hero .lede { margin-bottom: 36px; }

/* Actions: one primary button per page, everything else is a link. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }
.btn {
  display: inline-block; padding: 14px 22px 15px; background: var(--red); color: var(--red-ink);
  font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: 0.01em;
  text-decoration: none; border: 0; border-radius: 2px; cursor: pointer;
}
.btn:hover { color: var(--red-ink); background: var(--ink); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.textlink { font-family: var(--mono); font-size: 14px; }

/* Figures */
figure { margin: 0; }
figure svg { display: block; width: 100%; height: auto; color: var(--ink); }
.fig-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fig-scroll svg { min-width: 600px; }
figcaption { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: var(--ink-2); max-width: 62em; }
figcaption b { color: var(--red); font-weight: 500; }
svg text { font-family: var(--mono); fill: currentColor; }
svg .t-muted { fill: var(--ink-2); }
svg .s-ink { stroke: currentColor; fill: none; }
svg .s-rule { stroke: var(--rule); fill: none; }
svg .f-red { fill: var(--red); }
svg .s-red { stroke: var(--red); fill: none; }
svg .f-paper { fill: var(--paper); }
svg .f-paper2 { fill: var(--paper-2); }

/* Numbered process */
.steps { list-style: none; margin-inline: 0; margin-bottom: 0; padding: 0; border-top: 1px solid var(--ink); }
.steps > li { display: grid; grid-template-columns: 64px minmax(0, 15em) minmax(0, 1fr); gap: 12px 32px; padding: 28px 0 30px; border-bottom: 1px solid var(--rule); }
.steps .n { font-family: var(--mono); font-size: 13px; color: var(--red); padding-top: 7px; }
.steps h3 { font-size: 27px; }
.steps p { margin: 0 0 10px; }
.steps .deliverable { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin: 0; }

/* Two columns separated by a rule, instead of cards */
.split { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--ink); }
.split > div { padding: 24px 32px 8px 0; }
.split > div + div { padding-left: 32px; border-left: 1px solid var(--rule); }
.split h3 { margin-bottom: 12px; }

ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
ul.dash { list-style: none; padding: 0; margin: 0 0 1em; }
ul.dash li { position: relative; padding-left: 1.3em; margin-bottom: 8px; }
ul.dash li::before { content: "–"; position: absolute; left: 0; color: var(--red); }

/* Tables (case studies, role lists) */
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-family: var(--mono); font-size: 12.5px; font-weight: 400; color: var(--ink-2); padding: 0 24px 10px 0; border-bottom: 1px solid var(--ink); }
table.data td { padding: 18px 24px 20px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data td.mono { padding-top: 22px; }
.placeholder { color: var(--ink-2); font-style: italic; }
.note { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); margin-top: 14px; }

/* Role list */
.roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.roles a { display: grid; grid-template-columns: minmax(0, 1fr) 160px 230px 24px; gap: 8px 24px; align-items: baseline; padding: 22px 0 24px; border-bottom: 1px solid var(--rule); text-decoration: none; }
.roles a:hover .role-title { color: var(--red); }
.role-title { font-size: 27px; letter-spacing: -0.01em; line-height: 1.2; }
.roles .arrow { color: var(--red); font-family: var(--mono); text-align: right; }

/* Facts list (company, careers) */
dl.facts { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr); margin-inline: 0; margin-bottom: 0; border-top: 1px solid var(--ink); }
dl.facts dt, dl.facts dd { margin: 0; padding: 14px 0 15px; border-bottom: 1px solid var(--rule); }
dl.facts dt { font-family: var(--mono); font-size: 13px; color: var(--ink-2); padding-top: 18px; }

/* People */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 40px; border-top: 1px solid var(--ink); }
.person { padding: 22px 0 26px; border-bottom: 1px solid var(--rule); }
.person h3 { margin-bottom: 4px; }
.person .mono { color: var(--ink-2); margin-bottom: 12px; }

/* Closing call to action */
.closing { background: var(--ink); color: var(--paper); padding: clamp(56px, 8vw, 104px) 0; }
.closing .label { color: color-mix(in srgb, var(--paper) 65%, var(--ink)); }
.closing h2 { max-width: 14em; margin-bottom: 20px; }
.closing p { color: color-mix(in srgb, var(--paper) 75%, var(--ink)); max-width: 34em; }
.closing .btn:hover { background: var(--paper); color: var(--ink); }

/* Long-form pages (roles) */
.prose { max-width: 38em; }
.prose h2 { font-size: 30px; margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }

/* Forms */
.form { display: grid; gap: 26px; max-width: 40em; }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.field .hint { font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 0 11px; font: inherit; font-size: 19px; color: var(--ink);
  background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: right 6px top 55%, right 0 top 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 24px; }
.field select option { background: var(--paper); color: var(--ink); }
.field input[type="file"] { font-family: var(--mono); font-size: 14px; padding: 12px 0; }
.field textarea { min-height: 170px; resize: vertical; border: 1px solid var(--ink); padding: 12px 14px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 1px 0 0 var(--red); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.check input { margin-top: 6px; accent-color: var(--red); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { font-family: var(--mono); font-size: 14px; padding: 14px 0 14px 16px; border-left: 3px solid currentColor; }
.status[hidden] { display: none; }
.status.error { color: var(--red); }
.status.success { color: var(--ink); border-left-color: var(--red); font-family: var(--serif); font-size: 22px; }

/* Footer */
.colophon { border-top: 1px solid var(--ink); padding: 40px 0 56px; font-family: var(--mono); font-size: 13px; color: var(--ink-2); }
.colophon .grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.colophon .wordmark { font-family: var(--serif); color: var(--ink); font-size: 20px; margin-bottom: 10px; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: 6px; }
.colophon a { text-decoration: none; }
.colophon a:hover { text-decoration: underline; }
.colophon h4 { margin: 0 0 10px; font-weight: 500; color: var(--ink); font-size: 13px; }

/* One quiet fade on load */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero > *:nth-child(2) { animation-delay: 120ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}

@media (max-width: 900px) {
  :root { --label: 1fr; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .row > .label { padding: 0 0 18px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .steps > li { grid-template-columns: 44px minmax(0, 1fr); }
  .steps > li > div:last-child { grid-column: 2; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .roles a { grid-template-columns: minmax(0, 1fr) 24px; }
  .roles .meta { grid-column: 1; }
  .roles .arrow { grid-row: 1; grid-column: 2; }
  .colophon .grid { grid-template-columns: 1fr 1fr; }
  .colophon .grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 18px; }
  .masthead .wrap { flex-direction: column; gap: 10px; }
  .nav { gap: 6px 18px; }
  section.part { padding: 52px 0 56px; }
  dl.facts { grid-template-columns: minmax(0, 1fr); }
  dl.facts dt { border-bottom: 0; padding-bottom: 0; }
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  table.data tr { border-bottom: 1px solid var(--rule); padding: 14px 0; }
  table.data td { border: 0; padding: 4px 0; }
  table.data td.mono { padding-top: 4px; }
}
