/* ==========================================================================
   Zenith DEV Solutions — Componentes del sitio (sobre design-system.css)
   ========================================================================== */

/* Utilidades puntuales ---------------------------------------------------- */
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.mt-7 { margin-top: var(--s-7); }
.justify-center { justify-content: center; }
.split--start { align-items: start; }

/* Primer bloque de cada página: mismo margen superior que el hero de inicio */
main > .section:first-child { padding-top: clamp(1.5rem, 3vw, 2.5rem); }

/* Navegación -------------------------------------------------------------- */
.nav__actions { display: flex; align-items: center; gap: var(--s-3); }
.nav__menu { display: block; }

@media (max-width: 1120px) {
  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: var(--ink-1);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-panel);
  }
  .nav__menu.is-open { display: block; }
  .nav__menu .nav__links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-4);
    padding: var(--s-5) var(--gutter);
  }
}

/* Hero -------------------------------------------------------------------- */
.hero { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.hero h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3rem); }
.hero__stats { gap: var(--s-4); }

/* Rotator de frases (espacio reservado por la frase más alta) ------------- */
.rotator { display: grid; }
.rotator > * { grid-area: 1 / 1; }
.rotator__sizers { display: grid; visibility: hidden; }
.rotator__sizers > span { grid-area: 1 / 1; }
.rotator__live { transition: opacity var(--rotator-fade, 600ms) var(--ease); }
.rotator__live.is-fading { opacity: 0; }
.rotator__controls { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.rotator__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  line-height: 1;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.rotator__arrow:hover { color: var(--phosphor); border-color: var(--phosphor-deep); background: rgba(57, 255, 20, 0.06); }
.hero .terminal { margin-top: 0; }

/* Barra de progreso del ciclo (frases y widget) -------------------------- */
.cycle-bar {
  position: relative;
  width: 100%;
  height: 2px;
  margin-top: var(--s-4);
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.cycle-bar > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--phosphor);
  border-radius: inherit;
}
.widget__progress {
  position: relative;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}
.widget__progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--phosphor);
}

/* Widget rotativo del hero (terminal + comparativas) --------------------- */
.widget {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}
.widget__bar .terminal__title { flex: 1; transition: opacity 250ms var(--ease); }
.widget__bar .terminal__title.is-fading { opacity: 0; }
.widget__status { font-size: var(--fs-xs); letter-spacing: 0.05em; color: var(--phosphor-soft); white-space: nowrap; }
.widget__stack { display: grid; }
.widget__slide {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--widget-fade, 350ms) var(--ease);
}
.widget__slide.is-active { visibility: visible; opacity: 1; }
.widget__slide.is-fading { opacity: 0; }
.widget__body { padding: clamp(1rem, 2.5vw, 1.6rem); font-family: var(--mono); font-size: var(--fs-sm); }
.widget__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  margin-bottom: var(--s-5);
}
.widget__h { font-family: var(--mono); font-size: var(--fs-base); color: #eef2ea; }
.widget__sub { font-size: var(--fs-xs); white-space: nowrap; }
.widget__note {
  margin-top: var(--s-4);
  padding: var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(57, 255, 20, 0.04);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}
.widget__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 0.75rem clamp(1rem, 2.5vw, 1.6rem);
  border-top: 1px solid var(--line);
  background: var(--ink-2);
}
.widget__tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.widget__tab {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  padding: 0.25rem 0.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.widget__tab:hover { color: var(--text); border-color: var(--line); }
.widget__tab.is-active { background: var(--phosphor); color: var(--ink); font-weight: 600; }
.widget__actions { display: flex; align-items: center; gap: var(--s-3); }
.widget__estimacion { font-size: 0.65rem; white-space: nowrap; }
.widget__play {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.widget__play:hover { color: var(--phosphor); border-color: var(--phosphor-deep); }

/* Barras horizontales (tiempos) */
.chart-bars { display: grid; gap: var(--s-4); }
.chart-bars__row {
  display: grid;
  grid-template-columns: minmax(96px, 0.9fr) minmax(0, 2.4fr) auto;
  align-items: center;
  gap: var(--s-3);
}
.chart-bars__label { font-family: var(--mono); font-size: var(--fs-xs); color: var(--text); }
.chart-bars__track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  overflow: hidden;
}
.chart-bars__fill { display: block; height: 100%; border-radius: 999px; }
.chart-bars__fill--trad { background: var(--danger); }
.chart-bars__fill--zenith { background: var(--phosphor); box-shadow: 0 0 12px rgba(57, 255, 20, 0.4); }
.chart-bars__value { font-size: var(--fs-sm); color: #eef2ea; white-space: nowrap; }
.chart-bars__value small { font-size: 0.65rem; color: var(--text-dim); }

/* Gráfico de líneas (costos, SVG) */
.chart-line { display: block; width: 100%; height: auto; }
.chart-line__grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.chart-line__axis { fill: var(--text-faint); font-family: var(--mono); font-size: 9px; }
.chart-line__series { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-line__series--trad { stroke: var(--danger); }
.chart-line__series--zenith { stroke: var(--phosphor); }
.chart-line__dot--trad { fill: var(--danger); }
.chart-line__dot--zenith { fill: var(--phosphor); }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--text-dim); }
.chart-legend__item { display: inline-flex; align-items: center; gap: 0.4rem; }
.chart-legend__swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; }
.chart-legend__swatch--trad { background: var(--danger); }
.chart-legend__swatch--zenith { background: var(--phosphor); }

