/* ==========================================================================
   KEIZAC TECH — Dark theme v2
   Azul + negro + blanco · tipografía gruesa moderna · animaciones de scroll
   ========================================================================== */

:root {
  /* Palette — blue / black / white */
  --bg: #05070C;
  --bg-soft: #090C13;
  --panel: #0D1119;
  --panel-2: #121724;
  --line: rgba(244, 247, 251, 0.09);
  --line-strong: rgba(244, 247, 251, 0.16);
  --text: #F4F7FB;
  --muted: #97A1B4;
  --muted-2: #6B7385;

  --blue: #0C7BEB;          /* Keizac Blue — del logo */
  --blue-bright: #3B9DFF;   /* acentos y glow sobre negro */
  --blue-deep: #0A5FB8;
  --blue-ghost: rgba(12, 123, 235, 0.12);
  --green: #2BD576;
  --amber: #F5B84D;
  --red: #F16063;

  /* Radius */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-full: 999px;

  /* Glow & depth */
  --glow-blue: 0 0 40px rgba(12, 123, 235, 0.35), 0 0 120px rgba(12, 123, 235, 0.12);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);

  /* Type — gruesa y moderna */
  --font-display: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 150ms;
  --dur-2: 260ms;
  --dur-3: 550ms;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(12, 123, 235, 0.13), transparent 60%),
    radial-gradient(700px 500px at 0% 30%, rgba(12, 123, 235, 0.06), transparent 55%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 48px; } }

/* ==== Type helpers ==== */
.overline {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 18px;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.section__sub { color: var(--muted); max-width: 60ch; font-size: clamp(16px, 1.8vw, 18px); }
.u-blue { color: var(--blue-bright); }
.u-grad {
  background: linear-gradient(92deg, #FFFFFF 10%, var(--blue-bright) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==== Buttons ==== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* min-height (no height fija): si el texto ocupa dos líneas en un
     teléfono estrecho, el botón crece en vez de desbordarse. */
  min-height: 50px;
  padding: 10px 26px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease),
              background-color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.btn--primary {
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
  color: #fff;
  box-shadow: 0 0 0 1px rgba(59, 157, 255, 0.35) inset, 0 6px 24px rgba(12, 123, 235, 0.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(59, 157, 255, 0.5) inset, var(--glow-blue); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: rgba(244, 247, 251, 0.04);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn--ghost:hover { border-color: var(--blue-bright); transform: translateY(-2px); }
.btn--sm { min-height: 40px; padding: 6px 18px; font-size: 13.5px; }
.btn--lg { min-height: 58px; padding: 12px 34px; font-size: 16px; border-radius: var(--radius-md); }
.btn:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }

/* ==== Navigation ==== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 72px;
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.nav--scrolled {
  background: rgba(5, 7, 12, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--line);
}
@supports not (backdrop-filter: blur(8px)) {
  .nav--scrolled { background: #05070C; } /* navegadores sin blur: fondo sólido */
}
.nav__inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 100%;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px; /* compacto en móvil: logo + ES/EN + hamburguesa caben en 320px */
}
@media (min-width: 768px) { .nav__inner { padding: 0 40px; gap: 28px; } }
.nav__brand { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.nav__logo { width: 38px; height: 38px; flex: none; }
.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.05em;
}
.nav__wordmark em { font-style: normal; font-weight: 600; color: var(--blue-bright); margin-left: 5px; font-size: 12px; letter-spacing: 0.18em; }
.nav__links { display: none; align-items: center; gap: 26px; }
.nav__links a:not(.btn) {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--dur-1) var(--ease);
}
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: var(--text); }
.nav__links a.is-active { color: var(--blue-bright); }
@media (min-width: 1024px) { .nav__links { display: flex; } }

/* Selector de idioma (ES/EN) — visible en la barra, también en móvil */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  background: rgba(244, 247, 251, 0.04);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.lang-toggle:hover { border-color: var(--blue-bright); color: var(--text); }
.lang-toggle svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lang-toggle em { font-style: normal; color: var(--blue-bright); }

.nav__toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav__toggle span { width: 24px; height: 2.5px; border-radius: 2px; background: #FFFFFF; opacity: 1; transition: transform var(--dur-2) var(--ease); }
@media (min-width: 1024px) { .nav__toggle { display: none; } }
.nav--open {
  background: #05070C; /* sólido — nunca transparente */
  backdrop-filter: none;
  border-bottom-color: var(--line);
  z-index: 300; /* por encima del widget de chat (200) */
}
.nav--open .nav__links {
  display: flex;
  position: fixed;
  top: 72px; right: 0; bottom: 0; left: 0;
  /* Fondo sólido con el mismo carácter de la página (tinte azul arriba),
     pero 100% opaco para que el texto siempre se lea. */
  background:
    radial-gradient(700px 380px at 85% -5%, rgba(12, 123, 235, 0.14), transparent 60%),
    #05070C;
  flex-direction: column;
  align-items: flex-start;
  padding: 36px 24px calc(44px + env(safe-area-inset-bottom, 0px));
  gap: 24px;
  overflow-y: auto;
}
.nav--open .nav__links a:not(.btn) { font-size: 26px; font-family: var(--font-display); font-weight: 700; color: var(--text); }
/* CTAs del menú móvil: anchos y fáciles de tocar */
.nav--open .nav__links .btn { width: 100%; max-width: 420px; min-height: 52px; font-size: 15px; }
.nav--open .nav__links .btn--ghost { margin-top: 10px; }
.nav--open .nav__toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav--open .nav__toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ==== Hero ==== */
.hero { padding: 126px 0 72px; position: relative; }
@media (min-width: 768px) { .hero { padding: 150px 0 90px; } }
@media (min-width: 1024px) { .hero { padding: 190px 0 120px; } }
.hero__inner { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1024px) { .hero__inner { grid-template-columns: 1.15fr 0.85fr; } }
.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6.6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.hero__title .w { display: inline-block; }
.hero__sub { margin-top: 26px; font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 52ch; }
.hero__actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 480px) {
  /* En pantallas estrechas los CTAs van apilados y a lo ancho */
  .hero__actions { flex-direction: column; align-items: stretch; }
}
.hero__hint { margin-top: 18px; font-size: 13.5px; color: var(--muted-2); }
.hero__hint strong { color: var(--green); font-weight: 600; }

