/* ==========================================================================
   TradeLab — Tema fintech dark (HTML + Tailwind CDN + Chart.js)
   Paleta: fondo #0a0f1e (azul-negro), superficie #111827, acento #22c55e
   (verde), rojo #ef4444, texto #e5e7eb
   ========================================================================== */

:root {
  --bg:        #0a0f1e;
  --surface:   #111827;
  --surface-2: #1b2436;
  --border:    #243044;
  --text:      #e5e7eb;
  --muted:     #94a3b8;
  --green:     #22c55e;
  --red:       #ef4444;
  --accent:    #22c55e;
  --blue:      #3b82f6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'Manrope', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--green); }

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Navbar ---------- */
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: rgba(10,15,30,.92);
  backdrop-filter: blur(8px); z-index: 100;
}
.navbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--text); }
.navbar .brand .dot { width: 12px; height: 12px; background: var(--green); border-radius: 3px; }
.nav-links { display: flex; gap: 24px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { background: var(--green); color: #04120a !important; padding: 9px 18px; border-radius: 8px; font-weight: 700; }
.nav-cta:hover { background: #16a34a; color: #04120a !important; }

/* ---------- Hero ---------- */
.hero { padding: 70px 0 50px; text-align: center; }
.hero .badge {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(34,197,94,.12); color: var(--green); font-size: .8rem; font-weight: 700;
  letter-spacing: .04em; margin-bottom: 18px;
}
.hero .subtitle { color: var(--muted); max-width: 680px; margin: 0 auto 28px; font-size: 1.1rem; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn { display: inline-block; padding: 13px 26px; border-radius: 10px; font-weight: 700; font-size: .98rem; cursor: pointer; border: 1px solid transparent; transition: .18s ease; }
.btn-primary { background: var(--green); color: #04120a; }
.btn-primary:hover { background: #16a34a; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
/* ---------- Navbar responsive / hamburguesa ---------- */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.4rem;
  width: 42px; height: 42px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); }
  .nav-toggle { display: inline-flex; }
  nav.menu { display: none; width: 100%; }
  nav.menu.open { display: block; }
  .nav-links {
    flex-direction: column;
    gap: 4px;
    padding: 14px 0;
    width: 100%;
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
  }
  .nav-links a:hover { background: var(--surface-2); }
  .nav-links .nav-cta { text-align: center; margin-top: 6px; }
}
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.section { padding: 60px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head p { color: var(--muted); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px; transition: transform .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--green); }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); font-size: .95rem; }

.price-up { color: var(--green); font-weight: 700; }
.price-down { color: var(--red); font-weight: 700; }

/* ---------- Tabla de precios ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table.markets { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.markets th, table.markets td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
table.markets th { color: var(--muted); font-weight: 600; text-transform: uppercase; font-size: .72rem; letter-spacing: .06em; }
table.markets tr:last-child td { border-bottom: none; }
table.markets tr:hover td { background: var(--surface-2); }
.symbol { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.symbol .ticker { color: var(--muted); font-weight: 500; font-size: .8rem; }

/* ---------- Dashboard ---------- */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.stat .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: 1.8rem; font-weight: 800; margin-top: 4px; }
.chart-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.chart-box canvas { width: 100% !important; height: 320px !important; }

.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.pill-green { background: rgba(34,197,94,.15); color: var(--green); }
.pill-red { background: rgba(239,68,68,.15); color: var(--red); }
.pill-blue { background: rgba(59,130,246,.15); color: var(--blue); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 700px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer li a { color: var(--text); font-size: .9rem; }
.footer li a:hover { color: var(--green); }
.legal-note { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem; }

.muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }

/* ==========================================================================
   UPGRADE VISUAL — ambiental tech + animaciones (SUMA, no reemplaza)
   ========================================================================== */

/* ---------- Fondo ambiental animado ---------- */
body.ambient {
  position: relative;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(34,197,94,.14), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(59,130,246,.10), transparent 55%),
    var(--bg);
}
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
}
.particle {
  position: fixed; border-radius: 50%;
  background: var(--green); opacity: .35; z-index: 0; pointer-events: none;
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: .35; }
  90% { opacity: .15; }
  100% { transform: translateY(-110vh) translateX(40px); opacity: 0; }
}

/* ---------- Texto gradiente animado ---------- */
.gradient-text {
  background: linear-gradient(90deg, #22c55e, #3b82f6, #22c55e);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: shimmer 5s linear infinite;
}
@keyframes shimmer {
  to { background-position: 200% center; }
}

/* ---------- Aparición (fade + rise) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: .12s; }
.reveal.delay-2 { transition-delay: .24s; }
.reveal.delay-3 { transition-delay: .36s; }

/* ---------- Card glow (tech) ---------- */
.card.glow { position: relative; overflow: hidden; }
.card.glow::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx,50%) var(--my,0%), rgba(34,197,94,.12), transparent 40%);
  opacity: 0; transition: opacity .35s ease; pointer-events: none;
}
.card.glow:hover::before { opacity: 1; }
.card.glow:hover { border-color: rgba(34,197,94,.55); box-shadow: 0 12px 40px rgba(34,197,94,.12); }

/* ---------- Pulse del badge ---------- */
.pulse-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 8px; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); }
  70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* ---------- Marquee de precios (ticker) ---------- */
