/* ========== UNIVERSAL RESET ========== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========== BASE DOCUMENT STYLES ========== */
html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  font-size: 16px;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", 
               Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== HEADING NORMALIZATION ========== */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

/* ========== LINK & INTERACTIVE ELEMENTS ========== */
a {
  background-color: transparent;
  color: inherit;
  text-decoration: none;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
  border: none;
  background: none;
  padding: 0;
}

button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

/* ========== FORM ELEMENT RESET ========== */
input,
button,
textarea,
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* ========== LIST & TABLE RESET ========== */
ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ========== MEDIA ELEMENTS ========== */
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  fill: currentColor;
  vertical-align: middle;
}

/* ========== ACCESSIBILITY ENHANCEMENTS ========== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus:not(:focus-visible) {
  outline: none;
}

/* ========== PRINT STYLES ========== */
@media print {
  *,
  *::before,
  *::after {
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  a {
    text-decoration: underline;
  }
}

/* ========== SPECIAL ELEMENT RESETS ========== */
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal;
}

progress {
  vertical-align: baseline;
}

[hidden] {
  display: none !important;
}

/* ========== FONT AWESOME/ICON RESET ========== */
.icon {
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  stroke: currentColor;
  height: 1em;
  width: 1em;
}

/* ========== MOBILE-SPECIFIC RESETS ========== */
@media (max-width: 480px) {
  html {
    text-size-adjust: none;
  }
  
  input,
  textarea,
  select {
    font-size: 16px; /* Prevent iOS zoom */
  }
}