/* ==== Droid orb (inspirado en droides de ciencia ficción — original) ==== */
.orb-wrap { display: flex; justify-content: center; position: relative; }
.orb {
  position: relative;
  width: min(340px, 70vw);
  aspect-ratio: 1;
  animation: orb-float 9s ease-in-out infinite;
}
@keyframes orb-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.orb__ring {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  border: 1.5px dashed rgba(59, 157, 255, 0.35);
  animation: orb-spin 26s linear infinite;
}
.orb__ring--2 {
  inset: -14%;
  border-color: rgba(59, 157, 255, 0.14);
  border-style: solid;
  border-width: 1px;
  animation-duration: 40s;
  animation-direction: reverse;
}
@keyframes orb-spin { to { transform: rotate(360deg); } }
.orb__sat {
  position: absolute;
  inset: -7%;
  border-radius: 50%;
  animation: orb-spin 20s linear infinite;
}
.orb__sat::after {
  content: "";
  position: absolute;
  top: -5px; left: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 14px var(--blue-bright);
}
.orb__body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #263349 0%, #12192a 42%, #05070c 100%);
  box-shadow:
    inset -14px -20px 60px rgba(0, 0, 0, 0.85),
    inset 10px 14px 42px rgba(59, 157, 255, 0.18),
    var(--glow-blue);
  overflow: hidden;
}
.orb__seam {
  position: absolute;
  left: 4%; right: 4%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 157, 255, 0.35), transparent);
}
.orb__seam--1 { top: 34%; }
.orb__seam--2 { top: 66%; transform: scaleX(0.86); }
.orb__panel {
  position: absolute;
  border-radius: 4px;
  background: rgba(59, 157, 255, 0.10);
  border: 1px solid rgba(59, 157, 255, 0.22);
}
.orb__panel--1 { width: 16%; height: 5%; left: 16%; top: 47%; }
.orb__panel--2 { width: 9%; height: 4%; right: 18%; top: 74%; }
.orb__eye {
  position: absolute;
  left: 50%; top: 44%;
  width: 27%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 38%, #EAF4FF 0%, #7CC0FF 26%, #0C7BEB 58%, #052B55 100%);
  box-shadow: 0 0 26px rgba(59, 157, 255, 0.8), inset 0 0 10px rgba(255, 255, 255, 0.5);
  transition: transform 180ms var(--ease);
}
.orb__eye::after {
  /* párpado — parpadeo */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #0A0E16;
  transform: scaleY(0);
  transform-origin: top;
  animation: orb-blink 6.5s infinite;
}
@keyframes orb-blink {
  0%, 92%, 100% { transform: scaleY(0); }
  94%, 96% { transform: scaleY(1); }
}
.orb__eye-core {
  position: absolute;
  left: 30%; top: 28%;
  width: 22%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  filter: blur(0.5px);
}

/* ==== Proof / stats ==== */
.proof { padding: 30px 0 90px; }
.proof__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 44px;
}
@media (min-width: 768px) { .proof__grid { grid-template-columns: repeat(4, 1fr); } }
.proof__num, .proof__unit {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 50px);
  line-height: 1;
  color: var(--blue-bright);
}
.proof__unit { font-size: clamp(18px, 2vw, 26px); color: var(--muted); margin-left: 2px; }
.proof__label { margin-top: 12px; font-size: 14px; color: var(--muted); max-width: 26ch; }

/* ==== Tension strip (gancho: llamadas perdidas) ==== */
.tension {
  padding: 90px 0;
  background: linear-gradient(180deg, transparent, rgba(12, 123, 235, 0.05) 50%, transparent);
  text-align: center;
}
.tension__big {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: clamp(64px, 12vw, 150px);
  line-height: 1;
  color: var(--blue-bright);
  text-shadow: 0 0 60px rgba(12, 123, 235, 0.45);
}
.tension__text { margin: 20px auto 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(19px, 2.4vw, 26px); max-width: 30ch; }
.tension__src { margin-top: 14px; font-size: 13px; color: var(--muted-2); }

