/**
 * Home — capa visual moderna sobre la base Puente.
 *
 * Reglas duras:
 *  - No introducir colores nuevos. Sólo se usan los tokens ya definidos en
 *    style.css (--accent-blue, --accent-green, --bg-card, --divider, etc.).
 *  - No tocar tipografía base. La cascada system-first se mantiene.
 *  - Las animaciones respetan prefers-reduced-motion (corte total al final).
 *  - Cargar SÓLO en front-page (ver inc/assets.php).
 */

/* Las clases .home-orb-stage / .home-orb* y .reveal viven en main.css
   desde la fase 2 — son compartidas por home, pricing, blog y account.

   El fondo ambient (.home-dot-grid + .home-cursor-bg + html/body) también
   vive ahora en main.css y se activa con `body.puente-ambient`. Antes era
   exclusivo de la portada; ahora cubre toda la web salvo blog (ver
   puente_show_ambient_bg). El JS de tracking (initCursorBg) vive en
   main.js con el mismo razonamiento. */

/* =========================================================
   HERO — eyebrow tipo announcement bar + showcase tilt.
   ========================================================= */
.hero {
	position: relative;
	padding-block: var(--space-section);
	text-align: center;
}

.hero .container {
	position: relative;
	z-index: 1;
}

.hero__announce {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	padding: 6px 14px 6px 6px;
	background: var(--bg-card);
	border: 1px solid var(--divider);
	border-radius: 999px;
	font-size: var(--text-xs);
	font-weight: 600;
	color: var(--text-secondary);
	margin-bottom: var(--space-xl);
	text-decoration: none;
	transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.hero__announce:hover {
	border-color: var(--accent-blue);
	color: var(--text-primary);
	transform: translateY(-1px);
}

.hero__announce-pill {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--accent-blue);
	color: #fff;
}

.hero__announce-arrow {
	font-size: var(--text-base);
	transition: transform var(--transition-fast);
}

.hero__announce:hover .hero__announce-arrow { transform: translateX(2px); }

.hero__title {
	font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl));
	line-height: 1.05;
	letter-spacing: -0.025em;
	margin-bottom: var(--space-lg);
	max-width: 920px;
	margin-inline: auto;
}

.hero__title .accent {
	background: linear-gradient(120deg, var(--accent-blue), var(--nav-active) 60%, var(--accent-green));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hero__subtitle {
	font-size: clamp(var(--text-base), 1.6vw, var(--text-xl));
	color: var(--text-secondary);
	max-width: 680px;
	margin: 0 auto var(--space-2xl);
	line-height: var(--leading-relaxed);
}

.hero__cta-group {
	display: flex;
	gap: var(--space-md);
	justify-content: center;
	flex-wrap: wrap;
	margin-bottom: var(--space-lg);
}

.hero__trust {
	font-size: var(--text-xs);
	color: var(--text-secondary);
	margin: 0;
}

/* — Showcase: la captura del producto con tilt + cursor falso — */
.hero__showcase {
	position: relative;
	margin: var(--space-3xl) auto 0;
	max-width: 1080px;
	perspective: 2000px;
	cursor: default;
}

.hero__showcase-frame {
	position: relative;
	border-radius: var(--radius-card);
	background: var(--bg-card);
	border: 1px solid var(--divider);
	box-shadow:
		0 30px 60px -20px rgba(45, 91, 255, 0.18),
		0 18px 40px -12px rgba(0, 0, 0, 0.10);
	overflow: hidden;
	transition: transform .25s ease;
	transform-style: preserve-3d;
}

.hero__showcase-frame::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0) 50%);
	pointer-events: none;
	z-index: 2;
	mix-blend-mode: overlay;
}

.hero__showcase-chrome {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	background: var(--bg-pill);
	border-bottom: 1px solid var(--divider);
}

.hero__showcase-chrome span {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--divider);
}

