/* =========================================================
   Nexora AI — estilos
   Landing conceptual de portafolio
   ========================================================= */

/* ---------- Variables ---------- */
:root {
  --bg: #05060B;
  --bg-2: #0A1024;
  --surface: rgba(17, 22, 44, .6);
  --surface-solid: #0E1430;
  --border: rgba(148, 163, 255, .14);
  --border-strong: rgba(148, 163, 255, .28);
  --text: #EEF1FF;
  --text-soft: #A3ABCC;
  --text-dim: #8089AE;
  --violet: #8B5CF6;
  --violet-soft: #A78BFA;
  --cyan: #22D3EE;
  --green: #34D399;
  --amber: #FBBF24;
  --gradient: linear-gradient(110deg, var(--violet) 0%, #6D7CFF 50%, var(--cyan) 100%);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --radius: 20px;
  --radius-sm: 12px;
  --header-h: 72px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.1; letter-spacing: -.02em; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--cyan); }
button { font: inherit; color: inherit; cursor: pointer; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(139, 92, 246, .45); }

.container { width: min(1200px, 100% - 3rem); margin-inline: auto; }
.section { padding: clamp(5rem, 11vw, 9rem) 0; position: relative; }
.muted { color: var(--text-dim); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; padding: .75rem 1.25rem; border-radius: 10px; background: var(--text); color: var(--bg); }
.skip-link:focus { top: 1rem; }

/* ---------- Fondo ---------- */
.bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: radial-gradient(1200px 600px at 50% -10%, var(--bg-2), var(--bg) 70%); }
.bg__grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(148,163,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,255,.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 20%, #000 30%, transparent 75%);
}
.bg__orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .45; animation: drift 18s ease-in-out infinite alternate; }
.bg__orb--violet { width: 520px; height: 520px; background: var(--violet); top: -160px; left: -120px; }
.bg__orb--cyan { width: 420px; height: 420px; background: var(--cyan); top: 120px; right: -160px; opacity: .25; animation-delay: -6s; }
@keyframes drift { to { transform: translate(60px, 80px) scale(1.1); } }

/* ---------- Tipografía y utilidades ---------- */
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-soft); margin-bottom: 1rem; }
.section-head { max-width: 760px; margin: 0 auto clamp(3rem, 6vw, 4.5rem); text-align: center; }
.section-title { font-size: clamp(2.1rem, 4.6vw, 3.5rem); font-weight: 600; margin-bottom: 1.25rem; }
.section-lead { color: var(--text-soft); font-size: 1.125rem; max-width: 620px; margin-inline: auto; }
.label { font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 .35rem; }

.pill {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .45rem 1rem .45rem .75rem; margin-bottom: 1.75rem;
  border: 1px solid var(--border-strong); border-radius: 999px;
  background: rgba(139, 92, 246, .1);
  font-size: .875rem; color: var(--text-soft);
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .18); animation: blink 2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

.tag {
  display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  padding: .25rem .65rem; border-radius: 999px;
  font-family: var(--font-mono); font-size: .6875rem; letter-spacing: .04em;
  border: 1px solid var(--border-strong); color: var(--text-soft);
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag--ok { color: var(--green); border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .08); }
.tag--run { color: var(--cyan); border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .08); }
.tag--run::before { animation: blink 1s infinite; }
.tag--wait { color: var(--text-dim); }

/* ---------- Botones ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: .8rem 1.5rem; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: .975rem; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease);
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--gradient); color: #fff; box-shadow: 0 10px 30px -10px rgba(139, 92, 246, .7), inset 0 1px 0 rgba(255,255,255,.25); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(109, 124, 255, .8), inset 0 1px 0 rgba(255,255,255,.25); color: #fff; }
.btn--ghost { background: rgba(255,255,255,.03); border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--violet-soft); background: rgba(139, 92, 246, .1); transform: translateY(-2px); color: var(--text); }
.btn--sm { min-height: 42px; padding: .55rem 1.1rem; font-size: .9rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; }

/* ---------- Tarjeta base con brillo que sigue al cursor ---------- */
.card {
  position: relative; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  isolation: isolate; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(139, 92, 246, .16), transparent 45%);
}
.card:hover::before { opacity: 1; }

