/* ═══════════════════════════════════════════════════════════════
   RESPALDO INT — Sistema visual del sitio público
   Tokens, componentes y motion compartidos por todas las secciones.
   Colores del sistema: #6ca1d3 (azul suave) · #2f5f91 (azul fuerte) · #1f4166 (navy)
   Tipografía: Lexend (display) · IBM Plex Sans (texto)
   ═══════════════════════════════════════════════════════════════ */

:root {
  --blue:        #6ca1d3;
  --blue-strong: #2f5f91;
  --navy:        #1f4166;
  --navy-deep:   #0f2b4a;
  --ink:         #16283d;
  --ink-soft:    #3a4c60;
  --muted:       #5b6b7c;
  --muted-2:     #8a9bad;
  --tint:        #eef4fa;
  --tint-2:      #f6f9fc;
  --line:        #dbe7f1;
  --line-soft:   #edf2f7;
  --white:       #ffffff;

  --font-display: 'Lexend', sans-serif;
  --font-body:    'IBM Plex Sans', sans-serif;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --shadow-tint:   0 1px 2px rgba(31,65,102,.04), 0 12px 32px -12px rgba(31,65,102,.16);
  --shadow-float:  0 30px 60px -20px rgba(31,65,102,.32);
  --shadow-navy:   0 24px 48px -16px rgba(15,43,74,.55);

  --ease-out: cubic-bezier(.22,1,.36,1);
  --container: 80rem;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--ink); background: var(--white); font-size: 17px; line-height: 1.6; }
h1, h2, h3, .font-display { font-family: var(--font-display); }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img { display: block; }

::selection { background: rgba(108,161,211,.35); color: var(--navy-deep); }

/* Accesibilidad: foco visible solo con teclado */
:focus-visible { outline: 2px solid var(--blue-strong); outline-offset: 3px; border-radius: 6px; }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: 10px;
  font-size: .95rem; font-weight: 600; transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* ─── Textura sutil (rompe la planitud digital sin ensuciar) ─── */
.grain:not(.absolute):not(.fixed) { position: relative; }
.grain::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain-light::after { opacity: .07; mix-blend-mode: soft-light; }

/* ─── Tipografía de sección ─── */
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--blue-strong);
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--blue); border-radius: 2px; }
.eyebrow.on-dark { color: var(--blue); }
.eyebrow.on-dark::before { background: var(--blue); }

.h-section {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.12;
  font-size: clamp(2rem, 1.35rem + 2.4vw, 3.1rem); color: var(--navy);
}
.h-section.on-dark { color: #fff; }
.lead { font-size: 1.2rem; line-height: 1.65; color: var(--muted); max-width: 44rem; }
.lead.on-dark { color: rgba(255,255,255,.62); }
.tnum { font-variant-numeric: tabular-nums; }

/* ─── Botones ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1.02rem; line-height: 1;
  padding: 1.05rem 1.6rem; border-radius: 12px; border: 1.5px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .22s var(--ease-out), box-shadow .22s var(--ease-out), background-color .2s, border-color .2s, color .2s;
  will-change: transform;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn svg { flex-shrink: 0; }

.btn-primary { background: var(--blue-strong); color: #fff; box-shadow: 0 10px 24px -10px rgba(47,95,145,.7); }
.btn-primary:hover { background: var(--navy); box-shadow: 0 16px 30px -12px rgba(31,65,102,.7); }

.btn-light { background: #fff; color: var(--navy); box-shadow: 0 10px 24px -12px rgba(0,0,0,.35); }
.btn-light:hover { background: var(--tint); }

.btn-outline { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue-strong); color: var(--blue-strong); background: var(--tint-2); }

.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }

.btn-soft { background: var(--tint); color: var(--blue-strong); }
.btn-soft:hover { background: #dde9f5; }

.btn-whatsapp { background: #25d366; color: #fff; box-shadow: 0 12px 26px -12px rgba(37,211,102,.7); }
.btn-whatsapp:hover { background: #1fb457; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: 1rem; color: var(--blue-strong);
  text-decoration: none; transition: gap .2s var(--ease-out), color .2s;
}
.link-arrow svg { transition: transform .25s var(--ease-out); }
.link-arrow:hover { gap: .6rem; color: var(--navy); }
.link-arrow:hover svg { transform: translateX(2px); }

/* ─── Superficies ─── */
.surface { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow-tint); }
.surface-tint { background: var(--tint-2); border: 1px solid var(--line-soft); border-radius: var(--radius); }
.icon-box {
  width: 3.75rem; height: 3.75rem; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--blue-strong); color: #fff;
  box-shadow: 0 8px 18px -8px rgba(47,95,145,.55);
  transition: background-color .25s, color .25s, transform .3s var(--ease-out);
}
.icon-box svg { width: 28px; height: 28px; }
.icon-box.solid { background: var(--blue-strong); color: #fff; }
.icon-box.sm { width: 3rem; height: 3rem; border-radius: 12px; }
.icon-box.sm svg { width: 22px; height: 22px; }

/* Lista con palomita */
.check-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.check-list li { display: flex; align-items: flex-start; gap: .65rem; font-size: 1.02rem; line-height: 1.55; color: var(--ink-soft); }
.check-list li::before {
  content: ""; flex-shrink: 0; width: 20px; height: 20px; margin-top: .2rem; border-radius: 50%;
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232f5f91' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-9'/%3E%3C/svg%3E") center/10px no-repeat;
}
.check-list.on-dark li { color: rgba(255,255,255,.82); }
.check-list.on-dark li::before {
  background: rgba(108,161,211,.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236ca1d3' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-9'/%3E%3C/svg%3E") center/10px no-repeat;
}

/* ─── Formularios ─── */
.field label {
  display: block; font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem;
}
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--font-body); font-size: 1.05rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: .8rem 1rem; outline: none;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: #c5d6e6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue-strong); box-shadow: 0 0 0 4px rgba(47,95,145,.12);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #dc2626; }
.field select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6b7c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 16px; padding-right: 2.6rem;
}
.form-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; padding: .8rem 1rem; border-radius: 10px; font-size: 1rem; }

