/*
 * Maternity edition — fonts, reset and type roles.
 *
 * Three voices, strictly cast:
 *   display (GT Alpina)       chapter titles, prose subheads, figure insight titles, the data paragraph
 *   sans    (Passenger Sans)  body prose, standfirsts
 *   mono    (Azeret Mono)     all text inside a chart, kickers, UI, methods notes
 *
 * GT Alpina and Passenger Sans match the other DataLabs editions. GT Alpina
 * ships in one weight (400), Passenger Sans in 400 and 600; weights are never
 * synthesised, so a heading set at 500–700 renders at the nearest real weight.
 */

@font-face {
  font-family: "GT Alpina Standard";
  src: url("../fonts/gt-alpina-standard-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Passenger Sans";
  src: url("../fonts/passenger-sans-regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Passenger Sans";
  src: url("../fonts/passenger-sans-semibold.otf") format("opentype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader Variable";
  src: url("../fonts/newsreader-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter Variable";
  src: url("../fonts/inter-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Azeret Mono Variable";
  src: url("../fonts/azeret-mono-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}

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

html {
  font-family: var(--font-sans);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--theme-dur), color var(--theme-dur);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- type roles ----------------------------------------------------------- */

.t-kicker {
  font-family: var(--font-mono);
  font-size: var(--fs-kicker);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin: 0 0 10px;
}

.t-h1 {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 500;
  line-height: 1.12;
  color: var(--ink);
  text-align: center;
  max-width: 22ch;
  margin: 0 auto 4px;
}

.t-standfirst {
  font-family: var(--font-sans);
  font-size: var(--fs-standfirst);
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink);
  text-align: center;
  max-width: 42ch;
  margin: 0 auto 8px;
}

/* Long-form prose block. Paragraphs, lists, subheads and links inside it. */
.prose p, .prose li {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  margin: 0 0 var(--copy-gap);
}
.prose > :last-child { margin-bottom: 0; }
.prose a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(var(--ink-rgb), .4);
}
.prose a:hover { text-decoration-color: var(--ink); }
.prose h3, .prose h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.012em;
  color: var(--ink);
  max-width: 26ch;
  margin: 8px 0 18px;
  text-wrap: balance;
}
.prose h4 { max-width: 36ch; line-height: 1.3; }
.prose h3 { font-size: var(--fs-h3); }
.prose h4 { font-size: var(--fs-h4); }

/* Pull quote from an interview, with a mono attribution line. */
.prose blockquote, .t-quote {
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  font-weight: 450;
  line-height: 1.45;
  color: var(--ink);
  margin: 0 0 8px;
}
.prose .who, .t-who {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 16px;
}

/* The large closing "claim" paragraph; may carry inline sparklines. */
.t-data-para {
  font-family: var(--font-display);
  font-size: var(--fs-data-para);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -.015em;
  max-width: 34em;
  color: color-mix(in srgb, var(--ink) 88%, var(--ramp-via));
  margin: 0;
}

/* Methods / source footnote. */
.t-method {
  font-family: var(--font-mono);
  font-size: var(--fs-method);
  line-height: 1.55;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
  max-width: 74ch;
  margin: 14px 0 0;
  padding-top: 12px;
}
.t-method em { color: var(--ink); font-style: italic; }

.t-mono-label {
  font-family: var(--font-mono);
  font-size: var(--fs-ui);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
