/*
  Shared accessibility styles (WCAG 2.1 AA), linked on every page after the
  page's own <style> so equal-specificity rules here win.
  The behaviour that goes with these lives in a11y.js.
*/

/* "Skip to main content": off screen until a keyboard user tabs to it. */
.a11y-skip {
  position: fixed; left: 12px; top: -80px; z-index: 10000;
  background: #101112; color: #fff; padding: .75rem 1.15rem; border-radius: 10px;
  font: 600 15px/1.2 'Instrument Sans', system-ui, sans-serif; text-decoration: none;
  transition: top .15s;
}
.a11y-skip:focus { top: 12px; outline: 3px solid #C9973A; outline-offset: 2px; }
main:focus { outline: none; }

/* Visible keyboard focus everywhere (mouse clicks do not show it). */
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible,
[tabindex]:not(main):focus-visible {
  outline: 3px solid #8A6420; outline-offset: 2px;
}

/* Text only screen readers hear. */
.a11y-sr {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Pause / play buttons that a11y.js adds to autoplaying videos and sliders. */
.a11y-pause {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 34px; height: 34px; padding: 0; border-radius: 50%; cursor: pointer;
}
.a11y-pause svg { width: 14px; height: 14px; }
.a11y-pause-vid {
  position: absolute; z-index: 40;
  border: none; background: rgba(16,17,18,.62); color: #fff;
}
.a11y-pause-vid:hover { background: rgba(16,17,18,.85); }
.a11y-pause-slider { border: 1.5px solid currentColor; background: transparent; color: inherit; }
[data-autoplay] > .a11y-pause-slider { display: flex; margin: 1rem auto 0; }
[data-pause-slot] > .a11y-pause.a11y-pause-slider {
  margin-left: .35rem; width: 30px; height: 30px; padding: 0; box-sizing: border-box;
  border: 1.5px solid currentColor; border-radius: 50%; background: transparent;
}

/* Scrolling photo gallery, stopped by its pause button. */
[data-paused] .gal-row { animation-play-state: paused; }

/* Small decorative loops settle within 5 seconds instead of running forever. */
.scroll-cue, .cc-scrollcue { animation-iteration-count: 3; }
.tab.active { animation-iteration-count: 2; }

/* Footer links on phones: at least 24px tall so they are easy to tap. */
@media (max-width: 900px) {
  footer .foot-inner li a { display: inline-block; padding: .3rem 0; }
  footer .foot-inner li { margin-bottom: .1rem; }
}

/* Visitors who ask their device for less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
