/* Accessibility - WCAG 2.1 AA */

/* Skip to content link */
.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;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus visible styling */
:focus-visible {
    outline: 3px solid #6688ff;
    outline-offset: 2px;
}

/* Reduce motion for animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #1a1d35;
        --bs-body-color: #f0f0f0;
    }
    
    .bg-light {
        background-color: #2d2d4d !important;
    }
    
    .text-dark {
        color: #e0e0e0 !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    :root {
        --bs-primary: #2d15a6;
        --bs-secondary: #4d5cff;
    }
    
    body {
        font-weight: 500;
    }
}

/* Improved color contrast */
.btn {
    font-weight: 600;
}

a {
    text-decoration: underline;
}

/* Form accessibility */
label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

input,
textarea,
select {
    border: 2px solid #ccc;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #6688ff;
    box-shadow: 0 0 0 3px rgba(102, 136, 255, 0.25);
}

/* Landmark styling */
header,
nav,
main,
footer {
    display: block;
}

/* Better heading hierarchy */
h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
