/*
 * Evolve Media: estilos del tema y de la preview estática (mismo archivo).
 * Paleta del manual v2: negro #000000, blanco #FFFFFF, rojo #D60D0D; grises neutros de apoyo.
 * Tipografías web propuestas (OFL, incluidas en assets/fonts): Archivo para titulares, Source Sans 3 para texto.
 */

@font-face {
	font-family: "Archivo";
	src: url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2-variations"), url("../fonts/archivo-latin-wdth-normal.woff2") format("woff2");
	font-weight: 100 900;
	font-stretch: 62% 125%;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Source Sans 3";
	src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
	font-weight: 200 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Source Sans 3";
	src: url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2-variations"), url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
	font-weight: 200 900;
	font-style: italic;
	font-display: swap;
}

:root {
	--black: #000;
	--white: #fff;
	--red: #d60d0d;
	--red-press: #b00b0b;
	--gray-on-black: #b8b8b8;
	--gray-on-white: #5c5c5c;
	--line-on-black: #3d3d3d;
	--line-on-white: #cfcfcf;

	--font-display: "Archivo", "Arial Narrow", Arial, sans-serif;
	--font-text: "Source Sans 3", "Myriad Pro", "Segoe UI", system-ui, sans-serif;

	/* Mínimo 17 px: a 360 px caben logo (240 px), su área libre (1x = 16.4 px) y el botón «Menú» en una línea. */
	--gutter: clamp(1.0625rem, 4vw, 3rem);
	--max: 90rem;
	--section-space: clamp(5rem, 4rem + 6vw, 10rem);

	/* Curvas de STANDARDS.md (review-animations). */
	--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

	color-scheme: dark;
}

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

body {
	margin: 0;
	background: var(--black);
	color: var(--white);
	font-family: var(--font-text);
	font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
	line-height: 1.55;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

body.is-nav-open {
	overflow: hidden;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
	margin: 0;
}

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

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

:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Superficies del navegador con la paleta del manual (Impeccable, craft-floor). */
::selection {
	background: var(--red);
	color: var(--white);
}

main:focus {
	outline: none;
}

[id] {
	scroll-margin-top: 1rem;
}

.skip-link {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: var(--white);
	color: var(--black);
	font-weight: 600;
	transform: translateY(-200%);
}

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

/* Botones y enlaces ------------------------------------------------------ */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3rem;
	padding: 0.625rem 1.5rem;
	border: 0;
	border-radius: 2px;
	font: 600 1.0625rem/1.2 var(--font-text);
	text-decoration: none;
	cursor: pointer;
	/* La respuesta al toque es la escala de :active; sin el destello gris de iOS encima. */
	-webkit-tap-highlight-color: transparent;
	transition: background-color 160ms ease, color 160ms ease, transform 120ms var(--ease-out);
}

.button:active {
	transform: scale(0.97);
}

.button--primary {
	background: var(--red);
	color: var(--white);
}

.button--light {
	background: var(--white);
	color: var(--black);
}

/* Sobre el rojo de contacto: WhatsApp en negro de la marca (no el verde de la aplicación). */
.button--dark {
	background: var(--black);
	color: var(--white);
}

/* Acción secundaria sobre rojo; el contorno va por dentro para no cambiar la medida. */
.button--outline {
	background: transparent;
	color: var(--white);
	box-shadow: inset 0 0 0 2px var(--white);
}

/* Texto solo para lectores de pantalla (clase estándar de WordPress). */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.link-quiet {
	display: inline-flex;
	align-items: center;
	min-height: 3rem;
	font-weight: 600;
	text-decoration-line: underline;
}

/* Hover solo con puntero fino: en táctil el toque dejaría el estado pegado (Emil, review-animations). */
@media (hover: hover) and (pointer: fine) {
	.button--primary:hover {
		background: var(--red-press);
	}

	.button--light:hover {
		background: #e6e6e6;
	}

	.button--dark:hover {
		background: #262626;
	}

	.button--outline:hover {
		background: var(--white);
		color: var(--black);
	}

	.link-quiet:hover,
	.site-nav__list a:hover,
	.site-nav__whatsapp:hover,
	.site-footer__list a:hover {
		text-decoration-line: underline;
		text-decoration-thickness: 2px;
	}

	.site-footer__icon:hover {
		background: var(--white);
		color: var(--black);
		box-shadow: inset 0 0 0 1px var(--white);
	}

	.nav-toggle:hover {
		background: var(--white);
		color: var(--black);
	}
}

