/* ============================================================
   site.css - Sitio publico Sistemas San Antonio
   Diseno moderno construido sobre el Design System v2 "Stone & Slate".
   Sin frameworks. Colores solo via var(--token).
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

::selection { background: var(--blue-200); color: var(--blue-900); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--content-max-width);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.section { padding-block: clamp(56px, 9vw, 112px); }
.section-sm { padding-block: clamp(40px, 6vw, 72px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-600);
}
.eyebrow::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--blue-600);
  border-radius: 2px;
}

.section-head { max-width: 680px; margin-bottom: var(--sp-12); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 {
  font-size: clamp(28px, 4.2vw, var(--text-3xl));
  margin-top: var(--sp-4);
}
.section-head p {
  margin-top: var(--sp-4);
  font-size: var(--text-md);
  color: var(--text-secondary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-size: var(--text-base);
  font-weight: 600;
  padding: 13px 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: transform var(--t-fast), box-shadow var(--t-base),
              background var(--t-base), border-color var(--t-base), color var(--t-base);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(180deg, var(--blue-500), var(--blue-600));
  color: #fff;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.15);
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--blue-600), var(--blue-700));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-light);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
  border-color: var(--blue-400);
  color: var(--blue-700);
  transform: translateY(-1px);
}

.btn-white {
  background: #fff;
  color: var(--blue-700);
  box-shadow: var(--shadow-md);
}
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }

.btn-lg { padding: 15px 28px; font-size: var(--text-md); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: var(--navbar-height);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base), box-shadow var(--t-base), background var(--t-base);
}
.site-header.scrolled {
  border-bottom-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}
.nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}
.nav-logo img { height: 34px; width: auto; display: block; }
.nav-logo .logo-dark { display: none; }
:root[data-theme="dark"] .nav-logo .logo-light { display: none; }
:root[data-theme="dark"] .nav-logo .logo-dark { display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.nav-links a {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--r-md);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a:hover { color: var(--blue-700); background: var(--blue-50); }
.nav-cta { display: flex; align-items: center; gap: var(--sp-3); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  background: var(--bg-surface);
  padding: 0;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 20px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transform: translate(-50%, -50%);
  transition: transform var(--t-base), opacity var(--t-base);
}
.nav-toggle span::before { transform: translate(-50%, -7px); }
.nav-toggle span::after  { transform: translate(-50%,  7px); }
.nav-toggle.open span { background: transparent; }
.nav-toggle.open span::before { transform: translate(-50%, 0) rotate(45deg); }
.nav-toggle.open span::after  { transform: translate(-50%, 0) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(var(--navbar-height) + clamp(40px, 7vw, 90px));
  padding-bottom: clamp(48px, 8vw, 96px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 82% 8%, rgba(79, 114, 176, .16), transparent 70%),
    radial-gradient(48% 45% at 8% 30%, rgba(110, 158, 110, .12), transparent 70%),
    linear-gradient(180deg, #fff, var(--bg-base));
  z-index: -2;
}
.hero::after { /* subtle dot grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(30,36,48,.05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 65%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 65%);
  z-index: -1;
}
.hero-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 6px 12px 6px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}
.hero-badge b { color: var(--blue-700); font-weight: 700; }
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--sage-500);
  box-shadow: 0 0 0 4px var(--sage-100);
}
.hero h1 {
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 800;
  margin-top: var(--sp-5);
  letter-spacing: -0.03em;
}
.hero h1 .grad {
  background: linear-gradient(120deg, var(--blue-600), var(--blue-400) 60%, var(--sage-500));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub {
  margin-top: var(--sp-5);
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  max-width: 30em;
}
.hero-actions {
  margin-top: var(--sp-8);
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
}
.hero-trust {
  margin-top: var(--sp-8);
  display: flex; flex-wrap: nowrap; gap: var(--sp-3) var(--sp-4);
  width: max-content; max-width: none;
}
.hero-trust li {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  white-space: nowrap;
}
@media (max-width: 1100px) {
  .hero-trust { flex-wrap: wrap; width: auto; max-width: 100%; }
}
.hero-trust svg { width: 18px; height: 18px; color: var(--sage-500); flex-shrink: 0; }

/* Hero visual */
.hero-visual { position: relative; }
.hero-frame { position: relative; }
.hero-frame img { width: 100%; height: auto; }
.hero-mockup { display: none; }
.hero-mockup--light { display: block; }
:root[data-theme="dark"] .hero-mockup--light { display: none; }
:root[data-theme="dark"] .hero-mockup--dark { display: block; }
.hero-float {
  position: absolute;
  max-width: 230px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-3) var(--sp-4);
  display: flex; align-items: center; gap: var(--sp-3);
}
.hero-float .ic {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--blue-50); color: var(--blue-600);
}
.hero-float .ic svg { width: 20px; height: 20px; }
.hero-float .n { display: block; font-size: var(--text-base); font-weight: 800; color: var(--text-primary); line-height: 1.15; }
.hero-float .l { display: block; font-size: var(--text-xs); color: var(--text-muted); line-height: 1.25; margin-top: 2px; }
.hero-float.one { top: -14px; left: -30px; }
.hero-float.two { bottom: -10px; right: -30px; }