/* Barras de progreso (adopción) */
.chart-progress { display: grid; gap: var(--s-5); }
.chart-progress__head {
  display: flex;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
  font-size: var(--fs-xs);
  color: var(--text);
}
.chart-progress__bar {
  position: relative;
  display: flex;
  align-items: center;
  height: 18px;
  margin-bottom: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  overflow: hidden;
}
.chart-progress__bar > span { display: block; height: 100%; border-radius: 999px; }
.chart-progress__bar--zenith > span { background: var(--phosphor); }
.chart-progress__bar--trad > span { background: var(--danger); }
.chart-progress__bar b {
  position: absolute;
  right: 0.5rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: #f2f5ef;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.85);
}

@media (max-width: 520px) {
  .chart-bars__row { grid-template-columns: 1fr; gap: 0.35rem; }
  .chart-bars__value { justify-self: end; }
}

/* Badge apagado (sistema fuera de producción) ----------------------------- */
.badge--muted {
  color: var(--text-dim);
  background: transparent;
  border-color: var(--line);
}

/* Confianza / clientes ---------------------------------------------------- */
.confianza__kicker {
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.section-head .confianza__kicker { margin-bottom: 0; }
.logo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s-4);
}
.logo-strip__item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.logo-strip__name { font-family: var(--mono); font-weight: 600; color: #eef2ea; }
.logo-strip__desc { font-size: var(--fs-xs); color: var(--text-dim); }

/* Servicios (estilo man page) -------------------------------------------- */
.services { border-top: 1px solid var(--line-paper); }
.service {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 4vw, 3rem);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line-paper);
}
.service__num { font-family: var(--pixel); font-size: 2rem; line-height: 1; color: var(--phosphor-deep); }
.service__title { font-family: var(--mono); font-size: var(--fs-lg); color: var(--on-paper); }
.service__text { margin-top: 0.35rem; color: var(--on-paper-dim); max-width: 72ch; }
.service__meta { margin-top: 0.5rem; font-size: var(--fs-xs); color: #8a5e00; }

/* Cards de sistemas ------------------------------------------------------- */
.sistema-card { display: flex; flex-direction: column; height: 100%; }
.sistema-card__top { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--s-3); }
.sistema-card__client { font-size: var(--fs-xs); margin-top: 0.15rem; }
.sistema-card__stack { font-size: var(--fs-xs); }
.sistema-card .btn { margin-top: auto; align-self: flex-start; }

/* Sectores ---------------------------------------------------------------- */
.sector { padding-top: var(--s-4); border-top: 2px solid var(--line-paper-strong); }
.sector__name { font-family: var(--mono); font-size: var(--fs-lg); color: var(--on-paper); }
.sector__text { margin-top: 0.3rem; font-size: var(--fs-sm); color: var(--on-paper-dim); }