/* Tipografía de sección ---------------------------------------------------- */

.section-title {
	font-family: var(--font-display);
	font-stretch: 112%;
	font-weight: 720;
	/* Un escalón por debajo del H1 del hero, que es el único titular dominante de la página. */
	font-size: clamp(2rem, 1.25rem + 2.4vw, 3.5rem);
	line-height: 1.02;
	letter-spacing: -0.025em;
	text-wrap: balance;
}

.section-lead {
	max-width: 36rem;
	color: var(--gray-on-black);
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
	line-height: 1.5;
	text-wrap: pretty;
}

.concept-note {
	display: block;
	color: var(--gray-on-black);
	font-size: 0.9375rem;
	line-height: 1.4;
	font-style: italic;
}

/* Encabezado ---------------------------------------------------------------- */

/*
 * El logo conserva 240 px de ancho visible (mínimo del manual) y 1x de área libre: x = 16.4 px.
 * El hueco mínimo entre logo y menú (17 px) cumple esa área; space-between lo amplía cuando hay sitio.
 */
.site-header {
	position: relative;
	z-index: 20;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.0625rem;
	max-width: var(--max);
	margin-inline: auto;
	padding: 1rem var(--gutter);
}

.brand {
	position: relative;
	z-index: 2;
	display: block;
	flex: none;
	padding: 1.025rem 0;
	border-radius: 2px;
}

.brand__logo {
	width: 240px;
	height: auto;
	aspect-ratio: 240 / 68;
}

.site-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 2rem;
}

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a,
.site-nav__whatsapp {
	display: inline-flex;
	align-items: center;
	min-height: 3rem;
	font-weight: 600;
	text-decoration: none;
}

/* 64 px de ancho fijo (objetivo táctil de 64 × 48): «Menú» y «Cerrar» caben sin mover el logo. */
.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	min-height: 3rem;
	padding: 0.5rem 0;
	border: 1px solid var(--white);
	border-radius: 2px;
	background: transparent;
	color: var(--white);
	font: 600 1rem/1 var(--font-text);
	cursor: pointer;
	position: relative;
	z-index: 2;
	-webkit-tap-highlight-color: transparent;
	transition: transform 120ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}

.nav-toggle:active {
	transform: scale(0.97);
}

.nav-toggle[hidden] {
	display: none;
}

/* Menú móvil: solo se pliega cuando JavaScript puede abrirlo. */
@media (max-width: 63.99em) {
	.js .nav-toggle[hidden] {
		display: inline-flex;
	}

	.js .site-nav {
		position: fixed;
		inset: 0;
		z-index: 1;
		display: none;
		flex-direction: column;
		align-items: flex-start;
		justify-content: center;
		gap: 2rem;
		padding: 7.5rem var(--gutter) 3rem;
		background: var(--black);
		overflow-y: auto;
	}

	.js .site-header.is-open .site-nav {
		display: flex;
		opacity: 1;
		transform: none;
		transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
	}

	@starting-style {
		.js .site-header.is-open .site-nav {
			opacity: 0;
			transform: translateY(-0.5rem);
		}
	}

	.js .site-nav__list {
		flex-direction: column;
		gap: 0.25rem;
	}

	.js .site-nav__list a {
		font-family: var(--font-display);
		font-stretch: 112%;
		font-weight: 700;
		font-size: clamp(2rem, 1.5rem + 3vw, 3rem);
		letter-spacing: -0.02em;
		line-height: 1.1;
	}
}

@media (min-width: 64em) {
	.nav-toggle,
	.nav-toggle[hidden] {
		display: none;
	}
}

/* Portada ------------------------------------------------------------------ */

.hero {
	padding: clamp(2rem, 1rem + 4vw, 4rem) var(--gutter) clamp(4rem, 3rem + 4vw, 7rem);
}

