/* ==========================================================================
   Selrach · home — dirección «vidrio, luz y datos»
   Composición a escala de cartel sobre tinta profunda. Lo compartido (tokens,
   botones, formularios, informe, cabecera, pie) está en global.css.
   Movimiento: todo lo animado vive en el bloque final, dentro de
   prefers-reduced-motion: no-preference y @supports; sin soporte se ve completo.
   ========================================================================== */

/* 0. Tipografía de cartel y ritmo de sección -------------------------------- */
.title-xl {
  font-size: var(--fs-title);
  font-weight: 760;
  font-stretch: 118%;
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.title-lg {
  font-size: clamp(2rem, 1rem + 3.4vw, 4.25rem);
  font-weight: 740;
  font-stretch: 114%;
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.title-md { font-size: clamp(1.5rem, 1rem + 1.6vw, 2.25rem); font-weight: 700; font-stretch: 110%; letter-spacing: -0.02em; }
.hs, .cap, .mt, .ib, .sx, .mf, .tm, .rs { padding-block: clamp(5rem, 3rem + 8vw, 10rem); }
.depth {
  transform: translate3d(calc(var(--px, 0) * var(--d) * -40px), calc(var(--py, 0) * var(--d) * -30px), 0);
  transition: transform 0.9s var(--ease-out);
}

/* Botón de pausa del movimiento continuo (hero y cinta; WCAG 2.2.2). Muestra «Pausa» o
   «Reproducir» según su data-state, que pone el script de cada componente. */
.play-btn {
  flex: none;
  display: inline-flex;
  min-height: 2rem;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: rgb(255 255 255 / 0.03);
  color: var(--text);
  font-size: var(--fs-xs);
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-med) var(--ease-out), background-color var(--dur-med) var(--ease-out);
}
.play-btn:hover { border-color: var(--border-strong); background-color: rgb(255 255 255 / 0.07); }
.play-btn__on,
.play-btn__off { display: inline-flex; align-items: center; gap: 0.4rem; }
.play-btn .icon { width: 0.875rem; height: 0.875rem; }
.play-btn[data-state="on"] .play-btn__off,
.play-btn[data-state="off"] .play-btn__on { display: none; }

/* 1. Hero: texto + escena en cuatro actos ----------------------------------- */
/* Izquierda solo texto; derecha una escena que se transforma con --p (0→1). Ningún efecto pasa
   por encima del texto: la atmósfera se funde dentro del hueco entre columnas. Nada se recorta
   con bordes duros: todos los límites son fundidos (máscaras), salvo el borde de la pantalla. */
.hx {
  --p: 0;
  --hx-gap: clamp(2.5rem, 1rem + 3vw, 5rem);
  /* Tramos de cada acto, derivados de --p, para que cada pieza sepa cuándo aparecer */
  --diag: clamp(0, min((var(--p) - 0.26) * 8, (0.62 - var(--p)) * 8), 1);
  --sellado: clamp(0, (var(--p) - 0.55) * 5, 1);
  --crece: clamp(0, (var(--p) - 0.78) / 0.2, 1);
  position: relative;
}
.hx__inner { position: relative; overflow: hidden; }
.hx__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 55% at 76% 40%, rgb(48 216 96 / calc(0.06 + var(--p) * 0.12)), transparent 70%),
    radial-gradient(22% 28% at 72% 62%, rgb(240 168 0 / calc(0.1 - var(--p) * 0.1)), transparent 70%);
  pointer-events: none;
}
.hx__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.04) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(45% 60% at 75% 45%, #000, transparent 75%);
  mask-image: radial-gradient(45% 60% at 75% 45%, #000, transparent 75%);
}
.hx__grid {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 2rem + 2vw, 4rem);
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}

/* Texto */
.hx__text { display: flex; flex-direction: column; align-items: flex-start; }
.hx__title { margin-top: var(--sp-5); font-weight: 800; font-stretch: 118%; line-height: 0.9; letter-spacing: -0.04em; }
.hx__line { display: block; font-size: clamp(3rem, 1.2rem + 7vw, 10rem); }
.hx__line--sm {
  margin-bottom: 0.3em;
  font-size: clamp(1.3rem, 0.9rem + 1.4vw, 2.2rem);
  font-weight: 650;
  font-stretch: 110%;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-muted);
}
.hx__line--leak { color: var(--leak); transition: color 0.8s var(--ease-out); }
.hx[data-state="sistema"] .hx__line--leak { color: var(--accent); }
.drip { position: relative; display: inline-block; }
.drip::after {
  content: "";
  position: absolute;
  top: 76%;
  left: 52%;
  width: 0.12em;
  height: 0.17em;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
}
.hx__lead { max-width: 46ch; margin: var(--sp-6) 0 var(--sp-6); font-size: var(--fs-lg); line-height: 1.55; color: var(--text-muted); }
.hx__note { margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--text-muted); }
.hx__note .num { color: var(--text); }

/* Visual: atmósfera a sangre + escena compuesta por capas ---------------------- */
.hx__visual { position: relative; display: grid; gap: var(--sp-4); align-content: center; }
.hx__visual > .hx__stage,
.hx__visual > .hx__panel { position: relative; z-index: 1; }

/* Atmósfera: haces, partículas y resplandores. Sangra hasta los bordes de la pantalla y se
   funde en todas direcciones: nunca deja un rectángulo visible. */
