/*
 * Base: fuente, reset (reemplaza reset.css y theme.css de Hello, que el tema
 * desactiva), tipografía por defecto, enlaces, foco visible, movimiento
 * reducido, skip link y selección.
 */

/* --- Fuente (self-hosted, OFL; assets/fonts/OFL.txt) ------------------------ */

@font-face {
	font-family: "Montserrat";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/montserrat-variable.woff2") format("woff2");
}

@font-face {
	font-family: "Montserrat";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/montserrat-variable-italic.woff2") format("woff2");
}

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

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: var(--sy-header-h, 0px);
}

body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
	margin: 0;
}

/* :where() deja la especificidad en cero: con ol[class] (tipo + atributo) el
   reset le ganaba al padding de .sy-process__list y de otras listas. */
:where(ul[class], ol[class]) {
	margin: 0;
	padding: 0;
	list-style: none;
}

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

img,
video {
	display: block;
}

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

button {
	cursor: pointer;
}

[hidden] {
	display: none !important;
}

/* --- Documento ------------------------------------------------------------- */

body {
	font-family: var(--sy-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--sy-text);
	background: var(--sy-white);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* Especificidad cero: la escala tipográfica (.sy-h2, .sy-display) también es
   :where() y, cargada después, gana. Con h2 a secas, su line-height le ganaba
   cuando la clase va en el propio título (widgets propios). */
:where(h1, h2, h3, h4, h5, h6) {
	color: var(--sy-ink);
	font-weight: 700;
	line-height: 1.15;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* --- Foco: anillo de 2px, ultramar sobre claro y lima sobre oscuro --------- */

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

:focus:not(:focus-visible) {
	outline: none;
}

/* --- Skip link -------------------------------------------------------------- */

.sy-skip-link {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1000;
	padding: 12px 20px;
	border-radius: var(--sy-r-pill);
	background: var(--sy-lime);
	color: var(--sy-deep);
	font-weight: 600;
	text-decoration: none;
	transform: translateY(-200%);
}

.sy-skip-link:focus {
	transform: none;
}

.sy-site-main:focus {
	outline: none;
}

/* --- Selección ------------------------------------------------------------- */

::selection {
	background: var(--sy-lime);
	color: var(--sy-deep);
}

/* --- Movimiento ------------------------------------------------------------ */

@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;
	}
}

/* --- Utilidades ------------------------------------------------------------- */

.screen-reader-text,
.sy-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
