Procházet zdrojové kódy

refactor(web): fondo canvas dinámico, tipografía grande, topología y routers fieles a la app

- Fondo canvas con red de partículas conectadas (acento/tunnel/ok) y parallax.
- Tipografía mucho más grande y espacio mejor aprovechado (container 1320px,
  hero 100vh, stage 72vh, h1 hasta 8.5rem).
- HealthRing con gradiente cyan→esmeralda y pill como en la app.
- Topología fiel: viewBox 1000×680, gateway central, 3 APs, anillos guía
  wifi, Internet con anillo orbital, peers WG con pulso, chips con badges
  de banda/LLDP, links coloreados (verde cable, ámbar wifi, violeta WG).
- Router cards fieles: icono, role pill, health ring 56px, métricas con
  iconos, sparkline, status pill y chevron.
- Nuevas claves i18n para routers (clients, roleGW, roleAP, online, warn)
  en los 10 idiomas.
gnacho před 4 měsíci
rodič
revize
3de481fadc
3 změnil soubory, kde provedl 641 přidání a 449 odebrání
  1. 398 262
      web/app.js
  2. 14 7
      web/index.html
  3. 229 180
      web/styles.css

+ 398 - 262
web/app.js

@@ -1,19 +1,30 @@
 /* ============================================================
-   NetPulse landing — app.js
-   Teatro sticky por scroll, widgets animados con datos reales
-   del demo, widget de apariencia (tema + acento) y miscelánea.
+   NetPulse landing — app.js v2
+   Fondo canvas, tipografía grande, topología fiel a la app.
    ============================================================ */
 
 const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches
 
+const COLOR = {
+  accent: '#22D3EE',
+  tunnel: '#A78BFA',
+  ok: '#34D399',
+  warn: '#FBBF24',
+  danger: '#F87171',
+  info: '#60A5FA',
+}
+
+function getCssVar(name) {
+  const s = getComputedStyle(document.documentElement).getPropertyValue(`--${name}`).trim().split(' ')
+  return `rgb(${s.join(' ')})`
+}
+
 /* ---------- helpers ---------- */
 function easeOutCubic(x) { return 1 - Math.pow(1 - x, 3) }
+function easeOutExpo(x) { return x === 1 ? 1 : 1 - Math.pow(2, -10 * x) }
 
 function animateNumber(el, target, { decimals = 0, suffix = '', duration = 1200, format } = {}) {
-  if (reduceMotion) {
-    el.textContent = format ? format(target) : target.toFixed(decimals) + suffix
-    return
-  }
+  if (reduceMotion) { el.textContent = format ? format(target) : target.toFixed(decimals) + suffix; return }
   const start = performance.now()
   function frame(now) {
     const p = Math.min(1, (now - start) / duration)
@@ -30,6 +41,83 @@ function fmtLocale(n, decimals = 0) {
   })
 }
 