/* ---------- Stats band ---------- */
.stats {
  background: var(--bg-surface);
  border-block: 1px solid var(--border-subtle);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6);
}
.stat { text-align: center; padding: var(--sp-4) var(--sp-2); }
.stat .num {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  color: var(--blue-700);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat .num .u { color: var(--sage-500); }
.stat .lbl { margin-top: var(--sp-2); font-size: var(--text-sm); color: var(--text-secondary); font-weight: 500; }

/* ---------- Card grid (sistemas) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--sage-500));
  opacity: 0;
  transition: opacity var(--t-base);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
}
.card:hover::before { opacity: 1; }
.card-ic {
  width: 52px; height: 52px;
  border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: var(--blue-50);
  color: var(--blue-600);
  border: 1px solid var(--blue-100);
  margin-bottom: var(--sp-5);
  transition: background var(--t-base), color var(--t-base), transform var(--t-base);
}
.card-ic svg { width: 26px; height: 26px; }
.card:hover .card-ic { background: var(--blue-600); color: #fff; transform: scale(1.05); }
.card h3 { font-size: var(--text-md); margin-bottom: var(--sp-2); }
.card-title { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-2); }
.card-title h3 { margin-bottom: 0; }
.card-title .card-int { margin-top: 0; align-self: center; }
.card p { font-size: var(--text-base); color: var(--text-secondary); line-height: 1.6; }
.card .card-link {
  margin-top: auto;
  padding-top: var(--sp-5);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-sm); font-weight: 700; color: var(--blue-600);
  transition: gap var(--t-base), color var(--t-base);
}
/* Chip de integracion / dato dentro de una card */
.card-int {
  align-self: flex-start;
  margin-top: var(--sp-3);
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-xs); font-weight: 700; letter-spacing: .02em;
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  padding: 5px 11px;
  border-radius: var(--r-full);
}
.card-int svg { width: 14px; height: 14px; }
.card-int.hub { color: var(--sage-600); background: var(--sage-100); border-color: var(--sage-200); }
.card .card-link svg { width: 15px; height: 15px; transition: transform var(--t-base); }
.card:hover .card-link { color: var(--blue-700); }
.card:hover .card-link svg { transform: translateX(3px); }
.card.soon { opacity: .72; }
.card .tag {
  position: absolute; top: var(--sp-5); right: var(--sp-5);
  font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--stone-500); background: var(--stone-100);
  padding: 3px 9px; border-radius: var(--r-full);
}
/* Acciones de la card (Conocé más + Ingresar) */
.card-actions { margin-top: auto; padding-top: var(--sp-5); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.card-actions .card-link { margin-top: 0; padding-top: 0; }
.card-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: inherit; font-size: var(--text-sm); font-weight: 700;
  color: var(--text-secondary); background: none; border: none; padding: 0;
  cursor: pointer; transition: color var(--t-base);
}
.card-more:hover { color: var(--sa-primary); }
.card-more svg { width: 15px; height: 15px; }

