@layer reset, foundation, components, utilities;

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

  html {
    scroll-behavior: smooth;
  }

  body,
  figure,
  h1,
  h2,
  p,
  ol,
  ul,
  dl,
  dd {
    margin: 0;
  }

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

  img,
  picture {
    display: block;
    max-inline-size: 100%;
  }

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

  button,
  a {
    -webkit-tap-highlight-color: transparent;
  }
}

@layer foundation {
  :root {
    --sans: Inter, ui-sans-serif, "Helvetica Neue", Arial, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    font-family: var(--sans);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
  }

  body {
    min-inline-size: 320px;
    min-block-size: 100svh;
  }

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

  ::selection {
    color: white;
    background: #006c7d;
  }

  :focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
  }
}

@layer components {
  .skip-link {
    position: fixed;
    inset: .75rem auto auto .75rem;
    z-index: 999;
    translate: 0 -180%;
    padding: .75rem 1rem;
    color: white;
    background: #151716;
    transition: translate .2s var(--ease-out);
  }

  .skip-link:focus {
    translate: 0;
  }

  .visually-hidden {
    position: absolute !important;
    inline-size: 1px !important;
    block-size: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}

@layer utilities {
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      animation: none !important;
      transition-duration: .001ms !important;
    }
  }
}
