/* ============================================================
   JM Web Service — Landing
   Paleta: negro / blanco / verde neón
   ============================================================ */

:root {
  --bg: #050607;
  --bg-alt: #0b0d10;
  --panel: #101317;
  --panel-2: #161a1f;
  --line: rgba(255,255,255,0.08);
  --line-2: rgba(255,255,255,0.14);
  --text: #f4f6f8;
  --text-dim: #a9b1b9;
  --accent: #39ff14;        /* verde neón */
  --accent-2: #0aff6a;
  --accent-glow: rgba(57,255,20,0.55);
  --danger: #ff4d4d;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-glow: 0 0 24px var(--accent-glow);
  --container: 1180px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f6f8fa;
  --bg-alt: #ffffff;
  --panel: #ffffff;
  --panel-2: #f0f2f5;
  --line: rgba(0,0,0,0.09);
  --line-2: rgba(0,0,0,0.16);
  --text: #0d1117;
  --text-dim: #4a5560;
  --accent: #00b849;
  --accent-2: #009c3d;
  --accent-glow: rgba(0,184,73,0.35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  max-width: 100%;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1,h2,h3,h4 { font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { margin: 0; color: var(--text-dim); }

/* ==== Fondo circuito ==== */
#circuit-bg {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.55;
}

/* ==== Navbar ==== */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1.2rem;
  height: var(--nav-h);
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__brand { display: inline-flex; align-items: center; }
.nav__logo { height: 44px; width: auto; filter: drop-shadow(0 0 12px var(--accent-glow)); }
.nav__links {
  margin-left: auto; display: flex; align-items: center; gap: 1.25rem;
  font-weight: 500; font-size: 0.95rem;
}
.nav__links a { color: var(--text-dim); transition: color .2s var(--ease); }
.nav__links a:hover, .nav__links a:focus-visible { color: var(--text); }
.nav__cta {
  padding: .5rem .95rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent) !important;
  box-shadow: 0 0 0 0 var(--accent-glow);
  transition: box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.nav__cta:hover { background: var(--accent); color: var(--bg) !important; box-shadow: 0 0 18px var(--accent-glow); }

.theme-toggle {
  background: transparent; color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  width: 40px; height: 40px;
  display: inline-grid; place-items: center;
  transition: transform .3s var(--ease), border-color .2s var(--ease);
}
.theme-toggle:hover { transform: rotate(30deg); border-color: var(--accent); }

.nav__burger {
  display: none;
  background: transparent; border: 0;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; gap: 5px;
  padding: 0 8px;
}
.nav__burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s; }

@media (max-width: 820px) {
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    padding: 0;
    max-height: 0; overflow: hidden;
    transition: max-height .35s var(--ease);
  }
  .nav__links a { width: 100%; padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); }
  .nav__links.open { max-height: 80vh; }
  .nav__burger { display: inline-flex; margin-left: auto; }
  .nav__burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger.open span:nth-child(2) { opacity: 0; }
  .nav__burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ==== Botones ==== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn--primary {
  background: var(--accent); color: #041307;
  box-shadow: 0 8px 24px -6px var(--accent-glow);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -6px var(--accent-glow); }
.btn--ghost {
  background: transparent; color: var(--text);
  border-color: var(--line-2);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ==== Sección genérica ==== */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem);
}
.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(2rem, 5vw, 3rem);
}
.section__head h2 { margin-bottom: .6rem; }
.section__head p { color: var(--text-dim); }

