/**
 * File: assets/css/foundation/accessibility.css
 * Purpose: Provides shared keyboard, focus, screen-reader, and reduced-motion safeguards.
 * Scope: Theme-wide accessibility primitives only; component-specific accessibility stays with the owning component.
 * Related PHP: header.php, src/Core/Assets.php
 * Related JS: None
 * Package: HyperDAF Pro
 */

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus,
.hdf-skip-link:focus {
    position: fixed;
    z-index: var(--hdf-z-index-toast);
    top: var(--hdf-spacing-4);
    left: var(--hdf-spacing-4);
    width: auto;
    height: auto;
    padding: var(--hdf-spacing-3) var(--hdf-spacing-4);
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border-radius: var(--hdf-radius-md);
    background: var(--hdf-color-surface);
    color: var(--hdf-color-text-primary);
    box-shadow: var(--hdf-shadow-md);
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: var(--hdf-component-focus-width, var(--hdf-border-width-strong)) solid var(--hdf-color-focus);
    outline-offset: var(--hdf-spacing-1);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: var(--hdf-motion-reduced-duration, 0.01ms) !important;
        animation-iteration-count: 1 !important;
        transition-duration: var(--hdf-motion-reduced-duration, 0.01ms) !important;
    }
}
