/* Portada de Encario (templates/public/index.html.twig), 2026-10-20: «el viaje de una máquina».
   Va encima de encario-landing.css (colores --encario-*, .encario-section, .encario-button…). Móvil primero en lo
   nuevo; botones sólidos, nunca outline. Las ilustraciones del viaje son CSS a propósito: nada que copiar. */

/* ---------- Cabecera ---------- */
.enc-home-hero-copy { max-width: 820px; }

.enc-home-hero h1 { max-width: 820px; font-size: clamp(40px, 5.6vw, 72px); }

.enc-home-button-ghost {
  border: 0;
  background: #2a332d;
  color: var(--encario-text);
}

.enc-home-button-ghost:hover { background: #116b3a; color: #ffffff; }

/* ---------- El viaje de una máquina ---------- */
/* visible: con overflow hidden el marcador no se queda fijo al bajar (sticky). */
.enc-viaje { overflow: visible; padding-bottom: 96px; }

/* clip (no hidden): recorta a los lados las luces de las ilustraciones sin romper el marcador fijo. */
.encario-home .enc-viaje { overflow-x: clip; }

.enc-viaje-ticker {
  position: sticky;
  top: 84px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 22px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 40px;
  padding: 10px 20px;
  border-radius: 16px;
  background: #0b0f0d;
  border: 1px solid var(--encario-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.enc-viaje-ticker[hidden] { display: none; }

.enc-viaje-ticker > span { display: inline-flex; align-items: baseline; gap: 8px; }

.enc-viaje-ticker-machine { color: var(--encario-text); font-weight: 800; }

.enc-viaje-ticker small {
  color: var(--encario-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.enc-viaje-ticker strong {
  color: var(--encario-text);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  transition: color 300ms ease;
}

.enc-viaje-ticker .is-margin strong { color: var(--encario-primary); }

.enc-viaje-ticker em { color: var(--encario-primary); font-style: normal; font-weight: 800; font-size: 14px; }

.enc-viaje-ticker.is-bump strong { color: var(--encario-amber); }

.enc-viaje-steps {
  position: relative;
  display: grid;
  gap: 56px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* La línea del recorrido */
.enc-viaje-steps::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 21px;
  width: 2px;
  background: rgba(74, 222, 128, 0.22);
}

.enc-viaje-step {
  position: relative;
  display: grid;
  gap: 22px;
  padding-left: 64px;
}

.enc-viaje-num {
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--encario-panel-strong);
  color: var(--encario-muted);
  font-weight: 850;
  font-size: 18px;
  transition: background 250ms ease, color 250ms ease;
}

.enc-viaje-step.is-active .enc-viaje-num,
.enc-viaje-step.is-done .enc-viaje-num {
  background: var(--encario-primary);
  color: var(--encario-primary-ink);
}

.enc-viaje-label {
  margin: 0 0 6px;
  color: var(--encario-primary);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.enc-viaje-text h3 {
  margin: 0 0 10px;
  color: var(--encario-text);
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 850;
  line-height: 1.12;
}

.enc-viaje-text p:last-child {
  margin: 0;
  max-width: 34em;
  color: var(--encario-muted);
  font-size: 18px;
  line-height: 1.55;
}

.enc-viaje-visual { max-width: 420px; }

.enc-viaje-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 22px;
  margin-top: 64px;
  text-align: center;
}

.enc-viaje-end p { margin: 0; color: var(--encario-text); font-size: 22px; font-weight: 800; }

/* Ilustraciones: «papel» claro sobre el fondo oscuro, sin datos legibles salvo el importe */
.enc-ill {
  padding: 18px 20px;
  border-radius: 18px;
  background: #f5f7f2;
  color: #14231a;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4);
}

.enc-ill-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
}

.enc-ill-head em {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: #116b3a;
  color: #ffffff;
  font-style: normal;
  font-size: 12px;
}

.enc-ill-head em.is-amber { background: #8a5a00; }

.enc-ill-dot { width: 10px; height: 10px; border-radius: 50%; background: #116b3a; }

.enc-ill-dot.is-amber { background: #c98a12; }

.enc-ill-lines { display: grid; gap: 8px; margin: 16px 0; }

.enc-ill-lines i,
.enc-ill-rows i,
.enc-ill-browser-body i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: #d9ded6;
}

.enc-ill-lines i.is-short,
.enc-ill-browser-body i.is-short { width: 60%; }

.enc-ill-checks { display: grid; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; font-weight: 700; }

.enc-ill-checks li::before { content: "✓"; display: inline-block; width: 22px; color: #116b3a; font-weight: 900; }

.enc-ill-rows { display: grid; gap: 12px; margin: 16px 0; padding: 0; list-style: none; font-size: 14px; font-weight: 700; }

.enc-ill-rows li { display: grid; grid-template-columns: 1fr 70px; align-items: center; gap: 12px; }

.enc-ill-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #d9ded6;
  font-size: 14px;
  font-weight: 700;
  color: #44544a;
}

.enc-ill-total strong { color: #14231a; font-size: 22px; font-weight: 850; white-space: nowrap; font-variant-numeric: tabular-nums; }

.enc-ill-sign { margin: 0 0 12px; }

.enc-ill-sign svg { width: 140px; height: 38px; fill: none; stroke: #1b3a8a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.enc-ill-publish {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.9fr;
  align-items: end;
  gap: 12px;
}

.enc-ill-browser,
.enc-ill-qr {
  overflow: hidden;
  border-radius: 14px;
  background: #f5f7f2;
  color: #14231a;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.enc-ill-browser-bar { display: flex; gap: 5px; padding: 8px 10px; background: #d9ded6; }

.enc-ill-browser-bar i { width: 7px; height: 7px; border-radius: 50%; background: #9aa69e; }

.enc-ill-browser-body { display: grid; gap: 7px; padding: 10px; }

.enc-ill-photo { display: block; aspect-ratio: 4 / 3; border-radius: 8px; background: #0f1512 url("../images/encario-fleet.svg") center / cover; }

.enc-ill-browser b,
.enc-ill-qr b { font-size: 13px; }

.enc-ill-qr { display: grid; justify-items: center; gap: 6px; padding: 14px 10px; }

.enc-ill-qr svg { width: 100%; max-width: 80px; fill: #14231a; }

.enc-ill-phone {
  display: grid;
  gap: 7px;
  padding: 18px 8px 12px;
  border-radius: 20px;
  background: #f5f7f2;
  border: 4px solid #0b100d;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  color: #14231a;
}

.enc-ill-phone i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #d9ded6;
}

.enc-ill-phone i.is-short { width: 60%; }

.enc-ill-phone b { font-size: 13px; }

/* La captura real (ficha de la empresa de demostración): solo nombre, estado y cifras; lo demás, en la demo */
.enc-ill-shot {
  max-width: 320px;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #f8f9fb;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
}

.enc-ill-shot img { display: block; width: 100%; height: auto; }

.enc-ill-shot figcaption {
  padding: 10px 12px 12px;
  color: #44544a;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

@media (min-width: 900px) {
  .enc-viaje-steps { gap: 120px; }

  .enc-viaje-steps::before { left: 50%; margin-left: -1px; }

  .enc-viaje-step {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 96px;
    padding-left: 0;
  }

  .enc-viaje-num { top: 50%; left: 50%; margin: -22px 0 0 -22px; }

  .enc-viaje-text { text-align: right; }

  .enc-viaje-text p:last-child { margin-left: auto; }

  .enc-viaje-step:nth-child(even) .enc-viaje-text { order: 2; text-align: left; }

  .enc-viaje-step:nth-child(even) .enc-viaje-text p:last-child { margin-left: 0; }

  .enc-viaje-step:nth-child(even) .enc-viaje-visual { justify-self: end; }
}

@media (max-width: 560px) {
  .enc-viaje-ticker { gap: 4px 14px; padding: 8px 14px; }

  .enc-viaje-ticker strong { font-size: 16px; }

  .enc-viaje-ticker-machine { display: none !important; }

  .enc-viaje-ticker em { display: none; }

  .enc-viaje-text p:last-child { font-size: 16px; }

  .enc-ill-publish { grid-template-columns: 1fr 1fr; }

  .enc-ill-phone { display: none; }
}

/* ---------- Cierre ---------- */
.enc-home-demo .encario-two-col { align-items: center; }

.enc-home-demo-copy .encario-button { margin-top: 26px; }

@media (prefers-reduced-motion: reduce) {
  .enc-viaje-num,
  .enc-viaje-ticker strong { transition: none; }
}

/* ---------- App, módulos, lo exclusivo y marcas (antes en la plantilla) ---------- */

.enc-app { padding-top: 2.6rem; padding-bottom: 2.6rem; }
.enc-app-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.5rem; }
.enc-app-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .85rem;
border-radius: 999px; border: 1px solid var(--encario-border); background: rgba(245,247,242,0.05);
color: var(--encario-text); font-size: .82rem; font-weight: 700; }
.enc-app-pill svg { width: 15px; height: 15px; fill: var(--encario-primary); }

.enc-app-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 2.2rem; }
.enc-app-store { display: inline-flex; align-items: center; gap: 13px; padding: 13px 22px 13px 18px;
border-radius: 13px; border: 1px solid var(--encario-border); background: rgba(245,247,242,0.035);
color: var(--encario-muted); min-width: 210px; cursor: default; }
.enc-app-store svg { width: 28px; height: 28px; fill: currentColor; flex-shrink: 0; }
.enc-app-store__text { display: flex; flex-direction: column; gap: 3px; line-height: 1.2; text-align: left; }
.enc-app-store__status { font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--encario-muted); }
.enc-app-store__name { font-size: 1.02rem; font-weight: 800; color: var(--encario-text); }
.enc-app-store.is-live { border-color: rgba(74,222,128,.45); background: rgba(74,222,128,.12); color: var(--encario-text);
cursor: pointer; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.enc-app-store.is-live:hover { background: rgba(74,222,128,.22); border-color: var(--encario-primary); transform: translateY(-2px); }
.enc-app-store.is-live .enc-app-store__status { color: var(--encario-primary); }

.enc-app-note { display: flex; align-items: center; justify-content: center; gap: .5rem;
color: var(--encario-muted); font-size: .86rem; margin-top: .9rem; }
.enc-app-note svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }

@media (max-width: 560px) {
.enc-app-store { min-width: 0; flex: 1 1 250px; }
}





.enc-integra { margin-top: 2.4rem; padding: 1.5rem 1.6rem; border-radius: 18px;
border: 1px solid var(--encario-border); background: rgba(16,20,18,0.5); text-align: center; }
.enc-integra > span { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .08em;
text-transform: uppercase; color: var(--encario-muted); margin-bottom: 1rem; }
.enc-integra-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.enc-integra-pill { display: inline-flex; align-items: center; gap: .6rem; padding: .55rem 1.1rem .55rem .55rem;
border-radius: 999px; border: 1px solid var(--encario-border); background: rgba(245,247,242,0.06);
color: var(--encario-text); font-weight: 800; font-size: .95rem; }
.enc-integra-pill svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--encario-primary); fill: #0b120e; }


.encario-brands { padding-top: 2.4rem; padding-bottom: 2.4rem; }
.enc-brand-marquee { overflow: hidden; position: relative; margin-top: 2rem;
-webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.enc-brand-track { display: flex; align-items: center; gap: 1.8rem; width: max-content; animation: enc-brands 66s linear infinite; }
.enc-brand-marquee:hover .enc-brand-track { animation-play-state: paused; }
/* Tarjeta blanca que se ajusta al logo (poco margen) para que el logo mande */
.enc-brand-item { flex: 0 0 auto; height: 150px; display: flex; align-items: center;
justify-content: center; padding: 0 1.5rem; background: #ffffff; border-radius: 18px;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28); transition: transform .2s ease, box-shadow .2s ease; }
.enc-brand-item:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38); }
.enc-brand-item img { height: 124px; max-width: 340px; object-fit: contain; }
@keyframes enc-brands { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .enc-brand-track { animation: none; flex-wrap: wrap; justify-content: center; gap: 2rem; } }

/* ---------- Fondos: cada pantalla con su ambiente (2026-10-21) ---------- */
/* El usuario veía el fondo «muy monótono»: todo el mismo verde casi negro. Ahora cada tramo tiene su luz y su textura,
   y el de las marcas va en claro para romper el ritmo. Solo gradientes y puntos de CSS: nada que descargar. */
.encario-home .enc-viaje {
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, rgba(74, 222, 128, 0.10), transparent 70%),
    radial-gradient(rgba(245, 247, 242, 0.08) 1px, transparent 1.5px) 0 0 / 26px 26px,
    linear-gradient(180deg, #0d1210 0%, #111a15 50%, #0d1210 100%);
}

/* Detrás de cada ilustración, una luz del color de su parada que se enciende cuando es la parada activa */
.enc-viaje-visual { position: relative; }

.enc-viaje-visual::before {
  content: "";
  position: absolute;
  inset: -30% -26%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--enc-step-glow, rgba(74, 222, 128, 0.32)), transparent);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 900ms ease, transform 1200ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.enc-viaje-step.is-active .enc-viaje-visual::before { opacity: 1; transform: scale(1); }

/* En el móvil la ilustración ocupa todo el ancho: la luz no sale por los lados (navegadores sin overflow: clip). */
@media (max-width: 899px) {
  .enc-viaje-visual::before { inset: -18% 0; }
}

.enc-viaje-step--compra { --enc-step-glow: rgba(96, 165, 250, 0.51); }
.enc-viaje-step--taller { --enc-step-glow: rgba(246, 196, 83, 0.48); }
.enc-viaje-step--publicar { --enc-step-glow: rgba(74, 222, 128, 0.51); }
.enc-viaje-step--venta { --enc-step-glow: rgba(45, 212, 191, 0.48); }
.enc-viaje-step--margen { --enc-step-glow: rgba(74, 222, 128, 0.71); }

.encario-home .enc-app {
  padding-top: 96px;
  padding-bottom: 96px;
  background:
    radial-gradient(ellipse 55% 60% at 15% 20%, rgba(96, 165, 250, 0.13), transparent 70%),
    radial-gradient(ellipse 50% 60% at 88% 85%, rgba(74, 222, 128, 0.14), transparent 70%),
    linear-gradient(160deg, #121c22 0%, #101614 55%, #0f1a14 100%);
}

.encario-home .enc-home-modules {
  background:
    linear-gradient(rgba(245, 247, 242, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(245, 247, 242, 0.035) 1px, transparent 1px) 0 0 / 56px 56px,
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(246, 196, 83, 0.09), transparent 70%),
    #151b18;
}

.encario-home .enc-only {
  padding-top: 96px;
  padding-bottom: 96px;
  background:
    radial-gradient(ellipse 60% 70% at 50% 110%, rgba(34, 197, 94, 0.22), transparent 70%),
    linear-gradient(135deg, #0f2219 0%, #0d1411 60%, #101412 100%);
}

/* Marcas en claro: el único tramo blanco de la página, y los logos se ven como en un catálogo */
.encario-home .encario-brands {
  padding-top: 88px;
  padding-bottom: 88px;
  background: linear-gradient(180deg, #f5f7f2 0%, #e7ece4 100%);
}

.encario-home .encario-brands h2 { color: #14231a; }

.encario-home .encario-brands .encario-kicker { color: #116b3a; }

.encario-home .encario-brands .enc-brand-item { box-shadow: 0 10px 26px rgba(20, 35, 26, 0.12); }

.encario-home .enc-home-demo {
  background:
    radial-gradient(ellipse 60% 70% at 20% 100%, rgba(74, 222, 128, 0.16), transparent 70%),
    radial-gradient(ellipse 40% 50% at 95% 0%, rgba(96, 165, 250, 0.10), transparent 70%),
    #121815;
}

/* ---------- Entrada en secuencia (2026-10-21) ---------- */
/* Antes todo aparecía de golpe mientras se bajaba y el efecto se perdía. Ahora (encario-landing.js) cada bloque entra
   cuando ya está bien dentro de la pantalla, más despacio, y uno detrás de otro; en el viaje, primero el texto, luego
   la ilustración y después sus piezas una a una. Solo con .has-motion (la pone el JS si no se pide menos movimiento). */
.has-motion .encario-home .encario-reveal {
  transform: translateY(40px);
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.has-motion .encario-home .encario-reveal.is-visible { transform: none; }

.has-motion .encario-home [data-stagger] > *:not(.is-settled) {
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.has-motion .encario-home [data-stagger] > *:not(.is-visible) {
  opacity: 0;
  transform: translateY(28px) scale(0.98);
}

/* En el viaje no se mueve la parada entera, sino sus partes */
.encario-home .enc-viaje-step.encario-reveal { opacity: 1; transform: none; }

.has-motion .encario-home .enc-viaje-text,
.has-motion .encario-home .enc-viaje-visual,
.has-motion .encario-home .enc-viaje-num {
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.has-motion .encario-home .enc-viaje-step .enc-viaje-visual { transition-delay: 280ms; }

.has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-viaje-text { opacity: 0; transform: translateY(30px); }

.has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-viaje-visual { opacity: 0; transform: translateY(44px) scale(0.94); }

.has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-viaje-num { opacity: 0; transform: scale(0.4); }

@media (min-width: 900px) {
  .has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-viaje-text { transform: translateX(-56px); }

  .has-motion .encario-home .enc-viaje-step:nth-child(even):not(.is-visible) .enc-viaje-text { transform: translateX(56px); }

  .has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-viaje-num { transform: translate(0, 0) scale(0.4); }
}

/* Las piezas de cada ilustración (data-seq, numeradas por el JS con --seq) */
.has-motion .encario-home [data-seq] {
  transition: opacity 600ms ease, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(700ms + var(--seq, 0) * 200ms);
}

.has-motion .encario-home .enc-viaje-step:not(.is-visible) [data-seq] { opacity: 0; transform: translateY(14px); }

/* Las líneas de texto «se escriben» de izquierda a derecha */
.has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-ill-lines i[data-seq],
.has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-ill-rows li[data-seq] i { transform: scaleX(0); }

.has-motion .encario-home .enc-ill-lines i[data-seq] { transform-origin: left center; }

.has-motion .encario-home .enc-ill-rows li i {
  transform-origin: left center;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(900ms + var(--seq, 0) * 200ms);
}

/* La firma se dibuja sola */
.has-motion .encario-home .enc-ill-sign path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1400ms ease-in-out;
  transition-delay: calc(900ms + var(--seq, 0) * 200ms);
}

.has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-ill-sign path { stroke-dashoffset: 1; }

/* Web, QR y app aparecen como si saltaran a su sitio */
.has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-ill-publish [data-seq] { transform: translateY(40px) scale(0.85); }

/* La captura de la ficha llega con un leve zoom */
.has-motion .encario-home .enc-viaje-step:not(.is-visible) .enc-ill-shot[data-seq] { transform: scale(0.9) translateY(20px); }

/* El número de la parada late una vez al activarse */
.has-motion .encario-home .enc-viaje-step.is-active .enc-viaje-num { animation: enc-num-pulse 1.6s ease-out 1; }

@keyframes enc-num-pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.55); }
  100% { box-shadow: 0 0 0 18px rgba(74, 222, 128, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .enc-viaje-visual::before { transition: none; }
}

/* El titular entra por partes con CSS, desde el primer pintado: con el JS (que llega después) parpadeaba si la red
   iba lenta. Sin «reducir movimiento» solo; acaba siempre visible (fill-mode both), también sin JS. */
@media (prefers-reduced-motion: no-preference) {
  .enc-home-hero-copy > * { animation: enc-hero-in 800ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .enc-home-hero-copy > :nth-child(2) { animation-delay: 120ms; }
  .enc-home-hero-copy > :nth-child(3) { animation-delay: 260ms; }
  .enc-home-hero-copy > :nth-child(4) { animation-delay: 400ms; }
  .enc-home-hero-copy > :nth-child(5) { animation-delay: 540ms; }
}

@keyframes enc-hero-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

/* Al imprimir sale todo, aunque no se haya bajado hasta ahí */
@media print {
  .encario-reveal,
  [data-stagger] > *,
  .enc-viaje-text,
  .enc-viaje-visual,
  .enc-viaje-num,
  [data-seq] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Mosaico de módulos (2026-10-21) ---------- */
/* Antes: 12 tarjetas iguales con dos líneas de texto que nadie leía. Ahora un mosaico de tamaños distintos, cada
   módulo con su color, su icono, un título corto y un mini gráfico. Los gráficos se ven completos por defecto; con
   .has-motion se animan al entrar (y algunos siguen vivos despacio). */
.enc-bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas:
    "inv inv tal alq"
    "ia  ven tal con"
    "crm crm qr  web"
    "val fir mul mul";
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.enc-tile--inv { grid-area: inv; --tile: 96, 165, 250; }
.enc-tile--tal { grid-area: tal; --tile: 246, 196, 83; }
.enc-tile--alq { grid-area: alq; --tile: 45, 212, 191; }
.enc-tile--ia { grid-area: ia; --tile: 167, 139, 250; }
.enc-tile--ven { grid-area: ven; --tile: 74, 222, 128; }
.enc-tile--con { grid-area: con; --tile: 96, 165, 250; }
.enc-tile--crm { grid-area: crm; --tile: 244, 114, 182; }
.enc-tile--qr { grid-area: qr; --tile: 74, 222, 128; }
.enc-tile--web { grid-area: web; --tile: 45, 212, 191; }
.enc-tile--val { grid-area: val; --tile: 167, 139, 250; }
.enc-tile--fir { grid-area: fir; --tile: 246, 196, 83; }
.enc-tile--mul { grid-area: mul; --tile: 74, 222, 128; }

.enc-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 20px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(var(--tile), 0.28);
  background:
    radial-gradient(ellipse 90% 70% at 100% 100%, rgba(var(--tile), 0.20), transparent 70%),
    linear-gradient(160deg, rgba(var(--tile), 0.10), rgba(16, 20, 18, 0.85) 60%);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.enc-tile:hover { border-color: rgba(var(--tile), 0.6); transform: translateY(-3px); }

.enc-tile-head { display: flex; align-items: center; gap: 12px; }

.enc-tile-ic {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgb(var(--tile));
  color: #0b120e;
}

.enc-tile-ic svg { width: 22px; height: 22px; fill: currentColor; }

.enc-tile h3 { margin: 0; color: var(--encario-text); font-size: 19px; font-weight: 850; line-height: 1.15; }

.enc-tile > p { margin: 10px 0 0; color: var(--encario-muted); font-size: 15px; line-height: 1.4; }

.enc-tile .enc-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgb(var(--tile));
  color: #0b120e;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* El gráfico ocupa lo que queda, abajo */
.enc-g { margin-top: auto; padding-top: 18px; }

/* Estados: las cinco etiquetas, con la actual encendida */
.enc-g-states { display: flex; flex-wrap: wrap; gap: 8px; }

.enc-g-states span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(245, 247, 242, 0.08);
  color: var(--encario-muted);
  font-size: 13px;
  font-weight: 800;
}

.enc-g-states span:nth-child(3) { background: rgb(var(--tile)); color: #0b120e; }

/* Margen: barra de costes apilados frente a la de venta */
.enc-g-margin { display: grid; gap: 12px; }

.enc-g-margin-bars { display: flex; align-items: flex-end; gap: 18px; height: 150px; padding: 0 8px; border-bottom: 1px solid rgba(245, 247, 242, 0.16); }

.enc-g-margin-bars > span { position: relative; display: flex; flex-direction: column-reverse; width: 46%; height: var(--h); border-radius: 10px 10px 0 0; overflow: hidden; }

.enc-g-margin-bars .is-cost i { display: block; }

.enc-g-margin-bars .is-cost i:nth-child(1) { height: 66%; background: #8a9b90; }
.enc-g-margin-bars .is-cost i:nth-child(2) { height: 22%; background: rgb(246, 196, 83); }
.enc-g-margin-bars .is-cost i:nth-child(3) { height: 12%; background: #e5935a; }

.enc-g-margin-bars .is-sale { background: linear-gradient(180deg, #4ade80, #22c55e); }

.enc-g-margin-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--encario-muted); font-size: 12px; font-weight: 700; }

.enc-g-margin-legend b { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 3px; }
.enc-g-margin-legend .is-a { background: #8a9b90; }
.enc-g-margin-legend .is-b { background: rgb(246, 196, 83); }
.enc-g-margin-legend .is-c { background: #e5935a; }

.enc-g-margin-pct { color: var(--encario-primary); font-size: 34px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }

/* Calendario: dos reservas que no se pisan */
.enc-g-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }

.enc-g-cal i { display: block; aspect-ratio: 1; border-radius: 5px; background: rgba(245, 247, 242, 0.08); }

.enc-g-cal i.is-a { background: rgb(var(--tile)); }

.enc-g-cal i.is-b { background: rgb(96, 165, 250); }

/* Factura con la línea de lectura */
.enc-g-scan { display: flex; justify-content: center; }

.enc-g-paper { position: relative; display: grid; gap: 7px; width: 110px; padding: 14px 12px; border-radius: 8px; background: #f5f7f2; overflow: hidden; }

.enc-g-paper i { display: block; height: 7px; border-radius: 999px; background: #d3d9d0; }

.enc-g-paper i.is-short { width: 55%; }

.enc-g-paper b { position: absolute; left: 0; right: 0; top: 30%; height: 3px; background: rgb(var(--tile)); box-shadow: 0 0 12px 3px rgba(var(--tile), 0.7); }

/* Presupuesto → pedido → factura, de arriba abajo (en fila no cabían) */
.enc-g-flow { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }

.enc-g-flow span {
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(245, 247, 242, 0.08);
  color: var(--encario-text);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.enc-g-flow span.is-end { background: rgb(var(--tile)); color: #0b120e; }

.enc-g-flow i { position: relative; align-self: center; width: 2px; height: 10px; background: rgba(var(--tile), 0.7); }

.enc-g-flow i::after { content: ""; position: absolute; left: -4px; bottom: -3px; border: 5px solid transparent; border-top-color: rgba(var(--tile), 0.9); border-bottom: 0; }

/* Donut del IVA */
.enc-g-donut { position: relative; width: 104px; margin-left: auto; margin-right: auto; }

.enc-g-donut svg { display: block; width: 100%; transform: rotate(-90deg); }

.enc-g-donut circle { fill: none; stroke-width: 6; }

.enc-g-donut .is-track { stroke: rgba(245, 247, 242, 0.08); }

.enc-g-donut .is-a { stroke: rgb(var(--tile)); stroke-dasharray: 58 100; }

.enc-g-donut .is-b { stroke: #4ade80; stroke-dasharray: 26 100; stroke-dashoffset: -60; }

.enc-g-donut strong { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--encario-text); font-size: 22px; font-weight: 900; }

/* Embudo de una campaña */
.enc-g-funnel { display: grid; gap: 8px; }

.enc-g-funnel span { display: block; width: var(--w); min-width: 96px; padding: 7px 12px; border-radius: 10px; background: rgba(var(--tile), 0.85); }

.enc-g-funnel span + span { background: rgba(var(--tile), 0.6); }

.enc-g-funnel span + span + span { background: rgba(var(--tile), 0.4); }

.enc-g-funnel em { color: #0b120e; font-size: 13px; font-weight: 850; font-style: normal; }

.enc-g-funnel span + span + span em { color: var(--encario-text); }

/* QR con su pulso de escaneo */
.enc-g-qr { position: relative; display: flex; justify-content: center; }

.enc-g-qr svg { width: 84px; height: 84px; padding: 10px; border-radius: 14px; background: #f5f7f2; fill: #0b120e; }

/* Navegador con el catálogo */
.enc-g-web { overflow: hidden; border-radius: 10px; background: #f5f7f2; padding-top: 0; margin-top: auto; }

.enc-tile .enc-g-web { margin-top: auto; }

.enc-g-web-bar { display: flex; gap: 4px; padding: 6px 8px; background: #d3d9d0; }

.enc-g-web-bar i { width: 6px; height: 6px; border-radius: 50%; background: #9aa69e; }

.enc-g-web-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 8px; }

.enc-g-web-grid span { display: block; aspect-ratio: 4 / 3; border-radius: 5px; background: #0f1512 url("../images/encario-fleet.svg") center / cover; }

/* Medidor del precio recomendado */
.enc-g-gauge { display: grid; justify-items: center; gap: 4px; }

.enc-g-gauge svg { width: 130px; }

.enc-g-gauge path { fill: none; stroke-width: 10; stroke-linecap: round; }

.enc-g-gauge .is-track { stroke: rgba(245, 247, 242, 0.1); }

.enc-g-gauge .is-fill { stroke: rgb(var(--tile)); stroke-dasharray: 72 100; }

.enc-g-gauge span { color: var(--encario-muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }

/* Firma */
.enc-g-sign { padding: 12px 14px; border-radius: 12px; background: #f5f7f2; margin-top: auto; }

.enc-tile .enc-g-sign { margin-top: auto; }

.enc-g-sign svg { width: 100%; height: 40px; fill: none; stroke: #1b3a8a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Empresas con candado */
.enc-g-companies { display: flex; align-items: center; }

.enc-g-companies span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-right: -12px;
  border-radius: 50%;
  border: 3px solid #121815;
  color: #0b120e;
  font-size: 20px;
  font-weight: 900;
}

.enc-g-companies .is-a { background: #4ade80; }
.enc-g-companies .is-b { background: #60a5fa; z-index: 1; }
.enc-g-companies .is-c { background: #f6c453; z-index: 2; }

.enc-g-companies em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 30px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(245, 247, 242, 0.1);
  color: var(--encario-text);
  font-size: 14px;
  font-weight: 850;
  font-style: normal;
}

.enc-g-companies em svg { width: 16px; height: 16px; fill: var(--encario-primary); }

/* Tableta y móvil: dos columnas, los anchos ocupan la fila */
@media (max-width: 899px) {
  .enc-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "inv inv"
      "tal alq"
      "tal ia"
      "ven con"
      "crm crm"
      "qr  web"
      "val fir"
      "mul mul";
    gap: 12px;
  }

  .enc-tile { min-height: 0; padding: 16px; border-radius: 16px; }

  .enc-tile-head { flex-direction: column; align-items: flex-start; gap: 10px; }

  .enc-tile h3 { font-size: 17px; }

  .enc-tile > p { font-size: 14px; }

  .enc-g-margin-bars { height: 120px; }

  .enc-g-gauge span { text-align: center; }
}

@media (max-width: 380px) {
  .enc-tile { padding: 14px; }

  .enc-tile h3 { font-size: 16px; }

}

/* Movimiento: cada gráfico se monta al entrar su pieza (.is-visible); algunos siguen vivos, despacio. */
@media (prefers-reduced-motion: no-preference) {
  .has-motion .enc-tile.is-visible .enc-g-states span { animation: enc-pop 500ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .has-motion .enc-tile.is-visible .enc-g-states span:nth-child(2) { animation-delay: 120ms; }
  .has-motion .enc-tile.is-visible .enc-g-states span:nth-child(3) { animation: enc-pop 500ms cubic-bezier(0.16, 1, 0.3, 1) 240ms both, enc-glow 2.4s ease-in-out 900ms infinite; }
  .has-motion .enc-tile.is-visible .enc-g-states span:nth-child(4) { animation-delay: 360ms; }
  .has-motion .enc-tile.is-visible .enc-g-states span:nth-child(5) { animation-delay: 480ms; }

  .has-motion .enc-tile.is-visible .enc-g-margin-bars > span { animation: enc-grow-y 1100ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both; transform-origin: bottom; }
  .has-motion .enc-tile.is-visible .enc-g-margin-bars .is-sale { animation-delay: 700ms; }
  .has-motion .enc-tile.is-visible .enc-g-margin-pct { animation: enc-pop 600ms cubic-bezier(0.16, 1, 0.3, 1) 1500ms both; }

  .has-motion .enc-tile.is-visible .enc-g-cal i.is-a,
  .has-motion .enc-tile.is-visible .enc-g-cal i.is-b { animation: enc-pop 400ms ease-out both; animation-delay: calc(300ms + var(--d, 0) * 110ms); }

  .has-motion .enc-tile.is-visible .enc-g-paper b { animation: enc-scan 2.6s ease-in-out 400ms infinite; }

  .has-motion .enc-tile.is-visible .enc-g-flow span,
  .has-motion .enc-tile.is-visible .enc-g-flow i { animation: enc-pop 450ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .has-motion .enc-tile.is-visible .enc-g-flow > :nth-child(2) { animation-delay: 200ms; }
  .has-motion .enc-tile.is-visible .enc-g-flow > :nth-child(3) { animation-delay: 400ms; }
  .has-motion .enc-tile.is-visible .enc-g-flow > :nth-child(4) { animation-delay: 600ms; }
  .has-motion .enc-tile.is-visible .enc-g-flow > :nth-child(5) { animation-delay: 800ms; }

  .has-motion .enc-tile.is-visible .enc-g-donut .is-a { animation: enc-donut-a 1200ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both; }
  .has-motion .enc-tile.is-visible .enc-g-donut .is-b { animation: enc-donut-b 1000ms cubic-bezier(0.16, 1, 0.3, 1) 900ms both; }

  .has-motion .enc-tile.is-visible .enc-g-funnel span { animation: enc-grow-x 1000ms cubic-bezier(0.16, 1, 0.3, 1) both; transform-origin: left; }
  .has-motion .enc-tile.is-visible .enc-g-funnel span:nth-child(2) { animation-delay: 250ms; }
  .has-motion .enc-tile.is-visible .enc-g-funnel span:nth-child(3) { animation-delay: 500ms; }

  .has-motion .enc-tile.is-visible .enc-g-qr::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 84px;
    height: 84px;
    margin: -42px 0 0 -42px;
    border-radius: 14px;
    border: 2px solid rgb(var(--tile));
    animation: enc-ping 2.4s ease-out 600ms infinite;
  }

  .has-motion .enc-tile.is-visible .enc-g-web-grid span { animation: enc-pop 450ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .has-motion .enc-tile.is-visible .enc-g-web-grid span:nth-child(1) { animation-delay: 300ms; }
  .has-motion .enc-tile.is-visible .enc-g-web-grid span:nth-child(2) { animation-delay: 450ms; }
  .has-motion .enc-tile.is-visible .enc-g-web-grid span:nth-child(3) { animation-delay: 600ms; }

  .has-motion .enc-tile.is-visible .enc-g-gauge .is-fill { animation: enc-gauge 1400ms cubic-bezier(0.16, 1, 0.3, 1) 300ms both; }

  .has-motion .enc-tile.is-visible .enc-g-sign path { stroke-dasharray: 1; animation: enc-draw 1600ms ease-in-out 300ms both; }

  .has-motion .enc-tile.is-visible .enc-g-companies span,
  .has-motion .enc-tile.is-visible .enc-g-companies em { animation: enc-pop 500ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .has-motion .enc-tile.is-visible .enc-g-companies > :nth-child(2) { animation-delay: 150ms; }
  .has-motion .enc-tile.is-visible .enc-g-companies > :nth-child(3) { animation-delay: 300ms; }
  .has-motion .enc-tile.is-visible .enc-g-companies em { animation-delay: 600ms; }
}

@keyframes enc-pop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@keyframes enc-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--tile), 0); } 50% { box-shadow: 0 0 0 6px rgba(var(--tile), 0.25); } }
@keyframes enc-grow-y { from { transform: scaleY(0); } to { transform: none; } }
@keyframes enc-grow-x { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes enc-scan { 0% { top: 8%; } 50% { top: 86%; } 100% { top: 8%; } }
@keyframes enc-donut-a { from { stroke-dasharray: 0 100; } to { stroke-dasharray: 58 100; } }
@keyframes enc-donut-b { from { stroke-dasharray: 0 100; } to { stroke-dasharray: 26 100; } }
@keyframes enc-ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes enc-gauge { from { stroke-dasharray: 0 100; } to { stroke-dasharray: 72 100; } }
@keyframes enc-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ---------- Lo que solo tienes con Encario (2026-10-21) ---------- */
/* Tres diferencias, cada una con un gráfico grande arriba y dos líneas abajo (antes: tres párrafos). */
.enc-only-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }

.enc-only-card { --tile: 74, 222, 128; display: flex; flex-direction: column; padding: 18px 18px 22px; border-radius: 22px;
  border: 1px solid rgba(var(--tile), 0.3);
  background: radial-gradient(ellipse 90% 60% at 50% 0%, rgba(var(--tile), 0.18), transparent 70%), linear-gradient(180deg, rgba(16, 22, 18, 0.6), rgba(12, 16, 14, 0.9)); }

.enc-only-card--ia { --tile: 167, 139, 250; }
.enc-only-card--one { --tile: 96, 165, 250; }

.enc-only-card h3 { margin: 18px 4px 6px; color: var(--encario-text); font-size: 22px; font-weight: 850; line-height: 1.15; }

.enc-only-card p { margin: 0 4px; color: var(--encario-muted); font-size: 15px; line-height: 1.45; }

.enc-only-card .enc-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: rgb(var(--tile));
  color: #0b120e; font-size: 11px; font-weight: 850; text-transform: uppercase; vertical-align: 3px; }

.enc-og { position: relative; height: 200px; border-radius: 16px; background: rgba(0, 0, 0, 0.22); overflow: hidden; }

/* QR: pegatina → rayo → móvil con la ficha, y los escaneos subiendo */
.enc-og-qr-sticker { position: absolute; left: 8%; top: 22%; width: 82px; height: 82px; padding: 10px; border-radius: 14px; background: #f5f7f2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }

.enc-og-qr-sticker svg { width: 100%; height: 100%; fill: #0b120e; }

.enc-og-qr-beam { position: absolute; left: calc(8% + 88px); top: calc(22% + 38px); width: calc(46% - 96px); height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(var(--tile), 0), rgb(var(--tile))); }

.enc-og-qr-phone { position: absolute; right: 9%; top: 9%; display: grid; gap: 6px; width: 96px; padding: 14px 8px 10px; border-radius: 18px;
  border: 4px solid #0b100d; background: #f5f7f2; color: #14231a; box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45); }

.enc-og-qr-photo { display: block; aspect-ratio: 4 / 3; border-radius: 6px; background: #0f1512 url("../images/encario-fleet.svg") center / cover; }

.enc-og-qr-phone i { display: block; height: 6px; border-radius: 999px; background: #d3d9d0; }

.enc-og-qr-phone i.is-short { width: 60%; }

.enc-og-qr-phone b { font-size: 9px; line-height: 1.2; }

.enc-og-qr-scans { position: absolute; left: 8%; bottom: 12px; display: flex; align-items: flex-end; gap: 4px; height: 40px; }

.enc-og-qr-scans i { display: block; width: 8px; height: var(--h); border-radius: 3px 3px 0 0; background: rgb(var(--tile)); }

.enc-og-qr-scans em { align-self: center; margin-left: 6px; color: var(--encario-muted); font-size: 11px; font-weight: 800; font-style: normal; text-transform: uppercase; }

/* IA: el centro y sus cuatro usos */
.enc-og-ia-lines { position: absolute; inset: 0; width: 100%; height: 100%; }

.enc-og-ia-lines path { fill: none; stroke: rgba(var(--tile), 0.55); stroke-width: 2; stroke-dasharray: 0.04 0.03; vector-effect: non-scaling-stroke; }

.enc-og-ia-core { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; justify-content: center; width: 68px; height: 68px;
  margin: -34px 0 0 -34px; border-radius: 50%; background: rgb(var(--tile)); box-shadow: 0 0 0 10px rgba(var(--tile), 0.16), 0 0 40px rgba(var(--tile), 0.5); }

.enc-og-ia-core svg { width: 34px; height: 34px; fill: #0b120e; }

.enc-og-ia-chip { position: absolute; padding: 7px 12px; border-radius: 999px; background: rgba(245, 247, 242, 0.1); border: 1px solid rgba(var(--tile), 0.4);
  color: var(--encario-text); font-size: 13px; font-weight: 800; transform: translate(-50%, -50%); }

.enc-og-ia-chip.is-tl { left: 17%; top: 18%; }
.enc-og-ia-chip.is-tr { left: 83%; top: 18%; }
.enc-og-ia-chip.is-bl { left: 17%; top: 82%; }
.enc-og-ia-chip.is-br { left: 83%; top: 82%; }

/* De muchas herramientas a una */
.enc-og-one { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 14px; }

.enc-og-one-tools { display: grid; grid-template-columns: repeat(2, 40px); gap: 8px; }

.enc-og-one-tools span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px;
  background: rgba(245, 247, 242, 0.08); }

.enc-og-one-tools span:nth-child(5) { grid-column: 1 / -1; justify-self: center; }

.enc-og-one-tools svg { width: 20px; height: 20px; fill: #8a958d; }

.enc-og-one-arrow { position: relative; width: 44px; height: 3px; border-radius: 3px; background: rgb(var(--tile)); }

.enc-og-one-arrow::after { content: ""; position: absolute; right: -2px; top: -6px; border: 7px solid transparent; border-left-color: rgb(var(--tile)); border-right: 0; }

.enc-og-one-mark { display: inline-flex; align-items: center; justify-content: center; width: 86px; height: 86px; border-radius: 24px;
  background: #0b100d; border: 2px solid rgba(74, 222, 128, 0.5); box-shadow: 0 0 40px rgba(74, 222, 128, 0.35); }

.enc-og-one-mark img { width: 48px; height: 48px; }

@media (max-width: 920px) {
  .enc-only-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .has-motion .enc-only-card.is-visible .enc-og-qr-sticker { animation: enc-pop 600ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both; }
  .has-motion .enc-only-card.is-visible .enc-og-qr-beam { animation: enc-beam 2.4s ease-in-out 800ms infinite; transform-origin: left; }
  .has-motion .enc-only-card.is-visible .enc-og-qr-phone { animation: enc-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 600ms both; }
  .has-motion .enc-only-card.is-visible .enc-og-qr-scans i { animation: enc-grow-y 700ms cubic-bezier(0.16, 1, 0.3, 1) both; animation-delay: calc(1000ms + var(--d, 0) * 110ms); transform-origin: bottom; }

  .has-motion .enc-only-card.is-visible .enc-og-ia-core { animation: enc-pop 600ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both, enc-breathe 3s ease-in-out 1.2s infinite; }
  .has-motion .enc-only-card.is-visible .enc-og-ia-lines path { animation: enc-flow 1.6s linear infinite; }
  .has-motion .enc-only-card.is-visible .enc-og-ia-chip { animation: enc-chip-in 600ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .has-motion .enc-only-card.is-visible .enc-og-ia-chip.is-tl { animation-delay: 500ms; }
  .has-motion .enc-only-card.is-visible .enc-og-ia-chip.is-tr { animation-delay: 650ms; }
  .has-motion .enc-only-card.is-visible .enc-og-ia-chip.is-bl { animation-delay: 800ms; }
  .has-motion .enc-only-card.is-visible .enc-og-ia-chip.is-br { animation-delay: 950ms; }

  .has-motion .enc-only-card.is-visible .enc-og-one-tools span { animation: enc-merge 900ms cubic-bezier(0.16, 1, 0.3, 1) both; }
  .has-motion .enc-only-card.is-visible .enc-og-one-tools span:nth-child(2) { animation-delay: 100ms; }
  .has-motion .enc-only-card.is-visible .enc-og-one-tools span:nth-child(3) { animation-delay: 200ms; }
  .has-motion .enc-only-card.is-visible .enc-og-one-tools span:nth-child(4) { animation-delay: 300ms; }
  .has-motion .enc-only-card.is-visible .enc-og-one-tools span:nth-child(5) { animation-delay: 400ms; }
  .has-motion .enc-only-card.is-visible .enc-og-one-arrow { animation: enc-grow-x 700ms cubic-bezier(0.16, 1, 0.3, 1) 900ms both; transform-origin: left; }
  .has-motion .enc-only-card.is-visible .enc-og-one-mark { animation: enc-pop 700ms cubic-bezier(0.16, 1, 0.3, 1) 1300ms both, enc-breathe 3s ease-in-out 2.2s infinite; }
}

@keyframes enc-beam { 0%, 100% { transform: scaleX(0.2); opacity: 0.3; } 50% { transform: scaleX(1); opacity: 1; } }
@keyframes enc-rise { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes enc-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes enc-flow { to { stroke-dashoffset: -0.07; } }
@keyframes enc-chip-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes enc-merge { from { opacity: 0; transform: translate(-16px, 0) scale(0.6); } to { opacity: 1; transform: none; } }

/* ---------- Barra fija de arriba (2026-10-21) ---------- */
/* Logo más grande, ES/EN (como Molvox) y «Entrar» siempre a la vista: antes iban dentro de la cabecera y se perdían
   al bajar. «Pide tu demo» salió de la barra el 2026-10-23 (a petición del usuario): arriba solo el acceso. */
.enc-home-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 17, 14, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(245, 247, 242, 0.08);
}

.enc-home-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }

.enc-home-nav-logo { gap: 12px; font-size: 28px; }

.enc-home-nav-logo .encario-logo-mark { width: 52px; height: 52px; }

.enc-home-nav-logo .encario-logo-mark img { width: 52px; height: 52px; }

.enc-home-nav-actions { display: flex; align-items: center; gap: 12px; }

.enc-lang { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(245, 247, 242, 0.08); }

.enc-lang a {
  display: grid;
  place-items: center;
  min-width: 38px;
  min-height: 32px;
  border-radius: 999px;
  color: var(--encario-muted);
  font-size: 13px;
  font-weight: 800;
}

.enc-lang a:hover { color: var(--encario-text); }

.enc-lang a.is-active { background: #f5f7f2; color: #0b120e; }

/* «Acceso clientes» (2026-11-01): el único botón de la barra, en verde para que quien ya es cliente lo vea al momento. */
.enc-home-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--encario-primary);
  color: var(--encario-primary-ink);
  font-weight: 850;
  white-space: nowrap;
}

.enc-home-nav-login:hover { background: #6ee99c; color: var(--encario-primary-ink); }

.enc-home-nav-login svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.enc-home-nav-login .is-short { display: none; }

/* Debajo de los botones de la cabecera: el camino directo para quien ya tiene cuenta. */
.enc-home-hero-login { margin: 18px 0 0; color: var(--encario-muted); font-size: 16px; }

.encario-landing .enc-home-hero-login a { color: var(--encario-primary); font-weight: 800; }

.encario-landing .enc-home-hero-login a:hover { color: #6ee99c; text-decoration: underline; }

.enc-home-nav a:focus-visible { outline: 3px solid #f5f7f2; outline-offset: 2px; }

/* La cabecera ya no lleva la barra dentro: un poco menos de alto para que el titular siga en la primera pantalla. */
.encario-home .enc-home-hero { min-height: calc(92svh - 74px); }

@media (max-width: 640px) {
  .enc-home-nav-inner { min-height: 64px; gap: 8px; }

  .enc-home-nav-logo { font-size: 0; gap: 0; }

  .enc-home-nav-logo .encario-logo-mark,
  .enc-home-nav-logo .encario-logo-mark img { width: 46px; height: 46px; }

  .enc-home-nav-actions { gap: 6px; }

  .enc-lang a { min-width: 32px; min-height: 30px; font-size: 12px; }

  .enc-home-nav-login { min-height: 38px; padding: 0 12px; gap: 6px; font-size: 14px; }

  .enc-home-nav-login .is-long { display: none; }

  .enc-home-nav-login .is-short { display: inline; }

  .enc-viaje-ticker { top: 74px; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .enc-home-nav-logo { font-size: 24px; }
}

/* Las anclas (#viaje, #solicitar-demo…) no quedan debajo de la barra fija */
html:has(.encario-home) { scroll-padding-top: 86px; }

@media (max-width: 640px) {
  html:has(.encario-home) { scroll-padding-top: 74px; }
}

/* ---------- Cabecera con imagen de producto (2026-10-21) ---------- */
/* Texto a la izquierda e imagen a la derecha (portátil + móvil con Encario sobre obra); en el móvil, la imagen debajo. */
.enc-home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 40px;
}

.enc-home-hero-visual {
  position: relative;
  margin: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(245, 247, 242, 0.12);
}

.enc-home-hero-visual img { display: block; width: 100%; height: auto; }

/* Un velo muy suave por la izquierda para que case con el fondo oscuro */
.enc-home-hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 17, 14, 0.35), transparent 30%);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .enc-home-hero-visual { animation: enc-hero-visual-in 1100ms cubic-bezier(0.16, 1, 0.3, 1) 250ms both; }
}

@keyframes enc-hero-visual-in {
  from { opacity: 0; transform: translateX(40px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 980px) {
  .enc-home-hero-grid { grid-template-columns: 1fr; gap: 28px; }

  .enc-home-hero-visual { border-radius: 20px; }
}

/* ---------- Por dentro: capturas reales en un portátil y un móvil ---------- */
.encario-home .enc-inside {
  background:
    radial-gradient(ellipse 60% 50% at 70% 60%, rgba(74, 222, 128, 0.14), transparent 70%),
    linear-gradient(180deg, #0f1512 0%, #121c17 100%);
}

.enc-inside-stage { position: relative; max-width: 1080px; margin: 0 auto; padding-right: 120px; padding-bottom: 80px; }

.enc-inside-laptop { margin: 0; }

.enc-inside-laptop-screen {
  overflow: hidden;
  border: 12px solid #1a1f1c;
  border-bottom-width: 16px;
  border-radius: 18px 18px 6px 6px;
  background: #f4f6f8;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.enc-inside-laptop-bar { display: flex; gap: 6px; padding: 8px 12px; background: #e3e7e4; }

.enc-inside-laptop-bar i { width: 9px; height: 9px; border-radius: 50%; background: #a8b2ab; }

.enc-inside-laptop-screen img { display: block; width: 100%; height: auto; }

.enc-inside-laptop-base {
  display: block;
  width: 112%;
  height: 16px;
  margin: 0 -6%;
  border-radius: 0 0 22px 22px;
  background: linear-gradient(180deg, #2c332f, #151a17);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
}

.enc-inside-phone {
  position: absolute;
  right: 0;
  bottom: -40px;
  width: 230px;
  margin: 0;
}

.enc-inside-phone-screen {
  overflow: hidden;
  aspect-ratio: 9 / 18.5;
  border: 9px solid #0b100d;
  border-radius: 34px;
  background: #f4f6f8;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}

.enc-inside-phone-screen img { display: block; width: 100%; height: auto; }

.enc-inside figcaption {
  margin-top: 14px;
  color: var(--encario-muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.enc-inside-laptop figcaption { margin-top: 26px; padding-right: 120px; }

@media (max-width: 760px) {
  .enc-inside-stage { padding-right: 0; padding-bottom: 0; display: grid; gap: 28px; justify-items: center; }

  .enc-inside-laptop-screen { border-width: 6px; border-bottom-width: 8px; border-radius: 12px 12px 4px 4px; }

  .enc-inside-laptop-base { height: 10px; }

  .enc-inside-laptop figcaption { padding-right: 0; }

  .enc-inside-phone { position: static; width: 220px; }
}

/* Entran por partes: el portátil sube y el móvil llega de lado */
.has-motion .encario-home .enc-inside-stage > .enc-inside-phone:not(.is-visible) { transform: translateX(50px) rotate(4deg); }
