/* Accessibility corrections for the public marketing pages.
   Loaded after landing-v2/style.css and landing-override.css so these rules win.

   Background: landing-v2/style.css contains

       *:focus { outline: none; }
       a:focus { outline: none; }
       button:active, button:focus,
       .btn:active, .btn:focus { box-shadow: none !important; outline: none !important; }

   which removes the focus indicator from every interactive element on the page.
   A keyboard or screen-reader user then has no way to tell what is focused, so
   the site cannot be navigated without a mouse. Rather than edit the vendored
   stylesheet, the indicator is restored here.

   :focus-visible is used so the ring appears for keyboard navigation but not on
   mouse click — which is why the original rule was added in the first place. */

:root {
    --focus-ring: #5eecc8;
    --focus-ring-contrast: #0a0a0f;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--focus-ring) !important;
    outline-offset: 2px !important;
    border-radius: 2px;
}

/* Form fields sit on white, so pair the ring with a dark inner edge to stay
   visible against both the field and the page background. */
.contact .form-control:focus-visible,
.signin .form-control:focus-visible {
    outline: 3px solid var(--focus-ring) !important;
    outline-offset: 1px !important;
    box-shadow: 0 0 0 1px var(--focus-ring-contrast) !important;
}

/* Skip link — visually hidden until focused, then pinned to the top-left so a
   keyboard user can bypass the navigation on every page. */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 1080;
    padding: 0.75rem 1.25rem;
    background: var(--focus-ring);
    color: var(--focus-ring-contrast);
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 6px 0;
}

.skip-link:focus,
.skip-link:focus-visible {
    left: 0;
    outline: 3px solid #fff !important;
    outline-offset: -3px !important;
}

/* The nav sets its own link colour; keep the focus ring legible over it. */
.navbar a:focus-visible,
.offcanvas a:focus-visible {
    outline-color: #fff !important;
}

/* Respect a user's reduced-motion preference for any transition the theme adds. */
@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;
    }
}
