/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--space-5));
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
main { flex: 1 0 auto; }
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul[class], ol[class] { list-style: none; padding: 0; }
address { font-style: normal; }
hr { border: 0; border-top: var(--border); }
[hidden] { display: none !important; }

/* Headings */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-text);
  text-wrap: balance;
}
h1 { font-size: var(--text-h1); line-height: var(--leading-tight); letter-spacing: var(--tracking-h1); }
h2 { font-size: var(--text-h2); line-height: 1.14; letter-spacing: var(--tracking-h2); }
h3 { font-size: var(--text-h3); line-height: var(--leading-heading); letter-spacing: var(--tracking-h3); }
h4 { font-size: var(--text-h4); line-height: 1.3; }
p { text-wrap: pretty; }
strong, b { font-weight: 600; }
small { font-size: var(--text-sm); }

/* Links */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--transition), text-decoration-color var(--transition);
}
a:hover { color: var(--color-action); }

/* Focus */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
  border-radius: 4px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--color-navy); color: var(--color-white); }

/* Skip link */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--color-white); outline-color: var(--color-white); outline-offset: -4px; }

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
