/* ==========================================================================
   Omnilane — Estilos adicionales para páginas de solución y plataforma
   (se carga DESPUÉS de styles.css; no sobreescribe componentes existentes)
   ========================================================================== */

/* ---------- Chips enlazables (módulos clave) ---------- */

a.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}
a.chip:hover,
a.chip:focus-visible {
  border-color: var(--blue);
  color: var(--blue-ink);
  background: var(--bg-tint);
  text-decoration: none;
}
a.chip .arrow { font-weight: 800; }

/* ---------- Cuerpo de los bloques "Qué cambia con Omnilane" ---------- */

.model-card .model-body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 62em;
}

/* ---------- Variante de cierre con fondo suave ---------- */

.closing--tint { background: var(--bg-soft); }

/* ---------- Pasos numerados (plataforma · sección oscura) ---------- */

.steps {
  display: grid;
  gap: 1.1rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.step {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.25rem 1.35rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.step:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(0, 206, 200, 0.4);
  transform: translateX(4px);
}

.step-num {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--grad);
  color: #fff;
}

.step h3 { color: #fff; font-size: 1.18rem; margin-bottom: 0.3rem; }
.step p { margin: 0; color: #c4c8ec; font-size: 0.99rem; }

/* ---------- Principios de la plataforma (4 cards en 2×2) ---------- */

.principle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

.principle-card { display: flex; flex-direction: column; padding: 2rem; }
.principle-card .module-icon {
  background: var(--bg-tint);
  color: var(--blue-ink);
  margin-bottom: 1.2rem;
}
.principle-card p { margin: 0; color: var(--ink-soft); }

/* ---------- Banda de métricas (plataforma) ---------- */

.metrics-strip {
  background: linear-gradient(120deg, rgba(63, 82, 254, 0.06), rgba(0, 206, 200, 0.09));
  padding-block: clamp(3rem, 6vw, 5rem);
}
.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  max-width: 880px;
  margin-inline: auto;
}
.metrics-row .metric strong { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }

/* ==========================================================================
   Hero "ficha de situación" — páginas de SOLUCIONES
   Una sola card de contexto con filas internas (vs. paneles flotantes home)
   ========================================================================== */

.hero-scene {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: clamp(1rem, 3vw, 2rem);
}

/* Lámina tintada + trama de puntos detrás de la ficha */
.scene-backdrop {
  position: absolute;
  inset: 9% -3% -5% 16%;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(63, 82, 254, 0.09), rgba(0, 206, 200, 0.14));
  transform: rotate(2.5deg);
  pointer-events: none;
}
.scene-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: radial-gradient(rgba(63, 82, 254, 0.22) 1.5px, transparent 2px);
  background-size: 20px 20px;
  mask-image: linear-gradient(135deg, transparent 35%, #000 90%);
  -webkit-mask-image: linear-gradient(135deg, transparent 35%, #000 90%);
}

.context-card {
  position: relative;
  width: min(100%, 460px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: ctx-rise 0.8s cubic-bezier(0.2, 0.65, 0.3, 1) both 0.1s;
}
/* Lomo izquierdo: la "ficha" tiene espina de gradiente, no halo flotante */
.context-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--blue), var(--teal));
}

.ctx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 1.1rem 1.35rem 1.05rem 1.6rem;
  border-bottom: 1px dashed var(--line-strong);
  background: linear-gradient(180deg, #fbfcff, #fff);
}
.ctx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.ctx-kicker::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--grad);
  flex-shrink: 0;
}
.ctx-meta {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal-ink);
  background: var(--bg-teal-tint);
  border: 1px solid rgba(0, 178, 173, 0.25);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.ctx-rows {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
}
.ctx-row {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.9rem 1.35rem 0.9rem 1.6rem;
  animation: ctx-row-in 0.6s cubic-bezier(0.2, 0.65, 0.3, 1) both;
}
.ctx-row:nth-child(1) { animation-delay: 0.3s; }
.ctx-row:nth-child(2) { animation-delay: 0.42s; }
.ctx-row:nth-child(3) { animation-delay: 0.54s; }
.ctx-row:nth-child(4) { animation-delay: 0.66s; }
.ctx-row + .ctx-row { border-top: 1px solid var(--line); }

.ctx-row--featured {
  background: linear-gradient(120deg, rgba(63, 82, 254, 0.05), rgba(0, 206, 200, 0.1));
  box-shadow: inset 3px 0 0 var(--teal);
}

