// ========================================
// RESET + NORMALIZE for SCSS Projects
// ========================================





// ===== Base Variables (Override as needed) =====
$font-family-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
$font-size-base: 16px;
$text-color: #000;
$background-color: #fff;
$link-color: inherit;
$link-hover-color: inherit;
$hr-color: #ccc;

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

// ===== HTML and Body defaults =====
html {
  font-size: $font-size-base;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: $font-family-base;
  background-color: $background-color;
  color: $text-color;
}

// ===== Typography elements =====
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

p, blockquote, pre, figure {
  margin: 0;
}

b,
strong {
  font-weight: bold;
}

em,
i {
  font-style: italic;
}

small {
  font-size: 80%;
}

// ===== Anchor tags =====
a {
  color: $link-color;
  text-decoration: none;

  &:hover {
    color: $link-hover-color;
    text-decoration: underline;
  }
}

// ===== List reset =====
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

// ===== Table reset =====
table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0;
}

// ===== Form elements =====
input,
button,
select,
textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  appearance: none;
  box-shadow: none;
}

textarea {
  resize: vertical;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

// ===== Form group elements =====
fieldset {
  border: none;
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

// ===== Code and preformatted text =====
pre,
code,
kbd,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}

// ===== Miscellaneous =====
hr {
  border: none;
  border-top: 1px solid $hr-color;
  margin: 2rem 0;
}

abbr[title] {
  border-bottom: 1px dotted;
  cursor: help;
}

mark {
  background-color: #ff0;
  color: #000;
}

summary {
  cursor: pointer;
}

// ===== Accessibility helpers =====
[hidden] {
  display: none !important;
}

[disabled] {
  opacity: 0.5;
  pointer-events: none;
}