/* Kovix web — estilos compartidos (maqueta de diseño) */
:root {
  --navy: #020A35;
  --navy-2: #0A1650;
  --blue: #204DE5;
  --blue-light: #4F7BFF;
  --bg: #F2F2F2;
  --white: #FFFFFF;
  --ink: #0B0B0B;
  --muted: #5A6180;
  --line: #DADCE5;
  --line-dark: rgba(255,255,255,.12);
  --radius: 14px;
  --max: 1360px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: Montserrat, Arial, system-ui, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* Idiomas: cada texto existe en .es y .en */
html[data-lang="es"] .en, html[data-lang="en"] .es { display: none !important; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--bg { background: var(--bg); }
.section--navy { background: var(--navy); color: var(--white); }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue);
}
.kicker::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.section--navy .kicker, .on-dark .kicker { color: var(--blue-light); }

h1, h2, h3 { font-weight: 800; line-height: 1.08; letter-spacing: -.02em; }
h1 { font-size: clamp(36px, 4.6vw, 60px); }
h2 { font-size: clamp(30px, 4.2vw, 50px); }
h3 { font-size: clamp(19px, 1.8vw, 22px); letter-spacing: -.01em; line-height: 1.25; }
.hl { color: var(--blue); }
.section--navy .hl, .on-dark .hl { color: var(--blue-light); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 640px; }
.section--navy .lead, .on-dark .lead { color: rgba(255,255,255,.72); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 999px;
  font-weight: 600; font-size: 14px; line-height: 1; white-space: nowrap;
  transition: background .2s, color .2s, border-color .2s;
}
.btn svg { width: 13px; height: 13px; transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: #1A3FC4; }
/* Secundario: link subrayado, no otro botón */
.btn--ghost { height: 36px; padding: 0 2px; border-radius: 0; background: none; border: 0; box-shadow: inset 0 -1px 0 currentColor; opacity: .9; }
.btn--ghost:hover { opacity: 1; box-shadow: inset 0 -2px 0 currentColor; background: none; }
.btn--light { background: var(--white); color: var(--navy); }
.btn--light:hover { background: #E8EBF5; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s, color .3s;
  color: var(--white);
}
.header.is-solid { background: rgba(255,255,255,.96); backdrop-filter: blur(10px); color: var(--navy); box-shadow: 0 1px 0 var(--line); }
.header__in { display: flex; align-items: center; gap: 28px; height: 76px; }
.header__logo img { height: 30px; width: auto; }
.header__logo .logo-dark { display: none; }
.header.is-solid .logo-dark, .header.on-light .logo-dark { display: block; }
.header.is-solid .logo-light, .header.on-light .logo-light { display: none; }
.header.on-light { color: var(--navy); }
.nav { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.nav__item { position: relative; }
.nav__link { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 8px; font-size: 14.5px; font-weight: 600; opacity: .9; }
.nav__link:hover { opacity: 1; background: rgba(127,127,127,.1); }
.nav__link svg { width: 12px; height: 12px; }
.nav__drop {
  position: absolute; top: 100%; left: 0; min-width: 300px; padding: 10px;
  background: var(--white); color: var(--navy); border-radius: var(--radius);
  box-shadow: 0 20px 50px -12px rgba(2,10,53,.28);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .2s var(--ease);
}
.nav__item:hover .nav__drop, .nav__item:focus-within .nav__drop { opacity: 1; visibility: visible; transform: none; }
.nav__drop a { display: block; padding: 12px 14px; border-radius: 10px; }
.nav__drop a:hover { background: var(--bg); }
.nav__drop b { display: block; font-size: 14.5px; }
.nav__drop span:not(.es):not(.en) { font-size: 13px; color: var(--muted); }
.header__right { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1.5px solid currentColor; border-radius: 999px; padding: 3px; opacity: .85; }
.lang button { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
html[data-lang="es"] .lang [data-set="es"], html[data-lang="en"] .lang [data-set="en"] { background: currentColor; }
html[data-lang="es"] .lang [data-set="es"] span:not(.es):not(.en), html[data-lang="en"] .lang [data-set="en"] span:not(.es):not(.en) { color: var(--navy); }
html[data-lang="es"] .header.is-solid .lang [data-set="es"] span:not(.es):not(.en), html[data-lang="en"] .header.is-solid .lang [data-set="en"] span:not(.es):not(.en),
html[data-lang="es"] .header.on-light .lang [data-set="es"] span:not(.es):not(.en), html[data-lang="en"] .header.on-light .lang [data-set="en"] span:not(.es):not(.en) { color: var(--white); }
.header .btn { height: 34px; padding: 0 14px; font-size: 13.5px; }
.burger { display: none; width: 40px; height: 40px; }
.burger span { display: block; width: 22px; height: 2px; background: currentColor; margin: 5px auto; }

@media (max-width: 1180px) {
  .nav, .header__right .btn { display: none; }
  .burger { display: block; }
  .header__right { margin-left: auto; }
  .nav.is-open {
    display: flex; flex-direction: column; position: fixed; inset: 76px 0 0 0; margin: 0;
    background: var(--white); color: var(--navy); padding: 20px var(--gutter); overflow: auto;
  }
  .nav.is-open .nav__drop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 8px 12px; min-width: 0; }
  .nav.is-open .nav__link { font-size: 18px; }
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
/* Performance (LCP): lo que está en el primer bloque de la página (el hero) aparece con una animación
   CSS que arranca en el primer pintado, sin esperar a que cargue el JS. El resto sigue con .reveal + JS. */
#site-header + section .reveal { animation: kxFadeIn .6s cubic-bezier(.16,1,.3,1) both; transform: none !important; transition: none !important; }
#site-header + section .reveal[data-delay="1"] { animation-delay: .1s; }
#site-header + section .reveal[data-delay="2"] { animation-delay: .2s; }
#site-header + section .reveal[data-delay="3"] { animation-delay: .3s; }
@keyframes kxFadeIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; animation: none !important; }
  * { animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Cards genéricas ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(2,10,53,.25); border-color: transparent; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: rgba(32,77,229,.08); color: var(--blue);
}
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: var(--blue); }
.link-arrow svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
a:hover .link-arrow svg, .link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 72px 0 32px; font-size: 14.5px; }
.footer > .wrap { border-top: 1px solid var(--line-dark); padding-top: 64px; }
.footer { padding-top: 0; }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer__logo { height: 30px; width: auto; margin-bottom: 18px; }
.footer h4 { color: var(--white); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.footer li { list-style: none; margin-bottom: 10px; }
.footer a:hover { color: var(--white); }
.footer__offices { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line-dark); }
.footer__offices span b { color: var(--white); font-weight: 600; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; font-size: 13px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* Nota de maqueta */
.mock-note {
  position: fixed; left: 16px; bottom: 16px; z-index: 60; max-width: 300px;
  background: var(--ink); color: var(--white); font-size: 12.5px; line-height: 1.45;
  padding: 12px 14px 12px 14px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.mock-note b { color: #FFD014; }
.mock-note button { position: absolute; top: 6px; right: 8px; opacity: .6; font-size: 16px; }

/* CTA flotante: aparece al dejar atrás el inicio */
.float-cta {
  position: fixed; right: 24px; bottom: 24px; z-index: 55;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  box-shadow: 0 14px 34px -10px rgba(32,77,229,.7);
}
.float-cta.is-on { opacity: 1; transform: none; pointer-events: auto; }
/* En escritorio el header ya tiene el botón Empecemos siempre visible */
@media (min-width: 1181px) { .float-cta { display: none; } }
@media (max-width: 640px) {
  .float-cta { left: 16px; right: 16px; bottom: 16px; justify-content: center; }
  .mock-note { bottom: 84px; }
}

/* ---------- Filtros (componente único para toda la web) ----------
   <div class="fbar">                                    barra con línea inferior
     <div class="fgroup"><span class="fgroup__label">Tipo</span>
       <div class="ftabs"><button class="ftab is-on">Todos</button>…</div></div>
     <label class="fsearch">…<input></label>  <span class="fcount">6 casos</span>
   </div>
   .ftabs sola (sin .fbar) sirve para filtros dentro de tarjetas o gráficos. */
.fbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 40px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.fbar > * { min-width: 0; }
.fgroup { display: flex; align-items: flex-end; gap: 18px; min-width: 0; max-width: 100%; }
.fgroup__label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: 15px; opacity: .75; white-space: nowrap; }
.ftabs { display: flex; gap: 24px; overflow-x: auto; scrollbar-width: none; min-width: 0; max-width: 100%; }
.ftabs::-webkit-scrollbar { display: none; }
.ftab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 12px 0 14px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; background: none; border: 0; border-radius: 0; transition: color .2s; }
.ftab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue); transform: scaleX(0); transition: transform .25s var(--ease); }
.ftab:hover { color: var(--navy); }
.ftab.is-on { color: var(--navy); background: none; }
.ftab.is-on::after { transform: scaleX(1); }
.ftab small, .ftab i:not([style]) { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); opacity: .8; }
.ftabs--sm { gap: 18px; } .ftabs--sm .ftab { font-size: 13px; padding: 8px 0 10px; }
.section--navy .ftab, .on-dark .ftab { color: rgba(255,255,255,.55); }
.section--navy .ftab:hover, .section--navy .ftab.is-on, .on-dark .ftab.is-on { color: var(--white); }
.section--navy .ftab::after { background: var(--blue-light); }
.fsearch { display: flex; align-items: center; gap: 8px; padding: 0 0 13px; width: 220px; }
.fsearch svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.fsearch input { border: 0; outline: 0; font: inherit; font-size: 14px; width: 100%; background: transparent; color: var(--ink); }
.fsearch input::placeholder { color: var(--muted); }
.fcount { font-size: 13px; font-weight: 600; color: var(--muted); padding-bottom: 14px; white-space: nowrap; }
@media (max-width: 760px) {
  .fbar { flex-direction: column; align-items: stretch; border-bottom: 0; gap: 0; }
  .fbar > * { width: 100%; }
  .fbar > .ftabs { border-bottom: 1px solid var(--line); }
  .fgroup .ftabs { flex: 1; }
  .fgroup { border-bottom: 1px solid var(--line); gap: 12px; }
  .fsearch { width: 100%; padding-top: 12px; border-bottom: 1px solid var(--line); }
  .fcount { padding: 12px 0 0; }
}

