/* =========================================================================
   MICROJACK · Sistema de diseño  (paleta AZUL)
   Mobile-first. Fuentes: Urbanist (títulos) + Montserrat (texto).
   ========================================================================= */

:root {
  /* --- Marca (azules + navy) --- */
  --navy-900: #0a1a33;
  --navy-800: #0f2444;
  --navy-700: #173a63;
  --blue:     #1c6dd0;   /* azul primario */
  --blue-600: #1559b8;   /* azul oscuro */
  --blue-300: #6db4ff;   /* azul claro */
  --sky:      #38bdf8;   /* acento cielo */

  /* --- Texto / superficies --- */
  --ink:      #142033;
  --muted:    #5b6b82;
  --line:     #e4e9f2;
  --bg:       #ffffff;
  --bg-soft:  #f3f6fb;
  --bg-lav:   #eef4fc;

  /* --- Degradados --- */
  --grad:      linear-gradient(135deg, #1c6dd0 0%, #2b8ae6 55%, #38bdf8 100%);
  --grad-text: linear-gradient(120deg, #1c6dd0, #38bdf8);
  --grad-soft: linear-gradient(135deg, rgba(28,109,208,.10), rgba(56,189,248,.12));

  /* --- WhatsApp --- */
  --wa: #25d366;
  --wa-dark: #1da851;

  /* --- Sombras --- */
  --shadow-sm: 0 1px 2px rgba(10,26,51,.06), 0 2px 8px rgba(10,26,51,.05);
  --shadow:    0 8px 24px rgba(10,26,51,.10);
  --shadow-lg: 0 24px 60px rgba(10,26,51,.18);
  --shadow-blue: 0 14px 30px rgba(28,109,208,.35);

  /* --- Radios / medidas --- */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --pill: 999px;
  --container: 1180px;

  /* --- Tipografías --- */
  --font-head: "Urbanist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --header-h: 76px;
}

/* ====================== Reset & base ====================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: clamp(15px, 0.5vw + 14px, 17px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

::selection { background: rgba(28,109,208,.16); }

/* ====================== Tipografía ====================== */
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; color: var(--navy-900); }
h1 { font-size: clamp(2.1rem, 4.6vw + 1rem, 3.9rem); }
h2 { font-size: clamp(1.7rem, 2.6vw + 1rem, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1vw + .9rem, 1.4rem); }
p  { color: var(--muted); }

.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ====================== Layout ====================== */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(18px, 4vw, 32px); }
.section { padding-block: clamp(56px, 8vw, 110px); }
.section--soft { background: var(--bg-soft); }
.section--lav  { background: var(--bg-lav); }

.section-head { max-width: 680px; margin: 0 auto clamp(34px, 5vw, 56px); text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: .8rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--blue);
  background: var(--grad-soft);
  padding: 7px 14px; border-radius: var(--pill);
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); }
.section-head p { margin-top: 14px; font-size: 1.05rem; }

/* ====================== Botones ====================== */
.btn {
  --pad-y: 13px; --pad-x: 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem;
  padding: var(--pad-y) var(--pad-x); border-radius: var(--pill);
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(28,109,208,.45); }

.btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.30); }
.btn-ghost:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); }

