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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image: var(--bg-atmosphere), var(--texture-light), var(--texture-ruled);
  background-size: auto, auto, 100% 9rem;
  background-repeat: no-repeat, no-repeat, repeat;
  background-attachment: fixed, fixed, fixed;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  body {
    background-attachment: scroll;
    background-image: var(--bg-atmosphere), var(--texture-light);
    background-size: auto;
    background-repeat: no-repeat;
  }
}

::selection {
  background: color-mix(in srgb, var(--color-gold-muted) 42%, transparent);
  color: var(--color-ink);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--color-accent);
}

:focus-visible {
  outline: 2px solid var(--color-gold-muted);
  outline-offset: 3px;
}

.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;
}

.wrap {
  width: min(var(--measure-wide), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.prose {
  max-width: var(--measure);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}
