@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@layer base {

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

  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;

    scroll-padding-top: calc(var(--space-8) + var(--space-4));
  }

  @media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }
  }

  body {
    margin: 0;
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    font-weight: var(--fw-regular);
    line-height: var(--lh-base);

    min-height: 100svh;
    display: flex;
    flex-direction: column;
  }

  body > main {
    flex: 1 0 auto;
  }

  h1, h2, h3, h4, h5, h6,
  p, figure, blockquote, dl, dd {
    margin: 0;
  }

  ul[class], ol[class] {
    list-style: none;
    margin: 0;
    padding: 0;
  }

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

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

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

  [hidden] {
    display: none !important;
  }

  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    color: var(--color-brand);
    text-wrap: balance;
  }

  h1 {
    font-size: var(--fs-3xl);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
  }

  h2 {
    font-size: var(--fs-2xl);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-tight);
  }

  h3 {
    font-size: var(--fs-xl);
    line-height: var(--lh-snug);
  }

  h4 {
    font-size: var(--fs-lg);
    line-height: var(--lh-snug);
    font-weight: var(--fw-semibold);
  }

  h5, h6 {
    font-size: var(--fs-md);
    line-height: var(--lh-snug);
    font-weight: var(--fw-semibold);
  }

  p {
    text-wrap: pretty;
  }

  p, li {
    max-width: var(--measure);
  }

  small {
    font-size: var(--fs-sm);
  }

  strong, b {
    font-weight: var(--fw-semibold);
  }

  a {
    color: var(--color-accent-text);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: color var(--dur-fast) var(--ease-out),
                text-decoration-color var(--dur-fast) var(--ease-out);
  }

  a:hover {
    color: var(--color-brand);
    text-decoration-thickness: 2px;
  }

  :focus-visible {
    outline: var(--focus-ring) solid var(--color-focus);
    outline-offset: var(--focus-offset);
    border-radius: var(--radius-sm);
  }

  .on-brand :focus-visible {
    outline-color: var(--color-accent-on-dark);
  }

  ::selection {
    background-color: var(--color-accent);
    color: var(--color-text-invert);
  }

  hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin-block: var(--space-6);
  }

  code, kbd, samp, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
  }

  code {
    background-color: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.1em 0.35em;
  }

  table {
    border-collapse: collapse;
    width: 100%;
  }

  th, td {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
  }

  th {
    font-family: var(--font-heading);
    font-weight: var(--fw-semibold);
    font-size: var(--fs-sm);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: var(--color-text-muted);
  }

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