/* ==========================================================================
   SoftSolutions v3 — oscuro, tech, matriz de puntos.
   Paleta (investigación de color): neutros con tinte leve hacia el violeta,
   elevación por luminosidad + filete de 1px. Violeta = acento (~5 %).
   Cian = señal "en vivo". Ámbar = un punto por composición.
   La secuencia violeta→cian existe SOLO en la matriz de puntos, en pasos discretos.
   ========================================================================== */
:root {
  --bg: #09090B; --s1: #111114; --s2: #18181C; --s3: #222228;
  --b0: #1C1C22; --b1: #2A2A32; --b2: #34343E;
  --t1: #FAFAFA; --t2: #C4C4CC; --t3: #8E8E99; --t4: #62626C;
  --v300: #C4B5FD; --v400: #A78BFA; --v500: #8B5CF6; --v600: #6D3FE0;
  --c400: #22D3EE; --c500: #06B6D4;
  --a400: #FBBF24; --a500: #F59E0B;
  --ok: #34D399;

  --f-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --f-word: "DM Serif Display", Georgia, serif;

  /* Movimiento: entradas expo-out, salidas más cortas (Carbon / Material) */
  --e-out: cubic-bezier(0.16, 1, 0.3, 1);
  --e-io: cubic-bezier(0.77, 0, 0.175, 1);
  --d-micro: 120ms; --d-small: 200ms; --d-med: 320ms;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1360px;
  --r: 12px; --r-lg: 18px;
  --sec: clamp(96px, 12vw, 168px);
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; color-scheme: dark; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  background: var(--bg); color: var(--t1); font-family: var(--f-sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
::selection { background: rgba(139, 92, 246, 0.35); color: var(--t1); }
:focus-visible { outline: 2px solid var(--v400); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--t1); color: var(--bg); padding: 10px 14px; border-radius: 8px; font-size: 14px; transition: top .2s; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.cap { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t3); }
h1, h2, h3 { font-family: var(--f-sans); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; text-wrap: balance; }
.grain::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- Botones y chips ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 999px; font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: transform var(--d-small) var(--e-out), background-color var(--d-small), border-color var(--d-small), color var(--d-small), box-shadow var(--d-small); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--t1); color: var(--bg); }
.btn-primary:hover { background: #fff; box-shadow: 0 0 0 4px rgba(250, 250, 250, 0.08); }
.btn-ghost { border: 1px solid var(--b1); color: var(--t1); }
.btn-ghost:hover { border-color: var(--b2); background: var(--s2); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15.5px; }
.btn svg { width: 16px; height: 16px; transition: transform var(--d-small) var(--e-out); }
.btn:hover svg { transform: translateX(3px); }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--b1); background: var(--s1); font-family: var(--f-mono); font-size: 12px; color: var(--t2); }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--c400); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .55); } 70% { box-shadow: 0 0 0 7px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; height: 64px; display: flex; align-items: center; transition: background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(9, 9, 11, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--b0); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand svg { width: 24px; height: 21px; }
.brand span { font-family: var(--f-word); font-size: 21px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--t2); }
.nav-links a { position: relative; transition: color var(--d-small); }
.nav-links a:hover, .nav-links a.is-active { color: var(--t1); }
.nav-links a.is-active::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 4px; height: 4px; border-radius: 50%; background: var(--v400); transform: translateX(-50%); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--b1); position: relative; }
.menu-btn i { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .35s var(--e-out); }
.menu-btn i:first-of-type { top: 15px; } .menu-btn i:last-of-type { top: 21px; }
.menu-btn[aria-expanded="true"] i:first-of-type { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i:last-of-type { transform: translateY(-3px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 45; background: rgba(9,9,11,.97); backdrop-filter: blur(10px); padding: 96px var(--gutter) 32px; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; pointer-events: none; transition: opacity .35s; }
.menu.is-open { opacity: 1; pointer-events: auto; }
.menu nav a { display: flex; align-items: baseline; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--b0); font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; letter-spacing: -0.03em; transform: translateY(16px); opacity: 0; transition: transform .5s var(--e-out), opacity .4s; }
.menu nav a span { font-family: var(--f-mono); font-size: 12px; color: var(--t4); font-weight: 400; letter-spacing: 0; }
.menu.is-open nav a { transform: none; opacity: 1; }
.menu.is-open nav a:nth-child(2) { transition-delay: .04s; } .menu.is-open nav a:nth-child(3) { transition-delay: .08s; }
.menu.is-open nav a:nth-child(4) { transition-delay: .12s; } .menu.is-open nav a:nth-child(5) { transition-delay: .16s; }
.menu-foot { color: var(--t3); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 900px) { .nav-links { display: none; } .menu-btn { display: block; } }
@media (max-width: 400px) { .nav-right .btn-sm { display: none; } }

/* ---------- Encabezados de sección ---------- */
.sec { padding: var(--sec) 0; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--v400); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 48px; flex-wrap: wrap; }
.sec-head h2, .h2 { font-size: clamp(2.2rem, 1.2rem + 3vw, 4rem); max-width: 13em; }
.sec-head p { color: var(--t2); max-width: 30em; }
.lede { color: var(--t2); font-size: clamp(1.02rem, 1rem + .25vw, 1.15rem); max-width: 34em; }
[data-split] .sl-mask { padding-bottom: .1em; margin-bottom: -.1em; }

