/* =====================================================================
   Modern reset
   ===================================================================== */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  line-height: var(--lh-tight);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Icons manage their own fill/stroke via the icon() renderer; do not
   force a global fill (it would flood line icons as solid shapes). */
.svg-icon { width: 1.4em; height: 1.4em; }

a {
  color: var(--mineral);
  text-decoration-color: color-mix(in srgb, var(--mineral) 40%, transparent);
  text-underline-offset: 3px;
  transition: color var(--dur-fast) var(--ease);
}

a:hover { color: var(--mineral-deep); }

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

button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; padding: 0; }

table { border-collapse: collapse; width: 100%; }

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

:target { scroll-margin-top: calc(var(--header-h) + 1.5rem); }

::selection {
  background: color-mix(in srgb, var(--mineral) 22%, transparent);
  color: var(--ink);
}

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

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
