/* BASE: reset, page defaults, layout widths, accessibility basics. */

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, p { margin: 0; }

/* Page gutters: tighter on mobile, roomier on desktop. */
:root { --gutter: 1rem; --space: 3rem; }
@media (min-width: 48rem) { :root { --gutter: 2rem; --space: 5rem; } }
@media (min-width: 80rem) { :root { --gutter: 3rem; --space: 7rem; } }

main { padding: 0 var(--gutter); }

/* Keyboard focus is always visible. */
:focus-visible {
  outline: 2px solid var(--red-deep);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 100;
  font-family: var(--font-ui);
}
.skip-link:focus { top: 0.5rem; }

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

/* Calm, eased motion everywhere. Reduced motion switches it off. */
@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;
  }
}