+function mkSvgEl(tag, attrs = {}, parent) {
+  const e = document.createElementNS('http://www.w3.org/2000/svg', tag)
+  Object.entries(attrs).forEach(([k, v]) => e.setAttribute(k, v))
+  if (parent) parent.appendChild(e)
+  return e
+}
+
+/* ---------- fondo canvas dinámico (red de partículas) ---------- */
+function initBackgroundCanvas() {
+  const canvas = document.getElementById('bgCanvas')
+  if (!canvas || reduceMotion) return
+  const ctx = canvas.getContext('2d')
+  let w, h, particles = [], mx = 0, my = 0, targetMx = 0, targetMy = 0
+
+  function resize() {
+    w = canvas.width = window.innerWidth
+    h = canvas.height = window.innerHeight
+    const count = Math.min(120, Math.max(40, Math.floor((w * h) / 18000)))
+    particles = Array.from({ length: count }, () => ({
+      x: Math.random() * w, y: Math.random() * h,
+      vx: (Math.random() - 0.5) * 0.25, vy: (Math.random() - 0.5) * 0.25,
+      r: 0.5 + Math.random() * 1.5, pulse: Math.random() * Math.PI * 2,
+    }))
+  }
+  resize()
+  window.addEventListener('resize', resize)
+  document.addEventListener('mousemove', e => { targetMx = e.clientX; targetMy = e.clientY }, { passive: true })
+  document.addEventListener('touchmove', e => { if (e.touches[0]) { targetMx = e.touches[0].clientX; targetMy = e.touches[0].clientY } }, { passive: true })
+
+  function draw(t) {
+    mx += (targetMx - mx) * 0.05
+    my += (targetMy - my) * 0.05
+    ctx.clearRect(0, 0, w, h)
+    const accent = getCssVar('accent')
+    const tunnel = getCssVar('tunnel')
+    const ok = getCssVar('ok')
+
+    for (let i = 0; i < particles.length; i++) {
+      const p = particles[i]
+      p.x += p.vx + (mx - w / 2) * 0.00004
+      p.y += p.vy + (my - h / 2) * 0.00004
+      if (p.x < -20) p.x = w + 20; if (p.x > w + 20) p.x = -20
+      if (p.y < -20) p.y = h + 20; if (p.y > h + 20) p.y = -20
+      const pulse = 0.5 + 0.5 * Math.sin(t * 0.001 + p.pulse)
+      ctx.beginPath()
+      ctx.arc(p.x, p.y, p.r * pulse, 0, Math.PI * 2)
+      ctx.fillStyle = i % 7 === 0 ? accent : i % 5 === 0 ? tunnel : ok
+      ctx.globalAlpha = 0.25 + 0.25 * pulse
+      ctx.fill()
+    }
+
+    ctx.globalAlpha = 1
+    const connectDist = 130
+    for (let i = 0; i < particles.length; i++) {
+      let a = particles[i]
+      for (let j = i + 1; j < particles.length; j++) {
+        let b = particles[j]
+        const dx = a.x - b.x, dy = a.y - b.y, d2 = dx * dx + dy * dy
+        if (d2 < connectDist * connectDist) {
+          const d = Math.sqrt(d2)
+          ctx.beginPath()
+          ctx.moveTo(a.x, a.y)
+          ctx.lineTo(b.x, b.y)
+          const col = (i + j) % 3 === 0 ? accent : (i + j) % 3 === 1 ? tunnel : ok
+          ctx.strokeStyle = col
+          ctx.globalAlpha = 0.08 * (1 - d / connectDist)
+          ctx.lineWidth = 0.8
+          ctx.stroke()
+        }
+      }
+    }
+    ctx.globalAlpha = 1
+    requestAnimationFrame(draw)
+  }
+  requestAnimationFrame(draw)
+}
+
 /* ---------- count-up hero ---------- */
 function heroCountUps() {
   document.querySelectorAll('#heroStrip [data-count]').forEach(el => {
@@ -45,7 +133,7 @@ function renderTicker() {
   const el = document.getElementById('ticker')
   if (!el) return
   const items = [
-    `<span><i class="dot" style="background:rgb(var(--ok))"></i><i data-i18n-inline="strip.health">${t('strip.health')}</i>&nbsp;<i class="font-mono">92/100</i></span>`,
+    `<span><i class="dot" style="background:rgb(var(--ok))"></i><i>${t('strip.health')}</i>&nbsp;<i class="font-mono">92/100</i></span>`,
     `<span><i class="dot" style="background:rgb(var(--accent))"></i><i>${t('strip.down')}</i>&nbsp;<i class="font-mono">84.2 Mbps</i></span>`,
     `<span><i class="dot" style="background:rgb(var(--tunnel))"></i><i>${t('strip.up')}</i>&nbsp;<i class="font-mono">12.6 Mbps</i></span>`,
     `<span><i class="dot" style="background:rgb(var(--info))"></i><i>${t('strip.latency')}</i>&nbsp;<i class="font-mono">8 ms</i></span>`,
@@ -54,7 +142,6 @@ function renderTicker() {
     `<span><i class="dot" style="background:rgb(var(--warn))"></i><i>DNS</i>&nbsp;<i class="font-mono">14 ms</i></span>`,
     `<span><i class="dot" style="background:rgb(var(--ok))"></i><i>WireGuard</i>&nbsp;<i class="font-mono">peer phone · ${t('alerts.ago')} 2 min</i></span>`,
   ]
-  // duplicado para loop continuo
   el.innerHTML = items.join('') + items.join('')
 }
 
@@ -65,13 +152,9 @@ function playRing() {
   ringPlayed = true
   const arc = document.getElementById('ringArc')
   const num = document.getElementById('ringNum')
-  const C = 490.1
+  const C = 590.6
   const score = DEMO.score
-  if (reduceMotion) {
-    arc.style.strokeDashoffset = C * (1 - score / 100)
-    num.textContent = score
-    return
-  }
+  if (reduceMotion) { arc.style.strokeDashoffset = C * (1 - score / 100); num.textContent = score; return }
   const dur = 1300
   const start = performance.now()
   function frame(now) {
@@ -89,8 +172,7 @@ function playRing() {
 let trafficPlayed = false
 let trafficTimer = null
 function genSeries(n, base, amp, seed = 1) {
-  const out = []
-  let s = seed
+  const out = []; let s = seed
   for (let i = 0; i < n; i++) {
     s = (s * 9301 + 49297) % 233280
     const noise = s / 233280
@@ -105,10 +187,10 @@ function pathFrom(data, W, H, max) {
 function playTraffic() {
   if (trafficPlayed) return
   trafficPlayed = true
-  const W = 400, H = 120
-  const downData = genSeries(48, DEMO.down, 18, 7)
-  const upData = genSeries(48, DEMO.up, 5, 13)
-  const max = 110
+  const W = 480, H = 160
+  const downData = genSeries(52, DEMO.down, 22, 7)
+  const upData = genSeries(52, DEMO.up, 6, 13)
+  const max = 120
   const lineDown = document.getElementById('lineDown')
   const lineUp = document.getElementById('lineUp')
   const areaDown = document.getElementById('areaDown')
@@ -124,15 +206,14 @@ function playTraffic() {
     document.getElementById('wanLat').textContent = DEMO.latency
     return
   }
-  // dibujar progresivamente
   const Ld = lineDown.getTotalLength()
   const Lu = lineUp.getTotalLength()
   lineDown.style.strokeDasharray = Ld
   lineUp.style.strokeDasharray = Lu
   lineDown.style.strokeDashoffset = Ld
   lineUp.style.strokeDashoffset = Lu
-  const dur = 1500
   const start = performance.now()
+  const dur = 1500
   function frame(now) {
     const p = Math.min(1, (now - start) / dur)
     const e = easeOutCubic(p)
@@ -153,154 +234,234 @@ function startLiveJitter() {
   const upEl = document.getElementById('wanUp')
   trafficTimer = setInterval(() => {
     if (!downEl.isConnected) return
-    const d = DEMO.down + (Math.random() - 0.5) * 6
-    const u = DEMO.up + (Math.random() - 0.5) * 2
-    downEl.textContent = Math.max(60, d).toFixed(1)
-    upEl.textContent = Math.max(9, u).toFixed(1)
-  }, 2500)
+    const d = Math.max(55, DEMO.down + (Math.random() - 0.5) * 7)
+    const u = Math.max(9, DEMO.up + (Math.random() - 0.5) * 2.5)
+    downEl.textContent = d.toFixed(1)
+    upEl.textContent = u.toFixed(1)
+  }, 2600)
 }
 
-/* ---------- stage 2: topology ---------- */
+/* ---------- stage 2: topología fiel a la app ---------- */
 let topoBuilt = false
 function buildTopo() {
   if (topoBuilt) return
   topoBuilt = true
   const svg = document.getElementById('topoSvg')
   const NS = 'http://www.w3.org/2000/svg'
-  const cx = 260, cy = 175
-  // gateway central
-  const gw = { x: cx, y: cy, r: 26, label: t('topo.gw') + ' · Flint 2', cls: 'gw' }
-  // APs en anillo
-  const aps = [
-    { x: cx - 150, y: cy - 70, label: 'AP-Estudio' },
-    { x: cx + 150, y: cy - 70, label: 'AP-Salon' },
-    { x: cx, y: cy + 120, label: 'AP-Dormitorio' },
-  ]
-  // clientes
-  const clients = [
-    { x: cx - 210, y: cy + 20, label: 'tv-salon', wired: true },
-    { x: cx - 190, y: cy - 140, label: 'laptop-nacho', wired: false },
-    { x: cx + 205, y: cy - 130, label: 'phone', wired: false },
-    { x: cx + 215, y: cy + 10, label: 'printer', wired: true },
-    { x: cx + 70, y: cy + 150, label: 'tablet', wired: false },
-    { x: cx - 60, y: cy + 155, label: 'cam-patio', wired: false },
-  ]
-  const wg = { x: cx, y: 28, label: t('topo.inet') }
+  svg.setAttribute('viewBox', '0 0 1000 680')
+  const canvas = getCssVar('canvas')
 
-  const mkEl = (tag, attrs = {}) => {
+  const mk = (tag, attrs, parent) => {
     const e = document.createElementNS(NS, tag)
     Object.entries(attrs).forEach(([k, v]) => e.setAttribute(k, v))
+    if (parent) parent.appendChild(e)
     return e
   }
 
-  // edges: cliente→AP, AP→GW, GW→Internet
-  // addEdge devuelve [line, dot?] — ambos deben ir al DOM y a la coreografía
-  let edgeSeq = 0
-  const addEdge = (a, b, color, width = 1.5, flow = false) => {
-    const line = mkEl('line', {
-      x1: a.x, y1: a.y, x2: b.x, y2: b.y,
-      stroke: color, 'stroke-width': width, 'stroke-linecap': 'round',
-      class: 'topo-edge', pathLength: 1,
+  const order = []
+  const svgAppend = (e) => { svg.appendChild(e); order.push(e) }
+
+  // --- definición de iconos (paths simples) ---
+  const iconPaths = {
+    cloud: 'M17 19.2a4 4 0 0 1-3.2-6.4 4.1 4.1 0 0 1 2.7-7.3 4 4 0 0 1 6.6-1.6 4 4 0 0 1 3.6 6.5M17 19.2H6.5a4.5 4.5 0 0 1 0-9h.6a5 5 0 0 1 9.3-1.2',
+    router: 'M4 14h16v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-5zm4-8h8M6 9h12M8 6h8',
+    ap: 'M12 20v-6m-3-4a3 3 0 0 1 6 0m-9-4a6 6 0 0 1 12 0',
+    laptop: 'M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8H4V6zm-2 10h20l-2 3H4l-2-3z',
+    phone: 'M12 22h5a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h5m0-13h.01',
+    tv: 'M4 6h16v11H4zm4 17h8m-4-6v6',
+    switch: 'M4 7h16M4 12h16M4 17h16',
+  }
+  const drawIcon = (name, x, y, size, color, parent) => {
+    const g = mk('g', { transform: `translate(${x - size / 2}, ${y - size / 2})`, fill: 'none', stroke: color, 'stroke-width': 1.75, 'stroke-linecap': 'round', 'stroke-linejoin': 'round' }, parent)
+    mk('path', { d: iconPaths[name], transform: `scale(${size / 24})` }, g)
+    return g
+  }
+
+  // --- nodos canónicos de la app ---
+  const gw = { id: 'gw', name: 'GW-Flint2', model: 'Flint 2', x: 500, y: 250, r: 40, status: 'ok', health: 92, clients: 34 }
+  const aps = [
+    { id: 'ap1', name: 'AP-Salon', x: 195, y: 470, r: 32, status: 'ok', health: 88, clients: 18 },
+    { id: 'ap2', name: 'AP-Pasillo', x: 500, y: 505, r: 32, status: 'warn', health: 71, clients: 10 },
+    { id: 'ap3', name: 'AP-Dormitorio', x: 805, y: 470, r: 32, status: 'ok', health: 95, clients: 5 },
+  ]
+  const internet = { x: 500, y: 58 }
+  const peers = [
+    { id: 'p1', name: 'phone', type: 'phone', x: 265, y: 26 },
+    { id: 'p2', name: 'nas-wg', type: 'laptop', x: 735, y: 26 },
+  ]
+  const dist = { id: 'dist1', name: 'Switch inferido', x: 660, y: 230, r: 24, managed: false, port: 'lan3', macs: 8 }
+  const allRouters = [gw, ...aps]
+
+  // --- anillos guía wifi ---
+  const guideRadii = [96, 130]
+  allRouters.forEach(r => {
+    guideRadii.forEach(rad => {
+      svgAppend(mk('circle', { cx: r.x, cy: r.y, r: rad, class: 'topo-guide' }))
     })
-    const out = [line]
-    // pulso de flujo (punto viajero)
+  })
+
+  // --- links ---
+  const addLink = (d, kind, color, width = 1.5, wifi = false, flow = false, label = '') => {
+    const id = `link-${kind}-${Math.random().toString(36).slice(2, 8)}`
+    const path = mk('path', { d, fill: 'none', stroke: color, 'stroke-width': width, 'stroke-linecap': 'round', class: 'topo-edge', pathLength: 1, id, 'stroke-dasharray': kind === 'wg' || (kind === 'uplink' && wifi) ? (kind === 'wg' ? '7 7' : '8 6') : undefined }, svg)
+    order.push(path)
     if (flow && !reduceMotion) {
-      const dot = mkEl('circle', { r: 2.5, fill: color, class: 'topo-flow' })
-      const anim = mkEl('animateMotion', { dur: `${2 + Math.random() * 2}s`, repeatCount: 'indefinite' })
-      const mpath = mkEl('mpath')
-      // animateMotion necesita un path: construimos uno invisible
-      const pid = `tp-edge-${edgeSeq++}`
-      const p = mkEl('path', { d: `M${a.x} ${a.y} L${b.x} ${b.y}`, id: pid, fill: 'none', stroke: 'none' })
-      svg.appendChild(p)
-      mpath.setAttribute('href', '#' + pid)
-      mpath.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + pid)
-      anim.appendChild(mpath)
-      dot.appendChild(anim)
-      out.push(dot)
+      for (let i = 0; i < 2; i++) {
+        const dot = mk('circle', { r: 2.6, fill: color, class: 'topo-flow' }, svg)
+        order.push(dot)
+        const am = mk('animateMotion', { dur: `${2.2 + i * 0.6}s`, repeatCount: 'indefinite', begin: `${-i * 1.1}s` }, dot)
+        mk('mpath', { href: `#${id}` }, am)
+      }
     }
-    return out
+    if (kind === 'wg' && !reduceMotion) {
+      const dashed = mk('path', { d, fill: 'none', stroke: color, 'stroke-width': width, 'stroke-linecap': 'round', 'stroke-dasharray': '7 7' }, svg)
+      order.push(dashed)
+      mk('animate', { attributeName: 'stroke-dashoffset', from: '0', to: '-28', dur: '1.4s', repeatCount: 'indefinite' }, dashed)
+    }
+    if (label) {
+      const mid = path.getPointAtLength ? path.getPointAtLength(path.getTotalLength() / 2) : { x: 500, y: 300 }
+      const t = mk('text', { x: mid.x, y: mid.y - 8, 'text-anchor': 'middle', class: 'topo-label-sub', fill: 'rgb(var(--text-muted))', 'font-size': 10 }, svg)
+      t.textContent = label
+      order.push(t)
+    }
+    return path
   }
 
-  const C_OK = 'rgb(var(--ok))'      // cable
-  const C_ACC = 'rgb(var(--accent))' // wifi
-  const C_TUN = 'rgb(var(--tunnel))' // túnel
-
-  // orden de construcción: GW, APs, clientes, túnel
-  const order = []
-
-  // gateway
-  const gGw = mkEl('g', { class: 'topo-node' })
-  gGw.appendChild(mkEl('circle', { cx: gw.x, cy: gw.y, r: gw.r, fill: 'rgb(var(--surface))', stroke: C_ACC, 'stroke-width': 2 }))
-  const gwTxt = mkEl('text', { x: gw.x, y: gw.y + 4, 'text-anchor': 'middle', fill: 'rgb(var(--text-primary))', 'font-size': '9', 'font-family': 'JetBrains Mono, monospace' })
-  gwTxt.textContent = 'GW'
-  gGw.appendChild(gwTxt)
-  const gwLbl = mkEl('text', { x: gw.x, y: gw.y + gw.r + 14, 'text-anchor': 'middle', fill: 'rgb(var(--text-muted))', 'font-size': '9' })
-  gwLbl.textContent = gw.label
-  gGw.appendChild(gwLbl)
-  order.push(gGw)
-
-  // APs + edges GW→AP
-  aps.forEach(ap => {
-    const g = mkEl('g', { class: 'topo-node' })
-    g.appendChild(mkEl('circle', { cx: ap.x, cy: ap.y, r: 16, fill: 'rgb(var(--elevated))', stroke: C_ACC, 'stroke-width': 1.5 }))
-    // arquito wifi dentro
-    const w = mkEl('path', {
-      d: `M${ap.x - 6} ${ap.y + 2} A8 8 0 0 1 ${ap.x + 6} ${ap.y + 2}`,
-      stroke: C_ACC, 'stroke-width': 1.5, fill: 'none', 'stroke-linecap': 'round',
-    })
-    g.appendChild(w)
-    const t1 = mkEl('text', { x: ap.x, y: ap.y - 24, 'text-anchor': 'middle', fill: 'rgb(var(--text-secondary))', 'font-size': '9' })
-    t1.textContent = ap.label
-    g.appendChild(t1)
-    addEdge(gw, ap, C_ACC, 1.5, true).forEach(e => order.push(e))
+  // WAN internet-gateway
+  addLink(`M${internet.x} ${internet.y + 28} C${internet.x} 160, ${gw.x} 160, ${gw.x} ${gw.y - gw.r - 6}`, 'wan', COLOR.ok, 2.5, false, true)
+  // uplinks gateway-APs (cableados = verde)
+  const uplinkPaths = [
+    `M${gw.x - gw.r * 0.7} ${gw.y + gw.r * 0.7} C390 340, 290 400, ${aps[0].x + aps[0].r * 0.6} ${aps[0].y - aps[0].r * 0.6}`,
+    `M${gw.x} ${gw.y + gw.r} C${gw.x} 360, ${gw.x} 420, ${aps[1].y - aps[1].r}`,
+    `M${gw.x + gw.r * 0.7} ${gw.y + gw.r * 0.7} C610 340, 710 400, ${aps[2].x - aps[2].r * 0.6} ${aps[2].y - aps[2].r * 0.6}`,
+  ]
+  uplinkPaths.forEach((d, i) => addLink(d, 'uplink', COLOR.ok, 2, false, true, i === 1 ? 'uplink' : ''))
+  // distnode link
+  addLink(`M${gw.x + gw.r + 4} ${gw.y} L${dist.x - dist.r - 4} ${dist.y}`, 'wired', COLOR.ok, 1.5, false, true)
+
+  // --- internet ---
+  const inetG = mk('g', { transform: `translate(${internet.x} ${internet.y})`, class: 'topo-node' }, svg)
+  order.push(inetG)
+  mk('circle', { r: 42, fill: COLOR.ok, opacity: 0.08 }, inetG)
+  mk('circle', { r: 38, fill: 'none', stroke: COLOR.ok, 'stroke-width': 1.2, 'stroke-dasharray': '3 7', opacity: 0.55 }, inetG)
+  mk('circle', { r: 3, fill: COLOR.ok, cx: 0, cy: -38 }, inetG)
+  mk('animateTransform', { attributeName: 'transform', type: 'rotate', from: '0', to: '360', dur: '24s', repeatCount: 'indefinite' }, inetG)
+  mk('circle', { r: 28, fill: canvas, stroke: COLOR.ok, 'stroke-width': 2 }, inetG)
+  drawIcon('cloud', 0, 0, 22, COLOR.ok, inetG)
+  const inetLabel = mk('text', { x: 36, y: 6, class: 'topo-label', fill: 'rgb(var(--text-primary))' }, svg)
+  inetLabel.textContent = 'Internet'
+  order.push(inetLabel)
+
+  // --- routers ---
+  allRouters.forEach((r, i) => {
+    const g = mk('g', { transform: `translate(${r.x} ${r.y})`, class: 'topo-node' }, svg)
     order.push(g)
+    const isGw = i === 0
+    const isWarn = r.status === 'warn'
+    if (isGw) mk('circle', { r: r.r + 18, fill: COLOR.accent, opacity: 0.12 }, g)
+    if (isWarn) {
+      const pulse = mk('circle', { r: r.r + 8, fill: 'none', stroke: COLOR.warn, 'stroke-width': 2 }, g)
+      mk('animate', { attributeName: 'r', values: `${r.r + 8};${r.r + 22}`, dur: '1.6s', repeatCount: 'indefinite' }, pulse)
+      mk('animate', { attributeName: 'opacity', values: '0.6;0', dur: '1.6s', repeatCount: 'indefinite' }, pulse)
+    }
+    const gradId = 'topo-gw-grad' + (i === 0 ? '-gw' : '')
+    if (isGw) {
+      const defs = mk('defs', {}, svg)
+      const grad = mk('linearGradient', { id: gradId, x1: 0, y1: 0, x2: 1, y2: 1 }, defs)
+      mk('stop', { offset: '0%', 'stop-color': COLOR.accent, 'stop-opacity': 0.28 }, grad)
+      mk('stop', { offset: '100%', 'stop-color': COLOR.tunnel, 'stop-opacity': 0.28 }, grad)
+    }
+    mk('circle', { r: r.r, fill: isGw ? `url(#${gradId})` : canvas, stroke: isWarn ? COLOR.warn : isGw ? COLOR.accent : 'rgb(var(--border-strong))', 'stroke-width': isGw || isWarn ? 2 : 1.5 }, g)
+    // status ring
+    const R = r.r + 6, C = 2 * Math.PI * R
+    const target = C * (1 - r.health / 100)
+    const ring = mk('circle', { r: R, fill: 'none', stroke: isWarn ? COLOR.warn : COLOR.ok, 'stroke-width': 3, 'stroke-linecap': 'round', 'stroke-dasharray': C, 'stroke-dashoffset': C, transform: 'rotate(-90)' }, g)
+    ring.style.transition = 'stroke-dashoffset 900ms ease'
+    setTimeout(() => ring.style.strokeDashoffset = target, 100 + i * 120)
+    drawIcon(isGw ? 'router' : 'ap', 0, 0, isGw ? 34 : 28, isWarn ? COLOR.warn : isGw ? COLOR.accent : 'rgb(var(--text-primary))', g)
+
+    const label = mk('text', { x: r.x - (isGw ? 54 : 60), y: r.y + (isGw ? 62 : 44), 'text-anchor': 'end', class: 'topo-label' }, svg)
+    label.textContent = r.name
+    order.push(label)
+    const sub = mk('text', { x: r.x - (isGw ? 54 : 60), y: r.y + (isGw ? 78 : 60), 'text-anchor': 'end', class: 'topo-label-sub' }, svg)
+    sub.textContent = `${r.clients} clients · ${r.health}%`
+    order.push(sub)
   })
 
-  // clientes + edges AP→cliente
-  clients.forEach((c, i) => {
-    const ap = aps[i % aps.length]
-    const g = mkEl('g', { class: 'topo-node' })
-    const col = c.wired ? C_OK : C_ACC
-    g.appendChild(mkEl('circle', { cx: c.x, cy: c.y, r: 5, fill: col, opacity: 0.85 }))
-    const t1 = mkEl('text', {
-      x: c.x + (c.x > cx ? 10 : -10), y: c.y + 3,
-      'text-anchor': c.x > cx ? 'start' : 'end',
-      fill: 'rgb(var(--text-muted))', 'font-size': '8', 'font-family': 'JetBrains Mono, monospace',
-    })
-    t1.textContent = c.label
-    g.appendChild(t1)
-    addEdge(ap, c, col, 1, false).forEach(e => order.push(e))
+  // --- peers WG ---
+  peers.forEach((p, i) => {
+    const g = mk('g', { transform: `translate(${p.x} ${p.y})`, class: 'topo-node' }, svg)
     order.push(g)
+    if (!reduceMotion) {
+      const pulse = mk('circle', { r: 22, fill: 'none', stroke: COLOR.tunnel, 'stroke-width': 1.5 }, g)
+      mk('animate', { attributeName: 'r', values: '18;27', dur: '2.2s', repeatCount: 'indefinite' }, pulse)
+      mk('animate', { attributeName: 'opacity', values: '0.5;0', dur: '2.2s', repeatCount: 'indefinite' }, pulse)
+    }
+    mk('rect', { x: -18, y: -18, width: 36, height: 36, rx: 11, fill: canvas, stroke: COLOR.tunnel, 'stroke-width': 1.5 }, g)
+    drawIcon(p.type, 0, 0, 20, COLOR.tunnel, g)
+    const label = mk('text', { x: p.x + (i % 2 ? -26 : 26), y: p.y - 4, 'text-anchor': i % 2 ? 'end' : 'start', class: 'topo-label' }, svg)
+    label.textContent = p.name
+    order.push(label)
+    const sub = mk('text', { x: p.x + (i % 2 ? -26 : 26), y: p.y + 11, 'text-anchor': i % 2 ? 'end' : 'start', class: 'topo-label-sub', fill: COLOR.tunnel }, svg)
+    sub.textContent = 'WireGuard'
+    order.push(sub)
+    addLink(`M${p.x} ${p.y + 18} C${p.x} 80, ${gw.x} 80, ${gw.x} ${gw.y - gw.r - 10}`, 'wg', COLOR.tunnel, 2, false, true)
   })
 
-  // túnel WireGuard GW → Internet
-  const gWg = mkEl('g', { class: 'topo-node' })
-  gWg.appendChild(mkEl('circle', { cx: wg.x, cy: wg.y, r: 14, fill: 'rgb(var(--surface))', stroke: C_TUN, 'stroke-width': 1.5 }))
-  const wgT = mkEl('text', { x: wg.x, y: wg.y + 3.5, 'text-anchor': 'middle', fill: C_TUN, 'font-size': '8', 'font-family': 'JetBrains Mono, monospace' })
-  wgT.textContent = 'WG'
-  gWg.appendChild(wgT)
-  const wgLbl = mkEl('text', { x: wg.x + 24, y: wg.y + 3, fill: 'rgb(var(--text-muted))', 'font-size': '9' })
-  wgLbl.textContent = wg.label
-  gWg.appendChild(wgLbl)
-  addEdge(gw, wg, C_TUN, 2, true).forEach(e => order.push(e))
-  order.push(gWg)
-
-  order.forEach(e => svg.appendChild(e))
-
-  // leyenda
-  const legend = [
-    { c: C_OK, k: t('topo.wired') },
-    { c: C_ACC, k: t('topo.wifi') },
-    { c: C_TUN, k: t('topo.tunnel') },
+  // --- distnode (switch inferido) ---
+  const distG = mk('g', { transform: `translate(${dist.x} ${dist.y})`, class: 'topo-node' }, svg)
+  order.push(distG)
+  mk('circle', { r: dist.r + 5, fill: 'none', stroke: 'rgb(var(--text-muted))', 'stroke-width': 1, 'stroke-dasharray': '2 5', opacity: 0.6 }, distG)
+  mk('circle', { r: dist.r, fill: canvas, stroke: 'rgb(var(--text-muted))', 'stroke-width': 1.5, 'stroke-dasharray': '4 4' }, distG)
+  drawIcon('switch', 0, 0, 22, 'rgb(var(--text-muted))', distG)
+  const distLabel = mk('text', { x: dist.x, y: dist.y - 34, 'text-anchor': 'middle', class: 'topo-label' }, svg)
+  distLabel.textContent = t('topo.wired')
+  order.push(distLabel)
+
+  // --- chips de dispositivos ---
+  const chips = [
+    // cableados del distnode (verde)
+    { id: 'c1', name: 'tv-salon', type: 'tv', x: 710, y: 180, wired: true, hub: dist, band: '' },
+    { id: 'c2', name: 'printer', type: 'tv', x: 700, y: 290, wired: true, hub: dist, band: '' },
+    // cableados del gateway oeste
+    { id: 'c3', name: 'pve', type: 'laptop', x: 280, y: 230, wired: true, hub: gw, band: '' },
+    { id: 'c4', name: 'ct-home', type: 'laptop', x: 320, y: 300, wired: true, hub: gw, band: '' },
+    // wifi gateway
+    { id: 'c5', name: 'laptop-nacho', type: 'laptop', x: 620, y: 150, wired: false, hub: gw, band: '5 GHz', weak: false },
+    { id: 'c6', name: 'phone', type: 'phone', x: 410, y: 150, wired: false, hub: gw, band: '5 GHz', weak: false },
+    { id: 'c7', name: 'tablet', type: 'phone', x: 580, y: 120, wired: false, hub: gw, band: '2.4 GHz', weak: false },
+    // wifi AP salon
+    { id: 'c8', name: 'chromecast', type: 'tv', x: 150, y: 410, wired: false, hub: aps[0], band: '2.4 GHz', weak: true },
+    { id: 'c9', name: 'consola', type: 'tv', x: 230, y: 380, wired: false, hub: aps[0], band: '5 GHz', weak: false },
+    { id: 'c10', name: 'kindle', type: 'phone', x: 120, y: 500, wired: false, hub: aps[0], band: '2.4 GHz', weak: true },
+    // wifi AP pasillo
+    { id: 'c11', name: 'cam-patio', type: 'tv', x: 430, y: 580, wired: false, hub: aps[1], band: '2.4 GHz', weak: true },
+    { id: 'c12', name: 'robot', type: 'tv', x: 570, y: 600, wired: false, hub: aps[1], band: '2.4 GHz', weak: false },
+    { id: 'c13', name: 'sensor', type: 'phone', x: 500, y: 620, wired: false, hub: aps[1], band: '2.4 GHz', weak: true },
+    // wifi AP dormitorio
+    { id: 'c14', name: 'phone-y', type: 'phone', x: 860, y: 410, wired: false, hub: aps[2], band: '5 GHz', weak: false },
+    { id: 'c15', name: 'laptop-y', type: 'laptop', x: 900, y: 500, wired: false, hub: aps[2], band: '5 GHz', weak: false },
   ]
-  legend.forEach((l, i) => {
-    const g = mkEl('g', { class: 'topo-node' })
-    g.appendChild(mkEl('circle', { cx: 16, cy: 320 - i * 16, r: 4, fill: l.c }))
-    const tx = mkEl('text', { x: 26, y: 323 - i * 16, fill: 'rgb(var(--text-muted))', 'font-size': '9' })
-    tx.textContent = l.k
-    g.appendChild(tx)
+
+  chips.forEach((c, i) => {
+    const g = mk('g', { transform: `translate(${c.x} ${c.y})`, class: 'topo-node' }, svg)
     order.push(g)
-    svg.appendChild(g)
+    const S = c.wired ? 26 : 24
+    const half = S / 2
+    const stroke = c.wired ? COLOR.ok : 'rgb(var(--border-strong))'
+    mk('rect', { x: -half, y: -half, width: S, height: S, rx: 7, fill: canvas, stroke, 'stroke-width': c.wired ? 1.3 : 1.1 }, g)
+    drawIcon(c.type, 0, 0, 16, c.wired ? COLOR.ok : 'rgb(var(--text-primary))', g)
+    if (!c.wired) {
+      const bandColor = c.weak ? COLOR.warn : c.band === '5 GHz' ? COLOR.accent : COLOR.info
+      mk('circle', { cx: half - 2, cy: half - 2, r: 3.8, fill: bandColor, stroke: canvas, 'stroke-width': 1.4 }, g)
+    }
+    const title = mk('title', {}, g)
+    title.textContent = c.name
+    // link
+    const target = c.wired ? { x: c.hub.x + (c.hub === dist ? -dist.r : c.hub === gw ? -gw.r : 0), y: c.hub.y } : { x: c.hub.x, y: c.hub.y }
+    const kind = c.wired ? 'wired' : 'uplink'
+    const color = c.wired ? COLOR.ok : COLOR.warn
+    addLink(`M${c.x} ${c.y} L${target.x} ${target.y}`, kind, color, c.wired ? 1.2 : 1, !c.wired, false)
   })
 
   // coreografía secuencial
@@ -311,68 +472,98 @@ function buildTopo() {
   let delay = 0
   order.forEach(el => {
     setTimeout(() => el.classList.add('on'), delay)
-    delay += el.classList.contains('topo-edge') ? 160 : 220
+    delay += el.classList.contains('topo-edge') ? 160 : 90
   })
 }
 
-/* ---------- stage 3: routers ---------- */
+function rebuildTopo() {
+  if (!topoBuilt) return
+  topoBuilt = false
+  const svg = document.getElementById('topoSvg')
+  svg.innerHTML = ''
+  buildTopo()
+}
+
+/* ---------- stage 3: routers cards fieles ---------- */
 const ROUTERS = [
-  { name: 'GW-Flint2', model: 'GL.iNet Flint 2', cpu: 23, mem: 48, temp: 52, up: '34d 6h' },
-  { name: 'AP-Estudio', model: 'Xiaomi AX6', cpu: 41, mem: 63, temp: 78, up: '12d 2h', warn: true },
-  { name: 'AP-Salon', model: 'Xiaomi AX6', cpu: 18, mem: 55, temp: 49, up: '34d 6h' },
-  { name: 'AP-Dormitorio', model: 'Xiaomi AX6', cpu: 33, mem: 59, temp: 55, up: '34d 5h' },
+  { id: 'gw', name: 'GW-Flint2', model: 'GL.iNet Flint 2', role: 'Principal', cpu: 12, ram: 34, temp: 52, clients: 34, health: 92, status: 'ok', uptime: '34d 6h', spark: [12, 18, 14, 22, 16, 20, 13] },
+  { id: 'ap1', name: 'AP-Salon', model: 'Xiaomi AX6', role: 'AP', cpu: 23, ram: 51, temp: 49, clients: 18, health: 88, status: 'ok', uptime: '14d 2h', spark: [21, 25, 30, 28, 35, 32, 29] },
+  { id: 'ap2', name: 'AP-Pasillo', model: 'Xiaomi AX6', role: 'AP', cpu: 41, ram: 63, temp: 78, clients: 10, health: 71, status: 'warn', uptime: '9d 7h', spark: [35, 42, 58, 55, 61, 48, 52] },
+  { id: 'ap3', name: 'AP-Dormitorio', model: 'Xiaomi AX6', role: 'AP', cpu: 18, ram: 48, temp: 44, clients: 5, health: 95, status: 'ok', uptime: '32d 5h', spark: [10, 14, 12, 18, 15, 13, 11] },
 ]
 let routersBuilt = false
+let routersPlayed = false
 function buildRouters() {
-  if (routersBuilt) return
-  routersBuilt = true
   const grid = document.getElementById('routerGrid')
-  grid.innerHTML = ROUTERS.map(r => `
-    <div class="rcard card" style="background:rgb(var(--elevated)/0.4);">
+  const C = 2 * Math.PI * 31 // R=31 (size 56 /2 +stroke? inner r ~31)
+  grid.innerHTML = ROUTERS.map(r => {
+    const isWarn = r.status === 'warn'
+    const statusColor = isWarn ? 'rgb(var(--warn))' : 'rgb(var(--ok))'
+    const healthDash = C * (1 - r.health / 100)
+    const sparkPath = r.spark.map((v, i) => `${i === 0 ? 'M' : 'L'}${(i / (r.spark.length - 1)) * 100} ${28 - (v / 70) * 28}`).join(' ')
+    return `
+    <div class="rcard card ${isWarn ? 'warn' : ''}">
       <div class="rt">
-        <span class="name font-mono">${r.name}</span>
-        <span class="caption text-muted">${r.model}</span>
+        <div class="nameblock">
+          <div class="iconbox">
+            <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 14h16v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-5z"/><path d="M8 6h8"/><path d="M6 9h12"/><path d="M10 3h4"/></svg>
+          </div>
+          <div>
+            <span class="name">${r.name}</span>
+            <span class="model">${r.model}</span>
+            <span class="rolepill">${t(r.role === 'Principal' ? 'routers.roleGW' : 'routers.roleAP')}</span>
+          </div>
+        </div>
+        <div class="ring-wrap" style="width:56px;height:56px;">
+          <svg width="56" height="56" viewBox="0 0 56 56" style="transform:rotate(-90deg);">
+            <circle cx="28" cy="28" r="31" fill="none" stroke="rgb(var(--border))" stroke-width="5"/>
+            <circle class="router-health-ring" cx="28" cy="28" r="31" fill="none" stroke="${statusColor}" stroke-width="5" stroke-linecap="round"
+              stroke-dasharray="${C}" stroke-dashoffset="${C}" data-target="${healthDash}"/>
+          </svg>
+          <div class="ring-center" style="position:absolute;inset:0;display:flex;align-items:center;justify-content:center;">
+            <span class="font-mono" style="font-size:0.78rem;font-weight:700;">${r.health}</span>
+          </div>
+        </div>
+      </div>
+      <div class="minimetrics">
+        <div class="${r.cpu > 40 ? 'hot' : ''}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2"/><path d="M9 9h6v6H9z"/><path d="M9 1v3"/><path d="M15 1v3"/><path d="M9 20v3"/><path d="M15 20v3"/><path d="M20 9h3"/><path d="M20 15h3"/><path d="M1 9h3"/><path d="M1 15h3"/></svg> CPU <span class="font-mono">${r.cpu}%</span></div>
+        <div class="${r.ram > 60 ? 'hot' : ''}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/><path d="M9 7h6"/><path d="M9 11h6"/></svg> RAM <span class="font-mono">${r.ram}%</span></div>
+        <div class="${r.temp > 70 ? 'hot' : ''}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0"/></svg> ${t('routers.temp')} <span class="font-mono">${r.temp}°C</span></div>
+        <div><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg> ${t('routers.clients')} <span class="font-mono">${r.clients}</span></div>
       </div>
-      <div class="meters">
-        <div class="meter"><div class="ml"><span>${t('routers.cpu')}</span><span class="font-mono" data-v="${r.cpu}">0%</span></div><div class="bar"><i data-w="${r.cpu}"></i></div></div>
-        <div class="meter"><div class="ml"><span>${t('routers.mem')}</span><span class="font-mono" data-v="${r.mem}">0%</span></div><div class="bar"><i data-w="${r.mem}"></i></div></div>
-        <div class="meter ${r.warn ? 'warn' : ''}"><div class="ml"><span>${t('routers.temp')}</span><span class="font-mono" data-v="${r.temp}" data-suf="°C">0°C</span></div><div class="bar"><i data-w="${Math.min(100, r.temp)}"></i></div></div>
+      <div class="bottom">
+        <svg class="spark" viewBox="0 0 100 28" preserveAspectRatio="none"><path d="${sparkPath}" vector-effect="non-scaling-stroke"/></svg>
+        <span class="font-mono" style="font-size:0.75rem;color:rgb(var(--text-muted));">${r.uptime}</span>
+        <span class="statuspill ${r.status}"><span class="dot"></span>${t(r.status === 'ok' ? 'routers.online' : 'routers.warn')}</span>
+        <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="width:1rem;height:1rem;color:rgb(var(--text-muted));"><path d="m9 18 6-6-6-6"/></svg>
       </div>
-      <div class="caption text-muted" style="margin-top:0.6rem;">${t('routers.up')} <span class="font-mono">${r.up}</span></div>
     </div>
-  `).join('')
+    `
+  }).join('')
+  routersBuilt = true
+}
+
+function fillRouterBars(instant) {
+  const grid = document.getElementById('routerGrid')
+  grid.querySelectorAll('.router-health-ring').forEach(ring => {
+    const target = ring.dataset.target
+    if (instant || reduceMotion) ring.style.strokeDashoffset = target
+    else setTimeout(() => ring.style.strokeDashoffset = target, 80)
+  })
 }
+
 function renderRouterNames() {
   if (!routersBuilt) return
-  routersBuilt = false
-  buildRouters() // reconstruye con labels del nuevo idioma
-  if (routersPlayed) {
-    // ya animado antes: estado final sin re-animar
-    const grid = document.getElementById('routerGrid')
-    grid.querySelectorAll('.bar i').forEach(bar => { bar.style.width = bar.dataset.w + '%' })
-    grid.querySelectorAll('.ml span[data-v]').forEach(sp => {
-      const v = parseFloat(sp.dataset.v)
-      const suf = sp.dataset.suf || '%'
-      sp.textContent = Math.round(v) + suf
-    })
-  }
+  buildRouters()
+  if (routersPlayed) fillRouterBars(true)
 }
-let routersPlayed = false
+
 function playRouters() {
   buildRouters()
-  if (routersPlayed) return
+  routersBuilt = true
+  if (routersPlayed) { fillRouterBars(true); return }
   routersPlayed = true
-  const grid = document.getElementById('routerGrid')
-  grid.querySelectorAll('.bar i').forEach(bar => {
-    const w = bar.dataset.w
-    if (reduceMotion) { bar.style.width = w + '%'; return }
-    setTimeout(() => { bar.style.width = w + '%' }, 80)
-  })
-  grid.querySelectorAll('.ml span[data-v]').forEach(sp => {
-    const v = parseFloat(sp.dataset.v)
-    const suf = sp.dataset.suf || '%'
-    animateNumber(sp, v, { duration: 900, format: x => Math.round(x) + suf })
-  })
+  fillRouterBars(false)
 }
 
 /* ---------- stage 4: adguard ---------- */
@@ -433,7 +624,6 @@ function renderAlerts() {
       <span><span class="t">${a.text}</span><span class="s" style="display:block;">${a.sub}</span></span>
     </div>
   `).join('')
-  // si ya se reprodujo, mantener visibles tras el re-render por cambio de idioma
   if (alertsPlayed) feed.querySelectorAll('.alert-item').forEach(el => el.classList.add('on'))
 }
 let alertsPlayed = false
@@ -454,9 +644,7 @@ let currentStage = -1
 function setStage(i) {
   if (i === currentStage) return
   currentStage = i
-  document.querySelectorAll('.stage').forEach((s, idx) => {
-    s.classList.toggle('active', idx === i)
-  })
+  document.querySelectorAll('.stage').forEach((s, idx) => s.classList.toggle('active', idx === i))
   document.querySelectorAll('.tstep').forEach(s => {
     s.style.opacity = parseInt(s.dataset.stage, 10) === i ? '1' : ''
   })
@@ -467,9 +655,7 @@ function initTheater() {
   const steps = [...document.querySelectorAll('.tstep')]
   if (!('IntersectionObserver' in window)) { setStage(0); return }
   const io = new IntersectionObserver(entries => {
-    entries.forEach(en => {
-      if (en.isIntersecting) setStage(parseInt(en.target.dataset.stage, 10))
-    })
+    entries.forEach(en => { if (en.isIntersecting) setStage(parseInt(en.target.dataset.stage, 10)) })
   }, { rootMargin: '-42% 0px -42% 0px', threshold: 0 })
   steps.forEach(s => io.observe(s))
   setStage(0)
@@ -478,14 +664,9 @@ function initTheater() {
 /* ---------- reveals on scroll ---------- */
 function initReveals() {
   const els = document.querySelectorAll('.reveal')
-  if (reduceMotion || !('IntersectionObserver' in window)) {
-    els.forEach(e => e.classList.add('in'))
-    return
-  }
+  if (reduceMotion || !('IntersectionObserver' in window)) { els.forEach(e => e.classList.add('in')); return }
   const io = new IntersectionObserver(entries => {
-    entries.forEach(en => {
-      if (en.isIntersecting) { en.target.classList.add('in'); io.unobserve(en.target) }
-    })
+    entries.forEach(en => { if (en.isIntersecting) { en.target.classList.add('in'); io.unobserve(en.target) } })
   }, { threshold: 0.12 })
   els.forEach(e => io.observe(e))
 }
@@ -493,12 +674,6 @@ function initReveals() {
 /* ---------- widget apariencia ---------- */
 const MODE_KEY = 'netpulse-web-theme-mode'
 const ACCENT_KEY = 'netpulse-web-accent'
-const ACCENTS = {
-  cyan:    { dark: '34 211 238', light: '8 145 178' },
-  violet:  { dark: '167 139 250', light: '124 58 237' },
-  emerald: { dark: '52 211 153', light: '5 150 105' },
-  amber:   { dark: '251 191 36', light: '217 119 6' },
-}
 let themeMode = 'dark'
 let accentId = 'cyan'
 
@@ -514,62 +689,31 @@ function applyTheme() {
   const meta = document.querySelector('meta[name="theme-color"]')
   if (meta) meta.content = light ? '#F3F5F9' : '#070B12'
 }
-function applyAccent() {
-  const root = document.documentElement
-  root.dataset.accent = accentId
-  // el acento cyan es el :root por defecto; los demás vía data-accent + CSS
-}
+function applyAccent() { document.documentElement.dataset.accent = accentId }
 function updateAppearancePanel() {
-  document.querySelectorAll('#themeSeg button').forEach(b => {
-    b.classList.toggle('on', b.dataset.mode === themeMode)
-  })
-  document.querySelectorAll('#accentSwatches .swatch').forEach(b => {
-    b.classList.toggle('on', b.dataset.accent === accentId)
-  })
+  document.querySelectorAll('#themeSeg button').forEach(b => b.classList.toggle('on', b.dataset.mode === themeMode))
+  document.querySelectorAll('#accentSwatches .swatch').forEach(b => b.classList.toggle('on', b.dataset.accent === accentId))
 }
 function setMode(m) {
-  themeMode = m
-  writeStore(MODE_KEY, m)
-  applyTheme()
-  updateAppearancePanel()
+  themeMode = m; writeStore(MODE_KEY, m); applyTheme(); updateAppearancePanel()
 }
 function setAccent(a) {
-  accentId = a
-  writeStore(ACCENT_KEY, a)
-  applyAccent()
-  updateAppearancePanel()
+  accentId = a; writeStore(ACCENT_KEY, a); applyAccent(); updateAppearancePanel()
 }
-// expuestos para QA
-window.setMode = setMode
-window.setAccent = setAccent
+window.setMode = setMode; window.setAccent = setAccent
 
 function initAppearance() {
   themeMode = readStore(MODE_KEY) || 'dark'
   accentId = readStore(ACCENT_KEY) || 'cyan'
-  applyTheme()
-  applyAccent()
-  updateAppearancePanel()
-
+  applyTheme(); applyAccent(); updateAppearancePanel()
   const fab = document.getElementById('appFab')
   const panel = document.getElementById('appPanel')
-  fab.addEventListener('click', () => {
-    panel.classList.toggle('open')
-    fab.setAttribute('aria-expanded', panel.classList.contains('open'))
-  })
-  document.addEventListener('click', e => {
-    if (!panel.contains(e.target) && !fab.contains(e.target)) panel.classList.remove('open')
-  })
+  fab.addEventListener('click', () => { panel.classList.toggle('open'); fab.setAttribute('aria-expanded', panel.classList.contains('open')) })
+  document.addEventListener('click', e => { if (!panel.contains(e.target) && !fab.contains(e.target)) panel.classList.remove('open') })
   document.addEventListener('keydown', e => { if (e.key === 'Escape') panel.classList.remove('open') })
-
-  document.querySelectorAll('#themeSeg button').forEach(b => {
-    b.addEventListener('click', () => setMode(b.dataset.mode))
-  })
-  document.querySelectorAll('#accentSwatches .swatch').forEach(b => {
-    b.addEventListener('click', () => setAccent(b.dataset.accent))
-  })
-  window.matchMedia('(prefers-color-scheme: light)').addEventListener('change', () => {
-    if (themeMode === 'system') applyTheme()
-  })
+  document.querySelectorAll('#themeSeg button').forEach(b => b.addEventListener('click', () => setMode(b.dataset.mode)))
+  document.querySelectorAll('#accentSwatches .swatch').forEach(b => b.addEventListener('click', () => setAccent(b.dataset.accent)))
+  window.matchMedia('(prefers-color-scheme: light)').addEventListener('change', () => { if (themeMode === 'system') applyTheme() })
 }
 
 /* ---------- copiar comando ---------- */
@@ -578,18 +722,10 @@ function initCopy() {
   if (!btn) return
   btn.addEventListener('click', async () => {
     const cmd = document.getElementById('installCmd').textContent
-    try {
-      await navigator.clipboard.writeText(cmd)
-    } catch {
-      // fallback sin clipboard API
-      const ta = document.createElement('textarea')
-      ta.value = cmd
-      document.body.appendChild(ta)
-      ta.select()
-      document.execCommand('copy')
-      ta.remove()
+    try { await navigator.clipboard.writeText(cmd) } catch {
+      const ta = document.createElement('textarea'); ta.value = cmd; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); ta.remove()
     }
-    const orig = btn.textContent
+    const orig = t('misc.copy')
     btn.textContent = t('misc.copied')
     setTimeout(() => { btn.textContent = orig }, 1600)
   })
@@ -599,13 +735,13 @@ function initCopy() {
 function initKofi() {
   const link = document.getElementById('kofiLink')
   // TODO(nacho): URL definitiva de Ko-fi — pendiente de que la cree.
-  // Cuando exista, ponerla aquí y listo. Mientras tanto enlaza al repositorio.
   link.href = 'https://github.com/gnacho/netpulse'
 }
 
 /* ---------- boot ---------- */
 document.addEventListener('DOMContentLoaded', () => {
   initAppearance()
+  initBackgroundCanvas()
   renderTicker()
   renderAlerts()
   initReveals()

+ 14 - 7
web/index.html

@@ -13,6 +13,7 @@
   <link rel="stylesheet" href="styles.css" />
 </head>
 <body>
+  <canvas id="bgCanvas" aria-hidden="true"></canvas>
 
   <!-- ============ NAV ============ -->
   <nav class="nav">
@@ -129,7 +130,7 @@
   </section>
 
   <!-- ============ TEATRO STICKY ============ -->
-  <section class="block" id="theater" style="padding-top:3rem;">
+  <section class="block" id="theater" style="padding-top:1rem;">
     <div class="container">
       <div class="reveal">
         <span class="eyebrow" data-i18n="misc.demoBadge">datos demo</span>
@@ -177,17 +178,23 @@
             <div class="stage" id="stage0">
               <div class="w-row">
                 <div class="ring-wrap">
-                  <svg width="180" height="180" viewBox="0 0 180 180">
-                    <circle cx="90" cy="90" r="78" fill="none" stroke="rgb(var(--elevated))" stroke-width="12"/>
-                    <circle id="ringArc" cx="90" cy="90" r="78" fill="none" stroke="rgb(var(--ok))" stroke-width="12" stroke-linecap="round"
-                      stroke-dasharray="490.1" stroke-dashoffset="490.1" transform="rotate(-90 90 90)"/>
+                  <svg width="220" height="220" viewBox="0 0 220 220">
+                    <defs>
+                      <linearGradient id="ringGrad" x1="0%" y1="0%" x2="100%" y2="100%">
+                        <stop offset="0%" stop-color="rgb(var(--accent))"/>
+                        <stop offset="100%" stop-color="rgb(var(--ok))"/>
+                      </linearGradient>
+                    </defs>
+                    <circle cx="110" cy="110" r="94" fill="none" stroke="rgb(var(--border))" stroke-width="14"/>
+                    <circle id="ringArc" cx="110" cy="110" r="94" fill="none" stroke="url(#ringGrad)" stroke-width="14" stroke-linecap="round"
+                      stroke-dasharray="590.6" stroke-dashoffset="590.6" transform="rotate(-90 110 110)"/>
                   </svg>
                   <div class="ring-center">
-                    <span class="big font-mono" id="ringNum">0</span>
+                    <span class="big font-display" id="ringNum">0</span>
                     <span class="of font-mono">/100</span>
                   </div>
                 </div>
-                <div style="display:flex;flex-direction:column;gap:0.75rem;align-items:center;">
+                <div style="display:flex;flex-direction:column;gap:1rem;align-items:center;">
                   <span class="pill ok"><span class="pill-dot"></span><span id="healthLabel" data-i18n="health.label">Excelente</span></span>
                   <span class="caption text-muted" data-i18n="health.caption">Puntuación de salud de la red</span>
                 </div>

+ 229 - 180
web/styles.css

@@ -1,7 +1,7 @@
 /* ============================================================
-   NetPulse landing — styles.css
-   Tokens idénticos a app/src/index.css (dark-first, NOC doméstico).
-   html.light conmuta todo el tema en vivo (widget Apariencia).
+   NetPulse landing — styles.css v2
+   Más grande, más espacio aprovechado, fondo canvas dinámico,
+   widgets fieles a la app (topología, health ring, router cards).
    ============================================================ */
 
 :root {
@@ -20,15 +20,15 @@
   --warn: 251 191 36;
   --danger: 248 113 113;
   --info: 96 165 250;
-  --radius: 0.625rem;
+  --radius: 0.75rem;
   color-scheme: dark;
 }
 
 html.light {
   --canvas: 243 245 249;
   --surface: 255 255 255;
-  --elevated: 255 255 255;
-  --hover: 241 245 249;
+  --elevated: 247 249 252;
+  --hover: 236 239 244;
   --border: 226 232 240;
   --border-strong: 203 213 225;
   --text-primary: 15 23 42;
@@ -43,7 +43,6 @@ html.light {
   color-scheme: light;
 }
 
-/* Acentos reales de la app (theme-boot.ts), dark y light */
 html[data-accent="violet"] { --accent: 167 139 250; }
 html[data-accent="emerald"] { --accent: 52 211 153; }
 html[data-accent="amber"]   { --accent: 251 191 36; }
@@ -59,14 +58,19 @@ body {
   background: rgb(var(--canvas));
   color: rgb(var(--text-primary));
   font-family: Inter, ui-sans-serif, system-ui, sans-serif;
-  font-size: 0.875rem;
-  line-height: 1.5;
+  font-size: 1rem;
+  line-height: 1.55;
   -webkit-font-smoothing: antialiased;
   transition: background-color 250ms ease, color 250ms ease;
+  overflow-x: hidden;
+}
+#bgCanvas {
+  position: fixed; inset: 0; z-index: -1;
+  width: 100%; height: 100%; pointer-events: none; opacity: 0.8;
 }
 .font-display { font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif; }
 .font-mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace; font-feature-settings: "tnum"; }
-::selection { background: rgb(var(--accent) / 0.25); }
+::selection { background: rgb(var(--accent) / 0.28); color: rgb(var(--text-primary)); }
 :focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; border-radius: 4px; }
 a { color: rgb(var(--accent)); text-decoration: none; }
 a:hover { text-decoration: underline; }
@@ -75,7 +79,9 @@ a:hover { text-decoration: underline; }
 ::-webkit-scrollbar-track { background: transparent; }
 
 /* ---------- utilidades ---------- */
-.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
+.container { max-width: 1320px; margin: 0 auto; padding: 0 1.25rem; }
+@media (min-width: 640px) { .container { padding: 0 1.75rem; } }
+@media (min-width: 1200px) { .container { padding: 0 2.5rem; } }
 .text-secondary { color: rgb(var(--text-secondary)); }
 .text-muted { color: rgb(var(--text-muted)); }
 .text-accent { color: rgb(var(--accent)); }
@@ -84,310 +90,341 @@ a:hover { text-decoration: underline; }
 .text-danger { color: rgb(var(--danger)); }
 .text-tunnel { color: rgb(var(--tunnel)); }
 .text-info { color: rgb(var(--info)); }
+.text-gradient {
+  background: linear-gradient(135deg, rgb(var(--accent)) 0%, rgb(var(--ok)) 55%, rgb(var(--tunnel)) 100%);
+  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
+  background-clip: text;
+}
 .uppercase { text-transform: uppercase; }
-.label { font-size: 0.75rem; line-height: 1.4; font-weight: 500; letter-spacing: 0.06em; }
-.caption { font-size: 0.6875rem; line-height: 1.4; font-weight: 500; }
+.label { font-size: 0.8125rem; line-height: 1.3; font-weight: 600; letter-spacing: 0.08em; }
+.caption { font-size: 0.875rem; line-height: 1.4; font-weight: 500; }
 .text-balance { text-wrap: balance; }
 .mono-num { font-variant-numeric: tabular-nums; }
 
 .card {
   background: rgb(var(--surface));
   border: 1px solid rgb(var(--border));
-  border-radius: calc(var(--radius) + 6px);
-  transition: background-color 250ms ease, border-color 250ms ease;
+  border-radius: calc(var(--radius) + 8px);
+  transition: background-color 250ms ease, border-color 250ms ease, transform 150ms ease, box-shadow 150ms ease;
 }
-.glow-accent { box-shadow: 0 0 40px -12px rgb(var(--accent) / 0.35); }
+.glow-accent { box-shadow: 0 0 60px -12px rgb(var(--accent) / 0.42), 0 0 120px -24px rgb(var(--accent) / 0.18); }
 
-/* textura mesh real de la app (mesh-texture.svg) */
-.mesh-bg {
-  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400' fill='none'%3E%3Cg stroke='%2322D3EE' stroke-opacity='0.04' stroke-width='1'%3E%3Cpath d='M-100 100 L100 -100 M0 400 L400 0 M300 500 L500 300 M-100 300 L300 -100 M100 500 L500 100'/%3E%3Cpath d='M-100 200 L200 -100 M200 500 L500 200'/%3E%3C/g%3E%3Cg fill='%2322D3EE' fill-opacity='0.05'%3E%3Ccircle cx='0' cy='0' r='1.5'/%3E%3Ccircle cx='100' cy='0' r='1.5'/%3E%3Ccircle cx='200' cy='0' r='1.5'/%3E%3Ccircle cx='300' cy='0' r='1.5'/%3E%3Ccircle cx='400' cy='0' r='1.5'/%3E%3Ccircle cx='0' cy='100' r='1.5'/%3E%3Ccircle cx='100' cy='100' r='1.5'/%3E%3Ccircle cx='200' cy='100' r='1.5'/%3E%3Ccircle cx='300' cy='100' r='1.5'/%3E%3Ccircle cx='400' cy='100' r='1.5'/%3E%3Ccircle cx='0' cy='200' r='1.5'/%3E%3Ccircle cx='100' cy='200' r='1.5'/%3E%3Ccircle cx='200' cy='200' r='1.5'/%3E%3Ccircle cx='300' cy='200' r='1.5'/%3E%3Ccircle cx='400' cy='200' r='1.5'/%3E%3Ccircle cx='0' cy='300' r='1.5'/%3E%3Ccircle cx='100' cy='300' r='1.5'/%3E%3Ccircle cx='200' cy='300' r='1.5'/%3E%3Ccircle cx='300' cy='300' r='1.5'/%3E%3Ccircle cx='400' cy='300' r='1.5'/%3E%3Ccircle cx='0' cy='400' r='1.5'/%3E%3Ccircle cx='100' cy='400' r='1.5'/%3E%3Ccircle cx='200' cy='400' r='1.5'/%3E%3Ccircle cx='300' cy='400' r='1.5'/%3E%3Ccircle cx='400' cy='400' r='1.5'/%3E%3Ccircle cx='50' cy='50' r='1'/%3E%3Ccircle cx='150' cy='50' r='1'/%3E%3Ccircle cx='250' cy='50' r='1'/%3E%3Ccircle cx='350' cy='50' r='1'/%3E%3Ccircle cx='50' cy='150' r='1'/%3E%3Ccircle cx='150' cy='150' r='1'/%3E%3Ccircle cx='250' cy='150' r='1'/%3E%3Ccircle cx='350' cy='150' r='1'/%3E%3Ccircle cx='50' cy='250' r='1'/%3E%3Ccircle cx='150' cy='250' r='1'/%3E%3Ccircle cx='250' cy='250' r='1'/%3E%3Ccircle cx='350' cy='250' r='1'/%3E%3Ccircle cx='50' cy='350' r='1'/%3E%3Ccircle cx='150' cy='350' r='1'/%3E%3Ccircle cx='250' cy='350' r='1'/%3E%3Ccircle cx='350' cy='350' r='1'/%3E%3C/g%3E%3C/svg%3E");
-  background-repeat: repeat;
-  background-size: 400px 400px;
+/* textura mesh real de la app (mesh-texture.svg) — overlay sutil */
+.mesh-bg::before {
+  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
+  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400' fill='none'%3E%3Cg stroke='%2322D3EE' stroke-opacity='0.04' stroke-width='1'%3E%3Cpath d='M-100 100 L100 -100 M0 400 L400 0 M300 500 L500 300 M-100 300 L300 -100 M100 500 L500 100'/%3E%3Cpath d='M-100 200 L200 -100 M200 500 L500 200'/%3E%3C/g%3E%3Ccircle cx='0' cy='0' r='1.5'/%3E%3C/svg%3E");
+  background-repeat: repeat; background-size: 400px 400px;
 }
 
 /* ---------- nav ---------- */
 .nav {
   position: fixed; top: 0; left: 0; right: 0; z-index: 50;
   backdrop-filter: blur(12px);
-  background: rgb(var(--canvas) / 0.75);
-  border-bottom: 1px solid rgb(var(--border));
+  background: rgb(var(--canvas) / 0.78);
+  border-bottom: 1px solid rgb(var(--border) / 0.6);
 }
-.nav-inner { display: flex; align-items: center; gap: 1rem; height: 3.25rem; }
-.nav-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: rgb(var(--text-primary)); font-family: "Space Grotesk", sans-serif; }
-.nav-logo svg { width: 1.5rem; height: 1.5rem; }
-.nav-links { display: flex; gap: 1.25rem; margin-left: auto; }
-.nav-links a { color: rgb(var(--text-secondary)); font-size: 0.8125rem; font-weight: 500; }
+.nav-inner { display: flex; align-items: center; gap: 1rem; height: 3.5rem; }
+.nav-logo { display: flex; align-items: center; gap: 0.55rem; font-weight: 600; color: rgb(var(--text-primary)); font-family: "Space Grotesk", sans-serif; font-size: 1.05rem; }
+.nav-logo svg { width: 1.6rem; height: 1.6rem; }
+.nav-links { display: flex; gap: 1.5rem; margin-left: auto; }
+.nav-links a { color: rgb(var(--text-secondary)); font-size: 0.875rem; font-weight: 500; }
 .nav-links a:hover { color: rgb(var(--text-primary)); text-decoration: none; }
 .nav-cta {
-  font-size: 0.8125rem; font-weight: 600; padding: 0.4rem 0.9rem;
-  border-radius: var(--radius); border: 1px solid rgb(var(--accent) / 0.4);
-  color: rgb(var(--accent)); white-space: nowrap;
+  font-size: 0.875rem; font-weight: 600; padding: 0.45rem 1rem;
+  border-radius: var(--radius); border: 1px solid rgb(var(--accent) / 0.45);
+  color: rgb(var(--accent)); white-space: nowrap; background: rgb(var(--accent) / 0.06);
 }
-.nav-cta:hover { background: rgb(var(--accent) / 0.1); text-decoration: none; }
+.nav-cta:hover { background: rgb(var(--accent) / 0.12); text-decoration: none; }
+#langSelect {
+  margin-left: 0.5rem; background: rgb(var(--surface)); color: rgb(var(--text-secondary));
+  border: 1px solid rgb(var(--border)); border-radius: var(--radius); padding: 0.35rem 0.5rem;
+  font-size: 0.8125rem; font-family: inherit; cursor: pointer;
+}
+html[dir="rtl"] #langSelect { margin-left: 0; margin-right: 0.5rem; }
 @media (max-width: 860px) { .nav-links { display: none; } }
 
 /* ---------- hero ---------- */
-.hero { position: relative; padding: 8.5rem 0 4rem; overflow: hidden; }
+.hero { position: relative; min-height: 100vh; display: flex; align-items: center; padding: 6rem 0 4rem; overflow: hidden; }
 .hero-halo {
-  position: absolute; top: -8rem; right: -6rem; width: 30rem; height: 30rem;
-  border-radius: 50%; background: rgb(var(--accent) / 0.08); filter: blur(90px);
-  animation: breathe 6s ease-in-out infinite; pointer-events: none;
+  position: absolute; top: -10rem; right: -10rem; width: 36rem; height: 36rem;
+  border-radius: 50%; background: radial-gradient(circle, rgb(var(--accent) / 0.18) 0%, transparent 70%);
+  filter: blur(80px); animation: breathe 7s ease-in-out infinite; pointer-events: none;
 }
-@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
-.hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); line-height: 1.08; font-weight: 700; margin: 1.25rem 0 0; }
-.hero-sub { max-width: 34rem; margin-top: 1rem; font-size: 1.05rem; color: rgb(var(--text-secondary)); }
-.hero-actions { display: flex; gap: 0.75rem; margin-top: 2rem; flex-wrap: wrap; align-items: center; }
+@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
+.hero .eyebrow { font-size: 0.875rem; letter-spacing: 0.14em; }
+.hero h1 { font-size: clamp(3.5rem, 11vw, 8.5rem); line-height: 0.95; font-weight: 700; margin: 1.5rem 0 0; letter-spacing: -0.04em; }
+.hero-sub { max-width: 44rem; margin-top: 1.5rem; font-size: clamp(1.15rem, 2.2vw, 1.45rem); color: rgb(var(--text-secondary)); line-height: 1.5; }
+.hero-actions { display: flex; gap: 0.85rem; margin-top: 2.5rem; flex-wrap: wrap; align-items: center; }
 .btn-primary {
   display: inline-flex; align-items: center; gap: 0.5rem;
   background: rgb(var(--accent)); color: rgb(var(--canvas));
-  font-weight: 600; font-size: 0.875rem; padding: 0.7rem 1.3rem;
+  font-weight: 700; font-size: 1rem; padding: 0.85rem 1.5rem;
   border-radius: var(--radius); border: none; cursor: pointer;
-  transition: filter 150ms ease, transform 150ms ease;
+  transition: filter 150ms ease, transform 150ms ease, box-shadow 150ms ease;
+  box-shadow: 0 0 24px -4px rgb(var(--accent) / 0.5);
 }
-.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); text-decoration: none; }
+.btn-primary:hover { filter: brightness(1.12); transform: translateY(-2px); text-decoration: none; box-shadow: 0 0 36px -2px rgb(var(--accent) / 0.55); }
 .btn-ghost {
   display: inline-flex; align-items: center; gap: 0.5rem;
-  color: rgb(var(--text-secondary)); font-weight: 500; font-size: 0.875rem;
-  padding: 0.7rem 1rem; border-radius: var(--radius); border: 1px solid rgb(var(--border));
+  color: rgb(var(--text-secondary)); font-weight: 600; font-size: 1rem;
+  padding: 0.85rem 1.25rem; border-radius: var(--radius); border: 1px solid rgb(var(--border-strong));
+  background: rgb(var(--surface) / 0.5);
 }
-.btn-ghost:hover { color: rgb(var(--text-primary)); border-color: rgb(var(--border-strong)); text-decoration: none; }
+.btn-ghost:hover { color: rgb(var(--text-primary)); border-color: rgb(var(--accent) / 0.5); background: rgb(var(--accent) / 0.08); text-decoration: none; }
 
-/* chips bajo el hero */
-.hero-facts { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 2.5rem; }
+.hero-facts { display: flex; gap: 0.65rem; flex-wrap: wrap; margin-top: 2.75rem; }
 .chip {
-  display: inline-flex; align-items: center; gap: 0.4rem;
-  font-size: 0.75rem; color: rgb(var(--text-secondary));
-  border: 1px solid rgb(var(--border)); border-radius: 999px; padding: 0.3rem 0.75rem;
-  background: rgb(var(--surface) / 0.6);
+  display: inline-flex; align-items: center; gap: 0.45rem;
+  font-size: 0.8125rem; font-weight: 600; color: rgb(var(--text-secondary));
+  border: 1px solid rgb(var(--border)); border-radius: 999px; padding: 0.35rem 0.85rem;
+  background: rgb(var(--surface) / 0.7); backdrop-filter: blur(4px);
 }
-.chip svg { width: 0.8rem; height: 0.8rem; }
+.chip svg { width: 0.9rem; height: 0.9rem; }
 
-/* demo strip: métricas reales del demo */
-.demo-strip { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 3rem; }
-.mini-stat { display: flex; flex-direction: column; gap: 0.2rem; border-left: 1px solid rgb(var(--border)); padding-left: 1rem; }
-.mini-stat .k { display: flex; align-items: center; gap: 0.35rem; }
-.mini-stat .k svg { width: 0.85rem; height: 0.85rem; }
-.mini-stat .v { font-size: 1.15rem; font-weight: 600; }
+.demo-strip { display: flex; gap: 2.5rem; flex-wrap: wrap; margin-top: 3.5rem; }
+.mini-stat { display: flex; flex-direction: column; gap: 0.25rem; border-left: 1px solid rgb(var(--border)); padding-left: 1.25rem; }
+.mini-stat .k { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8125rem; }
+.mini-stat .k svg { width: 0.95rem; height: 0.95rem; }
+.mini-stat .v { font-size: 1.35rem; font-weight: 700; }
 
 /* ---------- ticker ---------- */
-.ticker-wrap { border-block: 1px solid rgb(var(--border)); background: rgb(var(--surface) / 0.5); overflow: hidden; position: relative; }
-.ticker { display: flex; gap: 2.5rem; padding: 0.55rem 0; width: max-content; animation: ticker 32s linear infinite; }
+.ticker-wrap { border-block: 1px solid rgb(var(--border) / 0.7); background: rgb(var(--surface) / 0.45); overflow: hidden; position: relative; }
+.ticker { display: flex; gap: 3rem; padding: 0.7rem 0; width: max-content; animation: ticker 34s linear infinite; }
 .ticker-wrap:hover .ticker { animation-play-state: paused; }
 @keyframes ticker { to { transform: translateX(-50%); } }
 html[dir="rtl"] .ticker { animation-direction: reverse; }
-.ticker span { display: inline-flex; align-items: center; gap: 0.45rem; white-space: nowrap; font-size: 0.75rem; color: rgb(var(--text-muted)); }
+.ticker span { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; font-size: 0.8125rem; color: rgb(var(--text-muted)); }
 .ticker i { font-style: normal; color: rgb(var(--text-secondary)); }
-.ticker .dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
+.ticker .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
 
 /* ---------- secciones ---------- */
-section.block { padding: 5.5rem 0; }
-.eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(var(--accent)); }
-.block h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.15; font-weight: 700; margin: 0.75rem 0 0; }
-.block .lead { color: rgb(var(--text-secondary)); max-width: 38rem; margin-top: 0.9rem; font-size: 0.95rem; }
+section.block { padding: 5rem 0; }
+.eyebrow { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgb(var(--accent)); }
+.block h2 { font-size: clamp(2.4rem, 6.2vw, 5rem); line-height: 1.05; font-weight: 700; margin: 0.85rem 0 0; letter-spacing: -0.03em; }
+.block .lead { color: rgb(var(--text-secondary)); max-width: 48rem; margin-top: 1rem; font-size: 1.15rem; line-height: 1.55; }
 
 /* fade-up on scroll */
-.reveal { opacity: 0; transform: translateY(22px); transition: opacity 600ms ease, transform 600ms ease; }
+.reveal { opacity: 0; transform: translateY(26px); transition: opacity 650ms ease, transform 650ms ease; }
 .reveal.in { opacity: 1; transform: none; }
 
 /* principios */
-.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
-.principle { padding: 1.5rem; position: relative; overflow: hidden; }
-.principle svg.big { width: 1.75rem; height: 1.75rem; margin-bottom: 1rem; }
-.principle h3 { font-family: "Space Grotesk", sans-serif; font-size: 1.05rem; margin: 0 0 0.5rem; }
-.principle p { margin: 0; color: rgb(var(--text-secondary)); font-size: 0.85rem; }
-@media (max-width: 800px) { .principles { grid-template-columns: 1fr; } }
+.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.75rem; }
+.principle { padding: 1.75rem; position: relative; overflow: hidden; }
+.principle svg.big { width: 2.2rem; height: 2.2rem; margin-bottom: 1.25rem; }
+.principle h3 { font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; margin: 0 0 0.6rem; }
+.principle p { margin: 0; color: rgb(var(--text-secondary)); font-size: 0.95rem; line-height: 1.55; }
+@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }
 
 /* ---------- teatro sticky ---------- */
-.theater { display: grid; grid-template-columns: 1fr 1.15fr; gap: 3.5rem; align-items: start; margin-top: 3rem; }
-.theater-steps { display: flex; flex-direction: column; gap: 38vh; padding-bottom: 30vh; }
-.tstep { max-width: 26rem; opacity: 0.35; transition: opacity 450ms ease; }
-.tstep .num { font-family: "JetBrains Mono", monospace; font-size: 0.75rem; color: rgb(var(--accent)); letter-spacing: 0.1em; }
-.tstep h3 { font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; margin: 0.5rem 0 0.6rem; }
-.tstep p { color: rgb(var(--text-secondary)); font-size: 0.9rem; margin: 0; }
-.theater-stage {
-  position: sticky; top: 5.5rem; min-height: 24rem;
-  display: flex; align-items: center; justify-content: center;
-}
+.theater { display: grid; grid-template-columns: 38% 62%; gap: 2.5rem; align-items: start; margin-top: 2.75rem; }
+.theater-steps { display: flex; flex-direction: column; gap: 48vh; padding-bottom: 30vh; }
+.tstep { max-width: 28rem; opacity: 0.35; transition: opacity 450ms ease; }
+.tstep .num { font-family: "JetBrains Mono", monospace; font-size: 0.875rem; color: rgb(var(--accent)); letter-spacing: 0.1em; font-weight: 700; }
+.tstep h3 { font-family: "Space Grotesk", sans-serif; font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 0.6rem 0 0.75rem; line-height: 1.15; }
+.tstep p { color: rgb(var(--text-secondary)); font-size: 1.05rem; margin: 0; line-height: 1.55; }
+.theater-stage { position: sticky; top: 5rem; height: 72vh; min-height: 32rem; display: flex; align-items: stretch; justify-content: center; }
 .stage-frame {
-  width: 100%; padding: 1.25rem; border-radius: 1rem; position: relative;
-  background: rgb(var(--surface)); border: 1px solid rgb(var(--border));
+  width: 100%; min-height: 100%; padding: 1.25rem; border-radius: 1.25rem; position: relative;
+  background: rgb(var(--surface) / 0.85); border: 1px solid rgb(var(--border));
+  display: flex; align-items: center; justify-content: center; overflow: hidden;
 }
-.stage-frame::after { /* barra de ventana */
-  content: ""; position: absolute; top: 0; left: 1.25rem; right: 1.25rem; height: 1px;
-  background: rgb(var(--border));
+.stage-frame::before {
+  content: ""; position: absolute; inset: 0; border-radius: 1.25rem;
+  background: radial-gradient(1200px 500px at 20% 0%, rgb(var(--accent) / 0.08), transparent 60%);
+  pointer-events: none;
 }
-.stage { display: none; width: 100%; }
-.stage.active { display: block; animation: stageIn 450ms ease both; }
-@keyframes stageIn { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
-@media (max-width: 900px) {
+.stage { display: none; width: 100%; height: 100%; align-items: center; justify-content: center; position: relative; }
+.stage.active { display: flex; animation: stageIn 500ms ease both; }
+@keyframes stageIn { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
+@media (max-width: 960px) {
   .theater { grid-template-columns: 1fr; }
-  .theater-steps { gap: 60vh; }
-  .theater-stage { top: 4rem; }
+  .theater-stage { position: relative; top: auto; height: 56vh; min-height: 24rem; margin-bottom: 2rem; }
+  .theater-steps { gap: 4rem; padding-bottom: 4rem; }
+  .tstep { opacity: 1; }
 }
 
 /* widgets dentro del teatro */
-.w-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
+.w-row { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; justify-content: center; }
 .ring-wrap { position: relative; display: flex; align-items: center; justify-content: center; }
 .ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
-.ring-center .big { font-family: "Space Grotesk", sans-serif; font-size: 2.4rem; font-weight: 700; line-height: 1; }
-.ring-center .of { font-size: 0.75rem; color: rgb(var(--text-muted)); }
-.pill { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.7rem; border-radius: 999px; }
+.ring-center .big { font-family: "Space Grotesk", sans-serif; font-size: 3.4rem; font-weight: 700; line-height: 1; color: rgb(var(--text-primary)); }
+.ring-center .of { font-size: 0.875rem; color: rgb(var(--text-muted)); margin-top: 0.15rem; }
+.pill { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 700; padding: 0.35rem 0.85rem; border-radius: 999px; letter-spacing: 0.04em; }
 .pill.ok { background: rgb(var(--ok) / 0.12); color: rgb(var(--ok)); }
-.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulseDot 1.6s ease-in-out infinite; }
+.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulseDot 1.6s ease-in-out infinite; }
 @keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
 
-.wan-card { flex: 1; min-width: 15rem; }
-.wan-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; }
-.wan-live { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.6875rem; color: rgb(var(--ok)); font-weight: 600; }
-.wan-live .dot { width: 6px; height: 6px; border-radius: 50%; background: rgb(var(--ok)); animation: pulseDot 1.6s infinite; }
-#trafficChart { width: 100%; height: 120px; display: block; }
+.wan-card { width: 100%; max-width: 46rem; padding: 1.5rem; }
+.wan-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.75rem; }
+.wan-live { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: rgb(var(--ok)); font-weight: 700; letter-spacing: 0.08em; }
+.wan-live .dot { width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--ok)); animation: pulseDot 1.6s infinite; }
+#trafficChart { width: 100%; height: 160px; display: block; }
+.wan-stats { display: flex; gap: 2rem; margin-top: 0.85rem; flex-wrap: wrap; }
+.wan-stats span { font-size: 1rem; }
 
 /* topología svg */
-#topoSvg { width: 100%; height: auto; display: block; }
-.topo-node { opacity: 0; transform: translateY(8px); transition: opacity 500ms ease, transform 500ms ease; }
+#topoSvg { width: 100%; height: 100%; display: block; }
+.topo-node { opacity: 0; transform: scale(0.85); transition: opacity 500ms ease, transform 500ms cubic-bezier(0.22, 1, 0.36, 1); }
 .topo-node.on { opacity: 1; transform: none; }
-.topo-edge { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 700ms ease; }
+.topo-edge { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 900ms ease; }
 .topo-edge.on { stroke-dashoffset: 0; }
 .topo-flow { opacity: 0; transition: opacity 600ms ease; }
 .topo-flow.on { opacity: 1; }
+.topo-guide { fill: none; stroke: rgb(var(--border-strong)); stroke-width: 1; stroke-dasharray: 2 6; opacity: 0.35; }
+.topo-label { font-size: 13px; font-weight: 600; fill: rgb(var(--text-primary)); stroke: rgb(var(--canvas)); stroke-width: 4px; paint-order: stroke; }
+.topo-label-sub { font-size: 10.5px; fill: rgb(var(--text-secondary)); stroke: rgb(var(--canvas)); stroke-width: 3px; paint-order: stroke; }
+.topo-badge-text { font-size: 6.5px; font-weight: 800; letter-spacing: 0.04em; }
 
 /* routers */
-.rgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
+.rgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; width: 100%; max-width: 52rem; }
 @media (max-width: 560px) { .rgrid { grid-template-columns: 1fr; } }
-.rcard { padding: 1rem 1.1rem; }
-.rcard .rt { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; }
-.rcard .rt .name { font-weight: 600; font-size: 0.9rem; }
-.rcard .meters { display: flex; gap: 1rem; }
-.meter { flex: 1; }
-.meter .ml { display: flex; justify-content: space-between; font-size: 0.6875rem; color: rgb(var(--text-muted)); margin-bottom: 0.3rem; }
-.meter .bar { height: 4px; border-radius: 999px; background: rgb(var(--elevated)); overflow: hidden; }
-.meter .bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: rgb(var(--accent)); transition: width 900ms cubic-bezier(0.22, 1, 0.36, 1); }
-.meter.warn .bar i { background: rgb(var(--warn)); }
+.rcard { padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between; }
+.rcard .rt { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; }
+.rcard .rt .nameblock { display: flex; align-items: flex-start; gap: 0.75rem; }
+.rcard .iconbox { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; background: rgb(var(--elevated)); display: flex; align-items: center; justify-content: center; color: rgb(var(--accent)); flex-shrink: 0; }
+.rcard .iconbox svg { width: 1.35rem; height: 1.35rem; }
+.rcard .name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.1rem; display: block; color: rgb(var(--text-primary)); }
+.rcard .model { font-size: 0.8rem; color: rgb(var(--text-muted)); margin-top: 0.1rem; display: block; }
+.rcard .rolepill { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.15rem 0.5rem; border-radius: 999px; background: rgb(var(--accent) / 0.12); color: rgb(var(--accent)); margin-top: 0.3rem; display: inline-block; }
+.rcard .minimetrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem 1rem; margin-top: 0.9rem; }
+.rcard .minimetrics > div { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: rgb(var(--text-secondary)); }
+.rcard .minimetrics svg { width: 1rem; height: 1rem; color: rgb(var(--text-muted)); flex-shrink: 0; }
+.rcard .minimetrics .hot { color: rgb(var(--warn)); }
+.rcard .minimetrics .hot svg { color: rgb(var(--warn)); }
+.rcard .bottom { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; border-top: 1px solid rgb(var(--border)); padding-top: 0.85rem; margin-top: 0.85rem; }
+.rcard .spark { flex: 1; height: 28px; stroke: rgb(var(--accent)); stroke-width: 2; fill: none; opacity: 0.8; }
+.rcard .statuspill { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.25rem 0.6rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.35rem; }
+.rcard .statuspill.ok { background: rgb(var(--ok) / 0.12); color: rgb(var(--ok)); }
+.rcard .statuspill.warn { background: rgb(var(--warn) / 0.12); color: rgb(var(--warn)); }
+.rcard .statuspill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
+.rcard .statuspill.warn .dot { animation: pulseDot 1.6s infinite; }
 
 /* adguard */
-.ag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; align-items: stretch; }
+.ag-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: stretch; width: 100%; max-width: 52rem; }
 @media (max-width: 560px) { .ag-grid { grid-template-columns: 1fr; } }
-.ag-stat { padding: 1rem 1.1rem; }
-.ag-stat .v { font-family: "Space Grotesk", sans-serif; font-size: 1.5rem; font-weight: 700; }
-.ag-stat .k { font-size: 0.75rem; color: rgb(var(--text-muted)); margin-top: 0.15rem; }
-.ag-bar-row { display: flex; align-items: center; gap: 0.6rem; margin: 0.45rem 0; font-size: 0.75rem; }
-.ag-bar-row .d { width: 7.5rem; text-align: right; color: rgb(var(--text-secondary)); font-family: "JetBrains Mono", monospace; font-size: 0.6875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+.ag-stat { padding: 1.25rem; }
+.ag-stat .v { font-family: "Space Grotesk", sans-serif; font-size: 2rem; font-weight: 700; }
+.ag-stat .k { font-size: 0.8125rem; color: rgb(var(--text-muted)); margin-top: 0.2rem; font-weight: 600; }
+.ag-bar-row { display: flex; align-items: center; gap: 0.75rem; margin: 0.55rem 0; font-size: 0.8125rem; }
+.ag-bar-row .d { width: 9rem; text-align: right; color: rgb(var(--text-secondary)); font-family: "JetBrains Mono", monospace; font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
 html[dir="rtl"] .ag-bar-row .d { text-align: left; }
-.ag-bar-row .bar { flex: 1; height: 6px; border-radius: 999px; background: rgb(var(--elevated)); overflow: hidden; }
-.ag-bar-row .bar i { display: block; height: 100%; width: 0; background: rgb(var(--danger) / 0.75); border-radius: 999px; transition: width 800ms ease; }
-.ag-bar-row .n { width: 3.2rem; color: rgb(var(--text-muted)); font-family: "JetBrains Mono", monospace; font-size: 0.6875rem; }
+.ag-bar-row .bar { flex: 1; height: 7px; border-radius: 999px; background: rgb(var(--elevated)); overflow: hidden; }
+.ag-bar-row .bar i { display: block; height: 100%; width: 0; background: rgb(var(--danger) / 0.8); border-radius: 999px; transition: width 900ms ease; }
+.ag-bar-row .n { width: 3.5rem; color: rgb(var(--text-muted)); font-family: "JetBrains Mono", monospace; font-size: 0.75rem; }
 
 /* alertas */
-.feed { display: flex; flex-direction: column; gap: 0.6rem; }
+.feed { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; max-width: 40rem; }
 .alert-item {
-  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.75rem 0.9rem;
-  border: 1px solid rgb(var(--border)); border-radius: var(--radius); background: rgb(var(--elevated) / 0.5);
-  opacity: 0; transform: translateY(10px); transition: opacity 450ms ease, transform 450ms ease;
+  display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.15rem;
+  border: 1px solid rgb(var(--border)); border-radius: var(--radius); background: rgb(var(--elevated) / 0.55);
+  opacity: 0; transform: translateX(-14px); transition: opacity 500ms ease, transform 500ms ease;
 }
+html[dir="rtl"] .alert-item { transform: translateX(14px); }
 .alert-item.on { opacity: 1; transform: none; }
-.alert-item .ico { width: 1.6rem; height: 1.6rem; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
-.alert-item .ico svg { width: 0.9rem; height: 0.9rem; }
-.alert-item .t { font-size: 0.8125rem; font-weight: 500; }
-.alert-item .s { font-size: 0.7rem; color: rgb(var(--text-muted)); margin-top: 0.1rem; }
+.alert-item .ico { width: 2rem; height: 2rem; border-radius: 0.6rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
+.alert-item .ico svg { width: 1.1rem; height: 1.1rem; }
+.alert-item .t { font-size: 0.95rem; font-weight: 600; }
+.alert-item .s { font-size: 0.78rem; color: rgb(var(--text-muted)); margin-top: 0.15rem; }
 .alert-item.warn .ico { background: rgb(var(--warn) / 0.14); color: rgb(var(--warn)); }
 .alert-item.ok .ico { background: rgb(var(--ok) / 0.14); color: rgb(var(--ok)); }
 .alert-item.info .ico { background: rgb(var(--info) / 0.14); color: rgb(var(--info)); }
 .alert-item.accent .ico { background: rgb(var(--accent) / 0.14); color: rgb(var(--accent)); }
 
 /* características: tarjetas grandes */
-.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.5rem; }
-.feature { padding: 1.6rem; }
-.feature svg { width: 1.6rem; height: 1.6rem; margin-bottom: 1rem; }
-.feature h3 { font-family: "Space Grotesk", sans-serif; font-size: 1.05rem; margin: 0 0 0.5rem; }
-.feature p { margin: 0; color: rgb(var(--text-secondary)); font-size: 0.85rem; }
-@media (max-width: 800px) { .features { grid-template-columns: 1fr; } }
+.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; margin-top: 2.75rem; }
+.feature { padding: 2rem; }
+.feature svg { width: 2rem; height: 2rem; margin-bottom: 1.25rem; }
+.feature h3 { font-family: "Space Grotesk", sans-serif; font-size: 1.35rem; margin: 0 0 0.6rem; }
+.feature p { margin: 0; color: rgb(var(--text-secondary)); font-size: 1rem; line-height: 1.55; }
+@media (max-width: 860px) { .features { grid-template-columns: 1fr; } }
 
 /* instalación */
-.install-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; margin-top: 2.5rem; }
+.install-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.25rem; margin-top: 2.75rem; }
 @media (max-width: 860px) { .install-grid { grid-template-columns: 1fr; } }
-.codecard { padding: 1.4rem 1.6rem; }
-.codecard h3 { font-family: "Space Grotesk", sans-serif; font-size: 1rem; margin: 0 0 1rem; }
+.codecard { padding: 1.6rem; }
+.codecard h3 { font-family: "Space Grotesk", sans-serif; font-size: 1.15rem; margin: 0 0 1.15rem; }
 .codebox {
-  display: flex; align-items: center; gap: 0.75rem;
+  display: flex; align-items: center; gap: 0.85rem;
   background: rgb(var(--canvas)); border: 1px solid rgb(var(--border));
-  border-radius: var(--radius); padding: 0.85rem 1rem; overflow-x: auto;
+  border-radius: var(--radius); padding: 1rem 1.15rem; overflow-x: auto;
 }
-.codebox code { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: rgb(var(--text-primary)); white-space: nowrap; }
+.codebox code { font-family: "JetBrains Mono", monospace; font-size: 0.85rem; color: rgb(var(--text-primary)); white-space: nowrap; }
 .codebox .prompt { color: rgb(var(--text-muted)); user-select: none; }
 .copybtn {
   flex-shrink: 0; border: 1px solid rgb(var(--border-strong)); background: rgb(var(--elevated));
   color: rgb(var(--text-secondary)); border-radius: calc(var(--radius) - 2px);
-  font-size: 0.72rem; font-weight: 600; padding: 0.35rem 0.7rem; cursor: pointer;
+  font-size: 0.8rem; font-weight: 700; padding: 0.4rem 0.85rem; cursor: pointer;
 }
 .copybtn:hover { color: rgb(var(--text-primary)); }
 .req-list { margin: 0; padding: 0; list-style: none; }
-.req-list li { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.5rem 0; color: rgb(var(--text-secondary)); font-size: 0.85rem; }
-.req-list svg { width: 1rem; height: 1rem; flex-shrink: 0; margin-top: 0.1rem; color: rgb(var(--ok)); }
-.install-note { margin-top: 1rem; font-size: 0.8rem; color: rgb(var(--text-muted)); }
+.req-list li { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.55rem 0; color: rgb(var(--text-secondary)); font-size: 0.95rem; }
+.req-list svg { width: 1.1rem; height: 1.1rem; flex-shrink: 0; margin-top: 0.15rem; color: rgb(var(--ok)); }
+.install-note { margin-top: 1.1rem; font-size: 0.9rem; color: rgb(var(--text-muted)); }
 .install-note a { color: rgb(var(--text-secondary)); text-decoration: underline; }
 
 /* expectativas honestas */
 .honest { border-left: 3px solid rgb(var(--warn)); }
-.honest p { color: rgb(var(--text-secondary)); margin: 0.6rem 0 0; font-size: 0.875rem; }
+.honest p { color: rgb(var(--text-secondary)); margin: 0.75rem 0 0; font-size: 1rem; line-height: 1.55; }
 
 /* footer */
-footer { border-top: 1px solid rgb(var(--border)); padding: 3.5rem 0; margin-top: 2rem; }
-.foot-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
-.foot-col h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgb(var(--text-muted)); margin: 0 0 0.8rem; }
-.foot-col a { display: block; color: rgb(var(--text-secondary)); font-size: 0.85rem; padding: 0.2rem 0; }
+footer { border-top: 1px solid rgb(var(--border) / 0.7); padding: 4rem 0; margin-top: 2rem; }
+.foot-grid { display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; }
+.foot-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: rgb(var(--text-muted)); margin: 0 0 0.85rem; }
+.foot-col a { display: block; color: rgb(var(--text-secondary)); font-size: 0.95rem; padding: 0.2rem 0; }
 .foot-col a:hover { color: rgb(var(--text-primary)); }
 .kofi {
   display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem;
-  border: 1px solid rgb(var(--warn) / 0.4); color: rgb(var(--warn));
-  border-radius: var(--radius); padding: 0.5rem 1rem; font-size: 0.85rem; font-weight: 600;
+  border: 1px solid rgb(var(--warn) / 0.45); color: rgb(var(--warn));
+  border-radius: var(--radius); padding: 0.55rem 1.1rem; font-size: 0.9rem; font-weight: 700;
+  background: rgb(var(--warn) / 0.06);
 }
-.kofi:hover { background: rgb(var(--warn) / 0.1); text-decoration: none; }
-.kofi svg { width: 1rem; height: 1rem; }
-.foot-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgb(var(--border)); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: rgb(var(--text-muted)); font-size: 0.75rem; }
+.kofi:hover { background: rgb(var(--warn) / 0.12); text-decoration: none; }
+.kofi svg { width: 1.1rem; height: 1.1rem; }
+.foot-bottom { margin-top: 2.75rem; padding-top: 1.5rem; border-top: 1px solid rgb(var(--border)); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: rgb(var(--text-muted)); font-size: 0.8125rem; }
 
 /* ---------- widget apariencia (flotante) ---------- */
 .appearance-fab {
   position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 60;
-  width: 2.75rem; height: 2.75rem; border-radius: 50%;
+  width: 3rem; height: 3rem; border-radius: 50%;
   background: rgb(var(--surface)); border: 1px solid rgb(var(--border-strong));
   color: rgb(var(--text-secondary)); cursor: pointer;
   display: flex; align-items: center; justify-content: center;
-  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
-  transition: transform 150ms ease, color 150ms ease;
+  box-shadow: 0 8px 30px rgb(0 0 0 / 0.4);
+  transition: transform 150ms ease, color 150ms ease, box-shadow 150ms ease;
 }
 html[dir="rtl"] .appearance-fab { right: auto; left: 1.25rem; }
-.appearance-fab:hover { color: rgb(var(--accent)); transform: scale(1.06); }
-.appearance-fab svg { width: 1.15rem; height: 1.15rem; }
+.appearance-fab:hover { color: rgb(var(--accent)); transform: scale(1.08); box-shadow: 0 0 24px -4px rgb(var(--accent) / 0.45); }
+.appearance-fab svg { width: 1.25rem; height: 1.25rem; }
 .appearance-panel {
-  position: fixed; bottom: 4.75rem; right: 1.25rem; z-index: 60;
-  width: 16.5rem; padding: 1rem 1.1rem; border-radius: 1rem;
+  position: fixed; bottom: 5.25rem; right: 1.25rem; z-index: 60;
+  width: 17rem; padding: 1.15rem; border-radius: 1.15rem;
   background: rgb(var(--surface)); border: 1px solid rgb(var(--border));
-  box-shadow: 0 16px 48px rgb(0 0 0 / 0.4);
-  opacity: 0; transform: translateY(10px) scale(0.97); pointer-events: none;
+  box-shadow: 0 20px 56px rgb(0 0 0 / 0.45);
+  opacity: 0; transform: translateY(12px) scale(0.97); pointer-events: none;
   transition: opacity 200ms ease, transform 200ms ease;
 }
 html[dir="rtl"] .appearance-panel { right: auto; left: 1.25rem; }
 .appearance-panel.open { opacity: 1; transform: none; pointer-events: auto; }
-.appearance-panel h5 { margin: 0 0 0.6rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgb(var(--text-muted)); }
-.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; }
+.appearance-panel h5 { margin: 0 0 0.75rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgb(var(--text-muted)); }
+.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
 .seg button {
   border: 1px solid rgb(var(--border)); background: transparent; color: rgb(var(--text-secondary));
-  border-radius: calc(var(--radius) - 2px); padding: 0.45rem 0.25rem; font-size: 0.72rem; font-weight: 600; cursor: pointer;
+  border-radius: calc(var(--radius) - 2px); padding: 0.5rem 0.25rem; font-size: 0.78rem; font-weight: 700; cursor: pointer;
   font-family: inherit;
 }
 .seg button.on { background: rgb(var(--accent) / 0.12); border-color: rgb(var(--accent) / 0.5); color: rgb(var(--accent)); }
-.swatches { display: flex; gap: 0.6rem; }
+.swatches { display: flex; gap: 0.75rem; }
 .swatch {
-  width: 1.7rem; height: 1.7rem; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
+  width: 1.85rem; height: 1.85rem; border-radius: 50%; cursor: pointer; border: 2px solid transparent;
   position: relative; background: rgb(var(--sw));
-  transition: transform 120ms ease;
+  transition: transform 120ms ease, box-shadow 120ms ease;
 }
-.swatch:hover { transform: scale(1.12); }
-.swatch.on { border-color: rgb(var(--text-primary)); }
-.panel-note { margin-top: 0.8rem; font-size: 0.6875rem; color: rgb(var(--text-muted)); }
+.swatch:hover { transform: scale(1.12); box-shadow: 0 0 16px -2px rgb(var(--sw) / 0.55); }
+.swatch.on { border-color: rgb(var(--text-primary)); box-shadow: 0 0 0 2px rgb(var(--surface)), 0 0 0 4px rgb(var(--text-primary) / 0.5); }
+.panel-note { margin-top: 0.9rem; font-size: 0.75rem; color: rgb(var(--text-muted)); }
 
 /* ---------- i18n / rtl ---------- */
-html[dir="rtl"] .mini-stat { border-left: none; border-right: 1px solid rgb(var(--border)); padding-left: 0; padding-right: 1rem; }
+html[dir="rtl"] .mini-stat { border-left: none; border-right: 1px solid rgb(var(--border)); padding-left: 0; padding-right: 1.25rem; }
 html[dir="rtl"] .honest { border-left: none; border-right: 3px solid rgb(var(--warn)); }
 
 /* ---------- reduced motion ---------- */
@@ -398,4 +435,16 @@ html[dir="rtl"] .honest { border-left: none; border-right: 3px solid rgb(var(--w
     animation-iteration-count: 1 !important;
     transition-duration: 0.01ms !important;
   }
+  #bgCanvas { display: none; }
+}
+
+/* ---------- extra responsive ---------- */
+@media (max-width: 520px) {
+  .hero h1 { font-size: clamp(2.8rem, 14vw, 4rem); }
+  .hero { padding: 5.5rem 0 3rem; }
+  .hero-actions { flex-direction: column; align-items: flex-start; }
+  .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
+  .demo-strip { gap: 1.5rem; }
+  .mini-stat { border: none; padding: 0; }
+  .features { grid-template-columns: 1fr; }
 }