/* ==========================================================================
   Digital Space — Hero de inicio
   Fondo de partículas 3D (canvas Three.js) + contenido animado (GSAP).
   ========================================================================== */

.ds-hero {
	position: relative;
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: transparent;       /* el fondo espacial global se ve detrás */
	color: var(--ds-text, #f3eefb);
	text-align: center;
	padding: clamp(5rem, 10vh, 7rem) 1.25rem clamp(3.5rem, 8vh, 5rem);
	isolation: isolate;
	z-index: 1;
}

/* Canvas de partículas: un poco más alto que el hero para que el parallax
   (que lo desplaza hacia abajo) no deje un hueco arriba. */
.ds-hero__canvas {
	position: absolute;
	left: 0;
	top: -12%;
	width: 100%;
	height: 124%;
	z-index: 1;
	display: block;
	will-change: transform;
}

/* Glow morado que "respira" detrás del título. */
.ds-hero__glow {
	position: absolute;
	top: 42%;
	left: 50%;
	width: min(70vw, 760px);
	height: min(70vw, 760px);
	transform: translate(-50%, -50%);
	background: radial-gradient(circle, rgba(160, 32, 240, 0.35) 0%, rgba(160, 32, 240, 0.10) 40%, transparent 70%);
	filter: blur(20px);
	z-index: 0;
	pointer-events: none;
	animation: ds-breathe 7s ease-in-out infinite;
}
/* En tema claro el glow morado se atenúa para no ensuciar el blanco. */
:root[data-theme="light"] .ds-hero__glow { opacity: 0.3; mix-blend-mode: multiply; }

@keyframes ds-breathe {
	0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
	50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.12); }
}

.ds-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 880px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: clamp(1rem, 2.2vh, 1.4rem);
	will-change: transform, opacity;
}

/* Badge */
.ds-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.5rem 1.1rem;
	border: 1px solid rgba(212, 0, 255, 0.45);
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ds-text-dim, #b6a9c9);
	background: rgba(160, 32, 240, 0.08);
	backdrop-filter: blur(4px);
}
.ds-hero__badge-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ds-magenta, #d400ff);
	box-shadow: 0 0 10px 2px rgba(212, 0, 255, 0.8);
	animation: ds-pulse 2s ease-in-out infinite;
}
@keyframes ds-pulse {
	0%, 100% { transform: scale(1);   opacity: 1; }
	50%      { transform: scale(1.4); opacity: 0.6; }
}

/* Título */
.ds-hero__title {
	margin: 0;
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.02em;
	font-size: clamp(2.1rem, 5.5vw, 4.4rem);
}
.ds-hero__line {
	display: block;
}
.ds-hero__line--grad {
	background: linear-gradient(100deg, var(--ds-violet, #7b2ff7) 0%, var(--ds-magenta, #d400ff) 55%, #ff6ad5 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	/* Evita que se recorten descendentes (la colita de la "g"). */
	padding-bottom: 0.12em;
}

/* Subtítulo */
.ds-hero__subtitle {
	margin: 0;
	max-width: 620px;
	font-size: clamp(1rem, 1.6vw, 1.18rem);
	line-height: 1.6;
	color: var(--ds-text-dim, #b6a9c9);
}

/* Botones */
.ds-hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.9rem;
	justify-content: center;
	margin-top: 0.4rem;
}
.ds-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.95rem 1.9rem;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.98rem;
	text-decoration: none;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
	will-change: transform;
}
.ds-btn--primary {
	color: #fff;
	background: linear-gradient(100deg, var(--ds-purple, #a020f0), var(--ds-magenta, #d400ff));
	box-shadow: 0 10px 30px -8px rgba(212, 0, 255, 0.6);
}
.ds-btn--primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 40px -8px rgba(212, 0, 255, 0.8);
}
.ds-btn--ghost {
	color: var(--ds-text, #f3eefb);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.18);
}
.ds-btn--ghost:hover {
	transform: translateY(-3px);
	border-color: rgba(212, 0, 255, 0.6);
	background: rgba(160, 32, 240, 0.12);
}

/* Stats */
.ds-hero__stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(1.5rem, 5vw, 3.5rem);
	margin-top: 2.2rem;
	padding-top: 2rem;
	border-top: 1px solid var(--ds-line, rgba(255, 255, 255, 0.08));
	width: 100%;
	max-width: 720px;
}
.ds-stat__value {
	font-size: clamp(1.8rem, 3.5vw, 2.6rem);
	font-weight: 800;
	background: linear-gradient(180deg, #fff, var(--ds-magenta, #d400ff));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	line-height: 1;
}
.ds-stat__label {
	margin-top: 0.5rem;
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ds-text-dim, #b6a9c9);
}

/* Indicador de scroll */
.ds-hero__scroll {
	position: absolute;
	bottom: 1.6rem;
	left: 50%;
	transform: translateX(-50%);
	width: 26px;
	height: 42px;
	border: 2px solid rgba(255, 255, 255, 0.25);
	border-radius: 999px;
	z-index: 2;
	display: flex;
	justify-content: center;
	padding-top: 7px;
}
.ds-hero__scroll-dot {
	width: 4px;
	height: 8px;
	border-radius: 999px;
	background: var(--ds-magenta, #d400ff);
	animation: ds-scroll 1.8s ease-in-out infinite;
}
@keyframes ds-scroll {
	0%   { opacity: 0; transform: translateY(-4px); }
	40%  { opacity: 1; }
	100% { opacity: 0; transform: translateY(12px); }
}

/* Bolita blanca que sigue el cursor (mueve las partículas). */
.ds-hero__cursor {
	position: absolute;
	top: 0;
	left: 0;
	width: 54px;
	height: 54px;
	margin: -27px 0 0 -27px; /* centrar respecto al puntero */
	border-radius: 50%;
	pointer-events: none;
	z-index: 3;
	opacity: 0;
	transition: opacity 0.3s ease;
	background: radial-gradient(circle, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.25) 40%, transparent 70%);
	box-shadow: 0 0 24px 6px rgba(212, 0, 255, 0.45);
	mix-blend-mode: screen;
}

/* Estado inicial para la animación de entrada (GSAP quita esto). */
.ds-hero [data-anim] {
	opacity: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet */
@media (max-width: 900px) {
	.ds-hero__stats {
		gap: 1.5rem 2.2rem;
		margin-top: 1.8rem;
		padding-top: 1.6rem;
	}
}

/* Móvil */
@media (max-width: 600px) {
	.ds-hero {
		min-height: 100svh;
		padding: 5rem 1.1rem 3.5rem;
	}
	.ds-hero__subtitle {
		font-size: 0.98rem;
	}
	.ds-hero__cta {
		width: 100%;
	}
	.ds-btn {
		flex: 1 1 auto;
		justify-content: center;
		padding: 0.85rem 1.2rem;
	}
	/* Stats 2x2 en móvil para que no se apretujen */
	.ds-hero__stats {
		gap: 1.4rem 1rem;
	}
	.ds-stat {
		flex: 1 1 40%;
		min-width: 120px;
	}
	.ds-stat__value {
		font-size: 1.7rem;
	}
}

/* Móvil pequeño */
@media (max-width: 380px) {
	.ds-hero__badge {
		font-size: 0.62rem;
		letter-spacing: 0.12em;
	}
}

/* Accesibilidad: respetar "reduce motion". */
@media (prefers-reduced-motion: reduce) {
	.ds-hero [data-anim] { opacity: 1; }
	.ds-hero__glow,
	.ds-hero__badge-dot,
	.ds-hero__scroll-dot { animation: none; }
}
