/* Landing home — split yin-yang + prisma 3D */

:root {
	--prism-depth: 50vmin;
}

body.home {
	overflow: hidden;
	background: #111;
}

body.home .wp-site-blocks {
	padding: 0;
}

.home-landing {
	min-height: 100svh;
	margin: 0;
	padding: 0;
}

.prism-root {
	width: 100%;
	height: 100svh;
	position: relative;
	overflow: hidden;
	perspective: 1200px;
	cursor: grab;
	font-family: var(--wp--preset--font-family--space-grotesk, 'Space Grotesk', sans-serif);
}

.prism-root.is-dragging {
	cursor: grabbing;
}

body.admin-bar .home-landing,
body.admin-bar .prism-root {
	min-height: calc(100svh - 32px);
	height: calc(100svh - 32px);
}

@media screen and (max-width: 782px) {
	body.admin-bar .home-landing,
	body.admin-bar .prism-root {
		min-height: calc(100svh - 46px);
		height: calc(100svh - 46px);
	}
}

.prism-scene {
	width: 100%;
	height: 100%;
	position: relative;
}

.prism {
	width: 100%;
	height: 100%;
	position: absolute;
	left: 50%;
	top: 50%;
	transform-style: preserve-3d;
	transform: translateX(-50%) translateY(-50%) rotateY(0deg);
	transition: transform 0.95s cubic-bezier(0.77, 0, 0.175, 1);
	will-change: transform;
}

.prism.no-transition {
	transition: none;
}

.face {
	position: absolute;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	overflow: hidden;
}

.face-home {
	transform: rotateY(0deg) translateZ(var(--prism-depth));
	background: #000;
}

.face-dev {
	transform: rotateY(120deg) translateZ(var(--prism-depth));
	background: #0a0a0a;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.face-music {
	transform: rotateY(240deg) translateZ(var(--prism-depth));
	background: #fff;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

/* Home intacta: fill absoluto, aislada del 3D */
.face-home .home-split {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: translateZ(1px);
	transform-style: flat;
}

.home-split {
	width: 100%;
	height: 100%;
	display: flex;
	position: relative;
	--role-seam: clamp(12px, 2.5vw, 28px);
	overflow: hidden;
}

.home-half {
	width: 50%;
	height: 100%;
	position: relative;
	overflow: hidden;
	cursor: pointer;
	transition: width 0.45s cubic-bezier(0.77, 0, 0.175, 1);
	-webkit-tap-highlight-color: transparent;
}

.hh-dark {
	background: #000;
}

.hh-light {
	background: #fff;
}

/* ── Desktop: header flotante (aparece al hover) ── */
.landing-header--desktop {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 24px;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 100%);
}

.landing-header-mobile {
	display: none;
}

/* Mobile-only hints */
.dir-hint,
.stack-group {
	display: none;
}

.prism-root:hover .landing-header--desktop,
.landing-header--desktop:focus-within {
	opacity: 1;
	transform: translateY(0);
	pointer-events: all;
}

.landing-header__logo {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}

.landing-header__nav {
	display: flex;
	gap: 4px;
}

.hpill {
	font-size: 9px;
	letter-spacing: 2px;
	text-transform: uppercase;
	padding: 5px 14px;
	border-radius: 20px;
	border: 0.5px solid rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.3);
	background: transparent;
	cursor: pointer;
	font-family: inherit;
	text-decoration: none;
	transition: all 0.2s;
}

button.hpill {
	appearance: none;
	-webkit-appearance: none;
}

.hpill:hover {
	border-color: rgba(255, 255, 255, 0.35);
	color: rgba(255, 255, 255, 0.8);
}

.hpill.is-active {
	border-color: rgba(255, 255, 255, 0.3);
	color: rgba(255, 255, 255, 0.75);
	background: rgba(255, 255, 255, 0.07);
}

