/* =========================================================================
   Pulsoweb Landing — single pinned "stage" with stacked absolute layers.
   CSS holds the INITIAL cinematic state (only the hero shows); the GSAP
   master timeline drives every layer. (Desktop-first, motion required.)
   ========================================================================= */

/* ---- Lenis smooth-scroll (classes added to <html> by Lenis) ---- */
html.lenis,
html.lenis body {
	height: auto;
}
.lenis.lenis-smooth {
	scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
	overscroll-behavior: contain;
}
.lenis.lenis-stopped {
	overflow: hidden;
}
.lenis.lenis-smooth iframe {
	pointer-events: none;
}

.pulsoweb-root {
	--pulsoweb-bg-light: #f4f5f9;
	--pulsoweb-beige: #edeee0;
	--pulsoweb-green: #5fc590;
	--pulsoweb-dark: #1a1a1a;
	--pulsoweb-white: #ffffff;
	--pulsoweb-muted: #6b6b66;
	--pulsoweb-ink: #252525;
	--pulsoweb-navy: #001d3f;
	--pulsoweb-orange: #ff5c1a;

	--pulsoweb-radius-card: 22px;
	--pulsoweb-inset: clamp(10px, 1.1vw, 16px);
	--pulsoweb-pad: clamp(20px, 2.8vw, 40px);
	/* Plain px: the JS reads it with parseFloat() (a clamp() would be NaN). */
	--pulsoweb-card-gap: 24px;

	--pulsoweb-font-display:
		"Space Grotesk", "Geist", "Inter", system-ui, -apple-system, sans-serif;
	--pulsoweb-font-body: "Inter", system-ui, -apple-system, sans-serif;

	font-family: var(--pulsoweb-font-body);
	color: var(--pulsoweb-dark);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	line-height: 1.45;
	/* No background by default — set it from Elementor if you want one. */
}

.pulsoweb-root *,
.pulsoweb-root *::before,
.pulsoweb-root *::after {
	box-sizing: border-box;
}

.pulsoweb-root a {
	text-decoration: none;
	color: inherit;
}

/* =========================================================================
   STAGE + LAYERS
   ========================================================================= */

.pulsoweb-stage {
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
	/* No background by default — set it from Elementor if you want one. */
}

/* ---- layer 1: flower background card ---- */
.pulsoweb-bg {
	position: absolute;
	top: var(--pulsoweb-inset);
	right: var(--pulsoweb-inset);
	bottom: var(--pulsoweb-inset);
	left: var(--pulsoweb-inset);
	border-radius: 24px;
	overflow: hidden;
	z-index: 1;
	will-change: top, right, bottom, left, border-radius;
}

.pulsoweb-bg__img {
	position: absolute;
	inset: -8%;
	background-color: #2b4a6b;
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	will-change: filter, transform;
}

/* foto de escritorio (y fallback en móvil si no hay imagen móvil) */
.pulsoweb-bg__img--photo {
	background-image: var(--pulsoweb-hero-bg);
}

/* overlay de color configurable desde Elementor (color + opacidad) */
.pulsoweb-bg__overlay {
	position: absolute;
	inset: 0;
	background-color: #000000;
	opacity: 0.35;
	pointer-events: none;
}

/* gradient fallback flower (until a real photo is set) */
.pulsoweb-bg__img:not(.pulsoweb-bg__img--photo):not(.pulsoweb-bg__img--photo-mobile) {
	background-image:
		radial-gradient(
			55% 50% at 50% 50%,
			rgba(255, 160, 100, 0.9) 0%,
			rgba(255, 110, 70, 0.5) 32%,
			rgba(70, 110, 160, 0.1) 60%,
			transparent 75%
		),
		linear-gradient(160deg, #4a7bb0 0%, #2c4a6e 55%, #1f3550 100%);
}

.pulsoweb-bg__dark {
	position: absolute;
	inset: 0;
	background: #0a1420;
	opacity: 0; /* JS fades in */
	will-change: opacity;
}

/* ---- layer 2: hero content ---- */
.pulsoweb-hero {
	position: absolute;
	top: var(--pulsoweb-inset);
	right: var(--pulsoweb-inset);
	bottom: var(--pulsoweb-inset);
	left: var(--pulsoweb-inset);
	z-index: 3;
	padding: var(--pulsoweb-pad);
	/* Alinea el texto con el margen izquierdo del contenido del sitio (caja
	   de 1280px centrada) y con la píldora del header. El % del padding se
	   resuelve contra el ancho del stage (100% del viewport); se resta el
	   inset porque el hero ya está desplazado. Por debajo de 1328px queda
	   en 24px (el padding lateral de los contenedores). Móvil: ver media. */
	padding-inline: calc(max(24px, (100% - 1280px) / 2) - var(--pulsoweb-inset));
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: clamp(40px, 8vh, 120px);
	color: var(--pulsoweb-white);
	will-change: transform, opacity;
}

/* readability gradient top + bottom */
.pulsoweb-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	/*background:
		linear-gradient(180deg, rgba(10, 20, 35, 0.4) 0%, transparent 26%),
		linear-gradient(0deg, rgba(10, 20, 35, 0.4) 0%, transparent 30%);*/
	pointer-events: none;
	z-index: -1;
	border-radius: 24px;
}

