@font-face {
  font-family: "EB Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/eb-garamond-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "EB Garamond";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/eb-garamond-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
}

:root {
  --paper: #f0efeb;
  --ink: #14202e;
  --pencil: #3c4858;
  --accent: #2a598d;

  --brick: #a65b42;
  --navy: #274862;
  --copper: #4f8a86;

  --serif: "EB Garamond", serif;
  --sans: "Source Sans 3", system-ui, sans-serif;

  --u: clamp(6px, min(1vw, 2svh), 32px);
  --side: calc((100vw - 100 * var(--u)) / 2);
  --inset: calc(var(--side) + 6 * var(--u));
  --gutter: clamp(20px, 6vw, 96px);

  --row: max(1.45 * var(--u), 1.125rem);
  --lead: max(1.7 * var(--u), 1.0625rem);

  --small: max(1.05 * var(--u), 0.875rem);
}

* { margin: 0; box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgb(60 72 88 / 0.2); color: var(--ink); }
.wordmark ::selection { background: transparent; color: currentColor; }

a {
  color: inherit;
  text-decoration-thickness: max(1px, 0.06em);
  text-underline-offset: 0.22em;
  text-decoration-color: rgb(42 89 141 / 0.4);
}
a:hover, a:focus-visible { color: var(--accent); text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (aspect-ratio > 5/4) and (width > 760px) {
    .recede {
      animation: recede linear both;
      animation-timeline: --page;
      animation-range: exit 0% exit 85%;
    }
  }
}

@keyframes recede {
  to { translate: 0 6svh; opacity: 0; }
}

h1, h3 { font-weight: 400; }

.headline {
  font-size: clamp(44px, 5.5 * var(--u), 140px);
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, calc(30 * var(--row))) minmax(calc(25 * var(--u)), 1fr);
  column-gap: calc(8 * var(--u));
  align-items: start;
  margin-top: calc(6 * var(--u));
}

.lead { font-size: var(--lead); line-height: 1.45; text-wrap: pretty; }

.specimen {
  --dot-x: 45%;
  width: min(100%, calc(25 * var(--u)));
  padding-top: calc(0.3 * var(--row));
  color: var(--pencil);
}
.specimen .plate { position: relative; }
.specimen img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.specimen .leader {
  position: absolute;
  left: var(--dot-x);
  top: 47%;
  bottom: -0.7em;
  border-left: 1px solid var(--pencil);
}
.specimen .leader::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}
.specimen .label {
  display: flex;
  flex-direction: column;
  margin: 0.7em 0 0 calc(var(--dot-x) - 0.45em);
  line-height: 1.3;
  text-wrap: balance;
}
.specimen .name { color: var(--ink); }
.specimen em { font-family: var(--serif); font-size: 1.15em; letter-spacing: 0; }

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

.meta {
  font-family: var(--sans);
  font-size: var(--small);
  letter-spacing: 0.01em;
}

.wordmark { font-style: italic; white-space: nowrap; }
.wordmark .law { color: var(--brick); }
.wordmark .x { font-family: var(--sans); font-style: normal; font-size: 0.85em; line-height: 0; color: var(--navy); }
.wordmark .x::before, .wordmark .x::after { content: "\200A" / ""; }
.wordmark .econ { color: var(--copper); }
.wordmark .tld { color: var(--pencil); }

@media (aspect-ratio > 5/4) and (width > 760px) {
  .home { display: grid; grid-template-rows: auto 1fr auto; min-height: 100svh; }
  .home > main { grid-row: span 2; display: grid; grid-template-rows: subgrid; }
}

.hero {
  padding: calc(8 * var(--u)) var(--inset) calc(2 * var(--u));
  text-align: center;
}
.hero h1 {
  font-size: calc(7.5 * var(--u));
  line-height: 0.95;
  letter-spacing: -0.01em;
}
.hero .say {
  margin-top: calc(4 * var(--u));
  font-size: var(--lead);
  line-height: 1.45;
  text-wrap: balance;
}

.section {
  padding: calc(4 * var(--u)) var(--inset) calc(8 * var(--u));
  view-timeline-name: --page;
}

