/* Khimea Solutions — fuente de verdad visual: design-system/khimea-solutions/MASTER.md */

:root {
  /* Tinta y papel */
  --ink: #0e1a24;
  --ink-2: #16242f;
  --ink-3: #1f3140;
  --paper: #ebe2cf;          /* crema con cuerpo (antes #f5f1ea, se leía casi blanco) */
  --paper-2: #e8dcc4;
  --card: #f7f1e4;           /* tarjetas y formulario: un escalón más claro que el papel */
  --text: #14181f;
  --muted: #57534e;          /* 6.78:1 sobre paper */
  --line: rgba(14, 26, 36, 0.14);
  --on-ink: #f5f1ea;
  --on-ink-muted: #a9b4bc;   /* 8.34:1 sobre ink */
  --line-ink: rgba(245, 241, 234, 0.14);

  /* Marca: el teal es la cabra y el dragón; el fuego es el león (herencia Khimea Games) */
  --brand: #14b8a6;          /* grafismo y texto sobre ink */
  --brand-strong: #0b6e66;   /* texto y CTA sobre papel: 5.43:1 */
  --brand-deep: #08524c;     /* hover del CTA */
  --ember: #c9492a;
  --amber: #f2a64a;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --radius: 2px;             /* editorial: todo afilado */
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--brand); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--on-ink);
  padding: 12px 16px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Columna única en mobile sin "grid blowout": las imágenes con width="800" no pueden ensanchar la página */
.hero-grid, .chimera-grid, .section-head, .products, .contact-grid, .footer-grid, .bm-hero, .bm-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* ---------- Tipografía ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-strong);
  margin: 0 0 20px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.on-ink .eyebrow { color: var(--brand); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.02em;
  margin: 0;
}
h1 { font-size: clamp(3rem, 7.4vw, 6.4rem); line-height: 0.92; }
h2 { font-size: clamp(2.25rem, 5vw, 4.25rem); line-height: 0.98; }
h3 { font-size: 1.5rem; line-height: 1.15; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--brand-strong); }
.on-ink h2 em { color: var(--brand); }

.lead { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.6; max-width: 38rem; color: var(--muted); }
.on-ink .lead { color: var(--on-ink-muted); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font: 500 1rem/1 var(--font-body);
  text-decoration: none; border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; touch-action: manipulation;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 150ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; transition: transform 200ms var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--brand-strong); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.on-ink .btn-primary { background: var(--brand); color: var(--ink); }
.on-ink .btn-primary:hover { background: #2dd4bf; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 500; text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.link-arrow:hover { color: var(--brand-strong); border-color: var(--brand-strong); }
.link-arrow svg { width: 16px; height: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(245, 241, 234, 0.94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(245, 241, 234, 0.82); backdrop-filter: blur(10px); }
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }

.brand-lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand-lockup img { width: 40px; height: 40px; }
.brand-lockup .word { font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1; }
.brand-lockup .sub { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.32em; color: var(--brand-strong); margin-top: 4px; }
.on-ink .brand-lockup .sub { color: var(--brand); }

.nav { display: none; }
.nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  text-decoration: none; font-size: 0.95rem; color: var(--muted);
  transition: color 200ms var(--ease);
}
.nav a:hover { color: var(--text); }
.header-cta { display: none; }

.menu { position: relative; }
.menu summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] summary { background: var(--ink); color: var(--on-ink); }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(86vw, 320px);
  background: var(--paper); border: 1px solid var(--line); padding: 8px;
  box-shadow: 0 24px 48px -24px rgba(14, 26, 36, 0.35);
}
.menu-panel a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; text-decoration: none; }
.menu-panel a:hover { background: var(--paper-2); }
.menu-panel .btn { width: 100%; margin-top: 8px; }

@media (min-width: 1024px) {
  .nav, .header-cta { display: block; }
  .header-cta { display: inline-flex; min-height: 44px; }
  .menu { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(28px, 3.6vw, 56px) clamp(48px, 6vw, 88px); overflow: hidden; }
.hero-grid { display: grid; gap: 56px; }
.hero h1 { max-width: 11ch; }
.hero .lead { margin: 32px 0 40px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hero-meta {
  margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); letter-spacing: 0.04em;
}
.hero-meta span::before { content: "✓ "; color: var(--brand-strong); }

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: repeat(12, 1fr); align-items: center; }
  .hero-copy { grid-column: 1 / span 7; }
  .hero-visual { grid-column: 8 / span 6; margin-right: calc(var(--gutter) * -1); }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(48px, 5.5vw, 80px); }
.on-ink { background: var(--ink); color: var(--on-ink); }
.section-head { display: grid; gap: 24px; margin-bottom: clamp(32px, 4vw, 56px); }
@media (min-width: 1024px) {
  .section-head { grid-template-columns: 7fr 5fr; align-items: end; align-items: last baseline; gap: 64px; }
}
.section-head .lead { margin: 0; }   /* sin el margen de <p>: si no, el párrafo queda levantado respecto del título */