/* ==== Cards / tienda ==== */
.cards-grid { margin-top: 52px; display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 157, 255, 0.45);
  box-shadow: var(--shadow-card), 0 12px 48px rgba(12, 123, 235, 0.18);
}
.card__icon {
  width: 46px; height: 46px;
  padding: 11px;
  border-radius: var(--radius-sm);
  background: var(--blue-ghost);
  border: 1px solid rgba(59, 157, 255, 0.25);
  stroke: var(--blue-bright);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  margin-bottom: 20px;
}
.card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.card p { font-size: 15px; color: var(--muted); flex: 1; }
.card__price { margin-top: 18px; font-family: var(--font-mono); font-size: 14px; color: var(--blue-bright); }
.card__link { margin-top: 10px; font-weight: 600; font-size: 14.5px; color: var(--text); display: inline-flex; gap: 6px; align-items: center; }
.card__link svg { width: 15px; transition: transform var(--dur-1) var(--ease); stroke: currentColor; }
.card:hover .card__link svg { transform: translateX(4px); }

/* ==== Steps ==== */
.how { padding: 100px 0; }
.how__grid { margin-top: 50px; display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 768px) { .how__grid { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.how__step { border-top: 2px solid var(--line-strong); padding-top: 24px; }
.how__num { font-family: var(--font-mono); font-size: 14px; color: var(--blue-bright); }
.how__step h3 { font-family: var(--font-display); font-size: 23px; font-weight: 700; margin: 12px 0 8px; }
.how__step p { font-size: 15px; color: var(--muted); }

/* ==== Dashboard mock ==== */
.system { padding: 100px 0; }
.dash {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 30px 90px rgba(12, 123, 235, 0.10);
}
.dash__topbar { display: flex; align-items: center; gap: 6px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.dash__dot { width: 10px; height: 10px; border-radius: var(--radius-full); background: rgba(244, 247, 251, 0.14); }
.dash__title { margin-left: 12px; font-size: 13px; color: var(--muted); }
.dash__body { padding: 28px; }
@media (min-width: 768px) { .dash__body { padding: 40px; } }
.dash__metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 38px; }
@media (min-width: 768px) { .dash__metrics { grid-template-columns: repeat(4, 1fr); } }
.dash__metric-label { display: block; font-size: 11px; letter-spacing: 0.14em; color: var(--muted-2); margin-bottom: 8px; text-transform: uppercase; }
.dash__metric-value { font-family: var(--font-mono); font-size: clamp(28px, 3.5vw, 40px); font-weight: 500; }
.dash__metric-value--good { color: var(--green); }
.dash__rows { display: flex; flex-direction: column; }
.dash__row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); font-size: 14px; }
.status-dot { width: 8px; height: 8px; flex: none; border-radius: var(--radius-full); background: var(--green); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43, 213, 118, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(43, 213, 118, 0); }
}
.dash__row-name { font-weight: 600; }
.dash__row-meta { color: var(--muted-2); margin-left: auto; font-size: 13px; }
.dash__row-saved { font-family: var(--font-mono); color: var(--muted); width: 70px; text-align: right; font-size: 13px; }
@media (max-width: 599px) {
  /* En móvil la fila se parte en dos líneas en vez de apretujarse */
  .dash__row { flex-wrap: wrap; }
  .dash__row-name { margin-right: auto; }
  .dash__row-meta { order: 3; flex-basis: 100%; margin: 2px 0 0 22px; }
}

/* ==== Cyber section ==== */
.cyber { padding: 100px 0; }
.cyber__inner {
  border: 1px solid rgba(59, 157, 255, 0.25);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(600px 300px at 90% 0%, rgba(12, 123, 235, 0.14), transparent 60%),
    var(--panel);
  padding: 48px 32px;
  display: grid;
  gap: 36px;
}
@media (min-width: 1024px) { .cyber__inner { grid-template-columns: 1.1fr 0.9fr; padding: 64px; } }
.cyber__list { display: grid; gap: 16px; }
.cyber__item { display: flex; gap: 14px; align-items: flex-start; }
.cyber__item svg { width: 22px; height: 22px; flex: none; stroke: var(--blue-bright); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-top: 3px; }
.cyber__item strong { font-family: var(--font-display); font-weight: 700; display: block; font-size: 16px; }
.cyber__item span { color: var(--muted); font-size: 14.5px; }

/* ==== Testimonial ==== */
.case { padding: 100px 0; text-align: center; }
.case__quote {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  max-width: 26ch;
  margin: 0 auto;
}
.case__attr { margin-top: 20px; color: var(--muted); font-size: 15px; }
.case__stats { margin-top: 48px; display: grid; grid-template-columns: 1fr; gap: 30px; }
@media (min-width: 640px) { .case__stats { grid-template-columns: repeat(3, 1fr); } }
.case__stat { font-family: var(--font-mono); font-size: clamp(28px, 3vw, 38px); color: var(--blue-bright); }
.case__stats p { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* ==== CTA banner ==== */
.cta-banner { padding: 100px 0 130px; text-align: center; }
.cta-banner__box {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(59, 157, 255, 0.3);
  background:
    radial-gradient(700px 320px at 50% -40%, rgba(12, 123, 235, 0.22), transparent 70%),
    var(--panel);
  padding: 72px 28px;
}
.cta-banner__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 5vw, 54px); letter-spacing: -0.02em; line-height: 1.08; }
.cta-banner__sub { margin: 18px auto 34px; color: var(--muted); max-width: 52ch; }
.cta-banner__note { margin-top: 18px; font-size: 13.5px; color: var(--muted-2); }

