/**
 * CSS RESET
 * 
 * Normalizes browser default styles to ensure consistency across
 * different browsers. Based on modern CSS reset practices.
 */

/* ===== BOX SIZING ===== */
/* Use border-box model for all elements (makes sizing predictable) */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== ROOT DEFAULTS ===== */
html {
  /* Smooth scrolling for anchor links */
  scroll-behavior: smooth;
  /* Prevent font size adjustment on iOS */
  -webkit-text-size-adjust: 100%;
}

/* ===== BODY DEFAULTS ===== */
body {
  /* Remove default margin */
  margin: 0;
  /* Set base line height */
  line-height: 1.5;
  /* Enable better font rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== HEADINGS ===== */
h1, h2, h3, h4, h5, h6 {
  /* Remove default margins */
  margin: 0;
  /* Inherit font weight instead of bold default */
  font-weight: inherit;
  /* Tighter line height for headings */
  line-height: 1.2;
}

/* ===== TEXT ELEMENTS ===== */
p, blockquote, dl, dd {
  margin: 0;
}

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

/* ===== LINKS ===== */
a {
  /* Inherit color from parent */
  color: inherit;
  /* Remove default underline */
  text-decoration: none;
  /* Remove tap highlight on mobile */
  -webkit-tap-highlight-color: transparent;
}

/* ===== BUTTONS ===== */
button {
  /* Remove default button styling */
  background: none;
  border: none;
  padding: 0;
  /* Inherit font properties */
  font: inherit;
  color: inherit;
  /* Show pointer cursor */
  cursor: pointer;
  /* Remove tap highlight */
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
}

/* ===== FORM ELEMENTS ===== */
input,
textarea,
select {
  /* Inherit font properties */
  font: inherit;
  color: inherit;
  /* Remove default appearance */
  border: none;
  background: none;
  /* Remove tap highlight */
  -webkit-tap-highlight-color: transparent;
}

/* Remove default input focus outline (we'll add custom ones) */
input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: none;
}

/* ===== IMAGES ===== */
img,
picture,
video,
canvas,
svg {
  /* Make images responsive by default */
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===== TABLES ===== */
table {
  /* Remove spacing between table cells */
  border-collapse: collapse;
  border-spacing: 0;
}

/* ===== CODE ===== */
code,
pre {
  /* Use monospace font */
  font-family: monospace;
}

/* ===== MISC ===== */
/* Remove default HR styling */
hr {
  border: none;
  height: 1px;
  background: currentColor;
  opacity: 0.2;
}

/* Hide elements with hidden attribute */
[hidden] {
  display: none !important;
}

/* Ensure consistent rendering */
svg {
  fill: currentColor;
}

/* Remove blue highlight on tap in mobile Safari */
* {
  -webkit-tap-highlight-color: transparent;
}