.pulsoweb-hero__top {
	max-width: 760px;
	padding-top: 65px;
}

.pulsoweb-hero__title {
	font-family: var(--pulsoweb-font-display);
	font-weight: 500;
	font-size: clamp(2.4rem, 4.24vw, 3.8125rem);
	line-height: 1.1;
	letter-spacing: 0;
	margin: 0;
	padding-top: clamp(25px, 2.95vw, 42px);
	color: var(--pulsoweb-white);
}

.pulsoweb-hero__subtitle {
	margin: clamp(16px, 2.2vw, 32px) 0 0;
	font-size: clamp(1rem, 1.27vw, 1.25rem);
	line-height: 1.4;
	max-width: 34.5em;
	color: rgba(255, 255, 255, 0.88);
}
@media (max-width: 767px) {
    .pulsoweb-hero__subtitle {
        display: none !important;
    }
    .pulsoweb-hero__title {
        font-size: 30px;
    }
}

.pulsoweb-hero__buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-top: 22px;
}

.pulsoweb-btn {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--pulsoweb-font-display);
	font-weight: 500;
	font-size: 1rem;
	letter-spacing: -0.01em;
	border-radius: 999px;
	padding: 14px 22px;
	transition:
		transform 0.2s ease,
		background-color 0.2s ease;
}

.pulsoweb-btn--green {
	background: var(--pulsoweb-green);
	color: var(--pulsoweb-dark);
	padding-right: 8px;
}

.pulsoweb-btn--green .pulsoweb-btn__dot {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--pulsoweb-white);
	display: inline-block;
}

.pulsoweb-btn--ghost {
	background: rgba(255, 255, 255, 0.12);
	color: var(--pulsoweb-white);
	border: 1px solid rgba(255, 255, 255, 0.35);
	backdrop-filter: blur(6px);
}

.pulsoweb-arrow {
	font-size: 1.1em;
	line-height: 1;
}

/* Single "Cuéntanos tu proyecto" CTA with diagonal arrow-swap on hover.
   Colours are driven by CSS custom properties set inline from Elementor,
   with sensible fallbacks so the button also works via the shortcode. */