/* Del barro a producción: el eslogan contado como un log de test */
.trench { padding-top: 0; }
.trench-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.trench h2 { font-size: clamp(2.75rem, 6.4vw, 5.5rem); line-height: 0.95; }
.trench-log {
  margin: 0; background: var(--ink); color: var(--on-ink);
  border: 1px solid var(--ink); box-shadow: 0 40px 80px -48px rgba(14, 26, 36, 0.6);
}
.trench-log figcaption {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--line-ink);
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--on-ink-muted);
}
.trench-log ol { list-style: none; margin: 0; padding: 12px 0; font-family: var(--font-mono); font-size: 0.9rem; line-height: 1.5; }
.trench-log li { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 10px 20px; }
.trench-log .st { font-weight: 500; letter-spacing: 0.06em; }
.trench-log .fail { color: var(--on-ink-muted); }
.trench-log .fail .st { color: #ff8a6b; }   /* 7.63:1 sobre ink */
.trench-log .pass { color: var(--on-ink); background: rgba(20, 184, 166, 0.12); border-top: 1px solid var(--line-ink); margin-top: 8px; padding-block: 16px; }
.trench-log .pass .st { color: var(--brand); }
@media (min-width: 1024px) {
  .trench-grid { grid-template-columns: 6fr 6fr; gap: 80px; align-items: center; }
  .trench-log { margin-top: 96px; }  /* desfase con margen: el transform lo anima GSAP */
}

/* Quimera */
.chimera-grid { display: grid; gap: 48px; }
.chimera-mark { width: 100%; max-width: 360px; margin-inline: auto; }
.chimera-mark svg { width: 100%; }
.chimera-mark svg [data-head] { transition: opacity 250ms var(--ease); }
.chimera-mark.is-focus svg [data-head] { opacity: 0.18; }
.chimera-mark.is-focus svg [data-head].is-on { opacity: 1; }

.heads { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line-ink); }
.head {
  display: grid; grid-template-columns: 56px 1fr; gap: 8px 20px;
  padding: 28px 8px; border-bottom: 1px solid var(--line-ink);
  transition: background-color 250ms var(--ease);
}
.head:hover, .head:focus-within { background: var(--ink-2); }
.head .idx { font-family: var(--font-mono); font-size: 0.8rem; color: var(--on-ink-muted); padding-top: 8px; }
.head h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
.head h3 small { display: block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 10px; }
.head[data-for="cabra"] h3 small { color: var(--brand); }
.head[data-for="leon"] h3 small { color: var(--amber); }
.head[data-for="dragon"] h3 small { color: #2dd4bf; }
.head p { grid-column: 2; margin: 4px 0 0; color: var(--on-ink-muted); max-width: 46ch; }

@media (min-width: 1024px) {
  .chimera-grid { grid-template-columns: 5fr 7fr; align-items: center; gap: 96px; }
  .chimera-mark { max-width: 440px; margin: 0; }
}

/* Soluciones: dos puertas */
/* ---------- Automatización: banda oscura con componentes "vivos" ---------- */
.auto {
  background-image: radial-gradient(rgba(245, 241, 234, 0.07) 1px, transparent 1.4px);
  background-size: 28px 28px;
}
.auto-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.auto-row + .auto-row { margin-top: clamp(48px, 6vw, 80px); }
@media (min-width: 960px) {
  .auto-row { grid-template-columns: 5fr 7fr; }
  .auto-row.is-rev { grid-template-columns: 7fr 5fr; }
  .auto-row.is-rev .auto-copy { order: 2; }
}
.auto-tag { display: inline-flex; gap: 12px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-ink-muted); }
.auto-idx { color: var(--brand); font-variant-numeric: tabular-nums; }
.auto-copy h3 { font-size: clamp(2.5rem, 4.6vw, 4rem); line-height: 0.98; margin: 20px 0 18px; }
.auto-copy h3 em { font-style: italic; font-weight: 400; color: var(--brand); }
.auto-copy p { color: var(--on-ink-muted); max-width: 44ch; margin: 0 0 28px; }
.auto-list { list-style: none; margin: 0 0 36px; padding: 0; border-bottom: 1px solid var(--line-ink); }
.auto-list li { position: relative; padding: 13px 0 13px 22px; border-top: 1px solid var(--line-ink); color: var(--on-ink-muted); }
.auto-list li::before { content: ""; position: absolute; left: 0; top: 1.4em; width: 6px; height: 6px; background: var(--brand); }
.auto-list strong { color: var(--on-ink); font-weight: 600; }
.auto .link-arrow { color: var(--on-ink); border-color: var(--line-ink); }
.auto .link-arrow:hover { color: var(--brand); border-color: var(--brand); }

/* Ventana común: corrida de CI y canvas de n8n */
.pipe, .canvas {
  margin: 0; background: var(--ink-2); border: 1px solid var(--line-ink); border-radius: var(--radius);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.25);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.pipe-bar { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-bottom: 1px solid var(--line-ink); font-size: 0.75rem; color: var(--on-ink-muted); }
.pipe-bar .dots { display: flex; gap: 6px; }
.pipe-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(245, 241, 234, 0.16); }
.pipe-name { color: var(--on-ink); }
.pipe-note, .live { margin-left: auto; }

.pipe-progress { height: 2px; background: var(--line-ink); overflow: hidden; }
.pipe-progress span { display: block; height: 100%; background: var(--brand); transform-origin: 0 50%; transition: transform 0.6s var(--ease); }

.pipe-steps { list-style: none; margin: 0; padding: 6px 0; }
.step-row {
  display: grid; grid-template-columns: 18px minmax(0, 92px) minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 13px 18px; font-size: 0.85rem; transition: opacity 0.25s var(--ease), background-color 0.25s var(--ease);
}
.step-row .job { color: var(--on-ink); }
.step-row .info { color: var(--on-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-row .t { color: var(--on-ink-muted); transition: opacity 0.2s; }
.st { position: relative; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-ink); }
.is-done .st { background: var(--brand); border-color: var(--brand); }
.is-done .st::after {
  content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px;
  border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.is-run { background: rgba(20, 184, 166, 0.07); }
.is-run .st { border-color: var(--brand); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.is-wait { opacity: 0.42; }
.is-wait .t, .is-run .t { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 520px) { .step-row { grid-template-columns: 18px minmax(0, 1fr) auto; } .step-row .info { display: none; } }

.pipe-gate {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
  padding: 16px 18px; border-top: 1px solid var(--line-ink); font-size: 0.85rem;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.gate-label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-ink-muted); }
.gate-result { color: var(--on-ink); transition: opacity 0.3s var(--ease); }
.gate-result b { color: var(--brand); font-weight: 600; letter-spacing: 0.06em; }
.pipe-gate.is-done { background: rgba(20, 184, 166, 0.1); border-top-color: var(--brand); }
.pipe-gate.is-wait .gate-result { opacity: 0.25; }

/* Canvas de n8n */
.canvas { overflow: visible; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--brand); }
.live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--brand); animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3); opacity: 0; } }

