/*
 * Base: tipografía, fondo, anclas y movimiento reducido.
 * Los colores salen de los colores globales de GeneratePress (variables --bruma, --grafito, etc.),
 * que registra inc/setup.php. No se repiten valores hexadecimales aquí.
 */

:root {
	--ec-font-syne: 'Syne', ui-sans-serif, system-ui, sans-serif;
	--ec-font-inter: 'Inter', ui-sans-serif, system-ui, sans-serif;
	--ec-shadow-suave: 0 1px 2px rgba(22, 24, 28, 0.06), 0 6px 18px -8px rgba(22, 24, 28, 0.12);
}

/* Modelo de caja igual que el sitio React (Tailwind): el relleno y el borde entran en el ancho y el alto */
html {
	box-sizing: border-box;
	scroll-behavior: smooth;
}

*,
*::before,
*::after {
	box-sizing: inherit;
}

body {
	background-color: var(--bruma);
	color: var(--grafito);
	font-family: var(--ec-font-inter);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* GeneratePress fija una fuente del sistema en los controles de formulario: que usen Inter */
button,
input,
select,
textarea {
	font-family: var(--ec-font-inter);
}

h1,
h2,
h3,
.ec-syne {
	font-family: var(--ec-font-syne);
	color: var(--grafito);
}

h1 {
	font-weight: 800;
}

h2,
h3 {
	font-weight: 700;
}

img,
svg,
video,
canvas,
iframe {
	max-width: 100%;
}

/* Animaciones accesibles */
@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;
	}
}

/*
 * Páginas a todo el ancho: GeneratePress limita el contenedor a 1280 px y le agrega relleno.
 * En las páginas, cada sección (franja ec-band) maneja su propio fondo, relleno y ancho máximo,
 * como las secciones del sitio React.
 */
body.page #page.grid-container,
body.error404 #page.grid-container,
body.blog #page.grid-container,
body.category #page.grid-container,
body.single-post #page.grid-container {
	max-width: none;
}

body.page .site-content,
body.error404 .site-content,
body.blog .site-content,
body.category .site-content,
body.single-post .site-content {
	padding: 0;
}

/* Páginas cortas (404, Pedir cambios): el pie queda al final de la ventana, como en la versión React */
body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

body #page.site {
	flex: 1 0 auto;
	width: 100%;
}
