/* 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: 96px;
}

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

main {
  flex: 1 0 auto;
}

h1,
h2,
h3 {
  margin: 0 0 var(--space-2);
  color: var(--color-forest);
  font-family: var(--font-heading);
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--text-hero);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

h2 {
  font-size: var(--text-h2);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

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

a {
  color: var(--color-forest);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-forest-dark);
}

picture {
  display: contents;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Skip-link target receives programmatic focus only; it is not an interactive control. */
main:focus {
  outline: none;
}