/* ── Desktop: nombre unificado ── */
.home-name {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.28em;
	max-width: calc(100vw - 24px);
	pointer-events: none;
	mix-blend-mode: difference;
	color: #fff;
	transition: transform 0.3s ease;
}

.home-name .hname {
	font-size: clamp(48px, 10vw, 96px);
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1;
	white-space: nowrap;
	margin: 0;
}

/* Mobile stacks ocultos en desktop */
.half-stack--mobile {
	display: none;
}

/* ── Desktop: roles anclados al split vertical ── */
.hrole {
	display: flex;
	flex-direction: column;
	gap: 0.55em;
	font-size: clamp(8px, 1.2vw, 10px);
	font-weight: 400;
	letter-spacing: 5px;
	text-transform: uppercase;
	opacity: 0.45;
	transition: opacity 0.3s;
	margin: 0;
}

.hrole--desktop {
	position: absolute;
	top: calc(50% + var(--role-seam) + clamp(28px, 5vw, 52px));
}

.hh-dark .hrole--desktop {
	right: calc(50% + var(--role-seam));
	left: auto;
	align-items: flex-end;
	text-align: right;
	color: #fff;
	max-width: calc(50vw - var(--role-seam) - 8px);
}

.hh-light .hrole--desktop {
	left: calc(50% + var(--role-seam));
	right: auto;
	align-items: flex-start;
	text-align: left;
	color: #000;
	max-width: calc(50vw - var(--role-seam) - 8px);
}

.hrole-line {
	display: block;
	transition: letter-spacing 0.3s;
}

.hcorner {
	position: absolute;
	font-size: 9px;
	letter-spacing: 2px;
	text-transform: uppercase;
	opacity: 0.2;
	font-weight: 400;
	transition: opacity 0.3s;
}

.hh-dark .hcorner {
	bottom: max(20px, env(safe-area-inset-bottom, 0px));
	left: max(16px, env(safe-area-inset-left, 0px));
	color: #fff;
}

.hh-light .hcorner {
	bottom: max(20px, env(safe-area-inset-bottom, 0px));
	right: max(16px, env(safe-area-inset-right, 0px));
	color: #000;
	text-align: right;
}

.henter {
	position: absolute;
	bottom: max(20px, env(safe-area-inset-bottom, 0px));
	font-size: 9px;
	letter-spacing: 3px;
	text-transform: uppercase;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s, transform 0.2s;
}

.hh-dark .henter {
	color: rgba(255, 255, 255, 0.55);
	right: max(16px, env(safe-area-inset-right, 0px));
}

.hh-light .henter {
	color: rgba(0, 0, 0, 0.45);
	left: max(16px, env(safe-area-inset-left, 0px));
}