/* ---------- HERO (prototipo A aprobado) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; overflow: clip; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 22% 55%, rgba(9,9,11,.85), transparent 70%), linear-gradient(0deg, var(--bg), transparent 22%); }
.hero-inner { position: relative; z-index: 2; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding-top: 64px; }
.copy { max-width: 640px; }
.copy .chip { margin-bottom: 28px; }
.hero h1 { font-size: var(--h1, clamp(2.5rem, 1rem + 4.4vw, 5.4rem)); line-height: 1.04; }
.hero h1 .ln { display: block; overflow: clip; padding-bottom: .08em; margin-bottom: -.08em; }
.hero h1 .in { display: block; }
.hero h1 .rot { color: var(--v300); white-space: nowrap; }
.hero h1 .rot .ch { display: inline-block; will-change: transform, opacity, filter; }
.js-anim .hero h1 .in { transform: translateY(110%); }
.rot-bar { display: flex; gap: 6px; margin-top: 18px; }
.rot-bar i { width: 5px; height: 5px; border-radius: 50%; opacity: .14; transform: scale(.7); }
.sub { margin-top: 24px; font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); color: var(--t2); max-width: 32em; }
.ctas { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }
.shape-slot { justify-self: end; width: 100%; max-width: 560px; aspect-ratio: 7 / 6; position: relative; }
.fig-cap { position: absolute; left: 0; right: 0; bottom: -38px; display: flex; justify-content: space-between; }
.fig-cap b { color: var(--t1); font-weight: 500; text-transform: none; letter-spacing: 0; }
.strip { position: relative; z-index: 2; border-top: 1px solid var(--b0); }
.strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip .cell { padding: 16px 0; display: flex; flex-direction: column; gap: 4px; }
.strip .cell + .cell { padding-left: 20px; border-left: 1px solid var(--b0); }
.strip .v { font-family: var(--f-mono); font-size: 14px; color: var(--t1); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; align-content: start; padding-top: 96px; }
  .shape-slot { order: -1; justify-self: start; max-width: 300px; margin-bottom: 64px; }
  .strip .wrap { grid-template-columns: 1fr 1fr; }
  .strip .cell:nth-child(3) { padding-left: 0; border-left: 0; }
  .strip .cell:nth-child(n+3) { border-top: 1px solid var(--b0); }
}

/* ---------- PRODUCTOS (prototipo A aprobado) ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; --ty: 0px; position: relative; border-radius: var(--r-lg); background: var(--s1); border: 1px solid var(--b1); overflow: hidden; isolation: isolate;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--ty));
  transition: border-color var(--d-med), transform .5s var(--e-out); }
.card.is-tilting { transition: border-color var(--d-med), transform .12s linear; }
.card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1; opacity: 0; transition: opacity var(--d-med);
  background: radial-gradient(320px circle at var(--mx) var(--my), rgba(167,139,250,.16), transparent 60%); }
.card:hover { border-color: var(--b2); --ty: -4px; }
.card:hover::before { opacity: 1; }
.card .shot { aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--b0); background: var(--s2); position: relative; }
.card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--e-out), filter .6s; filter: saturate(.9) brightness(.92); }
.card:hover .shot img { transform: scale(1.04); filter: none; }
.card .shot::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1.3px); background-size: 10px 10px;
  mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 55%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 55%, transparent 100%);
  mask-size: 300% 100%; -webkit-mask-size: 300% 100%; mask-position: 120% 0; -webkit-mask-position: 120% 0; mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat; opacity: 0; transition: opacity .2s; }
.card:hover .shot::after { opacity: .5; animation: sweep .9s var(--e-out) forwards; }
@keyframes sweep { to { mask-position: -20% 0; -webkit-mask-position: -20% 0; opacity: 0; } }
.card.resolving .shot img {
  -webkit-mask-image: radial-gradient(circle, #000 var(--dot, 0px), transparent calc(var(--dot, 0px) + .7px));
  mask-image: radial-gradient(circle, #000 var(--dot, 0px), transparent calc(var(--dot, 0px) + .7px));
  -webkit-mask-size: 9px 9px; mask-size: 9px 9px; }
.card .scan { position: absolute; left: 0; right: 0; top: 0; height: 2px; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(34,211,238,.95), transparent); box-shadow: 0 0 18px rgba(34,211,238,.65); }
.js-anim .card:not(.is-in) { opacity: 0; }
.card .body { padding: 18px 18px 16px; }
.card h3 { font-size: 22px; letter-spacing: -0.025em; margin: 8px 0 6px; }
.card p { color: var(--t3); font-size: 14.5px; }
.card .foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: 12px; color: var(--t3); }
.st { display: inline-flex; align-items: center; gap: 7px; }
.st i { width: 6px; height: 6px; border-radius: 50%; background: var(--t4); }
.st.up i { background: var(--ok); box-shadow: 0 0 8px rgba(52,211,153,.6); }
.spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; margin-left: auto; margin-right: 12px; }
.spark i { width: 3px; height: 2px; border-radius: 1px; background: var(--b2); transition: height .5s var(--e-out), background-color .3s; }
.spark i.ok { background: rgba(52,211,153,.75); }
.spark i.slow { background: var(--a500); }
.spark i.down { background: #F87171; height: 14px; }
.card .arrow { transition: transform var(--d-small) var(--e-out); }
.card:hover .arrow { transform: translate(2px, -2px); color: var(--t1); }
.card-cta { display: flex; flex-direction: column; justify-content: space-between; padding: 22px; background: var(--bg); border-style: dashed; }
.card-cta h3 { font-size: 28px; }
.card-cta .cap i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--a500); margin-right: 8px; vertical-align: 1px; animation: pulseA 1.8s infinite; }
@keyframes pulseA { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,.6); } 60% { box-shadow: 0 0 0 7px rgba(245,158,11,0); } }
@media (max-width: 1000px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

/* ---------- SERVICIOS: historia de scroll con la matriz ---------- */
.story { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); }
.story-stage { position: sticky; top: 64px; height: calc(100svh - 64px); display: flex; flex-direction: column; justify-content: center; }
.story-fig { position: relative; aspect-ratio: 1 / 1; max-height: 70vh; width: 100%; border: 1px solid var(--b1); border-radius: var(--r-lg); background: radial-gradient(80% 80% at 50% 40%, rgba(139,92,246,.06), transparent 70%), var(--s1); overflow: hidden; }
.story-fig canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.story-fig .fig-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--b0); z-index: 1; background: rgba(17,17,20,.7); }
.story-fig .fig-top b { color: var(--t1); font-weight: 500; text-transform: none; letter-spacing: 0; }
.story-steps { padding: 18vh 0 22vh; }
.svc { min-height: 64vh; display: flex; flex-direction: column; justify-content: center; opacity: .28; transition: opacity .5s var(--e-out); }
.svc.is-active { opacity: 1; }
.svc .num { font-family: var(--f-mono); font-size: 12px; color: var(--t3); }
.svc h3 { font-size: clamp(1.9rem, 1.2rem + 2vw, 3rem); margin: 12px 0 14px; }
.svc p { color: var(--t2); max-width: 30em; }
.svc ul { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.svc li { font-size: 13px; color: var(--t2); border: 1px solid var(--b1); border-radius: 999px; padding: 5px 12px; background: var(--s1); }
.svc .proof { margin-top: 18px; font-size: 13px; color: var(--t3); }
.svc .proof b { color: var(--t1); font-weight: 500; }
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; gap: 0; }
  .story-stage { top: 64px; height: auto; padding: 12px 0; z-index: 2; background: linear-gradient(var(--bg) 85%, transparent); }
  .story-fig { aspect-ratio: 16 / 10; max-height: 34vh; }
  .story-steps { padding: 6vh 0 10vh; }
  .svc { min-height: 56vh; }
}