/* ==== Pricing (tienda) ==== */
.pricing { padding: 150px 0 60px; }
@media (min-width: 1024px) { .pricing { padding: 190px 0 80px; } }
.pricing__grid { margin-top: 56px; display: grid; grid-template-columns: 1fr; gap: 24px; align-items: stretch; }
@media (min-width: 1024px) { .pricing__grid { grid-template-columns: repeat(3, 1fr); } }
.plan {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.plan:hover { transform: translateY(-6px); border-color: rgba(59, 157, 255, 0.4); }
.plan--featured {
  border-color: var(--blue);
  box-shadow: var(--glow-blue);
  background:
    radial-gradient(400px 200px at 50% 0%, rgba(12, 123, 235, 0.16), transparent 70%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
}
.plan__badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
  padding: 6px 16px;
  border-radius: var(--radius-full);
}
.plan__name { font-family: var(--font-display); font-weight: 700; font-size: 21px; }
.plan__for { color: var(--muted-2); font-size: 13.5px; margin-top: 4px; }
.plan__price { margin: 24px 0 4px; font-family: var(--font-display); font-weight: 800; font-size: 44px; letter-spacing: -0.02em; }
.plan__price small { font-size: 16px; font-weight: 600; color: var(--muted); }
.plan__setup { font-size: 13px; color: var(--muted-2); margin-bottom: 24px; }
.plan__list { list-style: none; display: grid; gap: 11px; margin-bottom: 30px; flex: 1; }
.plan__list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--muted); align-items: flex-start; }
.plan__list li strong { color: var(--text); font-weight: 600; }
.plan__list svg { width: 17px; height: 17px; flex: none; stroke: var(--green); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-top: 3px; }
.plan .btn { width: 100%; }

