/* Estilos de la página principal de ynventra.com, comunes a la versión en español (index.html)
   y en inglés (en/index.html). */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colores del logo */
  --wine:    #39031a;
  --plum:    #6c1134;
  --berry:   #a8285a;
  --rose:    #cf7498;
  --rose-2:  #e6bfce;
  --blush:   #f6eaef;
  /* Superficies y texto */
  --paper:   #fcfafa;
  --night:   #1c0710;
  --night-2: #140409;
  --ink:     #1f1418;
  --ink-2:   #5b4a52;
  --ink-3:   #8a7880;
  --line:    rgba(57, 3, 26, .09);
  /* Estados del cuadro de mando */
  --ok:      #2f7a57;
  --warn:    #c07f1d;
  --crit:    #c2334d;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease:  cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--rose-2); color: var(--wine); }
:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── TIPOGRAFÍA COMÚN ── */
h1, h2 {
  font-family: var(--serif); font-weight: 400;
  color: var(--wine); letter-spacing: -.01em; line-height: 1.06;
}
/* Títulos de sección: misma familia que el titular principal (Jost en mayúsculas espaciadas) */
h2 {
  font-family: 'Jost', var(--sans); font-weight: 500; font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  line-height: 1.25; letter-spacing: .12em; text-transform: uppercase; color: var(--plum);
}

.sec { padding: clamp(88px, 11vw, 140px) 0; }
.sec-head { max-width: 760px; margin: 0 auto clamp(48px, 6vw, 72px); text-align: center; }
.sec-lead { font-size: 1.07rem; color: var(--ink-2); margin-top: 20px; }

/* ── BOTONES ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px; border: 1px solid transparent;
  font: 500 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--wine); color: #fff; box-shadow: 0 12px 30px -14px rgba(57, 3, 26, .6); }
.btn-primary:hover { background: var(--plum); transform: translateY(-1px); }
.btn-sm { padding: 11px 20px; font-size: 13.5px; }
.btn-light { background: #fff; color: var(--wine); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, .6); }
.btn-light:hover { background: var(--blush); transform: translateY(-1px); }

/* ── APARICIÓN AL HACER SCROLL ── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 1ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ─────────────────────────────────────
   NAVEGACIÓN
───────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .35s, box-shadow .35s;
}
.nav.is-scrolled {
  background: rgba(252, 250, 250, .84);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-in { height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 20px; transition: height .35s var(--ease); }
.brand img { height: 68px; width: auto; transition: height .35s var(--ease); }
.nav.is-scrolled .nav-in { height: 80px; }
.nav.is-scrolled .brand img { height: 52px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
/* Cambio de idioma: enlace discreto al otro idioma disponible */
.lang {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font: 500 12.5px/1 'Jost', var(--sans); letter-spacing: .16em; color: var(--ink-2);
  transition: color .2s;
}
.lang span { margin-right: -.16em; }
.lang svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.lang:hover { color: var(--wine); }
.nav-links .btn { white-space: nowrap; }
.cta-short { display: none; }   /* en móvil el botón se queda en "Demo" para que quepan logo e idioma */

