/**
 * Theme - Accessibility Stylesheet
 * WCAG 2.1 Level AA Compliance
 *
 * @package jpd-theme
 */

/* Focus indicators - visible for keyboard navigation */
*:focus { outline: 3px solid var(--jpd-secondary, #E8A020); outline-offset: 2px; }
*:focus:not(:focus-visible) { outline: none; }
*:focus-visible { outline: 3px solid var(--jpd-secondary, #E8A020); outline-offset: 2px; }

/* Screen reader only class */
.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;
}

/* Skip link — hidden until focused */
.jpd-skip-link {
    position: absolute;
    left: -9999px;
    z-index: 1000;
    padding: 0.75em 1.5em;
    background: var(--jpd-dark, #032F3C);
    color: var(--jpd-white, #FFFFFF);
}

.jpd-skip-link:focus {
    left: 0;
    top: 0;
}

/* High contrast support */
@media (prefers-contrast: high) {
    :root { --jpd-primary: #000080; --jpd-text: #000000; }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Text-size tiers — class toggled on <html> by the A- / A / A+ control
   (persisted in localStorage as jpdTextSize, applied pre-paint by the
   jpd-text-size-early inline script in functions.php) */
html.jpd-text-small {
    font-size: 80%;
}

html.jpd-text-normal {
    font-size: 100%; /* 16px default */
}

html.jpd-text-large {
    font-size: 150%;
}
