/**
 * V&J Works Studio — portada (body.vj-home).
 *
 * Experiencia del frontend, aislada bajo body.vj-home para no afectar a las
 * demos ni a otras páginas. La identidad es la editorial monocroma de
 * DESIGN.md: Fraunces + Archivo, tinta y papel, reglas finas, esquinas 0.
 *
 * Responsive fluid: breakpoints 781 / 900 / 1100 / 1400 + clamp; cubre los
 * anchos pedidos (390, 430, 768, 1024, 1280, 1366, 1440, 1600).
 * Movimiento reducido respetado.
 */

/* =========================================================
   HERO — apertura editorial animada
   ========================================================= */
.vj-home .hero {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	align-items: center;
	gap: clamp(2rem, 6vw, 6.5rem);
	min-height: calc(100svh - 0px);
	padding-inline: clamp(1.5rem, 5vw, 4rem);
	padding-block: clamp(4rem, 10vh, 8rem);
	background: var(--paper);
	overflow: hidden;
	border-bottom: 1px solid var(--rule);
}
.hero-copy .hero-eyebrow {
	margin: 0 0 2rem;
}
.hero-copy .hero-headline {
	margin: 0 0 1.9rem;
	max-width: 13ch;
}
.hero-headline em {
	font-style: italic;
}
.hero-copy .hero-sub {
	margin: 0 0 2.6rem;
	max-width: 46ch;
	font-size: 1.06rem;
	color: var(--mid);
}
.hero-cta .wp-block-button {
	margin: 0;
}
.hero-cta {
	gap: 1.1rem;
	margin: 0 !important;
}

/* La antigua cubierta oscura (.hero-cover) dejaba el titular en blanco;
   ahora el hero vive sobre papel, así que devolvemos la tinta. */
.vj-home .hero-headline,
.vj-home .hero-headline em {
	color: var(--ink);
}
.vj-home .hero-sub {
	color: var(--mid);
}
.vj-home .hero-eyebrow {
	color: var(--mid);
}
.vj-home .hero-copy {
	max-width: none;
}

/* Glyph editorial a la derecha: wordmark en contorno con deriva lenta. */
.hero-glyph {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-end;
	gap: 0;
	min-height: clamp(15rem, 22vw, 22rem);
	pointer-events: none;
	user-select: none;
}
.hero-glyph--mark {
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 400;
	font-size: clamp(6.5rem, 24vw, 19rem);
	line-height: 0.74;
	letter-spacing: -0.05em;
	color: transparent;
	-webkit-text-stroke: 1.5px var(--ink);
	text-align: right;
	transform: rotate(-2deg) translateZ(0);
	animation: heroDrift 14s ease-in-out infinite alternate;
}
.hero-glyph--sup {
	align-self: flex-end;
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--ink);
	background: var(--paper);
	padding: 0.35rem 0.1rem 0;
	writing-mode: horizontal-tb;
	margin-bottom: -1.8rem;
	transform: rotate(-2deg);
}
.hero-glyph--cap {
	align-self: flex-end;
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 0.62rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--mid);
	margin-top: 1.4rem;
	transform: rotate(-2deg);
}
@keyframes heroDrift {
	from { transform: rotate(-2deg) translate(0, 0); }
	to   { transform: rotate(-2.9deg) translate(-0.4rem, 1.2rem); }
}

/* Folio de datos bajo el hero. */
.hero-folio {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2.6rem;
	width: 100%;
	margin-top: 3.4rem;
	padding-top: 1.6rem;
	border-top: 1px solid var(--rule);
}
.hero-folio .folio-k,
.hero-folio .folio-v {
	margin: 0;
}
.hero-folio .folio-k {
	font-size: 0.62rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--mid);
}
.hero-folio .folio-v {
	margin-top: 0.3rem;
	font-size: 0.86rem;
	color: var(--ink);
}

