/* Accessibility — shared by every page. Loaded after each page's inline
   <style>, so these rules win. */

/* ── Keyboard focus ──
   Browser default rings are a 1px hairline that vanishes against the dark
   buttons, so every focusable element gets the accent ring instead. Only
   :focus-visible, so mouse clicks don't show it. */

:focus-visible {
  outline: 2px solid var(--accent, #2B4B8C);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Form fields already have a border; keep the ring on it rather than floating outside. */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline-offset: 0;
}

/* <main> is the skip-link target, not a control — no ring when it receives focus. */
main:focus-visible {
  outline: none;
}

/* ── Skip link ──
   First thing in the tab order on every page; invisible until focused. */

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--ink, #1A1916);
  color: var(--bg, #F7F5F0);
  font-family: var(--sans, system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ── Reduced motion ──
   Every page has fade-up entrances and a pulsing "available" dot; the home
   and work pages also animate a canvas (handled in their own scripts).
   Collapse all CSS animation to its end state and drop the delays, so
   content appears immediately instead of after a stagger. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
