/* =========================================================
   NEXO — Global CSS (Home + 4 Módulos)
   Autor: Proimpo / NEXO
   Notas:
   - Usa variables (tokens) para que tu equipo ajuste look & feel rápido.
   - Incluye: layout, tipografía, botones, cards, secciones, módulos, responsive.
========================================================= */

/* -------------------------
   0) Reset / Base
-------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html:focus-within {
  scroll-behavior: smooth;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}

img,
svg,
video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}
button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--brand) 70%, white);
  outline-offset: 2px;
  border-radius: 10px;
}

/* -------------------------
   1) Design Tokens
-------------------------- */
:root {
  /* Brand */
  --brand: #3b82f6; /* Ajustable */
  --brand-2: #22c55e; /* Acento */
  --brand-ink: #0b1220; /* Tinta/contraste */

  /* Neutrals */
  --bg: #0b1020;
  --surface: #0f1730;
  --surface-2: #111b38;
  --surface-3: #121f44;

  --text: #eaf0ff;
  --text-2: #b9c3e6;
  --text-3: #7e8ab7;

  /* Borders / lines */
  --line: color-mix(in oklab, white 10%, transparent);
  --line-2: color-mix(in oklab, white 16%, transparent);

  /* Effects */
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.35);
  --glow: 0 0 0 1px color-mix(in oklab, var(--brand) 22%, transparent),
    0 20px 60px rgba(59, 130, 246, 0.18);

  /* Radius */
  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;

  /* Spacing scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 56px;
  --s-10: 72px;

  /* Container */
  --container: 1120px;

  /* Typography */
  --h1: clamp(34px, 4vw, 52px);
  --h2: clamp(26px, 3vw, 36px);
  --h3: clamp(20px, 2vw, 26px);
  --p: 16px;
  --small: 14px;

  /* Gradients */
  --grad-hero: radial-gradient(1000px 600px at 20% 10%, rgba(59, 130, 246, 0.3), transparent 55%),
    radial-gradient(800px 500px at 80% 10%, rgba(34, 197, 94, 0.18), transparent 60%),
    radial-gradient(900px 700px at 50% 100%, rgba(99, 102, 241, 0.14), transparent 60%);

  --grad-card: linear-gradient(180deg, color-mix(in oklab, white 6%, transparent), transparent);

  --noise: radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.04), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(255, 255, 255, 0.03), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(255, 255, 255, 0.02), transparent 40%);
}

/* Light mode (opcional) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fc;
    --surface: #ffffff;
    --surface-2: #f1f4ff;
    --surface-3: #eef2ff;

    --text: #0b1220;
    --text-2: #24304e;
    --text-3: #4b5c88;

    --line: rgba(10, 20, 40, 0.1);
    --line-2: rgba(10, 20, 40, 0.16);

    --shadow-sm: 0 8px 22px rgba(10, 20, 40, 0.1);
    --shadow-md: 0 18px 48px rgba(10, 20, 40, 0.14);
  }
}

/* -------------------------
   2) Helpers / Utilities
-------------------------- */
.container {
  width: min(100%, calc(var(--container) + 2 * var(--s-6)));
  margin-inline: auto;
  padding-inline: var(--s-6);
}

.section {
  padding: var(--s-10) 0;
}

.section--tight {
  padding: var(--s-9) 0;
}
.section--loose {
  padding: calc(var(--s-10) + var(--s-4)) 0;
}

.grid {
  display: grid;
  gap: var(--s-6);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.row {
  display: flex;
  gap: var(--s-4);
  align-items: center;
  flex-wrap: wrap;
}

.muted {
  color: var(--text-2);
}
.subtle {
  color: var(--text-3);
}
.center {
  text-align: center;
}
.right {
  text-align: right;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  color: var(--text-2);
  font-size: var(--small);
}

.hr {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: var(--s-8) 0;
}

.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card__inner {
  padding: var(--s-7);
  background-image: var(--grad-card), var(--noise);
}

@media (max-width: 640px) {
  .card__inner {
    padding: var(--s-6);
  }
}

/* -------------------------
   3) Typography
-------------------------- */
h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--h1);
  line-height: 1.05;
}
h2 {
  font-size: var(--h2);
  line-height: 1.15;
}
h3 {
  font-size: var(--h3);
  line-height: 1.2;
}

p {
  margin: 0;
  font-size: var(--p);
  color: var(--text-2);
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in oklab, var(--brand) 70%, var(--text-2));
}

