/* ============================================================
   BASE — reset y normalización. No hay decisiones estéticas aquí.
   ============================================================ */

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

/* --- BLOQUEO DE DESPLAZAMIENTO HORIZONTAL -------------------
   Nada se mueve de lado. Ni scroll, ni rebote, ni gesto táctil.
   Para permitirlo puntualmente en un carrusel o galería,
   se marca ESE contenedor con .x-scroll (ver más abajo).
   ------------------------------------------------------------ */
html, body {
  max-width: 100%;
  overflow-x: clip;              /* clip > hidden: no crea contexto de scroll */
  overscroll-behavior-x: none;   /* mata el rebote lateral y el swipe-atrás */
  touch-action: pan-y;           /* el dedo sólo puede ir arriba y abajo */
}

/* Escotilla de escape: sólo lo que lleve esta clase podrá desplazarse
   en horizontal. Aún no se usa en ninguna parte. */
.x-scroll {
  overflow-x: auto;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.x-scroll::-webkit-scrollbar { display: none; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur-slow) var(--ease),
              color var(--dur-slow) var(--ease);
}

h1,h2,h3,h4,p,ol,ul,figure,blockquote { margin: 0; }
ol,ul { padding: 0; list-style: none; }

img, video, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }

::selection { background: var(--c-ink); color: var(--c-bg); }

.u-visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* Utilidades tipográficas mínimas */
.t-micro {
  font-family: var(--f-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-micro);
  text-transform: uppercase;
}
.t-measure { max-width: var(--measure); }