.flowmap {
  list-style: none; margin: 0; padding: clamp(24px, 4vw, 48px) clamp(18px, 3vw, 36px);
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center;
  background-image: radial-gradient(rgba(245, 241, 234, 0.1) 1px, transparent 1.4px); background-size: 18px 18px;
}
.fnode {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; align-items: center;
  padding: 10px 12px; background: var(--ink); border: 1px solid var(--line-ink); border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.fnode:hover { border-color: rgba(20, 184, 166, 0.6); transform: translateY(-2px); }
.fnode .ic { grid-row: span 2; width: 32px; height: 32px; display: grid; place-items: center; background: rgba(20, 184, 166, 0.12); color: var(--brand); }
.fnode .ic svg { width: 18px; height: 18px; }
.fn-t { font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; color: var(--on-ink); }
.fn-s { font-size: 0.72rem; color: var(--on-ink-muted); }
.fnode.is-core { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12), 0 0 36px -8px rgba(20, 184, 166, 0.45); }
.fnode.is-core .ic { background: var(--brand); color: var(--ink); }

/* Cables con paquetes de datos viajando (solo transform) */
.wire { position: relative; justify-self: center; width: 2px; height: 30px; background: rgba(20, 184, 166, 0.3); overflow: hidden; }
.wire span { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0 35%, #5eead4 50%, transparent 65% 100%); transform: translateY(-100%); animation: packet-y 1.8s linear infinite; }
.wire + .fnode + .wire span { animation-delay: 0.9s; }
@keyframes packet-y { to { transform: translateY(100%); } }
@keyframes packet-x { to { transform: translateX(100%); } }

.fan ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

@media (min-width: 640px) {
  .flowmap { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr); padding-inline: 24px; }
  .wire { justify-self: stretch; width: auto; height: 2px; }
  .wire span { background: linear-gradient(90deg, transparent 0 35%, #5eead4 50%, transparent 65% 100%); transform: translateX(-100%); animation-name: packet-x; }
  .fan ol { position: relative; padding-left: 18px; }
  .fan ol::before { content: ""; position: absolute; left: 0; top: 28px; bottom: 28px; width: 2px; background: rgba(20, 184, 166, 0.3); }
  .fan .fnode { position: relative; }
  .fan .fnode::before { content: ""; position: absolute; left: -19px; top: 50%; width: 18px; height: 2px; background: rgba(20, 184, 166, 0.3); }
}

@media (prefers-reduced-motion: reduce) {
  .wire span { display: none; }
  .live i::after, .is-run .st { animation: none; }
}

/* Productos */
.products { display: grid; gap: 24px; }
.product {
  background: var(--card); border: 1px solid var(--line);
  display: grid; transition: border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}
.product:hover { border-color: rgba(11, 110, 102, 0.45); box-shadow: 0 30px 60px -40px rgba(14, 26, 36, 0.4); }
.product .shot { border-bottom: 1px solid var(--line); aspect-ratio: 10 / 7; overflow: hidden; background: var(--card); }
.product .shot img { width: 100%; height: 100%; object-fit: cover; }
.product .body { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.product h3 { font-size: 1.75rem; }
.product .body p { margin: 0; color: var(--muted); }
.product .body ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 0.95rem; }
.product .body li { padding-left: 22px; position: relative; }
.product .body li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 10px; height: 2px; background: var(--brand-strong); }
.product .link-arrow { margin-top: auto; align-self: flex-start; }

.badge {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 10px; border: 1px solid currentColor; border-radius: var(--radius);
}
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; transform: rotate(45deg); }
.badge-early { color: #9a3a1f; }       /* 6.22:1 sobre --card */
.badge-live { color: var(--brand-strong); }
.badge-kit { color: #46505a; }

@media (min-width: 900px) {
  .products { grid-template-columns: repeat(6, 1fr); }
  .product { grid-column: span 2; }
  .product.is-featured { grid-column: 1 / -1; grid-template-columns: 7fr 5fr; }
  .product.is-featured .shot { border-bottom: 0; border-right: 1px solid var(--line); aspect-ratio: auto; }
  .product.is-featured .body { padding: clamp(32px, 4vw, 56px); justify-content: center; }
  .product.is-featured h3 { font-size: clamp(2.25rem, 3.6vw, 3.25rem); }
}

/* Proceso */
.steps { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line-ink); }
.step { display: grid; grid-template-columns: 88px 1fr; gap: 8px 24px; padding: 32px 0; border-bottom: 1px solid var(--line-ink); }
.step .num { font-family: var(--font-display); font-size: 3.5rem; line-height: 0.9; color: var(--brand); font-variant-numeric: tabular-nums lining-nums; }
.step h3 { font-size: 1.6rem; }
.step p { margin: 8px 0 0; color: var(--on-ink-muted); max-width: 52ch; }
.step .dur { grid-column: 2; font-family: var(--font-mono); font-size: 0.8rem; color: var(--amber); letter-spacing: 0.04em; }
@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); border-top: 0; }
  .step { grid-template-columns: 1fr; border-bottom: 0; border-top: 1px solid var(--line-ink); padding: 28px 28px 0 0; }
  .step .dur { grid-column: auto; }
  .step .num { font-size: 4.5rem; }
}

/* Contacto */
.contact { background: var(--paper-2); }
.contact-grid { display: grid; gap: 56px; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 5fr 7fr; gap: 96px; } }
.contact aside p { color: var(--muted); }
.contact aside dl { margin: 40px 0 0; display: grid; gap: 20px; }
.contact aside dt { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.contact aside dd { margin: 4px 0 0; font-size: 1.1rem; }

.form { display: grid; gap: 20px; background: var(--card); padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); }
.form .row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-weight: 500; font-size: 0.95rem; }
.field label .req { color: #9a3a1f; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: 400 1rem/1.4 var(--font-body); color: var(--text);
  background: #fff; border: 1px solid rgba(14, 26, 36, 0.28); border-radius: var(--radius);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.field textarea { min-height: 132px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(14, 26, 36, 0.5); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.3); }
.field[data-invalid] input, .field[data-invalid] textarea { border-color: #b3261e; }
.field .error { display: none; color: #b3261e; font-size: 0.875rem; margin: 0; }
.field[data-invalid] .error { display: block; }
.form .hint { font-size: 0.875rem; color: var(--muted); margin: 0; }
.form .btn { justify-self: start; }
.form-status { min-height: 1.5em; font-size: 0.95rem; color: var(--brand-strong); margin: 0; }

/* Footer */
.site-footer { padding-block: 72px 40px; }
.footer-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 8fr 4fr; } }
.site-footer h4 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--on-ink-muted); margin: 0 0 12px; font-weight: 500; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-flex; min-height: 40px; align-items: center; text-decoration: none; color: var(--on-ink); transition: color 200ms var(--ease); }
.site-footer li a:hover { color: var(--brand); }
.site-footer .tagline { color: var(--on-ink-muted); max-width: 48ch; margin-top: 20px; text-wrap: balance; }   /* sin viudas: "QA." no queda sola */
.site-footer .slogan { font-family: var(--font-display); font-size: 1.35rem; color: var(--on-ink); }
.site-footer .bajada { display: block; margin-top: 6px; text-wrap: balance; }
.footer-base {
  margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line-ink);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--on-ink-muted);
}
.footer-base a { color: var(--amber); }