.guarantee {
  margin: 64px auto 0;
  max-width: 760px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  border: 1px solid rgba(43, 213, 118, 0.3);
  background: rgba(43, 213, 118, 0.05);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
}
.guarantee svg { width: 34px; height: 34px; flex: none; stroke: var(--green); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.guarantee strong { font-family: var(--font-display); font-weight: 700; display: block; margin-bottom: 4px; }
.guarantee p { color: var(--muted); font-size: 14.5px; }

.addons { padding: 80px 0 120px; }
.addon-grid { margin-top: 40px; display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .addon-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .addon-grid { grid-template-columns: repeat(4, 1fr); } }
.addon {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 22px;
  transition: border-color var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.addon:hover { border-color: rgba(59, 157, 255, 0.4); transform: translateY(-4px); }
.addon strong { font-family: var(--font-display); font-weight: 700; font-size: 15.5px; display: block; }
.addon span { font-size: 13.5px; color: var(--muted); display: block; margin-top: 6px; }
.addon em { font-style: normal; font-family: var(--font-mono); font-size: 13px; color: var(--blue-bright); display: block; margin-top: 12px; }

/* ==== ROI strip ==== */
.roi { padding: 40px 0 100px; }
.roi__box {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 40px 32px;
  display: grid;
  gap: 28px;
  text-align: center;
}
@media (min-width: 768px) { .roi__box { grid-template-columns: repeat(3, 1fr); } }
.roi__big { font-family: var(--font-mono); font-size: clamp(30px, 3.6vw, 44px); color: var(--blue-bright); }
.roi__box p { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ==== Page hero (subpáginas) ==== */
.page-hero { padding: 160px 0 60px; text-align: center; }
@media (min-width: 1024px) { .page-hero { padding: 190px 0 70px; } }
.page-hero .section__sub { margin: 0 auto; }

/* ==== Soporte ==== */
.support { padding: 40px 0 120px; }
.support__grid { display: grid; gap: 28px; }
@media (min-width: 1024px) { .support__grid { grid-template-columns: 0.9fr 1.1fr; } }
.faq { display: grid; gap: 12px; align-content: start; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
  padding: 18px 22px;
  transition: border-color var(--dur-2) var(--ease);
}
.faq details[open] { border-color: rgba(59, 157, 255, 0.4); }
.faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; font-size: 15.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue-bright); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 12px; color: var(--muted); font-size: 14.5px; }

/* ==== Chat (widget + panel de soporte) ==== */
.chat-panel {
  border: 1px solid rgba(59, 157, 255, 0.3);
  border-radius: var(--radius-lg);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 520px;
  box-shadow: var(--shadow-card);
}
.chat-panel__head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-panel__head .mini-orb { width: 36px; height: 36px; }
.chat-panel__head strong { font-family: var(--font-display); font-weight: 700; font-size: 15px; display: block; }
.chat-panel__head span { font-size: 12.5px; color: var(--green); }
.chat-log { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; max-height: 480px; }
.chat-msg { max-width: 85%; padding: 12px 16px; border-radius: var(--radius-md); font-size: 14.5px; line-height: 1.5; animation: msg-in 300ms var(--ease); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.chat-msg--bot { background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.chat-msg--user { background: linear-gradient(180deg, var(--blue-bright), var(--blue)); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 12px; }
.chat-chip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue-bright);
  background: var(--blue-ghost);
  border: 1px solid rgba(59, 157, 255, 0.3);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  cursor: pointer;
  transition: background-color var(--dur-1) var(--ease);
}
.chat-chip:hover { background: rgba(12, 123, 235, 0.22); }
.chat-input { display: flex; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--line); }
.chat-input input {
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 16px; /* 16px mínimo: evita que iOS haga zoom al enfocar */
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.chat-input input:focus { outline: none; border-color: var(--blue-bright); }
.chat-input button {
  width: 46px; height: 46px;
  border: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.chat-input button svg { width: 18px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chat-note { font-size: 11.5px; color: var(--muted-2); text-align: center; padding: 0 16px 12px; }

/* Widget flotante */
.chatw-btn {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 1px solid rgba(59, 157, 255, 0.4);
  background: radial-gradient(circle at 32% 28%, #263349 0%, #0c1220 60%, #05070c 100%);
  box-shadow: var(--glow-blue);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform var(--dur-2) var(--ease);
}
.chatw-btn:hover { transform: scale(1.08); }
.chatw-btn .mini-orb { width: 34px; height: 34px; }
/* Anillo pulsante + burbuja de chat: deja claro que el botón es un chat */
.chatw-btn::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(59, 157, 255, 0.55);
  animation: chatw-pulse 2.6s var(--ease) infinite;
  pointer-events: none;
}
@keyframes chatw-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  70%, 100% { transform: scale(1.35); opacity: 0; }
}
.chatw-badge {
  position: absolute;
  right: -4px; top: -4px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--blue-bright), var(--blue));
  border: 2px solid #05070C;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.chatw-badge svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.mini-orb { border-radius: 50%; background: radial-gradient(circle at 40% 35%, #EAF4FF 0%, #7CC0FF 30%, #0C7BEB 62%, #052B55 100%); box-shadow: 0 0 16px rgba(59, 157, 255, 0.7); }
.chatw-label {
  position: fixed;
  right: 94px;
  bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  max-width: calc(100vw - 124px);
  background: rgba(9, 12, 19, 0.92);
  border: 1px solid rgba(59, 157, 255, 0.35);
  color: var(--muted);
  font-size: 13px;
  padding: 9px 15px;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45);
  animation: label-in 700ms var(--ease) 1.2s backwards;
  transition: border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.chatw-label strong { color: var(--blue-bright); font-weight: 600; }
.chatw-label:hover { border-color: var(--blue-bright); color: var(--text); }
.chatw-label.is-hidden { display: none; }
@keyframes label-in { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 480px) { .chatw-label { font-size: 12px; right: 90px; } }

.chatw-box {
  position: fixed;
  right: 22px;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  width: min(380px, calc(100vw - 44px));
  display: none;
}
.chatw-box.is-open { display: block; animation: msg-in 260ms var(--ease); }
/* El panel nunca sobrepasa la pantalla: en teléfonos bajos (o con el
   teclado abierto) el historial se encoge en vez de salirse por arriba. */
.chatw-box .chat-panel {
  min-height: 0;
  max-height: calc(100vh - 140px);
  max-height: calc(100dvh - 140px);
}
.chatw-box .chat-log { height: 320px; max-height: none; min-height: 0; }

/* ==== Forms ==== */
.form-wrap { max-width: 640px; margin: 0 auto; padding-bottom: 130px; }
.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-card);
}
@media (min-width: 640px) { .form-card { padding: 44px; } }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
/* min-width:0 evita que un placeholder o <option> largo ensanche la
   columna del grid y el campo se salga de la tarjeta */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; max-width: 100%; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.field input, .field textarea, .field select {
  height: 50px;
  padding: 0 16px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.field textarea { height: auto; padding: 14px 16px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(12, 123, 235, 0.22);
}
.form-note { font-size: 13px; color: var(--muted-2); text-align: center; margin-top: 16px; }
.form-msg { margin-top: 18px; padding: 14px 18px; border-radius: var(--radius-sm); font-size: 14.5px; display: none; }
.form-msg.is-ok { display: block; background: rgba(43, 213, 118, 0.08); border: 1px solid rgba(43, 213, 118, 0.35); color: var(--green); }
.form-msg.is-info { display: block; background: var(--blue-ghost); border: 1px solid rgba(59, 157, 255, 0.35); color: var(--blue-bright); }

/* ==== Login ==== */
.login-wrap { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 110px 20px 70px; }
.login-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  box-shadow: var(--shadow-card), 0 20px 80px rgba(12, 123, 235, 0.10);
  text-align: center;
}
.login-card .orb { width: 90px; margin: 0 auto 22px; animation-duration: 8s; }
.login-card h1 { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.01em; }
.login-card > p { color: var(--muted); font-size: 14.5px; margin: 8px 0 26px; }
.login-card form { display: grid; gap: 16px; text-align: left; }
.btn-google {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  border: 0;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
.btn-google:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4); }
.btn-google svg { flex: none; }
.login-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
  color: var(--muted-2);
  font-size: 12.5px;
}
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-welcome { text-align: center; }
.login-welcome h2 { font-family: var(--font-display); font-size: 24px; margin: 14px 0 10px; }
.login-welcome p { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; }
.login-avatar { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--blue-bright); box-shadow: var(--glow-blue); }
.form-msg.is-error { display: block; background: rgba(255, 92, 92, 0.08); border: 1px solid rgba(255, 92, 92, 0.4); color: #ff8080; }

.login-links { margin-top: 20px; font-size: 13.5px; color: var(--muted-2); }
.login-links a { color: var(--blue-bright); font-weight: 600; }

/* ==== Dashboard (portal de clientes) ==== */
.dashb { padding: 110px 0 90px; min-height: 100vh; min-height: 100svh; }
.dashb__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 28px; }
.dashb__head h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3.5vw, 38px); letter-spacing: -0.02em; }
.dashb__head p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }
.dashb__user { display: flex; align-items: center; gap: 12px; }
.dashb__user img { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--blue-bright); }
.dashb__user span { font-size: 13.5px; color: var(--muted); }
.dashb__banner {
  display: none;
  margin-bottom: 24px;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 184, 77, 0.4);
  background: rgba(245, 184, 77, 0.07);
  color: var(--amber);
  font-size: 13.5px;
}
.dashb__banner.is-on { display: block; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 26px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.kpi__label { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }
.kpi__value { font-family: var(--font-mono); font-size: clamp(24px, 3vw, 34px); font-weight: 500; line-height: 1; }
.kpi__meta { display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted-2); }
.kpi__meta.is-good { color: var(--green); }
.kpi__meta.is-bad { color: var(--red); }
.dashb__grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .dashb__grid { grid-template-columns: 1.25fr 0.75fr; align-items: start; } }
.panelbox {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.panelbox h2 { font-family: var(--font-display); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.panelbox .sub { font-size: 12.5px; color: var(--muted-2); margin-bottom: 16px; }
.chart-wrap { position: relative; width: 100%; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-tip {
  position: absolute;
  pointer-events: none;
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xs);
  padding: 8px 11px;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  transform: translate(-50%, -110%);
  opacity: 0;
  transition: opacity 120ms;
  z-index: 5;
}
.chart-tip strong { font-family: var(--font-mono); font-weight: 500; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: middle; }
.tbl td:first-child { color: var(--text); font-weight: 500; }
.tbl .num { font-family: var(--font-mono); font-size: 12.5px; }
.tbl-scroll { overflow-x: auto; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: var(--radius-full); }
.pill--on { background: rgba(43, 213, 118, 0.1); color: var(--green); border: 1px solid rgba(43, 213, 118, 0.3); }
.pill--off { background: rgba(151, 161, 180, 0.08); color: var(--muted-2); border: 1px solid var(--line); }
.pill--err { background: rgba(241, 96, 99, 0.1); color: var(--red); border: 1px solid rgba(241, 96, 99, 0.35); }
.pill--warn { background: rgba(245, 158, 11, 0.12); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35); }
.dashb__insight {
  margin-bottom: 26px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(59, 157, 255, 0.25);
  background: var(--blue-ghost);
  color: var(--text);
  font-size: 14px;
  display: none;
}
.dashb__insight.is-on { display: block; }
.dashb__login {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 24px;
}
.integ { display: grid; gap: 12px; }
.integ__item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); }
.integ__item svg { width: 20px; height: 20px; flex: none; stroke: var(--blue-bright); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.integ__item strong { font-size: 13.5px; display: block; }
.integ__item span { font-size: 12px; color: var(--muted-2); display: block; }
.integ__item .pill { margin-left: auto; }

/* ==== Footer ==== */
.footer { border-top: 1px solid var(--line); padding: 70px 0 50px; background: rgba(5, 7, 12, 0.6); }
.footer__inner { display: grid; gap: 36px; }
@media (min-width: 768px) { .footer__inner { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer__logo { width: 190px; height: auto; }
.footer__tag { font-size: 14.5px; color: var(--muted); margin-top: 16px; }
.footer__social { display: flex; gap: 10px; margin-top: 18px; }
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.footer__social a:hover { color: var(--text); border-color: rgba(59, 157, 255, 0.45); background: var(--blue-ghost); }
.footer__social svg { width: 17px; height: 17px; }
.footer h4 { font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 16px; }
.footer__links { display: grid; gap: 10px; }
.footer__links a { font-size: 14.5px; color: var(--muted); transition: color var(--dur-1) var(--ease); }
.footer__links a:hover { color: var(--text); }
.footer__legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 24px; font-size: 13px; color: var(--muted-2); }

/* ==== Scroll animations ==== */
.rise {
  opacity: 0;
  transform: translateY(38px);
  transition: opacity var(--dur-3) var(--ease), transform var(--dur-3) var(--ease);
}
.rise.is-visible { opacity: 1; transform: none; }
.split .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.55em) rotate(2deg);
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  transition-delay: calc(var(--wi, 0) * 70ms);
}
.split.is-visible .w { opacity: 1; transform: none; }