.pulsoweb-btn--project {
	background: var(--btn-bg, transparent);
	color: var(--btn-text, #ffffff);
	border: 1px solid var(--btn-border, rgba(255, 255, 255, 0.35));
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	padding: 3px 3px 3px 23px;
	gap: 10px;
	transition:
		background-color 0.35s ease,
		border-color 0.35s ease;
}

.pulsoweb-btn--project:hover {
	background: var(--btn-bg-hover, #ff4f18);
	border-color: transparent;
}

.pulsoweb-btn--project .pulsoweb-btn__label {
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1;
}

/* White pill: clips the arrows as they slide in/out */
.pulsoweb-btn__circle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--pill-bg, #ffffff);
	overflow: hidden;
}

/* Rotated -45deg so a right-pointing arrow reads as up-right,
   and a plain translateX becomes travel along the diagonal axis. */
.pulsoweb-btn__arrows {
	position: relative;
	width: 20px;
	height: 20px;
	transform: rotate(-45deg);
}

.pulsoweb-btn__arrow {
	position: absolute;
	top: 0;
	left: 0;
	width: 20px;
	height: 20px;
	fill: var(--arrow-color, #ff4f18);
	transition: transform 0.38s ease;
}

/* Second arrow waits fully outside the pill (down-left, local -X). The 200%
   offset keeps it clear of the circular clip so it never peeks at the edge. */
.pulsoweb-btn__arrow:nth-child(2) {
	transform: translateX(-200%);
}

/* On hover: arrow 1 exits up-right, arrow 2 slides into its place. */
.pulsoweb-btn--project:hover .pulsoweb-btn__arrow:nth-child(1) {
	transform: translateX(200%);
}

.pulsoweb-btn--project:hover .pulsoweb-btn__arrow:nth-child(2) {
	transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
	.pulsoweb-btn--project,
	.pulsoweb-btn__arrow {
		transition: none;
	}
	.pulsoweb-btn--project:hover .pulsoweb-btn__arrow:nth-child(1) {
		transform: none;
	}
	.pulsoweb-btn--project:hover .pulsoweb-btn__arrow:nth-child(2) {
		transform: translateX(-200%);
	}
}

.pulsoweb-hero__bottom {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: clamp(24px, 4vw, 48px);
}

/* Prueba social (abajo izq.): texto + cinta de logos en bucle infinito. */
.pulsoweb-social {
	display: flex;
	flex-direction: column;
	gap: 18px;
	flex: 1 1 auto;
	min-width: 0;
	max-width: 620px;
}

.pulsoweb-social__title {
	margin: 0;
	font-family: var(--pulsoweb-font-display);
	font-size: 1.05rem;
	font-weight: 500;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.92);
}

/* Cinta de logos: el track lleva el grupo duplicado y se desplaza de
   -50 % a 0 (izquierda → derecha) sin parar; los bordes se difuminan. */
.pulsoweb-marquee {
	--pulsoweb-marquee-gap: 32px;
	position: relative;
	overflow: hidden;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(
		90deg,
		transparent 0,
		#000 12%,
		#000 88%,
		transparent 100%
	);
	mask-image: linear-gradient(
		90deg,
		transparent 0,
		#000 12%,
		#000 88%,
		transparent 100%
	);
}

.pulsoweb-marquee__track {
	display: flex;
	width: max-content;
	animation: pulsoweb-marquee var(--pulsoweb-marquee-duration, 30s) linear
		infinite;
	will-change: transform;
}

/* Logos seguidos; el render repite la lista para que un grupo siempre
   supere el ancho visible y el bucle no deje hueco. */
.pulsoweb-marquee__group {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: var(--pulsoweb-marquee-gap);
	flex: 0 0 auto;
	margin: 0;
	padding: 0 var(--pulsoweb-marquee-gap) 0 0;
	list-style: none;
}

@keyframes pulsoweb-marquee {
	from {
		transform: translateX(-50%);
	}
	to {
		transform: translateX(0);
	}
}

.pulsoweb-brand {
	flex: 0 0 auto;
	font-family: var(--pulsoweb-font-display);
	font-weight: 600;
	font-size: 1.35rem;
	letter-spacing: -0.01em;
	line-height: 1;
	white-space: nowrap;
	color: var(--pulsoweb-white);
}

.pulsoweb-brand--logo {
	display: inline-flex;
	align-items: center;
}

.pulsoweb-brand__img {
	display: block;
	height: 32px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
}

/* Caso de éxito destacado (abajo dcha.): toda la tarjeta es un enlace. */
.pulsoweb-root a.pulsoweb-case {
	display: flex;
	gap: 14px;
	flex: 0 0 auto;
	background: #f6f6f1;
	color: var(--pulsoweb-dark);
	border-radius: 20px;
	padding: 14px;
	width: clamp(320px, 30vw, 400px);
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
	text-decoration: none;
	transition: transform 0.3s ease;
}

.pulsoweb-root a.pulsoweb-case:hover {
	transform: translateY(-3px);
}

.pulsoweb-case__thumb {
	position: relative;
	flex: 0 0 86px;
	width: 86px;
	border-radius: 14px;
	overflow: hidden;
}

.pulsoweb-case__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}

.pulsoweb-case__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
}

.pulsoweb-pill {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	font-size: 0.7rem;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
}

.pulsoweb-pill--dark {
	background: var(--pulsoweb-dark);
	color: var(--pulsoweb-white);
}

/* Descripción corta: máx. 3 líneas para que la tarjeta no crezca. */
.pulsoweb-case__text {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0;
	font-size: 0.86rem;
	line-height: 1.35;
	font-weight: 500;
}

.pulsoweb-case__metric {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 2px 10px;
	margin-top: 2px;
}

