/* ============================================================
   VERIX WMS — El recorrido inteligente
   Identidad de marca Verix aplicada al sitio. Ver DESIGN.md.
   Reemplaza la cascada de la plantilla Dashcore.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --navy-deep: #16293b;
  --navy-surface: #1e3448;
  --verix-teal: #00a99d;
  --teal-light: #7fd6c7;
  --route-glow: #4fe3d4;
  --ground-light: #f2f5f7;
  --card-white: #ffffff;
  --ink: #22384a;
  --slate-muted: #5f7181;
  --hairline: #dde5ea;
  --error-red: #c44536;
  --zone-lime: #a6c93c;
  --zone-blue: #5b93d6;
  --blueprint-stroke: #2c4a63;

  --font: "Poppins", system-ui, -apple-system, sans-serif;

  --shadow-float: 0 10px 30px rgba(22, 41, 59, 0.1);
  --shadow-float-high: 0 18px 45px rgba(22, 41, 59, 0.14);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 104px;

  --container: 1200px;
  --nav-h: 72px;
}

/* ---------- Reset mínimo ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground-light);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
  max-width: 100%;
}

img,
video {
  display: block;
}

a {
  color: inherit;
}

/* ---------- Tipografía ---------- */
.vx-display {
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--navy-deep);
  margin: 0;
}

.vx-headline {
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--navy-deep);
  margin: 0;
}

.vx-title {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.35;
  color: var(--navy-deep);
  margin: 0;
}

.vx-label {
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* El término clave en verde — La Regla del Bicolor */
.vx-key {
  color: var(--verix-teal);
}

/* Sobre fondo oscuro */
.vx-on-dark {
  color: var(--card-white);
}

.vx-body {
  max-width: 62ch;
}

.vx-muted {
  color: var(--slate-muted);
}

.vx-strong {
  color: var(--verix-teal);
  font-weight: 600;
}

/* ---------- Layout ---------- */
.vx-container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.vx-section {
  padding-block: var(--space-xl);
}

.vx-section-head {
  margin-bottom: var(--space-md);
}

.vx-section-head .vx-label {
  display: block;
  color: var(--verix-teal);
  margin-bottom: var(--space-sm);
}

.vx-split {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: var(--space-lg);
  align-items: center;
}

.vx-split--flip {
  grid-template-columns: 6fr 5fr;
}

/* ---------- Nav ---------- */
.vx-nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--card-white);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
}

.vx-nav .vx-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: var(--space-sm);
}

.vx-nav-brand img {
  height: 38px;
  width: auto;
}

.vx-nav-links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.vx-nav-links a {
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--navy-deep);
  padding-block: 6px;
  border-bottom: 3px solid transparent;
}

.vx-nav-links a:hover {
  color: var(--verix-teal);
}

.vx-nav-links a.is-active {
  border-bottom-color: var(--verix-teal);
}

.vx-nav-cta {
  display: inline-block;
}

.vx-nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--navy-deep);
  border-radius: var(--r-sm);
  color: var(--navy-deep);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
}

/* ---------- Botones ---------- */
.vx-btn {
  display: inline-block;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
}

.vx-btn--primary {
  background: var(--verix-teal);
  color: var(--card-white);
  padding: 16px 32px;
}

.vx-btn--primary:hover {
  background: var(--navy-deep);
  color: var(--card-white);
}

.vx-btn--secondary {
  background: transparent;
  color: var(--navy-deep);
  border: 2px solid var(--navy-deep);
  padding: 14px 30px;
}

.vx-btn--secondary:hover {
  background: var(--navy-deep);
  color: var(--card-white);
}

.vx-btn--secondary.vx-on-dark {
  color: var(--card-white);
  border-color: var(--card-white);
}

.vx-btn--secondary.vx-on-dark:hover {
  background: var(--card-white);
  color: var(--navy-deep);
}

.vx-btn--compact {
  padding: 11px 22px;
}

.vx-btn:focus-visible,
.vx-nav-links a:focus-visible,
.vx-input:focus-visible,
.vx-nav-toggle:focus-visible {
  outline: 3px solid var(--verix-teal);
  outline-offset: 2px;
}

/* ---------- Ícono hexagonal ---------- */
.vx-hex {
  flex: none;
  width: 56px;
  height: 62px;
  display: grid;
  place-items: center;
  position: relative;
}

