/* a11y.css, the accessibility layer shared by every INetClash page.
   Targets WCAG 2.1 AA, which is what Israeli Standard 5568 requires.

   Loaded as a separate file on purpose: the pages are standalone HTML with inline
   <style> blocks, and duplicating this into six of them guarantees they drift. One file
   means the focus ring and the skip link cannot be right on the landing page and wrong
   on the legal pages, which is exactly the state this replaces. */

/* ---------- skip link (WCAG 2.4.1 Bypass Blocks) ----------
   Off-screen until focused rather than display:none, a hidden element is not focusable,
   so display:none would remove the very keyboard affordance this exists to provide.
   Positioned with inset-inline-start so it lands on the correct edge in RTL. */
.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -100px;
  z-index: 9999;
  padding: 12px 20px;
  background: #0E3B23;
  color: #FFF8EE;
  font-weight: 800;
  font-size: 16px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top 140ms ease-out;
}
.skip-link:focus {
  top: 0;
}

/* ---------- focus visibility (WCAG 2.4.7 Focus Visible, 1.4.11 Non-text Contrast) ----------
   Two-tone ring: an amber outline plus a dark halo. The site runs cream legal pages and a
   near-black court-green landing page, and a single-colour ring is guaranteed to disappear
   against one of them. :focus-visible so a mouse click does not paint a ring, but keyboard
   and assistive-tech focus always does. */
:focus-visible {
  outline: 3px solid #FFC53D;
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(14, 59, 35, .55);
  border-radius: 4px;
}
/* Never let a stylesheet elsewhere silently remove focus. */
:focus:not(:focus-visible) { outline: none; }

/* ---------- reduced motion (WCAG 2.3.3 Animation from Interactions) ----------
   The landing page animates a bouncing ball, a pulsing CTA, a scroll cue and a blinking
   ticker. All of it is decoration. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- screen-reader-only text ----------
   For labels that must exist for assistive tech but would be visual noise. Uses the clip
   technique rather than width:0, which some screen readers skip. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
/* Visible again when focused, for skip-style links that use it. */
.sr-only-focusable:focus,
.sr-only-focusable:focus-visible {
  position: static !important;
  width: auto; height: auto;
  margin: 0; overflow: visible;
  clip: auto; clip-path: none;
  white-space: normal;
}

/* ---------- target size (WCAG 2.5.8 Target Size, AA in 2.2) ----------
   Applied to the small footer/legal links, which were the only controls under 24px. */
.a11y-tap { display: inline-block; min-height: 24px; padding: 4px 2px; }

/* ---------- forced-colors / Windows High Contrast ----------
   Keeps the focus ring when the OS replaces the palette. */
@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight; outline-offset: 2px; }
  .skip-link { border: 2px solid ButtonText; }
}