.pulsoweb-case__num {
	font-family: var(--pulsoweb-font-display);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.pulsoweb-case__metric-label {
	grid-column: 1;
	font-size: 0.72rem;
	color: var(--pulsoweb-muted);
	line-height: 1.2;
}

.pulsoweb-case__arrow {
	grid-column: 2;
	grid-row: 1 / span 2;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--pulsoweb-dark);
	color: var(--pulsoweb-white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1rem;
}

/* ---- layer 3: word-reveal headline ---- */
.pulsoweb-words {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--pulsoweb-pad);
	pointer-events: none;
}

.pulsoweb-words__title {
	max-width: 1100px;
	text-align: center;
	font-family: var(--pulsoweb-font-display);
	font-weight: 500;
	font-size: clamp(2rem, 5.5vw, 5rem);
	line-height: 1.12;
	letter-spacing: -0.03em;
	margin: 0;
	color: var(--pulsoweb-white);
}

.pulsoweb-word {
	display: inline-block;
	opacity: 0; /* JS reveals */
	will-change: transform, opacity, filter;
}

/* ---- layer 4: white panel ----
   Parked just below the viewport via `top:100%` (NOT a transform) so GSAP
   can own the transform entirely; JS slides it up with yPercent. */
.pulsoweb-white {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 100%;
	z-index: 5;
	background: var(--pulsoweb-bg-light);
	overflow: hidden;
	will-change: transform;
}

/* ---- layer 5: "What changes" splitting title ---- */
.pulsoweb-changes__title {
	position: absolute;
	inset: 0;
	z-index: 2;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.1em;
	text-align: center;
	font-family: var(--pulsoweb-font-display);
	font-weight: 500;
	font-size: clamp(2rem, 4.8vw, 4.2rem);
	line-height: 1.04;
	letter-spacing: -0.03em;
	color: var(--pulsoweb-dark);
	pointer-events: none;
}

.pulsoweb-changes__line {
	display: block;
	opacity: 0; /* JS reveals */
	will-change: transform, opacity;
}

/* ---- layer 6: Before / After cards ---- */
.pulsoweb-cards {
	position: absolute;
	inset: 0;
	z-index: 1;
}

/* Card colours come from --pulsoweb-card-bg / --pulsoweb-card-text; the
   Elementor style controls override them per card ({{WRAPPER}} selectors). */
.pulsoweb-card {
	position: absolute;
	left: 50%;
	top: 50%;
	width: clamp(300px, 36.4vw, 524px);
	aspect-ratio: 376 / 399;
	border-radius: var(--pulsoweb-radius-card);
	padding: clamp(22px, 3.3vw, 47px) clamp(22px, 3.8vw, 55px)
		clamp(22px, 3.5vw, 50px);
	display: flex;
	flex-direction: column;
	background: var(--pulsoweb-card-bg);
	color: var(--pulsoweb-card-text);
	opacity: 0; /* JS reveals */
	will-change: transform, opacity;
}

.pulsoweb-card--before {
	--pulsoweb-card-bg: var(--pulsoweb-white);
	--pulsoweb-card-text: var(--pulsoweb-ink);
	z-index: 2;
}

.pulsoweb-card--after {
	--pulsoweb-card-bg: var(--pulsoweb-orange);
	--pulsoweb-card-text: var(--pulsoweb-white);
	z-index: 1;
}

.pulsoweb-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: clamp(18px, 2.15vw, 31px);
}

.pulsoweb-card__tag {
	font-size: 0.8125rem;
	font-weight: 400;
	opacity: 0.7;
}

/* "puls<>web" wordmark. Before card: navy text + orange chevrons;
   After card: everything in the card text colour. */
.pulsoweb-logo {
	display: inline-flex;
	align-items: baseline;
	font-family: var(--pulsoweb-font-display);
	font-weight: 700;
	font-size: clamp(1.1rem, 1.67vw, 1.5rem);
	line-height: 1;
	color: var(--pulsoweb-logo-text, currentColor);
}

/* The SVG's bottom edge sits on the text baseline (flex baseline alignment);
   nudge it down so the long lower arm dips just below the baseline. */
.pulsoweb-logo__sym {
	width: 0.89em;
	height: 0.75em;
	margin: 0 0.03em;
	transform: translateY(0.11em);
	fill: none;
	stroke: var(--pulsoweb-logo-accent, currentColor);
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	overflow: visible;
}

.pulsoweb-card--before .pulsoweb-logo {
	--pulsoweb-logo-text: var(--pulsoweb-navy);
	--pulsoweb-logo-accent: var(--pulsoweb-orange);
}

