/* BASE — reset and default element styles. */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: var(--text-base);
  line-height: 1.6;
  font-kerning: normal;
  font-variant-numeric: oldstyle-nums;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2 { margin: 0; font-weight: 400; line-height: 1.12; }
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }

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

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(242, 240, 236, 0.4);
  text-underline-offset: 0.2em;
  transition: color var(--ease), text-decoration-color var(--ease);
}
a:hover { text-decoration-color: currentColor; }

ul { margin: 0; padding: 0; list-style: none; }

a, button { touch-action: manipulation; }

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

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

::selection { background: var(--text); color: var(--bg); }

[hidden] { display: none !important; }

.skip-link {
  position: absolute; left: var(--s3); top: -4rem; z-index: 20;
  padding: var(--s1) var(--s3); background: var(--text); color: var(--bg);
}
.skip-link:focus { top: var(--s3); }

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