/* Cueva de scroll. */
.hero-cue {
	position: absolute;
	left: 50%;
	bottom: clamp(1.2rem, 3vh, 2rem);
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 0.6rem;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--mid);
}
.hero-cue-line {
	width: 1px;
	height: 42px;
	background: var(--rule);
	position: relative;
	overflow: hidden;
}
.hero-cue-line::after {
	content: "";
	position: absolute;
	left: 0;
	top: -50%;
	width: 100%;
	height: 50%;
	background: var(--ink);
	animation: cueDrop 1.8s ease-in-out infinite;
}
@keyframes cueDrop {
	0% { transform: translateY(0); }
	100% { transform: translateY(200%); }
}

/* Entrada escalonada del hero: el movimiento lo aporta motion.css (.reveal);
   aquí solo el retardo por elemento para la escalera editorial. */
.vj-home .hero .hero-eyebrow { transition-delay: 0.05s; }
.vj-home .hero .hero-headline { transition-delay: 0.13s; }
.vj-home .hero .hero-sub { transition-delay: 0.21s; }
.vj-home .hero .hero-cta { transition-delay: 0.29s; }
.vj-home .hero .hero-folio { transition-delay: 0.38s; }
.vj-home .hero .hero-glyph { transition-delay: 0.55s; }

/* =========================================================
   MUESTRAS DESTACADAS — proyectos en presentación dinámica
   ========================================================= */
.vj-home .samples {
	background: var(--paper);
	padding-block: clamp(4rem, 9vw, 7.5rem);
}
.band-head {
	width: 100%;
	margin-bottom: clamp(2.4rem, 5vw, 4rem);
	gap: 2rem;
}
.band-head .band-cta a {
	letter-spacing: 0.12em;
}

/* Bloque de proyecto: media (mockup) + copia, variando la colocación. */
.sample-row {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	align-items: center;
	gap: clamp(1.6rem, 4vw, 4rem);
	padding-block: clamp(3rem, 6vw, 5.5rem);
	border-top: 1px solid var(--rule);
}
.sample-row:last-of-type {
	border-bottom: 1px solid var(--rule);
}
.sample-media { grid-column: span 7; }
.sample-copy  { grid-column: span 5; }
.sample-row.is-reverse .sample-media { grid-column: 6 / 13; grid-row: 1; }
.sample-row.is-reverse .sample-copy  { grid-column: 1 / 6;   grid-row: 1; }
.sample-copy .sample-index {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 0.66rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--mid);
	margin: 0 0 1.1rem;
}
.sample-copy .sample-title {
	margin: 0 0 1rem;
}
.sample-copy .sample-cat {
	margin: 0 0 1.2rem;
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 0.62rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ink);
}
.sample-copy .sample-desc {
	margin: 0 0 1.8rem;
	color: var(--mid);
	max-width: 34ch;
}
.sample-cta {
	gap: 0.9rem;
	margin: 0;
}
.sample-cta .wp-block-button { margin: 0; }

/* Presentación editorial a pantalla amplia (HORMA-like en portada). */
.sample-row.is-wide .sample-media {
	grid-column: 1 / -1;
}
.sample-row.is-wide .sample-copy {
	grid-column: 1 / 6;
	margin-top: -4rem;
	position: relative;
	z-index: 2;
	background: var(--paper);
	padding: 1.6rem 2rem 1.4rem 0;
}

/* Combinación navegador + teléfono. */
.sample-multi {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: end;
	gap: clamp(1rem, 2.5vw, 2rem);
}
.sample-multi .vj-device--browser { align-self: stretch; }
.sample-multi .vj-device--phone {
	margin-inline: 0;
	box-shadow: none;
	margin-bottom: -1.4rem;
}

/* Acceso destacado "Explorar todos los diseños". */
.samples-more {
	width: 100%;
	padding-top: clamp(2.4rem, 5vw, 4rem);
	margin-top: clamp(1.6rem, 4vw, 3rem);
	text-align: center;
}
.samples-more .explore-wrap {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
}
.samples-more .samples-more--k {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: 0.64rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--mid);
	margin: 0;
}
.samples-more .wp-block-button__link {
	font-size: 1rem;
	padding: 1.1rem 2.6rem;
}

/* =========================================================
   SERVICIOS / METODOLOGÍA / DIFERENCIALES / CTA
   (conservando clases existentes y alineando el ritmo)
   ========================================================= */
