/* =============================================================
 * Section 3 — Pilares ("Todo lo que tu negocio necesita")
 *
 * Layout:
 *   header (eyebrow + headline + lead, centrado)
 *   ul.trx-pillars__list  3 cards iguales (ecommerce / comunicación / gestión)
 *   .trx-pillars__ai      bloque IA 2-col (texto + visual)
 *   footer (tagline + CTA)
 *
 * Comparte la paleta y el cream tostado de section-pain.css.
 * ============================================================= */

.trx-pillars {
	--pill-ink:         oklch(18% 0.022 60);
	--pill-ink-soft:    oklch(38% 0.022 50);
	--pill-accent:      oklch(55% 0.18 30);
	--pill-card-bg:     oklch(98% 0.008 78);
	--pill-card-border: oklch(88% 0.015 80);
	--pill-icon-bg:     oklch(92% 0.045 30);

	padding-block: clamp(var(--trx-space-6), 4vh, var(--trx-space-7));
}

.trx-pillars__inner {
	width: 100%;
	max-width: 1600px;
	margin-inline: auto;
	padding-inline: clamp(1rem, 2vw, 2.5rem);
}

/* HEADER ------------------------------------------------------- */
.trx-pillars__header {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--trx-space-3);
	margin-bottom: clamp(var(--trx-space-5), 2.5vh, var(--trx-space-6));
}

.trx-pillars__eyebrow {
	margin: 0;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
	font-weight: 500;
	letter-spacing: 0.16em;
	color: var(--pill-accent);
}

.trx-pillars__headline {
	margin: 0;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: clamp(1.875rem, 1.4rem + 2.4vw, 3.5rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.03em;
	color: var(--pill-ink);
	max-width: 22ch;
	text-wrap: balance;
}

.trx-pillars__lead {
	margin: 0;
	max-width: 64ch;
	font-size: clamp(0.9375rem, 0.88rem + 0.3vw, 1.0625rem);
	line-height: 1.55;
	color: var(--pill-ink-soft);
	text-wrap: pretty;
}

/* GRID 3-COL DE CARDS ---------------------------------------- */
.trx-pillars__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1rem, 1.5vw, 1.5rem);
}

.trx-pillars__card {
	--card-padding: clamp(1rem, 1.3vw, 1.5rem);

	display: flex;
	flex-direction: column;
	gap: var(--trx-space-2);
	padding: var(--card-padding);
	background: var(--pill-card-bg);
	border: 1px solid var(--pill-card-border);
	border-radius: var(--trx-radius-lg);
	overflow: hidden;
	transition:
		transform var(--trx-dur-base) var(--trx-ease-soft),
		border-color var(--trx-dur-base) var(--trx-ease-soft),
		box-shadow var(--trx-dur-base) var(--trx-ease-soft);
}
.trx-pillars__card:hover {
	transform: translateY(-3px);
	border-color: oklch(80% 0.04 50);
	box-shadow: 0 10px 28px oklch(30% 0.02 60 / 0.08);
}

.trx-pillars__card-head {
	display: flex;
	align-items: center;
	gap: var(--trx-space-3);
}

.trx-pillars__card-icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: var(--pill-icon-bg);
	color: var(--pill-accent);
	flex-shrink: 0;
}
.trx-pillars__card-icon svg {
	width: 26px;
	height: 26px;
}

.trx-pillars__card-eyebrow {
	margin: 0;
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: var(--pill-accent);
}

.trx-pillars__card-title {
	margin: var(--trx-space-1) 0 0;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	color: var(--pill-ink);
}

.trx-pillars__card-desc {
	margin: 0;
	font-size: clamp(0.875rem, 0.84rem + 0.15vw, 0.9375rem);
	line-height: 1.55;
	color: var(--pill-ink-soft);
}

/* PLACEHOLDER variant (cuando no hay imagen) ------------------ */
.trx-pillars__card-visual {
	margin-top: var(--trx-space-2);
	height: clamp(160px, 18vh, 220px);
	border-radius: var(--trx-radius-md);
	overflow: hidden;
	background:
		repeating-linear-gradient(
			45deg,
			oklch(94% 0.012 78) 0 10px,
			oklch(96% 0.010 78) 10px 20px
		);
	border: 1px dashed oklch(78% 0.022 60);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--trx-space-1);
	color: oklch(55% 0.018 60);
}
.trx-pillars__card-visual > svg {
	width: 32px;
	height: 32px;
	opacity: 0.45;
}
.trx-pillars__card-visual > span {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* IMAGE variant: full bleed dentro de la card + fade superior --
 * - Negative margins horizontal/vertical para escapar del padding
 *   y llegar a los bordes del card (clipped por overflow:hidden + border-radius)
 * - Altura ampliada para que la imagen domine la parte inferior de la card
 * - mask-image con gradient vertical para que el top de la imagen se difumine
 *   suavemente hacia el fondo de la card (lookup: 0% transparent → 30% opaque) */
.trx-pillars__card-visual:has(img) {
	margin-inline: calc(-1 * var(--card-padding));
	margin-bottom: calc(-1 * var(--card-padding));
	margin-top: var(--trx-space-3);
	height: clamp(220px, 26vh, 300px);
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
}
.trx-pillars__card-visual img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;

	-webkit-mask-image: linear-gradient(to bottom,
		transparent 0%,
		oklch(0% 0 0 / 0.15) 10%,
		oklch(0% 0 0 / 0.55) 20%,
		oklch(0% 0 0 / 0.85) 28%,
		black 38%);
	mask-image: linear-gradient(to bottom,
		transparent 0%,
		oklch(0% 0 0 / 0.15) 10%,
		oklch(0% 0 0 / 0.55) 20%,
		oklch(0% 0 0 / 0.85) 28%,
		black 38%);
}

