/* =================================================================
   CSS RESET - Modern Normalize
   ================================================================= */

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

/* Remove default margins and paddings */
* {
  margin: 0;
  padding: 0;
}

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

/* Core body defaults */
body {
  min-height: 100vh;
  line-height: var(--leading-normal);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Remove list styles on ul, ol elements with a list role */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* Set shorter line heights on headings and interactive elements */
h1, h2, h3, h4, h5, h6,
button, input, label {
  line-height: var(--leading-tight);
}

/* Balance text wrapping on headings */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  transition: color var(--transition-normal);
}

/* Heading sizes */
h1 {
  font-size: var(--text-5xl);
}

h2 {
  font-size: var(--text-4xl);
}

h3 {
  font-size: var(--text-3xl);
}

h4 {
  font-size: var(--text-2xl);
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Inherit fonts for inputs and buttons */
input, button, textarea, select {
  font: inherit;
}

/* Textarea resize */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

/* Remove all animations and transitions for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Links */
a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

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

/* Paragraphs */
p {
  margin-bottom: var(--space-4);
  text-wrap: pretty;
}

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

/* Lists */
ul, ol {
  list-style-position: inside;
  margin-bottom: var(--space-4);
}

ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

/* Strong and bold */
strong, b {
  font-weight: var(--font-bold);
}

/* Small text */
small {
  font-size: var(--text-sm);
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: var(--space-8) 0;
}

/* Selection */
::selection {
  background-color: var(--color-primary);
  color: var(--color-white);
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Button reset */
button {
  cursor: pointer;
  background: none;
  border: none;
}