/* ---------- Modal de sistema (pop-up de venta) ---------- */
.sys-modal { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: var(--sp-5); }
.sys-modal[hidden] { display: none; }
.sys-modal-backdrop { position: absolute; inset: 0; background: rgba(10, 14, 22, .66); backdrop-filter: blur(3px); }
.sys-modal-dialog {
  position: relative; width: 100%; max-width: 660px; max-height: 90vh; overflow-y: auto;
  background: var(--bg-surface); border: 1px solid var(--border-light);
  border-radius: var(--r-xl); box-shadow: var(--shadow-xl); padding: var(--sp-8);
  animation: sysIn .22s cubic-bezier(.2,.7,.2,1);
}
@keyframes sysIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.sys-modal-x {
  position: absolute; top: 16px; right: 16px; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: var(--r-md);
  background: var(--bg-raised); border: 1px solid var(--border-light);
  color: var(--text-secondary); cursor: pointer;
}
.sys-modal-x:hover { color: var(--text-primary); border-color: var(--border-strong); }
.sys-modal-x svg { width: 18px; height: 18px; }
.sys-modal-head { display: flex; gap: var(--sp-4); align-items: flex-start; padding-right: 40px; }
.sys-modal-ic {
  flex-shrink: 0; width: 54px; height: 54px; border-radius: var(--r-lg);
  display: grid; place-items: center; background: var(--blue-600); color: #fff;
}
.sys-modal-ic svg { width: 28px; height: 28px; }
.sys-modal-eyebrow { display: inline-block; font-size: var(--text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sage-600); background: var(--sage-100); border: 1px solid var(--sage-200); padding: 3px 10px; border-radius: var(--r-full); margin-bottom: 8px; }
.sys-modal-head h2 { font-size: var(--text-2xl); color: var(--text-primary); margin: 0; }
.sys-modal-tagline { font-size: var(--text-base); color: var(--text-secondary); margin: 4px 0 0; }
.sys-modal-body { margin-top: var(--sp-6); }
.sys-lead { font-size: var(--text-md); color: var(--text-secondary); line-height: 1.6; margin: 0 0 var(--sp-6); }
.sys-modal-body h3 { font-size: var(--text-base); text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin: var(--sp-6) 0 var(--sp-3); font-weight: 700; }
.sys-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.sys-list li { display: flex; gap: 12px; font-size: var(--text-base); color: var(--text-secondary); line-height: 1.55; }
.sys-list li b { color: var(--text-primary); font-weight: 600; }
.sys-list .li-ic { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; color: var(--sa-primary); }
.sys-list.bens .li-ic { color: var(--sage-500); }
.sys-list .li-ic svg { width: 22px; height: 22px; }
.sys-modal-foot { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); padding-top: var(--sp-6); border-top: 1px solid var(--border-subtle); }
@media (max-width: 560px) { .sys-modal-dialog { padding: var(--sp-6); } .sys-modal-foot .btn { flex: 1; } }

