/* Modern CSS Reset */
/* Based on Josh Comeau's CSS Reset with accessibility improvements */

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

* {
  margin: 0;
}

html {
  /* Improve text rendering */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  
  /* Enable smooth scrolling */
  scroll-behavior: smooth;
}

body {
  line-height: var(--line-height-normal);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

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

input, button, textarea, select {
  font: inherit;
}

/* Remove default button styles */
button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

/* Remove default link styles */
a {
  color: inherit;
  text-decoration: none;
}

/* Remove list styles */
ul, ol {
  list-style: none;
  padding: 0;
}

/* Remove default fieldset styles */
fieldset {
  border: none;
  padding: 0;
}

/* Remove default legend styles */
legend {
  padding: 0;
}

/* Improve table rendering */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Remove default form control outlines */
input, button, select, textarea {
  outline: none;
}

/* Add focus styles for accessibility */
input:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* Improve readability for screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Respect user's motion preferences */
@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;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  * {
    text-shadow: none !important;
    box-shadow: none !important;
  }
}