/* Solutions-NG — hoja de estilos principal */
:root {
  --marino: #14284B;
  --marino-2: #1D3863;
  --acero: #4B5E7A;
  --niebla: #E9EDF2;
  --linea: #D3DAE3;
  --papel: #FAFBFC;
  --blanco: #FFFFFF;
  --cobalto: #2C6BD6;
  --cobalto-osc: #1F55B3;
  --texto: #1B2433;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-sm: 4px;
  --r-md: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--texto);
  background: var(--papel);
  font-variation-settings: "wdth" 100;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--cobalto); text-underline-offset: 3px; }
a:hover { color: var(--cobalto-osc); }
:focus-visible { outline: 3px solid var(--cobalto); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  color: var(--marino);
  line-height: 1.12;
  margin: 0 0 .5em;
  font-stretch: 118%;
  font-variation-settings: "wdth" 118;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); font-weight: 750; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.18rem; font-weight: 650; line-height: 1.3; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--marino); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; min-height: 46px; padding: 0 22px;
  background: var(--cobalto); color: #fff;
  border: 1.5px solid var(--cobalto); border-radius: var(--r-sm);
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--cobalto-osc); border-color: var(--cobalto-osc); color: #fff; }
.btn-ghost { background: transparent; color: var(--marino); border-color: var(--marino); }
.btn-ghost:hover { background: var(--marino); border-color: var(--marino); color: #fff; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .94rem; }

/* Encabezado */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 251, 252, .94);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--linea);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.brand-name {
  margin: 0; font-weight: 750; font-size: 1.22rem; color: var(--marino);
  font-variation-settings: "wdth" 120; letter-spacing: -0.01em;
}
.brand-name span { color: var(--cobalto); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a:not(.btn) { color: var(--texto); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:not(.btn):hover { color: var(--cobalto); }
.nav-toggle { display: none; }

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); border-bottom: 1px solid var(--linea); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.kicker { color: var(--acero); font-weight: 500; margin-bottom: 1.1em; }
.lead { font-size: 1.16rem; color: #33405A; max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-diagram { margin: 0; color: var(--marino); }
.hero-diagram svg { width: 100%; height: auto; }
.hero-diagram text {
  font-family: var(--font); font-size: 12.5px; font-weight: 550;
  text-anchor: middle; fill: var(--marino);
}
.src rect { fill: var(--blanco); stroke: var(--linea); stroke-width: 1.2; }
.links .ln { stroke: var(--acero); stroke-opacity: .55; }
.links .ln.out { stroke: var(--cobalto); stroke-opacity: 1; stroke-width: 2.2; }
.hub rect { fill: var(--marino); }
.hub circle { fill: var(--cobalto); }
.hub text { fill: #fff !important; font-size: 11.5px !important; }
.res rect { fill: var(--cobalto); }
.res text { fill: #fff !important; font-weight: 650 !important; font-size: 13.5px !important; }

/* Animación única del diagrama al cargar */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-diagram .ln { stroke-dasharray: 320; stroke-dashoffset: 320; }
  .js .hero-diagram .hub, .js .hero-diagram .res g { opacity: 0; }
  .js .hero-diagram.run .ln { animation: draw 1.1s ease-out forwards; }
  .js .hero-diagram.run .ln:nth-child(2) { animation-delay: .08s; }
  .js .hero-diagram.run .ln:nth-child(3) { animation-delay: .16s; }
  .js .hero-diagram.run .ln:nth-child(4) { animation-delay: .24s; }
  .js .hero-diagram.run .ln:nth-child(5) { animation-delay: .32s; }
  .js .hero-diagram.run .hub { animation: appear .4s ease-out .9s forwards; }
  .js .hero-diagram.run .ln.out { animation-delay: 1.15s; animation-duration: .7s; }
  .js .hero-diagram.run .res g { animation: appear .4s ease-out 1.7s forwards; }
  .js .hero-diagram.run .res g + g { animation-delay: 1.8s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes appear { to { opacity: 1; } }

/* Secciones */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-tint { background: var(--niebla); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head p { color: #3A4761; font-size: 1.06rem; }

/* Nosotros */
.two-col { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.philosophy { border-left: 3px solid var(--cobalto); padding-left: clamp(20px, 3vw, 36px); }
.statement {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.22; font-weight: 650;
  color: var(--marino); font-variation-settings: "wdth" 112; margin-bottom: 1.2em;
}
.truths { list-style: none; margin: 0; padding: 0; color: #3A4761; }
.truths li { padding: 12px 0; border-top: 1px solid var(--linea); }

/* Soluciones: selector */
.services {
  display: grid; grid-template-columns: minmax(260px, 360px) 1fr;
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-md); overflow: hidden;
}
.service-list { display: flex; flex-direction: column; border-right: 1px solid var(--linea); background: #F4F6F9; }
.service-list button {
  text-align: left; font: inherit; font-weight: 550; font-size: 1rem; color: var(--acero);
  background: transparent; border: 0; border-left: 3px solid transparent;
  border-bottom: 1px solid var(--linea); padding: 17px 22px; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.service-list button:last-child { border-bottom: 0; }
.service-list button:hover { color: var(--marino); background: #EDF1F6; }
.service-list button[aria-selected="true"] {
  color: var(--marino); background: var(--blanco); border-left-color: var(--cobalto); font-weight: 650;
}
.service-panels { padding: clamp(28px, 4vw, 52px); }
.service-panels h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-bottom: .8em; max-width: 28ch; }
.panel-art { width: 100%; height: auto; border-radius: var(--r-md); border: 1px solid var(--linea); margin-bottom: clamp(22px, 3vw, 32px); }
.service-panels article:not([hidden]) { animation: appear .25s ease-out; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.ticks li { position: relative; padding-left: 26px; color: #2B3750; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 7px;
  border-left: 2px solid var(--cobalto); border-bottom: 2px solid var(--cobalto); transform: rotate(-45deg);
}

/* Dolibarr */
.dolibarr { border-bottom: 1px solid var(--linea); }
.doli-head { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 5vw, 72px); align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.doli-head .lead { margin: 0; }
.doli-facts { list-style: none; margin: 0; padding: 0; }
.doli-facts li { padding: 12px 0; border-top: 1px solid var(--linea); color: #3A4761; font-size: .97rem; }
.doli-facts strong { color: var(--marino); font-weight: 650; }
.doli-areas { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--marino); }
.doli-area { padding: 30px 26px 34px; }
.doli-area + .doli-area { border-left: 1px solid var(--linea); }
.doli-art { width: 100%; height: auto; border: 1px solid var(--linea); border-radius: var(--r-md); margin-bottom: 22px; background: var(--blanco); }
.client .doli-art { margin-bottom: 18px; }
.doli-area > p { color: #3A4761; font-size: .98rem; }
.doli-area-cfdi h3::after { content: "CFDI 4.0"; margin-left: 10px; vertical-align: 3px; font-size: .72rem; font-weight: 650; color: #fff; background: var(--cobalto); padding: 3px 8px; border-radius: 3px; white-space: nowrap; display: inline-block; font-variation-settings: "wdth" 100; }
.ticks-1 { grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
.ticks-1 li { font-size: .96rem; line-height: 1.5; }
.doli-sub { font-size: clamp(1.3rem, 2vw, 1.55rem); margin: clamp(48px, 6vw, 72px) 0 22px; }
.clients { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.client { background: var(--niebla); border-radius: var(--r-md); padding: 26px 26px 22px; border-top: 3px solid var(--marino); }
.client h4 { margin: 0 0 6px; font-size: 1.2rem; color: var(--marino); font-variation-settings: "wdth" 115; }
.client-line { color: var(--acero); font-size: .94rem; font-weight: 550; }
.client p { font-size: .96rem; color: #2B3750; margin-bottom: .6em; }
@media (max-width: 1000px) {
  .doli-areas { grid-template-columns: 1fr; }
  .doli-area, .doli-area + .doli-area { padding: 28px 0; border-left: 0; border-bottom: 1px solid var(--linea); }
  .clients { grid-template-columns: 1fr; }
  .ticks-1 { grid-template-columns: 1fr 1fr; }
  .doli-area .doli-art { max-width: 560px; }
  .client .doli-art { max-width: 480px; }
}
@media (max-width: 860px) { .doli-head { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .ticks-1 { grid-template-columns: 1fr; } }

/* BFK Pro */
.bfk { margin-top: clamp(48px, 6vw, 72px); padding: clamp(28px, 4vw, 48px); background: var(--blanco); border: 1px solid var(--linea); border-top: 4px solid var(--cobalto); border-radius: var(--r-md); }
.bfk-intro { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.bfk-intro p { color: #2B3750; }
.bfk-tag { color: var(--cobalto) !important; font-weight: 650; margin-bottom: .6em; }
.bfk-title { font-size: clamp(1.45rem, 2.4vw, 1.95rem); max-width: 24ch; }
.bfk-subhead { font-size: 1.15rem; color: var(--marino); margin: clamp(32px, 4vw, 44px) 0 16px; font-variation-settings: "wdth" 112; }
.bfk-flow { margin-bottom: 0; }
.bfk-mods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; background: var(--linea); border: 1px solid var(--linea); border-radius: var(--r-md); overflow: hidden; }
.bfk-mods > div { background: var(--blanco); padding: 22px 22px 20px; }
.bfk-mods dt { font-weight: 650; color: var(--marino); margin-bottom: 6px; }
.bfk-mods dd { margin: 0; font-size: .94rem; line-height: 1.55; color: #3A4761; }
@media (max-width: 1000px) { .bfk-intro { grid-template-columns: 1fr; } .bfk-mods { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .bfk-mods { grid-template-columns: 1fr; } .bfk { padding: 22px 16px; } }

/* Experiencia */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 2px solid var(--marino); }
.case { padding: 30px 32px 30px 0; border-bottom: 1px solid var(--linea); }
.case:nth-child(even) { padding: 30px 0 30px 32px; border-left: 1px solid var(--linea); }
.case p { color: #3A4761; margin: 0; }

/* Sectores */
.sectors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin: 0; background: var(--linea); border: 1px solid var(--linea); }
.sectors > div { background: var(--papel); padding: 26px 24px; }
.sectors dt { font-weight: 650; color: var(--marino); font-variation-settings: "wdth" 110; margin-bottom: 6px; font-size: 1.06rem; }
.sectors dd { margin: 0; color: #3A4761; font-size: .97rem; }

/* Metodología */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; counter-reset: paso; }
.steps li { counter-increment: paso; position: relative; padding-top: 64px; }
.steps li::before {
  content: counter(paso); position: absolute; top: 0; left: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--marino); color: #fff; font-weight: 700; font-size: 1.05rem;
}
.steps li::after {
  content: ""; position: absolute; top: 22px; left: 56px; right: -12px; height: 2px; background: var(--linea);
}
.steps li:last-child::after { display: none; }
.steps li:last-child::before { background: var(--cobalto); }
.steps p { color: #3A4761; font-size: .97rem; }

/* Visión (banda marino) */
.section-ink { background: var(--marino); color: #D8E0EC; }
.section-ink h2, .section-ink h3 { color: #fff; }
.vision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 72px) clamp(36px, 6vw, 88px); }
.vision-intro p { color: #C6D1E2; font-size: 1.06rem; }
.mv { display: grid; gap: 28px; }
.mv p { margin: 0; }
.mv > div { padding-left: 20px; border-left: 2px solid var(--cobalto); }
.values {
  grid-column: 1 / -1; list-style: none; margin: 0; padding: 32px 0 0;
  border-top: 1px solid rgba(255,255,255,.16);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 40px;
}
.values li { color: #C6D1E2; font-size: .97rem; }
.values strong { color: #fff; font-weight: 650; display: block; margin-bottom: 2px; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: start; }
.contact-direct { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; font-weight: 600; font-size: 1.08rem; }
.contact-form {
  background: var(--blanco); border: 1px solid var(--linea); border-top: 3px solid var(--marino);
  border-radius: var(--r-md); padding: clamp(24px, 3.5vw, 40px);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .95rem; color: var(--marino); margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--acero); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--texto);
  background: var(--papel); border: 1.5px solid var(--linea); border-radius: var(--r-sm);
  padding: 11px 13px; transition: border-color .15s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cobalto); background: #fff; }
.field [aria-invalid="true"] { border-color: #B3261E; }
.form-error { color: #B3261E; font-weight: 550; font-size: .95rem; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.form-note { color: var(--acero); font-size: .9rem; margin: 14px 0 0; }

/* Pie */
.site-footer { border-top: 1px solid var(--linea); padding: 36px 0; font-size: .94rem; color: var(--acero); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-row p { margin: 0; }
.footer-row > p { text-align: right; }

/* Responsivo */
@media (max-width: 1000px) {
  .steps { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
  .steps li::after { display: none; }
  .sectors { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: grid; gap: 6px; place-content: center; width: 44px; height: 44px;
    background: none; border: 1px solid var(--linea); border-radius: var(--r-sm); cursor: pointer;
  }
  .nav-toggle .bar { width: 20px; height: 2px; background: var(--marino); transition: transform .2s; }
  .nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--papel); border-bottom: 1px solid var(--linea);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--linea); }
  .nav .btn { margin-top: 16px; }

  .hero-grid, .two-col, .contact-grid, .vision-grid { grid-template-columns: 1fr; }
  .hero-diagram { max-width: 560px; }

  .services { grid-template-columns: 1fr; }
  .service-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--linea); scrollbar-width: thin; }
  .service-list button { flex: 0 0 auto; border-left: 0; border-bottom: 3px solid transparent; border-right: 1px solid var(--linea); padding: 14px 18px; white-space: nowrap; }
  .service-list button[aria-selected="true"] { border-left-color: transparent; border-bottom-color: var(--cobalto); }

  .cases { grid-template-columns: 1fr; }
  .case, .case:nth-child(even) { padding: 26px 0; border-left: 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .ticks, .sectors, .values, .steps { grid-template-columns: 1fr; }
  .hero-actions .btn, .form-actions .btn { width: 100%; }
  .footer-row > p { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .site-header, .contact-form, .hero-actions { display: none; }
  .section-ink { background: #fff; color: #000; }
}
