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

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.18rem);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.25em;
}

a:focus-visible {
  border-radius: 0.15rem;
  outline: 2px solid var(--gold-bright);
  outline-offset: 0.4rem;
}

h1,
h2,
h3,
p,
blockquote {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3.1rem, 7.6vw, 8.8rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
}

h2 {
  font-size: clamp(2.6rem, 5.3vw, 6.1rem);
  letter-spacing: -0.035em;
  line-height: 1;
}

h3 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.15;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 1rem;
  left: 1rem;
  padding: 0.7rem 1rem;
  transform: translateY(-180%);
  background: var(--ivory);
  color: var(--ink);
  font-weight: 600;
}

.skip-link:focus {
  transform: translateY(0);
}

.section {
  position: relative;
  width: var(--page);
  margin-inline: auto;
  padding-block: var(--space-5);
}

.section__intro {
  max-width: var(--reading);
}

.section__intro > p:last-child {
  max-width: 39rem;
  color: var(--ivory-dim);
}

@media (max-width: 720px) {
  :root {
    --page: min(100% - 2rem, 42rem);
  }

  body {
    line-height: 1.62;
  }
}
