/* Accessibility Enhancements */

/* ========== SKIP LINK ========== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 9999;
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    padding: var(--space-sm) var(--space-md);
    background: var(--navy);
    color: var(--white);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    z-index: 9999;
}

/* ========== FOCUS STATES ========== */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Button focus */
.btn:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* Form focus */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-20);
}

/* Nav link focus */
.nav-links a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 4px;
}

/* ========== REDUCED MOTION ========== */
@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;
    }

    .hero::before {
        animation: none;
    }

    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ========== HIGH CONTRAST MODE ========== */
@media (prefers-contrast: high) {
    :root {
        --navy: #000000;
        --gold: #B8860B;
        --gray: #333333;
        --border-color: #000000;
    }

    .btn-primary {
        border: 2px solid var(--white);
    }

    .service-card,
    .why-card,
    .experience-card {
        border-width: 2px;
    }
}

/* ========== SCREEN READER ONLY ========== */
.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;
}

/* Show on focus for skip links */
.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* ========== FOCUS TRAP FOR MODALS ========== */
.modal-open {
    overflow: hidden;
}

/* ========== TOUCH TARGET SIZES ========== */
/* Ensure all interactive elements are at least 44x44px */
.btn,
.nav-toggle,
.lang-toggle button,
.nav-links a {
    min-height: 44px;
    min-width: 44px;
}

/* ========== TEXT SPACING ========== */
/* Support for users who adjust text spacing */
@supports (text-spacing: normal) {
    body {
        text-spacing: normal;
    }
}

/* Ensure content is readable with increased spacing */
p, li {
    max-width: 75ch;
}

/* ========== COLOR BLIND SUPPORT ========== */
/* Don't rely solely on color to convey meaning */
.field-error {
    border-color: var(--error);
    border-width: 2px;
    border-style: solid;
}

.field-error::before {
    content: '!';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--error);
    font-weight: bold;
}

/* ========== FORCED COLORS MODE (Windows High Contrast) ========== */
@media (forced-colors: active) {
    .btn {
        border: 2px solid currentColor;
    }

    .service-card::before {
        background: currentColor;
    }

    .step-number {
        border: 2px solid currentColor;
    }
}

/* ========== KEYBOARD NAVIGATION INDICATOR ========== */
/* Only show focus ring for keyboard users */
:focus:not(:focus-visible) {
    outline: none;
}
