/* Reset and base elements.
 *
 * Reads only from tokens.css. No raw values here.
 */

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

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: var(--leading-normal);
  color: var(--color-ink);
  background: var(--color-canvas);

  /* A barely-there warm wash from the top. Flat cream reads as beige; a hint
   * of gradient makes it read as light. */
  background-image: radial-gradient(
    ellipse 120% 60% at 50% 0%,
    var(--color-canvas-deep) 0%,
    transparent 70%
  );
  background-attachment: fixed;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
}

h1 {
  font-size: var(--text-2xl);
}
h2 {
  font-size: var(--text-xl);
}
h3 {
  font-size: var(--text-lg);
}

p {
  margin: 0;
}

a {
  color: var(--color-accent-deep);
  text-decoration-color: var(--color-accent-soft);
  text-underline-offset: 0.2em;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* One focus treatment everywhere. Visible enough to navigate by keyboard,
 * soft enough not to look like an error. */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:focus:not(:focus-visible) {
  outline: none;
}

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

/* Visually hidden but available to screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