/* Stack ------------------------------------------------------------------- */
.stack { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--s-6); }
.stack__cat { font-size: var(--fs-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--phosphor); margin-bottom: var(--s-3); }
.stack__list { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.stack__item { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: var(--s-3); }
.stack__name { font-size: var(--fs-sm); color: var(--text); }
.stack__bar { width: 90px; }

/* Sobre mí ---------------------------------------------------------------- */
.sobre__about { margin-top: var(--s-4); color: var(--on-paper-dim); max-width: 64ch; }

/* Fila de "Quién soy": texto · foto · terminal */
.split--about { grid-template-columns: 1.1fr 0.55fr 1fr; }
.sobre__photo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.sobre__photo img,
.sobre__photo__icon {
  width: 100%;
  max-width: 260px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  border: 1px solid var(--line-paper);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.55);
}
.sobre__photo img { object-fit: cover; display: block; }
.sobre__photo__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-paper-dim);
  background: var(--paper-2);
}
.sobre__photo__icon svg { width: 42%; height: 42%; }
@media (max-width: 860px) {
  .split--about { grid-template-columns: 1fr; }
  .sobre__photo { order: -1; }
  .sobre__photo img,
  .sobre__photo__icon { max-width: 200px; }
}
.terminal--paper { background: var(--paper-2); border-color: var(--line-paper); box-shadow: none; }
.terminal--paper .terminal__bar { background: var(--paper-3); border-bottom-color: var(--line-paper); }
.terminal--paper .terminal__dots i { background: var(--line-paper-strong); }
.terminal--paper .terminal__title { color: var(--on-paper-dim); }
.terminal--paper .terminal__body { color: var(--on-paper); }
.terminal--paper .line b { color: var(--on-paper); }
.terminal--paper .dim { color: var(--on-paper-dim); }

/* Certificaciones --------------------------------------------------------- */
.certs { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.certs__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-4);
  align-items: baseline;
  padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--line);
}
.certs__marker { font-size: var(--fs-xs); color: var(--phosphor); }
.certs__title { color: #eef2ea; }
.certs__org { font-size: var(--fs-xs); text-align: right; }

/* Proceso ----------------------------------------------------------------- */
.step { border-top: 2px solid var(--line-paper-strong); padding-top: var(--s-4); }
.step__num { display: block; font-size: 2rem; line-height: 1; color: var(--phosphor-deep); }
.step__title { margin-top: 0.3rem; font-family: var(--mono); font-size: var(--fs-lg); color: var(--on-paper); }
.step__text { margin-top: 0.35rem; font-size: var(--fs-sm); color: var(--on-paper-dim); }

/* FAQ --------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) 0;
  font-family: var(--mono);
  color: #eef2ea;
  cursor: pointer;
  list-style: none;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; color: var(--phosphor); }
.faq__item[open] .faq__q::after { content: "–"; }
.faq__a { padding-bottom: var(--s-4); color: var(--text-dim); max-width: 72ch; }

/* CTA --------------------------------------------------------------------- */
.cta { background: linear-gradient(180deg, var(--ink), var(--ink-2)); }
.cta .lead { max-width: 54ch; }

/* Contacto ---------------------------------------------------------------- */
.contact-list { list-style: none; padding: 0; display: grid; gap: var(--s-3); }
.contact-list li { display: flex; align-items: baseline; gap: var(--s-4); }
.contact-list .mono.dim { min-width: 4.5rem; }

.contact-form { display: flex; flex-direction: column; gap: var(--s-4); }
.contact-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.contact-form .field { display: flex; flex-direction: column; gap: 0.35rem; }
.contact-form .field__label {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-paper-dim);
}
.contact-form .field__hint { font-size: var(--fs-xs); color: var(--on-paper-dim); }
.contact-form .input {
  width: 100%;
  padding: 0.55rem 0.7rem;
  background: var(--paper);
  border: 1px solid var(--line-paper-strong);
  border-radius: var(--radius-sm);
  color: var(--on-paper);
  font-family: var(--sans);
  font-size: var(--fs-sm);
}
.contact-form .input:focus { outline: none; border-color: var(--phosphor-deep); box-shadow: 0 0 0 1px var(--phosphor-deep); }
.contact-form textarea.input { min-height: 120px; resize: vertical; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.alert {
  margin-bottom: var(--s-4);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-paper-strong);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
}
.alert--ok { color: #1f6b12; background: rgba(57, 255, 20, 0.14); border-color: rgba(31, 138, 18, 0.4); }
.alert--error { color: #8a1f1f; background: rgba(255, 95, 86, 0.12); border-color: rgba(255, 95, 86, 0.4); }

@media (max-width: 600px) {
  .contact-form .form-grid { grid-template-columns: 1fr; }
}

/* Detalle de sistema ------------------------------------------------------ */
.sistema-detalle__text { color: var(--text-dim); max-width: 72ch; }
.sistema-detalle__aside { position: relative; }
.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3) var(--s-5);
  padding: var(--s-5);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: sticky;
  top: 92px;
}
.specs dt {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.specs dd { margin: 0; color: var(--text); }
/* Ficha de sistema -------------------------------------------------------- */
.ficha__head { display: flex; flex-direction: column; gap: var(--s-3); }
.ficha__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-4); }
.ficha__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-top: var(--s-6);
}
@media (max-width: 860px) {
  .ficha__layout { grid-template-columns: 1fr; }
}