/* -------------------------
   4) Buttons / Links
-------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease,
    border-color 140ms ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0px);
}

.btn--primary {
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--brand) 85%, white),
    color-mix(in oklab, var(--brand) 55%, #111827)
  );
  border-color: color-mix(in oklab, var(--brand) 35%, transparent);
  box-shadow: var(--glow);
}

.btn--primary:hover {
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--brand) 35%, transparent),
    0 26px 70px rgba(59, 130, 246, 0.25);
}

.btn--ghost {
  background: color-mix(in oklab, var(--surface) 70%, transparent);
}

.link {
  color: color-mix(in oklab, var(--brand) 72%, var(--text));
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.link:hover {
  border-bottom-color: color-mix(in oklab, var(--brand) 45%, transparent);
}

/* -------------------------
   5) Header / Nav
-------------------------- */
.site {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(
    135deg,
    var(--brand),
    color-mix(in oklab, var(--brand-2) 65%, var(--brand))
  );
  box-shadow: var(--glow);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text-2);
}

.nav a {
  padding: 10px 10px;
  border-radius: 12px;
  transition: background 140ms ease, color 140ms ease;
}

.nav a:hover {
  background: color-mix(in oklab, var(--surface) 70%, transparent);
  color: var(--text);
}

.header__cta {
  display: flex;
  gap: 10px;
  align-items: center;
}

@media (max-width: 920px) {
  .nav {
    display: none;
  } /* Si quieren menú móvil: lo agregan luego */
}

/* -------------------------
   6) Hero (Home + Módulos)
-------------------------- */
.hero {
  position: relative;
  padding: calc(var(--s-10) - 10px) 0 var(--s-10);
  background-image: var(--grad-hero);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--s-8);
  align-items: center;
}

.hero__title {
  margin-top: var(--s-3);
}

.hero__lead {
  margin-top: var(--s-5);
  font-size: 18px;
  color: var(--text-2);
  max-width: 58ch;
}

.hero__actions {
  margin-top: var(--s-7);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero__panel {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.hero__panel-inner {
  padding: var(--s-7);
  background-image: var(--grad-card), var(--noise);
}

.hero__mock {
  height: 320px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--surface-2) 86%, transparent),
    color-mix(in oklab, var(--surface-3) 92%, transparent)
  );
}

@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__mock {
    height: 260px;
  }
}

/* -------------------------
   7) Logo strip / Social proof
-------------------------- */
.logos {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--s-4);
  align-items: center;
  opacity: 0.85;
}

.logo-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  background: color-mix(in oklab, var(--surface) 86%, transparent);
}

@media (max-width: 980px) {
  .logos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* -------------------------
   8) Feature cards
-------------------------- */
.feature {
  display: flex;
  gap: var(--s-4);
  align-items: flex-start;
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--brand) 10%, var(--surface));
  display: grid;
  place-items: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  flex: 0 0 auto;
}

.feature h3 {
  margin-top: 2px;
}
.feature p {
  margin-top: 8px;
}

/* -------------------------
   9) Module cards grid (Home + /modulos)
-------------------------- */
.module-grid {
  gap: var(--s-6);
}

.module-card {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--surface-2) 96%, transparent),
    color-mix(in oklab, var(--surface) 92%, transparent)
  );
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
}

.module-card__inner {
  padding: var(--s-7);
  background-image: var(--noise);
}

.module-card__top {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  align-items: flex-start;
}

.module-card__tag {
  font-size: 12px;
  color: var(--text-3);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--surface) 80%, transparent);
}

.module-card__title {
  margin-top: var(--s-4);
}
.module-card__desc {
  margin-top: var(--s-3);
  max-width: 62ch;
}

.module-card__actions {
  margin-top: var(--s-6);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* -------------------------
   10) Stats strip
-------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-5);
}

.stat {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
}

.stat__num {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat__label {
  margin-top: 6px;
  color: var(--text-3);
  font-size: var(--small);
}

@media (max-width: 980px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* -------------------------
   11) Testimonials
-------------------------- */
.quote {
  display: grid;
  gap: var(--s-4);
}

.quote__text {
  font-size: 16px;
  color: var(--text-2);
}

.quote__who {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text-3);
  font-size: 14px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--brand) 30%, var(--surface)),
    color-mix(in oklab, var(--brand-2) 18%, var(--surface))
  );
}

/* -------------------------
   12) FAQ
-------------------------- */
.faq {
  display: grid;
  gap: var(--s-4);
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  padding: var(--s-6);
  cursor: pointer;
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 650;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
}

.faq-a {
  padding: 0 var(--s-6) var(--s-6);
  color: var(--text-2);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text-2);
}