/* ==== Reveal on scroll ==== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: grid; place-items: center;
  padding: 2rem clamp(1rem, 4vw, 2rem) 4rem;
  overflow: hidden;
}
#particles {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
}
.hero__inner {
  position: relative; z-index: 1;
  max-width: 960px; width: 100%;
  text-align: center;
  display: grid; gap: 1.5rem;
}
.hero__eyebrow {
  display: block;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem;
  letter-spacing: .25em;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px var(--accent-glow);
}
.hero__title {
  font-size: clamp(2rem, 6vw, 3.8rem);
  line-height: 1.05;
}
.hero__rotator {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
  display: inline-block;
  min-height: 1.1em;
}
.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 620px; margin: 0 auto;
}
.hero__ctas {
  display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
  margin-top: .5rem;
}

/* Terminal */
.hero__terminal {
  max-width: 640px; margin: 0 auto;
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,.6), 0 0 0 1px var(--line);
}
.hero__terminal-bar {
  display: flex; align-items: center; gap: .35rem;
  padding: .5rem .75rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
  font-size: .8rem; color: var(--text-dim);
}
.hero__terminal-bar span {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ff5f57;
}
.hero__terminal-bar span:nth-child(2) { background: #febc2e; }
.hero__terminal-bar span:nth-child(3) { background: #28c840; }
.hero__terminal-bar em { margin-left: auto; font-style: normal; font-family: 'JetBrains Mono', monospace; }
.hero__code {
  margin: 0; padding: 1rem 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .9rem; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
  min-height: 8em;
}
.hero__code .kw { color: var(--accent); }
.hero__code .str { color: #ffd166; }
.hero__code .cm { color: var(--text-dim); font-style: italic; }
.caret { display: inline-block; width: .55ch; color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero__scroll {
  position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%);
  width: 24px; height: 40px;
  border: 2px solid var(--line-2); border-radius: 14px;
  display: grid; place-items: start center;
  z-index: 1;
}
.hero__scroll span {
  width: 3px; height: 8px; border-radius: 2px;
  background: var(--accent);
  margin-top: 6px;
  animation: scrollDot 1.6s var(--ease) infinite;
}
@keyframes scrollDot {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ============================================================
   SERVICIOS — tarjetas 3D
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  perspective: 1000px;
}
.card {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.3rem;
  transform-style: preserve-3d;
  transition: transform .25s var(--ease), border-color .3s, box-shadow .3s;
  will-change: transform;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx,50%) var(--my,50%), var(--accent-glow), transparent 40%);
  opacity: 0; transition: opacity .3s;
  pointer-events: none;
}
.card:hover::before, .card.is-touched::before { opacity: .35; }
.card:hover, .card.is-touched { border-color: var(--accent); box-shadow: 0 20px 40px -20px var(--accent-glow); }
.card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(57,255,20,0.08); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 1rem;
  transform: translateZ(30px);
}
.card__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { transform: translateZ(20px); margin-bottom: .5rem; }
.card p { transform: translateZ(10px); }

/* ============================================================
   DEMO PANEL
   ============================================================ */
.demo {
  max-width: 960px; margin: 0 auto;
}
.demo__panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  min-height: 380px;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.7);
}
.demo__side {
  background: var(--panel-2);
  padding: 1rem;
  border-right: 1px solid var(--line);
}
.demo__logo {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--accent); color: #041307;
  border-radius: 10px; font-weight: 800; font-family: 'JetBrains Mono', monospace;
  margin-bottom: 1rem;
}
.demo__tabs { position: relative; }
.demo__nav { display: grid; gap: .25rem; font-size: .95rem; }
.demo__nav button {
  text-align: left;
  padding: .6rem .7rem; border-radius: 8px; color: var(--text-dim);
  background: transparent; border: 0;
  transition: background .2s, color .2s;
  font-weight: 500;
}
.demo__nav button:hover { background: rgba(255,255,255,.04); color: var(--text); }
.demo__nav button.active { background: rgba(57,255,20,0.12); color: var(--accent); }
.demo__scroll { display: none; } /* solo aparece en móvil */
.demo__main { padding: 1.2rem; position: relative; }
.demo__main header {
  display: flex; align-items: center; gap: 1rem;
  border-bottom: 1px solid var(--line); padding-bottom: .8rem; margin-bottom: 1rem;
}
.demo__main header h4 { margin-right: auto; }
.demo__addbtn {
  background: var(--accent); color: #041307;
  border: 0; border-radius: 8px; padding: .55rem .9rem; font-weight: 600;
  box-shadow: 0 6px 18px -6px var(--accent-glow);
  transition: transform .2s var(--ease);
}
.demo__addbtn:hover { transform: translateY(-1px); }
.demo__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.demo__list li {
  display: flex; align-items: center; gap: .8rem;
  padding: .7rem .9rem;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  animation: slideIn .35s var(--ease);
}
.demo__list li em { margin-left: auto; color: var(--accent); font-style: normal; font-weight: 600; }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.demo__toast {
  position: absolute; right: 1rem; bottom: 1rem;
  background: #041307; color: var(--accent);
  border: 1px solid var(--accent);
  padding: .55rem .8rem; border-radius: 8px;
  font-size: .85rem; opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}
