/* ─────────────────────────────────────────────
   Reset + base typography
───────────────────────────────────────────── */

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

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

body {
  margin: 0;
  min-height: 100svh;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-editorial);
  font-size: var(--text-editorial-m);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

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

p, figure {
  margin: 0;
}

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

h1, h2, h3 {
  margin: 0;
  font-weight: 400;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ---- Utility type classes ---- */

.font-display {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.font-mono {
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
  line-height: 1.5;
}

.italic {
  font-style: italic;
}

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

/* ---- Grain texture ----
   A single tactile paper-grain PNG, multiplied over any background
   color so every section (purple / tan / cream / navy) reads as
   printed stock rather than a flat digital fill. */

.grain {
  position: relative;
  isolation: isolate;
}

.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../img/grain.png");
  background-repeat: repeat;
  background-size: 340px 340px;
  mix-blend-mode: multiply;
  opacity: 0.7;
  pointer-events: none;
}

.grain > * {
  position: relative;
  z-index: 1;
}