/* ==== Menú superior de los paneles (tabs) ==== */
.dtabs {
  display: flex;
  gap: 6px;
  margin-bottom: 26px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dtabs::-webkit-scrollbar { display: none; }
.dtabs a {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-xs);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.dtabs a:hover { color: var(--text); }
.dtabs a.is-active { color: var(--text); background: var(--blue-ghost); box-shadow: inset 0 0 0 1px rgba(59, 157, 255, 0.35); }
.dtabs a .dtabs__count {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted-2);
}
.dtab-panel { display: none; }
.dtab-panel.is-active { display: block; animation: dtabIn 220ms var(--ease); }
@keyframes dtabIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ==== Selector de rol (invitaciones) ==== */
.rolecards { display: grid; gap: 10px; margin-bottom: 4px; }
@media (min-width: 560px) { .rolecards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.rolecard { position: relative; display: block; cursor: pointer; }
.rolecard input { position: absolute; opacity: 0; pointer-events: none; }
.rolecard__box {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
  height: 100%;
}
.rolecard strong { display: block; font-size: 14px; margin-bottom: 4px; }
.rolecard span { display: block; font-size: 12px; color: var(--muted-2); line-height: 1.5; }
.rolecard input:checked + .rolecard__box {
  border-color: rgba(59, 157, 255, 0.55);
  background: var(--blue-ghost);
  box-shadow: inset 0 0 0 1px rgba(59, 157, 255, 0.35);
}
.rolecard input:focus-visible + .rolecard__box { outline: 2px solid var(--blue-bright); outline-offset: 2px; }

/* ==== Gráfico de barras (actividad n8n) ==== */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.bars__col { flex: 1; min-width: 3px; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; border-radius: 3px 3px 0 0; overflow: hidden; }
.bars__ok { background: linear-gradient(180deg, var(--blue-bright), var(--blue-deep)); }
.bars__err { background: var(--red); }
.bars__col:hover .bars__ok { background: var(--blue-bright); }
.bars-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted-2); margin-top: 8px; font-family: var(--font-mono); }