/* Estado inicial de la capa de movimiento: solo cuando JS confirmó que va a animar */
.motion [data-reveal] { opacity: 0; }

/* ---------- Interfaces de producto (vistas de ejemplo en HTML, no capturas) ---------- */
.ui, .shot-ui {
  background: var(--ink-2); color: var(--on-ink); border: 1px solid rgba(14, 26, 36, 0.9);
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
}
.ui { margin: 0; border-radius: var(--radius); box-shadow: 0 50px 90px -40px rgba(14, 26, 36, 0.65), 0 2px 0 rgba(14, 26, 36, 0.06); }
.ui-bar {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-ink);
  font-size: 0.7rem; color: var(--on-ink-muted);
}
.ui-bar .dots, .pipe-bar .dots { display: flex; gap: 6px; }
.ui-bar .dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(245, 241, 234, 0.16); }
.ui-bar .pipe-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ui-bar .pipe-note { margin-left: auto; flex: none; }
.ui-cap { margin: 16px 0 0; display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

/* Hero: tablero de Khimtest */
.kh { padding: 18px; display: grid; gap: 16px; }
.kh-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line-ink); border: 1px solid var(--line-ink); }
.kpi { background: var(--ink-2); padding: 12px 14px; display: grid; gap: 6px; }
.k-l { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ink-muted); }
.k-v { font-family: var(--font-display); font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.k-v.is-ok { color: var(--brand); }
.k-v.is-bad { color: #ff8a6b; }
.kh-trend { display: grid; gap: 8px; }
.tr-l { font-size: 0.68rem; color: var(--on-ink-muted); }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.bars i { flex: 1; height: 100%; background: rgba(20, 184, 166, 0.55); transform-origin: 50% 100%; transform: scaleY(var(--h)); }
.bars i:last-child { background: var(--brand); }
.kh-feed { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-ink); }
.kh-feed li {
  display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 48px; align-items: center; gap: 12px;
  padding: 9px 2px; border-bottom: 1px solid var(--line-ink); font-size: 0.78rem;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.kh-feed li.is-new { opacity: 0; transform: translateY(-8px); }
.kh-feed .n { color: var(--on-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-feed .g { font-size: 0.66rem; padding: 2px 6px; border: 1px solid var(--line-ink); color: var(--on-ink-muted); }
.kh-feed .d { text-align: right; color: var(--on-ink-muted); }
.kh-feed .s { width: 10px; height: 10px; border-radius: 50%; }
.kh-feed .ok .s { background: var(--brand); }
.kh-feed .fail .s { background: #ff8a6b; }
.kh-feed .fail .n { color: #ff8a6b; }
.kh-feed .run .s { border: 1.5px solid var(--amber); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.kh-ai {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; font-size: 0.75rem;
  background: rgba(242, 166, 74, 0.08); border: 1px solid rgba(242, 166, 74, 0.3); color: var(--on-ink);
}
.kh-ai code { color: var(--amber); }
.ai-tag { flex: none; padding: 2px 6px; background: var(--amber); color: var(--ink); font-weight: 600; letter-spacing: 0.08em; }
.ai-t { min-width: 0; }
.ai-act { margin-left: auto; flex: none; color: var(--amber); }
@media (max-width: 480px) { .kh-feed .g, .ai-act { display: none; } .kh-feed li { grid-template-columns: 14px minmax(0, 1fr) 44px; } }

/* Productos: cada .shot es una interfaz */
.product .shot.shot-ui { background: var(--ink-2); border-bottom-color: var(--ink-2); display: flex; flex-direction: column; container-type: inline-size; }
.product.is-featured .shot.shot-ui { border-right-color: var(--ink-2); }

/* Khimtest: caso versionado + auditoría + gasto IA */
.kt { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 18px; padding: 18px; font-size: 0.75rem; }
@container (min-width: 520px) { .kt { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; padding: 24px; } }
.kt-id { margin: 0; color: var(--on-ink-muted); font-size: 0.7rem; }
.kt-title { margin: 6px 0 12px; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; color: var(--on-ink); }
.kt-steps { margin: 0 0 16px; padding-left: 18px; display: grid; gap: 6px; color: var(--on-ink-muted); }
.kt-steps b { color: var(--on-ink); font-weight: 500; }
.kt-flow { display: flex; gap: 6px; flex-wrap: wrap; }
.kt-flow span { padding: 4px 8px; border: 1px solid var(--line-ink); color: var(--on-ink-muted); font-size: 0.68rem; }
.kt-flow .is-done { border-color: rgba(20, 184, 166, 0.4); color: var(--brand); }
.kt-flow .is-now { background: var(--brand); border-color: var(--brand); color: var(--ink); font-weight: 600; }
.kt-side { display: none; border-left: 1px solid var(--line-ink); padding-left: 20px; }
@container (min-width: 520px) { .kt-side { display: block; } }
.kt-h { margin: 0 0 8px; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink-muted); }
.kt-audit { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.kt-audit li { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; color: var(--on-ink); }
.kt-audit b { color: var(--brand); font-weight: 500; }
.kt-audit span { grid-column: 2; color: var(--on-ink-muted); font-size: 0.66rem; }
.kt-meter { height: 6px; background: var(--line-ink); }
.kt-meter span { display: block; height: 100%; width: 100%; background: var(--amber); transform-origin: 0 50%; transform: scaleX(0.25); }
.kt-cost { margin: 8px 0 0; color: var(--on-ink); }
.kt-cost span { color: var(--on-ink-muted); }

/* Talento 360: matriz de skills */
.tm { flex: 1; display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr)); gap: 6px; align-content: center; padding: 16px 18px 8px; font-size: 0.68rem; }
.tm-h { text-align: center; color: var(--on-ink-muted); }
.tm-p { display: flex; align-items: center; gap: 8px; color: var(--on-ink); font-family: var(--font-body); font-size: 0.78rem; white-space: nowrap; overflow: hidden; }
.tm-p b { flex: none; width: 22px; height: 22px; display: grid; place-items: center; background: var(--ink-3); color: var(--brand); font: 600 0.6rem var(--font-mono); }
.tm i, .tm-legend i { display: block; aspect-ratio: 1; max-height: 26px; justify-self: center; width: 100%; max-width: 26px; background: var(--brand); }
.tm i[data-l="0"] { background: transparent; box-shadow: inset 0 0 0 1px var(--line-ink); }
.tm i[data-l="1"] { opacity: 0.22; }
.tm i[data-l="2"] { opacity: 0.45; }
.tm i[data-l="3"] { opacity: 0.72; }
.tm i.is-pend, .tm-legend i.is-pend { background: transparent; opacity: 1; box-shadow: inset 0 0 0 2px var(--amber); animation: pend 2.4s var(--ease) infinite; }
@keyframes pend { 50% { opacity: 0.35; } }
.tm-legend { display: flex; gap: 16px; margin: 0; padding: 8px 18px 14px; font-size: 0.66rem; color: var(--on-ink-muted); }
.tm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tm-legend i { width: 10px; height: 10px; }

/* Kit de performance: p95 contra el umbral */
.lk { flex: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 6px; padding: 16px 18px 14px; font-size: 0.7rem; }
.lk-stat { margin: 0; display: flex; align-items: baseline; gap: 10px; color: var(--on-ink-muted); }
.lk-stat b { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; color: var(--brand); font-variant-numeric: lining-nums tabular-nums; }
.lk-stat em { margin-left: auto; font-style: normal; color: #ff8a6b; }
.lk-chart { width: 100%; height: 100%; min-height: 0; overflow: visible; }
.lk-th { stroke: #ff8a6b; stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.lk-area { fill: rgba(20, 184, 166, 0.14); }
.lk-line { fill: none; stroke: var(--brand); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.lk-axis { margin: 0; display: flex; justify-content: space-between; color: var(--on-ink-muted); }
.lk-ok { margin: 0; color: var(--brand); }
.motion .lk-line { animation: draw 5s var(--ease) infinite; }
@keyframes draw { 0% { stroke-dashoffset: 1; } 45%, 100% { stroke-dashoffset: 0; } }

/* Starter de Playwright: código + terminal */
.pw-code { flex: 1; margin: 0; padding: 16px 18px; font: 0.72rem/1.65 var(--font-mono); color: var(--on-ink); overflow: hidden; white-space: pre; }
.pw-code .kw { color: var(--amber); }
.pw-code .str { color: #5eead4; }
.pw-code .fn { color: #9cc7f0; }
.pw-term { padding: 10px 18px 14px; border-top: 1px solid var(--line-ink); background: var(--ink); font-size: 0.72rem; }
.pw-term p { margin: 0; color: var(--on-ink-muted); }
.pw-term .pr { color: var(--brand); }
.pw-term .pw-ok { color: var(--brand); margin-top: 4px; }
.pw-ok span { color: var(--on-ink-muted); }
.caret { display: inline-block; width: 7px; height: 13px; margin-left: 6px; background: var(--on-ink); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Soluciones · fila 03 */
.auto-extra { margin-top: clamp(48px, 6vw, 80px); }
.auto-extra .auto-tag { margin: 0 0 24px; }
.extra-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line-ink); border: 1px solid var(--line-ink); }
.extra-grid li { background: var(--ink); padding: clamp(24px, 3vw, 36px); display: grid; align-content: start; gap: 10px; transition: background-color 0.2s var(--ease); }
.extra-grid li:hover { background: var(--ink-2); }
.extra-grid strong { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; line-height: 1.1; }
.extra-grid li > span:last-child { color: var(--on-ink-muted); }
.extra-grid a { color: var(--brand); text-underline-offset: 3px; }
.ex-k { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); }
@media (min-width: 900px) { .extra-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  .tm i.is-pend, .caret, .kh-feed .run .s { animation: none; }
}

/* Ajustes de las interfaces en pantallas angostas */
.pipe-bar .pipe-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pipe-bar .live, .pipe-bar .pipe-note { flex: none; white-space: nowrap; }
.k-v { white-space: nowrap; }
@media (max-width: 480px) {
  .kh { padding: 14px; gap: 14px; }
  .kpi { padding: 10px; }
  .k-l { font-size: 0.58rem; letter-spacing: 0.04em; }
  .k-v { font-size: 1.3rem; }
  .ui-cap span:first-child { display: none; }
}
@media (max-width: 899px) { .product.is-featured .shot.shot-ui { aspect-ratio: auto; } }
@container (max-width: 400px) { .pw-code { font-size: 0.64rem; padding-inline: 14px; } }

/* =====================================================================
   Capa "tech" (2026-11-02): luz, grilla, profundidad e interacción.
   Todo es pintura/transform; sin JS o con reduced-motion queda quieto.
   ===================================================================== */
:root { color-scheme: only light; }   /* que el navegador no oscurezca ni embarre la paleta */

/* Header: vidrio oscuro (propósito: legibilidad sobre el hero y el contenido que pasa por debajo) */
.site-header {
  background: rgba(14, 26, 36, 0.97); border-bottom-color: var(--line-ink); color: var(--on-ink);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(14, 26, 36, 0.9); backdrop-filter: blur(16px) saturate(150%); }
}
.site-header::after {   /* progreso de lectura */
  content: ""; position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--brand), #5eead4); box-shadow: 0 0 12px rgba(20, 184, 166, 0.8);
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}
.site-header .brand-lockup { color: var(--on-ink); }
.site-header .brand-lockup .sub { color: var(--brand); }
.nav a { color: var(--on-ink-muted); }
.nav a:hover { color: var(--on-ink); }
.site-header .btn-primary { background: var(--brand); color: var(--ink); }
.site-header .btn-primary:hover { background: #2dd4bf; }
.menu summary { color: var(--on-ink); border-color: var(--line-ink); }
.menu[open] summary { background: var(--brand); color: var(--ink); border-color: var(--brand); }
.menu-panel { background: var(--ink-2); border-color: var(--line-ink); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7); }
.menu-panel a { color: var(--on-ink); }
.menu-panel a:hover { background: var(--ink-3); }

/* Hero oscuro: grilla que se desvanece + resplandor teal + brasa del león */
.hero.on-ink {
  position: relative; isolation: isolate;
  background-image:
    radial-gradient(520px circle at var(--mx, 72%) var(--my, 30%), rgba(94, 234, 212, 0.10), transparent 62%),
    radial-gradient(58% 60% at 84% 42%, rgba(20, 184, 166, 0.30), transparent 72%),
    radial-gradient(42% 46% at 6% -4%, rgba(201, 73, 42, 0.20), transparent 72%);
}
.hero.on-ink::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(245, 241, 234, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 241, 234, 0.07) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
  -webkit-mask-image: radial-gradient(75% 85% at 68% 42%, #000 0%, transparent 78%);
  mask-image: radial-gradient(75% 85% at 68% 42%, #000 0%, transparent 78%);
}
.hero.on-ink .eyebrow::after { content: "_"; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
.hero-meta { color: var(--on-ink-muted); border-top-color: var(--line-ink); }
.hero-meta span::before { color: var(--brand); }
.on-ink .link-arrow { color: var(--on-ink); border-color: var(--line-ink); }
.on-ink .link-arrow:hover { color: var(--brand); border-color: var(--brand); }

/* Remates en gradiente teal → menta (solo sobre tinta: 7:1 o más en todo el recorrido) */
.on-ink h1 em, .on-ink h2 em, .auto-copy h3 em {
  background: linear-gradient(95deg, #14b8a6 0%, #5eead4 58%, #b6f5e6 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; padding-right: 0.06em;
}

/* Banda de herramientas: marquesina en mono */
.stack {
  background: var(--ink-2); border-block: 1px solid var(--line-ink); overflow: hidden;
  font-family: var(--font-mono); color: var(--on-ink-muted); position: relative;
}
.stack::before, .stack::after { content: ""; position: absolute; top: 0; bottom: 0; width: 12%; z-index: 1; pointer-events: none; }
.stack::before { left: 0; background: linear-gradient(90deg, var(--ink-2), transparent); }
.stack::after { right: 0; background: linear-gradient(270deg, var(--ink-2), transparent); }
.stack-track { display: flex; width: max-content; animation: marquee 42s linear infinite; }
.stack:hover .stack-track { animation-play-state: paused; }
.stack ul { display: flex; list-style: none; margin: 0; padding: 0; }
.stack li {
  display: flex; align-items: center; gap: 32px; padding: 20px 0 20px 32px; white-space: nowrap;
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
}
.stack li::after { content: ""; width: 6px; height: 6px; background: var(--brand); transform: rotate(45deg); box-shadow: 0 0 10px var(--brand); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Luz que sigue al cursor sobre las bandas oscuras */
.on-ink:not(.hero) {
  background-image:
    radial-gradient(560px circle at var(--mx, 50%) var(--my, -40%), rgba(20, 184, 166, 0.11), transparent 62%),
    radial-gradient(rgba(245, 241, 234, 0.07) 1px, transparent 1.4px);
  background-size: auto, 28px 28px;
}

/* Botones: brillo y barrido de luz */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.38) 50%, transparent 68%);
  transform: translateX(-120%); transition: transform 0.7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn-primary { box-shadow: 0 12px 30px -12px rgba(11, 110, 102, 0.75); }
.on-ink .btn-primary, .site-header .btn-primary { box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.55), 0 10px 34px -10px rgba(20, 184, 166, 0.8); }
.on-ink .btn-primary:hover, .site-header .btn-primary:hover { box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.9), 0 14px 44px -8px rgba(20, 184, 166, 1); }

/* Ventanas de producto: borde luminoso y profundidad */
.ui, .pipe, .canvas {
  border-color: rgba(94, 234, 212, 0.22); border-top-color: rgba(94, 234, 212, 0.45);
}
.pipe, .canvas { box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.10), 0 40px 80px -40px rgba(0, 0, 0, 0.8), 0 0 70px -28px rgba(20, 184, 166, 0.45); }
.ui-hero {
  position: relative; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.28), 0 0 90px -24px rgba(20, 184, 166, 0.6), 0 50px 100px -40px rgba(0, 0, 0, 0.85);
}
.ui-hero::after {   /* barrido de escaneo */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 64px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(94, 234, 212, 0.14), transparent);
  transform: translateY(-100%); animation: scan 7s linear infinite;
}
@keyframes scan { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(900%); } }
.kpi { background: linear-gradient(180deg, rgba(94, 234, 212, 0.05), transparent), var(--ink-2); }
.k-v.is-ok { text-shadow: 0 0 22px rgba(20, 184, 166, 0.55); }
.chimera-mark svg { filter: drop-shadow(0 24px 60px rgba(20, 184, 166, 0.32)); }

/* Secciones claras: papel milimetrado (blueprint) y tarjetas que reaccionan */
.trench, #productos, #contacto {
  background-image:
    linear-gradient(rgba(14, 26, 36, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 26, 36, 0.065) 1px, transparent 1px);
  background-size: 56px 56px; background-position: -1px -1px;
}
.product {
  background-image: radial-gradient(440px circle at var(--mx, -300px) var(--my, -300px), rgba(20, 184, 166, 0.13), transparent 62%);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.product:hover { border-color: rgba(20, 184, 166, 0.65); box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.35), 0 34px 70px -34px rgba(11, 110, 102, 0.6); }
.extra-grid li:hover { box-shadow: inset 0 1px 0 rgba(94, 234, 212, 0.5); }

@media (prefers-reduced-motion: reduce) {
  .stack-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .stack ul + ul { display: none; }
  .stack::before, .stack::after { display: none; }
  .ui-hero::after, .hero.on-ink .eyebrow::after { animation: none; }
  .btn::after { display: none; }
}
.on-ink .ui-cap { color: var(--on-ink-muted); }


/* ---------- Tech · segunda pasada (referencias: Resend, Linear, Supabase, Railway) ---------- */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* Etiqueta de estado con borde que gira (Resend). Esquinas afiladas: es la regla de la marca */
.chip {
  display: flex; width: fit-content; align-items: center; gap: 10px; margin-bottom: 26px; padding: 8px 14px 8px 12px;
  font: 500 0.78rem/1 var(--font-mono); letter-spacing: 0.06em; text-decoration: none; color: var(--on-ink);
  border: 1px solid transparent; border-radius: var(--radius);
  background:
    linear-gradient(var(--ink), var(--ink)) padding-box,
    conic-gradient(from var(--ang), rgba(94, 234, 212, 0.12), #5eead4 18%, rgba(94, 234, 212, 0.12) 40%, rgba(242, 166, 74, 0.8) 62%, rgba(94, 234, 212, 0.12) 82%) border-box;
  animation: spin-ang 6s linear infinite;
}   /* sin transition/transform: lo anima GSAP en la entrada del hero */
.chip svg { width: 14px; height: 14px; color: var(--brand); transition: transform 200ms var(--ease); }
.chip:hover svg { transform: translateX(3px); }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
@keyframes spin-ang { to { --ang: 360deg; } }

/* Haces de luz diagonales detrás del hero (Resend) */
.hero.on-ink::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; top: -25%; right: -12%; width: 78%; height: 150%;
  background:
    linear-gradient(115deg, transparent 36%, rgba(94, 234, 212, 0.11) 45%, rgba(94, 234, 212, 0.025) 52%, transparent 60%),
    linear-gradient(115deg, transparent 58%, rgba(94, 234, 212, 0.07) 64%, transparent 72%);
  filter: blur(5px); animation: beam 16s ease-in-out infinite alternate;
}
@keyframes beam { from { transform: translate3d(-4%, 0, 0); } to { transform: translate3d(5%, 0, 0); } }

/* Párrafo en dos tonos (Linear): la primera frase en blanco, el resto atenuado */
.on-ink .lead strong { color: var(--on-ink); font-weight: 500; }

/* Etiquetas de plano técnico sobre las ventanas (Linear: "FIG 0.1") */
.pipe, .canvas { position: relative; }
.pipe::before, .canvas::before {
  position: absolute; top: -30px; left: 0; font: 0.68rem/1 var(--font-mono); letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--on-ink-muted); white-space: nowrap;
}
.pipe::before { content: "FIG 0.1 — corrida de CI"; }
.canvas::before { content: "FIG 0.2 — flujo en n8n"; }
.ui-cap span:first-child::before { content: "FIG 0.0 — "; color: var(--brand); }