/* Carrusel de capturas (peek) -------------------------------------------- */
.ficha__galeria { max-width: min(100%, 900px); margin-inline: auto; }
.carousel__stage { position: relative; }
.carousel__viewport {
  --gap: var(--s-4);
  --slide-w: clamp(240px, 62%, 460px);
  display: flex;
  gap: var(--gap);
  padding-block: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.carousel__viewport::before,
.carousel__viewport::after {
  content: "";
  flex: 0 0 max(0px, calc((100% - var(--slide-w)) / 2 - var(--gap)));
}
.carousel__slide {
  flex: 0 0 var(--slide-w);
  min-width: 0;
  margin: 0;
  scroll-snap-align: center;
  transform: scale(0.7);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.carousel__slide.is-active { transform: scale(1); z-index: 1; }
.carousel__slide:not(.is-active) { opacity: 0.55; }
.carousel__thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
.carousel__thumb:hover { border-color: var(--line-strong); }
.carousel__thumb img { display: block; width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.carousel__play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  padding-left: 0.15rem;
  font-size: 1.05rem;
  color: var(--ink);
  background: rgba(57, 255, 20, 0.92);
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 8px 22px -10px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}
.carousel__caption { margin-top: 0.5rem; font-size: var(--fs-xs); }
.carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  font-family: var(--mono);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text);
  background: rgba(14, 18, 13, 0.82);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
.carousel__nav:hover:not(:disabled) { color: var(--phosphor); border-color: var(--phosphor); }
.carousel__nav:disabled { opacity: 0.35; cursor: default; }
.carousel__nav--prev { left: var(--s-3); }
.carousel__nav--next { right: var(--s-3); }
.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-4);
}
.carousel__play {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.carousel__play:hover { color: var(--phosphor); border-color: var(--phosphor-deep); }
.carousel__counter {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}
@media (max-width: 640px) {
  .carousel__viewport { --slide-w: 82%; }
}

/* Lightbox ---------------------------------------------------------------- */
.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: var(--s-5);
  border: 0;
  background: transparent;
  overflow: hidden;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(4, 6, 4, 0.9); backdrop-filter: blur(4px); }
