/* ==========================================================================
   MODERN CSS RESET & BASELINE
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-bg-main);
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  max-width: 100%;
  min-height: 100vh;
  position: relative;
  width: 100%;
}

*, *::before, *::after {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-primary);
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
  word-break: break-word;
}

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

::selection {
  background-color: var(--color-accent);
  color: #ffffff;
}
