/* ==========================================================================
   ORIGEN · base
   Variables, reset y tipografía. Todo lo demás depende de este archivo.

   Las variables --mater-* son alias de los tokens que WordPress genera a
   partir de theme.json. Al cambiar un color allí, cambia en todo el sitio
   sin tocar CSS. No pongas colores literales fuera de este bloque.
   ========================================================================== */

:root {
	--mater-tinta:  var(--wp--preset--color--tinta, #111111);
	--mater-dorado: var(--wp--preset--color--dorado, #C0A062);
	--mater-papel:  var(--wp--preset--color--papel, #FFFFFF);
	--mater-hueso:  var(--wp--preset--color--hueso, #F7F6F3);
	--mater-arena:  var(--wp--preset--color--arena, #EFE7D6);
	--mater-bosque: var(--wp--preset--color--bosque, #6E7C6B);
	--mater-linea:  var(--wp--preset--color--linea, #E2E0DC);
	--mater-texto:  var(--wp--preset--color--texto, #4A4A4A);
	--mater-tenue:  #8A8A8A;

	--mater-fuente-display: var(--wp--preset--font-family--display);
	--mater-fuente-texto:   var(--wp--preset--font-family--texto);

	--mater-esp-10: var(--wp--preset--spacing--10, 0.5rem);
	--mater-esp-20: var(--wp--preset--spacing--20, 1rem);
	--mater-esp-30: var(--wp--preset--spacing--30, 1.75rem);
	--mater-esp-40: var(--wp--preset--spacing--40, 3rem);
	--mater-esp-50: var(--wp--preset--spacing--50, 5rem);
	--mater-esp-60: var(--wp--preset--spacing--60, 8rem);

	--mater-ancho-contenido: 760px;
	--mater-ancho-total: 1240px;
	--mater-borde: 1px solid var(--mater-linea);

	/* El sitio no tiene esquinas redondeadas: la marca es angular. */
	--mater-radio: 0;

	--mater-transicion: 180ms cubic-bezier(0.2, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

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

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

body {
	margin: 0;
	background-color: var(--mater-papel);
	color: var(--mater-tinta);
	font-family: var(--mater-fuente-texto);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--mater-esp-20);
	font-family: var(--mater-fuente-display);
	font-weight: 700;
	line-height: 1.1;
	text-wrap: balance;
}

p, ul, ol, figure, blockquote, table {
	margin: 0 0 var(--mater-esp-20);
}

ul, ol {
	padding-left: 1.25rem;
}

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

figure {
	margin-inline: 0;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color var(--mater-transicion);
}

a:hover,
a:focus-visible {
	color: var(--mater-dorado);
}

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

table {
	width: 100%;
	border-collapse: collapse;
}

th, td {
	padding: 0.65rem 0.75rem;
	border-bottom: var(--mater-borde);
	text-align: left;
	vertical-align: top;
}

hr {
	border: 0;
	border-top: var(--mater-borde);
	margin: var(--mater-esp-40) 0;
}

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

:focus-visible {
	outline: 2px solid var(--mater-dorado);
	outline-offset: 3px;
}

.sr-only,
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.saltar-al-contenido {
	position: absolute;
	top: -100%;
	left: var(--mater-esp-20);
	z-index: 999;
	padding: 0.75rem 1.25rem;
	background: var(--mater-tinta);
	color: var(--mater-papel);
	text-decoration: none;
}

.saltar-al-contenido:focus {
	top: var(--mater-esp-20);
	color: var(--mater-papel);
}

/* Respeta a quien pidió menos movimiento en su sistema. */
@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;
	}
}