/*
 * Móvil y tableta: título, acción, composición y propuesta. El botón sube junto al título para que
 * la acción y la composición completa compartan el primer viewport (360–1024 px).
 * Escritorio: texto a la izquierda (título, propuesta, acción) y composición a la derecha.
 */
.hero__inner {
	display: grid;
	grid-template-areas: "title" "actions" "visual" "lead";
	gap: 1.5rem;
	max-width: var(--max);
	margin-inline: auto;
}

.hero__title {
	grid-area: title;
	font-family: var(--font-display);
	font-stretch: 112%;
	font-weight: 780;
	font-size: clamp(2.125rem, 1rem + 4.6vw, 4rem);
	line-height: 1;
	letter-spacing: -0.03em;
	text-wrap: balance;
	hyphens: manual;
}

.hero__visual {
	grid-area: visual;
	display: grid;
	gap: 0.75rem;
	width: 100%;
	max-width: 36rem;
	margin-top: 0.5rem;
	justify-self: end;
}

/* En una sola columna el bloque de propuesta se reparte entre las áreas de la rejilla. */
.hero__aside {
	display: contents;
}

/* Tinta completa: es la frase que explica la oferta, no una nota secundaria. */
.hero__lead {
	grid-area: lead;
	max-width: 34rem;
	margin-top: 1rem;
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
}

.hero__actions {
	grid-area: actions;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.5rem;
}

@media (min-width: 64em) {
	.hero__inner {
		grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
		grid-template-areas: "title visual" "aside visual";
		grid-template-rows: auto 1fr;
		column-gap: clamp(3rem, 5vw, 6rem);
		row-gap: 2.5rem;
		align-items: start;
	}

	.hero__title {
		align-self: end;
		font-size: clamp(3rem, 0.25rem + 4.6vw, 4.75rem);
	}

	.hero__aside {
		grid-area: aside;
		display: grid;
		gap: 2rem;
		align-content: start;
	}

	.hero__lead,
	.hero__actions {
		grid-area: auto;
		margin-top: 0;
	}

	.hero__actions {
		column-gap: 2rem;
	}

	.hero__visual {
		align-self: center;
		justify-self: end;
		margin-top: 0;
	}
}

/*
 * Composición del hero: tres capas con los tres colores de la marca.
 * Blanco = página web (atrás), negro = pieza de video (al frente), rojo = agente de IA.
 * Medidas en % del contenedor y tipografía en cqw: la composición escala como una imagen.
 */
.pieza {
	position: relative;
	aspect-ratio: 20 / 19;
	container-type: inline-size;
}

.pieza__web,
.pieza__video,
.pieza__agent {
	position: absolute;
	border-radius: 6px;
	overflow: hidden;
}

.pieza__label {
	font-family: var(--font-text);
	font-weight: 700;
	font-size: max(0.75rem, 3cqw);
	line-height: 1.2;
	letter-spacing: 0.01em;
}

/* Página web: ventana clara, solo estructura (sin cliente ni dominio inventados). */
.pieza__web {
	top: 0;
	right: 0;
	width: 74%;
	height: 68%;
	display: grid;
	grid-template-rows: auto 1fr;
	background: var(--white);
	color: var(--black);
}

.pieza__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 2.2cqw 3cqw;
	border-bottom: 1px solid var(--line-on-white);
}

.pieza__bar .pieza__label {
	color: var(--gray-on-white);
}

.pieza__dots {
	width: 9cqw;
	height: 2cqw;
	background: radial-gradient(circle closest-side, var(--line-on-white) 92%, transparent) 0 50% / 3cqw 2cqw repeat-x;
}

.pieza__page {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	grid-auto-rows: min-content;
	align-content: center;
	column-gap: 4cqw;
	row-gap: 1.6cqw;
	/* Deja libre la franja izquierda que tapa la pieza de video. */
	padding: 4cqw 4cqw 4cqw 24cqw;
}

.pieza__line {
	grid-column: 1;
	height: 1.6cqw;
	border-radius: 1cqw;
	background: var(--line-on-white);
}

.pieza__line--title {
	height: 3.2cqw;
	background: var(--black);
}

