/* Reset, web fonts, and base typography. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-body);
  font-style: normal;
}

/* Paper ground. A fixed layer behind everything rather than a tiled
   background: the texture is not seamless, so tiling would show its edges.
   Fixed to the viewport means one continuous sheet however long the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--paper) center / cover no-repeat;
}

img { max-width: 100%; border: 0; }

p { margin: 0 0 1.5em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 1em 0; }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--pink-deep); }

h1, h2, h3 { font-weight: 400; }

h2 {
  font-family: var(--font-body);
  font-size: 1em;
  font-style: italic;
  font-weight: 700;
  line-height: 1.4em;
  text-transform: uppercase;
  margin: 0 0 1em;
}

h3 {
  font-family: var(--font-body);
  font-size: 1em;
  line-height: 1.5em;
  text-transform: uppercase;
  margin: 0 0 1em;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* One visible focus treatment for every interactive element. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.clear::after { content: ""; display: table; clear: both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
