/*
 * Accessibility utilities.
 *
 * Deliberately standalone rather than Tailwind utility classes: the built
 * css/tailwind.css in this repo ships `.sr-only` but not `not-sr-only`, so the
 * usual `sr-only focus:not-sr-only` skip-link pattern silently does nothing
 * here. These rules depend on no framework.
 */

/* --------------------------------------------------------------------------
 * Skip link (WCAG 2.2 SC 2.4.1 Bypass Blocks)
 *
 * Off-screen until focused, so it is invisible to mouse users but is the first
 * thing a keyboard user reaches. It must NOT use display:none or
 * visibility:hidden, which would remove it from the focus order entirely.
 * ------------------------------------------------------------------------ */
.fm-skip-link {
    position: absolute;
    top: 0;
    left: 0;
    /* Sits above the cookie-consent banner (z-index 2147483000), which would
       otherwise paint over the focused link at the top of the viewport. */
    z-index: 2147483001;
    display: inline-block;
    padding: 0.75rem 1.25rem;
    background: #0e0129;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border: 2px solid #ffffff;
    border-bottom-right-radius: 6px;
    /* Hidden off-screen; still focusable, still in the accessibility tree. */
    transform: translateY(-120%);
    transition: transform 0.15s ease-in-out;
}

.fm-skip-link:focus,
.fm-skip-link:focus-visible {
    transform: translateY(0);
    outline: 3px solid #ff5e68;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .fm-skip-link {
        transition: none;
    }
}
