/* ========================================
   CSS Reset
   Modern normalize approach
   ======================================== */

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

/* Remove default margins and paddings */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
li,
figure,
figcaption,
blockquote,
dl,
dd {
  margin: 0;
  padding: 0;
}

/* Body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
}

/* Images */
img,
picture {
  max-width: 100%;
  display: block;
  height: auto;
}

/* Links */
a {
  text-decoration: none;
  color: inherit;
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
  padding: 0;
}

/* Form elements */
input,
textarea,
select {
  font: inherit;
}

/* Remove list styles from nav lists */
nav ul,
nav ol {
  list-style: none;
}

/* Smooth scroll — only for anchor navigation, not globally on html
   (global smooth causes unintended page scroll from scrollIntoView side-effects) */

/* Remove focus outline for mouse users, keep for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

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

/* Improve text rendering */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Remove extra space in tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
}
