/* Presentación de KOVEX y KEVO en la portada.
   Las capturas son visualizaciones ilustrativas: ventanas con borde fino y sombra suave.
   Composición asimétrica en escritorio; carrusel horizontal en móvil. Sin JavaScript se ven las cuatro imágenes. */

/* ---------- Encabezado de KOVEX ---------- */

.kovex-section { margin-top: var(--gap); }
.kovex-head { display: grid; gap: 22px; max-width: 760px; }
.kovex-head h2 { font-size: clamp(3.4rem, 9vw, 7rem); letter-spacing: -0.05em; line-height: 0.92; }
.kovex-head .lead { max-width: 46ch; }

.product-status { font-size: 15px; font-weight: 600; color: var(--petrol); margin: 0; }

.modules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 14px; }
.modules li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; }
.modules .ico { width: 24px; height: 24px; margin-top: 4px; color: var(--petrol); }
.modules span { display: grid; gap: 2px; }
.modules strong { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.modules span { color: var(--muted); }

/* ---------- Escenario de ventanas ---------- */

.stage {
  position: relative;
  margin-top: 56px;
  background: var(--tone);
  border-radius: 28px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.win-main { order: -1; }

.secondary {
  order: 1;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.win {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  box-shadow:
    0 0 0 1px rgba(20, 38, 43, 0.14),
    0 2px 6px rgba(20, 38, 43, 0.10),
    0 28px 56px -26px rgba(20, 38, 43, 0.45);
  transition: transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 320ms ease-out;
  text-decoration: none;
  color: inherit;
}
.win img { display: block; width: 100%; height: auto; }
.win:hover,
.win:focus-visible { transform: translateY(-4px); }
.win:hover { box-shadow: 0 0 0 1px rgba(20, 38, 43, 0.16), 0 6px 14px rgba(20, 38, 43, 0.12), 0 36px 64px -26px rgba(20, 38, 43, 0.5); }

.secondary .win { flex: 0 0 78%; scroll-snap-align: start; }

.win-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(246, 240, 228, 0.94);
  color: var(--ink);
  opacity: 0;
  transition: opacity 200ms ease-out;
}
.win-zoom .ico { width: 18px; height: 18px; }
.win:hover .win-zoom,
.win:focus-visible .win-zoom { opacity: 1; }

.ico { width: 22px; height: 22px; flex: none; }

.stage-legend {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  font-size: 16px;
  color: var(--muted);
}
.stage-legend strong { color: var(--ink); font-weight: 600; }
.note { margin-top: 18px; font-size: 14px; color: var(--muted); max-width: 70ch; }

/* ---------- KEVO ---------- */

.kevo-section { margin-top: var(--gap); }
.kevo-section h2 { font-size: clamp(3.4rem, 9vw, 7rem); letter-spacing: -0.05em; line-height: 0.92; margin-top: 18px; }
.kevo-section .lead { margin-top: 24px; max-width: 46ch; }
.kevo-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px 28px;
}
.kevo-list li { display: flex; align-items: center; gap: 14px; font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.kevo-list .ico { color: var(--petrol); width: 26px; height: 26px; }

/* ---------- Visor ---------- */

.zoom {
  border: 0;
  padding: 0;
  border-radius: 20px;
  background: var(--card);
  color: var(--ink);
  width: min(1180px, 94vw);
  max-height: 92vh;
  overflow: hidden;
}
.zoom::backdrop { background: rgba(10, 30, 36, 0.72); }
.zoom[open] { animation: zoom-in 240ms ease-out both; }

.zoom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--tone);
}
.zoom-bar p { margin: 0; font-weight: 600; font-size: 16px; }
.zoom-actions { display: flex; gap: 8px; }
.zoom-actions button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.zoom-actions button:hover { background: #fff; }
.zoom-actions .ico { width: 20px; height: 20px; }

.zoom-figure { margin: 0; overflow: auto; max-height: calc(92vh - 130px); }
.zoom-figure img { display: block; width: 100%; height: auto; }
.zoom-figure figcaption { padding: 12px 18px 16px; font-size: 14px; color: var(--muted); }

@keyframes zoom-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Escritorio: composición asimétrica ---------- */

@media (min-width: 900px) {
  .kovex-head { grid-template-columns: 1fr; }
  .stage { padding: 0; background: none; display: block; border-radius: 0; margin-top: 72px; }
  .stage-wrap-spacer { display: none; }
  .stage {
    aspect-ratio: 16 / 11;
    max-width: 1080px;
    margin-inline: auto;
    margin-left: 0;
  }
  .secondary { display: contents; }
  .win { position: absolute; }
  .secondary .win { flex: none; scroll-snap-align: none; }
  .win-main { left: 0; top: 2%; width: 64%; z-index: 1; }
  .win-recepcion { right: 0; top: 14%; width: 40%; z-index: 2; }
  .win-cortes { right: 4%; bottom: 0; width: 34%; z-index: 3; }
  .win-login { left: 4%; bottom: 3%; width: 31%; z-index: 4; }
  .stage-legend { grid-template-columns: 1fr 1fr; gap: 10px 48px; }
  .kevo-list { grid-template-columns: 1fr 1fr; }
  .kevo-section .lead, .kovex-head .lead { font-size: 22px; }
}

/* ---------- Animación de entrada (una vez, sin movimiento si el sistema lo pide) ---------- */

.js .stage.is-in .win {
  animation: win-in 640ms cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  opacity: 1;
}
.js .stage.is-in .win-main { animation-delay: 0ms; }
.js .stage.is-in .win-recepcion { animation-delay: 120ms; }
.js .stage.is-in .win-cortes { animation-delay: 200ms; }
.js .stage.is-in .win-login { animation-delay: 280ms; }

@keyframes win-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .stage .win,
  .js .stage.is-in .win { animation: none; opacity: 1; }
  .win, .win:hover, .win:focus-visible { transition: none; transform: none; }
  .zoom[open] { animation: none; }
}