/* ---------- IA ---------- */
.ai-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.ai-copy .lede { margin-top: 22px; }
.prompts { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.prompt { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--b1); background: var(--s1); font-size: 14px; color: var(--t2); transition: border-color var(--d-small), background-color var(--d-small), color var(--d-small), transform var(--d-small) var(--e-out); }
.prompt:hover { border-color: var(--b2); color: var(--t1); }
.prompt:active { transform: scale(.97); }
.prompt.is-on { background: var(--t1); color: var(--bg); border-color: var(--t1); }
.ai-note { margin-top: 16px; }
.demo { position: relative; min-height: 600px; }
.chat { position: absolute; left: 0; top: 0; width: min(400px, 51%); height: 580px; border-radius: 26px; overflow: hidden; background: #0E1013; border: 1px solid var(--b1); box-shadow: 0 40px 100px -40px rgba(0,0,0,.9); display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--s2); border-bottom: 1px solid var(--b0); }
.chat-head b { display: block; font-size: 15px; font-weight: 600; }
.chat-head .cap { text-transform: none; letter-spacing: 0; font-size: 11.5px; }
.chat-av { width: 38px; height: 38px; border-radius: 50%; background: var(--bg); border: 1px solid var(--b1); display: grid; place-items: center; }
.chat-av svg { width: 22px; height: 19px; }
.chat-body { flex: 1; padding: 18px 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden;
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.2px); background-size: 16px 16px; }
.msg { max-width: 84%; padding: 9px 12px 18px; border-radius: 14px; font-size: 14.5px; line-height: 1.42; position: relative; animation: msgIn .45s var(--e-out) both; }
.msg time { position: absolute; right: 10px; bottom: 4px; font: 10px/1 var(--f-mono); opacity: .5; }
.msg-user { align-self: flex-end; background: #144D37; color: #E9FFF4; border-bottom-right-radius: 4px; }
.msg-bot { align-self: flex-start; background: var(--s3); color: var(--t1); border-bottom-left-radius: 4px; }
.msg-bot b { color: var(--c400); font-weight: 600; }
.msg-file { display: flex; gap: 10px; align-items: center; padding-bottom: 9px; }
.msg-file .pdf { width: 32px; height: 40px; border-radius: 6px; background: #E5484D; color: #fff; font: 600 9px/40px var(--f-mono); text-align: center; flex: none; }
.typing { align-self: flex-start; background: var(--s3); border-radius: 14px; padding: 12px 14px; display: flex; gap: 4px; animation: msgIn .3s var(--e-out) both; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--t3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.trace { position: absolute; right: 0; top: 110px; width: min(420px, 47%); min-height: 290px; border-radius: 18px; background: var(--bg); border: 1px solid var(--b1); box-shadow: 0 40px 100px -40px rgba(0,0,0,.9); overflow: hidden; }
.trace-head { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--b0); }
.trace-head .cap:last-child { color: var(--a500); font-variant-numeric: tabular-nums; }
.trace ol { list-style: none; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.45; color: var(--t3); }
.trace li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; animation: msgIn .35s var(--e-out) both; }
.trace .k { color: var(--t1); } .trace .s { color: var(--ok); } .trace .a { color: var(--a500); } .trace .c { color: var(--c400); }
.trace .ms { color: var(--t4); font-variant-numeric: tabular-nums; }
.spin { display: inline-block; width: 10px; height: 10px; border: 1.5px solid var(--t4); border-top-color: var(--v400); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1000px) {
  .ai-grid { grid-template-columns: 1fr; }
  .demo { min-height: 0; display: flex; flex-direction: column; gap: 12px; }
  .chat, .trace { position: relative; width: 100%; top: auto; }
  .chat { height: 470px; }
  .trace { min-height: 0; }
}

/* ---------- PROCESO ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.steps-line { position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: var(--b1); }
.steps-fill { position: absolute; inset: 0; background: var(--v500); transform: scaleX(0); transform-origin: 0 50%; }
.step { position: relative; padding: 0 8px 0 0; }
.step-node { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--s1); border: 1px solid var(--b1); font-family: var(--f-mono); font-size: 12px; color: var(--t3); margin-bottom: 26px; transition: border-color .4s, color .4s, background-color .4s, box-shadow .4s; }
.step.is-on .step-node { border-color: var(--v500); color: var(--t1); background: var(--s2); box-shadow: 0 0 0 5px rgba(139,92,246,.08); }
.step:last-child.is-on .step-node { border-color: var(--a500); box-shadow: 0 0 0 5px rgba(245,158,11,.08); }
.step h3 { font-size: 22px; margin-bottom: 10px; }
.step p { color: var(--t3); font-size: 15px; max-width: 22em; }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; gap: 36px; padding-left: 64px; }
  .steps-line { left: 23px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps-fill { transform: scaleY(0); transform-origin: 50% 0; }
  .step-node { position: absolute; left: -64px; top: -4px; margin: 0; }
}

/* ---------- POR QUÉ + HERRAMIENTAS ---------- */
.why { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.why li { padding: 22px; border: 1px solid var(--b1); border-radius: var(--r-lg); background: var(--s1); position: relative; overflow: hidden; }
.why li::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); }
.why .k { font-family: var(--f-mono); font-size: 12px; color: var(--v400); }
.why h3 { font-size: 20px; margin: 14px 0 10px; letter-spacing: -0.02em; }
.why p { color: var(--t3); font-size: 14.5px; }
.tools { margin-top: 72px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.tools table { width: 100%; border-collapse: collapse; }
.tools tr { border-top: 1px solid var(--b0); transition: background-color var(--d-small); }
.tools tr:last-child { border-bottom: 1px solid var(--b0); }
.tools tr:hover { background: var(--s1); }
.tools th, .tools td { text-align: left; padding: 15px 10px; font-weight: 400; vertical-align: baseline; }
.tools th { width: 24%; }
.tools td:nth-child(2) { color: var(--t1); }
.tools td:nth-child(3) { color: var(--t3); font-family: var(--f-mono); font-size: 12.5px; text-align: right; }
@media (max-width: 1000px) { .why { grid-template-columns: 1fr 1fr; } .tools { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .why { grid-template-columns: 1fr; } .tools td:nth-child(3) { display: none; } }

/* ---------- CONTACTO ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact h2 { font-size: clamp(2.6rem, 1.2rem + 4vw, 5.2rem); }
.contact .lede { margin-top: 22px; }
.direct { margin-top: 32px; display: flex; flex-direction: column; gap: 6px; }
.direct a { font-size: 18px; border-bottom: 1px solid var(--b1); align-self: flex-start; padding-bottom: 3px; transition: border-color var(--d-small); }
.direct a:hover { border-color: var(--t1); }
.direct span { color: var(--t3); font-size: 14px; }
.brief { border: 1px solid var(--b1); border-radius: var(--r-lg); background: var(--s1); padding: clamp(20px, 3vw, 32px); display: flex; flex-direction: column; gap: 24px; }
.brief fieldset { border: 0; padding: 0; min-width: 0; }
.brief legend { margin-bottom: 10px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--b1); font-size: 14px; color: var(--t2); cursor: pointer; transition: border-color var(--d-small), background-color var(--d-small), color var(--d-small); user-select: none; }
.opt:hover { border-color: var(--b2); color: var(--t1); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) { background: var(--t1); border-color: var(--t1); color: var(--bg); }
.opt:has(input:focus-visible) { outline: 2px solid var(--v400); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field input { height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--b1); background: var(--bg); transition: border-color var(--d-small); }
.field input::placeholder { color: var(--t4); }
.field input:focus { outline: none; border-color: var(--v500); }
.bubble { align-self: flex-start; max-width: 100%; background: #144D37; color: #E9FFF4; padding: 12px 14px 22px; border-radius: 14px 14px 14px 4px; font-size: 14.5px; line-height: 1.45; position: relative; }
.bubble::after { content: "ahora ✓✓"; position: absolute; right: 10px; bottom: 5px; font: 10px/1 var(--f-mono); opacity: .55; }
.bubble.flash { animation: flash .45s var(--e-out); }
@keyframes flash { from { transform: scale(.985); } to { transform: none; } }
.brief-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 1000px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .fields { grid-template-columns: 1fr; } .brief-actions .btn { width: 100%; justify-content: center; } }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--b0); padding-top: 72px; overflow: clip; }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer-cols .cap { margin-bottom: 16px; display: block; }
.footer-cols ul { display: flex; flex-direction: column; gap: 8px; color: var(--t2); font-size: 14.5px; }
.footer-cols a:hover { color: var(--t1); }
.footer-status p { display: flex; align-items: center; gap: 8px; font-family: var(--f-mono); font-size: 12.5px; color: var(--t2); margin-bottom: 8px; }
.led { position: relative; height: clamp(150px, 22vw, 320px); margin-top: 56px; }
.led canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 20px 0 28px; border-top: 1px solid var(--b0); font-family: var(--f-mono); font-size: 12px; color: var(--t3); }
.footer-bottom a:hover { color: var(--t1); }
@media (max-width: 800px) { .footer-cols { grid-template-columns: 1fr 1fr; } .footer-status { grid-column: 1 / -1; } }

/* ---------- Revelados ---------- */
.js-anim [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
  html:not(.force-motion) *, html:not(.force-motion) *::before, html:not(.force-motion) *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