.lightbox__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: min(1100px, 100%);
}
.lightbox__stage { flex: 1; min-width: 0; margin: 0; }
.lightbox__stage img {
  width: 100%;
  max-height: 76dvh;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--ink-2);
}
.lightbox__video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
}
.lightbox__video iframe { display: block; width: 100%; height: 100%; border: 0; }
.lightbox__caption {
  margin-top: var(--s-3);
  text-align: center;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  color: var(--text-dim);
}
.lightbox__close,
.lightbox__nav {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(14, 18, 13, 0.82);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
.lightbox__close { width: 2.2rem; height: 2.2rem; font-family: var(--mono); font-size: 1.1rem; }
.lightbox__nav { width: 2.8rem; height: 2.8rem; font-family: var(--mono); font-size: 1.6rem; line-height: 1; }
.lightbox__close:hover,
.lightbox__nav:hover:not(:disabled) { color: var(--phosphor); border-color: var(--phosphor); }
.lightbox__nav:disabled { opacity: 0.35; cursor: default; }
.lightbox__inner > .lightbox__close { position: absolute; top: -2.6rem; right: 0; }
@media (max-width: 640px) {
  .lightbox { padding: var(--s-3); }
  .lightbox__nav { width: 2.2rem; height: 2.2rem; font-size: 1.3rem; }
  .lightbox__inner > .lightbox__close { top: -2.4rem; }
}

/* Footer ------------------------------------------------------------------ */
:root { --footer-bar-h: 56px; }

body { padding-bottom: var(--footer-bar-h); }

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  background: var(--ink-1);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px -20px rgba(0, 0, 0, 0.9);
}
.site-footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: var(--footer-bar-h);
}
.site-footer__brand { color: #f2f5ef; }
.site-footer__brand .brand__mark { width: 30px; height: 30px; }
.site-footer__brand .brand__word { font-size: 0.95rem; }
.site-footer__brand .brand__word small { display: none; }
.site-footer__copy { font-size: var(--fs-xs); white-space: nowrap; }
.site-footer__toggle {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1;
  color: var(--phosphor);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-footer__toggle::before { content: "▲"; color: var(--phosphor-deep); font-weight: 400; }
.site-footer.is-open .site-footer__toggle::before { content: "▼"; }
.site-footer__toggle:hover { background: rgba(57, 255, 20, 0.08); border-color: var(--phosphor-deep); }
.site-footer__toggle { animation: footer-hint 5s ease-in-out infinite; }
.site-footer.is-open .site-footer__toggle,
.site-footer.is-hinted .site-footer__toggle { animation: none; }

@keyframes footer-hint {
  0%, 22%, 100% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0); border-color: var(--line-strong); }
  6% { box-shadow: 0 0 0 4px rgba(57, 255, 20, 0.16); border-color: var(--phosphor-deep); }
  14% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0); border-color: var(--line-strong); }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__toggle { animation: none; }
  .carousel__viewport { scroll-behavior: auto; }
  .carousel__slide { transition: none; }
  .cycle-bar > span,
  .widget__progress > span { transition: none !important; }
}

.site-footer__panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.site-footer.is-open .site-footer__panel {
  max-height: 80dvh;
  opacity: 1;
  overflow-y: auto;
  padding-top: var(--s-6);
  padding-bottom: var(--s-6);
}
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6); }
.site-footer__title {
  margin-bottom: var(--s-3);
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.site-footer__links { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.site-footer__links a { color: var(--text); }
.site-footer__links a:hover { color: var(--phosphor); }
.site-footer__tagline { font-size: var(--fs-xs); max-width: 40ch; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-4);
  font-size: var(--fs-xs);
}

@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__copy { display: none; }
  .specs { position: static; }
}

@media (max-width: 560px) {
  .service { grid-template-columns: 1fr; }
  .stack__item { grid-template-columns: 1fr 70px; }
}

/* ==========================================================================
   Zenith ERP — landing comercial
   ========================================================================== */

/* Enlace destacado en la navegación --------------------------------------- */
.nav__links .nav__link--erp {
  padding: 0.4rem 0.75rem;
  color: var(--ink);
  background: var(--phosphor);
  border-radius: var(--radius-sm);
  font-weight: 600;
  box-shadow: var(--glow-phosphor);
}
.nav__links .nav__link--erp::before { content: ""; }
.nav__links .nav__link--erp:hover { color: var(--ink); background: var(--phosphor-soft); }