/* ---------- Nosotros ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.about-media {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 5 / 4;
}
.about-media img { width: 100%; height: 100%; object-fit: cover; }
.about-points { margin-top: var(--sp-6); display: grid; gap: var(--sp-4); }
.about-points li { display: flex; gap: var(--sp-3); }
.about-points .chk {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--sage-100); color: var(--sage-600);
  display: grid; place-items: center; margin-top: 2px;
}
.about-points .chk svg { width: 15px; height: 15px; }
.about-points b { color: var(--text-primary); }

/* ---------- Feature row (por que elegirnos) ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-6) var(--sp-5);
}
.feature { padding: var(--sp-2); text-align: center; }
.feature-ic {
  width: 48px; height: 48px; border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  color: var(--blue-600); box-shadow: var(--shadow-xs);
  margin: 0 auto var(--sp-4);
}
.feature p { max-width: 32ch; margin-inline: auto; }
.feature-ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: var(--text-base); margin-bottom: var(--sp-2); }
.feature p { font-size: var(--text-base); color: var(--text-secondary); }

/* ---------- Servicios ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
.svc {
  display: flex; gap: var(--sp-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--sp-6);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-200); }
.svc-ic {
  flex-shrink: 0; width: 50px; height: 50px; border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: var(--sage-100); color: var(--sage-600);
}
.svc-ic svg { width: 26px; height: 26px; }
.svc h3 { font-size: var(--text-md); margin-bottom: var(--sp-2); }
.svc p { font-size: var(--text-base); }
.svc-banner {
  margin-top: var(--sp-5);
  display: flex; align-items: center; gap: var(--sp-5);
  padding: var(--sp-8) var(--sp-8);
  border-radius: var(--r-xl);
  border: 1px solid var(--blue-200);
  background: linear-gradient(120deg, var(--blue-50), var(--bg-surface) 60%);
}
#servicios { padding-bottom: clamp(28px, 4vw, 48px); }
#servicios + .section { padding-top: clamp(28px, 4vw, 48px); }
.svc-banner-ic {
  flex-shrink: 0;
  width: 52px; height: 52px; border-radius: var(--r-lg);
  display: grid; place-items: center;
  background: var(--blue-100); color: var(--blue-600);
}
.svc-banner-ic svg { width: 26px; height: 26px; }
.svc-banner-txt { flex: 1; }
.svc-banner-txt h3 { font-size: var(--text-md); margin-bottom: 2px; }
.svc-banner-txt p { font-size: var(--text-base); color: var(--text-secondary); }
.svc-banner .btn { flex-shrink: 0; }
@media (max-width: 700px) {
  .svc-banner { flex-direction: column; text-align: center; }
}
:root[data-theme="dark"] .svc-banner {
  border-color: var(--border-light);
  background: linear-gradient(120deg, var(--bg-overlay), var(--bg-surface) 60%);
}
:root[data-theme="dark"] .svc-banner-ic { background: var(--bg-overlay); }

/* ---------- CTA band ---------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  color: #fff;
  background:
    radial-gradient(80% 120% at 15% 0%, rgba(110,158,110,.35), transparent 60%),
    linear-gradient(135deg, var(--blue-700), var(--blue-900));
  box-shadow: var(--shadow-xl);
}
.cta::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(70% 70% at 80% 20%, #000, transparent);
  mask-image: radial-gradient(70% 70% at 80% 20%, #000, transparent);
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { color: #fff; font-size: clamp(26px, 4vw, 40px); font-weight: 800; }
.cta p { color: rgba(255,255,255,.82); margin-top: var(--sp-4); font-size: var(--text-md); max-width: 46ch; margin-inline: auto; }
.cta-actions { margin-top: var(--sp-8); display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center; }

/* ---------- Formulario dentro del CTA ---------- */
.cta-form { max-width: 560px; margin: var(--sp-6) auto 0; text-align: left; }
.cta-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.cta-form .field { margin-bottom: var(--sp-3); }
.cta-form label { display: block; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); margin-bottom: 6px; }
.cta-form label .req { color: #ffd27a; }
.cta-form input, .cta-form textarea {
  width: 100%; padding: 12px 14px; font-family: inherit; font-size: 15px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--r-lg); color: #fff; outline: none;
  transition: border-color .15s, background .15s;
}
.cta-form input::placeholder, .cta-form textarea::placeholder { color: rgba(255,255,255,.55); }
.cta-form input:focus, .cta-form textarea:focus { border-color: rgba(255,255,255,.65); background: rgba(255,255,255,.18); }
.cta-form textarea { resize: vertical; min-height: 96px; }
.cta-form .err { display: none; color: #ffd2d2; font-size: 12.5px; margin-top: 6px; font-weight: 500; }
.cta-form .field.invalid input, .cta-form .field.invalid textarea { border-color: #ff9b9b; background: rgba(255,110,110,.14); }
.cta-form .field.invalid .err { display: block; }
.cta-form .hp { position: absolute; left: -9999px; opacity: 0; }
.form-msg { display: none; margin-top: var(--sp-4); padding: 12px 16px; border-radius: var(--r-lg); font-weight: 600; font-size: 14px; }
.form-msg.ok { display: block; background: rgba(46,204,113,.20); border: 1px solid rgba(46,204,113,.55); color: #e0f8ea; }
.form-msg.bad { display: block; background: rgba(255,110,110,.18); border: 1px solid rgba(255,110,110,.5); color: #ffe0e0; }
.cta-form .actions { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); flex-wrap: wrap; }
.btn-wa { background: #25D366; color: #fff; border: 1px solid #25D366; }
.btn-wa:hover { background: #1EB758; border-color: #1EB758; color: #fff; }
.cta-form .sep { color: rgba(255,255,255,.6); font-size: 13px; }
@media (max-width: 520px) { .cta-form .row { grid-template-columns: 1fr; } }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
.contact-card {
  text-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-5);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-200); }
.contact-card .ic {
  width: 54px; height: 54px; border-radius: var(--r-full);
  display: grid; place-items: center; margin: 0 auto var(--sp-4);
  background: var(--blue-50); color: var(--blue-600); font-size: 22px;
}
.contact-card .ic svg { width: 24px; height: 24px; }
.contact-card .k { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); font-weight: 700; }
.contact-card .v { margin-top: 6px; font-size: var(--text-base); font-weight: 600; color: var(--text-primary); word-break: break-word; }
.contact-card a.v:hover { color: var(--blue-700); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue-900);
  color: rgba(255,255,255,.7);
  padding-top: clamp(48px, 7vw, 80px);
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-10);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-brand img { height: 40px; width: auto; margin-bottom: var(--sp-5); }
.footer-brand p { max-width: 34ch; font-size: var(--text-base); color: rgba(255,255,255,.6); }
.footer-col h4 { color: #fff; font-size: var(--text-sm); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--sp-4); }
.footer-col a { display: block; padding: 5px 0; font-size: var(--text-base); color: rgba(255,255,255,.7); transition: color var(--t-fast); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  align-items: center; justify-content: space-between;
  padding-block: var(--sp-6);
  font-size: var(--text-sm); color: rgba(255,255,255,.55);
}
.footer-social { display: flex; gap: var(--sp-2); }
.footer-social a {
  width: 40px; height: 40px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; font-size: 17px;
  transition: background var(--t-base), transform var(--t-base);
}
.footer-social a:hover { background: var(--blue-600); transform: translateY(-2px); }

/* ---------- Floating WhatsApp + back-to-top ---------- */
.fab-wa {
  position: fixed; right: 20px; bottom: 22px; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #25d366; color: #fff; font-size: 28px;
  box-shadow: 0 8px 20px rgba(37,211,102,.4);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.fab-wa:hover { transform: scale(1.06); box-shadow: 0 10px 26px rgba(37,211,102,.5); }
.to-top {
  position: fixed; right: 22px; bottom: 88px; z-index: 899;
  width: 44px; height: 44px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--bg-surface); color: var(--blue-600);
  border: 1px solid var(--border-light); box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity var(--t-base), transform var(--t-base), visibility var(--t-base);
}
.to-top svg { width: 20px; height: 20px; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { border-color: var(--blue-400); color: var(--blue-700); }

/* ---------- Nuestra historia (timeline) ---------- */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 10px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--blue-400), var(--sage-400));
  opacity: .5;
}
.tl-item {
  position: relative;
  padding-left: 48px;
  padding-bottom: var(--sp-10);
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 1px; top: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--blue-500);
  box-shadow: 0 0 0 4px var(--bg-base);
}
.tl-item.now::before { border-color: var(--sage-500); background: var(--sage-500); }
.tl-year {
  display: inline-block;
  font-size: var(--text-sm); font-weight: 800;
  color: var(--blue-600); letter-spacing: .04em;
}
.tl-item.now .tl-year { color: var(--sage-600); }
.tl-item h3 { font-size: var(--text-lg); margin: 4px 0 var(--sp-2); }
.tl-item p { color: var(--text-secondary); font-size: var(--text-base); max-width: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--r-full);
  font-size: var(--text-sm); font-weight: 600; color: var(--text-secondary);
}
.chip svg { width: 14px; height: 14px; color: var(--text-muted); }
.chip.star {
  border-color: var(--blue-200); background: var(--blue-50); color: var(--blue-700);
}
.chip.star svg { color: var(--blue-500); }

