/* Reset, document defaults, accessibility basics. */

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

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Paper halftone (mockup): fixed dot raster fading in the middle of the screen. */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: radial-gradient(rgba(26, 23, 20, .13) 1px, transparent 1.2px);
  background-size: 5px 5px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%, transparent 80%);
          mask-image: linear-gradient(180deg, transparent 0, #000 30%, transparent 80%);
}
body > * { position: relative; z-index: 1; }
body > .overlay { position: fixed; z-index: var(--z-modal); }
body > .overlay--gate { z-index: var(--z-gate); }

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

input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4 { font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
strong, b { font-weight: 700; }

:focus-visible { outline: 3px solid var(--color-teal); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-gate);
  padding: var(--space-8) var(--space-16); background: var(--color-ink); color: var(--color-on-ink);
  font-weight: 700;
}
.skip-link:focus { left: var(--space-8); top: var(--space-8); }

[hidden][hidden] { display: none !important; }

.tap-target { position: relative; }
.tap-target::after {
  content: ""; position: absolute; inset: 50% 0 auto 0; translate: 0 -50%;
  height: 100%; min-height: 24px; z-index: 1;
}

::selection { background: var(--color-brand); color: #fff; }