/* ==== Testimonios (portada) ==== */
.testis { padding: 90px 0; }
.testis .section__title { margin-bottom: 44px; }
.testis__grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .testis__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .testis__grid { grid-template-columns: repeat(3, 1fr); } }
.testi {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.testi__stars { color: var(--amber); letter-spacing: 3px; font-size: 15px; }
.testi blockquote { font-size: 15px; line-height: 1.7; color: var(--text); flex: 1; }
.testi figcaption { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.testi figcaption span { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted-2); margin-top: 2px; }

/* ==== Selector de estrellas (panel del cliente) ==== */
.starpick { display: flex; gap: 4px; }
.starpick button {
  font-size: 26px;
  line-height: 1;
  padding: 2px 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted-2);
  transition: color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
}
.starpick button:hover { transform: scale(1.15); }
.starpick button.is-on { color: var(--amber); }

/* ==== Filtros tipo chip (pipeline de solicitudes) ==== */
.leadbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 6px 13px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.chip:hover { color: var(--text); }
.chip.is-active { color: var(--text); background: var(--blue-ghost); border-color: rgba(59, 157, 255, 0.45); }

/* ==== Rendimiento ====
   Las animaciones del orbe van en su propia capa (solo transform, sin
   repintar), y las secciones bajo el pliegue no se calculan hasta acercarse. */
.orb, .orb__ring, .orb__ring--2, .orb__sat, .orb__eye::after { will-change: transform; }
.orb__eye-core { filter: none; box-shadow: 0 0 6px rgba(255, 255, 255, 0.9); }
.how, .system, .cyber, .case, .cta-banner, .footer {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}
@media (max-width: 768px) {
  /* el blur del nav al hacer scroll es caro en móvil: fondo sólido */
  .nav--scrolled {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(5, 7, 12, 0.97);
  }
}

/* ==== Paneles en el teléfono: todo más compacto ==== */
@media (max-width: 640px) {
  .dashb { padding: 88px 0 56px; }
  .dashb__head { margin-bottom: 18px; }
  .dashb__head h1 { font-size: 22px; }
  .dashb__head p { font-size: 13px; margin-top: 4px; }
  .dtabs { gap: 4px; padding: 5px; margin-bottom: 18px; }
  .dtabs a { padding: 8px 12px; font-size: 12.5px; }
  .kpis { gap: 9px; margin-bottom: 18px; }
  .kpi { padding: 14px 14px; }
  .kpi__value { font-size: 21px; }
  .kpi__label { font-size: 10px; margin-bottom: 7px; }
  .tbl { font-size: 12.5px; }
  .tbl th { font-size: 10px; padding: 7px 8px; }
  .tbl td { padding: 9px 8px; }
  .panelbox h2 { font-size: 15px; }
  .dashb__grid { gap: 14px; }
  .rolecard__box { padding: 12px 13px; }
  .bars { height: 90px; }
}

/* ==== Ajustes de espacio en pantallas estrechas ==== */
@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .cards-grid { margin-top: 40px; }
  .card { padding: 26px 20px; }
  .cyber__inner { padding: 36px 20px; }
  .cta-banner__box { padding: 52px 20px; }
  .form-card { padding: 30px 20px; }
  .plan { padding: 30px 22px; }
  .guarantee { padding: 22px 20px; flex-direction: column; gap: 14px; }
  .dash__body { padding: 20px 16px; }
  .login-card { padding: 34px 22px; }
  .panelbox { padding: 16px 14px; }
  .tension { padding: 70px 0; }
  .how, .system, .cyber, .case { padding: 76px 0; }
  .cta-banner { padding: 76px 0 100px; }
}

/* ==== Reduced motion ==== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .rise, .split .w { opacity: 1; transform: none; }
}

/* ---- Barra legal del pie (todas las páginas públicas) ---- */
.footer__legalbar {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: grid;
  gap: 10px;
}
.footer__legalbar p { font-size: 13px; color: var(--muted-2); }
.footer__legalbar nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.footer__legalbar nav a { color: var(--muted); transition: color 160ms ease; }
.footer__legalbar nav a:hover { color: var(--text); }
.footer__legalbar nav span { color: var(--muted-2); opacity: 0.55; }

/* consentimiento bajo el botón del formulario de contacto */
.form-consent { margin-top: 12px; font-size: 12.5px; color: var(--muted-2); text-align: center; }
.form-consent a { color: var(--blue-bright); }

