/* runtime-accessibility.css — runtime accessibility layer (JS audit fix)
   Loaded last (after unified-polish.css) so these guards win the cascade.

   1. Complete reduced motion.
      - Manual "Motion off" toggle: app.js applies .motion-off to <html> and
        <body>. All CSS animations/transitions stop; elements keep their
        static visual (base opacity/scale), nothing disappears.
      - OS prefers-reduced-motion: reduce is ALWAYS honored — even when the
        user re-enables GSAP motion with the manual toggle, these media-query
        rules cannot be defeated by class changes, so OS-reduce stays safe.
   2. Scroll-spy indicator: shape-based (underline), not color-only, so the
      active nav item is perceivable in both themes and without color vision.
   3. Clipboard status (#copy-email-status) spacing so the polite live region
      sits with the email box without shifting layout when it fills.
*/

/* ---- 1a. Manual motion-off ---------------------------------------- */
html.motion-off,
body.motion-off {
  scroll-behavior: auto;
}
html.motion-off *,
html.motion-off *::before,
html.motion-off *::after,
body.motion-off *,
body.motion-off *::before,
body.motion-off *::after {
  animation: none !important;
  transition: none !important;
}

/* ---- 1b. OS-level preference (never defeated by manual toggling) -- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---- 2. Scroll-spy active indicator (shape, not color) ------------ */
.site-header nav a[aria-current="location"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 7px;
}

/* ---- 3. Clipboard status spacing ---------------------------------- */
#copy-email-status {
  display: block;
  min-height: 1.2em;
  margin-top: 6px;
  overflow-wrap: anywhere;
}