/* Fila 03 como bento con íconos de línea (Supabase; capas isométricas como Linear) */
.ex-ic { width: 32px; height: 32px; color: var(--brand); margin-bottom: 14px; transition: transform 250ms var(--ease), filter 250ms var(--ease); }
.extra-grid li:hover .ex-ic { transform: translateY(-3px); filter: drop-shadow(0 0 10px rgba(20, 184, 166, 0.7)); }

/* Línea de luz en el borde superior de cada banda oscura */
.on-ink:not(.hero) { box-shadow: inset 0 1px 0 rgba(94, 234, 212, 0.28); }

@media (prefers-reduced-motion: reduce) {
  .chip, .hero.on-ink::after { animation: none; }
  .ex-ic, .chip, .chip svg { transition: none; }
}

/* El remate del titular no se parte en dos líneas */
.hero h1 em { white-space: nowrap; }

/* El remate del titular de Soluciones baja entero a la segunda línea */
#auto-title em { display: inline-block; }


/* ---------- Para quién: pymes y empresas pequeñas ---------- */
.fit {
  margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(32px, 4vw, 56px);
  display: grid; gap: clamp(28px, 4vw, 48px);
  /* filete solo del ancho del contenido (no de los márgenes del .wrap) */
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - var(--gutter) * 2) 1px no-repeat;
}
.fit-head h3 { font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1; margin-top: 14px; text-wrap: balance; }
.fit-head h3 em { font-style: italic; font-weight: 400; color: var(--brand-strong); }
.fit-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.fit-grid li { display: grid; gap: 8px; align-content: start; padding-top: 16px; border-top: 2px solid var(--brand-strong); }
.fit-n { font: 500 0.72rem/1 var(--font-mono); letter-spacing: 0.16em; color: var(--brand-strong); }
.fit-grid strong { font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; line-height: 1.15; }
.fit-grid li > span:last-child { color: var(--muted); }
@media (min-width: 900px) {
  .fit { grid-template-columns: 6fr 6fr; align-items: start; }
  .fit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
}