.hero__showcase-chrome span:nth-child(1) { background: #ff6058; }
.hero__showcase-chrome span:nth-child(2) { background: #febc2e; }
.hero__showcase-chrome span:nth-child(3) { background: #28c840; }

.hero__showcase-chrome-url {
	flex: 1;
	background: var(--bg-primary);
	border: 1px solid var(--divider);
	border-radius: 999px;
	font-size: var(--text-xs);
	font-family: var(--mono);
	color: var(--text-secondary);
	padding: 5px 12px;
	margin-left: var(--space-sm);
	text-align: left;
}

.hero__showcase-img {
	display: block;
	width: 100%;
	height: auto;
	background: #fff;
}

.hero__showcase-img--placeholder {
	aspect-ratio: 16 / 9;
	background:
		linear-gradient(135deg, var(--bg-pill) 0%, #fff 60%),
		var(--bg-pill);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-secondary);
	font-size: var(--text-sm);
	font-weight: 500;
}

/* Cursor demo — SVG flotando sobre el showcase */
.hero__cursor {
	position: absolute;
	top: 0;
	left: 0;
	width: 22px;
	height: 28px;
	pointer-events: none;
	z-index: 5;
	transform: translate3d(60%, 60%, 0);
	transition: transform 1.4s cubic-bezier(.65,.05,.36,1);
	filter: drop-shadow(0 4px 8px rgba(0,0,0,0.18));
}

.hero__cursor-label {
	position: absolute;
	top: 24px;
	left: 22px;
	white-space: nowrap;
	background: var(--accent-blue);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .3px;
	padding: 4px 8px;
	border-radius: 6px;
	opacity: 0;
	transform: translateY(-2px);
	transition: opacity .25s ease, transform .25s ease;
}

.hero__cursor.is-active .hero__cursor-label {
	opacity: 1;
	transform: translateY(0);
}

/* Click ripple */
.hero__cursor-ring {
	position: absolute;
	top: 8px;
	left: 8px;
	width: 0;
	height: 0;
	border-radius: 50%;
	border: 2px solid var(--accent-blue);
	opacity: 0;
}

.hero__cursor.is-clicking .hero__cursor-ring {
	animation: cursor-ripple .55s ease-out forwards;
}

@keyframes cursor-ripple {
	0%   { width: 0;  height: 0;  opacity: .8; }
	100% { width: 36px; height: 36px; opacity: 0; transform: translate(-18px, -18px); }
}

/* Logos / trust band debajo del showcase */
.hero__browsers {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--space-2xl);
	margin-top: var(--space-2xl);
	flex-wrap: wrap;
	font-size: var(--text-xs);
	color: var(--text-secondary);
	font-weight: 500;
	letter-spacing: .3px;
}

.hero__browsers span {
	opacity: .7;
	transition: opacity var(--transition-fast);
}

.hero__browsers span:hover { opacity: 1; }

/* =========================================================
   BENTO GRID — features con tamaños distintos y previews.
   Reemplaza el grid-3 actual sólo cuando se aplica .bento.
   ========================================================= */
.bento {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	grid-auto-rows: minmax(220px, auto);
	gap: var(--space-xl);
}

.bento-card {
	position: relative;
	background: var(--bg-card);
	border: 1px solid var(--divider);
	border-radius: var(--radius-card);
	padding: var(--space-2xl);
	overflow: hidden;
	transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	isolation: isolate;
}

.bento-card:hover {
	transform: translateY(-2px);
	border-color: rgba(45, 91, 255, 0.35);
	box-shadow: var(--shadow-card-hover);
}

/* Border-beam: fino haz que recorre el borde al hover */
.bento-card.has-beam::before {
	content: "";
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	padding: 1px;
	background: conic-gradient(from var(--beam-angle, 0deg),
		transparent 0deg,
		transparent 280deg,
		var(--accent-blue) 320deg,
		var(--nav-active) 340deg,
		transparent 360deg);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor;
	        mask-composite: exclude;
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
	z-index: 1;
}

.bento-card.has-beam:hover::before {
	opacity: 1;
	animation: beam-spin 4s linear infinite;
}

@property --beam-angle {
	syntax: "<angle>";
	inherits: false;
	initial-value: 0deg;
}

@keyframes beam-spin {
	to { --beam-angle: 360deg; }
}

.bento-card__icon {
	font-size: 28px;
	line-height: 1;
}

.bento-card__badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 999px;
	background: var(--bg-pill);
	color: var(--text-secondary);
	align-self: flex-start;
}

.bento-card__badge.is-pro {
	background: rgba(45, 91, 255, 0.10);
	color: var(--accent-blue);
}

.bento-card__title {
	font-size: var(--text-xl);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
	margin: 0;
}

.bento-card__desc {
	font-size: var(--text-sm);
	color: var(--text-secondary);
	line-height: var(--leading-relaxed);
	margin: 0;
}

/* Preview pane dentro de cada card */
.bento-card__preview {
	margin-top: auto;
	border-radius: 10px;
	background: var(--bg-primary);
	border: 1px solid var(--divider);
	padding: var(--space-md);
	font-family: var(--mono);
	font-size: var(--text-xs);
	color: var(--text-secondary);
	overflow: hidden;
}

.bento-card__preview--thumbs {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 6px;
	padding: var(--space-sm);
}

.bento-card__thumb {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 6px;
	background: linear-gradient(135deg, var(--bg-pill), var(--bg-card));
	overflow: hidden;
}

.bento-card__thumb-tag {
	position: absolute;
	bottom: 4px;
	right: 4px;
	font-size: 9px;
	font-weight: 700;
	padding: 2px 5px;
	border-radius: 4px;
	background: rgba(0,0,0,0.65);
	color: #fff;
}

.bento-card__thumb-tag.is-hot   { background: rgba(255, 68, 68, 0.85); }
.bento-card__thumb-tag.is-rise  { background: rgba(48, 209, 88, 0.85); }
.bento-card__thumb-tag.is-warn  { background: rgba(245, 166, 35, 0.85); }

.bento-card__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: auto;
}