.vj-home .band-title {
	margin: 0;
}
.vj-home .band-head .band-note {
	max-width: 38ch;
	margin: 0 0 1.2rem;
}
.vj-home .band-head .band-link a {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink);
	text-decoration: none;
	border-bottom: 1px solid var(--ink);
}
.rule-list { margin-top: 2rem; }

/* Diferenciales: rejilla reglada de capacidades. */
.diff-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0;
	border-top: 1px solid var(--rule);
}
.diff-cell {
	padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1.2rem, 2.4vw, 2rem);
	border-right: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}
.diff-cell:nth-child(3n) { border-right: 0; }
.diff-cell .diff-num {
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: 2.2rem;
	line-height: 1;
	color: var(--ink);
	margin: 0 0 1.4rem;
}
.diff-cell .diff-title {
	margin: 0 0 0.8rem;
}
.diff-cell .diff-desc {
	margin: 0;
	font-size: 0.94rem;
	color: var(--mid);
}

/* Contacto directo → mural tipo word cloud con el nombre de la agencia. */
.vj-home .contact-strip {
	display: block;
	border-top: 1px solid var(--rule);
}
.vj-home .wc-mural {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.05em 0.45em;
	padding-block: clamp(1.1rem, 2.4vw, 1.9rem);
	overflow: hidden;
}
.vj-home .wc {
	margin: 0;
	font-family: var(--wp--preset--font-family--fraunces);
	font-weight: 500;
	line-height: 0.96;
	white-space: nowrap;
	color: var(--ink);
}
.vj-home .wc-a {
	font-size: clamp(1.2rem, 3.2vw, 2.2rem);
	font-weight: 600;
	letter-spacing: -0.02em;
	transform: rotate(-4deg);
}
.vj-home .wc-b {
	font-size: clamp(0.72rem, 1.7vw, 1.15rem);
	transform: rotate(2.5deg);
}
.vj-home .wc-c {
	font-size: clamp(0.8rem, 1.9vw, 1.3rem);
	font-weight: 400;
	font-style: italic;
	transform: rotate(-2deg);
}
.vj-home .wc-d {
	font-family: var(--wp--preset--font-family--archivo);
	font-size: clamp(0.5rem, 0.9vw, 0.64rem);
	font-weight: 400;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--mid);
	transform: rotate(3deg);
}
.contact-strip .contact-mail {
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: clamp(1.7rem, 4vw, 2.8rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var(--ink);
	margin: 1.2rem 0 1.6rem;
}
.contact-strip .contact-mail a {
	color: inherit;
	text-decoration: none;
	border-bottom: 2px solid var(--ink);
	transition: color 0.25s ease;
}
.contact-strip .contact-mail a:hover { color: var(--mid); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
	.vj-home .hero {
		grid-template-columns: 1fr 0.72fr;
		gap: 2.5rem;
	}
	.sample-media { grid-column: span 12; }
	.sample-copy  { grid-column: span 12; grid-row: auto; }
	.sample-row.is-reverse .sample-media,
	.sample-row.is-reverse .sample-copy { grid-column: span 12; grid-row: auto; }
	.sample-row.is-reverse .sample-copy { order: 2; }
	.sample-row.is-reverse .sample-media { order: 1; }
	.sample-row.is-wide .sample-copy { margin-top: -2rem; grid-column: 1 / 8; }
	.diff-grid { grid-template-columns: repeat(2, 1fr); }
	.diff-cell:nth-child(3n) { border-right: 1px solid var(--rule); }
	.diff-cell:nth-child(2n) { border-right: 0; }
}

@media (max-width: 900px) {
	.vj-home .hero {
		grid-template-columns: 1fr;
		padding-block: 3.4rem 5rem;
	}
	.hero-glyph {
		display: none;
	}
	.hero-copy .hero-headline {
		max-width: 12ch;
	}
	.sample-row.is-wide .sample-copy {
		margin-top: -1.5rem;
		grid-column: 1 / -1;
		padding: 1.2rem 1.1rem 0 0;
	}
	.contact-strip { grid-template-columns: 1fr; }
}

@media (max-width: 781px) {
	.vj-home .hero {
		min-height: auto;
		padding-block: 3rem 4.6rem;
		gap: 2rem;
	}
	.hero-copy .hero-headline { font-size: clamp(2.6rem, 12vw, 3.4rem); }
	.hero-copy .hero-sub { font-size: 1rem; }
	.hero-folio { gap: 1rem 2rem; }
	.sample-row { gap: 2rem; padding-block: 2.6rem; }
	.sample-multi { grid-template-columns: 1fr; }
	.sample-multi .vj-device--phone {
		margin-inline: auto;
		margin-bottom: 0;
	}
	.diff-grid { grid-template-columns: 1fr; }
	.diff-cell:nth-child(2n) { border-right: 0; }
}

/* Movimiento reducido en la portada. */
@media (prefers-reduced-motion: reduce) {
	.vj-home .hero-glyph--mark { animation: none; }
	.vj-home .hero-cue-line::after { animation: none; }
}


/* =========================================================
   FASE 1b — Continuidad con el hero (secciones restantes)
   Solo transform / opacity. Aparición por scroll con la clase
   .vj-rv que añade vj-home.js (y solo si el JS está activo).
   ========================================================= */
html.vjt-js .vj-rv {
	opacity: 0;
	transform: translateY(24px);
	transition:
		opacity 800ms var(--vj3-out, cubic-bezier(0.23, 1, 0.32, 1)),
		transform 900ms var(--vj3-out, cubic-bezier(0.23, 1, 0.32, 1));
	transition-delay: calc(var(--i, 0) * 70ms);
}
html.vjt-js .vj-rv.is-in {
	opacity: 1;
	transform: none;
}

/* --- Servicios: filetes que se dibujan y títulos de mayor escala --- */
.vj-home .invert-band .rule-list > .rule-row {
	position: relative;
	border-top: 0 !important;
}
.vj-home .invert-band .rule-list > .rule-row::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 1px;
	background: var(--rule-light);
	transform-origin: left center;
}
html.vjt-js .vj-home .invert-band .rule-row.vj-rv::before {
	transform: scaleX(0);
	transition: transform 1300ms var(--vj3-out, cubic-bezier(0.23, 1, 0.32, 1));
	transition-delay: calc(var(--i, 0) * 70ms + 120ms);
}
html.vjt-js .vj-home .invert-band .rule-row.vj-rv.is-in::before {
	transform: scaleX(1);
}
.vj-home .invert-band .rule-title {
	font-size: clamp(1.8rem, 3.8vw, 3.2rem);
}

