/*
 * base.css — cimientos comunes a todo el tema.
 *
 * Aquí solo hay estructura: normalización, accesibilidad y comportamiento de
 * las imágenes. La identidad visual (color, tipografía y ritmo) vive entera en
 * elegante.css, moderno.css y rustico.css, que se encolan por separado.
 *
 * Todo está escrito primero para 390 px de ancho; los ensanches van después.
 */

/* --------------------------------------------------- Normalización mínima */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	overflow-x: hidden;
}

:where(h1, h2, h3, h4, p, figure, blockquote, dl, dd) {
	margin: 0;
}

/* :where() mantiene la especificidad a cero: si una hoja de identidad quiere
   dar margen a una lista, no tiene que pelearse con este reset. */
:where(ul[class], ol[class]) {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* --------------------------------------------------------------- Imágenes */

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

img {
	height: auto;
}

/* Las rejillas recortan a una proporción fija: sin esto, una foto vertical y
   otra apaisada rompen la retícula. */
.bsr-img--cubrir {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --------------------------------------------------- Formularios: herencia */

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
	margin: 0;
}

textarea {
	resize: vertical;
}

/* ---------------------------------------------------------- Accesibilidad */

/* Objetivos táctiles: 44 px de alto mínimo en todo lo que se pulsa. */
a[class*="bsr-boton"],
button,
input[type="submit"],
.bsr-pie__redes a,
.bsr-pie__legal a,
.bsr-nav a {
	min-height: 44px;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
	border-radius: 2px;
}

/* Texto solo para lectores de pantalla. */
.bsr-oculto {
	position: absolute !important;
	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;
}

/* Enlace de salto: invisible hasta que recibe el foco con el tabulador. */
.bsr-saltar {
	position: absolute;
	top: -100px;
	left: 8px;
	z-index: 999;
	display: flex;
	align-items: center;
	min-height: 44px;
	padding: 0 16px;
	background: #101010;
	color: #fff;
	text-decoration: none;
	transition: top 0.15s ease-in;
}

.bsr-saltar:focus {
	top: 8px;
}

/* Campo trampa del antispam: fuera de la vista, pero no con display:none,
   que algunos robots detectan. */
.bsr-trampa {
	position: absolute !important;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

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