/* ==========================================================================
   Digital Space — Página "Nosotros"
   Hero + Nuestro ADN + Tech Stack + Huella Global
   ========================================================================== */

/* Texto con degradado de marca (reutilizable) */
.ds-grad {
	background: linear-gradient(100deg, var(--ds-violet, #7b2ff7), var(--ds-magenta, #d400ff) 60%, #ff6ad5);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
	padding-bottom: 0.1em;
}

/* Pastilla / badge */
.ds-pill {
	display: inline-flex; align-items: center; gap: 0.55rem;
	padding: 0.5rem 1.1rem; border-radius: 999px;
	font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
	color: var(--ds-text-dim); background: rgba(160,32,240,0.1); border: 1px solid rgba(212,0,255,0.4);
}
.ds-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-magenta); box-shadow: 0 0 10px 2px rgba(212,0,255,0.8); }

/* Título de sección con línea de degradado */
.ds-h2--line { position: relative; padding-bottom: 0.7rem; margin-bottom: 2.5rem; }
.ds-h2--line::after {
	content: ""; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
	width: 70px; height: 3px; border-radius: 3px;
	background: linear-gradient(90deg, var(--ds-violet), var(--ds-magenta));
}

/* ----------------------------- HERO (estilo inicio, partículas a la derecha) */
.ds-aphero {
	position: relative;
	min-height: 86vh; min-height: 86svh;
	display: flex; align-items: center; overflow: hidden;
}
/* Canvas de partículas ocupa la mitad derecha */
.ds-aphero__canvas {
	position: absolute; top: 0; right: 0;
	width: 56%; height: 100%; z-index: 0; display: block;
}
.ds-aphero__grid { position: relative; z-index: 2; width: 100%; }
.ds-aphero__content { max-width: 620px; }
.ds-aphero__title { margin: 1.3rem 0; font-size: clamp(2.1rem, 5vw, 3.8rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.ds-aphero__text { max-width: 540px; color: var(--ds-text-dim); line-height: 1.7; margin: 0 0 1.9rem; }

@media (max-width: 820px) {
	.ds-aphero { min-height: auto; padding-block: clamp(4rem, 12vh, 7rem); text-align: center; }
	.ds-aphero__canvas { width: 100%; opacity: 0.5; }   /* detrás del texto en móvil */
	.ds-aphero__content { max-width: none; margin: 0 auto; }
	.ds-aphero__text { margin-inline: auto; }
	.ds-pill { margin: 0 auto; }
}

/* ----------------------------- ADN ----------------------------- */
.ds-adn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.ds-adn {
	padding: 2rem 1.7rem; border-radius: 20px; text-align: left;
	background: var(--ds-card); border: 1px solid var(--ds-line);
	transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.ds-adn:hover { transform: translateY(-6px); border-color: rgba(212,0,255,0.45); box-shadow: 0 22px 50px -26px rgba(212,0,255,0.7); }
.ds-adn__icon {
	display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px;
	border-radius: 15px; margin-bottom: 1.2rem; color: #fff;
	background: linear-gradient(150deg, var(--ds-purple), var(--ds-magenta));
	box-shadow: 0 12px 28px -10px rgba(212,0,255,0.8);
}
.ds-adn__icon svg { width: 28px; height: 28px; }
.ds-adn__title { margin: 0 0 0.6rem; font-size: 1.3rem; font-weight: 700; }
.ds-adn__text { margin: 0; color: var(--ds-text-dim); line-height: 1.6; }

/* -------------------- LÍNEA DE TIEMPO HORIZONTAL (scroll-driven) ----------- */
.ds-tl-sec { padding-block: 0; overflow: visible; }
.ds-htl-scroll { position: relative; height: 360vh; }       /* alto = rango de scroll */
.ds-htl-sticky {
	position: sticky; top: 0; min-height: 100vh;
	display: flex; flex-direction: column; justify-content: center; gap: 2.2rem;
	padding: 3rem 1.25rem;
}
.ds-htl {
	margin-top: 1rem; overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 97%, transparent);
	        mask-image: linear-gradient(90deg, transparent, #000 4%, #000 97%, transparent);
}
/* Padding lateral pequeño: al final el último hito queda PEGADO a la derecha
   (no centrado), sin dejar espacio vacío. */
.ds-htl__track { position: relative; width: max-content; padding: 0 3.5vw; will-change: transform; }
.ds-htl__line {
	position: absolute; top: 50%; left: 0; right: 0; height: 2px; transform: translateY(-50%);
	background: var(--ds-line); border-radius: 2px; overflow: hidden;
}
.ds-htl__progress {
	display: block; height: 100%; width: 0%;
	background: linear-gradient(90deg, var(--ds-violet), var(--ds-magenta));
	box-shadow: 0 0 10px rgba(212,0,255,0.7); transition: width 0.18s linear;
}
.ds-htl__items { display: flex; }
.ds-htl__item { flex: 0 0 300px; position: relative; height: 440px; }
/* Nodo sobre la línea (centro vertical) */
.ds-htl__node {
	position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
	width: 16px; height: 16px; border-radius: 50%; z-index: 2;
	background: var(--ds-bg-2); border: 2px solid var(--ds-magenta);
	transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.ds-htl__box {
	position: absolute; left: 50%; width: 88%; max-width: 250px; transform: translateX(-50%);
	text-align: center; padding: 1.2rem 1.3rem; border-radius: 16px;
	background: var(--ds-card); border: 1px solid var(--ds-line);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	box-shadow: 0 18px 40px -24px rgba(0,0,0,0.6);
	opacity: 0; transition: opacity 0.5s ease, transform 0.5s ease;
}
/* Tallo que conecta el nodo con la caja */
.ds-htl__box::after {
	content: ""; position: absolute; left: 50%; width: 2px; height: 26px;
	background: linear-gradient(var(--ds-magenta), transparent); transform: translateX(-50%);
}
.ds-htl__item--up .ds-htl__box   { bottom: calc(50% + 30px); transform: translateX(-50%) translateY(-12px); }
.ds-htl__item--down .ds-htl__box { top: calc(50% + 30px);    transform: translateX(-50%) translateY(12px); }
.ds-htl__item--up .ds-htl__box::after   { bottom: -26px; }
.ds-htl__item--down .ds-htl__box::after { top: -26px; }

.ds-htl__item.is-active .ds-htl__node { background: var(--ds-magenta); box-shadow: 0 0 16px 3px rgba(212,0,255,0.85); }
.ds-htl__item.is-active .ds-htl__box  { opacity: 1; transform: translateX(-50%) translateY(0); }

.ds-htl__year {
	font-size: 1.4rem; font-weight: 800;
	background: linear-gradient(100deg, var(--ds-violet), var(--ds-magenta));
	-webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.ds-htl__title { margin: 0.3rem 0 0.4rem; font-size: 1.02rem; font-weight: 700; }
.ds-htl__text { margin: 0; color: var(--ds-text-dim); line-height: 1.5; font-size: 0.82rem; }

/* ----------------------------- TECH STACK (carrusel infinito) --------- */
.ds-techmq {
	display: flex; flex-direction: column; gap: 1rem; margin-top: 2.5rem;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	        mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ds-techmq { display: flex; flex-direction: column; gap: 1.2rem; }
.ds-techmq__row { display: flex; gap: 1.1rem; width: max-content; animation: ds-techscroll 60s linear infinite; }
.ds-techmq__row--rev { animation-duration: 72s; animation-direction: reverse; }
.ds-techmq:hover .ds-techmq__row { animation-play-state: paused; }
@keyframes ds-techscroll { to { transform: translateX(-50%); } }

.ds-techchip {
	flex: 0 0 auto; display: inline-flex; align-items: center; gap: 0.85rem;
	padding: 0.8rem 1.7rem 0.8rem 1.1rem; border-radius: 16px;
	background: var(--ds-card); border: 1px solid var(--ds-line);
	font-weight: 600; font-size: 1.08rem; color: var(--ds-text); white-space: nowrap;
	transition: border-color 0.25s ease, transform 0.25s ease;
}
.ds-techchip:hover { border-color: var(--ds-magenta); transform: translateY(-3px); }
.ds-techchip__logo { width: 38px; height: 38px; object-fit: contain; }

/* ----------------------------- HUELLA GLOBAL ----------------------------- */
.ds-huella__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.ds-huella__text { color: var(--ds-text-dim); line-height: 1.7; margin: 1rem 0 2rem; }
.ds-huella__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.5rem; }
.ds-huella__list li { display: flex; align-items: center; gap: 0.6rem; color: var(--ds-text); font-weight: 500; }
.ds-pin { display: inline-flex; color: var(--ds-magenta); }
.ds-pin svg { width: 18px; height: 18px; }

/* Mapa (Américas) con efecto glass — el astronauta detrás se ve borroso */
.ds-worldmap {
	position: relative; width: 100%; aspect-ratio: 9 / 7;
	border-radius: 22px; overflow: hidden;
	background: var(--ds-card);                 /* sin cuadrícula, adaptable al tema */
	border: 1px solid rgba(212,0,255,0.22);
	-webkit-backdrop-filter: blur(8px);
	        backdrop-filter: blur(8px);
	box-shadow: 0 30px 70px -40px rgba(160,32,240,0.7);
}
.ds-worldmap__img {
	position: absolute; inset: 0; width: 100%; height: 100%;
	object-fit: fill; opacity: 0.92;  /* fill = los marcadores quedan alineados a cualquier proporción */
}
/* Marcadores: % alineados al viewBox del mapa. */
.ds-marker { position: absolute; transform: translate(-50%, -50%); z-index: 2; }
.ds-marker--main .ds-marker__dot { width: 15px; height: 15px; box-shadow: 0 0 14px 4px rgba(212,0,255,0.95); }
.ds-marker--main .ds-marker__label { opacity: 1; transform: translateX(-50%); border-color: var(--ds-magenta); }
.ds-marker__dot {
	display: block; width: 10px; height: 10px; border-radius: 50%;
	background: var(--ds-magenta); box-shadow: 0 0 8px 2px rgba(212,0,255,0.8);
	animation: ds-ping 2.2s ease-out infinite;
}
@keyframes ds-ping {
	0%   { box-shadow: 0 0 0 0 rgba(212,0,255,0.6), 0 0 8px 2px rgba(212,0,255,0.8); }
	70%  { box-shadow: 0 0 0 13px rgba(212,0,255,0), 0 0 8px 2px rgba(212,0,255,0.8); }
	100% { box-shadow: 0 0 0 0 rgba(212,0,255,0), 0 0 8px 2px rgba(212,0,255,0.8); }
}
.ds-marker__label {
	position: absolute; bottom: 160%; left: 50%; transform: translateX(-50%) translateY(6px);
	white-space: nowrap; display: flex; flex-direction: column; align-items: center; gap: 1px;
	background: var(--ds-bg-2); padding: 6px 11px; border-radius: 9px;
	border: 1px solid rgba(212,0,255,0.4); box-shadow: 0 10px 24px -10px rgba(0,0,0,0.6);
	opacity: 0; transition: opacity 0.22s ease, transform 0.22s ease; pointer-events: none; z-index: 3;
}
.ds-marker__label strong { font-size: 0.72rem; color: var(--ds-text); }
.ds-marker__label em { font-style: normal; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ds-magenta); }
.ds-marker:hover .ds-marker__label, .ds-marker:focus .ds-marker__label { opacity: 1; transform: translateX(-50%) translateY(0); }
.ds-marker:hover .ds-marker__dot { transform: scale(1.4); }

/* Arcos animados entre sedes */
.ds-worldmap__arcs { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.ds-worldmap__arcs path {
	fill: none; stroke: var(--ds-magenta); stroke-width: 1.4; stroke-opacity: 0.65;
	stroke-dasharray: 5 5; vector-effect: non-scaling-stroke;
	animation: ds-arcflow 1.2s linear infinite;
}
@keyframes ds-arcflow { to { stroke-dashoffset: -20; } }

@media (prefers-reduced-motion: reduce) {
	.ds-marker__dot, .ds-worldmap__arcs path { animation: none; }
}

/* ----------------------------- RESPONSIVE ----------------------------- */
@media (max-width: 980px) {
	.ds-aphero__stats { grid-template-columns: repeat(2, 1fr); }
	.ds-tech-grid { grid-template-columns: repeat(3, 1fr); }
	.ds-adn-grid { grid-template-columns: 1fr; }
	.ds-huella__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
	.ds-aphero__stats { grid-template-columns: 1fr 1fr; }
	.ds-tech-grid { grid-template-columns: repeat(2, 1fr); }
	.ds-huella__list { grid-template-columns: 1fr; }
}

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