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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
  scrollbar-color: var(--color-accent) var(--color-surface-deep);
}

body {
  margin: 0;
  background: var(--color-surface-deep);
  color: var(--color-text);
  font: var(--font-size-body)/var(--line-height-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::-webkit-scrollbar { width: 10px; }
body::-webkit-scrollbar-track { background: var(--color-surface-deep); }
body::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: var(--radius-pill); }

h1,
h2,
h3,
p,
figure,
dl,
dd { margin: 0; }

h1,
h2,
h3 { text-wrap: balance; }

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -.028em;
}

h1 {
  max-width: 15ch;
  font-size: var(--font-size-display);
  line-height: .93;
}

h2 {
  max-width: 19ch;
  font-size: clamp(2.35rem, 1.55rem + 3vw, 4.15rem);
  line-height: 1.01;
}

h3 {
  font-size: var(--font-size-heading-3);
  font-weight: 620;
  line-height: 1.32;
  letter-spacing: -.012em;
}

p { max-width: 64ch; color: var(--color-muted); }

p,
address,
dd { overflow-wrap: break-word; }

img { display: block; max-width: 100%; height: auto; }
ul,
ol { margin: 0; padding: 0; }
address { font-style: normal; }
section,
section > *,
li { min-width: 0; }

s,
em { font-style: normal; }

a {
  color: currentColor;
  text-decoration-color: var(--color-accent-line);
  text-decoration-thickness: 1px;
  text-underline-offset: .32em;
  transition: color var(--duration-feedback) var(--ease-feedback), text-decoration-color var(--duration-feedback) var(--ease-feedback);
}

a,
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a:focus-visible,
button:focus-visible {
  outline: var(--focus-width) solid var(--focus-color);
  outline-offset: var(--focus-offset);
  border-radius: var(--radius-small);
}

::selection {
  color: var(--color-on-accent);
  background: var(--color-accent-strong);
}

.section-inner,
.header-inner,
.footer-inner {
  width: min(calc(100% - var(--page-gutter) * 2), var(--page-width));
  margin-inline: auto;
}

main > section {
  position: relative;
  scroll-margin-top: calc(var(--header-height) + 1px);
}

.section-inner { padding-block: var(--space-section); }

.section-index,
.eyebrow {
  font-variant-numeric: tabular-nums;
}

@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-color: currentColor; }
}
