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

  * {
    margin: 0;
  }

  body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

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

  input,
  button,
  textarea,
  select {
    font: inherit;
  }

  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    overflow-wrap: break-word;
  }

  #root,
  #__next {
    isolation: isolate;
  }
}

@layer base {
  html {
    color-scheme: light dark;
    scroll-behavior: smooth;
  }

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

    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  body {
    font-family: var(--font-body);
    font-size: var(--font-size-3);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    min-height: 100vh;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
  }

  h1 {
    font-size: var(--font-size-8);
  }
  h2 {
    font-size: var(--font-size-7);
  }
  h3 {
    font-size: var(--font-size-6);
  }
  h4 {
    font-size: var(--font-size-5);
  }
  h5 {
    font-size: var(--font-size-4);
  }
  h6 {
    font-size: var(--font-size-3);
  }

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

  a:hover {
    color: var(--color-primary-hover);
  }

  :focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-1);
  }

  ::selection {
    background-color: var(--color-primary);
    color: var(--color-background);
  }
}
