/* NullDec — sitio público (nulldec.com)
   Identidad visual v3: sobria, técnica, sin ornamento.
   Morado como color de marca dominante; el verde lima se reserva
   EXCLUSIVAMENTE para estados de producto (una sola aparición: el chip
   "amenaza contenida"), nunca en el logotipo ni como decoración.

   Temas claro/oscuro vía [data-theme] en <html>. Los colores viven en
   tokens; ningún componente lleva color fijo salvo las superficies de
   producto (consola y banda de inteligencia), que tienen sus propios tokens. */

/* ---------- Tokens · tema claro (por defecto) ---------- */
:root {
  /* Marca */
  --purple: #6D28D9;          /* rellenos sólidos (botones/insignias) con texto blanco */
  --purple-bright: #8B5CF6;   /* acento sobre superficies de producto oscuras */
  --accent: #6D28D9;          /* acento sobre superficie: iconos, enlaces, bordes, eyebrow */
  --lime: #84CC16;            /* acento — SOLO estados de producto */

  /* Neutros con matiz morado (oklch con fallback hex) */
  --text: #100a17;
  --text: oklch(0.15 0.015 290);
  --gray: #8a8790;
  --gray: oklch(0.60 0.008 290);
  --bg: #f6f5f7;
  --bg: oklch(0.97 0.004 290);
  --surface: #ffffff;
  --border: #e6e3ea;
  --border: oklch(0.90 0.006 290);

  /* Superficie "consola" (maqueta de producto): oscura en ambos temas */
  --console-bg: #14101d;
  --console-bg: oklch(0.15 0.015 290);
  --console-border: #241a33;

  --shadow-card: 0 18px 40px -28px rgba(16,10,23,0.35);
  --shadow-console: 0 30px 60px -30px rgba(16,10,23,0.5);

  /* Tipografía */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  /* Ritmo */
  --maxw: 1120px;
  --pad: clamp(1.25rem, 5vw, 3rem);
  --radius: 14px;
  --radius-sm: 9px;

  color-scheme: light;
}

/* ---------- Tokens · tema oscuro ---------- */
:root[data-theme="dark"] {
  --accent: #a78bfa;          /* morado más claro para legibilidad sobre oscuro */

  --text: #ece9f0;
  --text: oklch(0.95 0.006 290);
  --gray: #a49bb0;
  --gray: oklch(0.70 0.020 290);
  --bg: #0f0a17;
  --bg: oklch(0.145 0.014 290);
  --surface: #1a1324;
  --surface: oklch(0.185 0.016 290);
  --border: #38304a;
  --border: oklch(0.30 0.016 290);

  --console-bg: #1d1528;
  --console-bg: oklch(0.205 0.017 290);
  --console-border: #38304a;
  --console-border: oklch(0.33 0.020 290);

  --shadow-card: 0 18px 40px -26px rgba(0,0,0,0.6);
  --shadow-console: 0 30px 60px -28px rgba(0,0,0,0.7);

  color-scheme: dark;
}