/* BLOQUE IA --------------------------------------------------- */
.trx-pillars__ai {
	margin-top: clamp(0.75rem, 1vw, 1.25rem);
	background: var(--pill-card-bg);
	border: 1px solid var(--pill-card-border);
	border-radius: var(--trx-radius-lg);
	padding: clamp(1rem, 1.6vw, 1.75rem);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
	gap: clamp(1.25rem, 2.5vw, 2.5rem);
	align-items: center;
}

.trx-pillars__ai-text {
	display: flex;
	flex-direction: column;
	gap: var(--trx-space-3);
}

.trx-pillars__ai-title {
	margin: var(--trx-space-1) 0 0;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--pill-ink);
}

.trx-pillars__ai-desc {
	margin: 0;
	font-size: clamp(0.875rem, 0.84rem + 0.2vw, 0.9375rem);
	line-height: 1.55;
	color: var(--pill-ink-soft);
}

.trx-pillars__ai-visual {
	height: clamp(120px, 15vh, 170px);
	border-radius: var(--trx-radius-md);
	background:
		radial-gradient(circle at 50% 50%,
			oklch(94% 0.05 30 / 0.5) 0%,
			oklch(96% 0.020 78) 60%),
		repeating-linear-gradient(
			45deg,
			oklch(94% 0.012 78) 0 10px,
			oklch(96% 0.010 78) 10px 20px
		);
	border: 1px dashed oklch(78% 0.022 60);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--trx-space-1);
	color: oklch(55% 0.018 60);
}
.trx-pillars__ai-visual svg {
	width: 44px;
	height: 44px;
	opacity: 0.45;
}
.trx-pillars__ai-visual span {
	font-family: 'JetBrains Mono', ui-monospace, monospace;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* FOOTER ------------------------------------------------------ */
.trx-pillars__footer {
	margin-top: clamp(var(--trx-space-5), 2.5vh, var(--trx-space-6));
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--trx-space-3);
	text-align: center;
}

.trx-pillars__tagline {
	margin: 0;
	display: inline-flex;
	align-items: center;
	gap: var(--trx-space-3);
	font-size: clamp(0.9375rem, 0.88rem + 0.25vw, 1.0625rem);
	font-weight: 500;
	color: var(--pill-ink);
}
.trx-pillars__sparkle {
	color: var(--pill-accent);
	font-size: 1em;
}

.trx-pillars__cta {
	display: inline-flex;
	align-items: center;
	gap: var(--trx-space-2);
	padding: 0.95rem 1.85rem;
	background: oklch(18% 0.022 60);
	color: oklch(98% 0.005 78);
	border-radius: var(--trx-radius-pill);
	font-family: 'Inter', system-ui, sans-serif;
	font-weight: 600;
	font-size: 1rem;
	letter-spacing: -0.005em;
	text-decoration: none;
	box-shadow: 0 4px 16px oklch(18% 0.022 60 / 0.22);
	transition:
		background var(--trx-dur-fast) var(--trx-ease-soft),
		transform var(--trx-dur-fast) var(--trx-ease-soft),
		box-shadow var(--trx-dur-fast) var(--trx-ease-soft);
}
.trx-pillars__cta:hover {
	background: oklch(28% 0.024 60);
	color: oklch(98% 0.005 78);
	transform: translateY(-1px);
	box-shadow: 0 10px 26px oklch(18% 0.022 60 / 0.35);
}
.trx-pillars__cta svg {
	width: 16px;
	height: 16px;
	transition: transform var(--trx-dur-fast) var(--trx-ease-soft);
}
.trx-pillars__cta:hover svg {
	transform: translateX(3px);
}

/* RESPONSIVE -------------------------------------------------- */
@media (max-width: 980px) {
	.trx-pillars__list {
		grid-template-columns: 1fr;
	}
	.trx-pillars__ai {
		grid-template-columns: 1fr;
	}
}

/* REDUCED MOTION ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.trx-pillars__card,
	.trx-pillars__cta,
	.trx-pillars__cta svg { transition: none; }
	.trx-pillars__card:hover,
	.trx-pillars__cta:hover { transform: none; }
}