.ctx-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 1.7em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex-shrink: 0;
}
.ctx-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ctx-row-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ctx-row-main strong { font-size: 0.97rem; font-weight: 800; line-height: 1.3; color: var(--ink); }
.ctx-row-main small { font-size: 0.8rem; font-weight: 700; color: var(--ink-faint); line-height: 1.35; }

/* Mini-indicador "visibilidad con Omnilane": barra que se llena hasta turquesa */
.ctx-meter {
  width: 86px; height: 8px;
  border-radius: 99px;
  background: var(--bg-tint);
  overflow: hidden;
  flex-shrink: 0;
}
.ctx-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transform-origin: left center;
  animation: ctx-meter-fill 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.ctx-row:nth-child(1) .ctx-meter i { animation-delay: 0.75s; }
.ctx-row:nth-child(2) .ctx-meter i { animation-delay: 0.9s; }
.ctx-row:nth-child(3) .ctx-meter i { animation-delay: 1.05s; }

/* Check "mismo modelo de gestión" (operadores) */
.ctx-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--bg-teal-tint);
  color: var(--teal-ink);
  border: 1px solid rgba(0, 178, 173, 0.3);
  animation: ctx-check-pop 0.45s cubic-bezier(0.3, 1.45, 0.4, 1) both;
}
.ctx-row:nth-child(1) .ctx-check { animation-delay: 0.75s; }
.ctx-row:nth-child(2) .ctx-check { animation-delay: 0.88s; }
.ctx-row:nth-child(3) .ctx-check { animation-delay: 1.01s; }
.ctx-row:nth-child(4) .ctx-check { animation-delay: 1.14s; }

.ctx-foot {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.35rem 1rem 1.6rem;
  border-top: 1px dashed var(--line-strong);
  background: var(--bg-soft);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  animation: ctx-row-in 0.6s cubic-bezier(0.2, 0.65, 0.3, 1) both 0.8s;
}
.ctx-foot::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(0, 206, 200, 0.5);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes ctx-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes ctx-row-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes ctx-meter-fill {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes ctx-check-pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   Realce sutil de la sección estrella (modelos / bloques numerados)
   ========================================================================== */

.model-card { position: relative; }

/* Línea conectora vertical punteada entre bloques, a la altura del número */
.model-card + .model-card::before {
  content: "";
  position: absolute;
  left: clamp(2.7rem, 6vw, 4.1rem);
  top: -1.75rem;
  width: 2px;
  height: 1.75rem;
  background: repeating-linear-gradient(180deg, rgba(63, 82, 254, 0.4) 0 5px, transparent 5px 10px);
}

/* Numeración más prominente: subrayado de gradiente bajo el número */
.model-num {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
}
.model-num::after {
  content: "";
  width: 2.1rem;
  height: 4px;
  border-radius: 3px;
  background: var(--grad);
  opacity: 0.85;
}

/* ==========================================================================
   Hero de PLATAFORMA — diagrama de capas apiladas en perspectiva
   ========================================================================== */

.layers-scene {
  position: relative;
  display: grid;
  place-items: center;
}
.layers-svg {
  width: 100%;
  max-width: 500px;
  height: auto;
}

.layer { animation: layer-rise 0.7s cubic-bezier(0.2, 0.65, 0.3, 1) both; }
.layer--bottom { animation-delay: 0.05s; }
.layer--mid { animation-delay: 0.22s; }
.layer--top { animation-delay: 0.4s; }
.layer--labels { animation: layer-rise 0.7s cubic-bezier(0.2, 0.65, 0.3, 1) both 0.55s; }

/* Flujos verticales de datos entre planos (dash-offset) */
.flow-line {
  stroke-dasharray: 4 8;
  animation: flow-up 1.5s linear infinite;
}

@keyframes layer-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes flow-up {
  to { stroke-dashoffset: -48; }
}

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
  .principle-grid { grid-template-columns: 1fr; }
  .hero-scene, .layers-scene { max-width: 520px; margin-inline: auto; width: 100%; }
}

@media (max-width: 640px) {
  .metrics-row { grid-template-columns: 1fr; gap: 1.4rem; }
  .step { flex-direction: row; padding: 1.1rem; }
  .ctx-head, .ctx-row, .ctx-foot { padding-inline: 1.1rem 1rem; }
  .ctx-meter { width: 60px; }
  .model-card + .model-card::before { left: 2rem; }
}