/* ─── Motion: aparición al hacer scroll ─── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > :nth-child(1) { transition-delay: .00s; }
.reveal-stagger.in > :nth-child(2) { transition-delay: .07s; }
.reveal-stagger.in > :nth-child(3) { transition-delay: .14s; }
.reveal-stagger.in > :nth-child(4) { transition-delay: .21s; }
.reveal-stagger.in > :nth-child(5) { transition-delay: .28s; }
.reveal-stagger.in > :nth-child(6) { transition-delay: .35s; }
.reveal-stagger.in > :nth-child(7) { transition-delay: .42s; }
.reveal-stagger.in > :nth-child(8) { transition-delay: .49s; }

.lift { transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .3s; }
.lift:hover { transform: translateY(-5px); box-shadow: var(--shadow-float); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; }
  .lift:hover, .btn:hover { transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* ─── Header ─── */
#siteHeader { transition: background-color .3s, box-shadow .3s, height .3s; }
#siteHeader.scrolled { background: rgba(255,255,255,.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 1px 0 var(--line-soft), 0 10px 30px -18px rgba(31,65,102,.25); }
#siteHeader.scrolled nav { height: 4.25rem; }
.nav-link { position: relative; color: var(--ink-soft); font-weight: 600; font-size: 1.02rem; text-decoration: none; padding: .35rem 0; transition: color .2s; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--blue-strong); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease-out); }
.nav-link:hover, .nav-link.active { color: var(--blue-strong); }
.nav-link.active::after, .nav-link:hover::after { transform: scaleX(1); }

/* ─── Marquee de clientes ─── */
.clientes-marquee-wrap {
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.clientes-marquee-track { display: flex; align-items: center; gap: 4rem; width: max-content; animation: clientesScroll 38s linear infinite; }
.clientes-marquee-wrap:hover .clientes-marquee-track { animation-play-state: paused; }
.clientes-marquee-item { flex-shrink: 0; display: flex; align-items: center; justify-content: center; height: 110px; width: 140px; }
.clientes-marquee-item img { max-height: 92px; max-width: 100%; object-fit: contain; filter: grayscale(1) opacity(.5); transition: filter .3s ease, transform .3s var(--ease-out); }
.clientes-marquee-item img:hover { filter: grayscale(0) opacity(1); transform: scale(1.04); }
@keyframes clientesScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── Clientes sin logo, agrupados por estado (sept-2026) ─── */
.clientes-lista-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.clientes-lista-card { background: var(--tint-2); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.clientes-lista-estado {
  font-family: var(--font-display); font-weight: 700; font-size: .8rem; color: var(--blue-strong);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: .65rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line);
}
.clientes-lista-nombres { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.clientes-lista-nombres li { font-size: .88rem; color: var(--ink-soft); line-height: 1.4; }

/* ─── Widget WhatsApp ─── */
.wa-ping { animation: waPing 2.6s cubic-bezier(0,0,.2,1) infinite; }
@keyframes waPing { 0% { transform: scale(1); opacity: .45; } 75%, 100% { transform: scale(1.65); opacity: 0; } }