/* --- Metodología: línea de tiempo de cuatro pasos (escritorio) --- */
.vj-home .method-num {
	font-size: clamp(3rem, 6vw, 5.6rem);
	line-height: 0.9;
	letter-spacing: -0.04em;
	color: transparent;
	-webkit-text-stroke: 1px var(--ink);
	transition: color 900ms ease 300ms;
}
html.vjt-js .vj-home .method-step.is-in .method-num,
html:not(.vjt-js) .vj-home .method-num {
	color: var(--ink);
}
@media (min-width: 1000px) {
	/* La línea de tiempo rompe la columna de lectura (720 px) y corre a ancho
	   de página, alineada con el hero y las presentaciones. */
	.vj-home .method-grid {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 0;
		margin-top: 3rem;
		max-width: none;
		width: min(1320px, calc(100vw - 2 * var(--vj3-gut, 4rem)));
		margin-left: calc(50% - min(1320px, calc(100vw - 2 * var(--vj3-gut, 4rem))) / 2);
	}
	.vj-home .method-grid > .method-col {
		display: contents;
	}
	.vj-home .method-step {
		position: relative;
		margin: 0 !important;
		padding: 2.6rem 2rem 0 0;
		border: 0;
	}
	.vj-home .method-step + .method-step {
		border-top: 0;
	}
	.vj-home .method-step::before {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		height: 1px;
		background: var(--ink);
		transform-origin: left center;
	}
	.vj-home .method-step::after {
		content: "";
		position: absolute;
		left: 0;
		top: -4px;
		width: 9px;
		height: 9px;
		background: var(--ink);
	}
	html.vjt-js .vj-home .method-step.vj-rv::before {
		transform: scaleX(0);
		transition: transform 1400ms var(--vj3-out, cubic-bezier(0.23, 1, 0.32, 1));
		transition-delay: calc(var(--i, 0) * 110ms);
	}
	html.vjt-js .vj-home .method-step.vj-rv.is-in::before {
		transform: scaleX(1);
	}
}