.hx__atmos {
  position: absolute;
  z-index: 0;
  inset: -3rem calc(-1 * var(--gutter));
  pointer-events: none;
  -webkit-mask-image: radial-gradient(70% 65% at 55% 45%, #000 45%, transparent 100%);
  mask-image: radial-gradient(70% 65% at 55% 45%, #000 45%, transparent 100%);
}
.hx__atmos picture { display: contents; }
.hx__atmos-beams,
.hx__atmos-particles { position: absolute; inset: 0; }
.hx__atmos-beams { opacity: calc(0.4 + var(--p) * 0.4); mix-blend-mode: screen; }
.hx__atmos-beams .hx__fill { transform-origin: 60% 0; }
.hx__atmos-particles { opacity: 0.55; }
.hx__fill { width: 100%; height: 100%; object-fit: cover; }
.hx__glow { position: absolute; border-radius: 50%; filter: blur(40px); }
.hx__glow--leak {
  left: 30%;
  bottom: 12%;
  width: 45%;
  height: 30%;
  background: radial-gradient(closest-side, rgb(240 168 0 / 0.22), transparent);
  opacity: calc(1 - var(--sellado));
}
.hx__glow--control {
  top: 8%;
  right: 6%;
  width: 60%;
  height: 55%;
  background: radial-gradient(closest-side, rgb(48 216 96 / 0.26), transparent);
  opacity: calc(0.25 + var(--sellado) * 0.75);
}

/* Escena: las piezas se posicionan en % del marco, que conserva la proporción del render; las
   distancias de caída usan unidades del propio marco (cqh/cqw). */
.hx__stage { position: relative; width: min(100%, 22rem); margin-inline: auto; }
.hx__frame { position: relative; width: 100%; aspect-ratio: 1200 / 1419; container-type: size; }
.hx__stage picture { display: contents; }
.hx__pipe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hx__float {
  position: absolute;
  inset: 0;
  scale: calc(1 + var(--p) * 0.04);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 24%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 24%);
}
.hx__pipe--sellada { opacity: var(--sellado); }

/* Suelo: rejilla en perspectiva que fluye bajo la tubería, resplandor y charco */
.hx__ground { position: absolute; inset: 0; pointer-events: none; }
.hx__grid-floor {
  position: absolute;
  bottom: -6%;
  left: -55%;
  right: -55%;
  height: 34%;
  background-image:
    linear-gradient(rgb(48 216 96 / calc(0.16 + var(--sellado) * 0.18)) 1px, transparent 1px),
    linear-gradient(90deg, rgb(48 216 96 / calc(0.16 + var(--sellado) * 0.18)) 1px, transparent 1px);
  background-size: 9cqw 9cqw;
  transform: perspective(26cqw) rotateX(64deg);
  transform-origin: 50% 100%;
  -webkit-mask-image: radial-gradient(50% 90% at 50% 100%, #000 25%, transparent 100%);
  mask-image: radial-gradient(50% 90% at 50% 100%, #000 25%, transparent 100%);
}
.hx__floor {
  position: absolute;
  right: 4%;
  bottom: 0;
  left: 14%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(240 168 0 / calc(0.24 * (1 - var(--sellado)))), rgb(48 216 96 / calc(0.05 + var(--sellado) * 0.16)) 60%, transparent);
  filter: blur(6px);
}
.hx__puddle {
  position: absolute;
  bottom: 0;
  left: 32%;
  width: 34%;
  height: auto;
  opacity: 0.9;
  mix-blend-mode: screen;
  transform-origin: 50% 70%;
  transition: opacity 1.1s var(--ease-out), transform 1.4s var(--ease-out);
}
.hx[data-state="sistema"] .hx__puddle { opacity: 0; transform: scale(0.35); }

/* Capas SVG: misma caja que el marco (viewBox 1200×1419) */
.hx__svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hx__growth { fill: none; stroke: var(--c-green-400); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--crece)); }
.hx__growth--glow { stroke-width: 22; opacity: 0.25; filter: blur(10px); }
/* El escaneo es un barrido único al entrar en el acto 2 (bloque de movimiento); quieto no se ve */
.hx__scan { opacity: 0; }
.hx__scan line { stroke: url(#hx-scan-line); stroke-width: 3; }
.hx__scan rect { fill: url(#hx-scan-band); }
.hx__reticle { opacity: var(--diag); transform-box: fill-box; transform-origin: center; scale: calc(1.6 - var(--diag) * 0.6); }
.hx__reticle circle,
.hx__reticle path { fill: none; stroke: var(--c-amber-400); stroke-width: 3; }
.hx__reticle-outer { stroke-dasharray: 10 14; }
.hx__callout { opacity: var(--diag); }
.hx__callout path { fill: none; stroke: var(--c-amber-400); stroke-width: 2.5; }
/* Tamaños en unidades del viewBox, que escalan con el marco: dependen de su ancho, no de la
   pantalla. Marco mediano (móvil, portátiles): más unidades para no bajar de ~11 px. Marco
   grande: se reducen. Marco pequeño (portátiles bajos, < 300 px): no caben legibles sin tapar la
   tubería, así que se ocultan; el panel señala el mismo tramo (ver .hx__leak más abajo). */
.hx__callout-k { font-family: var(--font-mono); font-size: 38px; letter-spacing: 0.08em; fill: var(--c-amber-400); }
.hx__callout-v { font-family: var(--font-sans); font-size: 44px; font-weight: 700; fill: #ECF3EF; }
@container (min-width: 27.5rem) {
  .hx__callout-k { font-size: 30px; }
  .hx__callout-v { font-size: 40px; }
}
@container (max-width: 18.75rem) {
  .hx__callout,
  .hx__badge text,
  .hx__badge path { display: none; }
}
/* La etiqueta del acto 4 aparece cuando la línea de crecimiento llega a su vértice (~68 % del trazo) */
.hx__badge { opacity: clamp(0, (var(--crece) - 0.6) * 4, 1); }
.hx__badge path { fill: none; stroke: var(--c-green-400); stroke-width: 2.5; }
.hx__badge circle { fill: var(--c-green-400); }
.hx__badge .hx__callout-k { fill: var(--c-green-400); }

/* Barridos de luz sobre la tubería: la misma imagen aclarada y revelada por una banda diagonal */
.hx__shimmer,
.hx__pulse {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(45deg, transparent 40%, #000 50%, transparent 60%);
  mask-image: linear-gradient(45deg, transparent 40%, #000 50%, transparent 60%);
  -webkit-mask-size: 300% 300%;
  mask-size: 300% 300%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: 100% 0%;
  mask-position: 100% 0%;
}
.hx__shimmer { opacity: calc(0.9 * (1 - var(--sellado))); mix-blend-mode: screen; }
.hx__shimmer .hx__pipe { filter: brightness(2.4) saturate(0.4); }
.hx__pulse { opacity: var(--sellado); mix-blend-mode: screen; }
.hx__pulse .hx__pipe { filter: brightness(1.9) saturate(1.3); }
.hx__spark {
  position: absolute;
  top: 67.5%;
  left: 48.3%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(240 168 0 / 0.85), transparent);
  opacity: clamp(0, 1 - (var(--p) - 0.45) * 8, 1);
}

/* Efectos: gotas, salpicadura y monedas (salen de la grieta) */
.hx__fx { position: absolute; inset: 0; pointer-events: none; }
.hx__drips { position: absolute; top: 68.8%; left: 49.2%; opacity: clamp(0, 1 - (var(--p) - 0.45) * 8, 1); }
.hx__drop { position: absolute; top: 0; left: -10px; width: 20px; height: auto; opacity: 0; }
.hx__drop:nth-child(2) { left: -7px; width: 14px; }
.hx__drop:nth-child(3) { left: -6px; width: 12px; }
.hx__splash { position: absolute; top: 86%; left: 41%; width: 16%; height: auto; opacity: 0; transform-origin: 50% 100%; }
.hx__coin { position: absolute; top: 63%; left: 43%; width: 12%; height: auto; opacity: 0; }
.hx__coin--1 { --dx: -8cqw; --rot: 260deg; --sx: -4cqw; --ex: 36cqw; }
.hx__coin--2 { width: 10%; --dx: 7cqw; --rot: -320deg; --sx: -12cqw; --ex: 30cqw; }
.hx__coin--3 { width: 7.5%; --dx: 2cqw; --rot: 420deg; --sx: 4cqw; --ex: 24cqw; }
.hx[data-state="sistema"] .hx__coin { filter: drop-shadow(0 0 10px rgb(48 216 96 / 0.7)); }

/* El sello: fuera de escena en «Hoy»; en «Con sistema» entra girando y se clava en la grieta */
.hx__seal-wrap { position: absolute; inset: 0; pointer-events: none; }
.hx__seal {
  position: absolute;
  top: calc(67.5% - 9%);
  left: calc(48.3% - 10%);
  width: 20%;
  height: auto;
  opacity: 0;
  transform: translate(140%, -80%) rotate(150deg) scale(0.4);
  filter: drop-shadow(0 0 16px rgb(48 216 96 / 0.6));
  transition: transform 0.95s var(--ease-spring) 0.1s, opacity 0.35s var(--ease-out) 0.1s;
}
.hx[data-state="sistema"] .hx__seal { opacity: 1; transform: none; }
.hx__seal-wrap::after {
  content: "";
  position: absolute;
  top: 67.5%;
  left: 48.3%;
  width: 24%;
  aspect-ratio: 1;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  translate: -50% -50%;
}

/* Cristales rotos en primer plano */
.hx__shards { position: absolute; inset: 0; pointer-events: none; }
.hx__shard { position: absolute; height: auto; opacity: 0.85; transition: opacity 1s var(--ease-out); }
.hx__shard--1 { top: 5%; left: 2%; width: 14%; filter: blur(1.5px); }
.hx__shard--2 { top: 40%; right: 0; width: 10%; }
.hx__shard--3 { bottom: 8%; left: 4%; width: 9%; filter: blur(2px); }
.hx[data-state="sistema"] .hx__shard { opacity: 0.4; }

/* Panel: lectura del circuito bajo la escena ------------------------------------------------
   --tinte es el color del estado (ámbar en la fuga, verde con sistema). Se registra como color
   para que la transición entre estados sea un fundido y no un salto. */
@property --tinte { syntax: '<color>'; inherits: true; initial-value: #F0A800; }
.hx__panel {
  --tinte: var(--leak);
  position: relative;
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(110% 90% at 0% 0%, color-mix(in srgb, var(--tinte) 9%, transparent), transparent 62%),
    linear-gradient(180deg, rgb(255 255 255 / 0.045), transparent 40%),
    var(--surface);
  box-shadow: 0 1.5rem 3rem -1.5rem rgb(0 0 0 / 0.75), inset 0 1px 0 rgb(255 255 255 / 0.05);
  transition: --tinte 0.8s var(--ease-out);
}
.hx[data-state="sistema"] .hx__panel { --tinte: var(--accent); }
/* Filo de luz en el borde superior, del color del estado */
.hx__panel::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tinte), transparent);
  opacity: 0.8;
  pointer-events: none;
}

/* Sello de ficticio sobre el borde superior (fondo opaco: se lee sobre la línea y la escena) */
.hx__stamp {
  position: absolute;
  top: 0;
  left: var(--sp-4);
  padding: 0.1rem 0.45rem;
  background: var(--surface);
  font-size: 0.625rem;
  translate: 0 -55%;
}
/* Cabecera: lectura del acto (con el punto «en directo») y pausa */
.hx__head { display: flex; align-items: center; gap: var(--sp-3); }
.hx__live { flex: none; width: 7px; height: 7px; margin-top: 0.5em; border-radius: 50%; background: var(--tinte); }

/* Lectura del acto: las cuatro frases ocupan la misma celda (el panel no cambia de alto) */
.hx__reading { display: flex; flex: 1; align-items: start; gap: var(--sp-2); min-width: 0; margin: 0; font-size: clamp(0.95rem, 0.75rem + 0.3vw, 1.15rem); font-weight: 650; line-height: 1.3; color: var(--text); }
.hx__says { display: grid; flex: 1; }
.hx__say {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  translate: 0 0.35em;
  transition: opacity 0.3s var(--ease-out), translate 0.3s var(--ease-out), visibility 0s linear 0.3s;
}
.hx[data-step="fuga"] .hx__say--fuga,
.hx[data-step="diagnostico"] .hx__say--diagnostico,
.hx[data-step="sistema"] .hx__say--sistema,
.hx[data-step="crecimiento"] .hx__say--crecimiento {
  opacity: 1;
  visibility: visible;
  translate: none;
  transition: opacity 0.5s var(--ease-out) 0.15s, translate 0.5s var(--ease-out) 0.15s, visibility 0s;
}

/* Diagrama del circuito: etapas arriba, banda de flujo (azul = dato), chorros de pérdida (ámbar)
   y, debajo, lo que se pierde en cada tramo o el control que lo cierra (verde). */
.hx__flow { --flow-h: 3rem; display: grid; }
.hx__nodes { position: relative; height: 2.5rem; margin: 0; padding: 0; list-style: none; }
.hx__node {
  position: absolute;
  bottom: 0.3rem;
  left: calc(var(--i) * 100% / 3);
  display: grid;
  justify-items: center;
  line-height: 1.1;
  translate: -50% 0;
}
.hx__node:first-child { justify-items: start; translate: none; }
.hx__node:last-child { right: 0; left: auto; justify-items: end; translate: none; }
.hx__node-v { display: flex; align-items: baseline; gap: 0.2em; font-size: var(--fs-lg); font-weight: 700; color: var(--text); transition: color 0.6s var(--ease-out), text-shadow 0.6s var(--ease-out); }
/* «obj.» solo existe en el acto 4: fuera de él no ocupa sitio (el fundido va en el bloque de movimiento) */
.hx__node-obj { display: none; font-size: 0.625rem; font-weight: 500; color: var(--accent); }
.hx[data-step="crecimiento"] .hx__node-obj { display: inline; }
.hx[data-step="crecimiento"] .hx__node:last-child .hx__node-v { color: var(--accent); text-shadow: 0 0 1rem rgb(48 216 96 / 0.55); }
.hx__node-k { font-size: 0.6875rem; color: var(--text-muted); white-space: nowrap; }

.hx__flow-svg { display: block; width: 100%; height: var(--flow-h); overflow: visible; }
.hx__band--hoy { fill: url(#hx-band-hoy); }
.hx__band--obj { fill: url(#hx-band-obj); opacity: 0; transition: opacity 0.9s var(--ease-out); }
/* Acto 4: la banda de objetivos asoma alrededor de la actual; lo verde es el margen que se gana */
.hx[data-step="crecimiento"] .hx__band--obj { opacity: 1; }
.hx__leak-stream {
  fill: url(#hx-leak);
  transform-box: fill-box;
  transform-origin: 50% 0;
  transition: scale 0.7s var(--ease-out), opacity 0.7s var(--ease-out);
}
.hx[data-step="diagnostico"] .hx__leak-stream:nth-of-type(n + 2) { opacity: 0.3; }
.hx[data-state="sistema"] .hx__leak-stream { opacity: 0; scale: 1 0; }
.hx__sheen { fill: url(#hx-sheen); }
.hx__sheen-g { clip-path: url(#hx-clip-hoy); opacity: 0.55; }
.hx[data-step="crecimiento"] .hx__sheen-g { clip-path: url(#hx-clip-obj); }

.hx__leaks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.hx__leak {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 0.15rem;
  padding: var(--sp-1) var(--sp-1) var(--sp-2);
  border-radius: var(--r-md);
  text-align: center;
  transition: background-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
/* Gota que cae por el chorro hasta cada fuga (solo en «hoy»; la animación va en el bloque de movimiento) */
.hx__leak::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 7px;
  margin-left: -2.5px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--leak);
  opacity: 0;
  pointer-events: none;
}
/* Con sistema, cada control se acopla a su tramo: punto sobre la banda y trazo hasta la etiqueta */
.hx__leak::after {
  content: "";
  position: absolute;
  top: calc(-1 * var(--caida) * var(--flow-h));
  left: 50%;
  width: 7px;
  height: calc(var(--caida) * var(--flow-h) + var(--sp-1) + 0.2rem);
  margin-left: -3.5px;
  background:
    radial-gradient(circle 3px at 50% 3px, var(--accent) 95%, transparent),
    linear-gradient(90deg, transparent 3px, rgb(48 216 96 / 0.7) 3px 4px, transparent 4px);
  transform-origin: 50% 0;
  scale: 1 0;
  opacity: 0;
  transition: scale 0.6s var(--ease-out) 0.35s, opacity 0.3s var(--ease-out) 0.35s;
  pointer-events: none;
}
.hx[data-state="sistema"] .hx__leak::after { scale: 1 1; opacity: 1; }
.hx__leak-v,
.hx__leak-t { display: grid; justify-items: center; }
.hx__leak-v { min-height: 1.4rem; align-items: center; font-size: 1.125rem; font-weight: 700; line-height: 1.1; color: var(--leak); }
.hx__leak-ok {
  padding: 0.15rem 0.5rem;
  border: 1px solid rgb(48 216 96 / 0.5);
  border-radius: var(--r-pill);
  background: rgb(48 216 96 / 0.08);
  color: var(--accent);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hx__leak-t { font-size: var(--fs-xs); font-weight: 600; line-height: 1.25; color: var(--text); hyphens: auto; overflow-wrap: anywhere; }
/* Cada estado tiene su texto en la misma celda: el alto no cambia al pasar de fuga a control */
.hx__swap { grid-area: 1 / 1; transition: opacity 0.5s var(--ease-out) 0.2s, visibility 0s; }
.hx[data-state="hoy"] .hx__swap--sistema,
.hx[data-state="sistema"] .hx__swap--hoy { opacity: 0; visibility: hidden; transition: opacity 0.3s var(--ease-out), visibility 0s linear 0.3s; }
/* Acto 2: el tramo que señala la escena («Fuga detectada») */
.hx__leak-tag {
  position: absolute;
  top: -0.6rem;
  left: 50%;
  padding: 0 0.35rem;
  border-radius: 2px;
  background: var(--leak);
  color: #10140D;
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
  opacity: 0;
  translate: -50% 0;
  transition: opacity 0.4s var(--ease-out);
}
.hx[data-step="diagnostico"] .hx__leak:first-child { background: rgb(240 168 0 / 0.07); box-shadow: inset 0 0 0 1px rgb(240 168 0 / 0.5); }
.hx[data-step="diagnostico"] .hx__leak-tag { opacity: 1; }

/* Pasos: cada uno con su barra de progreso, que se llena mientras dura el acto */
.hx__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
/* Móvil: número sobre el nombre (cuatro columnas estrechas); escritorio: en una línea */
.hx__step {
  position: relative;
  display: grid;
  align-content: start;
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0 0.2rem;
  border: 0;
  background: none;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: color var(--dur-med) var(--ease-out);
}
.hx__step:hover,
.hx__step[aria-pressed="true"] { color: var(--text); }
.hx__step-bar { position: absolute; top: 0.2rem; right: 0; left: 0; height: 3px; border-radius: 2px; background: var(--track); overflow: hidden; }
.hx__step-bar span { display: block; height: 100%; background: var(--tinte); transform-origin: 0 50%; scale: 0 1; }
.hx__step.is-done .hx__step-bar span { scale: 1 1; opacity: 0.4; }
.hx__step[aria-pressed="true"] .hx__step-bar span { scale: var(--t, 0) 1; }
.hx[data-play="off"] .hx__step[aria-pressed="true"] .hx__step-bar span { scale: 1 1; }
.hx__step-num { font-size: 0.6875rem; }
.hx__step[aria-pressed="true"] .hx__step-num { color: var(--tinte); }
.hx__step-name { font-size: clamp(0.75rem, 0.55rem + 0.75vw, 0.875rem); font-weight: 650; hyphens: auto; overflow-wrap: anywhere; }

/* Móviles muy estrechos: los pasos quedan en número y barra (el nombre sigue siendo el texto
   accesible del botón, y la lectura dice en qué acto se está) */
@media (max-width: 22.5rem) {
  .hx__panel { padding-inline: var(--sp-3); }
  .hx__leak { padding-inline: 0; }
  .hx__step-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Al volver atrás (o reiniciar el bucle) la escena funde y corta, en vez de rebobinar */
.hx__frame { transition: opacity 0.4s var(--ease-out); }
.hx.is-corte .hx__frame { opacity: 0; }

/* Escritorio: dos columnas a la altura de la pantalla */
@media (min-width: 64rem) {
  .hx__grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
    align-items: center;
    column-gap: var(--hx-gap);
    min-height: calc(100svh - var(--header-h) - var(--demo-h, 0px));
    padding-block: var(--sp-6);
  }
  /* La columna visual ocupa la altura disponible; la tubería toma lo que deja el panel. */
  .hx__grid { height: calc(100svh - var(--header-h) - var(--demo-h, 0px)); min-height: 34rem; }
  .hx__visual { display: flex; flex-direction: column; align-self: stretch; justify-content: center; min-height: 0; }
  .hx__stage { flex: 1 1 0; width: 100%; min-height: 10rem; max-height: 48rem; container-type: size; display: grid; place-items: center; }
  /* Atmósfera a sangre: desde la mitad del hueco entre columnas hasta el borde derecho de la
     pantalla, y de arriba abajo del hero. Se funde por la izquierda (los haces son muy
     brillantes: el fundido necesita recorrido) y por arriba, donde el hero recorta bajo la cabecera. */
  .hx__atmos {
    inset: calc(-1 * var(--sp-6)) calc(-1 * ((100vw - min(100vw, var(--container) + 2 * var(--gutter))) / 2 + var(--gutter))) calc(-1 * var(--sp-6)) calc(-0.5 * var(--hx-gap));
    -webkit-mask-image: linear-gradient(90deg, transparent, rgb(0 0 0 / 0.35) 18%, #000 42%), linear-gradient(180deg, transparent, #000 18%, #000 70%, transparent);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent, rgb(0 0 0 / 0.35) 18%, #000 42%), linear-gradient(180deg, transparent, #000 18%, #000 70%, transparent);
    mask-composite: intersect;
  }
  .hx__frame { width: min(100cqw, 100cqh * 1200 / 1419); }
  .hx__panel { flex: none; gap: var(--sp-2); padding: var(--sp-4) var(--sp-4) var(--sp-2); }
  .hx__nodes { height: 1.9rem; }
  .hx__node { display: flex; align-items: baseline; gap: 0.35rem; }
  .hx__step { display: flex; align-items: baseline; gap: 0.4rem; }
  .hx__step-name { font-size: var(--fs-sm); }
  /* El hero debe caber entero en pantallas bajas: el titular escala también con la altura */
  .hx__line:not(.hx__line--sm) { font-size: min(clamp(3rem, 1.2rem + 7vw, 10rem), 12.5svh); }
  .hx__lead { margin-block: var(--sp-5); }
}

/* 2. Cinta de las 10 áreas ------------------------------------------------ */
/* Sin movimiento, las áreas se muestran quietas y en varias líneas; con movimiento, la cinta avanza
   sola en bucle (bloque de movimiento) y aparece su botón de pausa. */
.marquee { position: relative; overflow: hidden; padding-block: var(--sp-5); border-block: 1px solid var(--border); }
.marquee__toggle { display: none; }
.marquee__track { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-7); width: auto; padding-inline: var(--gutter); }
.marquee__list { display: contents; margin: 0; padding: 0; list-style: none; }
.marquee__list[aria-hidden="true"] { display: none; }
.marquee__list li {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  white-space: nowrap;
  font-size: clamp(1.35rem, 0.9rem + 1.6vw, 2.6rem);
  font-weight: 650;
  font-stretch: 116%;
  letter-spacing: -0.02em;
}
.marquee__list li::after { content: "✦"; margin-left: var(--sp-6); font-size: 0.6em; color: var(--accent); }
.marquee__num { font-size: 0.75rem; color: var(--accent-text); }

/* 3. Síntomas: carril de tarjetas ---------------------------------------- */
.hs__head { display: grid; gap: var(--sp-5); margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
@media (min-width: 64rem) { .hs__head { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; gap: var(--sp-8); } }
.hs__lead { max-width: 40ch; font-size: var(--fs-lg); color: var(--text-muted); }
.hs__track {
  display: flex;
  gap: var(--sp-4);
  margin: 0;
  padding: 0 var(--gutter) var(--sp-5);
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
}
.scard {
  --fx-bg: var(--surface);
  position: relative;
  display: flex;
  flex: 0 0 min(30rem, 86vw);
  flex-direction: column;
  gap: var(--sp-5);
  min-height: 34rem;
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  border-radius: var(--r-xl);
  overflow: hidden;
  scroll-snap-align: start;
}
.scard__num {
  position: absolute;
  top: -0.08em;
  right: 0.08em;
  font-size: 9rem;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 1;
  letter-spacing: -0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgb(255 255 255 / 0.12);
  pointer-events: none;
}
.scard__quote {
  position: relative;
  max-width: 17ch;
  font-size: clamp(1.5rem, 1.1rem + 1vw, 2rem);
  font-weight: 650;
  font-stretch: 106%;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.scard__chart { padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg); background: rgb(255 255 255 / 0.03); }
.scard__detail p:last-child { font-size: var(--fs-sm); color: var(--text-muted); }
.scard__link {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: auto;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent-text);
  text-decoration: none;
  transition: background-color var(--dur-fast), border-color var(--dur-fast);
}
.scard__link:hover { border-color: var(--accent); background: var(--control-bg); }
.scard--end { justify-content: center; align-items: flex-start; border: 1px dashed var(--border-strong); background: none; }
.scard__end { font-size: clamp(2rem, 1.4rem + 2vw, 3.2rem); font-weight: 760; font-stretch: 116%; line-height: 1; letter-spacing: -0.03em; }

/* Micro-gráficos: azul = dato, ámbar = fuga */
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart__axis { stroke: var(--border-strong); stroke-width: 1; }
.chart__gap { fill: var(--leak-bg); }
.chart__data { fill: none; stroke: var(--data); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart__leak { fill: none; stroke: var(--leak); stroke-width: 2.5; stroke-dasharray: 5 4; stroke-linecap: round; }
.chart__dot { fill: var(--surface); stroke: var(--data); stroke-width: 2; }
.chart__label { font-family: var(--font-mono); font-size: 11px; fill: var(--text-muted); }
.chart__label--data { fill: var(--data); }
.chart__label--leak { fill: var(--leak); }
.chart__slot { fill: var(--data); }
.chart__slot--empty { fill: var(--leak-bg); stroke: var(--leak); stroke-width: 1.2; stroke-dasharray: 3 3; }
.chart__link { stroke: var(--border-strong); stroke-width: 1.5; }
.chart__node { fill: var(--data); }
.chart__hub { fill: var(--leak-bg); stroke: var(--leak); stroke-width: 2; }
.chart__hub-label { font-family: var(--font-sans); font-size: 14px; font-weight: 700; fill: var(--leak); }
.chart__bar { fill: var(--data); }
.chart__bar--unknown { fill: none; stroke: var(--leak); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart__unknown { font-family: var(--font-sans); font-size: 18px; font-weight: 700; fill: var(--leak); }

/* 4. Capacidad vacía: foto a sangre y cifra de cartel --------------------- */
.cap { padding-inline: clamp(0.5rem, 1vw, 1rem); }
.cap__frame { position: relative; display: grid; align-items: end; min-height: 92svh; overflow: hidden; border-radius: var(--r-xl); }
.cap__media { position: absolute; inset: 0; }
.cap__media picture { display: contents; }
.cap__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgb(5 12 11 / 0.6), rgb(5 12 11 / 0.2) 35%, rgb(5 12 11 / 0.94) 82%);
}
.cap__inner { position: relative; z-index: 2; display: grid; gap: var(--sp-6); padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
@media (min-width: 64rem) { .cap__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: end; } }
.cap__lead { max-width: 46ch; margin-top: var(--sp-5); font-size: var(--fs-lg); color: var(--text-muted); }
.cap__figure { display: grid; gap: var(--sp-5); justify-items: start; }
.cap__context { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.cap__context li { padding: 0.35rem 0.8rem; border: 1px solid var(--border-strong); border-radius: var(--r-pill); font-size: var(--fs-sm); background: rgb(5 12 11 / 0.6); }
.cap__context .mono { margin-right: var(--sp-2); font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }
.cap__number { display: grid; gap: var(--sp-2); }
.cap__number-v {
  font-size: clamp(4rem, 1rem + 7vw, 9rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.82;
  white-space: nowrap;
  letter-spacing: -0.06em;
  color: var(--leak);
  text-shadow: 0 0 80px rgb(240 168 0 / 0.35);
}
.cap__number-k { font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cap__caption { grid-column: 1 / -1; font-size: 0.75rem; color: var(--text-muted); }

/* 4b. Tu sector: lista de sectores + panel con foto, fugas e indicadores --- */
.sc { padding-block: clamp(3rem, 2rem + 3vw, 5rem) clamp(5rem, 3rem + 8vw, 10rem); } /* Arriba menos: la banda anterior ya aporta su margen */
.sc__head { max-width: 72rem; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.sc__lead { max-width: 52ch; margin-top: var(--sp-5); font-size: var(--fs-lg); color: var(--text-muted); }
.sc__ui { display: grid; gap: var(--sp-5); }
@media (min-width: 64rem) { .sc__ui { grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: clamp(2rem, 1rem + 2vw, 4rem); align-items: start; } }

/* Lista de sectores: carril horizontal en móvil, columna en escritorio */
.sc__tabs { display: flex; gap: var(--sp-2); margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter) var(--sp-2); overflow-x: auto; scrollbar-width: thin; }
.sc__tab {
  flex: none;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: var(--sp-3);
  align-items: baseline;
  min-height: 44px;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: none;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: background-color var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), color var(--dur-med) var(--ease-out);
}
.sc__tab-num { font-size: var(--fs-xs); color: var(--text-muted); }
.sc__tab-name { font-size: var(--fs-base); font-weight: 650; font-stretch: 108%; white-space: nowrap; }
.sc__tab-ex { display: none; grid-column: 2; font-size: var(--fs-xs); color: var(--text-muted); }
.sc__tab:hover { border-color: var(--border-strong); color: var(--text); }
.sc__tab[aria-selected="true"] { border-color: var(--accent); background: var(--control-bg); color: var(--text); }
.sc__tab[aria-selected="true"] .sc__tab-num { color: var(--accent-text); }
@media (min-width: 64rem) {
  .sc__tabs { position: sticky; top: calc(var(--header-h) + var(--sp-6)); flex-direction: column; margin: 0; padding: 0; overflow: visible; }
  .sc__tab { padding: var(--sp-4) var(--sp-5); }
  .sc__tab-name { font-size: var(--fs-lg); white-space: normal; }
  .sc__tab-ex { display: block; margin-top: 2px; }
}

/* Panel */
.sc__panel { display: grid; gap: var(--sp-5); }
.sc__panel:focus-visible { outline: 3px solid var(--focus); outline-offset: 6px; border-radius: var(--r-xl); }
.sc__photo { position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: var(--r-xl); }
.sc__photo picture { display: contents; }
.sc__photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 35%, rgb(5 12 11 / 0.88));
}
.sc__quote {
  position: absolute;
  right: var(--sp-6);
  bottom: var(--sp-5);
  left: var(--sp-6);
  z-index: 2;
  max-width: 26ch;
  font-size: clamp(1.4rem, 0.9rem + 1.6vw, 2.6rem);
  font-weight: 760;
  font-stretch: 112%;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: #F2F6F3;
}
.sc__body { display: grid; gap: var(--sp-5); padding: var(--sp-5); border: 1px solid var(--border); border-radius: var(--r-xl); background: var(--surface); }
@media (min-width: 48rem) { .sc__body { grid-template-columns: 1.3fr 1fr; gap: var(--sp-7); } }
.sc__list { display: grid; gap: var(--sp-3); margin: var(--sp-3) 0 0; padding: 0; list-style: none; }
.sc__list li { position: relative; padding-left: 1.6rem; line-height: 1.45; }
.sc__list li::before { content: ""; position: absolute; top: 0.45em; left: 0; width: 10px; height: 10px; }
.sc__list--leak li::before { background: var(--leak); border-radius: 0 50% 50% 50%; transform: rotate(45deg); }
.sc__list--control li::before { background: var(--accent); border-radius: 50%; }
.sc__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3) var(--sp-5); }
.sc__note { font-size: var(--fs-xs); color: var(--text-muted); }
@media (prefers-reduced-motion: no-preference) {
  .sc__panel:not([hidden]) { animation: panel-in 0.5s var(--ease-out) both; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }

/* 5. Selector sobre tinta ------------------------------------------------- */
#orientacion { background: radial-gradient(60% 50% at 80% 30%, rgb(41 182 232 / 0.08), transparent 70%), var(--bg-alt); }
#orientacion .section-head h2 { font-size: clamp(2.4rem, 1rem + 4vw, 5rem); font-weight: 760; font-stretch: 118%; line-height: 0.95; letter-spacing: -0.035em; }
.selector { --fx-bg: var(--surface); border-radius: var(--r-xl); box-shadow: 0 40px 80px -50px rgb(0 0 0 / 0.9); }
.option__body { border-radius: var(--r-lg); background: rgb(255 255 255 / 0.025); }

/* 6. Método: tubo de progreso y recorrido A → B --------------------------- */
.mt__grid { display: grid; gap: var(--sp-7); timeline-scope: --metodo; }
@media (min-width: 64rem) { .mt__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 0.5rem + 4vw, 6rem); } }
.mt__sticky { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
.mt__lead { max-width: 40ch; margin: var(--sp-5) 0 var(--sp-7); font-size: var(--fs-lg); color: var(--text-muted); }
.tube {
  position: relative;
  display: none;
  width: 22px;
  height: 44vh;
  margin-left: var(--sp-2);
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.13) 45%, rgb(255 255 255 / 0.03));
  box-shadow: inset 0 0 14px rgb(0 0 0 / 0.6);
}
@media (min-width: 64rem) { .tube { display: block; } }
.tube__fill {
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--leak), var(--accent) 38%, var(--c-green-300));
  box-shadow: 0 0 24px rgb(48 216 96 / 0.55);
  transform-origin: top;
}
.tube__label { position: absolute; left: 36px; font-size: var(--fs-xs); white-space: nowrap; color: var(--text-muted); }
.tube__label--a { top: 0; color: var(--leak); }
.tube__label--b { bottom: 0; color: var(--accent-text); }

.mt__flow { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; view-timeline-name: --metodo; }
.mt__point { display: flex; flex-direction: column; gap: var(--sp-4); padding: clamp(1.25rem, 1rem + 1vw, 1.75rem); border-radius: var(--r-xl); }
.mt__point--a { --fx-edge: var(--leak); --fx-glow: rgb(240 168 0 / 0.05); }
.mt__tag { font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--leak); }
.mt__point--b .mt__tag { color: var(--accent-text); }
.mt__tag-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.mt__photo { position: relative; margin: 0; aspect-ratio: 16 / 10; border-radius: var(--r-lg); }

.mt__step { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-5); padding: var(--sp-6) 0; border-top: 1px solid var(--border); view-timeline-name: --paso; }
.mt__num {
  font-size: clamp(3.5rem, 2rem + 4vw, 6rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.8;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
}
.mt__step-body { display: grid; gap: var(--sp-3); }
.mt__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.mt__step-body h3 { font-size: var(--fs-2xl); font-stretch: 112%; letter-spacing: -0.025em; }
.mt__step-body > p { max-width: 46ch; color: var(--text-muted); }
.mt__deliverable { display: inline-grid; gap: 2px; justify-self: start; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); font-weight: 600; }
.mt__deliverable .mono { font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }

.postits { position: absolute; inset: 0; z-index: 2; margin: 0; padding: 0; list-style: none; }
.postits li {
  position: absolute;
  max-width: 10rem;
  padding: 0.5rem 0.65rem 0.7rem;
  background: #F5DF7A;
  color: #2B2405;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 10px 18px -10px rgb(0 0 0 / 0.7);
}
.postits li:nth-child(1) { top: 9%; left: 5%; transform: rotate(-4deg); }
.postits li:nth-child(2) { top: 42%; right: 5%; transform: rotate(3deg); }
.postits li:nth-child(3) { bottom: 9%; left: 16%; transform: rotate(-1.5deg); font-family: var(--font-mono); font-weight: 500; }
.traits { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.traits li { padding: 0.3rem 0.8rem; border: 1px solid currentColor; border-radius: var(--r-pill); font-size: var(--fs-sm); }
.traits--leak li { color: var(--leak); background: var(--leak-bg); }
.traits--control li { color: var(--accent-text); background: var(--control-bg); }

.dash { display: flex; flex-direction: column; gap: var(--sp-3); padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-lg); background: rgb(255 255 255 / 0.025); }
.dash__head { font-size: var(--fs-xs); color: var(--text-muted); }
.dash__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.dash__tile { display: grid; gap: 2px; padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.dash__name { font-size: 0.75rem; line-height: 1.3; color: var(--text-muted); }
.dash__value { font-size: var(--fs-xl); line-height: 1.15; }
.dash__spark { width: 100%; height: 24px; margin-top: var(--sp-1); overflow: visible; }
.dash__spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dash__agenda { display: grid; gap: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.mini-agenda { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.mini-agenda span { height: 12px; border-radius: 2px; background: var(--accent); }
.mini-agenda .is-free { border: 1px dashed var(--border-strong); background: transparent; }

/* 7. IMES®: mosaico de producto sobre verde profundo ---------------------- */
.ib { background: radial-gradient(70% 50% at 50% 0%, #0F4430, transparent 70%), #06211A; }
.ib__head { max-width: 76rem; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.ib__lead { max-width: 52ch; margin-top: var(--sp-5); font-size: var(--fs-lg); color: #A9C2B6; }
.bento { display: grid; gap: var(--sp-4); }
@media (min-width: 48rem) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) {
  .bento {
    grid-template-columns: repeat(6, 1fr);
    grid-template-areas:
      "score score radar radar areas areas"
      "score score radar radar areas areas"
      "plan plan plan plan price price";
  }
  .bento__score { grid-area: score; }
  .bento__radar { grid-area: radar; }
  .bento__areas { grid-area: areas; }
  .bento__plan { grid-area: plan; }
  .bento__price { grid-area: price; }
}
.bento__cell {
  --fx-bg: #0F2922; /* Opaco: con un fondo translúcido la luz del borde se veía a través de la celda. */
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  min-height: 14rem;
  padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.bento__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.bento__k { font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: #A9C2B6; }
.ring { position: relative; width: min(100%, 15rem); aspect-ratio: 1; margin: var(--sp-2) auto 0; }
.ring svg { width: 100%; height: 100%; rotate: -90deg; }
.ring__track { fill: none; stroke: rgb(255 255 255 / 0.08); stroke-width: 12; }
.ring__value { fill: none; stroke: var(--leak); stroke-width: 12; stroke-linecap: round; stroke-dasharray: var(--score) 100; filter: drop-shadow(0 0 10px rgb(240 168 0 / 0.5)); }
.ring__num { position: absolute; inset: 0; display: grid; place-content: center; grid-auto-flow: column; align-items: baseline; font-size: 4.2rem; font-weight: 800; font-stretch: 120%; letter-spacing: -0.04em; }
.ring__count { --n: var(--score); counter-reset: n var(--n); }
.ring__count::after { content: counter(n); }
.ring__of { font-family: var(--font-mono); font-size: 1rem; font-weight: 400; letter-spacing: 0; color: #A9C2B6; }
.bento__level { text-align: center; font-weight: 600; }
.bento__leaks { display: grid; gap: var(--sp-1); margin-top: auto; font-weight: 600; }
.bento__glass { position: absolute; right: -1.5rem; bottom: -1.5rem; width: 9rem; height: auto; opacity: 0.85; rotate: -10deg; pointer-events: none; }
.radar { width: 100%; height: auto; margin-block: auto; overflow: visible; }
.radar__ring, .radar__axis { fill: none; stroke: rgb(255 255 255 / 0.09); }
.radar__area { fill: rgb(48 216 96 / 0.18); stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; transform-box: view-box; transform-origin: 0 0; /* (0,0) es el centro del radar en su viewBox */ filter: drop-shadow(0 0 5px rgb(48 216 96 / 0.35)); }
.radar__dot { fill: var(--accent); }
.radar__dot.is-low { fill: var(--leak); }
.radar__label { font-family: var(--font-mono); font-size: 10px; fill: #A9C2B6; }
.radar__label.is-low { fill: var(--leak); }
.bento__list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: area; font-size: var(--fs-sm); }
.bento__list li { display: flex; gap: var(--sp-3); padding-block: 0.45rem; border-top: 1px solid rgb(255 255 255 / 0.08); counter-increment: area; }
.bento__list li::before { content: counter(area, decimal-leading-zero); flex: none; font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent-text); }
.plan-line { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .plan-line { grid-template-columns: repeat(3, 1fr); } }
.plan-line li { position: relative; display: grid; gap: var(--sp-2); padding-top: var(--sp-4); border-top: 2px solid var(--accent); }
.plan-line li::before { content: ""; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.plan-line__when { font-size: var(--fs-xs); color: var(--accent-text); }
.plan-line__what { font-size: var(--fs-lg); font-weight: 650; line-height: 1.3; }
.plan-line__kpi { font-size: 0.75rem; color: #A9C2B6; }
.bento__price { justify-content: space-between; background: linear-gradient(140deg, #3BE46C, #16A84A); color: #04140B; }
.bento__price .bento__k { color: rgb(4 20 11 / 0.75); }
.bento__amount { display: flex; align-items: baseline; gap: var(--sp-2); }
.bento__amount .num { font-size: clamp(3.5rem, 2rem + 3vw, 5.5rem); font-weight: 800; font-stretch: 122%; line-height: 0.9; letter-spacing: -0.05em; }
.bento__tax { font-weight: 600; }
.bento__includes { font-weight: 600; }
.bento__more { font-weight: 700; color: #04140B; text-underline-offset: 0.25em; }

/* 8. Soluciones: filas grandes con objeto de vidrio ------------------------ */
.sx__head { max-width: 80rem; }
.sx__lead { max-width: 46ch; margin-top: var(--sp-5); font-size: var(--fs-lg); color: var(--text-muted); }
.sx__list { margin: clamp(2.5rem, 1.5rem + 3vw, 4rem) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.sx__row {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--sp-3) var(--sp-5);
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border);
  transition: background-color 0.5s var(--ease-out), box-shadow 1.2s var(--ease-out);
}
.sx__num { padding-top: 0.6em; font-size: var(--fs-sm); color: var(--text-muted); }
.sx__title { font-size: clamp(1.75rem, 1rem + 2.6vw, 3.5rem); font-weight: 760; font-stretch: 118%; line-height: 1; letter-spacing: -0.03em; transition: color 0.4s var(--ease-out), translate 0.5s var(--ease-out); }
.sx__title a { color: inherit; text-decoration: none; }
.sx__title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.sx__para { margin-top: var(--sp-2); color: var(--text-muted); }
.sx__includes { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; list-style: none; }
.sx__includes li { padding: 0.35rem 0.8rem; border: 1px solid var(--border-strong); border-radius: var(--r-pill); font-size: var(--fs-sm); color: var(--text-muted); }
.sx__arrow { display: none; font-size: 2rem; color: var(--accent); transition: transform 0.5s var(--ease-out); }
.sx__glass { position: absolute; top: var(--sp-4); right: 0; width: 5.5rem; height: auto; opacity: 0.85; filter: saturate(0.75); transition: opacity 0.5s, filter 0.5s, scale 0.7s var(--ease-spring), rotate 0.7s var(--ease-spring); pointer-events: none; }
.sx__row:hover,
.sx__row:focus-within { background: linear-gradient(90deg, rgb(48 216 96 / 0.07), transparent 70%); }
.sx__row:hover .sx__title,
.sx__row:focus-within .sx__title { color: var(--accent); translate: var(--sp-3) 0; }
.sx__row:hover .sx__glass,
.sx__row:focus-within .sx__glass { opacity: 1; filter: none; scale: 1.12; rotate: -6deg; }
.sx__row:hover .sx__arrow { transform: translateX(6px); }
@media (min-width: 64rem) {
  .sx__row { grid-template-columns: 3.5rem minmax(0, 1.2fr) minmax(0, 1fr) 11rem 2.5rem; align-items: center; padding: var(--sp-6) 0; }
  .sx__includes { grid-column: auto; }
  .sx__glass { position: static; width: 10.5rem; margin-block: -1.5rem; justify-self: center; }
  .sx__arrow { display: block; }
}

.plans-block { margin-top: clamp(4rem, 2.5rem + 5vw, 7rem); }
.plans-block__head { max-width: 46rem; margin-bottom: var(--sp-6); }
.plans-block__head p { margin-top: var(--sp-2); color: var(--text-muted); }
.plans { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 64rem) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-6); border-radius: var(--r-xl); }
.plan__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.plan__level { font-size: var(--fs-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.plan__meter { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; }
.plan__meter i { width: 7px; border-radius: 1px; background: var(--border-strong); }
.plan__meter i:nth-child(1) { height: 33%; background: var(--accent); }
.plan__meter i:nth-child(2) { height: 66%; }
.plan__meter i:nth-child(3) { height: 100%; }
.plan__meter[style*="--n:2"] i:nth-child(2),
.plan__meter[style*="--n:3"] i:nth-child(-n + 3) { background: var(--accent); }
.plan__name { font-size: clamp(2.2rem, 1.6rem + 1.6vw, 3.2rem); font-weight: 800; font-stretch: 122%; line-height: 0.95; letter-spacing: -0.04em; }
.plan__goal { font-weight: 600; }
.plan__desc { color: var(--text-muted); }
.plan__price { margin-top: auto; padding-top: var(--sp-5); border-top: 1px dashed var(--border-strong); color: var(--text-muted); }
.plan__price .num { font-size: var(--fs-2xl); color: var(--text); }
.plan__extra { font-size: var(--fs-xs); color: var(--text-muted); }
.plan .btn { margin-top: var(--sp-4); }
.plans-block__note { margin-top: var(--sp-5); }
.plans-block__note a { color: var(--accent-text); }

/* 9. Manifiesto de transparencia ------------------------------------------ */
.mf { background: radial-gradient(50% 50% at 15% 85%, rgb(48 216 96 / 0.08), transparent 70%); }
.mf__statement {
  max-width: 22ch;
  margin-top: var(--sp-4);
  font-size: clamp(1.75rem, 0.6rem + 4.6vw, 5.6rem);
  font-weight: 760;
  font-stretch: 116%;
  line-height: 1.02;
  letter-spacing: -0.035em;
  hyphens: auto;
  overflow-wrap: break-word;
}
.mf__intro { margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 var(--sp-5); font-size: var(--fs-lg); color: var(--text-muted); }
.mf__clauses { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 48rem) { .mf__clauses { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 72rem) { .mf__clauses { grid-template-columns: repeat(4, 1fr); } }
.mf__clause { --edge: var(--data); display: flex; flex-direction: column; gap: var(--sp-3); min-height: 16rem; padding: var(--sp-6); border-radius: var(--r-xl); }
.mf__clause--control { --edge: var(--accent); --fx-edge: var(--accent); }
.mf__clause--data { --fx-edge: var(--data); }
.mf__clause--leak { --edge: var(--leak); --fx-edge: var(--leak); }
.mf__sect { font-family: var(--font-sans); font-size: 4.5rem; font-weight: 800; font-stretch: 125%; line-height: 0.8; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1.5px var(--edge); }
.mf__clause h3 { margin-top: auto; font-size: var(--fs-xl); }
.mf__clause p { color: var(--text-muted); }
.mf__promise {
  max-width: 15ch;
  margin-top: clamp(4rem, 3rem + 4vw, 7rem);
  font-size: clamp(2.4rem, 1rem + 5.2vw, 6.75rem);
  font-weight: 800;
  font-stretch: 122%;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

/* 10. Equipo y recursos --------------------------------------------------- */
.tm__grid { display: grid; gap: var(--sp-7); }
@media (min-width: 64rem) { .tm__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2.5rem, 0.5rem + 4vw, 6rem); align-items: start; } }
.tm__lead { max-width: 44ch; margin-top: var(--sp-5); font-size: var(--fs-lg); color: var(--text-muted); }
.tm__list { display: grid; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.person { display: grid; grid-template-columns: 5rem 1fr; align-items: center; gap: var(--sp-5); padding: var(--sp-4); border-radius: var(--r-lg); }
.person__photo { display: grid; place-items: center; aspect-ratio: 4 / 5; border: 1px dashed var(--border-strong); border-radius: var(--r-md); background: repeating-linear-gradient(135deg, rgb(255 255 255 / 0.04) 0 8px, transparent 8px 16px); }
.person__photo span { font-family: var(--font-mono); font-size: var(--fs-lg); color: var(--text-muted); }
.person__name { font-size: var(--fs-lg); }
.person__role { color: var(--text-muted); }
.person__pending { margin-top: var(--sp-2); font-size: 0.75rem; color: var(--leak); }

.rs { background: var(--bg-alt); }
.rs__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--sp-5); margin-bottom: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }
.rs__head > div { max-width: 46rem; }
.rs__list { display: grid; gap: var(--sp-4); margin: 0; padding: 0; list-style: none; }
@media (min-width: 64rem) { .rs__list { grid-template-columns: repeat(3, 1fr); } }
.resource { position: relative; display: flex; flex-direction: column; border-radius: var(--r-xl); overflow: hidden; }
.resource__media { position: relative; aspect-ratio: 16 / 10; }
.resource__media img { transition: transform 0.9s var(--ease-out); }
.resource:hover .resource__media img { transform: scale(1.06); }
.resource__type {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: 1;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: var(--r-pill);
  background: rgb(5 12 11 / 0.6);
  backdrop-filter: blur(8px);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.resource__body { display: flex; flex: 1; flex-direction: column; gap: var(--sp-3); padding: var(--sp-5); }
.resource h3 { font-size: var(--fs-xl); font-stretch: 106%; }
.resource h3 a { color: inherit; text-decoration: none; }
.resource h3 a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.resource__body > p:not(.resource__meta) { color: var(--text-muted); }
.resource__meta { display: flex; justify-content: space-between; margin-top: auto; padding-top: var(--sp-3); font-size: var(--fs-xs); color: var(--text-muted); }
.resource__meta .arrow { color: var(--accent); }

/* 11. Cierre --------------------------------------------------------------- */
.cl { position: relative; overflow: hidden; padding-block: clamp(5rem, 3rem + 8vw, 10rem); background: radial-gradient(60% 60% at 85% 20%, rgb(48 216 96 / 0.14), transparent 70%), var(--bg); }
.cl > .container { position: relative; z-index: 1; }
.cl > picture { display: contents; }
.cl__pipe { position: absolute; z-index: 0; top: -4%; right: -2%; width: min(56rem, 46vw); height: auto; pointer-events: none; }
@media (max-width: 63.99rem) { .cl__pipe { display: none; } }

/* 12. Movimiento ---------------------------------------------------------- */
@property --n { syntax: "<integer>"; inherits: false; initial-value: 0; }

@media (prefers-reduced-motion: no-preference) {
  /* Escena del hero: cada capa con su propio ritmo */
  .hx__float { animation: flotar 7s ease-in-out infinite; }
  .hx[data-state="hoy"] .hx__shimmer { animation: barrido 5.5s cubic-bezier(0.45, 0, 0.25, 1) infinite; }
  .hx[data-state="sistema"] .hx__pulse { animation: barrido 2.4s linear infinite; }
  .hx__atmos-particles .hx__fill { animation: deriva 22s ease-in-out infinite alternate; }
  .hx__atmos-beams .hx__fill { animation: oscilar 14s ease-in-out infinite alternate; }
  .hx__grid-floor { animation: suelo 6s linear infinite; }
  .hx[data-state="sistema"] .hx__grid-floor { animation-duration: 2.4s; }
  .hx__spark { animation: pulso 2.4s ease-in-out infinite; }
  .hx__drop { animation: gotear 2.7s cubic-bezier(0.55, 0, 0.9, 0.45) infinite; animation-delay: calc(var(--i) * 0.9s); }
  .hx[data-state="hoy"] .hx__puddle { animation: respirar 3.6s ease-in-out infinite; }
  .hx[data-state="hoy"] .hx__splash { animation: salpicar 0.9s ease-out 0.5s infinite; }
  /* Monedas: dos animaciones independientes, trayectoria (salen despedidas y caen con gravedad)
     y volteo sobre sí mismas, con periodos distintos para que nunca coincidan */
  .hx[data-state="hoy"] .hx__coin { animation: caer-moneda 2.4s linear infinite, voltear 0.7s ease-in-out infinite alternate; }
  .hx[data-state="hoy"] .hx__coin--1 { animation-delay: 0.2s, 0s; }
  .hx[data-state="hoy"] .hx__coin--2 { animation-duration: 2.8s, 0.55s; animation-delay: 1.1s, 0.2s; }
  .hx[data-state="hoy"] .hx__coin--3 { animation-duration: 2.2s, 0.9s; animation-delay: 1.9s, 0.1s; }
  .hx[data-state="sistema"] .hx__coin { animation: subir-moneda 3.6s cubic-bezier(0.3, 0, 0.4, 1) infinite; }
  .hx[data-state="sistema"] .hx__coin--1 { animation-delay: 0.6s; }
  .hx[data-state="sistema"] .hx__coin--2 { animation-delay: 1.8s; }
  .hx[data-state="sistema"] .hx__coin--3 { animation-delay: 3s; }
  .hx[data-state="sistema"] .hx__seal-wrap::after { animation: onda 0.9s var(--ease-out) 0.75s both; }
  .hx[data-state="sistema"] .hx__seal { animation: latir 2.4s ease-in-out 1.2s infinite; }
  .hx__shard--1 { animation: flotar-cristal 9s ease-in-out infinite alternate; }
  .hx__shard--2 { animation: flotar-cristal 12s ease-in-out -4s infinite alternate-reverse; }
  .hx__shard--3 { animation: flotar-cristal 15s ease-in-out -7s infinite alternate; }
  .hx.is-offscreen .hx__float,
  .hx.is-offscreen .hx__shimmer,
  .hx.is-offscreen .hx__pulse,
  .hx.is-offscreen .hx__fill,
  .hx.is-offscreen .hx__grid-floor,
  .hx.is-offscreen .hx__drop,
  .hx.is-offscreen .hx__spark,
  .hx.is-offscreen .hx__puddle,
  .hx.is-offscreen .hx__splash,
  .hx.is-offscreen .hx__coin,
  .hx.is-offscreen .hx__seal,
  .hx.is-offscreen .hx__shard { animation-play-state: paused; }
  .drip::after { animation: gota-titulo 4.2s cubic-bezier(0.55, 0, 0.9, 0.45) 1.2s infinite; }
  /* Cinta: bucle continuo. Las dos copias de la lista son idénticas y cada una cierra con el mismo
     hueco que separa sus áreas, así que desplazar la mitad del carril empalma sin salto. Los
     extremos se funden (sin cortes secos); en escritorio, el derecho termina antes del botón. */
  .marquee__viewport {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent);
  }
  /* ~50–60 px/s: en escritorio las áreas son más grandes y el carril, más largo */
  .marquee__track { flex-wrap: nowrap; gap: 0; width: max-content; padding-inline: 0; animation: cinta 75s linear infinite; }
  .marquee__list { display: flex; gap: var(--sp-7); padding-right: var(--sp-7); }
  .marquee__list[aria-hidden="true"] { display: flex; }
  .marquee:hover .marquee__track,
  .marquee.is-paused .marquee__track,
  .marquee.is-offscreen .marquee__track { animation-play-state: paused; }
  /* Móvil: el botón va debajo, para que la cinta use todo el ancho */
  .marquee__toggle { display: flex; width: fit-content; margin: var(--sp-3) var(--gutter) 0 auto; }
  .marquee__toggle,
  .marquee__toggle:hover { background-color: var(--surface); }
  /* Escritorio: el botón se superpone a la derecha y el texto ya se ha fundido donde empieza */
  @media (min-width: 64rem) {
    .marquee__track { animation-duration: 125s; }
    .marquee__viewport {
      --fin: calc(100% - var(--gutter) - 8rem);
      -webkit-mask-image: linear-gradient(90deg, transparent, #000 6rem, #000 calc(var(--fin) - 10rem), transparent var(--fin));
      mask-image: linear-gradient(90deg, transparent, #000 6rem, #000 calc(var(--fin) - 10rem), transparent var(--fin));
    }
    .marquee__toggle { position: absolute; top: 50%; right: var(--gutter); margin: 0; translate: 0 -50%; }
  }

  /* Panel: pulso de «en directo» mientras se reproduce, flujo por la banda y gotas en cada fuga */
  .hx[data-step="diagnostico"] .hx__scan { animation: escanear 1.5s var(--ease-out) both; }
  .hx[data-play="on"] .hx__live { animation: vivo 1.8s ease-out infinite; }
  .hx[data-step="crecimiento"] .hx__node-obj { animation: asomar 0.6s var(--ease-out) 0.3s both; }
  .hx__sheen { animation: flujo 2.8s linear infinite; }
  .hx[data-state="hoy"] .hx__leak::before { animation: gotear-panel 1.6s cubic-bezier(0.55, 0, 0.9, 0.45) infinite; }
  .hx__leak:nth-child(2)::before { animation-delay: 0.5s; }
  .hx__leak:nth-child(3)::before { animation-delay: 1s; }
  .hx.is-offscreen .hx__live,
  .hx.is-offscreen .hx__sheen,
  .hx.is-offscreen .hx__leak::before { animation-play-state: paused; }

  @supports (animation-timeline: view()) {
    /* Revelado general de bloques */
    .hs__head, .cap__copy, .cap__figure, .mt__point, .mt__step, .ib__head, .bento__cell,
    .sx__head, .sx__row, .plan, .mf__clause, .mf__promise, .person, .tm__head, .rs__head, .resource {
      animation: aparecer linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 80%;
    }

    /* Síntomas: carril horizontal fijado (solo escritorio) */
    @media (min-width: 64rem) {
      .hs { height: 330vh; padding-block: 0; view-timeline-name: --hs; }
      .hs__sticky { position: sticky; top: var(--header-h); display: flex; flex-direction: column; justify-content: center; height: calc(100svh - var(--header-h)); overflow: hidden; }
      .hs__track {
        width: max-content;
        padding-left: max(var(--gutter), calc((100vw - var(--container)) / 2));
        padding-right: 8vw;
        overflow: visible;
        animation: carril linear both;
        animation-timeline: --hs;
        animation-range: contain 0% contain 100%;
      }
      .scard { flex-basis: 30rem; min-height: 0; height: min(58vh, 34rem); }
      .hs__head { margin-bottom: var(--sp-5); }
      .hs__head .title-xl { font-size: clamp(2.4rem, 1rem + 3.4vw, 4.6rem); }
      .scard .chart__draw { stroke-dasharray: 1; animation: trazar linear both; animation-timeline: --hs; animation-range: contain calc(var(--i, 0) * 21%) contain calc(var(--i, 0) * 21% + 12%); }
      .scard .chart__pop { transform-box: fill-box; transform-origin: center; animation: brotar linear both; animation-timeline: --hs; animation-range: contain calc(var(--i, 0) * 21%) contain calc(var(--i, 0) * 21% + 14%); }
      .scard .chart__grow { transform-box: fill-box; transform-origin: left center; animation: crecer linear both; animation-timeline: --hs; animation-range: contain calc(var(--i, 0) * 21%) contain calc(var(--i, 0) * 21% + 12%); }
    }
    .scard { --i: 0; }
    .scard:nth-child(2) { --i: 1; }
    .scard:nth-child(3) { --i: 2; }
    .scard:nth-child(4) { --i: 3; }

    /* Capacidad: la foto se abre de ventana a sangre */
    .cap__frame { animation: abrir linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    .cap__media img { animation: acercar linear both; animation-timeline: view(); }
    .cap__number-v { animation: aparecer linear both; animation-timeline: view(); animation-range: entry 20% cover 40%; }

    /* Método: el tubo se llena y cada paso se enciende */
    .tube__fill { animation: llenar linear both; animation-timeline: --metodo; animation-range: cover 10% cover 90%; }
    .mt__num { animation: encender-num linear both; animation-timeline: --paso; animation-range: cover 25% cover 45%; }
    .mt__icon { animation: encender-icono linear both; animation-timeline: --paso; animation-range: cover 25% cover 45%; }
    .dash { view-timeline-name: --dash; }
    .dash__spark polyline { stroke-dasharray: 1; animation: trazar linear both; animation-timeline: --dash; animation-range: entry 20% entry 100%; }

    /* IMES®: anillo, cifra y radar */
    .ring { view-timeline-name: --anillo; }
    .ring__value { animation: anillo linear both; animation-timeline: --anillo; animation-range: entry 30% cover 45%; }
    .ring__count { animation: contar linear both; animation-timeline: --anillo; animation-range: entry 30% cover 45%; }
    /* Las líneas de tiempo de vista sobre elementos SVG internos no avanzan: se atan a la tarjeta HTML. */
    .bento__radar { view-timeline-name: --radar; }
    .radar__area { animation: radar linear both; animation-timeline: --radar; animation-range: entry 10% entry 100%; }

    /* Manifiesto: palabra a palabra */
    .mf__statement { view-timeline-name: --mf; }
    .mf__word { animation: palabra linear both; animation-timeline: --mf; animation-range: cover calc(12% + var(--i) * 2.3%) cover calc(18% + var(--i) * 2.3%); }
  }
}

@keyframes flotar { 50% { translate: 0 -10px; } }
@keyframes barrido {
  from { -webkit-mask-position: 100% 0%; mask-position: 100% 0%; }
  to { -webkit-mask-position: 0% 100%; mask-position: 0% 100%; }
}
@keyframes deriva { to { translate: 4% -6%; } }
@keyframes oscilar { from { rotate: -2.5deg; } to { rotate: 2.5deg; } }
@keyframes suelo { to { background-position: 0 9cqw; } }
@keyframes respirar { 50% { scale: 1.06 0.94; } }
@keyframes salpicar {
  0% { opacity: 0; transform: scale(0.2, 0.1); }
  14% { opacity: 1; transform: scale(0.9, 0.85); }
  45% { opacity: 0; transform: scale(1.15, 1.1); }
  100% { opacity: 0; transform: scale(1.15, 1.1); }
}
@keyframes caer-moneda {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(0.3); animation-timing-function: cubic-bezier(0.2, 0.7, 0.4, 1); }
  14% { opacity: 1; transform: translate(calc(var(--dx) * 0.35), -3cqh) rotate(calc(var(--rot) * 0.15)) scale(1); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.6); }
  88% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), 28cqh) rotate(var(--rot)) scale(0.85); }
}
@keyframes voltear { from { scale: 1 1; } to { scale: 0.18 1; } }
@keyframes subir-moneda {
  0% { opacity: 0; transform: translate(var(--sx), 22cqh) rotate(0deg) scale(0.5); }
  18% { opacity: 1; }
  50% { transform: translate(calc((var(--sx) + var(--ex)) / 2), -16cqh) rotate(180deg) scale(0.35, 0.9); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--ex), -54cqh) rotate(360deg) scale(0.7); }
}
@keyframes onda {
  0% { opacity: 0.9; scale: 0.3; }
  100% { opacity: 0; scale: 2.2; }
}
@keyframes latir { 50% { filter: drop-shadow(0 0 26px rgb(48 216 96 / 0.85)) brightness(1.15); } }
@keyframes flotar-cristal {
  from { translate: 0 0; rotate: -6deg; }
  to { translate: 6px -14px; rotate: 8deg; }
}
@keyframes pulso { 50% { transform: scale(1.5); opacity: 0.55; } }
@keyframes gotear {
  0% { opacity: 0; transform: translateY(0) scale(0.4); }
  12% { opacity: 1; transform: translateY(2px) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(170px) scale(0.9); }
}
@keyframes gota-titulo {
  0% { opacity: 0; transform: translateY(0) scaleY(0.3); }
  12% { opacity: 1; transform: translateY(0) scaleY(1); }
  30% { transform: translateY(0.05em); }
  100% { opacity: 0; transform: translateY(1.5em); }
}
@keyframes vivo {
  from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tinte) 70%, transparent); }
  to { box-shadow: 0 0 0 7px transparent; }
}
@keyframes flujo { to { translate: 760px 0; } }
@keyframes asomar { from { opacity: 0; } }
@keyframes escanear {
  0% { opacity: 0; translate: 0 0; }
  15%, 70% { opacity: 1; }
  100% { opacity: 0; translate: 0 1419px; }
}
@keyframes gotear-panel {
  0% { opacity: 0; translate: 0 calc(-1 * var(--caida) * var(--flow-h)); }
  15% { opacity: 1; }
  80% { opacity: 1; }
  100% { opacity: 0; translate: 0 -0.4rem; }
}
@keyframes aparecer { from { opacity: 0; transform: translateY(32px); } }
@keyframes cinta { to { transform: translateX(-50%); } }
@keyframes carril { to { transform: translateX(calc(-100% + 100vw)); } }
@keyframes trazar { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes brotar { from { opacity: 0; transform: scale(0.4); } }
@keyframes crecer { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes abrir { from { clip-path: inset(8% 10% round 40px); } to { clip-path: inset(0 round 28px); } }
@keyframes acercar { from { transform: scale(1.15); } to { transform: scale(1); } }
@keyframes llenar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes encender-num { from { -webkit-text-stroke-color: rgb(255 255 255 / 0.18); } }
@keyframes encender-icono { from { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border-strong); } }
@keyframes anillo { from { stroke-dasharray: 0 100; } }
@keyframes contar { from { --n: 0; } }
@keyframes radar { from { transform: scale(0.15); opacity: 0; } }
@keyframes palabra { from { opacity: 0.16; } }