.btn-outline { background: #fff; color: var(--navy-900); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 12px 26px rgba(37,211,102,.35); }
.btn-wa:hover { background: var(--wa-dark); transform: translateY(-2px); }

.btn-lg { --pad-y: 16px; --pad-x: 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ====================== Header / Nav ====================== */
.header { position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h); display: flex; align-items: center;
  transition: background .3s ease, box-shadow .3s ease, height .3s ease, backdrop-filter .3s ease; }
.header.is-scrolled { height: 64px; background: rgba(10,26,51,.85); backdrop-filter: saturate(160%) blur(14px); box-shadow: 0 6px 24px rgba(10,26,51,.30); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a { font-family: var(--font-head); font-weight: 600; font-size: .96rem; color: rgba(255,255,255,.85); padding: 9px 14px; border-radius: var(--pill); transition: color .15s ease, background .15s ease; }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.10); }
.header__cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: rgba(255,255,255,.10); position: relative; }
.nav-toggle span, .nav-toggle::before, .nav-toggle::after { content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px; background: #fff; border-radius: 2px; transform: translate(-50%,-50%); transition: transform .25s ease, opacity .2s ease; }
.nav-toggle::before { transform: translate(-50%, -7px); }
.nav-toggle::after  { transform: translate(-50%,  7px); }
.nav-toggle.open span { opacity: 0; }
.nav-toggle.open::before { transform: translate(-50%,-50%) rotate(45deg); }
.nav-toggle.open::after  { transform: translate(-50%,-50%) rotate(-45deg); }

/* ====================== Hero ====================== */
.hero { position: relative; padding-top: calc(var(--header-h) + clamp(40px, 7vw, 90px)); padding-bottom: clamp(60px, 9vw, 120px); background: var(--navy-900); color: #fff; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; display: block; }
.hero__glow { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 70% at 85% 8%, rgba(56,189,248,.20), transparent 60%),
    radial-gradient(55% 60% at 8% 92%, rgba(28,109,208,.26), transparent 60%); }
.hero .container { position: relative; z-index: 1; }
.hero__content { max-width: 760px; }
.hero h1 { color: #fff; }
.hero h1 .grad-text { background: linear-gradient(120deg,#9ecbff,#cdeeff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { margin-top: 18px; font-size: clamp(1.05rem, 1vw + .9rem, 1.3rem); color: rgba(255,255,255,.82); max-width: 620px; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }
.hero__trust { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 22px 34px; align-items: center; color: rgba(255,255,255,.72); font-size: .92rem; }
.hero__trust b { color: #fff; font-family: var(--font-head); }
.eyebrow--onDark { color: #fff; background: rgba(255,255,255,.10); }

/* ====================== Nuestro software ====================== */
.software { background: var(--navy-900); color: #fff; position: relative; overflow: hidden; }
.software .section-head h2 { color: #fff; }
.software .section-head p { color: rgba(255,255,255,.72); }
.sw-grid { display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: 1fr; }
.sw-card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid rgba(108,180,255,.18); border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 32px); position: relative;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.sw-card:hover { transform: translateY(-5px); border-color: rgba(108,180,255,.5); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.sw-card__icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: var(--shadow-blue); margin-bottom: 18px; }
.sw-card__icon svg { width: 28px; height: 28px; }
.sw-card h3 { color: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sw-card p { color: rgba(255,255,255,.76); margin-top: 10px; font-size: .96rem; }
.badge { font-family: var(--font-head); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: var(--pill); white-space: nowrap; }
.badge--live { background: rgba(37,211,102,.16); color: #6ff0a0; border: 1px solid rgba(37,211,102,.4); }
.badge--soon { background: rgba(108,180,255,.14); color: #9ecbff; border: 1px solid rgba(108,180,255,.35); }
.sw-list { display: grid; gap: 8px 16px; margin-top: 18px; grid-template-columns: 1fr; }
.sw-list li { display: flex; gap: 9px; align-items: flex-start; color: rgba(255,255,255,.82); font-size: .92rem; }
.sw-list svg { flex: 0 0 auto; width: 17px; height: 17px; color: var(--sky); margin-top: 2px; }
@media (min-width: 520px) { .sw-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 760px) { .sw-grid { grid-template-columns: repeat(2, 1fr); } }

/* ====================== Servicios (tarjetas con imagen) ====================== */
.svc-grid { display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: 1fr; }
.svc {
  position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 320px;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  box-shadow: var(--shadow); isolation: isolate; border: 1px solid rgba(255,255,255,.08);
}
.svc > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .55s ease; }
.svc::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,26,51,.12) 0%, rgba(10,26,51,.55) 45%, rgba(10,26,51,.93) 100%); }
.svc:hover > img { transform: scale(1.06); }
.svc__icon { position: absolute; top: 18px; left: 18px; width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; background: rgba(28,109,208,.92); color: #fff; box-shadow: var(--shadow-blue); z-index: 1; }
.svc__icon svg { width: 26px; height: 26px; }
.svc__body { padding: clamp(22px, 3vw, 30px); }
.svc h3 { color: #fff; font-size: clamp(1.2rem, 1.4vw + .9rem, 1.5rem); }
.svc p { color: rgba(255,255,255,.85); margin-top: 8px; font-size: .96rem; }
.svc__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-family: var(--font-head); font-weight: 700; color: #fff; font-size: .95rem; }
.svc__link svg { transition: transform .2s ease; }
.svc:hover .svc__link svg { transform: translateX(4px); }

/* ====================== Stats ====================== */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px,3vw,30px); text-align: center; }
.stat__num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2.1rem, 3.5vw, 3rem); line-height: 1; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { margin-top: 8px; color: var(--muted); font-weight: 600; font-size: .92rem; }

/* ====================== Proyectos / Clientes ====================== */
.clients { display: grid; grid-template-columns: 1fr; gap: clamp(14px, 2vw, 22px); }
.client { border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); background: #fff; aspect-ratio: 1 / 1; }
.client img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.client:hover img { transform: scale(1.06); }

/* ====================== Banda CTA ====================== */
.cta { position: relative; overflow: hidden; color: #fff; text-align: center; background: var(--navy-900); }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 120% at 50% 0%, rgba(56,189,248,.45), transparent 60%), var(--grad); opacity: .94; }
.cta .container { position: relative; z-index: 1; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.92); max-width: 620px; margin: 14px auto 0; }
.cta__actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ====================== Bloque "por qué" ====================== */
.feature { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; grid-template-columns: 1fr; }
.feature__media { position: relative; }
.feature__media img { border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; background: #fff; }
.check-list { display: grid; gap: 12px; margin-top: 22px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.check-list svg { flex: 0 0 auto; width: 22px; height: 22px; color: var(--blue); margin-top: 2px; }

/* ====================== Contacto ====================== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: clamp(22px, 3vw, 40px); align-items: start; }
.branch { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.branch h3 { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.branch h3 .pin { color: var(--sky); display: inline-flex; }
.contact-list { display: grid; gap: 12px; margin-top: 16px; }
.contact-list li { display: flex; gap: 12px; align-items: flex-start; font-size: .96rem; }
.contact-list svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--blue); margin-top: 3px; }
.contact-list a { color: var(--ink); font-weight: 600; }
.contact-list a:hover { color: var(--blue); }
.map-embed { margin-top: 18px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); line-height: 0; }
.map-embed iframe { width: 100%; height: 260px; border: 0; }

.form { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px,3vw,34px); box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--navy-900); }
.field input, .field textarea { width: 100%; font: inherit; color: var(--ink); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--bg-soft); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(28,109,208,.14); }
.field textarea { min-height: 130px; resize: vertical; }
.form__note { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm); font-size: .92rem; font-weight: 600; display: none; }
.form-status.ok { display: block; background: #e9f9ef; color: #157a3e; border: 1px solid #b9ebcb; }
.form-status.err { display: block; background: #fdecec; color: #b3261e; border: 1px solid #f5c2c0; }

/* ====================== Footer ====================== */
.footer { background: var(--navy-900); color: rgba(255,255,255,.72); padding-top: clamp(48px,6vw,72px); }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 34px; }
.footer__brand img { height: 32px; margin-bottom: 16px; }
.footer h4 { color: #fff; font-family: var(--font-head); font-size: 1rem; margin-bottom: 14px; }
.footer a { color: rgba(255,255,255,.72); transition: color .15s ease; }
.footer a:hover { color: #fff; }
.footer__links { display: grid; gap: 9px; }
.footer__social { display: flex; gap: 12px; margin-top: 18px; }
.footer__social a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.08); transition: background .2s ease, transform .2s ease; }
.footer__social a:hover { background: var(--grad); transform: translateY(-3px); }
.footer__social svg { width: 19px; height: 19px; }
.footer__bottom { margin-top: clamp(34px,5vw,52px); border-top: 1px solid rgba(255,255,255,.12); padding: 22px 0; font-size: .86rem; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: center; }

/* ====================== WhatsApp flotante ====================== */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); display: grid; place-items: center; color: #fff; box-shadow: 0 12px 30px rgba(37,211,102,.45); transition: transform .2s ease; animation: wa-pulse 2.4s infinite; }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; }
@keyframes wa-pulse { 0%{box-shadow:0 0 0 0 rgba(37,211,102,.5)} 70%{box-shadow:0 0 0 16px rgba(37,211,102,0)} 100%{box-shadow:0 0 0 0 rgba(37,211,102,0)} }

/* ====================== Animación reveal ====================== */
.reveal { animation: revealUp .7s ease both; }
.reveal[data-delay="1"]{ animation-delay:.1s } .reveal[data-delay="2"]{ animation-delay:.2s } .reveal[data-delay="3"]{ animation-delay:.3s } .reveal[data-delay="4"]{ animation-delay:.4s }
@keyframes revealUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* ====================== Responsive ====================== */
@media (min-width: 600px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } .clients { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .feature { grid-template-columns: 1fr 1fr; }
  .footer__grid { grid-template-columns: 1.6fr 1fr 1.2fr; }
}
@media (min-width: 980px) { .clients { grid-template-columns: repeat(3, 1fr); } }

/* Menú móvil */
@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .header__cta .btn-cotiza { display: none; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 4px; background: rgba(10,26,51,.97); backdrop-filter: blur(12px); padding: 16px clamp(18px,4vw,32px) 26px; transform: translateY(-130%); transition: transform .32s cubic-bezier(.4,0,.2,1); box-shadow: 0 20px 40px rgba(0,0,0,.4); max-height: calc(100vh - var(--header-h)); overflow: auto; }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 13px 16px; font-size: 1.05rem; }
  .nav .btn-wa { margin-top: 10px; }
}

/* ====================== Accesibilidad ====================== */
:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