/* Cinta de chips que se desliza sola (sistemas de gestion) */
.chip-marquee {
  margin-top: var(--sp-4);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.chip-track {
  display: flex;
  gap: var(--sp-2);
  width: max-content;
  animation: chip-scroll 45s linear infinite;
}
.chip-marquee:hover .chip-track { animation-play-state: paused; }
.chip-track .chip { flex: 0 0 auto; }
@keyframes chip-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .chip-track { animation: none; flex-wrap: wrap; width: auto; }
  .chip-marquee { -webkit-mask-image: none; mask-image: none; }
}

/* Lista de sistemas legacy (nombre + descripcion) */
.legacy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4) var(--sp-6);
  margin-top: var(--sp-5);
}
.legacy-item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.legacy-item .li-ic {
  flex-shrink: 0;
  width: 36px; height: 36px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  color: var(--blue-500);
}
.legacy-item .li-ic svg { width: 19px; height: 19px; }
.legacy-item .li-name { font-size: var(--text-base); font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.legacy-item .li-desc { font-size: var(--text-sm); color: var(--text-muted); line-height: 1.4; margin-top: 3px; }
.legacy-item.span2 { grid-column: 1 / -1; }
.legacy-item.hl .li-ic { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-600); }
.legacy-item.hl .li-name { color: var(--blue-700); }
@media (max-width: 720px) { .legacy-grid { grid-template-columns: 1fr; } }

