/* Reset + base element styles + accessibility utilities shared by every page. */

html, body { margin: 0; padding: 0; background: var(--teal-bg); }

*, *::before, *::after { box-sizing: border-box; }
* { overflow-wrap: break-word; }
html, body { hyphens: auto; -webkit-hyphens: auto; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  min-height: 100vh;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 { margin: 0; font-weight: 400; font-family: var(--font-display); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
dl, dt, dd { margin: 0; }
img { max-width: 100%; display: block; }

button { font: inherit; color: inherit; background: none; border: 0; }
input, textarea { font-family: var(--font-body); color: var(--ink); }
input::placeholder, textarea::placeholder { color: #6b6152; opacity: 1; }

:focus-visible { outline: 4px solid var(--ink); outline-offset: 4px; }
.on-dark:focus-visible { outline-color: var(--yellow); }

/* Visually hidden but available to assistive tech */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto; margin: 0;
  overflow: visible; clip: auto; clip-path: none; padding: 14px 20px;
  background: var(--yellow); border: var(--border-thin) solid var(--ink);
  font-family: var(--font-display); font-size: 18px; letter-spacing: 1.5px;
  color: var(--ink); z-index: 999;
}

@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;
  }
}