.filters { position: absolute; width: 0; height: 0; }

.experiments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(6 * var(--u)) calc(4 * var(--u));
  list-style: none;
  padding: 0;
}
.experiment svg { display: block; width: 100%; height: auto; overflow: visible; }
.experiment .title { margin-top: calc(2 * var(--u)); font-size: var(--lead); line-height: 1.3; }
.experiment .finding { margin-top: 0.5em; font-size: var(--row); line-height: 1.5; color: var(--pencil); text-wrap: pretty; }
.experiment .by { margin-top: 0.8em; color: var(--pencil); }

.close {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: end;
  column-gap: calc(6 * var(--u));
  padding: calc(4 * var(--u)) var(--inset) calc(6 * var(--u));
}
.close .name {
  font-size: clamp(48px, 5.5 * var(--u), 140px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-box: trim-both cap alphabetic;
}
.close .end {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  gap: 0.9em;
}
.close .legal, .close .colophon { text-box: trim-both cap alphabetic; }
.close .legal a + a { margin-left: 1.5em; }
.close .colophon { color: var(--pencil); }

@supports not (text-box: trim-both cap alphabetic) {
  .close { align-items: last baseline; }
  .close .end { align-self: last baseline; }
}

.sheet {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
}
.sheet > main {
  flex-grow: 1;
  padding: calc(6 * var(--u)) var(--inset) calc(8 * var(--u));
}

.top {
  display: flex;
  padding: max(24px, 3 * var(--u)) var(--inset) 0;
}
.site-name { font-size: calc(2.4 * var(--u)); text-decoration-line: none; }
.site-name:hover, .site-name:focus-visible { background: linear-gradient(currentColor 0 0) 0 calc(100% - 0.05em) / 100% max(1px, 0.06em) no-repeat; }

.versions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 32em));
  column-gap: calc(4 * var(--u));
  margin-top: calc(6 * var(--u));
  font-size: var(--row);
}
.versions > div { hyphens: auto; }
.versions p, .versions address {
  font-style: normal;
  line-height: 1.5;
}
.versions * + p, .versions * + address { margin-top: 0.7em; }
.versions .updated { margin-top: 1.4em; color: var(--pencil); }

@media (aspect-ratio <= 5/4), (width <= 760px) {
  :root { --row: 1.125rem; --small: 0.9375rem; --lead: 1.25rem; }

  .headline { font-size: clamp(22px, (100vw - 2 * var(--gutter)) * 0.082, 40px); line-height: 1.05; }
  .split { display: block; margin-top: 32px; }
  .specimen { width: min(100%, 400px); margin-top: 56px; padding-top: 0; }

  .hero { padding: 64px var(--gutter) 24px; }
  .hero h1 { font-size: clamp(48px, 11vw, 96px); }
  .hero .say { margin: 32px auto 0; max-width: 30em; font-size: 1.375rem; }

  .section { padding: 56px var(--gutter) 48px; }
  .experiments { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 32px; }
  .experiment .title { margin-top: 24px; }

  .close { grid-template-columns: minmax(0, 1fr); row-gap: 36px; padding: 32px var(--gutter) 48px; }
  .close .name { font-size: 48px; }
  .close .end { align-items: flex-start; gap: 16px; }
  .close .legal { display: flex; flex-wrap: wrap; gap: 0.6em 1.5em; }
  .close .legal a { white-space: nowrap; }
  .close .legal a + a { margin-left: 0; }

  .sheet > main { padding: 48px var(--gutter) 56px; }
  .top { padding: 24px var(--gutter) 0; }
  .site-name { font-size: clamp(21px, 22vw - 49px, 26px); }

  .versions { grid-template-columns: minmax(0, 1fr); row-gap: 40px; margin-top: 32px; }
}
@media (width <= 600px) {
  :root { --gutter: 20px; }
  .hero .say { font-size: 1.25rem; }
  .experiments { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(44px, 13vw, 64px); }
}

@media (forced-colors: active) {
  .specimen img { mix-blend-mode: normal; }
  svg[role="img"] { forced-color-adjust: none; background: var(--paper); }
}