@media (hover: hover) {
	.home-split:hover .hh-dark:hover {
		width: 58%;
	}

	.home-split:hover .hh-dark:hover ~ .hh-light {
		width: 42%;
	}

	.home-split:hover .hh-light:hover {
		width: 58%;
	}

	.home-split:hover .hh-dark:has(~ .hh-light:hover) {
		width: 42%;
	}

	.home-split:hover .home-name {
		transform: translate(-50%, -50%) scale(1.03);
	}

	.home-half:hover .hrole {
		opacity: 1;
	}

	.home-half:hover .hrole-line {
		letter-spacing: 7px;
	}

	.home-half:hover .hcorner {
		opacity: 0.5;
	}

	.home-half:hover .henter {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.prism {
		transition: none !important;
	}

	.home-half,
	.home-name,
	.hrole,
	.henter,
	.hcorner,
	.dir-hint,
	.face-panel__play-hint {
		transition: none !important;
		animation: none !important;
	}
}

/* ── Caras Dev / Música del prisma ── */
.face-panel {
	text-align: center;
	padding: clamp(72px, 12vh, 96px) clamp(24px, 6vw, 40px);
}

.face-panel__title {
	font-size: clamp(40px, 7vw, 72px);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
	margin: 0;
}

.face-panel__sub {
	font-size: 9px;
	letter-spacing: 5px;
	text-transform: uppercase;
	margin-top: 14px;
}

.face-panel--dev { color: #fff; }
.face-panel--dev .face-panel__sub { color: rgba(255, 255, 255, 0.25); }
.face-panel--music { color: #000; }
.face-panel--music .face-panel__sub { color: rgba(0, 0, 0, 0.25); }
.face-panel--music { position: relative; }

.face-panel__tags {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 28px;
}

.face-panel__tag {
	font-size: 8px;
	letter-spacing: 2px;
	text-transform: uppercase;
	padding: 5px 10px;
	border-radius: 2px;
	border: 0.5px solid rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.3);
}

.face-panel__link {
	display: inline-block;
	margin-top: 20px;
	font-size: 9px;
	letter-spacing: 2px;
	text-transform: uppercase;
	text-decoration: none;
	opacity: 0.35;
	color: rgba(255, 255, 255, 0.7);
}

.face-panel--music .face-panel__link {
	color: rgba(0, 0, 0, 0.6);
}

.face-panel__stage {
	position: relative;
	width: min(480px, 82vw);
	height: clamp(180px, 28vh, 240px);
	margin-top: 28px;
	transform: translateZ(1px);
	transform-style: flat;
	cursor: grab;
	touch-action: none;
}

.face-panel__stage.is-drag {
	cursor: grabbing;
}

.face-panel__stage canvas {
	display: block;
	width: 100% !important;
	height: 100% !important;
}

.face-panel__stage--fallback {
	background: linear-gradient(to top, rgba(94, 207, 191, 0.12), transparent);
	border-radius: 4px;
}

.face-panel__play-hint {
	margin-top: 14px;
	font-size: 9px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: rgba(17, 17, 17, 0.48);
	animation: face-play-hint 2.4s ease-in-out infinite;
	transition: opacity 0.4s;
}

.face-panel__play-dot {
	display: inline-block;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #5ecfbf;
	margin-right: 8px;
	vertical-align: middle;
	box-shadow: 0 0 6px rgba(94, 207, 191, 0.45);
}

.face-panel__play-hint.is-hidden {
	opacity: 0;
	pointer-events: none;
	animation: none;
}

@keyframes face-play-hint {
	0%, 100% { opacity: 0.55; }
	50% { opacity: 1; }
}

.face-panel__stage--fallback + .face-panel__play-hint {
	display: none;
}

.face-panel__bars {
	display: flex;
	align-items: flex-end;
	gap: 3px;
	justify-content: center;
	margin-top: 32px;
	height: 48px;
}

.face-panel__bar {
	width: 4px;
	background: #000;
	border-radius: 2px;
	opacity: 0.1;
}

.face-back {
	position: absolute;
	bottom: max(20px, env(safe-area-inset-bottom, 0px));
	font-size: 9px;
	letter-spacing: 3px;
	text-transform: uppercase;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	opacity: 0.25;
	color: #fff;
	right: max(16px, env(safe-area-inset-right, 0px));
}

.face-back--light {
	color: #000;
	left: max(16px, env(safe-area-inset-left, 0px));
	right: auto;
}

.nav-dots {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 20;
}

.dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	cursor: pointer;
	border: none;
	padding: 0;
}

.prism-root[data-prism-current="2"] .dot {
	background: rgba(0, 0, 0, 0.15);
}

.dot.is-active {
	background: rgba(255, 255, 255, 0.75);
	transform: scale(1.4);
}

.prism-root[data-prism-current="2"] .dot.is-active {
	background: rgba(0, 0, 0, 0.55);
}

.swipe-hint {
	position: absolute;
	bottom: 44px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 8px;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.18);
	z-index: 20;
	pointer-events: none;
	margin: 0;
}

.prism-root[data-prism-current="2"] .swipe-hint {
	color: rgba(0, 0, 0, 0.2);
}

.swipe-hint.hidden {
	opacity: 0;
}