.vx-hex svg.vx-hex-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  stroke: var(--verix-teal);
  stroke-width: 2;
  fill: none;
}

.vx-hex svg.vx-hex-icon {
  width: 24px;
  height: 24px;
  stroke: var(--verix-teal);
  stroke-width: 2;
  fill: none;
  position: relative;
}

/* ---------- La lista de beneficios (componente firma) ---------- */
.vx-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vx-benefits li {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--hairline);
}

.vx-benefits li:last-child {
  border-bottom: none;
}

.vx-benefit-label {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-deep);
  margin-bottom: 2px;
}

.vx-benefit-label .vx-key {
  color: var(--verix-teal);
}

.vx-benefits p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--slate-muted);
}

/* ---------- Chips de callout ---------- */
.vx-chip {
  display: inline-flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--navy-deep);
  color: var(--card-white);
  border-radius: var(--r-md);
  padding: 14px 18px;
  max-width: 300px;
}

.vx-chip svg {
  flex: none;
  width: 22px;
  height: 22px;
  stroke: var(--teal-light);
  stroke-width: 2;
  fill: none;
  margin-top: 2px;
}

.vx-chip .vx-label {
  display: block;
  color: var(--teal-light);
  margin-bottom: 2px;
}

.vx-chip p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Tarjetas ---------- */
.vx-card {
  background: var(--card-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-float);
  padding: var(--space-md);
}

/* ---------- Formularios ---------- */
.vx-field {
  margin-bottom: var(--space-sm);
}

.vx-field label {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-muted);
  margin-bottom: var(--space-xs);
}

.vx-input {
  width: 100%;
  background: var(--card-white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 14px 16px;
}

.vx-input:focus {
  outline: none;
  border: 2px solid var(--verix-teal);
  padding: 13px 15px;
}

.vx-input.is-error {
  border: 2px solid var(--error-red);
}

.vx-error-msg {
  font-size: 0.875rem;
  color: var(--error-red);
  margin-top: var(--space-xs);
}

/* ---------- Hero ---------- */
.vx-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-h);
  color: var(--card-white);
}

.vx-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.vx-hero-media video,
.vx-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vx-hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(22, 41, 59, 0.92) 0%,
    rgba(22, 41, 59, 0.72) 45%,
    rgba(22, 41, 59, 0.35) 100%
  );
}

.vx-hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: var(--space-lg);
}

.vx-hero-content .vx-display {
  color: var(--card-white);
}

.vx-hero-kicker {
  display: block;
  color: var(--teal-light);
  margin-bottom: var(--space-sm);
}

.vx-hero-lead {
  max-width: 46ch;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.88);
}

.vx-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.vx-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ---------- Etapas del circuito ---------- */
.vx-stages {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
}

.vx-stage {
  background: var(--card-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-float);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
}

.vx-stage .vx-hex {
  margin-inline: auto;
  margin-bottom: var(--space-sm);
}

.vx-stage-num {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--verix-teal);
  margin-bottom: 4px;
}

.vx-stage-name {
  display: block;
  font-weight: 700;
  font-size: 1.125rem;
  text-transform: uppercase;
  color: var(--navy-deep);
  margin-bottom: var(--space-xs);
}

.vx-stage p {
  font-size: 0.875rem;
  color: var(--slate-muted);
  margin: 0;
}

/* ---------- Grilla de clientes ---------- */
.vx-clients {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-sm);
}

.vx-client {
  background: var(--card-white);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm);
  min-height: 104px;
}

.vx-client img {
  max-height: 56px;
  max-width: 82%;
  width: auto;
  object-fit: contain;
}

/* ---------- La cita de cierre ---------- */
.vx-quote {
  background: var(--card-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-float);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.vx-quote-marks {
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 0.6;
  color: var(--verix-teal);
  flex: none;
  margin-top: 0.35em;
}

.vx-quote p {
  margin: 0;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--navy-deep);
}

/* ---------- Cierre / CTA ---------- */
.vx-close {
  background: var(--navy-deep);
  padding-block: var(--space-xl);
  text-align: center;
  color: var(--card-white);
}

.vx-close .vx-headline {
  color: var(--card-white);
  margin-bottom: var(--space-sm);
}