.ticker {
  overflow: hidden; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  background: rgba(17,24,39,.6); padding: 10px 0;
}
.ticker-track { display: flex; gap: 40px; white-space: nowrap; animation: ticker 30s linear infinite; will-change: transform; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--muted); }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Botón con brillo ---------- */
.btn-primary.glow-btn {
  position: relative; overflow: hidden;
  box-shadow: 0 0 24px rgba(34,197,94,.35);
  transition: box-shadow .25s ease, transform .18s ease;
}
.btn-primary.glow-btn:hover { box-shadow: 0 0 40px rgba(34,197,94,.6); transform: translateY(-2px); }

/* ---------- Stat con número animado ---------- */
.stat .value.count { font-variant-numeric: tabular-nums; }

/* ---------- Cursor radar en hero ---------- */
.hero { position: relative; }

/* ==========================================================================
   UPGRADE PRO — iconos profesionales + logo-mark (SUMA)
   ========================================================================== */
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--green), #16a34a);
  color: #04120a; font-size: .95rem;
  box-shadow: 0 0 16px rgba(34,197,94,.4);
}
.card h3 i {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  background: rgba(34,197,94,.12); color: var(--green);
  font-size: .95rem; margin-right: 10px; vertical-align: -7px;
  border: 1px solid rgba(34,197,94,.2);
}
.card h3 { display: flex; align-items: center; gap: 4px; }

/* Tipografía display para títulos */
h1, .hero h1 { font-family: 'Space Grotesk', 'Inter', sans-serif; }
h2 { font-family: 'Space Grotesk', 'Inter', sans-serif; letter-spacing: -.02em; }

/* Imagen de hero */
.hero-visual img, .hero-img img {
  border-radius: 16px; border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.img-card {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.img-card img { display: block; width: 100%; height: auto; }

/* Hero de 2 columnas (texto + imagen) */
.hero-split {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
}
@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-split .hero-visual { order: -1; }
}
.hero-visual {
  position: relative;
}
.hero-visual .float-chip {
  position: absolute; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 16px; font-size: .8rem; font-weight: 700;
  box-shadow: 0 12px 30px rgba(0,0,0,.45); display: flex; align-items: center; gap: 8px;
}
.hero-visual .float-chip.top { top: 18px; right: -10px; }
.hero-visual .float-chip.bottom { bottom: 18px; left: -10px; }
.float-chip i { color: var(--green); }

/* ==========================================================================
   UPGRADE PRO 2 — social proof, pasos, mercado en vivo (SUMA)
   ========================================================================== */
/* Paso numerado */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--green), #16a34a);
  color: #04120a; font-weight: 800; font-family: 'Space Grotesk', sans-serif;
  margin-bottom: 12px; box-shadow: 0 0 18px rgba(34,197,94,.35);
}

/* Testimonios */
.quote-card { display: flex; flex-direction: column; gap: 14px; }
.quote-card .quote { font-style: italic; color: var(--text); line-height: 1.6; }
.quote-card .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #22c55e, #3b82f6); color: #fff;
  font-weight: 700; font-family: 'Space Grotesk', sans-serif;
}
.quote-card .author { display: flex; align-items: center; gap: 12px; }
.quote-card .author-name { font-weight: 700; font-size: .9rem; }
.quote-card .author-role { font-size: .78rem; color: var(--muted); }
.quote-card .stars { color: #fbbf24; letter-spacing: 2px; font-size: .85rem; }

/* Indicador mercado en vivo */
.live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .78rem; font-weight: 700; color: var(--green);
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.25);
  padding: 5px 12px; border-radius: 999px;
}
.live-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 1.2s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* Parpadeo de precio (up/down) */
.price-flash-up { animation: flashUp 1s ease; }
.price-flash-down { animation: flashDown 1s ease; }
@keyframes flashUp { 0% { background: rgba(34,197,94,.25); } 100% { background: transparent; } }
@keyframes flashDown { 0% { background: rgba(239,68,68,.25); } 100% { background: transparent; } }

/* Stat-track grid */
.mini-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.stat-pill { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; text-align: center; }
.stat-pill .k { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat-pill .v { font-size: 1.5rem; font-weight: 800; font-family: 'Space Grotesk', sans-serif; margin-top: 4px; }

/* Imagen con overlay de gradiente */
.img-card .grad-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10,15,30,.85));
  pointer-events: none;
}
.img-card { position: relative; }

/* ==========================================================================
   Botones flotantes: WhatsApp + Subir (lado derecho)
   ========================================================================== */
.float-stack {
  position: fixed; right: 22px; bottom: 22px; z-index: 999;
  display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.fab-whatsapp, .fab-top {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border-radius: 50%;
  border: none; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.fab-whatsapp { background: #25D366; color: #fff; font-size: 1.7rem; }
.fab-whatsapp:hover { background: #1ebc5b; transform: translateY(-3px); box-shadow: 0 12px 30px rgba(37,211,102,.45); }
.fab-top {
  background: var(--surface); color: var(--text); font-size: 1.2rem;
  border: 1px solid var(--border); opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s ease, transform .2s ease, visibility .3s;
}
.fab-top.show { opacity: 1; visibility: visible; pointer-events: auto; }
.fab-top:hover { background: var(--surface-2); transform: translateY(-3px); }
.fab-whatsapp .tooltip, .fab-top .tooltip {
  position: absolute; right: 66px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: .78rem; font-weight: 600;
  padding: 6px 12px; border-radius: 8px; opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.fab-whatsapp:hover .tooltip, .fab-top:hover .tooltip { opacity: 1; }
.fab-whatsapp, .fab-top { position: relative; }