/* ---------- Recorrido de Khimtest: pasos + ventana + Khimi (pin con GSAP en escritorio) ---------- */
#recorrido { background-color: #0a141c; }
.tour { display: grid; gap: 48px; }
.tour-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(48px, 8vw, 72px); }
.tour-step { position: relative; display: grid; gap: 14px; align-content: start; }
.tour-n { font: 500 0.75rem/1 var(--font-mono); letter-spacing: 0.16em; color: var(--brand); }
.tour-step h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.05; }
.tour-step p { margin: 0; color: var(--on-ink-muted); max-width: 42ch; }
.tour-khimi { width: 96px; height: auto; filter: drop-shadow(0 10px 24px rgba(20, 184, 166, 0.35)); pointer-events: none; }
.tour-step > .tour-khimi { position: absolute; top: -8px; right: 0; }
@media (max-width: 1023px) { .tour-step > .tour-n, .tour-step > h3, .tour-step > p { padding-right: 104px; } }
.tour-stage { display: none; }

.tour-shot {
  margin: 8px 0 0; background: var(--ink-2); font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  border: 1px solid rgba(94, 234, 212, 0.22); border-top-color: rgba(94, 234, 212, 0.45); border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(20, 184, 166, 0.10), 0 40px 80px -40px rgba(0, 0, 0, 0.8), 0 0 70px -28px rgba(20, 184, 166, 0.4);
  container-type: inline-size; overflow: hidden;
}