.bento-card__chip {
	font-size: var(--text-xs);
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--bg-pill);
	color: var(--text-primary);
	font-weight: 500;
}

.bento-card__chip.is-active {
	background: var(--accent-blue);
	color: #fff;
}

.bento-card__queue {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bento-card__queue-row {
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	font-size: var(--text-xs);
	font-family: var(--mono);
	color: var(--text-secondary);
}

.bento-card__queue-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--divider);
	flex-shrink: 0;
}

.bento-card__queue-dot.is-done { background: var(--accent-green); }
.bento-card__queue-dot.is-run  { background: var(--accent-blue); animation: pb-pulse 1.4s ease-in-out infinite; }

/* Tamaños bento — desktop (6 columnas)
   Distribución pensada para las 4 extensiones AutoKuak + 1 cierre:
   ┌──────────────────────┬──────────┐
   │ Grok AutoKuak (4 XL) │ Flow (2) │
   ├──────────────────────┴──────────┤
   │ ChatGPT (3 lg)  │ TubeKRadar (3 lg) │
   ├─────────────────┴────────────────┤
   │ Cierre + tiles instalación (4 wide) │
   └──────────────────────────────────┘  */
.bento-card--xl   { grid-column: span 4; grid-row: span 1; }
.bento-card--md   { grid-column: span 2; grid-row: span 1; }
.bento-card--lg   { grid-column: span 3; grid-row: span 1; }
.bento-card--sm   { grid-column: span 2; grid-row: span 1; }
.bento-card--wide { grid-column: span 4; grid-row: span 1; }

@media (max-width: 1024px) {
	.bento {
		grid-template-columns: repeat(2, 1fr);
	}
	.bento-card--xl,
	.bento-card--lg,
	.bento-card--wide { grid-column: span 2; }
	.bento-card--md,
	.bento-card--sm   { grid-column: span 1; }
}

@media (max-width: 600px) {
	.bento { grid-template-columns: 1fr; gap: var(--space-md); }
	.bento-card,
	.bento-card--xl, .bento-card--lg, .bento-card--md, .bento-card--sm, .bento-card--wide { grid-column: span 1; }
}

/* =========================================================
   STATS + SPARKLINE — mejora de social-proof actual.
   ========================================================= */
@keyframes live-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.5); }
	50%      { box-shadow: 0 0 0 7px rgba(48, 209, 88, 0); }
}

.curiosity-stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-width: 140px;
	position: relative;
}

.curiosity-stat__top {
	display: flex;
	align-items: flex-end;
	gap: var(--space-md);
}

.curiosity-stat__num {
	font-size: var(--text-4xl);
	font-weight: 800;
	color: var(--accent-blue);
	line-height: 1;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.curiosity-stat__spark {
	width: 64px;
	height: 24px;
	display: block;
}

.curiosity-stat__label {
	font-size: var(--text-sm);
	color: var(--text-secondary);
	margin-top: var(--space-xs);
}

.curiosity-stat__live-dot {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 10px;
	font-weight: 700;
	color: var(--accent-green);
	letter-spacing: .5px;
	text-transform: uppercase;
	margin-top: 4px;
}

.curiosity-stat__live-dot::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--accent-green);
	box-shadow: 0 0 0 0 rgba(48, 209, 88, 0.6);
	animation: live-pulse 2.2s ease-in-out infinite;
}

