/*
 * Base styles — resets, body, typography defaults.
 */

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body a,
body a:visited {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: opacity var(--t-fast);
}

a:hover {
  opacity: 0.7;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-display);
  color: var(--color-text);
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--fs-h1); letter-spacing: var(--letter-display); }
h2 { font-size: var(--fs-h2); letter-spacing: var(--letter-display); }
h3 { font-size: 1.25rem; letter-spacing: 0.04em; }

p {
  margin: 0 0 var(--space-4);
}

.label {
  font-family: var(--font-body);
  font-size: var(--fs-tiny);
  text-transform: uppercase;
  letter-spacing: var(--letter-label);
  color: var(--color-text-muted);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link:focus {
  position: fixed;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 200;
  width: auto;
  height: auto;
  margin: 0;
  padding: var(--space-2) var(--space-4);
  clip: auto;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: var(--fs-small);
  text-decoration: none;
}