/* ---------- Documentos ---------- */
.doc-hero {
  position: relative;
  padding-top: calc(var(--navbar-height) + clamp(32px, 5vw, 64px));
  padding-bottom: clamp(28px, 4vw, 48px);
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}
.doc-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(79,114,176,.14), transparent 70%),
    linear-gradient(180deg, #fff, var(--bg-base));
}
.doc-hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; margin-top: var(--sp-4); }
.doc-hero p { margin: var(--sp-4) auto 0; max-width: 60ch; color: var(--text-secondary); font-size: var(--text-md); }
.doc-hero .eyebrow { justify-content: center; }
.doc-hero .yt-link {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-6);
  font-weight: 700; color: var(--red-500);
}
.doc-hero .yt-link:hover { color: var(--red-600); }
.doc-hero .yt-link i { font-size: 20px; }

/* Documentos — índice editorial (sin cajas) */
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6) var(--sp-12); align-items: start; }
.doc-card { padding: var(--sp-1) 0 var(--sp-3); }
.doc-head {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-2);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--border-light);
}
.doc-ic {
  flex-shrink: 0; display: grid; place-items: center;
  color: var(--sa-primary);
}
.doc-ic svg { width: 22px; height: 22px; }
.doc-head h3 { font-size: var(--text-md); color: var(--text-primary); }
.doc-list { display: grid; gap: 1px; }
.doc-link {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 9px var(--sp-2);
  border-radius: var(--r-md);
  color: var(--text-secondary); font-size: var(--text-base); font-weight: 500;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}