/* ---------- Reset base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s ease, color 0.25s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
code {
  font-family: var(--font-mono); font-size: 0.9em; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  padding: 0.05em 0.36em; border-radius: 5px;
}

/* ---------- Utilidades ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 1.1rem;
}
.eyebrow .n { color: var(--accent); }
.section { padding-block: clamp(3.5rem, 9vw, 6.5rem); }
.section-head { max-width: 640px; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.section-head .lead { margin-top: 1rem; color: var(--gray); font-size: 1.08rem; }

/* Skip link accesible */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--purple); color: #fff; padding: 0.6rem 1rem; z-index: 100; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem;
  padding: 0.72rem 1.3rem; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.btn-primary { background: var(--purple); color: #fff; }        /* texto blanco: contraste ~5.4:1 */
.btn-primary:hover { background: #5b21b6; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost-invert { background: transparent; color: #fff; border-color: rgba(255,255,255,0.28); }
.btn-ghost-invert:hover { border-color: rgba(255,255,255,0.6); }
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1.02rem; }
.arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Interruptor de tema */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: transparent; color: var(--text);
  cursor: pointer; transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
  flex: none;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

/* ---------- Logo [Ø] ---------- */
.logo { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--accent); }
.logo svg { width: 42px; height: auto; }
.logo .word { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; color: var(--text); letter-spacing: -0.01em; }
.logo--invert { color: #fff; }
.logo--invert .word { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav-links { display: flex; align-items: center; gap: 1.9rem; }
.nav-links a { font-size: 0.92rem; color: var(--gray); font-weight: 500; transition: color 0.15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
@media (max-width: 860px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(3.5rem, 8vw, 6rem) clamp(3.5rem, 8vw, 6rem); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(600px 340px at 82% 8%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    linear-gradient(transparent 0 calc(100% - 1px), var(--border) calc(100% - 1px)) 0 0 / 100% 40px,
    linear-gradient(90deg, transparent 0 calc(100% - 1px), var(--border) calc(100% - 1px)) 0 0 / 40px 100%;
  -webkit-mask-image: radial-gradient(720px 480px at 78% 20%, #000, transparent 78%);
          mask-image: radial-gradient(720px 480px at 78% 20%, #000, transparent 78%);
  opacity: 0.5;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.1rem); }
.hero h1 .accent { color: var(--accent); }
.hero .sub { margin-top: 1.4rem; font-size: clamp(1.05rem, 2vw, 1.22rem); color: var(--gray); max-width: 30ch; }
.hero .actions { margin-top: 2.1rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero .microcopy { margin-top: 1.2rem; font-family: var(--font-mono); font-size: 0.78rem; color: var(--gray); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .sub { max-width: 48ch; }
}

/* ---------- Consola mock (superficie oscura = contexto de producto) ---------- */
.console {
  background: var(--console-bg); color: #fff; border-radius: var(--radius);
  border: 1px solid var(--console-border);
  box-shadow: var(--shadow-console);
  overflow: hidden; font-family: var(--font-mono); font-size: 0.86rem;
}
.console-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--console-border); }
.console-bar .dots { display: flex; gap: 0.4rem; }
.console-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a2c50; display: block; }
.console-body { padding: 1.25rem 1.2rem 1.4rem; }
.alert-row { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.alert-row .contained {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 600; color: #fff;
}
/* La ÚNICA aparición del verde lima en todo el sitio: estado de producto */
.dot-lime { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 22%, transparent); flex: none; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1.1rem; color: #cfc7db; }
.kv dt { color: #8f83a6; }
.kv dd { margin: 0; color: #efeaf6; }
.kv dd .tag { color: var(--purple-bright); }
.console-foot { margin-top: 1.2rem; padding-top: 0.9rem; border-top: 1px solid var(--console-border); color: #8f83a6; font-size: 0.78rem; }

/* ---------- Grids de tarjetas ---------- */
.cards { display: grid; gap: 1.1rem; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) { .cols-3 { grid-template-columns: 1fr; } .cols-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.card .ico {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface)); color: var(--accent);
  margin-bottom: 1.1rem;
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.12rem; margin-bottom: 0.5rem; }
.card p { color: var(--gray); font-size: 0.96rem; }

/* ---------- Pasos ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.step .num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent); margin-bottom: 0.9rem; letter-spacing: 0.08em; }
.step .ico { color: var(--text); margin-bottom: 0.8rem; }
.step .ico svg { width: 24px; height: 24px; }
.step h3 { font-size: 1.04rem; margin-bottom: 0.4rem; }
.step p { color: var(--gray); font-size: 0.92rem; }

/* ---------- Señuelos ---------- */
.decoys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
@media (max-width: 820px) { .decoys { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .decoys { grid-template-columns: 1fr; } }
.decoy { display: flex; align-items: flex-start; gap: 0.9rem; padding: 1.15rem 1.2rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.decoy .ico { color: var(--accent); flex: none; margin-top: 2px; }
.decoy .ico svg { width: 20px; height: 20px; }
.decoy h3 { font-size: 0.99rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.decoy p { color: var(--gray); font-size: 0.88rem; margin-top: 0.25rem; }
.pill { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 999px; padding: 0.1rem 0.5rem; }

/* ---------- Inteligencia (sigue el tema activo; nunca fijo en oscuro) ---------- */
.intel-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .intel-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .intel-grid { grid-template-columns: 1fr; } }
.intel { padding: 1.4rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.intel:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); transform: translateY(-2px); box-shadow: var(--shadow-card); }
.intel .ico { color: var(--accent); margin-bottom: 0.9rem; }
.intel .ico svg { width: 24px; height: 24px; }
.intel h3 { font-size: 1.02rem; margin-bottom: 0.4rem; }
.intel p { color: var(--gray); font-size: 0.9rem; }

/* ---------- Precios ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; align-items: start; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.8rem; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 20px 50px -30px color-mix(in srgb, var(--accent) 60%, transparent); position: relative; }
.plan .tier { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gray); }
.plan.featured .tier { color: var(--accent); }
.plan .badge { position: absolute; top: -0.7rem; right: 1.4rem; background: var(--purple); color: #fff; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 0.25rem 0.6rem; border-radius: 999px; }
.plan .price { margin: 0.9rem 0 0.2rem; font-family: var(--font-display); font-size: 2.1rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.plan .price small { font-family: var(--font-sans); font-size: 0.9rem; font-weight: 500; color: var(--gray); }
.plan .price-note { color: var(--gray); font-size: 0.86rem; min-height: 1.2rem; }
.plan .feats { margin: 1.3rem 0; display: grid; gap: 0.7rem; }
.plan .feats li { display: flex; gap: 0.6rem; font-size: 0.93rem; color: var(--text); }
.plan .feats li svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 3px; }
.plan .feats li.off { color: var(--gray); }
.plan .feats li.off svg { color: var(--gray); }
.plan .btn { margin-top: auto; width: 100%; }

/* ---------- CTA final ---------- */
.cta {
  background: var(--purple);
  background-image: linear-gradient(135deg, #5b21b6, var(--purple) 55%, #7c3aed);
  color: #fff; border-radius: var(--radius); padding: clamp(2.4rem, 6vw, 4rem);
  text-align: center; position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); color: #fff; }
.cta p { margin: 1rem auto 0; max-width: 46ch; color: rgba(255,255,255,0.85); }
.cta .actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding-block: 3rem 2.5rem; margin-top: 1rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: flex-start; }
.foot-brand { max-width: 300px; }
.foot-brand p { color: var(--gray); font-size: 0.9rem; margin-top: 1rem; }
.foot-cols { display: flex; gap: 3.5rem; flex-wrap: wrap; }
.foot-col h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); margin: 0 0 0.9rem; font-weight: 500; }
.foot-col a { display: block; font-size: 0.92rem; color: var(--text); padding: 0.28rem 0; }
.foot-col a:hover { color: var(--accent); }
.foot-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: var(--gray); font-size: 0.82rem; }
.foot-bottom .mono { font-family: var(--font-mono); }

/* ---------- Reveal sutil ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
