/* Accessibility Enhancements */

/* Skip to content - screen reader only, visible on focus */
#skip-to-content {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--accent-primary);
  color: var(--bg);
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 10000;
  border-radius: 4px;
  font-weight: bold;
}

#skip-to-content:focus {
  position: fixed;
  left: 0.5rem;
  top: 0.5rem;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Ensure focus is visible */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Theme toggle button accessibility */
.theme-toggle:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Ensure sufficient color contrast in links */
a {
  text-decoration-skip-ink: auto;
}

/* Screen reader only text */
.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;
}

/* Reduced 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;
  }
}