.pieza__line--short {
	width: 62%;
}

.pieza__button {
	grid-column: 1;
	width: 48%;
	height: 4.6cqw;
	margin-top: 1.4cqw;
	border-radius: 0.6cqw;
	background: var(--red);
}

.pieza__player {
	grid-column: 2;
	grid-row: 1 / span 6;
	align-self: center;
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 5;
	border-radius: 0.8cqw;
	background: var(--black);
}

.pieza__play {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 2.4cqw 0 2.4cqw 4cqw;
	border-color: transparent transparent transparent var(--white);
	transform: translateX(0.6cqw);
}

/* Pieza de video: visor con esquinas y punto rojo, el mismo lenguaje del encuadre. */
.pieza__video {
	top: 17%;
	left: 0;
	width: 42%;
	aspect-ratio: 4 / 5;
	background: var(--black);
	/* Sombra con desplazamiento y desenfoque: separa la pieza de la ventana blanca que tapa. */
	box-shadow: 0 1.6cqw 4cqw rgb(0 0 0 / 0.55), 0 0 0 1px var(--line-on-black);
}

.pieza__media,
.pieza__media img {
	width: 100%;
	height: 100%;
}

.pieza__media img {
	object-fit: cover;
}

.pieza__corner {
	position: absolute;
	width: 6cqw;
	aspect-ratio: 1;
	border: 0 solid var(--white);
}

.pieza__corner--tl { top: 4cqw; left: 4cqw; border-top-width: 2px; border-left-width: 2px; }
.pieza__corner--tr { top: 4cqw; right: 4cqw; border-top-width: 2px; border-right-width: 2px; }
.pieza__corner--bl { bottom: 4cqw; left: 4cqw; border-bottom-width: 2px; border-left-width: 2px; }
.pieza__corner--br { bottom: 4cqw; right: 4cqw; border-bottom-width: 2px; border-right-width: 2px; }

/* Rótulo inferior tipo visor: punto rojo de grabación + nombre de la capa, sobre las esquinas de abajo. */
.pieza__label--video {
	position: absolute;
	bottom: 12cqw;
	left: 4cqw;
	max-width: 34cqw;
	display: flex;
	align-items: center;
	gap: 1.2cqw;
	padding: 0.8cqw 1.6cqw;
	border-radius: 2px;
	background: var(--black);
	color: var(--white);
}

.pieza__label--video::before {
	content: "";
	flex: none;
	width: 2cqw;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--red);
}

/* Agente de IA: flujo de tres pasos sobre rojo oficial (blanco sobre #D60D0D: 5.4:1). */
.pieza__agent {
	right: 0;
	bottom: 0;
	width: 62%;
	display: grid;
	gap: 2.4cqw;
	padding: 4cqw 4.4cqw 4.4cqw;
	background: var(--red);
	color: var(--white);
	box-shadow: 0 1.6cqw 4cqw rgb(0 0 0 / 0.45);
}

.pieza__flow {
	position: relative;
	display: grid;
	gap: 2cqw;
	font-size: max(0.8125rem, 3.4cqw);
	font-weight: 600;
	line-height: 1.2;
}

.pieza__flow li {
	position: relative;
	padding-left: 6cqw;
}

/* Nodo de cada paso y línea que los une. */
.pieza__flow li::before {
	content: "";
	position: absolute;
	top: 0.25em;
	left: 0;
	width: 2.6cqw;
	aspect-ratio: 1;
	border: 2px solid var(--white);
	border-radius: 50%;
	background: var(--red);
}

.pieza__flow li:nth-child(2)::before {
	background: var(--white);
}

.pieza__flow li:not(:last-child)::after {
	content: "";
	position: absolute;
	top: calc(0.25em + 2.6cqw);
	bottom: calc(-2cqw - 0.25em);
	left: calc(1.3cqw - 1px);
	border-left: 2px solid var(--white);
}

.hero__note {
	max-width: 32rem;
	justify-self: end;
	text-align: right;
}

