/*
 * Semilla — Estilos de accesibilidad.
 *
 * Skip link, screen-reader-only, preferencias de movimiento.
 *
 * @package Semilla
 * @since   0.1.0
 */

/* ── Skip link ──────────────────────────────────────────── */

.sem-skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 10000;
  padding: 0.75rem 1.5rem;
  background-color: var(--sem-color-dark);
  color: var(--sem-color-white);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--sem-radius-sm) 0;
}

.sem-skip-link:focus {
  top: 0;
}

/* ── Solo para lectores de pantalla ─────────────────────── */

.sem-sr-only {
  position: absolute;
  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;
}

/* ── Reducción de movimiento ────────────────────────────── */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Ocultar visualmente (mostrar en foco) ──────────────── */

.sem-focusable-hidden {
  position: absolute;
  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;
}

.sem-focusable-hidden:focus-visible {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
}
