/* Accessibility Enhancements */

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -60px;
    left: 0;
    background: #0052cc;
    color: #ffffff;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 6px 0;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #ffd700;
    outline-offset: 0;
}

/* Focus visible for keyboard navigation (WCAG 2.4.7 / 2.4.11).
   3px outline + offset clears the 2px / 3:1 minimum. Component CSS with
   higher specificity keeps its own focus styling; this is the baseline for
   links, inputs, selects and nav on the light pages. */
*:focus-visible {
    outline: 3px solid #0052cc;
    outline-offset: 2px;
}

/* Dark gallery/lightbox surfaces: blue outline would be too low-contrast,
   so switch the baseline ring to white against #0b0c10. */
.gal-main *:focus-visible,
.gal-header *:focus-visible,
.lightbox *:focus-visible {
    outline-color: #ffffff;
}

/* Placeholder contrast: default UA placeholder grey often fails AA.
   #5b6472 hits 4.9:1 on white. Gallery page has no text inputs. */
input::placeholder,
textarea::placeholder {
    color: #5b6472;
    opacity: 1;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    *:focus-visible {
        outline-width: 4px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Screen reader only text */
.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;
}
