/* *********************************************************************
 * blocks.css
 * Base del sitio: reinicio, variables, tipografía y rejilla contenedora.
 * Se carga la primera; el resto de hojas depende de estos valores.
 * ******************************************************************* */

/* *********************************************************************
 * 1. Tipografías propias (woff2 servido desde este mismo dominio)
 * ******************************************************************* */

@font-face {
	font-family: "Exo 2 Local";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/exo2-lat.woff2") format("woff2");
}

@font-face {
	font-family: "Exo 2 Local";
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url("../fonts/exo2-lat.woff2") format("woff2");
}

@font-face {
	font-family: "Titillium Local";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/titw-400-lat.woff2") format("woff2");
}

@font-face {
	font-family: "Titillium Local";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/titw-600-lat.woff2") format("woff2");
}

/* *********************************************************************
 * 2. Variables de color y medidas
 * El naranja claro (--sig) sólo se usa como mancha o subrayado detrás de
 * texto oscuro. Para texto naranja y para botones va el tono --sig2, que
 * sí llega al contraste exigido sobre fondo claro.
 * ******************************************************************* */

:root {
	--bg: #FAFBFD;
	--fg: #16181C;
	--sig: #E4572E;
	--sig2: #C13A14;
	--rule: #D8DDE4;
	--mu: #5A6169;
	--sf: #FFFFFF;
	--dim: #A8AFB8;
	--box: 1180px;
	--gut: 40px;
}

/* *********************************************************************
 * 3. Reinicio conservador
 * ******************************************************************* */

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background-color: var(--bg);
	color: var(--fg);
	font-family: "Titillium Local", "Segoe UI", Tahoma, sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 1.62;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote {
	margin-top: 0;
	margin-bottom: 0;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

svg {
	display: block;
}

button {
	font: inherit;
	color: inherit;
}

a {
	color: var(--fg);
	text-decoration-color: var(--sig);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--sig2);
}

hr {
	height: 1px;
	margin: 0;
	border: 0;
	background-color: var(--rule);
}

table {
	width: 100%;
	border-collapse: collapse;
}

/* *********************************************************************
 * 4. Escala tipográfica
 * Los titulares llevan punto final: es la manera de escribir de la casa.
 * ******************************************************************* */

h1, h2, h3, h4 {
	font-family: "Exo 2 Local", "Segoe UI", Tahoma, sans-serif;
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.022em;
}

h1 {
	font-size: clamp(38px, 5.6vw, 76px);
}

h2 {
	font-size: clamp(28px, 3.4vw, 46px);
}

h3 {
	font-size: clamp(20px, 1.8vw, 25px);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.012em;
}

h4 {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.28;
	letter-spacing: 0;
}

p + p {
	margin-top: 15px;
}

.lead {
	max-width: 42em;
	font-size: 20px;
	line-height: 1.55;
	color: var(--mu);
}

.tiny {
	font-size: 14px;
	line-height: 1.5;
	color: var(--mu);
}

/* *********************************************************************
 * 5. Contenedor y ritmo vertical
 * El contenedor nunca recibe width en otra regla: el ancho lo fija
 * solamente esta clase.
 * ******************************************************************* */

.wrap {
	max-width: var(--box);
	margin-right: auto;
	margin-left: auto;
	padding-right: var(--gut);
	padding-left: var(--gut);
}

.wrap-slim {
	max-width: 780px;
	margin-right: auto;
	margin-left: auto;
	padding-right: var(--gut);
	padding-left: var(--gut);
}

main {
	display: block;
	overflow-x: clip;
}

section {
	padding-top: 84px;
	padding-bottom: 84px;
}

section.tight {
	padding-top: 56px;
	padding-bottom: 56px;
}

section.roomy {
	padding-top: 118px;
	padding-bottom: 108px;
}

section.dark {
	background-color: var(--fg);
	color: var(--bg);
}

section.dark a {
	color: var(--bg);
}

section.ruled {
	border-top: 1px solid var(--rule);
}

/* *********************************************************************
 * 6. Rótulo de sección y subrayado de rotulador
 * El subrayado es la marca gráfica de la casa: una franja naranja que
 * pasa por debajo de la palabra, como quien repasa el periódico.
 * ******************************************************************* */

.rotulo {
	display: block;
	margin-bottom: 18px;
	font-family: "Exo 2 Local", "Segoe UI", Tahoma, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--sig2);
}

section.dark .rotulo {
	color: var(--sig);
}

.raya {
	position: relative;
	z-index: 0;
	padding-right: 3px;
	padding-left: 3px;
	white-space: nowrap;
}

.raya::before {
	position: absolute;
	right: 0;
	bottom: 0.04em;
	left: 0;
	z-index: -1;
	height: 0.34em;
	content: "";
	background-image: linear-gradient(90deg, #E4572E 0%, #C13A14 100%);
}

.raya-fina::before {
	height: 0.16em;
	bottom: 0.02em;
}

/* *********************************************************************
 * 7. Utilidades
 * ******************************************************************* */

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.hoja {
	max-width: 68ch;
}

.hoja h2 {
	margin-top: 46px;
	margin-bottom: 14px;
}

.hoja h2:first-child {
	margin-top: 0;
}

.hoja h3 {
	margin-top: 32px;
	margin-bottom: 10px;
}

.hoja p {
	margin-bottom: 14px;
}

.hoja ul {
	margin-bottom: 18px;
	padding-left: 20px;
}

.hoja li {
	margin-bottom: 7px;
}

.dormido {
	opacity: 0;
	transform: translateY(20px);
}

.woke {
	opacity: 1;
	transform: none;
	transition: opacity 620ms ease, transform 620ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* *********************************************************************
 * 8. Foco visible y movimiento reducido
 * ******************************************************************* */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
	outline: 3px solid var(--sig2);
	outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.woke {
		transition: none;
	}

	.dormido {
		opacity: 1;
		transform: none;
	}
}

/* *********************************************************************
 * 9. Adaptación a pantallas menores (hoja escrita de mayor a menor)
 * ******************************************************************* */

@media (max-width: 1080px) {
	:root {
		--gut: 32px;
	}

	section {
		padding-top: 70px;
		padding-bottom: 70px;
	}

	section.roomy {
		padding-top: 88px;
		padding-bottom: 82px;
	}
}

@media (max-width: 720px) {
	:root {
		--gut: 22px;
	}

	body {
		font-size: 16px;
	}

	.lead {
		font-size: 18px;
	}

	section {
		padding-top: 54px;
		padding-bottom: 54px;
	}

	section.roomy {
		padding-top: 62px;
		padding-bottom: 58px;
	}

	section.tight {
		padding-top: 42px;
		padding-bottom: 42px;
	}
}
