/* ==========================================================
   PENSALYTICS VPN · MAQUETA v2
   Paleta del manual de marca con 3 variantes: oscura (defecto), clara y violeta.
   ========================================================== */

:root {
  /* Variante oscura (oficial) */
  --bg: #0E032B;
  --bg-image: none;
  --surface: #170A3D;
  --card: rgba(30, 15, 74, 0.66);
  --card-2: rgba(42, 22, 100, 0.85);
  --line: color-mix(in srgb, var(--primary-2) 18%, transparent);
  --line-strong: color-mix(in srgb, var(--primary-2) 38%, transparent);
  --primary: #582BEA;
  --primary-2: #7E52F1;
  --on-primary: #FFFFFF;
  --primary-glow: color-mix(in srgb, var(--primary) 42%, transparent);
  --soft-text: #C9B6FF;
  --mint: #52E5D3;
  --on-mint: #062019;
  --mint-glow: color-mix(in srgb, var(--mint) 32%, transparent);
  --red: #FF5C7A;
  --amber: #FFC25C;
  --text: #EBEAEF;
  --muted: #A9A1CC;
  --dim: #6D6597;
  --grad-from: #B79CFF;
  --grad-to: var(--mint);
  --topbar-bg: rgba(14, 3, 43, 0.8);
  --panel-bg: rgba(23, 10, 61, 0.94);
  --chip-bg: rgba(14, 3, 43, 0.45);
  --track: rgba(255, 255, 255, 0.07);
  --shadow: rgba(0, 0, 0, 0.45);
  --iso-top: #FFFFFF;
  --iso-slab: url(#isoSlab);
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Variante clara: fondo gris del manual, isotipo con pieza azul marino */
:root[data-theme="clara"] {
  --bg: #EBEAEF;
  --surface: #FFFFFF;
  --card: rgba(255, 255, 255, 0.78);
  --card-2: #FFFFFF;
  --line: rgba(14, 3, 43, 0.1);
  --line-strong: color-mix(in srgb, var(--primary) 32%, transparent);
  --soft-text: #582BEA;
  --mint: #0E9E8E;
  --on-mint: #FFFFFF;
  --red: #D7264A;
  --amber: #B7700A;
  --text: #0E032B;
  --muted: #4E4870;
  --dim: #8A85A3;
  --grad-from: #582BEA;
  --grad-to: #0E9E8E;
  --topbar-bg: rgba(235, 234, 239, 0.85);
  --panel-bg: rgba(255, 255, 255, 0.96);
  --chip-bg: rgba(255, 255, 255, 0.7);
  --track: rgba(14, 3, 43, 0.08);
  --shadow: rgba(14, 3, 43, 0.12);
  --iso-top: #0E032B;
}

/* Variante violeta: fondo degradado del manual, isotipo en blanco */
:root[data-theme="violeta"] {
  --bg: #5A25DF;
  --bg-image: linear-gradient(135deg, #5A25DF 0%, #7543E3 100%);
  --surface: #4A1DC4;
  --card: rgba(255, 255, 255, 0.1);
  --card-2: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.18);
  --line-strong: rgba(255, 255, 255, 0.4);
  --primary: #FFFFFF;
  --primary-2: #EDE6FF;
  --on-primary: #4A1DC4;
  --primary-glow: rgba(20, 0, 80, 0.35);
  --soft-text: #FFFFFF;
  --red: #FFC2CF;
  --amber: #FFE08A;
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.78);
  --dim: rgba(255, 255, 255, 0.55);
  --grad-from: #FFFFFF;
  --grad-to: var(--mint);
  --topbar-bg: rgba(74, 29, 196, 0.82);
  --panel-bg: rgba(60, 20, 170, 0.95);
  --chip-bg: rgba(30, 8, 110, 0.35);
  --track: rgba(255, 255, 255, 0.18);
  --shadow: rgba(20, 0, 80, 0.35);
  --iso-slab: #FFFFFF;
}

/* El teléfono tiene su propia apariencia (Cuenta › Apariencia); por defecto, oscura */
.phone {
  --ph-screen: radial-gradient(120% 60% at 50% 0%, #2A1460, #0E032B 60%);
  --ph-chip: var(--ph-chip);
  --ph-chip-2: rgba(255, 255, 255, 0.07);
  --ph-switch: rgba(255, 255, 255, 0.15);
  --ph-divider: rgba(255, 255, 255, 0.1);
  --ph-tabbar: rgba(14, 3, 43, 0.6);
  --surface: #170A3D;
  --card: rgba(30, 15, 74, 0.66);
  --primary: #582BEA;
  --primary-2: #7E52F1;
  --on-primary: #FFFFFF;
  --primary-glow: color-mix(in srgb, #582BEA 42%, transparent);
  --soft-text: #C9B6FF;
  --mint: #52E5D3;
  --on-mint: #062019;
  --mint-glow: color-mix(in srgb, #52E5D3 32%, transparent);
  --red: #FF5C7A;
  --amber: #FFC25C;
  --text: #EBEAEF;
  --muted: #A9A1CC;
  --dim: #6D6597;
  --line: color-mix(in srgb, #7E52F1 18%, transparent);
  --line-strong: color-mix(in srgb, #7E52F1 38%, transparent);
  --iso-top: #FFFFFF;
  --iso-slab: url(#isoSlab);
  color: var(--text);
}
.phone[data-app-theme="clara"] {
  --ph-screen: linear-gradient(180deg, #F6F5FA, #EBEAEF);
  --ph-chip: rgba(14, 3, 43, 0.05);
  --ph-chip-2: rgba(14, 3, 43, 0.09);
  --ph-switch: rgba(14, 3, 43, 0.18);
  --ph-divider: rgba(14, 3, 43, 0.1);
  --ph-tabbar: rgba(255, 255, 255, 0.85);
  --soft-text: #582BEA;
  --mint: #0E9E8E;
  --on-mint: #FFFFFF;
  --red: #D7264A;
  --amber: #B7700A;
  --text: #0E032B;
  --muted: #4E4870;
  --dim: #8A85A3;
  --line: rgba(14, 3, 43, 0.1);
  --line-strong: color-mix(in srgb, #582BEA 32%, transparent);
  --iso-top: #0E032B;
}
.phone[data-app-theme="violeta"] {
  --ph-screen: linear-gradient(160deg, #5A25DF, #7543E3);
  --ph-chip: rgba(255, 255, 255, 0.1);
  --ph-chip-2: rgba(255, 255, 255, 0.16);
  --ph-switch: rgba(255, 255, 255, 0.25);
  --ph-divider: rgba(255, 255, 255, 0.2);
  --ph-tabbar: rgba(60, 20, 170, 0.55);
  --soft-text: #FFFFFF;
  --red: #FFC2CF;
  --amber: #FFE08A;
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.8);
  --dim: rgba(255, 255, 255, 0.6);
  --line: rgba(255, 255, 255, 0.2);
  --line-strong: rgba(255, 255, 255, 0.4);
  --iso-slab: #FFFFFF;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg) var(--bg-image) fixed;
  color: var(--text);
  line-height: 1.55;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.center { text-align: center; }
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px 28px;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 34px; height: 39px; flex-shrink: 0; filter: drop-shadow(0 4px 12px var(--primary-glow)); }
.logo.sm { width: 28px; height: 32px; }
.logo.xs { width: 20px; height: 23px; filter: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-line { display: flex; align-items: center; gap: 8px; }
.brand-lema { display: block; font-size: 0.5rem; font-weight: 600; letter-spacing: 0.32em; color: var(--muted); margin-top: 5px; white-space: nowrap; }
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand-tag {
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 7px; border-radius: 6px;
  background: var(--mint); color: var(--on-mint);
}
.views-nav {
  display: flex; gap: 4px; margin-inline: auto;
  padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.nav-btn {
  padding: 8px 18px; border-radius: 999px;
  font-size: 0.88rem; font-weight: 600; color: var(--muted);
  transition: all 0.25s var(--ease);
}
.nav-btn:hover { color: var(--text); }
.nav-btn.active { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 18px var(--primary-glow); }
.theme-pick { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.theme-dot {
  width: 22px; height: 22px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.theme-dot:hover { transform: scale(1.12); }
.theme-dot.dark { background: #0E032B; }
.theme-dot.light { background: #EBEAEF; box-shadow: inset 0 0 0 1px rgba(14, 3, 43, 0.2); }
.theme-dot.violet { background: linear-gradient(135deg, #5A25DF, #7543E3); }
.theme-dot.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--mint); }
.present-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  font-weight: 700; font-size: 0.86rem;
  border: 1px solid var(--mint); color: var(--mint);
  transition: all 0.25s var(--ease);
}
.present-btn svg { width: 14px; height: 14px; }
.present-btn:hover { background: var(--mint); color: var(--on-mint); box-shadow: 0 6px 20px var(--mint-glow); }

/* ---------- Vistas ---------- */
.view { display: none; animation: fadeUp 0.5s var(--ease); }
.view.active { display: block; }
#view-demo, #view-app, #view-negocio { padding: 56px 0 120px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 14px;
  font-weight: 700; font-size: 0.95rem;
  transition: all 0.25s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: var(--on-primary); box-shadow: 0 10px 28px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px var(--primary-glow); }
.btn-primary:disabled { opacity: 0.5; transform: none; cursor: default; }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { background: var(--card); border-color: var(--primary-2); }
.btn.full { width: 100%; }
.btn.sm { padding: 9px 14px; font-size: 0.82rem; border-radius: 10px; }

/* ---------- Encabezados ---------- */
.block { padding: 88px 0 0; }
.heading { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.heading.left { text-align: left; margin-left: 0; max-width: 820px; }
.heading h2, .app-side h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; letter-spacing: -0.03em; margin: 10px 0 12px; }
.heading p { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mint);
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 24px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -30% -10% auto auto; width: 820px; height: 820px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 32%, transparent), transparent 62%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--mint) 8%, transparent); border: 1px solid color-mix(in srgb, var(--mint) 28%, transparent);
  color: var(--mint); font-size: 0.82rem; font-weight: 600;
}
.blink { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 0 var(--mint-glow); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--mint-glow); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.3rem, 4vw, 3.3rem); line-height: 1.04; letter-spacing: -0.04em; margin: 22px 0 18px; font-weight: 800; }
.grad { background: linear-gradient(90deg, var(--grad-from), var(--grad-to)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 540px; }
.lead strong { color: var(--text); }
.cta-row { display: flex; gap: 12px; margin: 30px 0 28px; flex-wrap: wrap; }
.trust { list-style: none; display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 0.86rem; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust .ico { color: var(--mint); }

.map-card {
  background: var(--card);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; box-shadow: 0 30px 80px var(--shadow);
}
.map-head { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 700; color: var(--muted); padding: 2px 4px 10px; }
.live { display: flex; align-items: center; gap: 8px; color: var(--mint); }
.netmap { width: 100%; height: auto; display: block; }
.globe { display: block; width: 100%; aspect-ratio: 1.45; cursor: grab; touch-action: pan-y; }
.globe:active { cursor: grabbing; }
.dot-grid { fill: color-mix(in srgb, var(--muted) 14%, transparent); }
.dot-land { fill: color-mix(in srgb, var(--primary-2) 72%, transparent); }
.arc { fill: none; stroke: url(#arcGrad); stroke-width: 2; stroke-linecap: round; }
.arc-base { fill: none; stroke: color-mix(in srgb, var(--primary-2) 22%, transparent); stroke-width: 1.5; }
.arc-flow { fill: none; stroke: var(--mint); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 6 18; animation: flow 1.6s linear infinite; opacity: 0.85; }
@keyframes flow { to { stroke-dashoffset: -48; } }
.map-node circle.core { fill: var(--mint); }
.map-node circle.halo { fill: url(#nodeGlow); animation: halo 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.map-node.origin circle.core { fill: #FFC25C; }
@keyframes halo { 50% { transform: scale(1.35); opacity: 0.6; } }
.map-node text { fill: var(--text); font-size: 13px; font-weight: 700; font-family: var(--font); paint-order: stroke; stroke: var(--bg); stroke-width: 3.5px; stroke-linejoin: round; }
.map-node text.sub { fill: var(--muted); font-size: 11px; font-weight: 500; }
.map-note { color: var(--dim); font-size: 0.75rem; padding: 8px 4px 0; }

/* ---------- Banderas ---------- */
.flag { display: inline-flex; width: 30px; height: 20px; border-radius: 4px; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); }
.flag svg { width: 100%; height: 100%; display: block; }
.flag.lg { width: 42px; height: 28px; border-radius: 6px; }

/* ---------- Nodos ---------- */
.nodes-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.node {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 22px; transition: all 0.3s var(--ease);
}
.node:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--card-2); }
.node-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.badge-on { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.08em; color: var(--mint); background: color-mix(in srgb, var(--mint) 10%, transparent); padding: 4px 8px; border-radius: 6px; }
.node h3 { font-size: 1.08rem; }
.node p { color: var(--muted); font-size: 0.88rem; min-height: 64px; }
.node-metrics { display: flex; gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.node-metrics small { display: block; color: var(--dim); font-size: 0.72rem; }
.node-metrics b { font-family: var(--mono); font-size: 0.95rem; }

/* ---------- Planes ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px 26px; transition: all 0.3s var(--ease);
}
.plan:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.plan.featured {
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 28%, transparent), var(--card));
  border-color: var(--primary-2); box-shadow: 0 24px 60px color-mix(in srgb, var(--primary) 25%, transparent);
}
.plan .ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--mint); color: var(--on-mint); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { font-size: 1rem; color: var(--muted); font-weight: 700; }
.price { display: flex; align-items: baseline; gap: 4px; margin: 10px 0 2px; }
.price b { font-size: 3rem; letter-spacing: -0.04em; line-height: 1; }
.price span { color: var(--muted); }
.billed { color: var(--dim); font-size: 0.82rem; margin: 6px 0 18px; min-height: 1.3em; }
.save { display: inline-block; font-size: 0.72rem; font-weight: 800; color: var(--mint); background: color-mix(in srgb, var(--mint) 10%, transparent); padding: 2px 8px; border-radius: 6px; margin-left: 6px; }
.feat { list-style: none; display: grid; align-content: start; gap: 10px; font-size: 0.9rem; color: var(--muted); margin-bottom: 26px; flex: 1; }
.feat li { display: flex; gap: 10px; }
.perk {
  display: flex; align-items: center; gap: 10px; margin: -8px 0 20px;
  padding: 10px 12px; border-radius: 12px; font-size: 0.86rem; color: var(--text);
  background: color-mix(in srgb, var(--mint) 12%, transparent);
  border: 1px dashed color-mix(in srgb, var(--mint) 55%, transparent);
}
.perk b { color: var(--mint); }
.feat li::before { content: '✓'; color: var(--mint); font-weight: 800; }

/* ---------- Comparativa ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--line); }
.compare { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 0.9rem; }
.compare th, .compare td { padding: 18px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th { font-size: 0.8rem; color: var(--muted); font-weight: 700; background: var(--surface); }
.compare tbody tr:last-child td { border-bottom: 0; }
.compare td:first-child { font-weight: 600; }
.compare .us { background: color-mix(in srgb, var(--primary) 10%, transparent); }
.compare thead .us { color: var(--text); background: color-mix(in srgb, var(--primary) 25%, transparent); }
.ok { color: var(--mint); font-weight: 600; }
.ok::before { content: '✓ '; }
.mid { color: var(--amber); }
.bad { color: var(--red); }
.bad::before { content: '✕ '; }

.footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 28px 0 48px; }
.footer-in { display: flex; justify-content: space-between; color: var(--dim); font-size: 0.85rem; gap: 16px; flex-wrap: wrap; }
.footer strong { color: var(--text); }
.footer-in { align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand strong { display: block; line-height: 1; }

/* ---------- App móvil ---------- */
.app-layout { display: grid; grid-template-columns: 1fr auto; gap: 64px; align-items: center; }
.steps-list { list-style: none; counter-reset: s; display: grid; gap: 16px; margin: 26px 0; }
.steps-list li { counter-increment: s; position: relative; padding-left: 46px; color: var(--muted); }
.steps-list li strong { color: var(--text); }
.steps-list li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--primary) 20%, transparent); color: var(--soft-text); font-weight: 800; font-size: 0.85rem;
}
.note { color: var(--dim); font-size: 0.8rem; }

.phone {
  position: relative; width: 340px; height: clamp(620px, calc(100vh - 140px), 700px); padding: 12px;
  border-radius: 52px; background: #070512;
  box-shadow: 0 0 0 2px #2A2150, 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 120px color-mix(in srgb, var(--primary) 22%, transparent);
}
.phone-notch { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); width: 96px; height: 26px; border-radius: 20px; background: #000; z-index: 5; }
.screen {
  position: relative; height: 100%; border-radius: 42px; overflow: hidden;
  background: var(--ph-screen);
  display: flex; flex-direction: column;
  transition: background 0.4s var(--ease);
}
.statusbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 28px 0; font-size: 0.8rem; font-weight: 700; height: 44px; }
.sb-icons { display: flex; align-items: center; gap: 6px; }
.battery { width: 22px; height: 11px; border: 1.5px solid currentColor; border-radius: 3px; padding: 1px; }
.battery span { display: block; width: 75%; height: 100%; background: currentColor; border-radius: 1px; }
.app-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px 4px; }
.app-brand { display: flex; align-items: center; gap: 7px; }
.app-title { font-weight: 800; font-size: 1.05rem; }
.vip { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; padding: 4px 8px; border-radius: 6px; background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); }
.tabs-holder { flex: 1; position: relative; overflow: hidden; }
.tab { position: absolute; inset: 0; padding: 10px 20px; overflow-y: auto; display: none; scrollbar-width: none; }
.tab.active { display: block; animation: fadeUp 0.4s var(--ease); }
.tab-h { font-size: 1.1rem; margin: 6px 0 16px; }

.state-badge { display: flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; margin: 6px auto 8px; padding: 6px 14px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; }
.state-badge .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state-badge.off { color: var(--red); background: rgba(255, 92, 122, 0.12); }
.state-badge.wait { color: var(--amber); background: rgba(255, 194, 92, 0.12); }
.state-badge.on { color: var(--mint); background: color-mix(in srgb, var(--mint) 12%, transparent); }
.ip-pill { text-align: center; font-size: 0.78rem; }
.ip-pill small { color: var(--dim); display: block; }
.ip-pill strong { font-family: var(--mono); font-size: 0.8rem; }

.power-wrap { position: relative; width: 170px; height: 170px; margin: 22px auto 18px; display: grid; place-items: center; }
.ripple { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--mint); opacity: 0; }
.ripple.active { animation: ripple 2.2s var(--ease) infinite; }
.ripple.r2.active { animation-delay: 1.1s; }
@keyframes ripple { 0% { transform: scale(0.75); opacity: 0.7; } 100% { transform: scale(1.35); opacity: 0; } }
.power {
  position: relative; width: 146px; height: 146px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em;
  transition: all 0.4s var(--ease);
}
.power svg { width: 48px; height: 48px; }
.power .check { opacity: 0; transition: opacity 0.3s; }
.power.off { background: radial-gradient(circle at 30% 25%, #3A2A7A, #1A1240); color: #C9B6FF; box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 12%, transparent), 0 20px 40px rgba(0, 0, 0, 0.4); }
.power.off:hover { box-shadow: 0 0 0 12px color-mix(in srgb, var(--primary) 20%, transparent), 0 20px 40px rgba(0, 0, 0, 0.4); }
.power.wait { background: radial-gradient(circle at 30% 25%, #6B4F14, #2A1F08); color: var(--amber); box-shadow: 0 0 0 8px rgba(255, 194, 92, 0.14); animation: breathe 1s ease-in-out infinite; }
.power.on { background: radial-gradient(circle at 30% 25%, #1E8C7A, #0B3A33); color: var(--mint); box-shadow: 0 0 0 8px color-mix(in srgb, var(--mint) 16%, transparent), 0 0 50px var(--mint-glow); }
.power.on .check { opacity: 1; }
@keyframes breathe { 50% { transform: scale(0.96); } }

.usage { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--ph-chip); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.usage-main small { display: block; font-size: 0.6rem; color: var(--dim); font-weight: 800; letter-spacing: 0.08em; }
.usage-main b { font-size: 1.15rem; color: var(--mint); }
.usage-split { display: grid; gap: 2px; text-align: right; font-size: 0.74rem; }
.usage-split i { font-style: normal; font-weight: 800; margin-right: 5px; }
.usage-split i.down { color: var(--mint); }
.usage-split i.up { color: var(--soft-text); }
.server-card {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 14px; border-radius: 14px; margin-bottom: 12px;
  background: var(--ph-chip); border: 1px solid var(--line);
  transition: all 0.25s var(--ease);
}
.server-card:hover { border-color: var(--primary-2); }
.sc-text { flex: 1; min-width: 0; }
.sc-text strong { display: block; font-size: 0.88rem; }
.sc-text small { display: block; color: var(--muted); font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.speeds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.speeds > div { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--ph-chip); }
.speeds small { display: block; color: var(--dim); font-size: 0.66rem; }
.speeds strong { font-family: var(--mono); font-size: 0.82rem; }
.arr { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; }
.arr.down { background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); }
.arr.up { background: color-mix(in srgb, var(--primary-2) 20%, transparent); color: var(--soft-text); }

.srv-list { display: grid; gap: 10px; }
.srv {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 14px; background: var(--ph-chip); border: 1px solid transparent;
  transition: all 0.25s var(--ease);
}
.srv:hover { background: var(--ph-chip-2); }
.srv.active { border-color: var(--mint); background: color-mix(in srgb, var(--mint) 8%, transparent); }
.srv .sc-text small { display: block; }

.gauge { position: relative; width: 190px; height: 190px; margin: 4px auto 6px; }
.gauge svg { width: 100%; height: 100%; transform: rotate(135deg); }
.g-track, .g-fill { fill: none; stroke-width: 14; stroke-linecap: round; }
.g-track { stroke: var(--ph-chip-2); stroke-dasharray: 395.8 527.8; }
.g-fill { stroke: var(--mint); stroke-dasharray: 0 527.8; transition: stroke-dasharray 0.12s linear; filter: drop-shadow(0 0 8px var(--mint-glow)); }
.g-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.g-center b { font-size: 2.2rem; }
.g-center small { color: var(--muted); }
.g-status { text-align: center; color: var(--muted); font-size: 0.8rem; margin-bottom: 14px; min-height: 1.3em; }
.res { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.res div { text-align: center; padding: 10px 4px; border-radius: 12px; background: var(--ph-chip); }
.res small { display: block; color: var(--dim); font-size: 0.66rem; }
.res b { font-family: var(--mono); font-size: 0.8rem; }

.acc { padding: 18px; border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 35%, transparent), color-mix(in srgb, var(--mint) 12%, transparent)); border: 1px solid var(--line-strong); margin-bottom: 14px; }
.acc-plan { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em; color: var(--mint); }
.acc strong { display: block; margin-top: 6px; }
.acc small { display: block; color: var(--muted); font-size: 0.76rem; }
.acc-anon { display: flex !important; align-items: center; gap: 6px; }
.acc-anon svg { width: 15px; height: 15px; color: var(--mint); }
.acc .acc-note { font-size: 0.66rem; color: var(--dim); margin-top: 4px; }
.acc-days { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ph-divider); font-size: 0.8rem; }
.settings { list-style: none; display: grid; gap: 8px; }
.settings li { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: 12px; background: var(--ph-chip); font-size: 0.82rem; }
.chev { color: var(--muted); font-size: 1.2rem; }
.sw input { display: none; }
.sw i { display: block; width: 38px; height: 22px; border-radius: 999px; background: var(--ph-switch); position: relative; transition: background 0.25s; cursor: pointer; }
.sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease); }
.sw input:checked + i { background: var(--mint); }
.sw input:checked + i::after { transform: translateX(16px); }

.tabbar { display: grid; grid-template-columns: repeat(4, 1fr); padding: 8px 10px 20px; border-top: 1px solid var(--line); background: var(--ph-tabbar); }
/* El botón conectado es oscuro en las 3 apariencias: su texto usa siempre la menta clara */
.phone .power.on { color: #52E5D3; }
.app-theme { display: flex; gap: 6px; }
.app-dot { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3); transition: box-shadow 0.2s var(--ease); }
.app-dot.dark { background: #0E032B; }
.app-dot.light { background: #EBEAEF; box-shadow: inset 0 0 0 1px rgba(14, 3, 43, 0.25); }
.app-dot.violet { background: linear-gradient(135deg, #5A25DF, #7543E3); }
.app-dot.active { box-shadow: 0 0 0 2px var(--ph-screen-solid, transparent), 0 0 0 3px var(--mint); }
.tb { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 0.62rem; font-weight: 700; color: var(--dim); padding: 6px 0; transition: color 0.2s; }
.tb svg { width: 20px; height: 20px; }
.tb.active { color: var(--mint); }

/* ---------- Negocio ---------- */
.assump-tag {
  display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 6px; margin-right: 6px;
  background: rgba(255, 194, 92, 0.14); color: var(--amber); border: 1px dashed rgba(255, 194, 92, 0.6);
}
.assump-tag.sm { font-size: 0.6rem; padding: 2px 6px; }
.biz-grid { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.biz-inputs { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.scenario { padding: 16px; border-radius: var(--r-md); background: color-mix(in srgb, var(--primary) 14%, transparent); border: 1px solid var(--line-strong); margin-bottom: 22px; }
.scenario label { font-weight: 700; font-size: 0.86rem; }
.range-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.range-row output { font-size: 1.3rem; font-weight: 700; min-width: 60px; text-align: right; }
input[type="range"] { flex: 1; accent-color: var(--mint); height: 6px; cursor: pointer; }
.inputs-title { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; color: var(--muted); margin: 6px 0 10px; text-transform: uppercase; }
.in-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.in-grid.three { grid-template-columns: repeat(3, 1fr); }
.in-grid .span2 { grid-column: 1 / -1; }
.in-grid label { font-size: 0.74rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; justify-content: flex-end; }
.in-grid input {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  background: var(--surface); border: 1px dashed rgba(255, 194, 92, 0.45);
  font-family: var(--mono); font-size: 0.95rem; transition: border-color 0.2s;
}
.in-grid input:focus { outline: none; border-color: var(--mint); border-style: solid; }
.mix-warn { color: var(--red); font-size: 0.8rem; min-height: 1.2em; margin: -8px 0 12px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.kpi small { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 600; }
.kpi b { display: block; font-family: var(--mono); font-size: 1.7rem; letter-spacing: -0.02em; margin: 6px 0 2px; }
.kpi span { color: var(--dim); font-size: 0.74rem; }
.kpi.hl { background: linear-gradient(135deg, color-mix(in srgb, var(--mint) 16%, transparent), var(--card)); border-color: color-mix(in srgb, var(--mint) 40%, transparent); }
.kpi.hl b { color: var(--mint); }
.kpi b.neg { color: var(--red); }
.chart-card { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 18px 8px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.86rem; gap: 12px; flex-wrap: wrap; }
.legend { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.76rem; }
.lg-line { width: 18px; height: 3px; border-radius: 2px; background: var(--mint); display: inline-block; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--primary-2); display: inline-block; margin-left: 8px; }
.chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.chart .axis { stroke: rgba(168, 162, 199, 0.18); stroke-width: 1; }
.chart .zero { stroke: rgba(168, 162, 199, 0.45); stroke-width: 1; stroke-dasharray: 4 4; }
.chart .tick { fill: var(--dim); font-size: 11px; font-family: var(--mono); }
.chart .line { fill: none; stroke: var(--mint); stroke-width: 2.5; stroke-linejoin: round; }
.chart .area-pos { fill: color-mix(in srgb, var(--mint) 10%, transparent); }
.chart .area-neg { fill: rgba(255, 92, 122, 0.12); }
.chart .be { stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 3 4; }
.chart .be-label { fill: var(--amber); font-size: 11px; font-weight: 700; font-family: var(--font); }
.chart .cur { fill: #fff; stroke: var(--primary-2); stroke-width: 3; }
.chart .cur-label { fill: var(--text); font-size: 12px; font-weight: 700; font-family: var(--mono); }
.capacity { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.cap-head { display: flex; justify-content: space-between; font-size: 0.84rem; color: var(--muted); margin-bottom: 10px; }
.cap-head b { color: var(--text); font-family: var(--mono); font-weight: 600; }
.cap-bar { height: 10px; border-radius: 999px; background: var(--track); overflow: hidden; }
.cap-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--primary-2), var(--mint)); transition: width 0.4s var(--ease); }
.cap-bar span.full { background: linear-gradient(90deg, var(--amber), var(--red)); }

.proposal {
  margin-top: 24px; padding: 26px 28px; border-radius: var(--r-lg);
  background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 32%, transparent), color-mix(in srgb, var(--mint) 12%, transparent));
  border: 1px solid var(--line-strong);
  display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; align-items: center;
}
.proposal .p-eyebrow { grid-column: 1 / -1; }
.proposal h3 { font-size: 1.35rem; letter-spacing: -0.02em; grid-column: 1 / -1; }
.proposal ul { grid-column: 1 / -1; list-style: none; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.proposal li { padding: 8px 14px; border-radius: 10px; background: var(--chip-bg); font-size: 0.88rem; color: var(--muted); }
.proposal li b { color: var(--text); font-family: var(--mono); }
.fineprint { color: var(--dim); font-size: 0.76rem; margin-top: 14px; max-width: 900px; }

/* ---------- Modales ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; padding: 20px; background: rgba(5, 3, 14, 0.72); backdrop-filter: blur(6px); }
.modal.show { display: grid; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal-box { position: relative; width: min(460px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 28px; box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6); animation: fadeUp 0.35s var(--ease); }
.modal-box.sm { width: min(380px, 100%); }
.modal-box h3 { font-size: 1.35rem; margin: 6px 0 10px; }
.x { position: absolute; top: 14px; right: 16px; font-size: 1.6rem; color: var(--muted); line-height: 1; transition: color 0.2s; }
.x:hover { color: var(--text); }
.co-total { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--card); margin-bottom: 18px; flex-wrap: wrap; }
.co-total span { color: var(--muted); font-size: 0.85rem; }
.co-total b { font-family: var(--mono); font-size: 1.4rem; }
.co-total small { font-family: var(--mono); color: var(--mint); }
.pay-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 18px; }
.pay-tab { padding: 10px 6px; border-radius: 10px; font-size: 0.82rem; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid transparent; transition: all 0.2s; }
.pay-tab.active { color: var(--text); border-color: var(--primary-2); background: color-mix(in srgb, var(--primary) 20%, transparent); }
.pay-panel { display: none; }
.pay-panel.active { display: grid; gap: 14px; }
.demo-badge { justify-self: start; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 6px; background: rgba(255, 194, 92, 0.14); color: var(--amber); }
.qr-wrap { display: grid; justify-items: center; gap: 10px; }
#qrBox { padding: 12px; background: #fff; border-radius: 14px; }
#qrBox img, #qrBox canvas { display: block; }
.wallet { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--card); font-family: var(--mono); font-size: 0.82rem; }

/* ---------- Modo presentación ---------- */
.presenter {
  position: fixed; left: 50%; bottom: 22px; z-index: 70;
  width: min(860px, calc(100% - 32px)); transform: translate(-50%, 140%);
  background: var(--panel-bg); backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden;
  box-shadow: 0 30px 80px var(--shadow);
  transition: transform 0.5s var(--ease);
}
.presenter.show { transform: translate(-50%, 0); }
.pr-progress { height: 3px; background: var(--track); }
.pr-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--primary-2), var(--mint)); transition: width 0.4s var(--ease); }
.pr-body { display: flex; align-items: center; gap: 18px; padding: 16px 20px; }
.pr-step { font-family: var(--mono); font-size: 0.8rem; color: var(--mint); white-space: nowrap; }
.pr-text { flex: 1; font-size: 1.02rem; font-weight: 600; }
.pr-text b { color: var(--mint); }
.pr-ctrl { display: flex; gap: 6px; }
.pr-ctrl button { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); font-weight: 700; transition: all 0.2s; }
.pr-ctrl button:hover { border-color: var(--mint); color: var(--mint); }
body.presenting .view { padding-bottom: 140px; }
@media (min-width: 1081px) {
  /* En laptop la barra va abajo a la izquierda para no tapar el teléfono */
  .presenter { left: 28px; width: min(640px, calc(55% - 40px)); transform: translateY(140%); }
  .presenter.show { transform: none; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 84px; left: 50%; z-index: 90;
  transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  padding: 12px 20px; border-radius: 12px; font-size: 0.9rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--mint); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transition: all 0.35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsivo ---------- */
@media (max-height: 820px) {
  .power-wrap { width: 140px; height: 140px; margin: 10px auto 10px; }
  .power { width: 120px; height: 120px; }
  .power svg { width: 38px; height: 38px; }
  .state-badge { margin-top: 0; }
  .server-card, .usage { margin-bottom: 8px; }
  .server-card { padding: 9px 12px; }
  .tabbar { padding-bottom: 12px; }
}
@media (max-width: 1080px) {
  .hero-grid, .app-layout, .biz-grid { grid-template-columns: 1fr; }
  .nodes-grid { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .phone { margin: 0 auto; }
}
@media (max-width: 760px) {
  /* La barra superior mide ~177 px en celular: los anclajes (#planes) bajan para no quedar tapados */
  .block { scroll-margin-top: 110px; }
  .wrap { width: calc(100% - 32px); }
  .topbar { flex-wrap: wrap; padding: 12px 16px; gap: 12px; }
  .views-nav { order: 3; width: 100%; overflow-x: auto; }
  .nav-btn { padding: 8px 12px; white-space: nowrap; }
  .present-btn { margin-left: auto; }
  .plans, .nodes-grid { grid-template-columns: 1fr; }
  .phone { width: 100%; max-width: 340px; }
  .pr-body { flex-wrap: wrap; }
  .pr-text { flex-basis: 100%; order: 2; font-size: 0.92rem; }
  .in-grid.three { grid-template-columns: 1fr; }
}