/* Una sola entrada al cargar: las capas se asientan de atrás hacia adelante (CSS, sin JS). */
@media (prefers-reduced-motion: no-preference) {
	[data-pieza-layer] {
		animation: pieza-in 520ms var(--ease-out) both;
	}

	.pieza__video {
		animation-delay: 70ms;
	}

	.pieza__agent {
		animation-delay: 140ms;
	}
}

@keyframes pieza-in {
	from {
		opacity: 0;
		transform: translateY(1.25rem);
	}
}

/* Encuadre: servicios conectados ---------------------------------------- */

.encuadre {
	padding: 0 var(--gutter) var(--section-space);
}

.encuadre__intro,
.trabajo__head,
.proceso__head {
	display: grid;
	gap: 1.5rem;
	max-width: var(--max);
	margin: 0 auto clamp(2.5rem, 2rem + 3vw, 5rem);
}

@media (min-width: 64em) {
	.encuadre__intro,
	.trabajo__head,
	.proceso__head {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		column-gap: 4rem;
		align-items: end;
	}
}

.encuadre__stage {
	max-width: var(--max);
	margin-inline: auto;
}

.encuadre__figure {
	display: grid;
	gap: 0.75rem;
}

.encuadre__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--black);
}

.encuadre__media,
.encuadre__media img {
	width: 100%;
	height: 100%;
}

.encuadre__media img {
	object-fit: cover;
}

.encuadre__scrim {
	position: absolute;
	inset: 0;
	opacity: 0;
	background: linear-gradient(90deg, rgb(0 0 0 / 0.86) 0%, rgb(0 0 0 / 0.7) 38%, rgb(0 0 0 / 0.15) 72%, rgb(0 0 0 / 0) 100%);
	pointer-events: none;
}

.encuadre__corner {
	position: absolute;
	width: clamp(1.25rem, 3vw, 2.75rem);
	aspect-ratio: 1;
	border: 0 solid var(--white);
	pointer-events: none;
}

.encuadre__corner--tl { top: 4%; left: 2.5%; border-top-width: 3px; border-left-width: 3px; }
.encuadre__corner--tr { top: 4%; right: 2.5%; border-top-width: 3px; border-right-width: 3px; }
.encuadre__corner--bl { bottom: 4%; left: 2.5%; border-bottom-width: 3px; border-left-width: 3px; }
.encuadre__corner--br { bottom: 4%; right: 2.5%; border-bottom-width: 3px; border-right-width: 3px; }

.encuadre__rec {
	position: absolute;
	top: calc(4% + 0.25rem);
	left: calc(2.5% + clamp(2rem, 4vw, 3.75rem));
	width: clamp(0.625rem, 1vw, 1rem);
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--red);
}

.encuadre__chapters {
	display: grid;
	gap: 2.5rem;
	margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

@media (min-width: 48em) {
	.encuadre__chapters {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 2rem;
	}
}

.chapter {
	display: grid;
	align-content: start;
	gap: 0.875rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line-on-black);
}

.chapter__title {
	font-family: var(--font-display);
	font-stretch: 108%;
	font-weight: 680;
	font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.25rem);
	line-height: 1.08;
	letter-spacing: -0.018em;
	text-wrap: balance;
}

.chapter__goal {
	font-weight: 600;
	font-size: 1.125rem;
}

.chapter__text {
	max-width: 34rem;
	color: var(--gray-on-black);
}

.chapter__items {
	display: grid;
	gap: 0.375rem;
	margin-top: 0.25rem;
	font-size: 1rem;
}

.chapter__items li {
	display: flex;
	gap: 0.625rem;
	align-items: baseline;
}

.chapter__items li::before {
	content: "";
	flex: none;
	width: 0.375rem;
	height: 0.375rem;
	border-radius: 50%;
	background: var(--red);
	transform: translateY(-0.1em);
}

/*
 * Modo cinematográfico (solo escritorio, con JS y sin reducción de movimiento).
 * La pista mide varias pantallas y el escenario queda fijo con position: sticky:
 * el scroll sigue siendo nativo, GSAP solo lee su progreso.
 */
.is-cinematic .encuadre {
	padding-bottom: 0;
	padding-inline: 0;
}

.is-cinematic .encuadre__intro {
	padding-inline: var(--gutter);
	margin-bottom: 0;
}

