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

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

  body {
    background-color: var(--clr-bg);
    color: var(--clr-text);
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.65;
    min-height: 100dvh;
    overflow-x: hidden;
  }

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

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  h4 { font-size: var(--text-lg); }
  h5, h6 { font-size: var(--text-md); }

  a {
    color: var(--clr-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
  }
  a:hover, a:focus-visible { color: var(--clr-accent); text-decoration: underline; }

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

  ul, ol { list-style: none; }

  button {
    font-family: var(--font-head);
    cursor: pointer;
    border: none;
    background: none;
  }

  input, textarea, select {
    font-family: var(--font-body);
    font-size: var(--text-base);
  }

  :focus-visible {
    outline: 2px solid var(--clr-primary);
    outline-offset: 3px;
    border-radius: var(--rad-sm);
  }

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

  p { max-width: 72ch; }

  hr {
    border: none;
    border-top: 1px solid var(--clr-border);
    margin-block: var(--sp-6);
  }

  strong { color: var(--clr-primary); font-weight: 700; }
  em { color: var(--clr-accent); font-style: normal; font-weight: 600; }

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