/* =====================================================
   ACCESSIBILITY (A11Y)
   WCAG 2.1 AA konformes Basis-Set.
   Niemals entfernen oder auskommentieren.
===================================================== */


/* =====================================================
   SKIP LINK
   WCAG 2.4.1 – Bypass Blocks
===================================================== */

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: var(--text-dark);
    font-weight: var(--fw-bold);
    padding: 0.75rem 1.25rem;
    z-index: calc(var(--z-overlay) + 1);
    border-radius: 0 0 var(--radius-s) 0;
    text-decoration: none;
    transition: top 0.2s ease;
}

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


/* =====================================================
   FOCUS VISIBLE
   WCAG 2.4.7 – Focus Visible
   Niemals outline: none ohne Ersatz!
===================================================== */

:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Im Header/Overlay: Primärfarbe passt immer */
.site-header :focus-visible,
.menu-overlay :focus-visible {
    outline-color: var(--color-primary);
}

/* Links bekommen zusätzlich Unterstrich beim Fokus */
body a:focus-visible {
    text-decoration: underline;
}


/* =====================================================
   TOUCH TARGETS
   WCAG 2.5.5 – Target Size (min. 44×44px)
===================================================== */

body button,
body a {
    min-height: 44px;
    min-width: 44px;
}

/* Admin-Bar ausgenommen – sonst Layout-Bruch */
body #wpadminbar button,
body #wpadminbar a {
    min-height: fit-content !important;
    min-width: fit-content !important;
}


/* =====================================================
   TEXT CONTRAST – .text-muted absichern
===================================================== */

.text-muted {
    color: color-mix(in srgb, var(--text-main) 65%, transparent);
}

@supports not (color: color-mix(in srgb, black, white)) {
    .text-muted {
        color: #b3b3b3;
    }
}


/* =====================================================
   REDUCED MOTION
   WCAG 2.3.3 – Animation from Interactions
===================================================== */

@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;
    }
}