.demo__toast.show { opacity: 1; transform: none; }

.demo__view { display: none; }
.demo__view.is-active { display: block; animation: fadeIn .3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.demo__hint { color: var(--text-dim); font-size: .8rem; margin-left: auto; }

/* Precios */
.demo__prices { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .5rem; }
.demo__prices li {
  display: flex; align-items: center; gap: .8rem;
  padding: .55rem .8rem;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px;
}
.demo__prices li > span:first-child { flex: 1; }
.demo__price { display: inline-flex; align-items: center; gap: .2rem; background: var(--bg); border: 1px solid var(--line-2); border-radius: 6px; padding: .2rem .5rem; transition: border-color .2s; }
.demo__price:focus-within { border-color: var(--accent); }
.demo__price span { color: var(--accent); font-weight: 600; }
.demo__price input {
  width: 5.5em; background: transparent; border: 0; color: var(--text);
  font: inherit; font-weight: 600; text-align: right;
}
.demo__price input:focus { outline: none; }

/* Domicilio */
.demo__delivery { display: grid; gap: .5rem; }
.demo__delivery label {
  display: flex; align-items: center; gap: 1rem;
  padding: .6rem .8rem;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text-dim);
  font-size: .9rem;
}
.demo__delivery label > span { flex: 1; color: var(--text); }
.demo__delivery-full { border-color: var(--accent) !important; }

/* Reportes */
.demo__reports { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: .8rem; }
.demo__stat {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: .7rem;
  text-align: center;
}
.demo__stat em { display: block; color: var(--accent); font-style: normal; font-weight: 700; font-size: 1.05rem; }
.demo__stat small { color: var(--text-dim); font-size: .75rem; }
.demo__chart {
  display: flex; align-items: flex-end; gap: .4rem;
  height: 100px; padding: .5rem;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px;
}
.demo__chart > div {
  flex: 1;
  height: var(--h);
  background: linear-gradient(to top, var(--accent), rgba(57,255,20,.3));
  border-radius: 4px 4px 0 0;
  animation: barGrow .8s var(--ease);
  transform-origin: bottom;
}
@keyframes barGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.demo__chart-labels {
  display: flex; gap: .4rem; padding: .3rem .5rem 0;
  font-size: .75rem; color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}
.demo__chart-labels span { flex: 1; text-align: center; }

