/* ==========================================================
   ERP+CRM App — sitio de presentación
   Paleta tomada de app/ui/theme.py (tema claro)
   ========================================================== */

:root {
  color-scheme: light;

  --fondo: #f1f5f9;
  --fondo-2: #e8eef6;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --borde: #cbd5e1;
  --texto: #0f172a;
  --suave: #64748b;
  --acento: #7f1d1d;
  --verde: #14532d;
  --marca: #1e3a8a;
  --marca-hi: #304ba0;
  --azul: #1976d2;
  --azul-hi: #1565c0;
  --seleccion: #dbeafe;
  --seleccion-texto: #1e3a8a;
  --hover: #e2e8f0;
  --wa: #128c7e;
  --wa-hi: #0d6f64;

  --wrap: 1180px;
  --radio: 16px;
  --radio-lg: 22px;
  --sombra: 0 26px 70px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  color: var(--texto);
  background:
    radial-gradient(circle at 12% -5%, rgba(25, 118, 210, 0.12), transparent 40rem),
    radial-gradient(circle at 92% 12%, rgba(127, 29, 29, 0.09), transparent 38rem),
    var(--fondo);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

.wrap.narrow {
  width: min(820px, calc(100% - 40px));
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  color: #fff;
  border-radius: 10px;
  background: var(--azul);
}

.skip-link:focus {
  top: 16px;
}

/* ---------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--borde);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  text-decoration: none;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--azul), var(--marca-hi));
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-text strong,
.logo-text small {
  display: block;
}

.logo-text strong {
  font-size: 1.02rem;
}

.logo-text small {
  margin-top: 2px;
  color: var(--suave);
  font-size: 0.74rem;
}

.site-nav {
  display: flex;
  gap: 6px;
}

.site-nav a {
  padding: 9px 14px;
  color: var(--suave);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--texto);
  background: var(--seleccion);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--borde);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
}

.nav-toggle span {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  margin: auto;
  background: var(--texto);
}

.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--texto);
  content: "";
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

/* ---------------------------------------------------------- botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--azul), var(--azul-hi));
  box-shadow: 0 12px 26px rgba(25, 118, 210, 0.26);
}

.btn-primary:hover {
  box-shadow: 0 16px 32px rgba(25, 118, 210, 0.34);
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--texto);
  border-color: var(--borde);
  background: var(--panel);
}

.btn-ghost:hover {
  background: var(--hover);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.btn-wa {
  color: #fff;
  background: linear-gradient(135deg, #1faa8b, var(--wa));
  box-shadow: 0 12px 26px rgba(18, 140, 126, 0.26);
}

.btn-wa:hover {
  background: linear-gradient(135deg, #1faa8b, var(--wa-hi));
  box-shadow: 0 16px 32px rgba(18, 140, 126, 0.34);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 16px 30px;
  font-size: 1rem;
}

.btn:focus-visible,
.nav-toggle:focus-visible,
.site-nav a:focus-visible,
summary:focus-visible,
.lightbox-close:focus-visible {
  outline: 3px solid rgba(30, 58, 138, 0.35);
  outline-offset: 3px;
}

/* ---------------------------------------------------------- hero */
.hero {
  padding: 72px 0 64px;
}

.hero-inner {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 52px;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  margin-bottom: 18px;
  color: var(--seleccion-texto);
  border: 1px solid rgba(30, 58, 138, 0.2);
  border-radius: 999px;
  background: rgba(25, 118, 210, 0.09);
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1 {
  max-width: 15ch;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
}

.lead {
  max-width: 52ch;
  margin-top: 18px;
  color: var(--suave);
  font-size: 1.05rem;
}

.lead strong {
  color: var(--texto);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  padding: 0;
  margin: 34px 0 0;
  list-style: none;
}

.hero-facts li {
  color: var(--suave);
  font-size: 0.86rem;
}

.hero-facts strong {
  display: block;
  color: var(--marca);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

/* ---------------------------------------------------------- capturas */
.shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--panel);
}

.shot img {
  width: 100%;
  height: auto;
}

.shot-frame {
  border-radius: var(--radio-lg);
  box-shadow: var(--sombra);
}

.hero-shot .shot-frame {
  position: relative;
}

.hero-shot .shot-frame::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
  content: "";
  pointer-events: none;
}

.card .shot {
  border-radius: 0;
  border-inline: 0;
  border-top: 0;
  cursor: zoom-in;
}

.card .shot img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 250ms ease;
}

.card:hover .shot img {
  transform: scale(1.03);
}

/* ---------------------------------------------------------- secciones */
.section {
  padding: 72px 0;
}

.section-alt {
  border-block: 1px solid var(--borde);
  background: var(--fondo-2);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 38px;
}

.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--marca);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
}

.section-lead {
  margin-top: 14px;
  color: var(--suave);
  font-size: 1rem;
}

/* ---------------------------------------------------------- módulos */
.modules {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 20px;
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--panel);
  transition: transform 180ms ease, border-color 180ms ease;
}

.card:hover {
  border-color: #94a3b8;
  transform: translateY(-3px);
}

.card-body {
  padding: 20px 22px 24px;
}