/* ─────────────────────────────────────
   HERO
───────────────────────────────────── */
/* Inicio compacto: qué es Ynventra, con la animación ya visible justo debajo */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 132px 0 clamp(32px, 3.5vw, 44px);
  background: var(--paper);
}
/* Icono completo de fondo: su altura se adapta a la franja del inicio para que se vea entero */
.hero-mark {
  position: absolute; left: 50%; top: 50%;
  height: calc(100% - 16px); width: auto; transform: translate(-50%, -50%);
  opacity: .075; pointer-events: none; overflow: visible;
}
.hero-mark .hm-node { animation: node-breathe 4.8s ease-in-out infinite; animation-delay: calc(var(--i) * .8s); transform-box: fill-box; transform-origin: center; }
@keyframes node-breathe { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
.hero-orbit {
  position: absolute; left: 50%; top: 50%; width: min(1180px, 100% - 48px); height: auto;
  transform: translate(-50%, -50%); pointer-events: none; overflow: visible;
}
.ho-lines path { fill: none; stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 2 7; animation: ho-flow 2.4s linear infinite; }
@keyframes ho-flow { to { stroke-dashoffset: -18; } }
.ho-tile { fill: #fff; stroke: rgba(168, 40, 90, .22); }
.ho-icon { fill: none; stroke: var(--berry); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.ho-float { animation: ho-float var(--b) ease-in-out infinite alternate; animation-delay: var(--d); }
@keyframes ho-float { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
@media (max-width: 1200px) { .hero-orbit { display: none; } }
.hero-inner { position: relative; container-type: inline-size; }
/* Titular en una sola línea: el tamaño se ajusta al ancho disponible sin llegar a ocuparlo entero
   (en Jost seminegrita, mayúsculas y con este espaciado, el texto mide 27,1 veces el tamaño de letra) */
.hero h1 {
  font-family: 'Jost', var(--sans); font-weight: 600; font-size: min(1.6rem, 2.6vw); line-height: 1.2; letter-spacing: .12em;
  text-transform: uppercase; white-space: nowrap; color: var(--plum);
}
@supports (font-size: 1cqi) { .hero h1 { font-size: min(1.6rem, calc(100cqi / 34)); } }
.hero-sub {
  font-family: var(--serif); font-weight: 500; font-size: clamp(.82rem, 1.08vw, 1rem); line-height: 1.35;
  letter-spacing: .14em; text-transform: uppercase; color: var(--wine); margin: 12px 0 26px; text-wrap: balance;
}
/* Frase en dos líneas: en una línea mide unas 73 veces el tamaño de letra */
.hero .lead { max-width: 700px; margin: 0 auto; font-size: 1.06rem; line-height: 1.7; color: var(--ink-2); text-wrap: balance; }
@supports (font-size: 1cqi) { .hero .lead { font-size: min(1.06rem, calc(100cqi / 40)); } }

.rise { animation: rise 1s var(--ease) both; animation-delay: calc(var(--d, 0) * 1ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ─────────────────────────────────────
   CÓMO FUNCIONA · LA ANIMACIÓN
───────────────────────────────────── */
.flow {
  position: relative; overflow: hidden; color: #f6eaef;
  background: radial-gradient(1100px 640px at 50% 34%, #2e0b1c 0%, var(--night) 58%, var(--night-2) 100%);
}
.flow.sec { padding-top: clamp(30px, 3.5vw, 44px); }
.flow-cta { display: flex; justify-content: center; margin-top: clamp(40px, 5vw, 56px); }
.flow .sec-head { margin: clamp(64px, 8vw, 100px) auto 0; }
.flow::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(246, 234, 239, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 234, 239, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, #000 20%, transparent 80%);
}
.flow .wrap { position: relative; }
.flow h2 { color: #fff; }
.flow .sec-lead { color: rgba(246, 234, 239, .64); }

.stage {
  --flow: h;
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 250px) minmax(200px, 1fr) minmax(360px, 450px);
  grid-template-areas: "l1 l2 l3" "s c d";
  row-gap: 18px; align-items: center;
}
.stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.stage > :not(canvas) { position: relative; z-index: 1; }

.lab {
  font: 500 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  color: rgba(246, 234, 239, .55); align-self: end;
}
.lab-1 { grid-area: l1; }
.lab-2 { grid-area: l2; justify-self: center; }
.lab-3 { grid-area: l3; }

/* Fuentes */
.sources { grid-area: s; list-style: none; display: grid; gap: 10px; }
.src {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(230, 191, 206, .12);
  transition: opacity .7s var(--ease), transform .7s var(--ease), border-color .5s, background .5s;
  transition-delay: calc(var(--i) * 90ms), calc(var(--i) * 90ms), 0s, 0s;
}
.src.is-hot { border-color: rgba(236, 150, 184, .5); background: rgba(207, 116, 152, .1); }
.src-ico {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: rgba(207, 116, 152, .13); color: #f0c9d8;
}
.src-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.src-name { display: block; font-size: 14px; font-weight: 600; color: #fff; line-height: 1.2; }
.src-sub { display: block; font-size: 11.5px; color: rgba(246, 234, 239, .5); line-height: 1.35; margin-top: 2px; }
.src-api {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 9.5px/1 var(--sans); letter-spacing: .1em; color: rgba(246, 234, 239, .42);
}
.src-api i { width: 6px; height: 6px; border-radius: 50%; background: #6fcf9f; box-shadow: 0 0 8px rgba(111, 207, 159, .7); }
.stage.is-anim.is-on .src.is-muted { opacity: .4; }
.src.is-muted .src-api i { background: rgba(230, 191, 206, .45); box-shadow: none; }
.src-sub { transition: opacity .25s; }
.src-sub.is-swap { opacity: 0; }
.src--more { border-style: dashed; background: transparent; }
.src--more .src-ico { background: transparent; border: 1px dashed rgba(230, 191, 206, .3); }
.src--more .src-api i { background: rgba(230, 191, 206, .5); box-shadow: none; }

/* Núcleo Ynventra */
.col-core { grid-area: c; display: flex; flex-direction: column; align-items: center; }
.core { position: relative; width: clamp(170px, 16vw, 210px); aspect-ratio: 1; display: grid; place-items: center; }
.core::before {
  content: ''; position: absolute; inset: -34%; border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 40, 90, .42) 0%, rgba(168, 40, 90, .12) 42%, transparent 70%);
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { transform: scale(.94); opacity: .85; } 50% { transform: scale(1.04); opacity: 1; } }
.core-disc {
  position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #3d1126, #1f0812 72%);
  border: 1px solid rgba(230, 191, 206, .16);
  box-shadow: inset 0 0 40px rgba(168, 40, 90, .28), 0 0 60px -10px rgba(168, 40, 90, .5);
}
.ring { position: absolute; border-radius: 50%; pointer-events: none; }
.ring-a { inset: -5%; border: 1px dashed rgba(230, 191, 206, .2); animation: spin 70s linear infinite; }
.ring-b { inset: -19%; border: 1px solid rgba(230, 191, 206, .08); animation: spin 24s linear infinite reverse; }
.ring-b::before {
  content: ''; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--rose); box-shadow: 0 0 12px var(--rose);
}
@keyframes spin { to { transform: rotate(360deg); } }
.core-pulse {
  position: absolute; inset: 8%; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(240, 160, 192, .7);
}
.core-mark { position: relative; width: 54%; overflow: visible; }
.core-node { transform-box: fill-box; transform-origin: center; }
.core-bars rect { transform-box: fill-box; transform-origin: 50% 100%; }
.core.is-busy .core-bars .b1 { animation: eq 1.6s ease-in-out infinite; }
.core.is-busy .core-bars .b2 { animation: eq 1.9s ease-in-out infinite .3s; }
.core.is-busy .core-bars .b3 { animation: eq 1.4s ease-in-out infinite .15s; }
@keyframes eq { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.72); } }

.core-meta { margin-top: 24px; text-align: center; min-height: 44px; }
.module {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  padding: 7px 13px 7px 10px; border-radius: 999px;
  border: 1px solid rgba(230, 191, 206, .2); background: rgba(255, 255, 255, .03);
  font-size: 12px; font-weight: 500; color: rgba(246, 234, 239, .62);
  transition: border-color .5s, background .5s, color .5s, box-shadow .5s;
}
.module svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.module.is-active {
  border-color: rgba(236, 150, 184, .6); background: rgba(207, 116, 152, .15); color: #fff;
  box-shadow: 0 0 26px -6px rgba(207, 116, 152, .7);
}
.core-op { font: 500 13px/1.4 var(--sans); color: rgba(246, 234, 239, .82); transition: opacity .3s, transform .3s; }
.core-op.is-out { opacity: 0; transform: translateY(4px); }
.core-count { font-size: 12px; color: rgba(246, 234, 239, .5); margin-top: 6px; }
.core-count b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Cuadro de mando de salida */
.dash-wrap { grid-area: d; position: relative; }
.dash-wrap::before {
  content: ''; position: absolute; inset: 10% -6% -4%; border-radius: 40px; z-index: -1;
  background: radial-gradient(closest-side, rgba(207, 116, 152, .22), transparent);
  filter: blur(20px);
}
.dash {
  background: var(--paper); color: var(--ink);
  border-radius: 16px; padding: 16px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .07);
  transition: opacity .9s var(--ease) .35s, transform .9s var(--ease) .35s;
}
.dash-top {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 0 2px 12px; margin-bottom: 12px; border-bottom: 1px solid var(--line);
}
.dash-title { display: block; font-size: 13.5px; font-weight: 600; color: var(--wine); }
.dash-sub { display: block; font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.live {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 4px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 500; color: var(--ok); background: rgba(47, 122, 87, .09);
}
.live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: ping-ok 2s infinite; }
@keyframes ping-ok { 0% { box-shadow: 0 0 0 0 rgba(47, 122, 87, .45); } 100% { box-shadow: 0 0 0 7px rgba(47, 122, 87, 0); } }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi {
  position: relative; min-width: 0;
  padding: 10px 11px; border-radius: 10px;
  background: #fff; border: 1px solid rgba(57, 3, 26, .07);
  transition: background .7s, border-color .7s;
}
.kpi-l {
  display: block; font-size: 10px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kpi-v {
  display: block; margin-top: 5px; white-space: nowrap;
  font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--wine);
  font-variant-numeric: tabular-nums; transition: opacity .4s;
}
.kpi-v small { font-size: 12px; font-weight: 500; margin-left: 2px; }
.kpi-v small:first-child { margin: 0 1px 0 0; }   /* símbolo delante del número (versión en inglés: €120) */
.kpi-d { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 500; white-space: nowrap; transition: opacity .4s; }
.up { color: var(--ok); }
.down { color: var(--crit); }
.flat { color: var(--ink-3); }
.kpi.is-alert { border-color: rgba(194, 51, 77, .32); background: linear-gradient(#fff, #fff6f8); }
.kpi.is-alert::before {
  content: ''; position: absolute; top: 10px; right: 10px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--crit); animation: ping-crit 1.8s infinite;
}
@keyframes ping-crit { 0% { box-shadow: 0 0 0 0 rgba(194, 51, 77, .5); } 100% { box-shadow: 0 0 0 8px rgba(194, 51, 77, 0); } }
.kpi.is-tick { background: #fdf0f5; }
.kpi.is-off .kpi-v, .kpi.is-off .kpi-d { opacity: 0; }
.kpi.is-off::after {
  content: ''; position: absolute; left: 11px; right: 38%; top: 32px; height: 15px; border-radius: 4px;
  background: linear-gradient(90deg, #f3e8ed 0%, #fbf6f8 50%, #f3e8ed 100%) 0 0 / 200% 100%;
  animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.forecast { margin-top: 12px; padding: 10px 11px 9px; border-radius: 10px; background: #fff; border: 1px solid rgba(57, 3, 26, .07); }
.fc-h { display: flex; justify-content: space-between; align-items: center; font-size: 10px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.fc-ai { font: 600 9.5px/1 var(--sans); letter-spacing: .08em; color: var(--berry); background: var(--blush); padding: 3px 6px; border-radius: 4px; }
.fc-bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 38px; }
.fc-bars i {
  display: block; height: calc((var(--h) - 50) * 2%); border-radius: 3px 3px 1px 1px;
  background: #ecc9d7; transform-origin: bottom;
  transition: transform .8s var(--ease) calc(var(--i) * 40ms);
}
.fc-bars i.hi { background: var(--berry); }

.alarms-h {
  display: flex; justify-content: space-between; align-items: center;
  margin: 14px 2px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.alarms-n { padding: 3px 8px; border-radius: 999px; background: rgba(194, 51, 77, .09); color: var(--crit); letter-spacing: 0; text-transform: none; }
.alarm-list { list-style: none; height: calc(4 * 50px); overflow: hidden; }
.alarm {
  display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: start;
  height: 50px; padding: 9px 4px 0; border-top: 1px solid var(--line);
  transition: opacity .5s var(--ease), transform .5s var(--ease), background 1s;
}
.alarm.is-new { background: #fdf2f6; }
.sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; }
.sev.crit { background: var(--crit); box-shadow: 0 0 0 3px rgba(194, 51, 77, .13); }
.sev.warn { background: var(--warn); box-shadow: 0 0 0 3px rgba(192, 127, 29, .13); }
.sev.ok   { background: var(--ok);   box-shadow: 0 0 0 3px rgba(47, 122, 87, .13); }
.alarm-t { display: block; font-size: 12.5px; font-weight: 500; line-height: 1.3; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alarm-x { display: inline-block; margin-top: 4px; padding: 2px 6px; border-radius: 4px; font: 500 10px/1.3 var(--sans); color: var(--plum); background: var(--blush); }
.alarm-a { font-size: 11px; font-weight: 600; color: var(--berry); white-space: nowrap; margin-top: 1px; }

/* Estados de la animación (solo con JS y sin "reducir movimiento") */
.stage.is-anim .src { opacity: 0; transform: translateX(-14px); }
.stage.is-anim.is-on .src { opacity: 1; transform: none; }
.stage.is-anim .dash { opacity: 0; transform: translateY(16px) scale(.985); }
.stage.is-anim.is-on .dash { opacity: 1; transform: none; }
.stage.is-anim .alarm { opacity: 0; transform: translateY(6px); }
.stage.is-anim .alarm.is-in { opacity: 1; transform: none; }
.stage.is-anim .forecast:not(.is-in) .fc-bars i { transform: scaleY(0); }

.stage-note { max-width: 640px; margin: clamp(36px, 5vw, 56px) auto 0; text-align: center; font-size: 15px; line-height: 1.65; color: rgba(246, 234, 239, .66); }

/* Pasos */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: clamp(60px, 7vw, 92px); }
.step { position: relative; padding-top: 22px; border-top: 1px solid rgba(246, 234, 239, .13); transition: opacity .7s; }
.step::before {
  content: ''; position: absolute; top: -1px; left: 0; width: 100%; height: 1px;
  background: var(--rose); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease);
}
.step h3 { font-family: var(--serif); font-weight: 400; font-size: 1.95rem; line-height: 1.1; color: #fff; margin: 0 0 10px; }
.step p { font-size: 15px; line-height: 1.65; color: rgba(246, 234, 239, .62); }
.js .stage-sec.is-anim .step { opacity: .42; }
.js .stage-sec.is-anim .step.is-active { opacity: 1; }
.step.is-active::before, .stage-sec:not(.is-anim) .step::before { transform: scaleX(1); }

/* ─────────────────────────────────────
   ANTES / DESPUÉS
───────────────────────────────────── */
.compare { background: var(--paper); }
.cmp-head { max-width: 560px; margin: 0 auto clamp(44px, 6vw, 72px); }
.cmp-anim { width: 100%; height: auto; overflow: visible; }
.ca-tile { fill: #fff; stroke: rgba(57, 3, 26, .12); }
.ca-icon { fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ca-ico {
  transform-box: fill-box; transform-origin: center;
  animation: ca-gather 6s var(--ease) infinite; animation-delay: calc(var(--i) * 70ms);
}
.ca-bob { animation: ca-bob var(--b) ease-in-out infinite alternate; }
@keyframes ca-bob { from { transform: translateY(-3px); } to { transform: translateY(3px); } }
@keyframes ca-gather {
  0%, 38% { transform: translate(0, 0) scale(1); opacity: 1; }
  56% { transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px)) scale(.35); opacity: .9; }
  60% { transform: translate(calc(var(--dx) * 1px), calc(var(--dy) * 1px)) scale(.2); opacity: 0; }
  61%, 78% { transform: translate(0, 0) scale(.6); opacity: 0; }
  92%, 100% { transform: translate(0, 0) scale(1); opacity: 1; }
}
.ca-flow { fill: none; stroke: var(--berry); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: .1 10; opacity: .75; animation: ca-flow .9s linear infinite; }
@keyframes ca-flow { to { stroke-dashoffset: -10.1; } }
.ca-chev { fill: none; stroke: var(--berry); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.ca-hub-bg { fill: #fff; stroke: rgba(168, 40, 90, .28); stroke-width: 1.2; }
.ca-hub-in { transform-box: fill-box; transform-origin: center; animation: ca-hub 6s var(--ease) infinite; }
@keyframes ca-hub { 0%, 56% { transform: scale(1); } 64% { transform: scale(1.1); } 74%, 100% { transform: scale(1); } }
.ca-ring { fill: none; stroke: var(--berry); stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: ca-ring 6s ease-out infinite; }
@keyframes ca-ring { 0%, 58% { transform: scale(1); opacity: 0; } 62% { opacity: .55; } 90%, 100% { transform: scale(1.6); opacity: 0; } }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cmp { border-radius: 22px; padding: clamp(28px, 4vw, 44px); }
.cmp--before { background: #f4eef1; border: 1px solid var(--line); }
.cmp--after { background: var(--wine); color: #f6eaef; box-shadow: 0 34px 70px -34px rgba(57, 3, 26, .7); }
.cmp-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; }
.cmp-tabs span {
  font: 400 12px/1 var(--sans); padding: 8px 11px; border-radius: 8px 8px 3px 3px;
  background: #fff; border: 1px solid rgba(57, 3, 26, .08); color: var(--ink-3);
}
.cmp--before .cmp-tabs span:nth-child(odd) { transform: rotate(-1.2deg); }
.cmp--before .cmp-tabs span:nth-child(even) { transform: rotate(1deg) translateY(2px); }
.cmp--after .cmp-tabs span { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.cmp--after .cmp-tabs svg { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cmp--after .cmp-tabs .cmp-saas { background: rgba(207, 116, 152, .18); border-color: rgba(207, 116, 152, .35); }
.cmp h3 { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.cmp--after h3 { color: var(--rose); }
.cmp ul { list-style: none; margin-top: 18px; }
.cmp li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.cmp--after li { color: rgba(246, 234, 239, .88); border-top-color: rgba(246, 234, 239, .14); }

/* ─────────────────────────────────────
   VENTAJAS
───────────────────────────────────── */
.benefits { background: #fff; padding-bottom: clamp(64px, 8vw, 100px); }
.bf-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
}
.bf { background: #fff; padding: clamp(28px, 3vw, 38px) clamp(24px, 3vw, 34px); transition: background .3s; }
.bf:hover { background: #fdf7f9; }
.bf-ico { color: var(--berry); margin-bottom: 20px; }
.bf-ico svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bf h3 { font-size: 17px; font-weight: 600; letter-spacing: -.005em; color: var(--wine); margin-bottom: 8px; }
.bf p { font-size: 15px; line-height: 1.65; color: var(--ink-2); }

.ribbon { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; margin-top: 48px; list-style: none; font-size: 14px; color: var(--ink-2); }
.ribbon li { display: inline-flex; align-items: center; gap: 10px; }
.ribbon svg { width: 18px; height: 18px; fill: none; stroke: var(--berry); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ─────────────────────────────────────
   SOLICITA UNA DEMO
───────────────────────────────────── */
.demo { background: linear-gradient(180deg, #fff 0%, var(--blush) 100%); padding-top: clamp(56px, 7vw, 96px); }
.demo-grid { display: grid; grid-template-columns: 1fr 1.12fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.demo-copy { position: sticky; top: 120px; }
.demo-copy .sec-lead { margin-top: 22px; max-width: 470px; }
.demo-list { list-style: none; margin-top: 30px; max-width: 470px; border-bottom: 1px solid var(--line); }
.demo-list li { padding: 13px 0; border-top: 1px solid var(--line); font-size: 15.5px; color: var(--ink); }
.demo-mail { margin-top: 28px; font-size: 14.5px; color: var(--ink-2); }
.demo-mail a { color: inherit; text-decoration-color: currentColor; text-underline-offset: 4px; }

.form-card {
  background: #fff; border-radius: 24px; padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--line); box-shadow: 0 34px 80px -44px rgba(57, 3, 26, .38);
}
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label, .chips legend { font-size: 13px; font-weight: 500; color: var(--ink); }
.opt { font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 15px/1.4 var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid rgba(57, 3, 26, .15); border-radius: 11px;
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s, background .2s;
}
.field select {
  -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8285a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background-color: #fff; border-color: var(--berry); box-shadow: 0 0 0 4px rgba(168, 40, 90, .12);
}
.field input:user-invalid { border-color: var(--crit); }

.chips { border: 0; min-width: 0; }
.chips legend { margin-bottom: 9px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; cursor: pointer; user-select: none;
  font-size: 13.5px; color: var(--ink-2); border: 1px solid rgba(57, 3, 26, .15); background: var(--paper);
  transition: background .2s, color .2s, border-color .2s;
}
.chip span:hover { border-color: var(--rose); }
.chip input:checked + span { background: var(--wine); border-color: var(--wine); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--berry); outline-offset: 2px; }

.consent { display: grid; grid-template-columns: 18px 1fr; gap: 11px; align-items: start; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--wine); cursor: pointer; }
.consent a { color: inherit; text-underline-offset: 3px; }
.legal { font-size: 11.5px; line-height: 1.55; color: var(--ink-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot { flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-foot .btn[disabled] { opacity: .7; cursor: progress; transform: none; }
.form-status { font-size: 14px; color: var(--ink-2); }
.form-status.is-error { color: var(--crit); }
.form-status a { color: inherit; }

.form-done { text-align: center; padding: clamp(20px, 5vw, 48px) 8px; }
.form-done svg { width: 64px; height: 64px; margin: 0 auto 22px; padding: 16px; border-radius: 50%; background: var(--blush); fill: none; stroke: var(--berry); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.form-done h3 { font-family: var(--serif); font-weight: 400; font-size: 2.2rem; color: var(--wine); line-height: 1.1; }
.form-done p { color: var(--ink-2); margin-top: 12px; }

/* ─────────────────────────────────────
   PIE
───────────────────────────────────── */
.footer { background: var(--paper); color: var(--ink-2); font-size: 14px; padding: 56px 0 40px; border-top: 1px solid var(--line); }
.f-top { display: flex; justify-content: space-between; align-items: center; gap: 24px 40px; flex-wrap: wrap; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.f-top img { height: 60px; width: auto; }
.f-tag { max-width: 460px; line-height: 1.6; }
.f-tag a { color: inherit; text-decoration-color: currentColor; text-underline-offset: 4px; }
.f-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-top: 24px; font-size: 12.5px; }
.f-links { display: flex; gap: 24px; flex-wrap: wrap; }
.f-links a { text-decoration: none; color: inherit; }
.f-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ─────────────────────────────────────
   RESPONSIVE
───────────────────────────────────── */
@media (max-width: 1060px) {
  .stage { --flow: v; grid-template-columns: 1fr; grid-template-areas: "l1" "s" "c" "d"; row-gap: 0; }
  .lab-2, .lab-3 { display: none; }
  .lab-1 { margin-bottom: 16px; justify-self: center; }
  .sources { grid-template-columns: repeat(3, 1fr); }
  .stage.is-anim .src { transform: translateY(10px); }
  .col-core { padding-top: 92px; }
  .core { width: 170px; }
  .dash-wrap { padding-top: 76px; width: 100%; max-width: 560px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .demo-grid { grid-template-columns: 1fr; }
  .demo-copy { position: static; }
  .bf-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .cmp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .nav-in, .nav.is-scrolled .nav-in { height: 72px; gap: 12px; }
  .nav-links { gap: 18px; }
  .brand img, .nav.is-scrolled .brand img { height: 44px; }
  .hero { padding: 108px 0 28px; }
  .hero .lead { font-size: 1rem; }
  .hero h1 { white-space: normal; font-size: 1.1rem; text-wrap: balance; }
  .hero-sub { font-size: .78rem; letter-spacing: .1em; }
  .f-top img { height: 48px; }
  .sources { grid-template-columns: 1fr 1fr; gap: 8px; }
  .src { grid-template-columns: 30px 1fr auto; gap: 10px; padding: 10px; }
  .src-ico { width: 30px; height: 30px; }
  .src-name { font-size: 13px; }
  .src-sub { font-size: 11px; }
  .src-api b { display: none; }
  .col-core { padding-top: 76px; }
  .core { width: 150px; }
  .dash-wrap { padding-top: 64px; }
  .dash { padding: 12px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .alarm-list { height: calc(4 * 64px); }
  .alarm { height: 64px; grid-template-columns: 8px 1fr; }
  .alarm-t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .alarm-a { display: none; }
  .bf-grid { grid-template-columns: 1fr; }
  .fgrid { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
}

@media (max-width: 480px) {
  .cta-full { display: none; }
  .cta-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