@media (max-width: 720px) {
  .demo { padding: 0; max-width: 100%; }
  .demo__panel {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    min-height: 0;
    border-radius: 12px;
    max-width: 100%;
    overflow: hidden;
  }
  .demo__view { max-width: 100%; overflow: hidden; }
  .demo__list, .demo__prices, .demo__delivery { max-width: 100%; }
  .demo__list li, .demo__prices li, .demo__delivery label { min-width: 0; }
  .demo__side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: .6rem .5rem;
    background: var(--panel-2);
    flex-shrink: 0;
  }
  .demo__logo { display: none; }
  .demo__hint { display: none; }

  /* Barra de tabs deslizable con fades + botones */
  .demo__tabs {
    display: flex;
    align-items: center;
    gap: .25rem;
    position: relative;
  }
  .demo__tabs::before,
  .demo__tabs::after {
    content: "";
    position: absolute; top: 0; bottom: 0;
    width: 28px;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity .25s var(--ease);
  }
  .demo__tabs::before {
    left: 0;
    background: linear-gradient(to right, var(--panel-2), transparent);
  }
  .demo__tabs::after {
    right: 0;
    background: linear-gradient(to left, var(--panel-2), transparent);
  }
  .demo__tabs.can-prev::before { opacity: 1; }
  .demo__tabs.can-next::after { opacity: 1; }

  .demo__nav {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-inline: .5rem;
    flex: 1;
    min-width: 0;
    padding: .15rem 0 .3rem;
  }
  .demo__nav::-webkit-scrollbar { display: none; }
  .demo__nav button {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: .88rem;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: var(--panel);
    border: 1px solid var(--line-2);
    color: var(--text);
    scroll-snap-align: start;
    transition: background .2s, border-color .2s, color .2s, transform .15s;
  }
  .demo__nav button:active { transform: scale(.96); }
  .demo__nav button.active {
    background: var(--accent);
    color: #041307;
    border-color: var(--accent);
    box-shadow: 0 4px 12px -3px var(--accent-glow);
  }

  .demo__scroll {
    display: grid; place-items: center;
    width: 30px; height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--panel);
    border: 1px solid var(--line-2);
    color: var(--accent);
    font-size: 1.4rem; line-height: 1;
    z-index: 2;
    transition: opacity .2s var(--ease), background .2s;
    padding: 0;
  }
  .demo__scroll:hover { background: var(--accent); color: #041307; }
  .demo__scroll[hidden] { display: none; }

  .demo__main { padding: .9rem; min-width: 0; }
  .demo__main header { gap: .5rem; flex-wrap: wrap; padding-bottom: .6rem; margin-bottom: .8rem; }
  .demo__main header h4 { font-size: 1rem; }
  .demo__addbtn { font-size: .85rem; padding: .5rem .7rem; }

  /* Productos / Promociones: dejar respirar el precio */
  .demo__list li {
    padding: .65rem .75rem;
    font-size: .9rem;
    flex-wrap: wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  .demo__list li em {
    font-size: .95rem;
    flex-shrink: 0;
  }

  /* Precios: input más chico y layout apretado */
  .demo__prices li {
    padding: .55rem .7rem;
    gap: .5rem;
    font-size: .9rem;
  }
  .demo__price input { width: 4.2em; font-size: .9rem; }

  /* Domicilio */
  .demo__delivery label {
    padding: .55rem .7rem;
    font-size: .85rem;
    gap: .5rem;
  }

  /* Reportes: apilar stats en 2 filas si hace falta */
  .demo__reports {
    grid-template-columns: repeat(3, 1fr);
    gap: .4rem;
  }
  .demo__stat { padding: .55rem .3rem; }
  .demo__stat em { font-size: .9rem; }
  .demo__stat small { font-size: .68rem; }
  .demo__chart { height: 80px; }

  /* Toast: no tapar botón */
  .demo__toast {
    right: .7rem; bottom: .7rem;
    font-size: .75rem; padding: .4rem .6rem;
  }
}

@media (max-width: 380px) {
  .demo__reports { grid-template-columns: 1fr 1fr; }
  .demo__reports .demo__stat:last-child { grid-column: span 2; }
}

/* ============================================================
   SLIDER
   ============================================================ */
.slider {
  position: relative;
  max-width: 1000px; margin: 0 auto;
}
.slider__track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: min(320px, 82%);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: .5rem .25rem 1.5rem;
  scrollbar-width: none;
}
.slider__track::-webkit-scrollbar { display: none; }
.slide {
  scroll-snap-align: start;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  min-height: 170px;
  transition: border-color .3s, transform .3s var(--ease);
}
.slide:hover { border-color: var(--accent); transform: translateY(-4px); }
.slider__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line-2);
  font-size: 1.4rem; line-height: 1;
  display: grid; place-items: center;
  transition: background .2s, color .2s, border-color .2s;
}
.slider__nav:hover { background: var(--accent); color: #041307; border-color: var(--accent); }
.slider__nav--prev { left: -8px; }
.slider__nav--next { right: -8px; }
.slider__dots {
  display: flex; gap: .4rem; justify-content: center; margin-top: .5rem;
}
.slider__dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line-2);
  transition: background .2s, transform .2s;
}
.slider__dots button.active { background: var(--accent); transform: scale(1.4); }