.is-cinematic .encuadre__track {
	height: 380svh;
}

.is-cinematic .encuadre__stage {
	position: sticky;
	top: 0;
	height: 100svh;
	max-width: none;
	overflow: hidden;
}

.is-cinematic .encuadre__figure {
	position: absolute;
	inset: 0;
	display: block;
}

.is-cinematic .encuadre__frame {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
	will-change: transform;
}

/* Por encima de las esquinas del visor para que la nota nunca quede tapada. */
.is-cinematic .encuadre__note {
	position: absolute;
	right: calc(2.5% + clamp(1.25rem, 3vw, 2.75rem) + 1rem);
	bottom: calc(4% + 0.25rem);
	z-index: 3;
	max-width: 28rem;
	text-align: right;
}

.is-cinematic .encuadre__chapters {
	position: absolute;
	left: var(--gutter);
	bottom: clamp(4rem, 12svh, 9rem);
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	/* Termina antes del borde izquierdo del encuadre en la etapa de producción (40 % del ancho). */
	width: min(32rem, 34vw);
	margin: 0;
}

.is-cinematic .chapter {
	grid-area: 1 / 1;
	align-self: end;
	border-top: 0;
	padding-top: 0;
}

.is-cinematic .chapter__title {
	font-size: clamp(2rem, 1.2rem + 1.8vw, 3.25rem);
}

.is-cinematic .chapter__text,
.is-cinematic .chapter__items {
	color: var(--white);
}

/* Web y automatización: continúa la historia del encuadre ----------------- */

.sistemas {
	padding: var(--section-space) var(--gutter);
}

/* Sin el encuadre fijo, la sección anterior ya deja su propio espacio inferior. */
.encuadre + .sistemas {
	padding-top: 0;
}

.is-cinematic .encuadre + .sistemas {
	padding-top: var(--section-space);
}

.sistemas__head {
	display: grid;
	gap: 1.5rem;
	max-width: var(--max);
	margin: 0 auto clamp(2.5rem, 2rem + 3vw, 5rem);
}

.sistemas__areas {
	display: grid;
	gap: 3rem;
	max-width: var(--max);
	margin-inline: auto;
}

.area {
	display: grid;
	align-content: start;
	gap: 0.875rem;
	padding-top: 1.5rem;
	border-top: 2px solid var(--white);
}

/* El rojo marca la capa del agente, igual que en la composición del hero. */
.area--ia {
	border-top-color: var(--red);
}

.area__title {
	font-family: var(--font-display);
	font-stretch: 108%;
	font-weight: 700;
	font-size: clamp(1.75rem, 1.2rem + 1.8vw, 3rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	text-wrap: balance;
}

.area__goal {
	font-weight: 600;
	font-size: 1.125rem;
}

.area__text {
	max-width: 34rem;
	color: var(--gray-on-black);
}

@media (min-width: 48em) {
	.sistemas__areas {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2.5rem;
	}
}

@media (min-width: 64em) {
	.sistemas__head {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		column-gap: 4rem;
		align-items: end;
	}

	.sistemas__areas {
		column-gap: 4rem;
	}
}

/* Formatos y trabajo --------------------------------------------------------- */

.trabajo {
	padding: var(--section-space) var(--gutter);
	background: var(--white);
	color: var(--black);
	color-scheme: light;
}

.trabajo .section-lead,
.trabajo .concept-note {
	color: var(--gray-on-white);
}

.trabajo__grid {
	display: grid;
	gap: 3rem 2rem;
	max-width: var(--max);
	margin-inline: auto;
}

.work {
	display: grid;
	gap: 1rem;
	align-content: start;
}

.work__media {
	overflow: hidden;
	background: #e9e9e9;
}

.work__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Reproductor nativo con sus controles; contain conserva la proporción original del video. */
.work__media video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: var(--black);
}

.work--vertical .work__media { aspect-ratio: 9 / 16; }
.work--wide .work__media { aspect-ratio: 16 / 9; }
.work--portrait .work__media { aspect-ratio: 4 / 5; }

.work--vertical,
.work--portrait {
	max-width: 26rem;
}

