/* Movimiento compartido por las páginas Astro y la página de software. */
:root {
  --curva-control: cubic-bezier(.22, .68, .22, 1);
  --curva-presion: cubic-bezier(.3, 0, .45, 1);
}

@media (prefers-reduced-motion: no-preference) {
  html body :is(a[href], button, summary, [role="button"], [role="slider"], .cot-opcion, .cot-check) {
    transition-property: transform, opacity, color, background-color, border-color, box-shadow, text-decoration-color;
    transition-duration: 180ms;
    transition-timing-function: var(--curva-control);
  }

  /* Mantener quieto el texto de enlaces largos, filas y tarjetas. */
  @media (hover: hover) and (pointer: fine) {
    html body :is(button, .boton, .btn):not(:disabled, [aria-disabled="true"], .saltar):hover {
      transform: translateY(-1px);
      box-shadow: 0 2px 6px rgb(0 0 0 / .12);
    }
    html body :is(a[href]:not(.boton, .btn), summary):hover { opacity: .86; }
    html body :is(.cot-opcion, .cot-check, [role="slider"]):not(:has(input:checked)):hover {
      background-color: color-mix(in srgb, currentColor 6%, transparent);
    }
  }

  html body :is(button, .boton, .btn, [role="button"]):not(:disabled, [aria-disabled="true"], .saltar):active {
    transform: scale(.985);
    box-shadow: none;
    transition-duration: 90ms;
    transition-timing-function: var(--curva-presion);
  }
  html body :is(a[href]:not(.boton, .btn), summary, .cot-check, .cot-opcion):active {
    opacity: .78;
    transition-duration: 90ms;
  }
  html body :is(button, a[href], summary, [role="button"], [role="slider"]):focus-visible {
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  html body :is(button, a[href], summary, [role="button"], [role="slider"], .cot-check, .cot-opcion) {
    transition: none;
  }
  html body :is(button, .boton, .btn):is(:hover, :active),
  html body :is(.ver-todas, .carrusel__ver, .obra, .otros a):hover :is(svg, img) {
    transform: none;
  }
}
