/*
 * Gastrototem · Base
 *
 * Reset suave + tipografía base + utilidades mínimas.
 *
 * Cero hex literales. Cero font-family. Solo variables --gtt-*.
 */

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

/* El header es fijo: cualquier salto a un ancla debe dejarlo libre. Vive
 * aquí (y no en una hoja de página) porque afecta a todo el sitio; la
 * altura la da --gtt-header-h de tokens.css. */
html {
	scroll-padding-top: calc(var(--gtt-header-h) + var(--gtt-space-4));
}

/* Reset del margen del <body>. El theme no puede darlo por hecho: el reset de
 * core llega en 'global-styles', que inc/performance.php saca de la ruta
 * crítica en las páginas sin bloques (home e interiores). Sin esta línea el
 * margen de 8px del navegador dibujaba un marco de papel alrededor del hero
 * a sangre y de la banda tinta. */
body {
	margin: 0;
	font-family: var(--gtt-font-sans);
	font-size: var(--gtt-text-base);
	line-height: var(--gtt-leading-normal);
	color: var(--gtt-color-text);
	background-color: var(--gtt-color-bg);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--gtt-font-sans);
	font-weight: 500;
	line-height: var(--gtt-leading-tight);
}

/* ============================================================
 * UTILIDADES MÍNIMAS
 * ============================================================ */

.gtt-u-mono {
	font-family: var(--gtt-font-mono);
}

/* Mono + uppercase: añade tracking automáticamente. */
.gtt-u-mono.is-uppercase {
	text-transform: uppercase;
	letter-spacing: var(--gtt-tracking-wide);
}

.gtt-u-serif-italic {
	font-family: var(--gtt-font-serif);
	font-style: italic;
}

/* Solo para lectores de pantalla. Clase de WordPress, no del tema: la emiten
 * the_posts_pagination() («Navegación de entradas») y get_search_form(); sin
 * esta regla esos textos se pintaban a la vista. Recupera el foco si el
 * elemento es enfocable (patrón «saltar al contenido»). */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip-path: none;
	white-space: normal;
}

/* ============================================================
 * FOCO VISIBLE (WCAG 2.4.7)
 * currentColor: tinta sobre papel, papel sobre tinta/grafito. Sin depender
 * del anillo del navegador (azul de Chrome sobre tinta = 2,2:1).
 * ============================================================ */

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

:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) {
	outline: none;
}