.pulsoweb-logo__img {
	display: block;
	height: 1.5em;
	width: auto;
	max-width: 160px;
	object-fit: contain;
}

.pulsoweb-card__title {
	font-family: var(--pulsoweb-font-display);
	font-weight: 500;
	font-size: clamp(1.5rem, 2.36vw, 2.125rem);
	line-height: 1.25;
	letter-spacing: -0.005em;
	/* Narrower than the card's content box, like the design's text frame,
	   so titles wrap the same way ("…el valor / de tu empresa."). */
	max-width: 11.8em;
	/* Minimum title→list gap when the text outgrows the card ratio (tablet);
	   on desktop the list's margin-top:auto still pushes it to the bottom. */
	margin: 0 0 20px;
}

.pulsoweb-card__list {
	list-style: none;
	margin: auto 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 21px;
}

/* line-height = icon height so single-line text sits centred on the icon. */
.pulsoweb-li {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	font-size: clamp(0.875rem, 1.04vw, 0.9375rem);
	line-height: 24px;
}

.pulsoweb-li__icon {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--pulsoweb-card-text);
}

.pulsoweb-li__icon svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.pulsoweb-li--cross .pulsoweb-li__icon svg {
	stroke: var(--pulsoweb-card-bg);
}

.pulsoweb-li--check .pulsoweb-li__icon svg {
	stroke: var(--pulsoweb-ink);
}

/* ---------------------------------------------------------------------------
 * Responsive móvil (<=767px)
 * Breakpoint del proyecto: 767px (ver memoria pulsoweb-mobile-breakpoint).
 * Las tarjetas Before/After se apilan en VERTICAL (una encima de otra) en vez
 * de ir lado a lado: se estrechan al ancho del móvil y usan altura natural
 * para que las dos quepan apiladas dentro del stage pineado. La coreografía
 * (Before entra por la izquierda, After por la derecha, hasta el stack) vive
 * en la rama isMobile de buildTimeline() en pulsoweb-landing.js.
 * ------------------------------------------------------------------------- */
@media (max-width: 767px) {
	/* Imagen de fondo específica para móvil (si se ha subido). */
	.pulsoweb-bg__img--photo-mobile {
		background-image: var(--pulsoweb-hero-bg-mobile);
	}

	/* Hero card edges on the site's 16px mobile gutter. */
	.pulsoweb-root {
		--pulsoweb-inset: 16px;
	}

	/* Top corners a bit rounder on mobile. Overlay (.pulsoweb-bg__dark)
	   follows automatically: it's clipped by this element's overflow:hidden,
	   including while GSAP animates the radius to 0 on scroll. */
	.pulsoweb-bg {
		border-top-left-radius: 40px;
		border-top-right-radius: 40px;
	}

	/* Móvil: se mantiene el padding original del hero. */
	.pulsoweb-hero {
		padding-inline: var(--pulsoweb-pad);
	}

	/* Fila inferior del hero: prueba social encima, caso de éxito debajo. */
	.pulsoweb-hero__bottom {
		flex-direction: column;
		align-items: stretch;
		gap: 24px;
	}

	.pulsoweb-social {
		gap: 12px;
		max-width: none;
	}

	.pulsoweb-brand {
		font-size: 1.15rem;
	}

	.pulsoweb-brand__img {
		height: 26px;
	}

	.pulsoweb-root a.pulsoweb-case {
		width: 100%;
	}

	.pulsoweb-card {
		width: calc(100vw - 32px); /* edges on the 16px mobile gutter */
		aspect-ratio: auto; /* altura según contenido: dos caben apiladas */
		padding: 20px;
	}

	/* Keep the previous vertical gap between the stacked cards on mobile. */
	.pulsoweb-root {
		--pulsoweb-card-gap: 32px;
	}

	.pulsoweb-card__title {
		font-size: clamp(1.3rem, 5.4vw, 1.7rem);
		line-height: 1.1;
		max-width: none;
		margin-bottom: 15px;
	}

	.pulsoweb-card__list {
		gap: 10px;
	}

	/* Items wrap to two lines here: tighter leading keeps both stacked cards
	   inside the pinned stage; the icon is nudged up to centre on line one. */
	.pulsoweb-li {
		line-height: 1.35;
	}

	.pulsoweb-li__icon {
		margin-top: -2px;
	}

	.pulsoweb-hero::after {
		border-radius: 40px;
	}
}
