/*
  BASE — reset, typography defaults, global elements
*/

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

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 4rem;
  hanging-punctuation: first last;
}

body {
  min-height: 100dvh;
  font-family: var(--font-mono);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  transition: background 200ms ease, color 200ms ease;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--text);
}

p, li { text-wrap: pretty; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity var(--ease);
}
a:hover { opacity: 0.75; }

button { cursor: pointer; background: none; border: none; }
table  { border-collapse: collapse; width: 100%; }

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

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

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

/* ── SHELL ── */
.wrap        { max-width: var(--w-wide);    margin: 0 auto; padding: 0 var(--s6); }
.wrap--mid   { max-width: var(--w-default); margin: 0 auto; padding: 0 var(--s6); }
.wrap--slim  { max-width: var(--w-narrow);  margin: 0 auto; padding: 0 var(--s6); }

/* ── DIVIDER ── */
.rule { height: 1px; background: var(--border); }