/* ── Mobile: split horizontal, layout propio ── */
@media (max-width: 768px) {
	.home-split {
		flex-direction: column;
	}

	.home-half {
		width: 100%;
		height: 50%;
	}

	/* Ocultar capa desktop */
	.home-name,
	.hrole--desktop,
	.hcorner,
	.henter,
	.landing-header--desktop {
		display: none !important;
	}

	/* Header móvil — siempre visible, sutil */
	.landing-header-mobile {
		display: flex;
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		z-index: 40;
		align-items: center;
		justify-content: space-between;
		padding: 12px 18px;
		background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
		pointer-events: all;
	}

	.landing-header-mobile .landing-header__logo {
		color: rgba(255, 255, 255, 0.45);
	}

	.landing-header-mobile .hpill {
		font-size: 8px;
		padding: 4px 10px;
	}

	/* Flechas: línea propia antes (arriba) / después (abajo) del texto */
	.stack-group {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: clamp(8px, 2.5vw, 12px);
		align-self: center;
	}

	.stack-group .hrole {
		align-items: center;
		text-align: center;
	}

	.dir-hint {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
		opacity: 0.4;
		animation: hint-pulse 2.8s ease-in-out infinite;
	}

	.hh-dark .dir-hint {
		color: #fff;
	}

	.hh-light .dir-hint {
		color: #000;
	}

	@keyframes hint-pulse {
		0%, 100% { opacity: 0.35; transform: translateX(0); }
		50% { opacity: 0.65; transform: translateX(-3px); }
	}

	.dir-hint--right {
		animation-name: hint-pulse-right;
	}

	@keyframes hint-pulse-right {
		0%, 100% { opacity: 0.35; transform: translateX(0); }
		50% { opacity: 0.65; transform: translateX(3px); }
	}

	/* Mostrar stacks móvil */
	.half-stack--mobile {
		display: flex;
		flex-direction: column;
		align-items: center;
		text-align: center;
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		gap: clamp(14px, 4vw, 24px);
	}

	/* Mitad negra: roles pegados arriba de Eze (espejo de abajo) */
	.half-stack--top {
		justify-content: flex-end;
		padding: clamp(48px, 10vh, 64px) clamp(20px, 6vw, 32px) clamp(20px, 5vh, 36px);
	}

	/* Mitad blanca: Vallejo + roles hacia abajo */
	.half-stack--bottom {
		justify-content: flex-start;
		padding: clamp(20px, 5vh, 36px) clamp(20px, 6vw, 32px) clamp(28px, 8vh, 48px);
	}

	.hname--solo {
		font-size: clamp(48px, 15vw, 80px);
		font-weight: 700;
		letter-spacing: 0.05em;
		line-height: 1.05;
		flex-shrink: 0;
		align-self: center;
	}

	.hh-dark .hname--solo {
		color: #fff;
	}

	.hh-light .hname--solo {
		color: #000;
	}

	.half-stack--mobile .hrole {
		position: static;
		font-size: clamp(10px, 3vw, 13px);
		letter-spacing: 3px;
		gap: 0.7em;
		opacity: 0.65;
		max-width: none;
		align-items: center;
		text-align: center;
	}

	.hh-dark .half-stack--mobile .hrole {
		color: #fff;
	}

	.hh-light .half-stack--mobile .hrole {
		color: #000;
	}
}

@media (max-width: 480px) {
	.hname--solo {
		font-size: clamp(42px, 14vw, 64px);
	}

	.half-stack--mobile .hrole {
		font-size: clamp(9px, 2.8vw, 12px);
		letter-spacing: 2.5px;
	}
}

@media (max-width: 360px) {
	.hname--solo {
		font-size: clamp(36px, 12vw, 52px);
	}
}

@media (hover: none) and (min-width: 769px) {
	.hrole {
		opacity: 0.6;
	}

	.home-half:active .hrole {
		opacity: 1;
	}
}