/* Bloque 1 — Hero ---------------------------------------------------------- */
.erp-hero { padding-top: clamp(1.5rem, 3vw, 2.5rem); }
.erp-hero__title { font-size: clamp(1.8rem, 1.1rem + 3vw, 2.9rem); }

/* Mockup CRT del dashboard */
.erp-mock { margin-top: 0; }
.erp-mock .terminal__body { display: grid; gap: var(--s-5); }
.erp-mock__kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); }
.erp-mock__kpi {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.7rem 0.8rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.erp-mock__kpi-label { font-size: var(--fs-xs); letter-spacing: 0.1em; color: var(--text-dim); }
.erp-mock__kpi-value { font-family: var(--pixel); font-size: 1.4rem; line-height: 1; color: #eef2ea; }
.erp-mock__kpi-delta { font-size: var(--fs-xs); }
.erp-mock__chart {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 120px;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, rgba(57, 255, 20, 0.05), transparent);
}
.erp-mock__chart > span {
  flex: 1;
  height: var(--h, 40%);
  background: linear-gradient(180deg, var(--phosphor), var(--phosphor-deep));
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 12px rgba(57, 255, 20, 0.35);
  opacity: 0.9;
}
.erp-mock__rows { display: grid; gap: 0.35rem; }
.erp-mock__caption { margin-top: 0.25rem; font-size: var(--fs-xs); }
@media (max-width: 520px) {
  .erp-mock__kpis { grid-template-columns: 1fr 1fr; }
}

/* Bloque 2 — Beneficios ---------------------------------------------------- */
.erp-benefit__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--phosphor);
  background: rgba(57, 255, 20, 0.06);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

/* Bloque 3 — Módulos (zigzag) --------------------------------------------- */
.erp-modules { display: grid; gap: clamp(2rem, 5vw, 3.5rem); }
.erp-module {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.erp-module__copy { max-width: 46ch; }
.erp-module__panel { margin: 0; }
.erp-module.is-reverse .erp-module__copy { order: 2; }
@media (max-width: 860px) {
  .erp-module { grid-template-columns: 1fr; }
  .erp-module.is-reverse .erp-module__copy { order: 0; }
}

/* Bloque 4 — Precios ------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: clamp(1.4rem, 3vw, 2rem);
  background: var(--paper-2);
  border: 2px solid var(--line-paper);
  border-radius: var(--radius);
}
.price-card--featured {
  border-color: var(--phosphor-deep);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.5);
}
.price-card__flag {
  position: absolute;
  top: -0.75rem;
  left: clamp(1.4rem, 3vw, 2rem);
  padding: 0.2rem 0.65rem;
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--phosphor);
  border-radius: 999px;
}
.price-card__name { font-family: var(--mono); font-size: var(--fs-lg); color: var(--on-paper); }
.price-card__price {
  font-family: var(--pixel);
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
  color: var(--on-paper);
}
.price-card__note { font-size: var(--fs-sm); color: var(--on-paper-dim); }
.price-card__features { list-style: none; padding: 0; display: grid; gap: 0.55rem; margin-top: var(--s-2); }
.price-card__features li { position: relative; padding-left: 1.6em; font-size: var(--fs-sm); color: var(--on-paper); }
.price-card__features li::before {
  content: "->";
  position: absolute;
  left: 0;
  font-family: var(--mono);
  color: var(--phosphor-deep);
}
.price-card__cta { margin-top: auto; }
.erp-pricing__note { max-width: 70ch; margin-inline: auto; }
@media (max-width: 700px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* Botón flotante de WhatsApp (global) ------------------------------------ */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: calc(var(--footer-bar-h) + 1rem);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  background: var(--phosphor);
  border: 1px solid var(--phosphor);
  border-radius: 999px;
  box-shadow: var(--glow-phosphor);
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.wa-float:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(57, 255, 20, 0.45), 0 0 30px rgba(57, 255, 20, 0.4);
}
.wa-float__icon { display: inline-flex; }
.wa-float__label { white-space: nowrap; }
@media (max-width: 560px) {
  .wa-float { padding: 0.7rem; }
  .wa-float__label { display: none; }
}