/* ---------- Encabezado ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); transition: background-color .3s var(--ease), border-color .3s var(--ease); border-bottom: 1px solid transparent; }
.header.is-scrolled { background: rgba(5, 6, 11, .78); backdrop-filter: blur(14px); border-color: var(--border); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.logo b { font-weight: 500; margin-left: .2rem; color: var(--text-soft); }
.logo__mark { width: 32px; height: 32px; }
.nav { display: flex; align-items: center; gap: 2.25rem; }
.nav__list { display: flex; gap: 2rem; }
.nav__link { color: var(--text-soft); text-decoration: none; font-size: .9375rem; font-weight: 500; transition: color .2s; position: relative; }
.nav__link:hover, .nav__link.is-current { color: var(--text); }
.nav__link.is-current::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px; background: var(--gradient); }
.nav-toggle { display: none; position: relative; width: 46px; height: 46px; border: 1px solid var(--border-strong); border-radius: 12px; background: rgba(255,255,255,.03); }
.nav-toggle span { position: absolute; left: 13px; width: 18px; height: 2px; border-radius: 2px; background: var(--text); transition: transform .3s var(--ease); }
.nav-toggle span:nth-child(1) { top: 18px; }
.nav-toggle span:nth-child(2) { top: 25px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)) 0 clamp(3rem, 6vw, 5rem); }
.hero__inner > * { min-width: 0; }
.hero__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(3rem, 6vw, 5rem); align-items: center; }
.hero__title { font-size: clamp(2.75rem, 6.2vw, 5rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; margin-bottom: 1.5rem; }
.hero__sub { font-size: clamp(1.075rem, 1.6vw, 1.25rem); color: var(--text-soft); max-width: 520px; margin-bottom: 2.25rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.5rem; }
.hero__chips { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.hero__chips li { position: relative; padding-left: 1.1rem; font-size: .875rem; color: var(--text-dim); }
.hero__chips li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 2px; background: var(--gradient); }
.hero__note { margin-top: 2.5rem; font-size: .8125rem; color: var(--text-dim); text-align: right; }

/* Consola / dashboard */
.console { position: relative; border-radius: 22px; background: linear-gradient(180deg, rgba(20, 26, 54, .92), rgba(10, 14, 32, .92)); border: 1px solid var(--border-strong); box-shadow: 0 40px 100px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.02) inset; }
.console__glow { position: absolute; inset: -1px; z-index: -1; border-radius: 23px; background: var(--gradient); filter: blur(40px); opacity: .28; }
.console__bar { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); }
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.14); }
.console__title { font-family: var(--font-mono); font-size: .75rem; color: var(--text-dim); flex: 1; }
.live { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--font-mono); font-size: .6875rem; color: var(--green); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: blink 1.6s infinite; }
.console__body { padding: 1.4rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
.console__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.console__flow { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0; }
.console__chart { padding: 1rem 1rem .5rem; border-radius: var(--radius-sm); background: rgba(5, 6, 11, .5); border: 1px solid var(--border); }
.chart { width: 100%; height: 90px; display: block; }
.chart__line { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 2.4s var(--ease) .4s forwards; }
.chart__area { opacity: 0; animation: fade 1.2s var(--ease) 1.4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
.tasks { display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.task { display: flex; align-items: center; gap: .8rem; padding: .7rem .85rem; border-radius: 10px; background: rgba(255,255,255,.025); border: 1px solid var(--border); font-size: .875rem; transition: border-color .4s var(--ease), background-color .4s var(--ease); }
.task.is-running { border-color: rgba(34, 211, 238, .35); background: rgba(34, 211, 238, .05); }
.task__icon { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; background: rgba(139, 92, 246, .16); color: var(--violet-soft); font-size: .85rem; }
.task__name { flex: 1; color: var(--text-soft); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console__float { position: absolute; display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: 14px; background: rgba(14, 20, 48, .92); border: 1px solid var(--border-strong); backdrop-filter: blur(10px); box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); animation: float 6s ease-in-out infinite; }
.console__float .label { margin: 0; }
.console__float--a { left: -2.5rem; bottom: 5.5rem; }
.console__float--b { right: -1.75rem; top: 5.5rem; animation-delay: -3s; }
.float__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgba(139, 92, 246, .2); color: var(--violet-soft); }
.float__icon--cyan { background: rgba(34, 211, 238, .16); color: var(--cyan); }
.float__text { margin: 0; font-size: .85rem; color: var(--text); }
@keyframes float { 50% { transform: translateY(-10px); } }

/* ---------- Problema / solución ---------- */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1.5rem; align-items: stretch; }
.compare__card { padding: clamp(1.75rem, 3vw, 2.5rem); border-radius: var(--radius); border: 1px solid var(--border); background: rgba(255,255,255,.02); }
.compare__card--after { background: linear-gradient(160deg, rgba(139, 92, 246, .14), rgba(34, 211, 238, .06)); border-color: rgba(139, 92, 246, .35); box-shadow: 0 30px 80px -40px rgba(139, 92, 246, .6); }
.compare__card h3 { font-size: 1.45rem; font-weight: 600; margin: 1rem 0 1.5rem; }
.compare__badge { display: inline-block; padding: .3rem .75rem; border-radius: 999px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: #FCA5A5; background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .25); }
.compare__badge--after { color: var(--cyan); background: rgba(34, 211, 238, .1); border-color: rgba(34, 211, 238, .3); }
.compare__list { display: grid; gap: 1rem; }
.compare__list li { display: flex; gap: .8rem; color: var(--text-soft); }
.compare__list svg { flex: none; width: 22px; height: 22px; margin-top: .1rem; }
.compare__card--before svg { color: #F87171; }
.compare__card--after svg { color: var(--green); }
.compare__card--after li { color: var(--text); }
.compare__arrow { align-self: center; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface-solid); color: var(--cyan); }
.compare__arrow svg { width: 22px; height: 22px; }

/* ---------- Servicios ---------- */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.service { padding: clamp(1.75rem, 3vw, 2.5rem); transition: border-color .3s var(--ease), transform .3s var(--ease); }
.service:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.service__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; margin-bottom: 1.5rem; background: linear-gradient(140deg, rgba(139, 92, 246, .3), rgba(34, 211, 238, .14)); border: 1px solid rgba(139, 92, 246, .4); color: #fff; }
.service__icon svg { width: 26px; height: 26px; }
.service h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: .75rem; }
.service p { color: var(--text-soft); }
.service__tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1.25rem; }
.service__tags li { padding: .25rem .7rem; border-radius: 999px; font-family: var(--font-mono); font-size: .72rem; color: var(--text-soft); border: 1px solid var(--border); background: rgba(255,255,255,.02); }

