/* reset + base typography */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "ss02", "cv11";
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* selection */
::selection { background: var(--ink); color: var(--crudo); }
.is-dark ::selection { background: var(--bronze-2); color: var(--ink); }

/* type roles */
.display {
  font-family: var(--f-display);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.025em;
  line-height: .92;
  text-wrap: balance;
}
.serif { font-family: var(--f-display); font-weight: 500; }
.mono {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 400;
}
.lead { font-size: var(--t-lead); line-height: 1.4; max-width: 56ch; }

h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

/* layout helpers */
.wrap {
  max-width: var(--max);
  padding-inline: var(--pad-x);
  margin-inline: auto;
}

.section {
  padding-block: clamp(4rem, 8vw, 9rem);
  position: relative;
}

.section-marker {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(2rem, 4vw, 4rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.section-marker .num {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  letter-spacing: .14em;
  color: var(--fg-mute);
}
.section-marker .num::before { content: "§ "; color: var(--accent); }
.section-marker .label {
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--fg-soft);
}
.section-marker .meta {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: var(--t-mono);
  color: var(--fg-mute);
}

/* utility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--ink); color: var(--crudo);
  padding: .75rem 1.25rem;
  font-family: var(--f-mono); font-size: var(--t-mono);
  z-index: 1000;
  border-radius: var(--r-md);
}
.skip-link:focus { top: 1rem; }

/* accent text */
.accent { color: var(--accent); }
.tnum { font-variant-numeric: tabular-nums; }
