/* === RESET === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-m);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--text-primary);
  background-color: var(--bg-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--text-primary);
}

h1 {
  font-size: var(--h1);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.08;
}

h2 {
  font-size: var(--h2);
  font-weight: var(--font-weight-bold);
}

h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }
h5 { font-size: var(--h5); }
h6 { font-size: var(--h6); }

p {
  max-width: 65ch;
  line-height: var(--line-height-normal);
}

p + p {
  margin-top: var(--space-s);
}

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

/* === LINKS === */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

a:hover {
  color: var(--primary-light);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

/* === IMAGES === */
img, picture, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* === LISTS === */
ul, ol {
  list-style: none;
}

/* === MISC === */
hr {
  border: none;
}

button {
  font-family: inherit;
}

/* === SKIP TO CONTENT === */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-m);
  z-index: 9999;
  padding: var(--space-xs) var(--space-m);
  background: var(--accent);
  color: var(--primary-darker);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-m);
  transition: top var(--duration-fast) ease;
}

.skip-link:focus {
  top: var(--space-xs);
}

/* === SELECTION === */
::selection {
  background: var(--accent);
  color: var(--primary-darker);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--grey-100);
}

::-webkit-scrollbar-thumb {
  background: var(--grey-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--grey-400);
}
