/*
 * Estilos globales del tema LEPAS | RAFAEL AFONSO.
 * Portados de src/styles/tokens.css y src/styles/globals.css del proyecto Next.js (etiqueta pre-wordpress):
 * mismos valores, medidos en https://www.lepas.es (16-10-2026). Los colores enlazan con la paleta de theme.json.
 * La escala tipográfica es por saltos (< 1024 / ≥ 1024): theme.json no tiene puntos de corte, así que sus tamaños
 * apuntan a estas variables.
 */
:root {
	/* Color (paleta de theme.json con el valor medido como respaldo) */
	--c-black: var(--wp--preset--color--negro, #000);
	--c-white: var(--wp--preset--color--blanco, #fff);
	--c-ink: var(--wp--preset--color--tinta, #363435);
	--c-grey-500: var(--wp--preset--color--gris-500, #979493);
	--c-grey-200: var(--wp--preset--color--gris-200, #dedede);
	--c-grey-100: var(--wp--preset--color--gris-100, #efefef);
	--c-sand: var(--wp--preset--color--arena, #e5e1db);
	--c-accent: var(--wp--preset--color--acento, #eb9201);
	--c-header: rgb(0 0 0 / 0.8);
	--c-overlay-panel: rgb(0 0 0 / 0.35);
	--c-focus-dark: #fff;
	--c-focus-light: #363435;
	--c-error: #b3261e;

	/* Tipografía */
	--font-sans: "Source Sans 3", Arial, sans-serif;
	--fw-regular: 400;
	--fw-bold: 700;
	--fs-display: 35.248px;  --lh-display: 1.2;
	--fs-xxl: 29.376px;      --lh-xxl: 1.2;
	--fs-xl: 24.48px;        --lh-xl: 1.25;
	--fs-l: 20.4px;          --lh-l: 1.4;
	--fs-m: 19.008px;        --lh-m: 1.4;
	--fs-stat: 29.376px;     --lh-stat: 1.4;
	--fs-eyebrow: 19.008px;  --lh-eyebrow: 1.4;
	--fs-body: 17.008px;     --lh-body: 1.4;
	--fs-base: 16px;         --lh-base: 1.4;
	--fs-footnote: 14.208px;
	--fs-small: 14.208px;    --lh-small: 1.4;
	--fs-xs: 11.808px;       --lh-xs: 1.4;
	--ls-button: 0.5px;

	/* Espaciado y contenedores */
	--gutter: 20px;
	--container-max: 1920px;
	--content-narrow: 844px;
	--form-width: 748px;
	--header-h: 58px;
	--section-pad: 80px;
	--section-pad-lg: 128px;
	--hero-inner-h: 560px;

	/* Formas */
	--radius-pill: 80px;
	--radius-round: 50%;
	--border-hair: 1px;
	--underline-w: 72px;

	/* Movimiento */
	--dur-fast: 0.2s;
	--ease-std: ease-in-out;
	--dur-reveal: 0.8s;
	--ease-reveal: ease-out;
	--reveal-shift: 32px;
	--dur-counter: 1200ms;
	--counter-stagger: 600ms;

	/* Capas */
	--z-header: 30;
	--z-menu: 40;
	--z-consent: 60;
}

@media (min-width: 1024px) {
	:root {
		--fs-display: 50.768px;
		--fs-xxl: 42.304px;
		--fs-xl: 35.248px;
		--fs-l: 29.376px;
		--fs-m: 24.48px;
		--fs-stat: 35.248px;
		--fs-footnote: 15.056px;
	}
}

@media (min-width: 1280px) {
	:root {
		--gutter: 48px;
	}
}

@media (max-width: 767px) {
	:root {
		--header-h: 102px;
	}
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--c-white);
	color: var(--c-black);
	font-family: var(--font-sans);
	font-size: var(--fs-base);
	font-weight: var(--fw-regular);
	line-height: var(--lh-base);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

ul[role="list"], ol[role="list"] {
	list-style: none;
	padding: 0;
}

img, video, svg, picture {
	display: block;
	max-width: 100%;
}

a {
	color: inherit;
	text-decoration: none;
}

button {
	font: inherit;
	color: inherit;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

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

strong, b {
	font-weight: var(--fw-bold);
}

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

.on-dark :focus-visible,
.on-dark:focus-visible {
	outline-color: var(--c-focus-dark);
}

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

.skip-link {
	position: fixed;
	top: 0;
	left: 0;
	z-index: calc(var(--z-consent) + 1);
	padding: 40px;
	background: var(--c-white);
	color: var(--c-black);
	font-size: var(--fs-body);
	transform: translateY(-100%);
}

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

.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.t-display { font-size: var(--fs-display); line-height: var(--lh-display); font-weight: var(--fw-bold); }
.t-xxl { font-size: var(--fs-xxl); line-height: var(--lh-xxl); font-weight: var(--fw-bold); }
.t-xl { font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: var(--fw-bold); }
.t-l { font-size: var(--fs-l); line-height: var(--lh-l); font-weight: var(--fw-bold); }
.t-m { font-size: var(--fs-m); line-height: var(--lh-m); font-weight: var(--fw-bold); }
.t-eyebrow { font-size: var(--fs-eyebrow); line-height: var(--lh-eyebrow); font-weight: var(--fw-bold); }
.t-lead { font-size: var(--fs-eyebrow); line-height: var(--lh-eyebrow); font-weight: 400; }
.t-body { font-size: var(--fs-body); line-height: var(--lh-body); }
.t-small { font-size: var(--fs-small); line-height: var(--lh-small); }
.t-xs { font-size: var(--fs-xs); line-height: var(--lh-xs); }
.t-footnote { font-size: var(--fs-footnote); line-height: 1.4; }

.rich p + p { margin-top: 1.4em; }
.rich sup { font-size: 0.6em; line-height: 0; }

/* ── Estructura ───────────────────────────────────────── */
/* La cabecera es fija: el contenido empieza bajo ella salvo en las portadas a pantalla completa (.hero-full). */
.lra-main {
	display: block;
	padding-top: var(--header-h);
}

.lra-main:focus {
	outline: none;
}

.hero-full {
	margin-top: calc(-1 * var(--header-h));
}

/* WordPress envuelve el contenido en contenedores de diseño: las secciones van a sangre como en el original. */
.lra-main > .wp-block-post-content,
.lra-main > .entry-content {
	margin: 0;
	max-width: none;
}

.lra-main > .wp-block-post-content > *,
.lra-main > .entry-content > * {
	max-width: none;
	margin-block: 0;
}

/* La portada a pantalla completa sube bajo la cabecera también dentro del contenedor de WordPress
   (la regla anterior, más específica, anulaba el margen de .hero-full). */
.lra-main > .wp-block-post-content > .hero-full,
.lra-main > .entry-content > .hero-full {
	margin-top: calc(-1 * var(--header-h));
}

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