/* Modern CSS reset — base común de TODAS las plantillas de /Disenos.
   Va en @layer reset para que los estilos de cada plantilla ganen sin
   guerras de especificidad. Opinionado pero neutral; sirve a cualquier
   dirección estética del catálogo. */
@layer reset {

  *, *::before, *::after { box-sizing: border-box; }

  /* Quita márgenes por defecto; el sistema de diseño controla el espaciado. */
  * { margin: 0; }

  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
         -moz-tab-size: 4; tab-size: 4; }

  body {
    min-height: 100svh;
    line-height: 1.5;                 /* default sensato; ajusta titulares por diseño */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  /* Los titulares heredan; la capa de diseño fija su escala. Sin saltos feos. */
  h1, h2, h3, h4, h5, h6 { line-height: 1.1; text-wrap: balance; }
  p, li, figcaption { text-wrap: pretty; }

  /* Media se comporta. */
  img, picture, video, canvas, svg {
    display: block; max-width: 100%; height: auto;
  }

  /* Los formularios heredan la tipografía en vez de usar la del navegador. */
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; background: none; border: none; }

  /* Evita desbordes con palabras/URLs largas. */
  p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }

  /* Foco visible y estilizable — nunca `outline: none` sin reemplazo. */
  :focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

  /* Respeta reduced-motion como red de seguridad global. */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }

  /* Offset de scroll para cabeceras sticky + scroll suave cuando se permite. */
  @media (prefers-reduced-motion: no-preference) {
    html:focus-within { scroll-behavior: smooth; }
  }
  :target { scroll-margin-block-start: 2rem; }
}