.work__caption {
	display: grid;
	gap: 0.25rem;
	padding-top: 0.875rem;
	border-top: 1px solid var(--line-on-white);
}

.work__title {
	font-family: var(--font-display);
	font-stretch: 108%;
	font-weight: 680;
	font-size: 1.375rem;
	line-height: 1.15;
	letter-spacing: -0.012em;
}

@media (min-width: 64em) {
	.trabajo__grid {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		row-gap: 4rem;
	}

	.work--vertical {
		grid-column: 1 / span 4;
		grid-row: 1 / span 2;
		max-width: none;
	}

	.work--wide {
		grid-column: 6 / span 7;
		grid-row: 1;
	}

	.work--portrait {
		grid-column: 9 / span 4;
		grid-row: 2;
		max-width: none;
	}
}

/* Proceso ----------------------------------------------------------------- */

.proceso {
	padding: var(--section-space) var(--gutter);
}

.proceso__steps {
	display: grid;
	gap: 2.5rem;
	max-width: var(--max);
	margin-inline: auto;
	counter-reset: step;
}

@media (min-width: 40em) {
	.proceso__steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 3rem 2rem;
	}
}

@media (min-width: 64em) {
	.proceso__steps {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.step {
	display: grid;
	align-content: start;
	gap: 0.75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--line-on-black);
}

.step__number {
	font-family: var(--font-display);
	font-stretch: 125%;
	font-weight: 300;
	font-size: clamp(2.5rem, 2rem + 2vw, 3.75rem);
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--gray-on-black);
	font-variant-numeric: tabular-nums;
}

.step__title {
	font-family: var(--font-display);
	font-stretch: 108%;
	font-weight: 680;
	font-size: clamp(1.5rem, 1.25rem + 0.8vw, 2rem);
	line-height: 1.1;
	letter-spacing: -0.015em;
}

.step__text {
	max-width: 30rem;
	color: var(--gray-on-black);
}

/* Estudio ------------------------------------------------------------------- */

.estudio {
	display: grid;
	gap: 2rem;
	padding: var(--section-space) var(--gutter);
	background: var(--white);
	color: var(--black);
	color-scheme: light;
}

.estudio > * {
	width: 100%;
	max-width: var(--max);
	margin-inline: auto;
}

.estudio__title {
	font-family: var(--font-display);
	font-stretch: 118%;
	font-weight: 760;
	font-size: clamp(2rem, 1.2rem + 3.2vw, 4rem);
	line-height: 1;
	letter-spacing: -0.03em;
	text-wrap: balance;
}

.estudio__text {
	max-width: 40rem;
	font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.5rem);
	line-height: 1.5;
	text-wrap: pretty;
}

@media (min-width: 64em) {
	.estudio {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		column-gap: 4rem;
		align-items: end;
		justify-content: center;
	}

	.estudio > * {
		max-width: none;
		margin: 0;
	}

	.estudio {
		padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2));
	}
}

/* Contacto -------------------------------------------------------------- */

.contacto {
	display: grid;
	gap: 3rem;
	padding: var(--section-space) max(var(--gutter), calc((100% - var(--max)) / 2));
	background: var(--red);
	color: var(--white);
}

.contacto .section-lead {
	color: var(--white);
}

.contacto__intro {
	display: grid;
	gap: 1.5rem;
	align-content: start;
}

.contacto__direct {
	display: grid;
	gap: 0.25rem;
	margin-top: 1rem;
}

.contacto__label {
	font-weight: 600;
}

.contacto__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
}

.contacto__backup {
	font-weight: 600;
}

.contacto__email {
	font-family: var(--font-display);
	font-stretch: 105%;
	font-weight: 650;
	font-size: clamp(1.375rem, 0.9rem + 2.2vw, 2.5rem);
	line-height: 1.15;
	letter-spacing: -0.015em;
	/* El marcado trae un único corte (<wbr>) antes de la arroba; break-word solo actúa si un fragmento no cabe. */
	overflow-wrap: break-word;
	text-decoration-thickness: 2px;
}

.contact-form {
	display: grid;
	gap: 1.25rem;
	align-content: start;
}

.contact-form[hidden] {
	display: none;
}

