/* ============================================================================
   Torsova — accessibility helpers. Linked AFTER each page's inline <style> so
   these win ties in the cascade. Uses the page's :root custom properties.
   ============================================================================ */

/* Skip link (WCAG 2.4.1 Bypass Blocks) — visible only when focused. */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--accent); color: #fff;
  padding: 12px 20px; border-radius: 0 0 6px 0;
  font-family: 'Instrument Sans', sans-serif; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* Visible keyboard focus indicator (WCAG 2.4.7) — the CSS reset removed the default. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent2);
  outline-offset: 2px;
  border-radius: 2px;
}

/* WCAG 1.4.3: white text on the brighter hover blue (#2A8FE8) was 3.4:1; use a
   darker blue (#1C74C0 = 4.9:1 with white) for button hover backgrounds. */
.nav-cta:hover,
.btn-primary:hover,
.demo-submit:hover { background: #1C74C0 !important; }

/* WCAG 1.4.1 (Use of Color) — links inside a block of text.
   Links in the legal pages' prose and under the demo form were distinguished from the words
   around them by COLOUR ALONE. Anyone who cannot separate those hues — colour blindness, low
   vision, a dim or glary screen — simply could not tell a link was there, so they never
   followed it. Underlined at rest, not only on hover.
   Deliberately scoped to prose links: navigation, footer and buttons are identifiable from
   their position and styling, are not inside a text block, and stay undecorated. */
.legal a,
.form-consent a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Respect the OS "reduce motion" setting (WCAG 2.3.3 / motion sensitivity). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