/* ---------- Cómo funciona ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; counter-reset: step; }
.steps::before { content: ""; position: absolute; top: 34px; left: 8%; right: 8%; height: 2px; background: var(--border); }
.steps::after { content: ""; position: absolute; top: 34px; left: 8%; height: 2px; width: calc(84% * var(--progress, 0)); background: var(--gradient); box-shadow: 0 0 16px rgba(139, 92, 246, .7); transition: width .2s linear; }
.step { position: relative; z-index: 1; text-align: center; padding: 0 1rem; }
.step__num { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 1.5rem; border-radius: 20px; font-family: var(--font-mono); font-size: 1.05rem; font-weight: 500; color: var(--text); background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: 0 0 0 8px var(--bg); }
.step.is-visible .step__num { border-color: rgba(139, 92, 246, .6); box-shadow: 0 0 0 8px var(--bg), 0 0 30px -4px rgba(139, 92, 246, .7); }
.step h3 { font-size: 1.35rem; font-weight: 600; margin-bottom: .75rem; }
.step p { color: var(--text-soft); max-width: 320px; margin-inline: auto; }

/* ---------- Demo ---------- */
.demo { border-radius: 24px; border: 1px solid var(--border-strong); background: linear-gradient(180deg, rgba(17, 22, 44, .85), rgba(8, 11, 26, .9)); overflow: hidden; box-shadow: 0 40px 120px -50px rgba(109, 124, 255, .55); }
.demo__toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.demo__name { margin: 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.demo__controls { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.demo__controls .btn svg { fill: currentColor; stroke: none; }
.demo__controls .btn:hover svg { transform: none; }
.demo__body { display: grid; grid-template-columns: 1fr 300px; }
.flow { position: relative; min-height: 380px; margin: 1.5rem; background-image: radial-gradient(rgba(148,163,255,.16) 1px, transparent 1px); background-size: 22px 22px; border-radius: var(--radius-sm); }
.flow__lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.wire { fill: none; stroke: rgba(148, 163, 255, .22); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 6 6; }
.wire.is-active { stroke: url(#wire); stroke-width: 2.5; animation: dash .8s linear infinite; }
.wire.is-done { stroke: rgba(139, 92, 246, .7); stroke-dasharray: none; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.node {
  position: absolute; left: var(--x); top: var(--y); transform: translateY(-50%);
  width: 17.5%;
  display: flex; align-items: center; gap: .65rem; padding: .75rem .85rem;
  border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border-strong);
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease), opacity .4s var(--ease);
}
.node__icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: rgba(148, 163, 255, .1); color: var(--text-soft); font-size: .9rem; transition: background-color .4s, color .4s; }
.node__type { margin: 0; font-family: var(--font-mono); font-size: .625rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); }
.node__name { margin: 0; font-size: .8125rem; font-weight: 600; line-height: 1.3; }
.node.is-active { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .14), 0 0 40px -6px rgba(34, 211, 238, .6); transform: translateY(-50%) scale(1.04); }
.node.is-active .node__icon { background: rgba(34, 211, 238, .2); color: var(--cyan); }
.node.is-done { border-color: rgba(139, 92, 246, .55); }
.node.is-done .node__icon { background: rgba(139, 92, 246, .25); color: #fff; }
.node.is-skipped { opacity: .4; }
.node--ai .node__icon { color: var(--violet-soft); }

.log { border-left: 1px solid var(--border); padding: 1.5rem; background: rgba(5, 6, 11, .35); }
.log__list { display: grid; gap: .6rem; max-height: 340px; overflow-y: auto; font-family: var(--font-mono); font-size: .75rem; }
.log__list li { display: flex; gap: .6rem; color: var(--text-soft); animation: logIn .35s var(--ease); }
.log__list time { color: var(--text-dim); flex: none; }
.log__list .ok { color: var(--green); }
.log__list .ai { color: var(--violet-soft); }
.log__empty { color: var(--text-dim) !important; }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Planes ---------- */
.billing { display: inline-flex; gap: .25rem; margin-top: 1.75rem; padding: .3rem; border-radius: 14px; border: 1px solid var(--border-strong); background: rgba(255,255,255,.03); }
.billing__opt { min-height: 42px; padding: .5rem 1.15rem; border: 0; border-radius: 10px; background: transparent; color: var(--text-soft); font-weight: 600; font-size: .9rem; transition: background-color .3s var(--ease), color .3s var(--ease); }
.billing__opt.is-active { background: var(--text); color: var(--bg); }
.billing__save { margin-left: .3rem; padding: .1rem .4rem; border-radius: 6px; font-size: .72rem; background: rgba(52, 211, 153, .18); color: var(--green); }
.billing__opt.is-active .billing__save { background: rgba(5, 150, 105, .15); color: #047857; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: clamp(1.75rem, 3vw, 2.25rem); }
.plan--featured { border-color: rgba(139, 92, 246, .55); background: linear-gradient(170deg, rgba(139, 92, 246, .2), rgba(17, 22, 44, .75) 55%); box-shadow: 0 30px 90px -40px rgba(139, 92, 246, .8); }
.plan__badge { position: absolute; top: 1.25rem; right: 1.25rem; padding: .3rem .7rem; border-radius: 999px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; background: var(--gradient); color: #fff; }
.plan__name { font-size: 1.45rem; font-weight: 600; margin-bottom: .5rem; }
.plan__desc { color: var(--text-soft); font-size: .95rem; min-height: 3.2em; }
.plan__price { display: flex; align-items: baseline; gap: .35rem; margin: .5rem 0 1.75rem; }
.plan__currency { font-family: var(--font-mono); font-size: .85rem; color: var(--text-dim); }
.plan__amount { font-family: var(--font-display); font-size: 3.25rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; transition: opacity .2s; }
.plan__amount.is-changing { opacity: 0; }
.plan__amount--text { font-size: 2.5rem; }
.plan__period { color: var(--text-dim); font-size: .95rem; }
.plan__list { display: grid; gap: .8rem; margin-bottom: 2rem; flex: 1; }
.plan__list li { position: relative; padding-left: 1.75rem; color: var(--text-soft); font-size: .95rem; }
.plan__list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%; background: rgba(52, 211, 153, .15) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334D399' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4L18 8'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
.faq__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
.faq__intro .section-lead { margin: 0; }
.faq__list { display: grid; gap: .75rem; }
.faq__item { border-radius: 16px; border: 1px solid var(--border); background: rgba(255,255,255,.02); transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.faq__item[open] { border-color: rgba(139, 92, 246, .4); background: rgba(139, 92, 246, .06); }
.faq__item summary { position: relative; display: flex; align-items: center; min-height: 64px; padding: 1.1rem 3.5rem 1.1rem 1.4rem; font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; cursor: pointer; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: ""; position: absolute; right: 1.4rem; width: 12px; height: 12px; border-right: 2px solid var(--text-soft); border-bottom: 2px solid var(--text-soft); transform: rotate(45deg) translateY(-4px); transition: transform .3s var(--ease); }
.faq__item[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); border-color: var(--cyan); }
.faq__item p { padding: 0 1.4rem 1.3rem; margin: 0; color: var(--text-soft); animation: logIn .35s var(--ease); }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 4rem); padding: clamp(2rem, 5vw, 4rem); background: linear-gradient(150deg, rgba(139, 92, 246, .14), rgba(10, 16, 36, .75) 45%, rgba(34, 211, 238, .07)); border-color: var(--border-strong); }
.contact .section-lead { margin-inline: 0; }
.contact__points { display: grid; gap: .9rem; margin-top: 2rem; }
.contact__points li { display: flex; gap: .7rem; align-items: center; color: var(--text); }
.contact__points svg { width: 20px; height: 20px; color: var(--green); flex: none; }
.contact__form { padding: clamp(1.5rem, 3vw, 2rem); border-radius: var(--radius); background: rgba(5, 6, 11, .55); border: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.1rem; }
.field label { font-size: .875rem; font-weight: 500; color: var(--text); }
.optional { color: var(--text-dim); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .8rem 1rem; font: inherit; font-size: 1rem; color: var(--text);
  background: rgba(255,255,255,.04); border: 1px solid var(--border-strong); border-radius: 12px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A3ABCC' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; background-size: 18px; padding-right: 2.75rem; }
.field select option { background: var(--surface-solid); color: var(--text); }
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--violet-soft); box-shadow: 0 0 0 4px rgba(139, 92, 246, .2); background-color: rgba(255,255,255,.06); }
.field.has-error input, .field.has-error select { border-color: #F87171; }
.field.is-valid input, .field.is-valid select { border-color: rgba(52, 211, 153, .5); }
.field__error { min-height: 1.1em; font-size: .8125rem; color: #FCA5A5; }
.plan-chip { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.25rem; padding: .35rem .5rem .35rem .9rem; border-radius: 999px; font-size: .875rem; color: var(--text-soft); background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .4); }
.plan-chip b { color: var(--text); }
.plan-chip button { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); font-size: 1.1rem; line-height: 1; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-status { min-height: 1.4em; margin: .9rem 0 0; font-size: .875rem; text-align: center; color: var(--text-soft); }
.form-status.is-error { color: #FCA5A5; }
.form-success { text-align: center; padding: 2.5rem 1rem; }
.form-success__icon { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 1.25rem; border-radius: 50%; background: var(--gradient); color: #fff; box-shadow: 0 0 50px -6px rgba(139, 92, 246, .8); }
.form-success__icon svg { width: 32px; height: 32px; stroke-width: 2.5; }
.form-success h3 { font-size: 1.75rem; margin-bottom: .6rem; }
.form-success p { color: var(--text-soft); margin-bottom: 1.75rem; }

/* ---------- Pie ---------- */
.footer { border-top: 1px solid var(--border); padding: 3.5rem 0; background: rgba(5, 6, 11, .8); }
.footer__inner { display: grid; justify-items: center; gap: 1.25rem; text-align: center; }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.75rem; }
.footer__nav a { color: var(--text-soft); text-decoration: none; font-size: .9375rem; padding: .25rem 0; }
.footer__nav a:hover { color: var(--text); }
.footer__note { max-width: 620px; margin: 0; font-size: .875rem; color: var(--text-dim); }
.footer__credits { margin: 0; font-size: .875rem; color: var(--text-dim); }

/* ---------- Aparición al hacer scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: minmax(0, 1fr); }
  .hero__copy { text-align: center; }
  .hero__sub { margin-inline: auto; }
  .hero__actions, .hero__chips { justify-content: center; }
  .console { max-width: 640px; margin-inline: auto; width: 100%; }
  .hero__note { text-align: center; }
  .demo__body { grid-template-columns: 1fr; }
  .log { border-left: 0; border-top: 1px solid var(--border); }
  .log__list { max-height: 220px; }
}

@media (max-width: 900px) {
  :root { --header-h: 66px; }
  .header { background: rgba(5, 6, 11, .85); backdrop-filter: blur(14px); border-color: var(--border); }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch; gap: 1.25rem;
    padding: 1.5rem 1.5rem 2rem; background: rgba(5, 6, 11, .97); border-bottom: 1px solid var(--border);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { display: block; padding: 1rem 0; font-size: 1.125rem; border-bottom: 1px solid var(--border); }
  .nav__link.is-current::after { display: none; }
  .nav__cta { min-height: 50px; }

  .compare { grid-template-columns: 1fr; }
  .compare__arrow { transform: rotate(90deg); justify-self: center; }
  .services, .plans { grid-template-columns: 1fr; }
  .plans { max-width: 520px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps::before, .steps::after { left: 33px; right: auto; top: 34px; bottom: 34px; width: 2px; height: auto; }
  .steps::after { height: calc((100% - 68px) * var(--progress, 0)); bottom: auto; }
  .step { display: grid; grid-template-columns: 68px 1fr; column-gap: 1.25rem; text-align: left; padding: 0; }
  .step__num { grid-row: span 2; margin: 0; }
  .step p { margin: 0; max-width: none; }
  .faq { grid-template-columns: 1fr; }
  .faq__intro { position: static; text-align: center; }
  .contact { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .container { width: min(1200px, 100% - 2.25rem); }
  .console__float { display: none; }
  .hero__actions .btn { flex: 1 1 100%; white-space: normal; }
  .hero__title { font-size: clamp(2.4rem, 11vw, 3rem); }
  .form-grid { grid-template-columns: 1fr; }
  /* El flujo pasa a ser vertical */
  .flow { min-height: 0; margin: 1.25rem; padding: .5rem 0; display: grid; gap: 1.1rem; background-size: 18px 18px; }
  .flow__lines { display: none; }
  .node { position: relative; left: auto; top: auto; transform: none; width: 100%; max-width: none; }
  .node.is-active { transform: scale(1.02); }
  .node:not(:last-child)::after { content: ""; position: absolute; left: 31px; bottom: -1.15rem; width: 2px; height: 1.1rem; background: var(--border-strong); }
  .node[data-node="3"]::after { display: none; }
  .demo__toolbar { padding: 1.1rem 1.25rem; }
  .demo__controls { width: 100%; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .chart__line { stroke-dashoffset: 0; }
  .chart__area { opacity: 1; }
}
.plan-chip[hidden] { display: none; }
