/* ==========================================================================
   CSS RESET — Modern CSS reset with sensible defaults
   ========================================================================== */

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

html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Remove default list styles */
ul[role='list'],
ol[role='list'],
ul, ol {
  list-style: none;
}

/* Headings reset */
h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  text-wrap: balance;
}

/* Paragraphs */
p {
  overflow-wrap: break-word;
  text-wrap: pretty;
}

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

a:not([class]) {
  text-decoration-skip-ink: auto;
  color: currentColor;
}

/* Images and media */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

/* Buttons */
button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Textarea */
textarea {
  resize: vertical;
}

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

/* Remove animations for people who prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Hidden utility 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-width: 0;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-3) var(--space-6);
  background: var(--color-primary);
  color: var(--color-text-white);
  font-weight: var(--weight-semibold);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: var(--z-toast);
  transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
  top: 0;
}