.doc-link:hover { background: var(--bg-raised); color: var(--text-primary); }
.doc-link .t-ic {
  flex-shrink: 0; display: grid; place-items: center;
  color: var(--text-muted);
}
.doc-link .t-ic svg { width: 18px; height: 18px; }
.doc-link.pdf .t-ic   { color: var(--red-500); }
.doc-link.html .t-ic  { color: var(--text-muted); }
.doc-link.video .t-ic { color: #e0555a; }
.doc-link.wip { color: var(--text-muted); cursor: default; font-style: italic; }
.doc-link.wip:hover { background: transparent; color: var(--text-muted); }
.doc-link.wip .t-ic { color: var(--yellow-500); }
.doc-link .arr { margin-left: auto; opacity: 0; transform: translateX(-4px); transition: opacity var(--t-fast), transform var(--t-fast); }
.doc-link .arr svg { width: 16px; height: 16px; }
.doc-link:hover .arr { opacity: 1; transform: none; }
.doc-link.wip .arr { display: none; }

@media (max-width: 760px) { .doc-grid { grid-template-columns: 1fr; gap: var(--sp-5); } }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.card.soon.reveal:not(.in) { opacity: 0; }
.card.soon.reveal.in { opacity: .72; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .card.soon.reveal:not(.in) { opacity: .72; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 520px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { order: -1; max-width: 560px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-8) var(--sp-4); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; left: 0; right: 0; top: var(--navbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-3);
    gap: 2px;
  }
  .nav.open .nav-links a { padding: 12px 14px; }
  .hero-float { max-width: 200px; padding: 10px 12px; }
  .hero-float.one { left: 6px; top: 6px; }
  .hero-float.two { right: 6px; bottom: 6px; }
  .svc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .container { padding-inline: var(--sp-5); }
  .grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
}

/* ---------- Toggle de tema (claro / oscuro) ---------- */
.theme-toggle {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: grid; place-items: center;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.theme-toggle:hover { color: var(--blue-600); border-color: var(--blue-400); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }

/* ============================================================
   MODO OSCURO - Design System v3 "Slate & Mist" sobre los mismos tokens
   ============================================================ */
:root[data-theme="dark"] {
  --bg-base:       #161B22;
  --bg-surface:    #1C2128;
  --bg-raised:     #22272E;
  --bg-overlay:    #2D333B;
  --bg-hover:      #373E47;

  --border-subtle: #2D333B;
  --border-light:  #373E47;
  --border-strong: #444C56;

  --blue-50:  #1B2A3D;
  --blue-100: #21344A;
  --blue-200: #2B4C70;
  --blue-400: #6E9EBF;
  --blue-500: #5197CF;
  --blue-600: #4A8AC4;
  --blue-700: #6BA6DB;
  --blue-900: #0F1826;

  --sage-100: #18271B;
  --sage-200: #2C4531;
  --sage-400: #7FB37F;
  --sage-500: #7BB07B;
  --sage-600: #A6D0A6;

  --stone-100: #2A2620;
  --stone-200: #3A342C;
  --stone-400: #8A8070;
  --stone-500: #B0A390;
  --stone-600: #CDBFA9;

  --green-100: #12251A; --green-400: #4EBE72; --green-500: #3A9E5C; --green-600: #2E7E48;
  --red-100:   #2D1414; --red-400:   #E07A7A; --red-500:   #C85C5C; --red-600:   #A84848;
  --yellow-100:#2A2308; --yellow-400:#D8B24A; --yellow-500:#B8922E; --yellow-600:#98761E;

  --text-primary:   #E6EDF3;
  --text-secondary: #9AA4AF;
  --text-muted:     #6B7480;
  --text-disabled:  #3A424C;
  --text-inverse:   #161B22;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .30);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, .35), 0 1px 2px rgba(0, 0, 0, .25);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .42);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, .52);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, .58);
  --shadow-focus-blue: 0 0 0 3px rgba(81, 151, 207, .30);

  color-scheme: dark;
}

/* Ajustes de piezas con valores claros hardcodeados */
:root[data-theme="dark"] .site-header { background: rgba(22, 27, 34, .82); }
:root[data-theme="dark"] .hero::before {
  background:
    radial-gradient(60% 50% at 82% 8%, rgba(74, 138, 196, .20), transparent 70%),
    radial-gradient(48% 45% at 8% 30%, rgba(123, 176, 123, .12), transparent 70%),
    linear-gradient(180deg, #1C2128, var(--bg-base));
}
:root[data-theme="dark"] .hero::after {
  background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px);
}
:root[data-theme="dark"] .hero-float { background: rgba(28, 33, 40, .82); }
:root[data-theme="dark"] .doc-hero::before {
  background:
    radial-gradient(50% 60% at 50% 0%, rgba(74, 138, 196, .18), transparent 70%),
    linear-gradient(180deg, #1C2128, var(--bg-base));
}
:root[data-theme="dark"] .contact-card .ic { background: var(--bg-overlay) !important; }
:root[data-theme="dark"] .btn-primary { color: #fff; }
