/* ==========================================================================
   PitoReel Accessibility Layer (a11y.css)
   WCAG 2.1 AA Compliance — Shared styles included by all pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base Font Size
   Sets html to 100% to respect user font-size preferences (Req 11.1)
   -------------------------------------------------------------------------- */
html {
  font-size: 100%;
}

/* --------------------------------------------------------------------------
   Skip Navigation Link (Req 2.1, 2.2, 2.3, 2.4)
   Hidden off-screen by default, revealed on focus
   -------------------------------------------------------------------------- */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--gold, #d4a843);
  color: #000;
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-nav:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Focus Indicator Styles (Req 4.2, 4.3)
   Gold outline with 3:1+ contrast on dark backgrounds
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--gold, #d4a843);
  outline-offset: 2px;
}

/* Remove default outline only when :focus-visible is supported */
:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------------------
   Screen Reader Only Utility (Req 10.1, 10.2, 10.3, 10.4)
   Visually hidden but accessible to assistive technology
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Color Contrast Overrides (Req 6.1, 6.2, 6.3, 6.4)
   Override low-contrast text colors with WCAG AA compliant values
   -------------------------------------------------------------------------- */
:root {
  --text-muted: rgba(255, 255, 255, 0.58);
  --text-secondary: rgba(255, 255, 255, 0.65);
}

/* --------------------------------------------------------------------------
   Reduced Motion Media Query (Req 12.1, 12.2, 12.3, 12.4, 12.5)
   Disables animations and transitions when user prefers reduced motion
   -------------------------------------------------------------------------- */
@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;
  }
}
