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

html {
  background: var(--color-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to right, transparent calc(50% - 0.5px), rgba(34, 34, 34, 0.025) 50%, transparent calc(50% + 0.5px));
  content: "";
  pointer-events: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button,
textarea {
  font: inherit;
}

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

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 8px 12px;
  color: var(--color-action-text);
  background: var(--color-action);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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