/**
 * Puntos Ya – Hero 3D (Elementor widget)
 * Glassmorphism sobre gradiente naranja + escena Three.js.
 * El gradiente y los colores de texto se sobreescriben desde los
 * controles del widget vía variables CSS (--py-g1/2/3) y selectores.
 */

.py-hero3d {
	position: relative;
	/* full-bleed aunque la sección de Elementor sea "boxed" */
	width: 100vw;
	margin-left: calc(50% - 50vw);
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	overflow: hidden;
	padding: calc(var(--header-offset, 88px) + 16px) 24px 72px;
	/* gradiente detrás del vidrio (default = el del footer del theme) */
	background: linear-gradient(
		160deg,
		var(--py-g1, #f07a1f) 0%,
		var(--py-g2, #E85D04) 40%,
		var(--py-g3, #d95407) 70%,
		var(--py-g4, #c44d03) 100%
	);
}

/* ── Fondo animado: blobs que derivan tras el vidrio ────────────────────── */
.py-hero3d__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	overflow: hidden;
	pointer-events: none;
}
.py-hero3d__blob {
	position: absolute;
	display: block;
	border-radius: 50%;
	filter: blur(90px);
	will-change: transform;
}
.py-hero3d__blob--1 {
	width: 55vw;
	height: 55vw;
	top: -22%;
	right: -12%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 65%);
	animation: py-hero3d-drift-1 26s ease-in-out infinite alternate;
}
.py-hero3d__blob--2 {
	width: 46vw;
	height: 46vw;
	bottom: -26%;
	left: -14%;
	background: radial-gradient(circle, rgba(80, 26, 0, 0.28), rgba(80, 26, 0, 0) 65%);
	animation: py-hero3d-drift-2 34s ease-in-out infinite alternate;
}
.py-hero3d__blob--3 {
	width: 36vw;
	height: 36vw;
	top: 28%;
	left: 38%;
	background: radial-gradient(circle, rgba(255, 196, 150, 0.22), rgba(255, 196, 150, 0) 65%);
	animation: py-hero3d-drift-3 44s ease-in-out infinite alternate;
}
@keyframes py-hero3d-drift-1 {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(-7%, 9%, 0) scale(1.12); }
}
@keyframes py-hero3d-drift-2 {
	from { transform: translate3d(0, 0, 0) scale(1.08); }
	to   { transform: translate3d(8%, -7%, 0) scale(0.96); }
}
@keyframes py-hero3d-drift-3 {
	from { transform: translate3d(0, 0, 0) scale(1); }
	to   { transform: translate3d(10%, 6%, 0) scale(1.18); }
}

/* ── Escena 3D (por delante de la tipografía) ───────────────────────────── */
.py-hero3d__scene {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	z-index: 3;
	display: block;
	pointer-events: none;
}

/* ── Contenido ──────────────────────────────────────────────────────────── */
.py-hero3d__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--container-max, 1200px);
	margin: 0 auto;
	text-align: left;
	pointer-events: none;
}
.py-hero3d__inner { max-width: 520px; }

.py-hero3d__title {
	margin: 0;
	font-size: clamp(38px, 4.6vw, 76px);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.04em;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 2px 18px rgba(120, 45, 0, 0.25);
}
.py-hero3d__title .line {
	display: block;
	overflow: hidden;
	padding: 0.05em 0;
	white-space: nowrap;
}
.py-hero3d__title .char {
	display: inline-block;
	will-change: transform;
}
.py-hero3d__title .line--accent { color: #ffe3cd; }

.py-hero3d__sub {
	margin: 24px 0 0;
	max-width: 460px;
	font-size: clamp(15px, 1.6vw, 18px);
	line-height: 1.6;
	color: rgba(255, 248, 242, 0.95);
	text-shadow: 0 1px 10px rgba(120, 45, 0, 0.2);
}

.py-hero3d__ctas {
	margin-top: 36px;
	display: flex;
	gap: 14px;
	justify-content: flex-start;
	flex-wrap: wrap;
	pointer-events: auto;
}
/* botón estático: sin hover, sin transiciones */
.py-hero3d__btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 16px 30px;
	border-radius: 12px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	background: #fff;
	color: var(--color-orange-dark, #c44d03);
	border: 0;
	box-shadow: 0 8px 24px rgba(90, 30, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ── Loader: cubre TODA la pantalla; el logo pasa de B/N al color ───────── */
.py-hero3d__intro {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.py-hero3d__intro img {
	height: 56px;
	width: auto;
	filter: grayscale(100%);
	transition: filter 0.35s ease;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
	.py-hero3d { align-items: flex-start; }
	.py-hero3d__content { margin-top: 2vh; }
	.py-hero3d__inner { max-width: 560px; }
	.py-hero3d__title { font-size: clamp(40px, 9.5vw, 72px); }
}
@media (max-width: 767px) {
	.py-hero3d__sub { max-width: 90%; }
	.py-hero3d__btn { padding: 14px 24px; font-size: 0.9375rem; }
}

@media (prefers-reduced-motion: reduce) {
	.py-hero3d__blob { animation: none; }
}