/* Contenido de cada ventana */
.tr, .tc, .ex { padding: 18px; display: grid; gap: 14px; font-size: 0.78rem; }
.tr-head, .tc-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; color: var(--on-ink); }
.tr-src, .tc-ia { color: var(--on-ink-muted); font-size: 0.7rem; }
.tc-ia { color: var(--amber); }
.tr-list, .tc-list, .ex-runs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-ink); }
.tr-list li, .tc-list li, .ex-runs li { display: grid; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--line-ink); color: var(--on-ink-muted); }
.tr-list li { grid-template-columns: 56px minmax(0, 1fr) auto; }
.tr-list b, .ex-runs b { color: var(--on-ink); font-weight: 500; }
.tr-list em, .tc-list em { font-style: normal; font-size: 0.68rem; padding: 2px 7px; border: 1px solid var(--line-ink); }
.tr-list .is-sel { background: rgba(20, 184, 166, 0.10); box-shadow: inset 2px 0 0 var(--brand); color: var(--on-ink); }
.tr-cta { display: flex; justify-content: flex-end; }
.tr-btn { padding: 9px 14px; background: var(--brand); color: var(--ink); font-weight: 600; box-shadow: 0 0 22px -4px rgba(20, 184, 166, 0.8); }
.tc-list li { grid-template-columns: 14px minmax(0, 1fr) auto; }
.tc-list i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--brand); }
.tc-list span { color: var(--on-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-pipe { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ex-pipe span { padding: 9px 6px; text-align: center; font-size: 0.66rem; border: 1px solid var(--line-ink); color: var(--on-ink-muted); }
.ex-pipe .is-done { border-color: rgba(20, 184, 166, 0.45); color: var(--brand); }
.ex-pipe .is-run { background: rgba(242, 166, 74, 0.12); border-color: var(--amber); color: var(--amber); }
.ex-h { margin: 6px 0 0; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-ink-muted); }
.ex-runs li { grid-template-columns: minmax(0, 1fr) auto 48px; }
.ex-runs span { color: var(--brand); }
.ex-runs em { font-style: normal; text-align: right; }

@media (min-width: 1024px) {
  .tour.is-live {
    grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 72px); align-items: center;
    height: calc(100vh - 72px - 40px); min-height: 560px;
  }
  .tour.is-live .tour-steps { position: relative; gap: 4px; padding-left: 30px; }
  .tour.is-live .tour-steps::before, .tour.is-live .tour-steps::after {
    content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px;
  }
  .tour.is-live .tour-steps::before { background: var(--line-ink); }
  .tour.is-live .tour-steps::after {
    background: linear-gradient(var(--brand), #5eead4); box-shadow: 0 0 12px var(--brand);
    transform-origin: 50% 0; transform: scaleY(var(--tp, 0));
  }
  .tour.is-live .tour-step { padding: 16px 0; opacity: 0.36; transition: opacity 0.35s var(--ease); }
  .tour.is-live .tour-step.is-active { opacity: 1; }
  .tour.is-live .tour-step h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); }

  .tour.is-live .tour-stage { display: block; position: relative; padding-bottom: 150px; }
  .tour.is-live .tour-screens { position: relative; width: 100%; aspect-ratio: 16 / 11; }
  .tour.is-live .tour-shot {
    position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column;
    opacity: 0; transform: translateY(16px) scale(0.985); pointer-events: none;
    transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  }
  .tour.is-live .tour-shot.is-active { opacity: 1; transform: none; }
  .tour.is-live .tour-shot > :last-child { flex: 1; align-content: center; }
  .tour.is-live .tour-poses { position: absolute; right: 4px; bottom: -22px; width: 200px; aspect-ratio: 1; pointer-events: none; }
  .tour.is-live .tour-khimi {
    position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transform: translateY(14px) scale(0.95);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
    filter: drop-shadow(0 18px 40px rgba(20, 184, 166, 0.4));
  }
  .tour.is-live .tour-khimi.is-active { opacity: 1; transform: none; }
  .tour.is-live .tour-chip {
    position: absolute; left: 0; bottom: 62px; margin: 0; display: inline-flex; align-items: center; gap: 10px;
    font: 0.72rem/1 var(--font-mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-ink-muted);
  }
  .tour.is-live .tour-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 12px var(--brand); }
  .tour.is-live .tour-chip span { color: var(--on-ink); }
  /* las filas de casos entran una por una al llegar al paso 2 */
  .tour.is-live .tour-shot.is-active .tc-list li { animation: row-in 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
}
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tour.is-live .tour-shot.is-active .tc-list li { animation: none; } }
.ex-gate { display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 12px 14px; background: rgba(20, 184, 166, 0.10); border: 1px solid var(--brand); }
.ex-gate span { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--on-ink-muted); }
.ex-gate b { color: var(--brand); letter-spacing: 0.06em; }
.ex-gate em { margin-left: auto; font-style: normal; color: var(--on-ink); }
.kt-warn { margin: 16px 0 0; padding: 10px 12px; font-size: 0.7rem; color: var(--amber); border: 1px dashed rgba(242, 166, 74, 0.5); background: rgba(242, 166, 74, 0.06); }

/* Enlaces de las bandas oscuras y del header oscuro (el manual los usa dentro del header) */
.site-header .link-arrow { color: var(--on-ink); border-color: var(--line-ink); }
.site-header .link-arrow:hover { color: var(--brand); border-color: var(--brand); }
