/* ==========================================================================
   Con•sentido — tokens globales
   Fuente de verdad de colores, tipografías y escalas.
   No repitas valores literales en secciones.css: usa siempre var().
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fuentes autoalojadas
   Descarga los woff2 de Google Fonts y déjalos en assets/fonts/.
   Solo estos pesos: son los únicos que usa el diseño.
   -------------------------------------------------------------------------- */

@font-face {
	font-family: 'Spectral';
	src: url('../fonts/spectral-300.woff2') format('woff2');
	font-weight: 300;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Spectral';
	src: url('../fonts/spectral-400.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Spectral';
	src: url('../fonts/spectral-400-italic.woff2') format('woff2');
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: 'Spectral';
	src: url('../fonts/spectral-500.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Spectral';
	src: url('../fonts/spectral-600.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Archivo';
	src: url('../fonts/archivo-400.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Archivo';
	src: url('../fonts/archivo-500.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Archivo';
	src: url('../fonts/archivo-600.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */

:root {

	/* --- Color: oscuros --- */
	--cs-negro:        #14110E;   /* fondo oscuro principal */
	--cs-negro-2:      #1E1A16;   /* fondo oscuro secundario */
	--cs-negro-pie:    #0F0D0B;   /* pie */
	--cs-tinta:        #14110E;   /* texto sobre fondo claro */
	--cs-grafito:      #3A342C;   /* texto secundario sobre claro */

	/* --- Color: claros --- */
	--cs-hueso:        #F3EEE6;   /* fondo claro principal */
	--cs-papel:        #FBFAF7;   /* fondo claro alternativo */
	--cs-arena-claro:  #E8DECF;   /* bloques destacados sobre claro */

	/* --- Color: arena, escala de tres niveles ---
	   IMPORTANTE: --cs-arena es SOLO decorativo (el punto, filetes, fondos).
	   Sobre fondo hueso da 1.74:1 y no es legible.
	   Para texto sobre claro usa --cs-arena-texto (4.82:1 sobre hueso).
	   Para texto sobre oscuro usa --cs-arena (9.37:1 sobre negro).           */
	--cs-arena:        #C4B5A0;
	--cs-arena-texto:  #6B5D47;

	/* --- Color: líneas --- */
	--cs-linea:        #38322B;   /* filete sobre fondo oscuro */
	--cs-linea-claro:  #D9CFBE;   /* filete sobre fondo claro */

	/* --- Color: estado --- */
	--cs-alerta:       #8A2B22;   /* errores de formulario */

	/* --- Tipografía --- */
	--cs-serif: 'Spectral', Georgia, 'Times New Roman', serif;
	--cs-sans:  'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;

	/* --- Escala tipográfica ---
	   Fluida entre móvil y escritorio. Si Divi te obliga a valores fijos en
	   algún módulo, usa el extremo superior.                                  */
	--cs-t-hero:    clamp(38px, 6vw, 76px);
	--cs-t-h2:      clamp(30px, 4vw, 52px);
	--cs-t-h3:      clamp(22px, 2.4vw, 30px);
	--cs-t-cuerpo:  clamp(16px, 1.15vw, 18px);
	--cs-t-pequeno: 14px;
	--cs-t-micro:   12px;

	/* --- Interlineado --- */
	--cs-lh-titular: 1.08;
	--cs-lh-cuerpo:  1.65;

	/* --- Espaciado --- */
	--cs-esp-xs:  8px;
	--cs-esp-s:   16px;
	--cs-esp-m:   32px;
	--cs-esp-l:   64px;
	--cs-esp-xl:  clamp(72px, 9vw, 140px);   /* separación entre secciones */

	/* --- Contenedor --- */
	--cs-ancho-max:     1240px;
	--cs-ancho-texto:   68ch;    /* medida de lectura cómoda */
	--cs-gutter:        clamp(20px, 5vw, 64px);

	/* --- Movimiento --- */
	--cs-trans:       180ms cubic-bezier(.22,.61,.36,1);
	--cs-trans-lenta: 420ms cubic-bezier(.22,.61,.36,1);

	/* --- Foco --- */
	--cs-foco-claro:  var(--cs-tinta);
	--cs-foco-oscuro: var(--cs-arena);
}

/* --------------------------------------------------------------------------
   3. Reset base, acotado a nuestro contenido
   Todo lo nuestro va dentro de un contenedor con la clase .cs
   -------------------------------------------------------------------------- */

.cs,
.cs * {
	box-sizing: border-box;
}

.cs {
	font-family: var(--cs-serif);
	font-size: var(--cs-t-cuerpo);
	line-height: var(--cs-lh-cuerpo);
	color: var(--cs-tinta);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

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

/* --------------------------------------------------------------------------
   4. Foco visible
   Divi no lo trae y sin esto la web no es navegable con teclado.
   -------------------------------------------------------------------------- */

.cs :focus-visible {
	outline: 2px solid var(--cs-foco-claro);
	outline-offset: 3px;
	border-radius: 2px;
}

.cs--oscuro :focus-visible {
	outline-color: var(--cs-foco-oscuro);
}

/* --------------------------------------------------------------------------
   5. Movimiento reducido
   Si el sistema lo pide, se apaga todo. No se atenúa: se apaga.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.cs *,
	.cs *::before,
	.cs *::after {
		animation-duration: .001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .001ms !important;
		scroll-behavior: auto !important;
	}
}

/* --------------------------------------------------------------------------
   6. Superficies del navegador
   Selección, cursor de texto, casillas y barra de scroll con la paleta.
   -------------------------------------------------------------------------- */

::selection {
	background: var(--cs-arena-claro);
	color: var(--cs-tinta);
}

.cs--oscuro ::selection {
	background: var(--cs-arena);
	color: var(--cs-negro);
}

html {
	scrollbar-color: var(--cs-arena) var(--cs-hueso);
}

.cs {
	accent-color: var(--cs-tinta);
}

.cs input,
.cs textarea {
	caret-color: var(--cs-tinta);
}

.cs a {
	text-underline-offset: .2em;
}

/* 7. Cortes de línea: sin palabras sueltas al final de párrafo y titulares equilibrados. */
.cs p, .cs li, .cs dd, .csf p { text-wrap: pretty; }
.cs h1, .cs h2, .cs h3 { text-wrap: balance; }
