/* Shared reset + design tokens for every client site.
   Sites override the tokens in their own /public/site.css. */

:root {
  --color-bg: #f0f0e6;
  --color-fg: #000;
  --color-rule: #808080;
  --font-body: "Ibarra Real Nova", Georgia, serif;
  --font-card: "Courier New", Courier, monospace;
}

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

html {
  font-size: 18px;
  line-height: 1.2;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--color-fg);
  background-color: var(--color-bg);
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  border-radius: 2px;
}

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

ul,
ol {
  list-style: none;
}

p {
  margin: 0 0 20px;
}

/* Letterpress "chop" treatment. Blur softens the artwork, contrast thresholds
   it back into hard but organic edges, and the SVG filter removes the opaque
   ground the blur bled against. Requires ink-filter.njk on the page.

   The element needs an opaque ground for the threshold to bite, so `.ink` sets
   one; it defaults to --color-bg, which doubles as a graceful fallback (an
   invisible box against the page) if the SVG filter is unavailable. */
.ink {
  background-color: var(--ink-ground, var(--color-bg));
  filter: blur(var(--ink-blur, 0px)) contrast(var(--ink-contrast, 5))
    url(#white-to-transparent);
}

/* Off-screen host for referenced SVG filters. Uses clipping rather than
   `display: none`, which drops filter references in some browsers. */
.filter-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

@page {
  margin: 50px !important;
}

@media print {
  body {
    height: auto;
    overflow: visible;
  }
}