/* =========================================================
   Reduced motion — corte total (.reveal vive en main.css)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
	.hero__cursor,
	.curiosity-stat__live-dot::before,
	.bento-card.has-beam::before { animation: none !important; transition: none !important; }
}

/* =========================================================
   AutoKuak Suite — home alignment with paginas-para-implementar
   =========================================================
   Estilos para las secciones que reproducen la home React de
   referencia: hero browser-row, showcase con tabs + demos en
   vivo (queue, flow-grid, radar) y live-stats / trust-strip.

   Tokens nativos del tema (--accent-blue, --bg-card, --divider,
   etc.) — no se introduce paleta nueva. */

/* — Hero: fila de navegadores compatibles (Chrome · Edge · …) — */
.browser-row {
	display: flex; justify-content: center; align-items: center;
	gap: var(--space-2xl); flex-wrap: wrap;
	margin-top: var(--space-3xl);
	font-size: var(--text-xs); color: var(--text-secondary); font-weight: 500;
	letter-spacing: .3px;
}
.browser-row span { opacity: .7; transition: opacity var(--transition-fast); }
.browser-row span:hover { opacity: 1; }
.browser-row .dot {
	width: 4px; height: 4px; border-radius: 50%;
	background: var(--divider); flex-shrink: 0;
}

/* =========================================================
   SHOWCASE — header (eyebrow + título + subtítulo)
   ========================================================= */
.showcase {
	padding: var(--space-3xl) 0 var(--space-section);
	position: relative;
}
/* .showcase__head / __eyebrow / __title / __subtitle viven en marketing.css */

/* — Botones bare `.btn` dentro de la showcase/demo: por defecto azul, para
     coincidir con el sistema del .jsx de referencia donde `.btn` ya implica
     primary. El theme define `.btn` sin color base, así que añadimos un
     scoped override aquí. */
.showcase .btn:not(.btn--outline):not(.btn--ghost):not(.btn--primary),
.demo    .btn:not(.btn--outline):not(.btn--ghost):not(.btn--primary) {
	background: var(--accent-blue);
	color: #fff;
	border-color: var(--accent-blue);
}
.showcase .btn:not(.btn--outline):not(.btn--ghost):not(.btn--primary):hover,
.demo    .btn:not(.btn--outline):not(.btn--ghost):not(.btn--primary):hover {
	opacity: .9; background: var(--accent-blue); color: #fff;
}

/* =========================================================
   TABS — selector segmentado de 4 extensiones
   ========================================================= */
.tabs {
	display: grid; grid-template-columns: repeat(4, 1fr);
	gap: 8px; padding: 8px;
	background: var(--bg-card); border: 1px solid var(--divider);
	border-radius: 18px;
	margin-bottom: var(--space-2xl);
}
.tab {
	display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
	padding: 14px 16px;
	border-radius: 12px; border: 1px solid transparent;
	background: transparent;
	text-align: left; color: var(--text-primary);
	transition: background-color .2s, border-color .2s, box-shadow .2s;
	cursor: pointer; position: relative;
	font: inherit;
}
.tab:hover { background: var(--bg-pill); }
.tab.is-active {
	background: var(--bg-primary);
	border-color: var(--divider);
	box-shadow: var(--shadow-card);
}
.tab__row { display: flex; align-items: center; gap: 10px; width: 100%; }
.tab__icon {
	width: 32px; height: 32px; border-radius: 9px;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 18px;
	background: var(--bg-pill);
	flex-shrink: 0;
}
.tab.is-active .tab__icon { background: color-mix(in srgb, var(--accent-blue) 12%, transparent); }
.tab__name { font-weight: 700; font-size: var(--text-sm); letter-spacing: -.005em; }
.tab__sub  { font-size: 11px; color: var(--text-secondary); font-weight: 500; }
.tab.is-active .tab__sub { color: var(--accent-blue); }