@media (max-width: 700px) {
  .slider__nav { display: none; }
}

/* ============================================================
   ANTES / DESPUÉS
   ============================================================ */
.compare {
  position: relative;
  max-width: 900px; margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-2);
  user-select: none;
  touch-action: none;
  background: var(--panel);
}
.compare__before, .compare__after {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 1.5rem;
}
.compare__before {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.02) 0 8px, transparent 8px 16px),
    #d6ceb8;
  color: #2a2416;
}
.compare__paper {
  background: #f5efd6;
  color: #2a2416;
  padding: 1.2rem 1.5rem;
  border-radius: 4px;
  max-width: 320px; width: 90%;
  font-family: 'JetBrains Mono', monospace;
  box-shadow: 3px 5px 0 rgba(0,0,0,0.15);
  transform: rotate(-1.5deg);
}
.compare__paper h4 { margin-bottom: .5rem; font-family: inherit; }
.compare__paper ul { list-style: none; padding: 0; margin: 0 0 .5rem 0; font-size: .9rem; }
.compare__paper small { color: #6b5f42; font-size: .75rem; }
.compare__after {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  clip-path: inset(0 0 0 50%);
  transition: clip-path .05s linear;
}
.compare__digital {
  width: 90%; max-width: 340px;
  background: var(--bg); border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 1rem; color: var(--text);
  box-shadow: 0 12px 30px -10px var(--accent-glow);
}
.compare__row {
  display: flex; align-items: center; padding: .5rem 0;
  border-bottom: 1px dashed var(--line);
}
.compare__row:last-of-type { border-bottom: 0; }
.compare__row em { margin-left: auto; color: var(--accent); font-style: normal; font-weight: 600; }
.compare__badge {
  margin-top: .5rem;
  font-size: .75rem; color: var(--accent);
  background: rgba(57,255,20,.1); padding: .3rem .55rem; border-radius: 999px;
  display: inline-block;
}
.compare__label {
  position: absolute; top: .8rem; left: .8rem;
  font-family: 'JetBrains Mono', monospace; font-size: .8rem;
  background: rgba(0,0,0,.6); color: #fff; padding: .25rem .55rem;
  border-radius: 4px;
}
.compare__label--right { left: auto; right: .8rem; background: var(--accent); color: #041307; }
.compare__handle {
  position: absolute; top: 0; bottom: 0;
  left: 50%; width: 4px; margin-left: -2px;
  background: var(--accent);
  cursor: ew-resize;
  z-index: 3;
  box-shadow: 0 0 20px var(--accent-glow);
}
.compare__handle span {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  background: var(--accent); color: #041307;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700;
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ============================================================
   PROCESO (iconos scroll)
   ============================================================ */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  counter-reset: step;
}
.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.3rem;
  text-align: center;
  opacity: .35;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s;
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  position: absolute; top: .6rem; right: .8rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem; color: var(--text-dim);
}
.step.on { opacity: 1; transform: none; border-color: var(--accent); }
.step__icon {
  font-size: 2rem; margin-bottom: .8rem;
  filter: grayscale(1); transition: filter .5s;
}
.step.on .step__icon { filter: none; text-shadow: 0 0 12px var(--accent-glow); }
.step h4 { margin-bottom: .4rem; }

/* ============================================================
   PLANES
   ============================================================ */
.plans {
  display: grid; gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}
.plan {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.plan:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 40px -20px var(--accent-glow); }
.plan--featured { border-color: var(--accent); box-shadow: 0 20px 40px -20px var(--accent-glow); }
.plan__badge {
  position: absolute; top: -12px; right: 1rem;
  background: var(--accent); color: #041307;
  font-size: .75rem; font-weight: 700;
  padding: .3rem .7rem; border-radius: 999px;
}
.plan__price { color: var(--text-dim); font-size: .95rem; }
.plan__price strong { color: var(--text); }
.plan ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: .55rem;
  border-top: 1px solid var(--line); padding-top: 1rem;
  flex: 1;
}
.plan ul li { display: flex; align-items: flex-start; gap: .5rem; color: var(--text-dim); font-size: .95rem; }
.plan ul li::before {
  content: "✓"; color: var(--accent); font-weight: 700; margin-top: 1px;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq { max-width: 780px; margin: 0 auto; display: grid; gap: .6rem; }
.faq__item {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .3s;
}
.faq__item[open] { border-color: var(--accent); }
.faq__item summary {
  cursor: pointer; padding: 1rem 1.2rem;
  font-weight: 600;
  list-style: none;
  display: flex; align-items: center; gap: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; margin-left: auto; color: var(--accent);
  font-size: 1.4rem; line-height: 1; transition: transform .3s var(--ease);
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 1.2rem 1.1rem; color: var(--text-dim); }

/* ============================================================
   CONTACTO
   ============================================================ */
.contact {
  max-width: 640px; margin: 0 auto;
  display: grid; gap: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .contact__row { grid-template-columns: 1fr; } }
.contact label { display: grid; gap: .3rem; font-size: .9rem; color: var(--text-dim); }
.contact input, .contact textarea {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: .75rem .9rem;
  font: inherit;
  transition: border-color .2s;
}
.contact input:focus, .contact textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(57,255,20,.15);
}
.contact__submit {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 1rem 1.4rem;
  font-size: 1rem;
}
.contact__hint {
  text-align: center;
  color: var(--text-dim);
  font-size: .85rem;
  margin-top: -.2rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 1rem;
  background: var(--bg-alt);
}
.footer__inner {
  max-width: var(--container); margin: 0 auto;
  display: grid; gap: 1.2rem; justify-items: center; text-align: center;
}
.footer__logo { height: 60px; width: auto; filter: drop-shadow(0 0 12px var(--accent-glow)); }
.footer__links { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; font-size: .95rem; color: var(--text-dim); }
.footer__links a:hover { color: var(--text); }
.footer__socials { display: flex; gap: .8rem; }
.footer__socials a {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 12px;
  color: var(--text); transition: color .2s, border-color .2s, transform .2s;
}
.footer__socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }
.footer__socials svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.footer small { color: var(--text-dim); }