/* -------------------------
   13) CTA band
-------------------------- */
.cta {
  border-radius: var(--r-xl);
  border: 1px solid color-mix(in oklab, var(--brand) 26%, var(--line));
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--brand) 26%, var(--surface)),
    color-mix(in oklab, var(--brand-2) 10%, var(--surface))
  );
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.cta__inner {
  padding: var(--s-8);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--s-7);
  align-items: center;
  background-image: var(--noise);
}

@media (max-width: 980px) {
  .cta__inner {
    grid-template-columns: 1fr;
  }
}

.cta h2 {
  margin: 0;
}
.cta p {
  margin-top: var(--s-3);
}

.cta__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 980px) {
  .cta__actions {
    justify-content: flex-start;
  }
}

/* -------------------------
   14) Footer
-------------------------- */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: var(--s-9) 0;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--s-7);
}

.footer h3 {
  font-size: 14px;
  color: var(--text);
  margin-bottom: var(--s-4);
}

.footer a {
  display: block;
  color: var(--text-3);
  padding: 8px 0;
  transition: color 140ms ease;
}

.footer a:hover {
  color: var(--text);
}

.footer__fine {
  margin-top: var(--s-8);
  color: var(--text-3);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   15) Page Templates (Home + Módulos)
   Convención:
   - .page .page__hero .page__body etc.
========================================================= */
.page {
  background: var(--bg);
}

.page__hero {
  padding: var(--s-10) 0 var(--s-9);
  background-image: var(--grad-hero);
}

.page__hero .kicker {
  margin-bottom: var(--s-3);
}

.page__body {
  padding: var(--s-9) 0 var(--s-10);
}

/* -------------------------
   16) Module Page Variants
   Aplica una clase al <body> o contenedor:
   - .mod--1, .mod--2, .mod--3, .mod--4
-------------------------- */

/* Módulo 1 (ej: “Score”) */
.mod--1 {
  --brand: #3b82f6;
  --brand-2: #a855f7;
}

/* Módulo 2 (ej: “Catalog”) */
.mod--2 {
  --brand: #22c55e;
  --brand-2: #10b981;
}

/* Módulo 3 (ej: “Backoffice / Liquidación”) */
.mod--3 {
  --brand: #f59e0b;
  --brand-2: #ef4444;
}

/* Módulo 4 (ej: “Full 360”) */
.mod--4 {
  --brand: #6366f1;
  --brand-2: #06b6d4;
}

/* -------------------------
   17) Module-specific blocks
-------------------------- */
.module-hero__layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--s-8);
  align-items: start;
}

.module-hero__bullets {
  margin-top: var(--s-6);
  display: grid;
  gap: 10px;
}

.bullet {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-2);
}

.bullet::before {
  content: "";
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--brand) 70%, white);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 20%, transparent);
  flex: 0 0 auto;
}

.module-hero__aside {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: color-mix(in oklab, var(--surface) 90%, transparent);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.module-hero__aside-inner {
  padding: var(--s-7);
  background-image: var(--grad-card), var(--noise);
}

@media (max-width: 980px) {
  .module-hero__layout {
    grid-template-columns: 1fr;
  }
}

/* -------------------------
   18) Tables (para specs / integraciones)
-------------------------- */
.table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 92%, transparent);
}

.table th,
.table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  color: var(--text-2);
  font-size: 14px;
}

.table th {
  color: var(--text);
  background: color-mix(in oklab, var(--surface-2) 92%, transparent);
  font-weight: 700;
}

.table tr:last-child td {
  border-bottom: 0;
}

/* -------------------------
   19) Forms (Contacto / Demo)
-------------------------- */
.form {
  display: grid;
  gap: var(--s-4);
}

.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 92%, transparent);
  color: var(--text);
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.input::placeholder {
  color: var(--text-3);
}

.input:focus {
  border-color: color-mix(in oklab, var(--brand) 45%, var(--line));
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--brand) 14%, transparent);
}

/* -------------------------
   20) Simple mobile spacing tweaks
-------------------------- */
@media (max-width: 560px) {
  .section {
    padding: var(--s-9) 0;
  }
  .hero {
    padding: var(--s-9) 0;
  }
  .cta__inner {
    padding: var(--s-7);
  }
}

.mod--score {
  --brand: #3b82f6;
  --brand-2: #a855f7;
}

.mod--catalog {
  --brand: #22c55e;
  --brand-2: #10b981;
}

.mod--field {
  --brand: #f59e0b;
  --brand-2: #ef4444;
}

.mod--360 {
  --brand: #6366f1;
  --brand-2: #06b6d4;
}