.field {
	display: grid;
	gap: 0.375rem;
}

.field label {
	font-weight: 600;
}

.field input,
.field select,
.field textarea {
	width: 100%;
	min-height: 3rem;
	padding: 0.75rem 0.875rem;
	border: 2px solid var(--white);
	border-radius: 2px;
	background: var(--white);
	color: var(--black);
	caret-color: var(--red);
	font: inherit;
	font-size: max(1rem, 16px);
}

.field textarea {
	resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
	outline: 3px solid var(--black);
	outline-offset: 2px;
}

.field [aria-invalid="true"] {
	border-color: var(--black);
	box-shadow: inset 0 0 0 2px var(--black);
}

.field__error {
	font-weight: 700;
}

.field__error::before {
	content: "Revisa: ";
}

.contact-form .button--light {
	justify-self: start;
}

.contact-form .button--light:focus-visible {
	outline-color: var(--white);
}

.contact-form__note {
	max-width: 32rem;
	font-size: 0.9375rem;
}

.contact-form__status:empty {
	display: none;
}

.contact-form__status {
	padding: 0.875rem 1rem;
	background: var(--black);
	color: var(--white);
}

@media (min-width: 64em) {
	.contacto {
		grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
		column-gap: clamp(3rem, 6vw, 8rem);
	}
}

/* Pie -------------------------------------------------------------------- */

.site-footer {
	padding: 4rem var(--gutter) 3rem;
	border-top: 1px solid var(--line-on-black);
}

.site-footer__inner {
	display: grid;
	gap: 1.5rem 3rem;
	max-width: var(--max);
	margin-inline: auto;
}

.site-footer__text,
.site-footer__legal {
	color: var(--gray-on-black);
}

/* Iconos de contacto: 44 px de área, el mismo radio de 2 px que botones y «Menú». */
.site-footer__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 2px;
	box-shadow: inset 0 0 0 1px var(--line-on-black);
	color: var(--white);
	-webkit-tap-highlight-color: transparent;
	transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 120ms var(--ease-out);
}

.site-footer__icon:active {
	transform: scale(0.97);
}

.site-footer__icon .icon {
	width: 1.5rem;
	height: 1.5rem;
}

.site-footer__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__list a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	font-weight: 600;
}

.site-footer__list a {
	text-decoration: none;
}

@media (min-width: 64em) {
	.site-footer__inner {
		grid-template-columns: auto 1fr auto;
		align-items: center;
	}

	.site-footer__text {
		grid-column: 2;
	}

	.site-footer__nav {
		grid-column: 1 / span 2;
	}

	.site-footer__contact {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
	}

	.site-footer__legal {
		grid-column: 3;
		justify-self: end;
	}
}

/* Páginas internas ------------------------------------------------------ */

.site-page {
	max-width: 48rem;
	margin-inline: auto;
	padding: 12rem var(--gutter) var(--section-space);
}

.site-page__title {
	margin-bottom: 2rem;
	font-family: var(--font-display);
	font-stretch: 112%;
	font-weight: 720;
	font-size: clamp(2.25rem, 1.5rem + 3vw, 4rem);
	line-height: 1.02;
	letter-spacing: -0.025em;
}

.entry + .entry {
	margin-top: 3rem;
}

.entry__content > * + * {
	margin-top: 1em;
}

/* Preferencias ----------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.button,
	.nav-toggle {
		transition: background-color 160ms ease, color 160ms ease;
	}

	.button:active,
	.nav-toggle:active,
	.site-footer__icon:active {
		transform: none;
	}

	.js .site-header.is-open .site-nav {
		transform: none;
		transition: opacity 160ms ease;
	}

	/* La composición del hero solo aparece con un fundido corto, sin desplazamiento. */
	[data-pieza-layer] {
		animation: pieza-fade 200ms ease both;
	}
}

@keyframes pieza-fade {
	from {
		opacity: 0;
	}
}

@media (prefers-contrast: more) {
	.section-lead,
	.chapter__text,
	.area__text,
	.step__text,
	.concept-note,
	.site-footer__text,
	.site-footer__legal {
		color: inherit;
	}
}