/* ==========================================================================
   Tema CLARO (predeterminado — el snippet del <body> lo aplica antes del
   primer pintado; el oscuro se elige con el botón sol/luna).
   Los logos se intercambian por JS: logo-*.png (blanco+azul, fondo oscuro)
   ↔ logo-*-dark.png (negro+azul, fondo claro).
   ========================================================================== */
body[data-theme="light"] {
  --bg: #F6F8FC;
  --bg-soft: #EDF1F8;
  --panel: #FFFFFF;
  --panel-2: #F1F4FA;
  --line: rgba(11, 18, 32, 0.10);
  --line-strong: rgba(11, 18, 32, 0.20);
  --text: #0B1220;
  --muted: #4B5568;
  --muted-2: #6E7890;
  --blue-bright: #0C7BEB;   /* sobre blanco el azul del logo no necesita glow */
  --blue-ghost: rgba(12, 123, 235, 0.09);
  --glow-blue: 0 0 30px rgba(12, 123, 235, 0.16), 0 0 80px rgba(12, 123, 235, 0.05);
  --shadow-card: 0 8px 26px rgba(15, 30, 60, 0.10);
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(12, 123, 235, 0.07), transparent 60%),
    radial-gradient(700px 500px at 0% 30%, rgba(12, 123, 235, 0.04), transparent 55%),
    var(--bg);
}

/* barra de navegación y menú móvil: fondos claros sólidos */
body[data-theme="light"] .nav--scrolled { background: rgba(246, 248, 252, 0.92); }
@supports not (backdrop-filter: blur(8px)) {
  body[data-theme="light"] .nav--scrolled { background: #F6F8FC; }
}
body[data-theme="light"] .nav--open { background: #F6F8FC; }
body[data-theme="light"] .nav--open .nav__links {
  background:
    radial-gradient(700px 380px at 85% -5%, rgba(12, 123, 235, 0.10), transparent 60%),
    #F6F8FC;
}
body[data-theme="light"] .nav__toggle span { background: #0B1220; }

/* superficies que en oscuro usan blanco translúcido */
body[data-theme="light"] .btn--ghost,
body[data-theme="light"] .lang-toggle { background: rgba(11, 18, 32, 0.04); }
body[data-theme="light"] .footer { background: rgba(11, 18, 32, 0.03); }
body[data-theme="light"] .dash__dot { background: rgba(11, 18, 32, 0.14); }
body[data-theme="light"] .chatw-label {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 18px rgba(15, 30, 60, 0.14);
}
@media (max-width: 768px) {
  body[data-theme="light"] .nav--scrolled { background: rgba(246, 248, 252, 0.97); }
}

/* colores de estado con más contraste sobre blanco */
body[data-theme="light"] { --green: #169A54; --amber: #B77E14; --red: #C23A3D; }
body[data-theme="light"] .form-msg.is-error { color: #C23A3D; }

/* ==== FAQ como sección propia (index / pricing) ==== */
.faq--page { max-width: 780px; margin: 44px auto 0; }

/* ==== Botón flotante de WhatsApp (abajo-izquierda; el chat vive a la derecha) ==== */
.wa-fab {
  position: fixed;
  left: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  display: grid;
  place-items: center;
  transition: transform var(--dur-2) var(--ease);
}
.wa-fab:hover { transform: scale(1.07); }
.wa-fab svg { width: 30px; height: 30px; fill: #fff; }

/* ==== Agenda Cal.com (contact) ==== */
.cal-card { text-align: center; }
.cal-card__title {
  font-family: var(--font-display, 'Sora', sans-serif);
  font-size: clamp(22px, 3vw, 28px);
  margin-bottom: 10px;
}
.cal-card__sub { color: var(--muted, #9AA3B5); margin-bottom: 22px; }
.cal-frame {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(127, 140, 170, 0.22);
  background: #fff;
}
.cal-frame iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
}
.cal-card__alt { margin-top: 20px; color: var(--muted, #9AA3B5); font-size: 15px; }
@media (max-width: 640px) {
  .cal-frame iframe { height: 560px; }
}

/* ==== Página de gracias ==== */
.ty-check {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--green, #35D07F);
  background: rgba(53, 208, 127, 0.12);
  border: 1px solid rgba(53, 208, 127, 0.35);
}
.ty-check svg { width: 30px; height: 30px; }
.ty-card { max-width: 640px; margin-left: auto; margin-right: auto; }
.ty-steps {
  list-style: none;
  counter-reset: ty;
  margin: 0; padding: 0;
  display: grid; gap: 18px;
  text-align: left;
}
.ty-steps li {
  counter-increment: ty;
  position: relative;
  padding-left: 52px;
}
.ty-steps li::before {
  content: counter(ty);
  position: absolute; left: 0; top: 2px;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  color: var(--blue-bright, #4DA3FF);
  background: var(--blue-ghost, rgba(12, 123, 235, 0.09));
  border: 1px solid rgba(12, 123, 235, 0.3);
}
.ty-steps strong { display: block; margin-bottom: 3px; }
.ty-steps span { color: var(--muted, #9AA3B5); font-size: 15px; }
.ty-actions {
  margin-top: 28px;
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ==== Llamada demo al agente IA (hero del index) ==== */
.demo-call { margin-top: 14px; font-size: 15px; }
.demo-call a {
  color: var(--blue-bright, #4DA3FF);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(12, 123, 235, 0.5);
}
.demo-call a:hover { border-bottom-style: solid; }
