/* Reset and element defaults. */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
}

main { flex: 1; display: flex; flex-direction: column; }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  color: var(--color-brand);
  text-wrap: balance;
}
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-sm); }
p:last-child { margin-bottom: 0; }

a { color: var(--color-brand); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Utilities */
.center { text-align: center; }

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

.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -10rem;
  z-index: 100;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-brand);
  color: #fff;
  border-radius: var(--radius);
}
.skip-link:focus { top: var(--space-sm); }