/* ---------- Regla: en los heroes y bandas CTA, botones en UN renglón y métricas en UN renglón ---------- */
body .hero__ctas, body .p-hero__ctas, body .cta-band__btns { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 12px; }
body .hero__ctas .btn, body .p-hero__ctas .btn, body .cta-band__btns .btn { white-space: nowrap; flex: 0 1 auto; min-width: 0; }
body .hero__trust, body .p-hero__facts, body .hero-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, max-content); gap: 36px; flex-wrap: nowrap; }
body .p-hero__facts > div, body .hero-stats > div { min-width: 0; }
@media (max-width: 640px) {
  body .hero__ctas, body .p-hero__ctas, body .cta-band__btns { gap: 16px; }
  body .hero__trust, body .p-hero__facts, body .hero-stats { grid-auto-columns: minmax(0, 1fr); gap: 14px; }
  body .p-hero__facts b, body .hero-stats b { font-size: 19px; }
  body .p-hero__facts > div > span, body .hero-stats > div > span { font-size: 11.5px; line-height: 1.3; display: block; margin-top: 4px; }
  body .hero__trust { font-size: 11.5px; } body .hero__trust b { font-size: 14px; }
}

/* bajadas legibles sobre fondos oscuros */
.hero .lead, .page-hero .lead, .p-hero .lead, .p-hero p, .c-hero .c-lead, .c-lead, .section--navy .lead, .cta .lead, .cta-band .lead, .cta-band p, .hs__slide .lead { color: #fff !important; opacity: 1 !important; }

/* cabecera de todas las páginas: mismo alto que el hero de la Home */
.page-hero, .p-hero, .c-hero { height: 730px; min-height: 0; display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; }
.page-hero > .wrap, .p-hero > .wrap, .c-hero > .wrap { width: 100%; }
@media (max-width: 900px) { .page-hero, .p-hero, .c-hero { min-height: 560px; } }

/* para que todas entren en el mismo alto */
.p-hero { padding: 112px 0 48px !important; }
.p-hero h1 { font-size: clamp(34px, 3.3vw, 48px) !important; line-height: 1.1 !important; }
.p-hero .lead { font-size: 17px !important; }
.p-hero .crumb { margin-bottom: 10px; }
.p-hero .shot, .p-hero .console, .p-hero .plan, .p-hero .gets, .p-hero .sq-card, .p-hero .slot { max-height: 520px; }

/* cabeceras de página: el texto arranca a la misma altura que en el hero de la Home (kicker a 148px) */
.page-hero, .p-hero, .c-hero { justify-content: flex-start !important; padding-top: 148px !important; padding-bottom: 48px !important; }
.p-hero__grid { align-items: start !important; }
.page-hero { padding-top: 141px !important; }
.p-hero__facts { margin-top: 26px !important; } .p-hero .lead { margin-bottom: 24px !important; }

/* cabeceras de las páginas internas: más bajas que el hero de la Home; crecen solo si el contenido lo necesita */
.page-hero, .p-hero, .c-hero { height: auto !important; min-height: 580px !important; }

/* Redes sociales en el footer */
.footer__social { display: flex; gap: 10px; margin-top: 20px; }
.footer__social a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; border: 1px solid rgba(255,255,255,.22); transition: background .2s, border-color .2s; }
.footer__social a:hover { background: #204DE5; border-color: #204DE5; }

/* Enlace discreto a la Política de Calidad (ISO) */
.footer__legal { color: inherit; opacity: .7; text-decoration: none; }
.footer__legal:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* Error al enviar un formulario a HubSpot */
.form__err { margin-top: 14px; padding: 12px 14px; border-left: 3px solid #C2410C; background: rgba(194,65,12,.07); color: #7C2D12; font-size: 14px; line-height: 1.5; }