/* --- Diferenciales: la celda se invierte a tinta al pasar el cursor --- */
@media (hover: hover) and (pointer: fine) {
	.vj-home .diff-cell {
		transition: background-color 320ms ease, color 320ms ease;
	}
	.vj-home .diff-cell:hover {
		background: var(--ink);
	}
	.vj-home .diff-cell:hover .diff-num,
	.vj-home .diff-cell:hover .diff-title {
		color: var(--paper);
	}
	.vj-home .diff-cell:hover .diff-desc {
		color: rgba(255, 255, 255, 0.74);
	}
}

/* --- CTA: eco del hero, con una "V&J" en contorno que se desplaza --- */
.vj-home .cta-band {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.vj-home .cta-band::before {
	content: "V\0026J";
	position: absolute;
	left: 50%;
	top: 50%;
	translate: -50% -50%;
	z-index: -1;
	font-family: var(--wp--preset--font-family--fraunces);
	font-size: clamp(16rem, 52vw, 46rem);
	line-height: 0.8;
	letter-spacing: -0.05em;
	white-space: nowrap;
	color: transparent;
	-webkit-text-stroke: 1px rgba(255, 255, 255, 0.14);
	pointer-events: none;
}
@supports (animation-timeline: view()) {
	.vj-home .cta-band::before {
		animation: vj-drift linear both;
		animation-timeline: view();
		animation-range: entry 0% exit 100%;
	}
	@keyframes vj-drift {
		from { transform: translateX(-7%); }
		to { transform: translateX(7%); }
	}
}

@media (prefers-reduced-motion: reduce) {
	html.vjt-js .vj-rv,
	html.vjt-js .vj-home .invert-band .rule-row.vj-rv::before,
	html.vjt-js .vj-home .method-step.vj-rv::before {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.vj-home .method-num {
		color: var(--ink);
		transition: none;
	}
	.vj-home .cta-band::before {
		animation: none;
	}
}

/* === Hero: botones CTA — forma biselada (misma función/URL) === */
body.vj-home .vjt-cta .wp-block-button__link {
	border-radius: 0;
	clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
	transition: background-color 200ms var(--vj-nav-ease),
		color 200ms var(--vj-nav-ease),
		transform 200ms var(--vj-nav-ease);
	will-change: transform;
}
body.vj-home .vjt-cta .wp-block-button__link:active {
	transform: translateY(1px);
}
/* Foco en el contenedor (el clip eliminaría el outline del enlace). */
body.vj-home .vjt-cta .wp-block-button:focus-within {
	outline: 2px solid var(--vj-ink);
	outline-offset: 3px;
}
body.vj-home .vjt-cta .wp-block-button__link:focus-visible { outline: 0; }
/* Flecha solo en el primario ("Explorar diseños"). */
body.vj-home .vjt-cta .vjt-primary .wp-block-button__link::after {
	content: "→";
	margin-left: 0.7rem;
	display: inline-block;
	transition: transform 200ms var(--vj-nav-ease);
}
body.vj-home .vjt-cta .vjt-primary .wp-block-button__link:hover::after {
	transform: translateX(0.3rem);
}
body.vj-home .vjt-cta .vjt-primary .wp-block-button__link:hover {
	transform: translateY(-1px);
}
/* Secundario ("Nuestros servicios"): se invierte al hover. El relleno (tinta) y el color los pone vj-btn.css
   (barrido con background-image). NO usar aquí `background:` abreviado: borra esa imagen y el botón queda
   blanco con texto blanco. */
body.vj-home .vjt-cta .vjt-secondary .wp-block-button__link:hover {
	transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
	body.vj-home .vjt-cta .wp-block-button__link {
		transition: none;
		transform: none;
	}
	body.vj-home .vjt-cta .wp-block-button__link::after {
		transition: none;
	}
}