/* ============================================================
   FLOATING FAB + CHATBOT
   ============================================================ */
.fab {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 50;
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--accent); color: #041307;
  padding: .85rem 1.2rem;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 12px 30px -8px var(--accent-glow);
  transition: transform .25s var(--ease);
  opacity: 0; transform: translateY(20px); pointer-events: none;
}
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.fab:hover { transform: translateY(-2px); }
.fab__wa { width: 22px; height: 22px; fill: #041307; }
.btn__wa { margin-right: .5rem; vertical-align: -3px; }
.fab__pulse {
  position: absolute; inset: 0; border-radius: 999px;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s var(--ease) infinite;
  pointer-events: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(57,255,20,.6); }
  70% { box-shadow: 0 0 0 18px rgba(57,255,20,0); }
  100% { box-shadow: 0 0 0 0 rgba(57,255,20,0); }
}

.chatbot { position: fixed; left: 1rem; bottom: 1rem; z-index: 50; }
.chatbot__toggle {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--panel); color: var(--accent);
  border: 1px solid var(--accent);
  font-size: 1.4rem;
  box-shadow: 0 12px 30px -8px var(--accent-glow);
  transition: transform .25s var(--ease);
}
.chatbot__toggle:hover { transform: translateY(-2px); }
.chatbot__badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: .7rem; font-weight: 700;
  display: grid; place-items: center;
}
.chatbot__badge.hidden { display: none; }
.chatbot__box {
  position: absolute; bottom: 72px; left: 0;
  width: min(320px, 88vw);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: 60vh;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.5);
  animation: chatIn .3s var(--ease);
}
[hidden] { display: none !important; }
@keyframes chatIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.chatbot__head {
  display: flex; align-items: center;
  padding: .8rem 1rem;
  background: var(--panel-2);
  border-bottom: 1px solid var(--line);
}
.chatbot__head strong { color: var(--accent); }
.chatbot__head button {
  margin-left: auto; background: transparent; color: var(--text);
  border: 0; font-size: 1.4rem; line-height: 1;
}
.chatbot__msgs {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: .6rem;
  font-size: .9rem;
}
.chatbot__msg {
  max-width: 85%;
  padding: .55rem .8rem; border-radius: 12px;
  animation: chatIn .25s var(--ease);
}
.chatbot__msg--bot {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line);
  border-top-left-radius: 4px;
  align-self: flex-start;
}
.chatbot__msg--user {
  background: var(--accent); color: #041307;
  border-top-right-radius: 4px;
  align-self: flex-end;
}
.chatbot__quick {
  display: flex; flex-wrap: wrap; gap: .4rem;
  padding: .6rem .8rem .8rem;
  border-top: 1px solid var(--line);
}
.chatbot__quick button {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: .3rem .7rem; font-size: .8rem;
  transition: background .2s, color .2s;
}
.chatbot__quick button:hover { background: var(--accent); color: #041307; }

@media (max-width: 480px) {
  .fab { padding: .75rem 1rem; font-size: .9rem; }
  .chatbot__toggle { width: 48px; height: 48px; }
}

/* ============================================================
   MODAL WhatsApp — elegir asesor
   ============================================================ */
.wa-modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 1rem;
  animation: waFadeIn .2s var(--ease);
}
@keyframes waFadeIn { from { opacity: 0; } to { opacity: 1; } }
.wa-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.wa-modal__box {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: 16px;
  width: 100%; max-width: 420px;
  padding: 1.6rem 1.4rem 1.3rem;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.7), 0 0 40px -10px var(--accent-glow);
  animation: waPop .3s var(--ease);
}
@keyframes waPop {
  from { opacity: 0; transform: translateY(20px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.wa-modal__close {
  position: absolute; top: .6rem; right: .8rem;
  width: 32px; height: 32px;
  background: transparent; color: var(--text-dim);
  border: 0; border-radius: 50%;
  font-size: 1.6rem; line-height: 1;
  transition: color .2s, background .2s;
}
.wa-modal__close:hover { color: var(--text); background: var(--panel-2); }
.wa-modal__head {
  text-align: center;
  margin-bottom: 1.2rem;
}
.wa-modal__logo {
  width: 64px; height: 64px;
  margin: 0 auto .7rem;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 8px 24px -6px rgba(37,211,102,.6), 0 0 30px -8px var(--accent-glow);
}
.wa-modal__logo svg { width: 36px; height: 36px; }
.wa-modal__head h3 { margin-bottom: .3rem; font-size: 1.2rem; }
.wa-modal__head p { font-size: .9rem; }
.wa-modal__list {
  display: grid; gap: .6rem;
}
.wa-modal__option {
  display: flex; align-items: center; gap: .8rem;
  padding: .85rem 1rem;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color .2s, background .2s, transform .15s;
}
.wa-modal__option:hover, .wa-modal__option:focus-visible {
  outline: none;
  border-color: var(--accent);
  background: rgba(57,255,20,0.06);
  transform: translateY(-1px);
}
.wa-modal__avatar {
  width: 42px; height: 42px; flex-shrink: 0;
  background: #25D366; color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 4px 14px -4px rgba(37,211,102,.5);
}
.wa-modal__avatar svg { width: 24px; height: 24px; }
.wa-modal__meta { display: grid; gap: .1rem; flex: 1; min-width: 0; }
.wa-modal__meta strong { font-size: .95rem; color: var(--text); }
.wa-modal__meta small { font-size: .75rem; color: var(--text-dim); }
.wa-modal__meta em {
  font-style: normal;
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem;
  color: var(--accent);
}
.wa-modal__go {
  color: var(--accent);
  font-size: 1.6rem; line-height: 1;
  transition: transform .2s;
}
.wa-modal__option:hover .wa-modal__go { transform: translateX(3px); }
