/*
Theme Name: ComboCreador
Theme URI: https://combocreador.es
Author: Fuzzer YT
Author URI: https://combocreador.es
Description: Portal de hardware ultra optimizado para SEO con calculadora de cuello de botella (2020–2026), widget de vida útil gaming, sistema de compartir builds por URL y "Botti", un asistente virtual flotante creado íntegramente con CSS. Modo oscuro premium con acentos violeta y cian sobre Tailwind CSS.
Version: 2.0
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: combocreador
Tags: dark, one-column, custom-menu, translation-ready
*/

/* =========================================================
   ESTILOS BASE DEL TEMA
   (Tailwind CDN aporta las utilidades; aquí viven los
   componentes personalizados que Tailwind CDN no cubre)
   ========================================================= */

:root {
  --mbc-fondo: #070b14;
  --mbc-panel: #0e1526;
  --mbc-panel-2: #0b1324;
  --mbc-borde: #1e2a45;
  --mbc-cian: #22d3ee;
  --mbc-violeta: #8b5cf6;
  --mbc-exito: #34d399;
  --mbc-alerta: #fbbf24;
  --mbc-peligro: #f87171;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--mbc-fondo);
}

::selection {
  background: rgba(126, 166, 255, 0.35);
  color: #ffffff;
}

/* Barra de desplazamiento coherente con el modo oscuro */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--mbc-fondo); }
::-webkit-scrollbar-thumb {
  background: #24304d;
  border-radius: 999px;
  border: 2px solid var(--mbc-fondo);
}
::-webkit-scrollbar-thumb:hover { background: #31456f; }

/* ---------------------------------------------------------
   SELECTORES ESTILIZADOS (CPU, GPU, RAM, almacenamiento)
   --------------------------------------------------------- */
.select-mbc {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  background-color: var(--mbc-panel-2);
  border: 1px solid var(--mbc-borde);
  border-radius: 0.75rem;
  color: #e2e8f0;
  padding: 0.8rem 2.75rem 0.8rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  /* Flecha personalizada dibujada en SVG (sin imágenes externas) */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2322d3ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 14px 9px;
}

.select-mbc:hover { border-color: #31456f; }

.select-mbc:focus-visible {
  outline: none;
  border-color: var(--mbc-cian);
  box-shadow: 0 0 0 3px rgba(126, 166, 255, 0.25);
}

.select-mbc option,
.select-mbc optgroup {
  background: var(--mbc-panel-2);
  color: #e2e8f0;
}

/* ---------------------------------------------------------
   CONTROL SEGMENTADO PARA LA RESOLUCIÓN (1080p / 1440p / 4K)
   --------------------------------------------------------- */
.segmentado {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  background: var(--mbc-panel-2);
  border: 1px solid var(--mbc-borde);
  padding: 0.35rem;
  border-radius: 0.9rem;
}

.segmentado input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmentado label {
  text-align: center;
  padding: 0.55rem 0.5rem;
  border-radius: 0.6rem;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #94a3b8;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}

.segmentado label:hover { color: #e2e8f0; }

.segmentado input:checked + label {
  color: #04070f;
  background: linear-gradient(120deg, var(--mbc-cian), var(--mbc-violeta));
  box-shadow: 0 6px 18px rgba(126, 166, 255, 0.35);
}

.segmentado input:focus-visible + label {
  outline: 2px solid var(--mbc-cian);
  outline-offset: 2px;
}

/* ---------------------------------------------------------
   ZONA DE RESULTADOS: revelado con animación suave
   --------------------------------------------------------- */
.zona-resultados {
  /* Oculta de verdad: no ocupa NADA de espacio hasta que hay resultados.
   * (Antes usaba visibility y dejaba un hueco enorme bajo la calculadora.) */
  display: none;
}

.zona-resultados.visible {
  display: block;
  animation: zona-aparecer 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes zona-aparecer {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}

/* Barras comparativas CPU vs GPU */
.barra {
  height: 14px;
  background: var(--mbc-panel-2);
  border: 1px solid var(--mbc-borde);
  border-radius: 999px;
  overflow: hidden;
}

.barra-relleno {
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.barra-relleno--cpu  { background: linear-gradient(90deg, #0891b2, #22d3ee); }
.barra-relleno--gpu  { background: linear-gradient(90deg, #6d28d9, #a78bfa); }
.barra-relleno--debil { background: linear-gradient(90deg, #b45309, #fbbf24); }

/* Insignias de veredicto */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.6rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.badge--optimo {
  color: var(--mbc-exito);
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(52, 211, 153, 0.08);
}

.badge--moderado {
  color: var(--mbc-alerta);
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.08);
}

.badge--severo {
  color: var(--mbc-peligro);
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
}

/* Accesibilidad: respeto a usuarios con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  .zona-resultados.visible {
    animation: none;
  }
  .barra-relleno {
    transition: none;
  }
}

/* =========================================================
   COMPARTIR BUILD — feedback visual del copiado
   ========================================================= */
.share-feedback {
	opacity: 0;
	transform: translateY(2px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.share-feedback.visible {
	opacity: 1;
	transform: translateY(0);
}

/* =========================================================
   EXPERIENCIA "WOW" — capa visual avanzada
   ========================================================= */

/* --- Título con degradado animado (hero) --- */
.texto-brillo {
	background: linear-gradient(90deg, #00E599, #4D7CFE, #00E599);
	background-size: 300% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: brillo-desplazar 6s linear infinite;
}

@keyframes brillo-desplazar {
	from { background-position: 0% 50%; }
	to   { background-position: 300% 50%; }
}

/* --- Revelado al hacer scroll (ui.js añade .reveal-visible) --- */
.reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-visible {
	opacity: 1;
	transform: translateY(0);
}

/* --- Tarjetas con elevación al pasar el cursor --- */
.tarjeta-3d {
	transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.tarjeta-3d:hover {
	transform: translateY(-6px) scale(1.015);
	border-color: rgba(126, 166, 255, 0.45);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(126, 166, 255, 0.12);
}

/* --- Medidor radial del cuello de botella --- */
.gauge {
	position: relative;
	width: 190px;
	height: 190px;
}

.gauge svg {
	width: 100%;
	height: 100%;
	/* El arco de 270° empieza abajo-izquierda: giramos el círculo. */
	transform: rotate(135deg);
}

.gauge circle {
	fill: none;
	stroke-width: 11;
	stroke-linecap: round;
}

.gauge-fondo {
	stroke: #1D2838;
	stroke-dasharray: 75 25; /* 270° visibles de los 360°. */
}

.gauge-arco {
	stroke: #34D399;
	stroke-dasharray: 0 100; /* El JS anima este trazo. */
	transition: stroke-dasharray 1.1s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.4s ease;
}

.gauge-centro {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
}

/* --- Interruptor DLSS / FSR --- */
.interruptor {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	user-select: none;
}

.interruptor input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.interruptor-pista {
	flex-shrink: 0;
	width: 52px;
	height: 28px;
	border-radius: 999px;
	background: #091018;
	border: 1px solid #1D2838;
	position: relative;
	transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
	margin-top: 2px;
}

.interruptor-bola {
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #64748B;
	transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.interruptor input:checked + .interruptor-pista {
	background: linear-gradient(90deg, rgba(126, 166, 255, 0.25), rgba(77, 124, 254, 0.25));
	border-color: #7EA6FF;
	box-shadow: 0 0 14px rgba(126, 166, 255, 0.35);
}

.interruptor input:checked + .interruptor-pista .interruptor-bola {
	transform: translateX(24px);
	background: #7EA6FF;
	box-shadow: 0 0 10px rgba(126, 166, 255, 0.8);
}

.interruptor input:focus-visible + .interruptor-pista {
	outline: 2px solid #7EA6FF;
	outline-offset: 3px;
}

.interruptor-texto strong {
	display: block;
	color: #E2E8F0;
	font-weight: 600;
}

.interruptor-texto small {
	display: block;
	margin-top: 2px;
	color: #64748B;
	font-size: 0.78rem;
	line-height: 1.4;
}

/* --- Parrilla de FPS por juego --- */
.fps-fila {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
}

.fps-info {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.fps-juego {
	color: #E2E8F0;
	font-weight: 600;
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fps-badge {
	flex-shrink: 0;
	font-size: 0.62rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 3px 8px;
	border-radius: 999px;
	border: 1px solid currentColor;
}

.fps-derecha {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 220px;
	justify-content: flex-end;
}

.fps-barra {
	flex: 1 1 auto;
	max-width: 220px;
	height: 6px;
	border-radius: 999px;
	background: #091018;
	overflow: hidden;
}

.fps-barra-relleno {
	height: 100%;
	border-radius: inherit;
	width: 0;
	transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
	background: currentColor;
}

.fps-valor {
	font-family: 'Chakra Petch', sans-serif;
	font-weight: 700;
	color: #E2E8F0;
	min-width: 78px;
	text-align: right;
	font-size: 0.95rem;
}

.fps-valor small { color: #64748B; font-size: 0.65rem; }

/* Colores por categoría de fluidez (badge + barra vía currentColor). */
.fps--competitivo { color: #34D399; }
.fps--fluido      { color: #7EA6FF; }
.fps--jugable     { color: #FBBF24; }
.fps--critico     { color: #F87171; }

/* --- Acordeón del FAQ SEO --- */
.acordeon {
	border: 1px solid rgba(255, 255, 255, 0.09);
	border-radius: 14px;
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
	-webkit-backdrop-filter: blur(16px) saturate(140%);
	backdrop-filter: blur(16px) saturate(140%);
	overflow: hidden;
	transition: border-color 0.25s ease;
}

.acordeon[open] { border-color: rgba(126, 166, 255, 0.4); }

.acordeon summary {
	cursor: pointer;
	list-style: none;
	padding: 16px 44px 16px 18px;
	color: #E2E8F0;
	font-weight: 600;
	position: relative;
}

.acordeon summary::-webkit-details-marker { display: none; }

.acordeon summary::after {
	content: '+';
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	color: #7EA6FF;
	font-size: 1.3rem;
	font-weight: 400;
	transition: transform 0.25s ease;
}

.acordeon[open] summary::after { transform: translateY(-50%) rotate(45deg); }

.acordeon p {
	padding: 0 18px 16px;
	color: #94A3B8;
	font-size: 0.92rem;
	line-height: 1.6;
}

/* --- Accesibilidad: movimiento reducido --- */
@media (prefers-reduced-motion: reduce) {
	.texto-brillo { animation: none; }
	.reveal { opacity: 1; transform: none; transition: none; }
	.tarjeta-3d, .gauge-arco, .fps-barra-relleno { transition: none; }
}

/* =========================================================
   LOGO COMBOCREADOR (header)
   ========================================================= */
.logo-combo {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}

.logo-icono {
	display: block;
	width: 40px;
	height: 40px;
	filter: drop-shadow(0 0 8px rgba(126, 166, 255, 0.45));
	transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-combo:hover .logo-icono {
	transform: rotate(-8deg) scale(1.08);
	filter: drop-shadow(0 0 14px rgba(77, 124, 254, 0.7));
}

.logo-icono svg { width: 100%; height: 100%; }

.logo-texto { display: flex; flex-direction: column; line-height: 1.05; }

.logo-nombre {
	font-family: 'Chakra Petch', sans-serif;
	font-weight: 800;
	font-size: 1rem;
	letter-spacing: 0.06em;
	color: #FFFFFF;
}

.logo-nombre em {
	font-style: normal;
	background: linear-gradient(90deg, #00E599, #4D7CFE);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.logo-lema {
	font-size: 0.58rem;
	font-weight: 600;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: #64748B;
}

/* =========================================================
   EFECTOS NEÓN DE LA CALCULADORA
   ========================================================= */

/* Tarjeta con borde de neón animado: un degradado cónico girando por
 * detrás de la tarjeta, visible solo en el borde (técnica de doble capa). */
.tarjeta-neon {
	position: relative;
	background: rgba(14, 21, 38, 0.92) !important;
	border: 1px solid transparent !important;
	background-clip: padding-box !important;
	overflow: visible;
}

.tarjeta-neon::before {
	content: '';
	position: absolute;
	inset: -2px;
	z-index: -1;
	border-radius: inherit;
	background: conic-gradient(
		from var(--angulo-neon, 0deg),
		#00E599, #4D7CFE, #060A12 32%, #060A12 68%, #4D7CFE, #00E599
	);
	animation: neon-girar 6s linear infinite;
	filter: blur(0.5px);
}

.tarjeta-neon::after {
	content: '';
	position: absolute;
	inset: -18px;
	z-index: -2;
	border-radius: inherit;
	background: radial-gradient(closest-side, rgba(126, 166, 255, 0.16), transparent);
	filter: blur(22px);
}

/* La propiedad registrada permite ANIMAR el ángulo del degradado cónico. */
@property --angulo-neon {
	syntax: '<angle>';
	initial-value: 0deg;
	inherits: false;
}

@keyframes neon-girar {
	to { --angulo-neon: 360deg; }
}

/* Selectores con foco de neón */
.select-mbc:focus {
	border-color: #7EA6FF !important;
	box-shadow:
		0 0 0 1px #7EA6FF,
		0 0 16px rgba(126, 166, 255, 0.45),
		inset 0 0 12px rgba(126, 166, 255, 0.08) !important;
	outline: none;
}

.select-mbc:hover {
	border-color: rgba(126, 166, 255, 0.5);
	box-shadow: 0 0 10px rgba(126, 166, 255, 0.18);
}

/* Botón principal con latido de neón */
.btn-neon {
	position: relative;
	animation: boton-latido 2.6s ease-in-out infinite;
}

.btn-neon:hover { animation-play-state: paused; }

@keyframes boton-latido {
	0%, 100% { box-shadow: 0 0 18px rgba(126, 166, 255, 0.35), 0 0 40px rgba(77, 124, 254, 0.15); }
	50%      { box-shadow: 0 0 30px rgba(126, 166, 255, 0.65), 0 0 70px rgba(77, 124, 254, 0.35); }
}

@media (prefers-reduced-motion: reduce) {
	.tarjeta-neon::before { animation: none; }
	.btn-neon { animation: none; }
	.logo-icono, .logo-combo:hover .logo-icono { transition: none; transform: none; }
}

/* =========================================================
   LANDING DE PRESENTACIÓN
   ========================================================= */

/* Botti a gran escala en el hero de presentación */
.botti-presentacion {
	width: 300px;
	height: 325px;
	filter: drop-shadow(0 24px 50px rgba(126, 166, 255, 0.18));
}

.botti-presentacion .botti {
	transform: scale(1.3);
	transform-origin: top center;
	margin: 0 auto;
}

/* CTA gigante de conversión */
.cta-gigante {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 22px 46px;
	border-radius: 20px;
	background: linear-gradient(90deg, #00E599, #4D7CFE);
	text-decoration: none;
	transition: transform 0.25s ease;
}

.cta-gigante:hover { transform: scale(1.05); }

.cta-gigante-texto {
	font-family: 'Chakra Petch', sans-serif;
	font-weight: 900;
	font-size: clamp(1rem, 3.5vw, 1.5rem);
	letter-spacing: 0.06em;
	color: #060A12;
}

.cta-gigante-sub {
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(7, 11, 20, 0.75);
}

@media (max-width: 480px) {
	.botti-presentacion { width: 240px; height: 274px; }
	.botti-presentacion .botti { transform: scale(1.05); }
	.cta-gigante { padding: 18px 28px; }
}

/* =========================================================
   SISTEMA GLASSMORPHISM — cristal esmerilado premium
   =========================================================
   .glass       → paneles principales (calculadora, resultados, tarjetas)
   .glass-suave → cajitas interiores (métricas, widgets)
   Ambos combinan: fondo translúcido con degradado, desenfoque del
   contenido de detrás (backdrop-filter), borde de luz superior y
   sombra profunda. El fondo de partículas se ve "a través" del cristal.
   ========================================================= */

.glass {
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02) 55%, rgba(77, 124, 254, 0.04));
	-webkit-backdrop-filter: blur(22px) saturate(160%);
	backdrop-filter: blur(22px) saturate(160%);
	border: 1px solid rgba(255, 255, 255, 0.10);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.12),
		inset 0 0 24px rgba(255, 255, 255, 0.02),
		0 16px 40px rgba(0, 0, 0, 0.45);
}

.glass-suave {
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
	-webkit-backdrop-filter: blur(14px) saturate(140%);
	backdrop-filter: blur(14px) saturate(140%);
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Destello de luz que barre las tarjetas al pasar el cursor (efecto premium) */
.tarjeta-3d { position: relative; overflow: hidden; }

.tarjeta-3d::after {
	content: '';
	position: absolute;
	top: 0;
	left: -80%;
	width: 55%;
	height: 100%;
	background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.10), transparent);
	transform: skewX(-18deg);
	transition: left 0.7s ease;
	pointer-events: none;
}

.tarjeta-3d:hover::after { left: 130%; }

/* Selectores de la calculadora en cristal */
.select-mbc {
	background-color: rgba(255, 255, 255, 0.045) !important;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-color: rgba(255, 255, 255, 0.12) !important;
}

/* La tarjeta neón de la calculadora pasa a interior de cristal:
 * el borde animado sigue girando por detrás, pero el panel deja ver
 * las partículas desenfocadas a través suyo. */
.tarjeta-neon {
	background: linear-gradient(160deg, rgba(20, 30, 55, 0.72), rgba(10, 16, 32, 0.66)) !important;
	-webkit-backdrop-filter: blur(24px) saturate(160%);
	backdrop-filter: blur(24px) saturate(160%);
}

/* Cabecera del sitio: cristal fino */
.site-header-glass {
	background: rgba(10, 16, 30, 0.55) !important;
	-webkit-backdrop-filter: blur(18px) saturate(150%);
	backdrop-filter: blur(18px) saturate(150%);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Plan B para navegadores sin backdrop-filter: fondo más opaco. */
@supports not (backdrop-filter: blur(1px)) {
	.glass, .tarjeta-neon { background: rgba(14, 21, 38, 0.94) !important; }
	.glass-suave { background: rgba(11, 18, 34, 0.92); }
	.site-header-glass { background: rgba(10, 16, 30, 0.95) !important; }
}

/* =========================================================
   NIVEL PREMIUM 4.0 — micro-detalles y scroll
   ========================================================= */

/* Desplazamiento suave en anclas (#calculadora, #faq…) */
html { scroll-behavior: smooth; }

/* Selección de texto con la identidad de marca */
::selection { background: rgba(77, 124, 254, 0.45); color: #FFFFFF; }

/* Barra de progreso de lectura (la inyecta ui.js) */
#barra-progreso {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0;
	z-index: 60;
	background: linear-gradient(90deg, #00E599, #4D7CFE);
	box-shadow: 0 0 12px rgba(126, 166, 255, 0.7);
	pointer-events: none;
	transition: width 0.1s linear;
}

/* Header reactivo: se compacta y gana profundidad al bajar */
.site-header-glass { transition: box-shadow 0.3s ease, padding 0.3s ease; }

.site-header-glass.encogido {
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.site-header-glass.encogido > div { padding-top: 0.6rem; padding-bottom: 0.6rem; }
.site-header-glass > div { transition: padding 0.3s ease; }

/* Capas parallax: solo transform, sin repintados costosos */
.parallax { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	#barra-progreso { transition: none; }
}

/* =========================================================
   MÓVIL PRIMERO — rendimiento y ergonomía táctil
   ========================================================= */

/* Sin destello azul al tocar en Android/iOS */
* { -webkit-tap-highlight-color: transparent; }

@media (max-width: 767px) {

	/* El desenfoque de cristal es caro en GPUs móviles: se reduce a la
	 * mitad manteniendo el efecto (imperceptible, el doble de fluido). */
	.glass, .tarjeta-neon {
		-webkit-backdrop-filter: blur(12px) saturate(140%);
		backdrop-filter: blur(12px) saturate(140%);
	}
	.glass-suave, .site-header-glass {
		-webkit-backdrop-filter: blur(8px) saturate(130%);
		backdrop-filter: blur(8px) saturate(130%);
	}

	/* El borde de neón animado consume batería: versión estática en móvil */
	.tarjeta-neon::before { animation: none; }

	/* CTA gigante a ancho completo y con área táctil generosa */
	.cta-gigante {
		width: 100%;
		padding: 18px 20px;
	}

	/* Medidor radial algo más compacto */
	.gauge { width: 160px; height: 160px; }

	/* Barras de FPS: el valor no se descuelga */
	.fps-derecha { flex-basis: 100%; }

	/* Chat de NEXO: más alto en móvil (la pantalla es vertical) */
	.botti-chat { max-height: 46vh; }

	/* Lanzador flotante más discreto para no tapar contenido */
	.botti-lanzador {
		width: 104px;
		height: 113px;
	}
	.botti-lanzador .botti { transform: scale(0.45); }
}

/* Área táctil mínima de 44px en todos los controles interactivos */
.botti-chip, .botti-enviar, .segmentado label, .select-mbc {
	min-height: 44px;
}

/* =========================================================
   DIRECCIÓN DE ARTE 7.0 — nivel Awwwards
   ========================================================= */

/* --- 1. FONDO AURORA: tres masas de color vivas tras todo el sitio --- */
body::before {
	content: '';
	position: fixed;
	inset: -20%;
	z-index: -30;
	pointer-events: none;
	background:
		radial-gradient(38% 32% at 18% 22%, rgba(77, 124, 254, 0.20), transparent 70%),
		radial-gradient(34% 30% at 82% 12%, rgba(0, 229, 153, 0.12), transparent 70%),
		radial-gradient(42% 38% at 60% 88%, rgba(77, 124, 254, 0.14), transparent 70%);
	animation: aurora-deriva 26s ease-in-out infinite alternate;
	will-change: transform;
}

@keyframes aurora-deriva {
	0%   { transform: translate3d(0, 0, 0) scale(1); }
	50%  { transform: translate3d(3%, -2%, 0) scale(1.06); }
	100% { transform: translate3d(-3%, 2%, 0) scale(1.02); }
}

/* --- 2. GRANO DE PELÍCULA: el secreto de las webs premium --- */
body::after {
	content: '';
	position: fixed;
	inset: 0;
	z-index: 70;
	pointer-events: none;
	opacity: 0.05;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
	mix-blend-mode: overlay;
}

/* --- 3. TIPOGRAFÍA EDITORIAL --- */

/* Etiqueta de sección numerada, con línea de continuación */
.kicker {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: #00E599;
	margin-bottom: 14px;
}

.kicker::after {
	content: '';
	flex: 0 0 56px;
	height: 1px;
	background: linear-gradient(90deg, rgba(0, 229, 153, 0.7), transparent);
}

.kicker--centrado { justify-content: center; }
.kicker--centrado::before {
	content: '';
	flex: 0 0 56px;
	height: 1px;
	background: linear-gradient(270deg, rgba(0, 229, 153, 0.7), transparent);
}

/* Titular de héroe a escala editorial */
.titulo-hero {
	font-size: clamp(2.6rem, 9vw, 5.4rem);
	line-height: 1.02;
	letter-spacing: -0.03em;
}

/* --- 4. COREOGRAFÍA DE ENTRADA DEL HÉROE --- */
.entrada {
	opacity: 0;
	animation: entrada-subir 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.entrada--1 { animation-delay: 0.05s; }
.entrada--2 { animation-delay: 0.18s; }
.entrada--3 { animation-delay: 0.32s; }
.entrada--4 { animation-delay: 0.46s; }
.entrada--5 { animation-delay: 0.60s; }

@keyframes entrada-subir {
	from { opacity: 0; transform: translateY(28px); }
	to   { opacity: 1; transform: none; }
}

/* --- 5. MARQUEE INFINITO DE HARDWARE --- */
.marquee {
	position: relative;
	overflow: hidden;
	padding: 14px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-pista {
	display: flex;
	gap: 44px;
	width: max-content;
	animation: marquee-correr 30s linear infinite;
}

.marquee span {
	font-family: 'Chakra Petch', sans-serif;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(226, 232, 240, 0.4);
	white-space: nowrap;
}

.marquee span em { font-style: normal; color: #00E599; }

@keyframes marquee-correr {
	to { transform: translateX(-50%); }
}

/* --- 6. TILT 3D CON EL PUNTERO (ui.js aplica las variables) --- */
.tarjeta-3d {
	transform-style: preserve-3d;
	transform:
		perspective(900px)
		rotateX(var(--tilt-x, 0deg))
		rotateY(var(--tilt-y, 0deg))
		translateY(var(--alza, 0));
	transition: transform 0.18s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.tarjeta-3d:hover { --alza: -6px; }

/* --- 7. CTA con barrido de brillo al pasar --- */
.cta-gigante { position: relative; overflow: hidden; }

.cta-gigante::after {
	content: '';
	position: absolute;
	top: 0;
	left: -70%;
	width: 45%;
	height: 100%;
	background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.35), transparent);
	transform: skewX(-18deg);
	transition: left 0.6s ease;
}

.cta-gigante:hover::after { left: 130%; }

/* --- Bento: tarjetas destacadas del grid --- */
.bento-destacada {
	background:
		radial-gradient(120% 120% at 100% 0%, rgba(0, 229, 153, 0.10), transparent 55%),
		linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

@media (prefers-reduced-motion: reduce) {
	body::before { animation: none; }
	.entrada { animation: none; opacity: 1; }
	.marquee-pista { animation: none; }
	.tarjeta-3d { transform: none; }
}

@media (max-width: 767px) {
	body::after { display: none; }        /* Grano fuera en móvil (GPU). */
	.marquee-pista { animation-duration: 22s; }
}

/* =========================================================
   MODO ANÁLISIS — la calculadora cobra vida al calcular
   ========================================================= */

/* Overlay de escaneo: rejilla holográfica + línea láser descendente */
.escaner-overlay {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	overflow: hidden;
	pointer-events: none;
	z-index: 5;
	background-image:
		linear-gradient(rgba(0, 229, 153, 0.05) 1px, transparent 1px),
		linear-gradient(90deg, rgba(0, 229, 153, 0.05) 1px, transparent 1px);
	background-size: 34px 34px;
	animation: escaner-aparecer 0.25s ease;
}

.escaner-linea {
	position: absolute;
	left: 0;
	right: 0;
	top: -12%;
	height: 90px;
	background: linear-gradient(180deg,
		transparent,
		rgba(0, 229, 153, 0.14) 55%,
		rgba(0, 229, 153, 0.55) 98%,
		#00E599 100%);
	box-shadow: 0 3px 22px rgba(0, 229, 153, 0.55);
	animation: escaner-barrer 1s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes escaner-barrer {
	0%   { top: -14%; }
	100% { top: 108%; }
}

@keyframes escaner-aparecer {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* La tarjeta entera late mientras analiza */
.tarjeta-neon:has(.escaner-overlay) {
	animation: analisis-latido 1s ease-in-out infinite;
}

@keyframes analisis-latido {
	0%, 100% { box-shadow: 0 0 24px rgba(0, 229, 153, 0.15); }
	50%      { box-shadow: 0 0 52px rgba(0, 229, 153, 0.45); }
}

/* Botón en modo análisis: degradado en movimiento */
.btn-analizando {
	background: linear-gradient(90deg, #00E599, #4D7CFE, #00E599) !important;
	background-size: 220% 100% !important;
	animation: analisis-degradado 1.1s linear infinite;
	cursor: wait;
}

@keyframes analisis-degradado {
	to { background-position: -220% 0; }
}

/* Puntos de carga con rebote secuencial */
.puntos-carga span {
	display: inline-block;
	animation: punto-saltar 1s ease-in-out infinite;
}

.puntos-carga span:nth-child(2) { animation-delay: 0.15s; }
.puntos-carga span:nth-child(3) { animation-delay: 0.3s; }

@keyframes punto-saltar {
	0%, 60%, 100% { transform: translateY(0); }
	30%           { transform: translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
	.escaner-linea, .btn-analizando, .puntos-carga span { animation: none; }
	.tarjeta-neon:has(.escaner-overlay) { animation: none; }
}