.card-body h3 {
  font-size: 1.12rem;
  font-weight: 800;
}

.card-body p {
  margin-top: 9px;
  color: var(--suave);
  font-size: 0.92rem;
}

/* ---------------------------------------------------------- roles */
.roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.role,
.req {
  padding: 26px 28px 28px;
  border: 1px solid var(--borde);
  border-radius: var(--radio-lg);
  background: var(--panel);
}

.role-tag {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 14px;
  color: var(--seleccion-texto);
  border-radius: 999px;
  background: rgba(25, 118, 210, 0.1);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.role h3,
.req h3 {
  font-size: 1.28rem;
  font-weight: 800;
}

.role-sub {
  margin-top: 6px;
  color: var(--suave);
  font-size: 0.9rem;
}

.check-list {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  margin-top: 11px;
  color: var(--suave);
  font-size: 0.92rem;
}

.check-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--verde);
  content: "✓";
  font-weight: 800;
}

/* ---------------------------------------------------------- pasos */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
  counter-reset: paso;
}

.steps li {
  display: flex;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--panel-2);
}

.step-num {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--azul), var(--marca-hi));
  font-size: 1rem;
  font-weight: 800;
}

.steps h3 {
  font-size: 1.02rem;
  font-weight: 800;
}

.steps p {
  margin-top: 6px;
  color: var(--suave);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------- requisitos */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* ---------------------------------------------------------- descarga */
.download-card {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1.3fr) auto;
  gap: 34px;
  padding: 34px 38px;
  border: 1px solid var(--borde);
  border-radius: var(--radio-lg);
  background:
    radial-gradient(circle at 85% 20%, rgba(25, 118, 210, 0.12), transparent 24rem),
    var(--panel);
  box-shadow: var(--sombra);
}

.download-copy h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 800;
}

.download-copy > p {
  max-width: 52ch;
  margin-top: 12px;
  color: var(--suave);
}

.meta-list {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
  font-size: 0.9rem;
}

.meta-list li {
  color: var(--suave);
}

.meta-list strong {
  display: inline-block;
  width: 92px;
  color: var(--texto);
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---------------------------------------------------------- faq */
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--panel);
}

.faq summary {
  padding: 17px 22px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.faq p {
  padding: 0 22px 20px;
  color: var(--suave);
  font-size: 0.93rem;
}

/* ---------------------------------------------------------- contacto */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 30px 30px;
  border: 1px solid var(--borde);
  border-radius: var(--radio-lg);
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.contact-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--azul), var(--marca-hi));
  font-size: 1.2rem;
  font-weight: 700;
}

.contact-card h3 {
  font-size: 1.24rem;
  font-weight: 800;
}

.contact-card p {
  margin-top: 9px;
  color: var(--suave);
  font-size: 0.93rem;
}

.contact-value {
  margin-top: 16px;
  font-size: 1.04rem;
  font-weight: 800;
  text-decoration: none;
  word-break: break-word;
}

.contact-value:hover {
  text-decoration: underline;
}

.contact-card .btn {
  margin-top: 18px;
}

@media (max-width: 460px) {
  .contact-card .btn {
    width: 100%;
  }
}

/* ---------------------------------------------------------- footer */
.site-footer {
  padding: 34px 0;
  border-top: 1px solid var(--borde);
  background: var(--fondo-2);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner strong {
  font-size: 1rem;
}

.footer-inner p {
  margin-top: 4px;
  color: var(--suave);
  font-size: 0.85rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.footer-nav a {
  color: var(--suave);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--texto);
}

/* ---------------------------------------------------------- lightbox */
.lightbox {
  width: min(1180px, calc(100% - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(5px);
}

.lightbox figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--borde);
  border-radius: var(--radio-lg);
  background: var(--panel);
  box-shadow: var(--sombra);
}

.lightbox img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: var(--panel-2);
}

.lightbox figcaption {
  padding: 14px 20px;
  color: var(--suave);
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--texto);
  border: 1px solid var(--borde);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
  font-size: 1.7rem;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  background: var(--panel-2);
}

/* ---------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero h1 {
    max-width: none;
  }

  .download-card {
    grid-template-columns: 1fr;
  }

  .download-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 72px;
  }

  .wrap,
  .wrap.narrow {
    width: calc(100% - 32px);
  }

  .header-inner {
    flex-wrap: wrap;
    min-height: 62px;
  }

  .nav-toggle {
    display: block;
    order: 3;
  }

  .logo {
    margin-right: auto;
  }

  .header-inner > .btn {
    order: 2;
  }

  .site-nav {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    padding-bottom: 12px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero {
    padding: 42px 0 40px;
  }

  .section {
    padding: 52px 0;
  }

  .hero-facts {
    gap: 18px;
  }

  .modules {
    grid-template-columns: 1fr;
  }

  .download-card {
    padding: 26px 22px;
  }

  .download-actions {
    flex-direction: column;
  }

  .download-actions .btn {
    width: 100%;
  }

  .lightbox {
    width: 100vw;
    height: 100dvh;
    margin: 0;
  }

  .lightbox figure {
    border-radius: 0;
    border: 0;
  }

  .lightbox img {
    max-height: calc(100dvh - 60px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}