@layer reset {
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

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

  button, input, textarea, select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  ul, ol {
    list-style: none;
  }
}

@layer base {
  html {
    scroll-behavior: smooth;
    font-size: 16px;
  }

  body {
    font-family: var(--font-body);
    color: var(--color-charcoal);
    background-color: var(--color-beige);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.16;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: var(--color-forest);
  }

  p {
    text-wrap: pretty;
  }

  a {
    color: var(--color-forest);
    transition: color var(--transition-fast);
  }

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

  ::selection {
    background-color: var(--color-forest);
    color: var(--color-white);
  }

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

  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 0.5s;
  }

  ::view-transition-old(root) {
    animation-name: fade-out;
  }

  ::view-transition-new(root) {
    animation-name: fade-in;
  }

  @keyframes fade-out {
    to { opacity: 0; }
  }

  @keyframes fade-in {
    from { opacity: 0; }
  }

  @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;
    }
  }
}