@media (max-width: 880px) { .tabs { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .tabs { grid-template-columns: 1fr; } }

/* =========================================================
   STAGE — panel info + demo (split)
   ========================================================= */
.stage {
	display: grid;
	grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
	gap: var(--space-2xl);
	align-items: stretch;
}
@media (max-width: 1024px) { .stage { grid-template-columns: 1fr; } }

.stage__info {
	display: flex; flex-direction: column;
	padding: var(--space-2xl);
	background: var(--bg-card); border: 1px solid var(--divider);
	border-radius: var(--radius-card);
}
.stage__icon-lg {
	width: 56px; height: 56px; border-radius: 14px;
	background: var(--bg-primary); border: 1px solid var(--divider);
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 26px;
	margin-bottom: var(--space-lg);
	box-shadow: var(--shadow-card);
}
.stage__title { font-size: var(--text-2xl); font-weight: 800; letter-spacing: -.02em; margin: 0; }
.stage__lead  {
	color: var(--text-secondary);
	margin: 10px 0 var(--space-lg);
	line-height: 1.55;
	font-size: var(--text-sm);
}
.stage__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-lg); }
.badge {
	display: inline-flex; align-items: center; gap: 5px;
	font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
	padding: 4px 9px; border-radius: 999px;
	background: var(--bg-pill); color: var(--text-secondary);
}
.badge--pro  { background: color-mix(in srgb, var(--accent-blue) 12%, transparent); color: var(--accent-blue); }
.badge--free { background: color-mix(in srgb, var(--accent-green) 14%, transparent); color: #1a8a3a; }
[data-theme="dark"] .badge--free { color: var(--accent-green); }

.stage__features {
	list-style: none; padding: 0; margin: 0 0 var(--space-xl);
	display: flex; flex-direction: column; gap: 10px;
}
.stage__features li {
	display: flex; gap: 10px; align-items: flex-start;
	font-size: var(--text-sm); color: var(--text-primary);
}
.stage__features li::before {
	content: ''; width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
	background: color-mix(in srgb, var(--accent-green) 18%, transparent);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M3 8.5l3 3 7-7' fill='none' stroke='%2330D158' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
	background-repeat: no-repeat; background-position: center;
}
.stage__cta { display: flex; gap: 8px; margin-top: auto; }

/* =========================================================
   DEMO — chrome window + body
   ========================================================= */
.demo {
	border-radius: var(--radius-card);
	background: var(--bg-card);
	border: 1px solid var(--divider);
	overflow: hidden;
	position: relative;
	min-height: 540px;
	display: flex; flex-direction: column;
	box-shadow: var(--shadow-elev);
}
.demo__chrome {
	display: flex; align-items: center; gap: 6px;
	padding: 10px 14px;
	background: var(--bg-pill);
	border-bottom: 1px solid var(--divider);
	flex-shrink: 0;
}
.demo__chrome .light {
	width: 11px; height: 11px; border-radius: 50%;
}
.demo__chrome .light:nth-child(1) { background: #ff6058; }
.demo__chrome .light:nth-child(2) { background: #febc2e; }
.demo__chrome .light:nth-child(3) { background: #28c840; }
.demo__chrome-url {
	flex: 1; margin-left: 10px;
	background: var(--bg-primary); border: 1px solid var(--divider);
	border-radius: 999px; padding: 5px 12px;
	font-family: var(--mono); font-size: 11px; color: var(--text-secondary);
	display: flex; align-items: center; gap: 8px;
}
.demo__chrome-url::before {
	content: ''; width: 9px; height: 9px;
	background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M5 7V5a3 3 0 1 1 6 0v2m-7 0h8v6H4V7z' fill='none' stroke='%236B6B70' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center / contain;
}
.demo__chrome-ext {
	display: inline-flex; align-items: center; gap: 5px;
	font-size: 11px; font-weight: 600;
	padding: 4px 10px; border-radius: 999px;
	background: color-mix(in srgb, var(--accent-blue) 14%, transparent);
	color: var(--accent-blue);
}
.demo__body { flex: 1; position: relative; padding: var(--space-xl); overflow: hidden; }

/* — Run-bar (controles arriba del demo) — */
.run-bar {
	display: flex; align-items: center; gap: 10px;
	background: var(--bg-primary); border: 1px solid var(--divider);
	border-radius: 12px; padding: 10px 12px;
	margin-bottom: var(--space-lg);
}
.run-bar__stats {
	display: flex; gap: 14px; font-size: 11px; color: var(--text-secondary);
	font-family: var(--mono);
}
.run-bar__stats b { color: var(--text-primary); font-weight: 700; }

.input-pill {
	background: var(--bg-primary); border: 1px solid var(--divider);
	border-radius: 999px; padding: 8px 14px;
	font-size: var(--text-sm); color: var(--text-primary); font-family: var(--font);
	outline: none; min-width: 0;
	transition: border-color .15s, box-shadow .15s;
}
.input-pill:focus {
	border-color: var(--accent-blue);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-blue) 18%, transparent);
}

/* =========================================================
   DEMO — QUEUE (Grok / ChatGPT)
   ========================================================= */
.queue { display: flex; flex-direction: column; gap: 8px; }
.queue__row {
	display: grid;
	grid-template-columns: 28px 1fr auto auto;
	align-items: center; gap: 12px;
	padding: 12px 14px;
	background: var(--bg-primary); border: 1px solid var(--divider);
	border-radius: 12px;
	font-size: var(--text-sm);
	transition: border-color .25s, background-color .25s, opacity .25s;
}
.queue__row.is-running {
	border-color: var(--accent-blue);
	background: color-mix(in srgb, var(--accent-blue) 6%, var(--bg-primary));
}
.queue__row.is-done { opacity: .65; }
.queue__num {
	font-family: var(--mono); font-size: 11px; color: var(--text-secondary);
	text-align: center;
}
.queue__label { color: var(--text-primary); }
.queue__label .seq {
	font-family: var(--mono); font-size: 11px; color: var(--text-secondary);
	margin-left: 6px;
}
.queue__label .seq b { color: var(--text-primary); font-weight: 700; }
.queue__label .seq b.is-current { color: var(--accent-blue); }
.queue__status {
	font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
	padding: 3px 8px; border-radius: 999px;
	background: var(--bg-pill); color: var(--text-secondary);
}
.queue__status.is-done    { background: color-mix(in srgb, var(--accent-green) 16%, transparent); color: #1a8a3a; }
.queue__status.is-running { background: color-mix(in srgb, var(--accent-blue) 14%, transparent); color: var(--accent-blue); }
[data-theme="dark"] .queue__status.is-done { color: #4ade80; }
.queue__progress {
	width: 80px; height: 4px;
	background: var(--bg-pill); border-radius: 999px; overflow: hidden;
}
.queue__progress span {
	display: block; height: 100%;
	background: var(--accent-blue);
	transition: width .3s linear;
}

/* =========================================================
   DEMO — FLOW (render grid)
   ========================================================= */
.flow-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
@media (max-width: 720px) { .flow-grid { grid-template-columns: repeat(2, 1fr); } }
.flow-clip {
	position: relative;
	aspect-ratio: 16 / 9; border-radius: 10px;
	background: linear-gradient(135deg, #1a1a22, #2a2540);
	overflow: hidden;
	border: 1px solid var(--divider);
}
.flow-clip.is-cinematic { background: linear-gradient(135deg, #2c1338, #6a1f8a 80%, #d96fc7); }
.flow-clip.is-tech      { background: linear-gradient(135deg, #0a2540, #1e6fb0 80%, #59c2ea); }
.flow-clip.is-warm      { background: linear-gradient(135deg, #3a1a0a, #b04a17 80%, #f6a36a); }
.flow-clip.is-mint      { background: linear-gradient(135deg, #062a23, #0f8866 70%, #6ce5b6); }
.flow-clip.is-rose      { background: linear-gradient(135deg, #2a0b22, #a32a73 80%, #f6a3c8); }
.flow-clip.is-mid       { background: linear-gradient(135deg, #1c1c28, #404068 80%, #8c8cbf); }
.flow-clip__label {
	position: absolute; left: 8px; top: 8px;
	font-size: 10px; font-weight: 600; color: #fff;
	background: rgba(0,0,0,.5); padding: 3px 7px; border-radius: 6px;
	backdrop-filter: blur(4px);
	font-family: var(--mono);
	max-width: calc(100% - 16px);
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.flow-clip__dur {
	position: absolute; right: 8px; bottom: 8px;
	font-size: 10px; font-weight: 700; color: #fff;
	background: rgba(0,0,0,.5); padding: 3px 7px; border-radius: 6px;
}
.flow-clip__progress {
	position: absolute; left: 0; right: 0; bottom: 0;
	height: 3px; background: rgba(255,255,255,.15);
}
.flow-clip__progress span { display: block; height: 100%; background: var(--accent-blue); transition: width .3s linear; }
.flow-clip.is-rendering::after {
	content: ''; position: absolute; inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
	animation: home-shimmer 1.6s linear infinite;
	pointer-events: none;
}
@keyframes home-shimmer {
	0%   { transform: translateX(-100%); }
	100% { transform: translateX(100%); }
}
.flow-clip.is-queued { opacity: .55; }
.flow-clip__icon {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	color: #fff; opacity: .85;
	pointer-events: none;
}

/* =========================================================
   DEMO — TUBEKRADAR (overlays sobre miniaturas)
   ========================================================= */
.radar-layout {
	display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-lg); height: 100%;
}
@media (max-width: 720px) { .radar-layout { grid-template-columns: 1fr; } }

.radar-thumbs {
	display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; align-content: start;
}
.yt-thumb {
	position: relative;
	aspect-ratio: 16 / 9; border-radius: 10px;
	background: var(--bg-pill);
	overflow: hidden;
	border: 1px solid var(--divider);
	transition: transform .15s, border-color .15s;
}
.yt-thumb:hover { transform: translateY(-2px); border-color: var(--accent-blue); }
.yt-thumb__bg { position: absolute; inset: 0; background: linear-gradient(135deg, var(--bg-pill), var(--bg-card)); }
.yt-thumb__bg.is-a { background: linear-gradient(135deg, #1a2540 0%, #2d5bff 100%); }
.yt-thumb__bg.is-b { background: linear-gradient(135deg, #251a40 0%, #5b3cff 100%); }
.yt-thumb__bg.is-c { background: linear-gradient(135deg, #1a4030 0%, #30d158 100%); }
.yt-thumb__bg.is-d { background: linear-gradient(135deg, #401a25 0%, #ff6a3c 100%); }
.yt-thumb__bg.is-e { background: linear-gradient(135deg, #401a3a 0%, #a32a73 100%); }
.yt-thumb__bg.is-f { background: linear-gradient(135deg, #403a1a 0%, #f5a623 100%); }
.yt-thumb__dur {
	position: absolute; right: 6px; bottom: 6px;
	font-size: 9px; font-weight: 700; color: #fff;
	background: rgba(0,0,0,.7); padding: 2px 5px; border-radius: 4px;
	font-family: var(--mono);
}
.yt-thumb .overlay,
.yt-thumb .overlay-bottom { transition: opacity .2s; }
.demo-radar.is-overlay-off .overlay,
.demo-radar.is-overlay-off .overlay-bottom { opacity: 0; pointer-events: none; }

.overlay {
	position: absolute; left: 6px; top: 6px;
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 10px; font-weight: 800; color: #fff;
	padding: 3px 7px; border-radius: 6px;
	backdrop-filter: blur(4px);
}
.overlay.is-hot   { background: rgba(255, 68, 68, .92); }
.overlay.is-rise  { background: rgba(48, 209, 88, .92); }
.overlay.is-warn  { background: rgba(245, 166, 35, .92); }
.overlay.is-cool  { background: rgba(45, 91, 255, .92); }

.overlay-bottom {
	position: absolute; left: 6px; right: 40px; bottom: 6px;
	display: flex; gap: 4px;
}
.overlay-bottom .chip {
	font-size: 9px; font-weight: 700; color: #fff; font-family: var(--mono);
	background: rgba(0,0,0,.65); padding: 2px 5px; border-radius: 4px;
}

.radar-side {
	display: flex; flex-direction: column;
	background: var(--bg-primary); border: 1px solid var(--divider);
	border-radius: 12px; padding: 14px; gap: 10px;
	min-width: 0;
}
.radar-side__head {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	margin-bottom: 4px;
}
.radar-side__title {
	font-size: 11px; font-weight: 800;
	text-transform: uppercase; letter-spacing: .5px;
	color: var(--text-secondary);
}
.live-dot {
	display: inline-flex; align-items: center; gap: 5px;
	font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
	color: #1a8a3a;
}
[data-theme="dark"] .live-dot { color: var(--accent-green); }
.live-dot::before {
	content: ''; width: 6px; height: 6px; border-radius: 50%;
	background: var(--accent-green);
	animation: home-live-pulse 1.8s ease-in-out infinite;
}
@keyframes home-live-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(48,209,88,.5); }
	50%      { box-shadow: 0 0 0 6px rgba(48,209,88,0);  }
}
.radar-row {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	font-size: var(--text-sm); padding: 6px 0;
	border-bottom: 1px dashed var(--divider);
}
.radar-row:last-child { border-bottom: 0; }
.radar-row__name {
	color: var(--text-primary); font-weight: 500;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.radar-row__pct      { font-family: var(--mono); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.radar-row__pct.up   { color: var(--accent-green); }
.radar-row__pct.up.is-hot { color: var(--accent-blue); }
.radar-row__pct.flat { color: var(--text-secondary); }

/* =========================================================
   LIVE STATS — motor en vivo (4 cards + trust strip)
   ========================================================= */
.livestats {
	padding: var(--space-section) 0;
	position: relative;
	/* Sin color sólido detrás: dejamos que el dot-grid + spotlight del cursor
	   (fixed bajo el body) atraviesen toda la home. Sólo el glow radial azul
	   queda como capa decorativa transparente. */
	background:
		radial-gradient(circle 600px at 50% 0%, color-mix(in srgb, var(--accent-blue) 5%, transparent), transparent 60%);
}
.stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-lg);
}
@media (max-width: 980px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

.stat {
	position: relative;
	padding: 22px;
	background: var(--bg-primary);
	border: 1px solid var(--divider);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
	display: flex; flex-direction: column; gap: 10px;
	overflow: hidden;
	isolation: isolate;
	transition: border-color .25s, transform .25s, box-shadow .25s;
}
.stat:hover {
	transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--accent-blue) 35%, var(--divider));
	box-shadow: var(--shadow-card-hover);
}
.stat::before {
	content: "";
	position: absolute;
	inset: -40px -40px auto auto;
	width: 140px; height: 140px;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--c, var(--accent-blue)) 18%, transparent), transparent 70%);
	z-index: -1;
	opacity: .6;
	pointer-events: none;
}
.stat__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stat__label {
	font-size: 11px; font-weight: 700; letter-spacing: .5px;
	text-transform: uppercase; color: var(--text-secondary);
}
.stat__num {
	font-size: clamp(2rem, 4.5vw, 3rem);
	font-weight: 800; letter-spacing: -.03em; line-height: 1;
	color: var(--c, var(--text-primary));
	font-variant-numeric: tabular-nums;
	font-family: var(--font);
	display: inline-flex; align-items: baseline; gap: 2px;
}
.stat__num small { font-size: .55em; font-weight: 700; opacity: .7; }
.stat__hint {
	font-size: var(--text-xs); color: var(--text-secondary);
	line-height: 1.45; margin-top: auto;
}
.spark {
	margin-top: auto;
	width: 100%; height: 36px;
	display: block;
	overflow: visible;
}

/* — Trust strip — */
.trust-strip {
	margin-top: var(--space-2xl);
	display: flex; align-items: center; justify-content: space-between;
	gap: var(--space-md);
	padding: 18px 24px;
	background: var(--bg-card);
	border: 1px solid var(--divider);
	border-radius: var(--radius-card);
	flex-wrap: wrap;
}
.trust-strip__item {
	display: flex; align-items: center; gap: 12px;
	flex: 1; min-width: 240px;
}
.trust-strip__icon {
	width: 38px; height: 38px; flex-shrink: 0;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--bg-primary);
	border: 1px solid var(--divider);
	border-radius: 10px;
	color: var(--accent-blue);
}
.trust-strip__item > div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.trust-strip__item strong { font-size: var(--text-sm); color: var(--text-primary); font-weight: 700; }
.trust-strip__item > div > span { font-size: var(--text-xs); color: var(--text-secondary); }
.trust-strip__divider {
	width: 1px; align-self: stretch;
	background: var(--divider);
	margin: 0 8px;
}
@media (max-width: 860px) {
	.trust-strip__divider { display: none; }
	.trust-strip { flex-direction: column; align-items: flex-start; padding: 18px; }
	.trust-strip__item { width: 100%; }
}

/* FAQ — los estilos viven en marketing.css (compartidos por home + pricing). */

/* =========================================================
   Reduced motion — corte total de los nuevos efectos
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
	.flow-clip.is-rendering::after,
	.live-dot::before,
	.queue__progress span,
	.flow-clip__progress span { animation: none !important; transition: none !important; }
}

/* =========================================================
   DARK MODE — ajustes mínimos. La mayoría de la home ya usa
   tokens y se adapta sola; solo retocamos el fondo del placeholder
   de imagen del showcase para que no genere un flash blanco.
   ========================================================= */
[data-theme="dark"] .hero__showcase-img { background: var(--bg-card); }

/* Background pass-through (transparente en .hero/.showcase/.cta-banner) y
   ajuste de .home-dot-grid en dark mode viven ahora en main.css, scoped a
   `body.puente-ambient`, para que apliquen también fuera de la portada. */

