/* =========================================================
   Contract X — Landing principal
   Todas las clases propias usan el prefijo "cx-" para no
   chocar con los estilos del sistema.
   ========================================================= */

:root {
  --cx-navy: #0E1B3D;
  --cx-blue: #0584D5;
  --cx-bg: #F2F3F6;
  --cx-white: #FFFFFF;
  --cx-text: #0E1B3D;
  --cx-muted: #4A5573;
  --cx-line: rgba(14, 27, 61, 0.12);
  --cx-radius: 16px;
  --cx-wrap: 1136px;
  --cx-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body.cx-body {
  margin: 0;
  background: var(--cx-bg);
  color: var(--cx-text);
  font-family: var(--cx-font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

:where(.cx-body) img { max-width: 100%; display: block; }
:where(.cx-body) a { color: inherit; }
:where(.cx-body) b, :where(.cx-body) strong { font-weight: 700; }
:where(.cx-body) :is(h1, h2, h3, p, figure, ul) { margin: 0; }
:where(.cx-body) ul { padding: 0; list-style: none; }

.cx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cx-skip { position: absolute; left: -999px; top: 8px; background: var(--cx-navy); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.cx-skip:focus { left: 8px; }

.cx-wrap { width: 100%; max-width: calc(var(--cx-wrap) + 64px); margin: 0 auto; padding: 0 32px; }
.cx-section { padding: 110px 0; }

/* ---------- Tipografía ---------- */
.cx-h1 { font-size: 64px; font-weight: 500; line-height: 1.1; letter-spacing: -0.05em; }
.cx-h2 { font-size: 44px; font-weight: 500; line-height: 1.15; letter-spacing: -0.05em; }
.cx-h3 { font-size: 40px; font-weight: 500; line-height: 1.1; letter-spacing: -0.04em; }
.cx-body-lg { font-size: 20px; line-height: 1.3; }

.cx-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; line-height: 1; margin-bottom: 16px;
}
.cx-label img { width: 18px; height: auto; }
.cx-label--plain { margin-bottom: 0; }
.cx-label--light { color: #fff; }

/* ---------- Botones ---------- */
.cx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px;
  font: 500 16px/1.2 var(--cx-font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.cx-btn:hover { transform: translateY(-1px); }
.cx-btn:focus-visible, .cx-step:focus-visible, .cx-menu-btn:focus-visible { outline: 3px solid var(--cx-blue); outline-offset: 2px; }
.cx-btn--primary { background: var(--cx-navy); color: #fff; }
.cx-btn--primary:hover { background: #1a2b5c; }
.cx-btn--light { background: #fff; color: var(--cx-navy); }
.cx-btn--ghost { background: transparent; color: var(--cx-navy); border-color: var(--cx-line); }
.cx-btn--ghost:hover { background: #fff; }
.cx-btn--wa { background: #fff; color: var(--cx-navy); border-color: var(--cx-line); margin-top: 24px; }
.cx-btn--block { width: 100%; }
.cx-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cx-wa-icon { width: 20px; height: 20px; }
.cx-btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.cx-btn-row--center { justify-content: center; }
.cx-textlink { color: #fff; text-decoration: none; font-weight: 500; }
.cx-textlink:hover { text-decoration: underline; }

/* ---------- Encabezado ---------- */
.cx-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 243, 246, 0.9);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.cx-header__inner {
  max-width: calc(var(--cx-wrap) + 64px); margin: 0 auto; padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.cx-header__logo img { width: 180px; height: auto; }
.cx-nav { display: flex; gap: 22px; }
.cx-nav a { font-weight: 500; text-decoration: none; }
.cx-nav a:hover { color: var(--cx-blue); }
.cx-header__actions { display: flex; align-items: center; gap: 10px; }

/* Acceso clientes */
.cx-login { position: relative; }
.cx-login__panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 300px;
  background: #fff; border-radius: var(--cx-radius); padding: 20px;
  box-shadow: 0 1px 2px rgba(14,27,61,.12), 0 8px 24px rgba(14,27,61,.14);
}
.cx-login__title { font-weight: 700; font-size: 18px; margin-bottom: 14px; }
.cx-login #kt_login_signin_form .row { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.cx-login #kt_login_signin_form .row > div { width: 100%; max-width: 100%; padding: 0; flex: none; }
.cx-login #kt_login_signin_form .form-group { margin: 0; }
.cx-login #kt_login_signin_form .form-control {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--cx-line); border-radius: 10px;
  font: 400 16px var(--cx-font); color: var(--cx-text); background: var(--cx-bg);
}
.cx-login #kt_login_signin_form .form-control:focus { outline: none; border-color: var(--cx-blue); background: #fff; }
.cx-login #kt_login_signin_form .btn {
  width: 100%; height: 44px; border: 0; border-radius: 999px; background: var(--cx-navy); color: #fff;
  font: 500 16px var(--cx-font); cursor: pointer;
}
.cx-login #kt_login_signin_form .btn:hover { background: #1a2b5c; }
.cx-login #kt_login_signin_form .fv-plugins-message-container { color: #d6334b; font-size: 13px; margin-top: 4px; }

/* Menú móvil */
.cx-menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 10px; }
.cx-menu-btn span { display: block; height: 2px; background: var(--cx-navy); border-radius: 2px; margin: 5px 0; transition: transform .2s, opacity .2s; }
.cx-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cx-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.cx-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.cx-mobile-menu { padding: 8px 24px 24px; display: flex; flex-direction: column; gap: 4px; }
.cx-mobile-menu[hidden] { display: none; }
.cx-mobile-menu a:not(.cx-btn) { padding: 12px 0; font-size: 18px; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--cx-line); }
.cx-mobile-menu .cx-btn { margin-top: 16px; }

/* ---------- Tarjetas base ---------- */
.cx-card { border-radius: var(--cx-radius); overflow: hidden; position: relative; }
.cx-card--white { background: #fff; }
.cx-card--img > img { width: 100%; height: 100%; object-fit: cover; }

.cx-glass {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 12px; color: #fff; padding: 16px; display: flex; flex-direction: column; gap: 12px;
}

/* ---------- Hero ---------- */
.cx-hero { padding: 72px 0 80px; }
.cx-hero__top { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: end; }
.cx-hero__top .cx-h1 { max-width: 580px; }
.cx-hero__sub { display: flex; flex-direction: column; gap: 28px; padding-bottom: 6px; }
.cx-hero__cards { display: grid; grid-template-columns: 352fr 384fr 384fr; gap: 8px; height: 480px; margin-top: 64px; }
.cx-hero__mid { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.cx-hero__panel { flex: 1; min-height: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--cx-line); }
.cx-hero__panel img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.cx-hero__log { background: #fff; }
.cx-hero__log > img { object-position: center top; }

/* ---------- Encabezados de sección ---------- */
.cx-head { text-align: center; max-width: 720px; margin: 0 auto 64px; display: flex; flex-direction: column; align-items: center; }
.cx-head .cx-h2, .cx-head .cx-h1 { margin-bottom: 20px; }
.cx-head > p:not(.cx-label) { max-width: 560px; }

/* ---------- El reto ---------- */
.cx-split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; align-items: center; }
.cx-split__text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.cx-split__text .cx-label { margin-bottom: -8px; }
.cx-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: stretch; }
.cx-compare__col { display: flex; flex-direction: column; gap: 8px; }
.cx-compare__col--without { min-width: 0; }
.cx-compare__label { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: var(--cx-navy); }
.cx-pain { flex: 1; display: flex; gap: 12px; background: #fff; padding: 16px; border-radius: 0; }
.cx-pain .cx-ico { width: 32px; height: 32px; flex: none; }
.cx-pain h3 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 4px; }
.cx-pain p { color: rgba(14, 27, 61, .72); }
.cx-solution { background: var(--cx-navy); color: #fff; padding: 24px; border-radius: 0; display: flex; flex-direction: column; gap: 16px; height: 100%; }
.cx-solution h3 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.cx-solution p { color: rgba(255, 255, 255, .85); }
.cx-solution ul { display: flex; flex-direction: column; gap: 12px; }
.cx-solution li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.cx-check { width: 20px; height: 20px; flex: none; margin-top: 1px; }

/* ---------- Cómo funciona ---------- */
.cx-steps { display: flex; gap: 10px; background: #fff; border-radius: 20px; padding: 10px; height: 400px; }
.cx-step {
  flex: 1; position: relative; overflow: hidden; border: 0; border-radius: 12px; background: var(--cx-bg);
  text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 22px 12px; display: flex; flex-direction: column;
  transition: flex-grow .5s cubic-bezier(.2,.8,.2,1), background-color .3s;
}
.cx-step__num { font-size: 17px; font-weight: 500; text-align: center; position: relative; z-index: 2; }
.cx-step__img { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; }
.cx-step__img img { width: 100%; height: 100%; object-fit: cover; }
.cx-step__img img { object-position: center top; }
.cx-step__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(246,249,254,.85) 0%, rgba(246,249,254,0) 14%, rgba(246,249,254,0) 58%, rgba(236,242,251,.95) 78%); }
.cx-step__body { margin-top: auto; position: relative; z-index: 2; display: flex; flex-direction: column; gap: 10px; max-width: 420px; }
.cx-step:not(.is-active) .cx-step__title { font-size: 16px; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.cx-step:not(.is-active) .cx-step__desc { display: none; }
.cx-step__title { font-size: 28px; font-weight: 500; letter-spacing: -0.04em; line-height: 1.1; }
.cx-step__desc { font-size: 16px; color: var(--cx-muted); }
.cx-step.is-active { flex-grow: 3.4; padding: 22px 12px 22px 12px; }
.cx-step.is-active .cx-step__num { text-align: left; }
.cx-step.is-active .cx-step__img { opacity: 1; }
.cx-step.is-active .cx-step__body { animation: cx-fade .5s ease both; }
@keyframes cx-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Qué validamos ---------- */
.cx-services { display: flex; flex-direction: column; gap: 24px; }
.cx-service { background: #fff; border-radius: var(--cx-radius); padding: 10px; display: grid; grid-template-columns: 402px 1fr; gap: 26px; min-height: 560px; }
.cx-service__img { border-radius: 8px; overflow: hidden; background: var(--cx-bg); }
.cx-service__img img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.cx-service__body { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 16px 16px 0; }
.cx-service__body > p { max-width: 380px; }
.cx-chip-num { font-size: 14px; font-weight: 700; background: var(--cx-bg); border-radius: 999px; padding: 4px 9px; }
.cx-service__checks { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: 14px; }
.cx-service__kicker { font-size: 18px; font-weight: 500; }
.cx-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.cx-tags li {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(14,27,61,.25); border-radius: 999px; padding: 8px 12px;
  font-size: 14px; font-weight: 600;
}
.cx-tags--center { justify-content: center; margin-top: 32px; max-width: 460px; }
.cx-tags--icons li svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Plataforma ---------- */
.cx-platform { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.cx-platform__text { display: flex; flex-direction: column; gap: 24px; }
.cx-h1--section { font-size: 64px; }
.cx-platform__img { border-radius: var(--cx-radius); overflow: hidden; box-shadow: 0 1px 2px rgba(14,27,61,.08), 0 12px 32px rgba(14,27,61,.10); }
.cx-platform__img img { width: 100%; height: auto; }

/* ---------- Para quién ---------- */
.cx-areas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cx-area { position: relative; border-radius: var(--cx-radius); overflow: hidden; aspect-ratio: 300 / 360; background: #dfe3ea; }
.cx-area img { width: 100%; height: 100%; object-fit: cover; }
.cx-pill {
  position: absolute; right: 14px; bottom: 14px; max-width: calc(100% - 28px); background: #fff; border-radius: 999px;
  padding: 6px 10px; font-size: 13px; font-weight: 600; white-space: nowrap;
}

/* ---------- Formulario a mitad de página ---------- */
.cx-midform { background: var(--cx-navy); color: #fff; }
.cx-midform__grid { display: grid; grid-template-columns: 440px 1fr; gap: 64px; align-items: center; }
.cx-midform__text { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.cx-midform__text .cx-label { margin: 0; }
.cx-midform__text > p:not(.cx-label) { color: rgba(255,255,255,.85); }

/* ---------- Testimonios ---------- */
.cx-testimonials { background: var(--cx-navy); color: #fff; overflow: hidden; }
.cx-testimonials .cx-head > p:not(.cx-label) { color: rgba(255,255,255,.8); }
.cx-marquee { overflow: hidden; }
.cx-marquee__track { display: flex; gap: 16px; width: max-content; animation: cx-marquee 45s linear infinite; }
.cx-marquee:hover .cx-marquee__track, .cx-marquee:focus-within .cx-marquee__track { animation-play-state: paused; }
@keyframes cx-marquee { to { transform: translateX(calc(-50% - 8px)); } }
.cx-quote { width: 360px; min-height: 320px; flex: none; background: #fff; color: var(--cx-navy); border-radius: var(--cx-radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.cx-quote__mark { width: 30px; height: 22px; fill: var(--cx-blue); }
.cx-quote blockquote { margin: 0; font-size: 16px; line-height: 1.5; }
.cx-quote figcaption { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--cx-line); display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cx-quote figcaption span { color: var(--cx-muted); }

/* ---------- Implementación ---------- */
#implementacion .cx-head { margin-bottom: 0; }

/* ---------- Contacto ---------- */
.cx-contact { display: grid; grid-template-columns: 409fr 711fr; gap: 16px; }
.cx-contact__img { position: relative; border-radius: var(--cx-radius); overflow: hidden; min-height: 560px; background: #fff; }
.cx-contact__img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cx-glass--sm { position: absolute; left: 16px; bottom: 16px; max-width: 260px; gap: 10px; background: var(--cx-navy); border-color: var(--cx-navy); }
.cx-glass--sm .cx-label { margin: 0; }
.cx-contact__form { background: #fff; border-radius: var(--cx-radius); padding: 48px 40px; min-height: 560px; }

/* ---------- Pie ---------- */
.cx-footer { background: var(--cx-navy); color: #fff; padding: 110px 0 40px; position: relative; overflow: hidden; }
.cx-footer > .cx-wrap { position: relative; z-index: 1; }
/* Cuchilla del brandbook en el lado derecho del pie */
.cx-footer { background-image: url("../img/cuchilla.png"); background-repeat: no-repeat; background-size: auto 100%; background-position: right -470px bottom; }
.cx-footer__cta { text-align: center; max-width: 680px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.cx-footer__cta .cx-label { margin: 0; }
.cx-footer__title { font-size: 44px; }
.cx-footer__cta > p:not(.cx-label):not(.cx-footer__title) { max-width: 460px; color: rgba(255,255,255,.9); }
.cx-footer .cx-btn-row { margin-top: 10px; }
.cx-footer__cols { display: grid; grid-template-columns: 298px 1fr; gap: 24px; margin-top: 110px; }
.cx-footer__cols > div { display: flex; flex-direction: column; gap: 16px; }
.cx-footer__cols a, .cx-footer__cols span { text-decoration: none; color: #fff; }
.cx-footer__cols > div:first-child a { font-weight: 600; }
.cx-footer__cols a:hover { text-decoration: underline; }
.cx-footer__h { font-size: 14px; font-weight: 700; }
.cx-footer__logo { width: 320px; height: auto; margin-top: 64px; }
.cx-footer__copy { margin-top: 48px; color: rgba(255,255,255,.9); }

/* ---------- Botón flotante ---------- */
.cx-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  display: flex; align-items: center; gap: 8px; background: #fff; padding: 6px; border-radius: 999px;
  box-shadow: 0 1px 2px rgba(14,27,61,.15), 0 8px 24px rgba(14,27,61,.18);
  opacity: 0; transform: translateY(16px); pointer-events: none; transition: opacity .3s, transform .3s;
}
.cx-float.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.cx-float__wa { width: 44px; height: 44px; border-radius: 50%; display: block; overflow: hidden; }
.cx-float__wa img { width: 100%; height: 100%; }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 1199px) {
  .cx-h1, .cx-h1--section { font-size: 52px; }
  .cx-h2, .cx-footer__title { font-size: 38px; }
  .cx-h3 { font-size: 34px; }
  .cx-body-lg { font-size: 18px; }
  .cx-nav { display: none; }
  .cx-menu-btn { display: block; }
  .cx-hero__top { grid-template-columns: 1fr; gap: 28px; }
  .cx-hero__cards { grid-template-columns: 1fr 1fr; height: auto; }
  .cx-hero__cards > * { height: 420px; }
  .cx-hero__log { grid-column: span 2; }
  .cx-split { grid-template-columns: 1fr; }
  .cx-service { grid-template-columns: 300px 1fr; }
  .cx-platform { grid-template-columns: 1fr; gap: 40px; }
  .cx-areas { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .cx-area { flex: 0 0 calc((100% - 16px) / 3); scroll-snap-align: start; }
  .cx-compare { grid-template-columns: 1fr 1fr; }
  .cx-contact { grid-template-columns: 1fr 1.4fr; }
  .cx-midform__grid { grid-template-columns: 1fr; gap: 40px; }
  .cx-footer { background-size: 420px auto; background-position: right -40px bottom; }
}

@media (max-width: 809px) {
  .cx-section { padding: 80px 0; }
  .cx-wrap, .cx-header__inner { padding-left: 16px; padding-right: 16px; }
  .cx-h1, .cx-h1--section { font-size: 40px; }
  .cx-h2, .cx-footer__title { font-size: 32px; }
  .cx-h3 { font-size: 30px; }
  .cx-body-lg { font-size: 16px; }
  .cx-hide-sm { display: none; }
  .cx-header__logo img { width: 150px; }
  .cx-login__toggle { padding: 8px 12px; font-size: 14px; min-height: 40px; }
  .cx-login__panel { position: fixed; left: 16px; right: 16px; top: 70px; width: auto; }
  .cx-hero { padding-top: 40px; }
  .cx-hero__sub .cx-btn-row { flex-direction: column; align-items: flex-start; }
  .cx-hero__cards { grid-template-columns: 1fr; margin-top: 40px; }
  .cx-hero__cards > * { height: 360px; }
  .cx-hero__log { grid-column: auto; }
  .cx-compare { grid-template-columns: 1fr; }
  .cx-quote { width: 300px; }
  .cx-steps { flex-direction: column; height: auto; }
  .cx-step { min-height: 64px; flex: none; }
  .cx-step .cx-step__num { text-align: left; }
  .cx-step.is-active { min-height: 380px; }
  .cx-service { grid-template-columns: 1fr; min-height: 0; }
  .cx-service__img { height: 260px; }
  .cx-service__body { padding: 8px 6px 6px; }
  .cx-areas { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; margin: 0 -16px; padding: 0 16px; }
  .cx-area { flex: 0 0 78%; scroll-snap-align: start; }
  .cx-contact { grid-template-columns: 1fr; }
  .cx-contact__img { min-height: 320px; }
  .cx-contact__form { padding: 24px 16px; min-height: 0; }
  .cx-footer { padding-top: 80px; }
  .cx-footer__cols { grid-template-columns: 1fr; margin-top: 72px; gap: 40px; }
  .cx-footer__logo { width: 220px; }
  .cx-footer { background-size: 220px auto; background-position: right -30px bottom; }
  .cx-float { right: 12px; bottom: 12px; }
  .cx-float .cx-btn { font-size: 14px; padding: 8px 14px; min-height: 40px; }
  .cx-float__wa { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cx-marquee { overflow-x: auto; }
  .cx-quote[aria-hidden="true"] { display: none; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
