*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-block: var(--scroll-offset);
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  background: var(--color-bg-dark);
}

body {
  margin: 0;
  background: var(--color-bg-dark);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  line-height: 1.6;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

h1,
h2,
h3 {
  margin: 0 0 0.45em;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h1 {
  font-size: clamp(var(--font-size-4xl), 4.2vw, 3.4rem);
}

h2 {
  font-size: var(--font-size-xl);
}

h3 {
  font-family: var(--font-main);
  font-size: var(--font-size-lg);
  font-weight: 800;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

main {
  background: var(--color-bg);
}

html.is-restoring body {
  visibility: hidden;
  animation: restoring-fallback 0s 2s forwards;
}

@keyframes restoring-fallback {
  to {
    visibility: visible;
  }
}

a {
  color: var(--color-accent-text);
  text-underline-offset: 3px;
}

a,
button {
  transition:
    color var(--duration) ease,
    background-color var(--duration) ease,
    border-color var(--duration) ease,
    transform var(--duration) ease;
}

img,
picture,
svg,
video {
  display: block;
  max-inline-size: 100%;
  block-size: auto;
}

button,
input,
textarea,
select {
  color: inherit;
  font: inherit;
}

input,
textarea,
select {
  font-size: max(16px, 1em);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

:focus-visible {
  border-radius: 6px;
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
  clip-path: inset(100%);
  overflow: hidden;
}