.vx-close p {
  margin: 0 auto var(--space-md);
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Footer ---------- */
.vx-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.85);
  border-top: 1px solid var(--navy-surface);
  padding-block: var(--space-lg);
}

.vx-footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
}

.vx-footer img.vx-footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: var(--space-sm);
}

.vx-footer a {
  color: var(--teal-light);
  text-decoration: none;
}

.vx-footer a:hover {
  text-decoration: underline;
}

.vx-footer-social {
  display: flex;
  gap: var(--space-sm);
}

.vx-footer-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--teal-light);
  border-radius: var(--r-sm);
}

.vx-footer-social svg {
  width: 18px;
  height: 18px;
  stroke: var(--teal-light);
  stroke-width: 2;
  fill: none;
}

/* ---------- WhatsApp flotante ---------- */
.vx-wh {
  position: fixed;
  right: var(--space-sm);
  bottom: var(--space-sm);
  z-index: 90;
  background: var(--verix-teal);
  color: var(--card-white);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-float-high);
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.18s ease;
}

.vx-wh:hover {
  background: var(--navy-deep);
}

.vx-wh svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* ---------- Alertas de sesión ---------- */
.vx-alert {
  border-radius: var(--r-md);
  padding: var(--space-sm);
  font-size: 0.9375rem;
  margin-bottom: var(--space-sm);
  background: var(--card-white);
  box-shadow: var(--shadow-float);
}

.vx-alert--error {
  border: 2px solid var(--error-red);
  box-shadow: none;
}

.vx-alert--success {
  border: 2px solid var(--verix-teal);
  box-shadow: none;
}

.vx-alert ul {
  margin: 0;
  padding-left: 1.2em;
}

/* ---------- Cintas diagonales de esquina ---------- */
.vx-ribbons {
  position: relative;
}

.vx-ribbons::before,
.vx-ribbons::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

/* Esquina superior izquierda: navy + filo teal */
.vx-ribbons::before {
  top: 0;
  left: 0;
  width: 170px;
  height: 170px;
  background: linear-gradient(
    135deg,
    var(--navy-deep) 0 28%,
    var(--verix-teal) 28% 34%,
    transparent 34%
  );
}

/* Esquina inferior derecha: espejo */
.vx-ribbons::after {
  bottom: 0;
  right: 0;
  width: 170px;
  height: 170px;
  background: linear-gradient(
    315deg,
    var(--navy-deep) 0 28%,
    var(--verix-teal) 28% 34%,
    transparent 34%
  );
}

/* ---------- Conector de etapas en la home ---------- */
.vx-stages-route {
  display: block;
  width: 100%;
  height: 64px;
  margin-bottom: var(--space-sm);
}

/* ---------- Chips anclados sobre el plano ---------- */
.vx-map-anchor {
  position: absolute;
  z-index: 3;
}

@media (max-width: 1023px) {
  .vx-stages-route,
  .vx-map-anchor {
    display: none;
  }

  .vx-ribbons::before,
  .vx-ribbons::after {
    width: 110px;
    height: 110px;
  }
}

/* ---------- El recorrido (firma) ---------- */
.vx-route {
  stroke: var(--route-glow);
  stroke-width: 4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(79, 227, 212, 0.65));
}

.vx-route--dashed {
  stroke-dasharray: 2 12;
}

@keyframes vx-route-flow {
  to {
    stroke-dashoffset: -600;
  }
}

.vx-route--animated {
  stroke-dasharray: 14 10;
  animation: vx-route-flow 18s linear infinite;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .vx-split,
  .vx-split--flip {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .vx-stages {
    grid-template-columns: repeat(2, 1fr);
  }

  .vx-clients {
    grid-template-columns: repeat(3, 1fr);
  }

  .vx-nav-cta {
    display: none;
  }
}

@media (max-width: 767px) {
  .vx-section {
    padding-block: var(--space-lg);
  }

  .vx-nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--navy-deep);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
  }

  .vx-nav-links.is-open {
    display: flex;
  }

  .vx-nav-links a {
    color: var(--card-white);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
  }

  .vx-nav-toggle {
    display: inline-block;
  }

  .vx-stages {
    grid-template-columns: 1fr;
  }

  .vx-clients {
    grid-template-columns: repeat(2, 1fr);
  }

  .vx-quote {
    padding: var(--space-md);
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
