/* ═══════════════════════════════════════════════════════════════
   +Digital MX — Styles
   Mobile-first, pure CSS, no frameworks
═══════════════════════════════════════════════════════════════ */

/* ── Reset & base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:      #0f172a;
  --navy-800:  #1e293b;
  --navy-700:  #334155;
  --blue:      #3b82f6;
  --blue-600:  #2563eb;
  --blue-400:  #60a5fa;
  --blue-100:  #dbeafe;
  --white:     #ffffff;
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-400:  #94a3b8;
  --gray-600:  #475569;
  --green:     #25d366;
  --green-600: #1da851;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 12px 40px rgba(15,23,42,.16);
  --transition: .2s ease;
  --max-w: 1120px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Utility ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: 5rem;
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: .9375rem;
  border-radius: var(--radius);
  padding: .6875rem 1.375rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition),
              box-shadow var(--transition);
  white-space: nowrap;
  border: 2px solid transparent;
  text-align: center;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-lg { font-size: 1rem; padding: .875rem 1.75rem; }

.btn-primary {
  background: var(--blue);
  color: var(--white);
}
.btn-primary:hover { background: var(--blue-600); box-shadow: 0 8px 24px rgba(59,130,246,.35); }

.btn-whatsapp {
  background: var(--green);
  color: var(--white);
}
.btn-whatsapp:hover { background: var(--green-600); box-shadow: 0 8px 24px rgba(37,211,102,.35); }

.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.3);
}
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.4);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* ── Section headers ────────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-100);
  padding: .25rem .75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section-dark .section-label {
  background: rgba(59,130,246,.2);
  color: var(--blue-400);
}

.section-title {
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: .75rem;
}

.section-sub {
  font-size: 1.0625rem;
  color: var(--gray-600);
  line-height: 1.65;
}

.section-dark .section-sub { color: var(--gray-400); }

/* ══════════════════════════════════════════════════════════════
   NAV
══════════════════════════════════════════════════════════════ */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,23,42,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 4rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -.04em;
  flex-shrink: 0;
}

.logo span { color: var(--blue); }

.nav-links {
  display: none;
  list-style: none;
  gap: 1.75rem;
  margin-left: auto;
}

.nav-links a {
  font-size: .9375rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--white); }

.nav-cta { margin-left: auto; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; }
  .nav-cta { margin-left: 0; }
}

/* ══════════════════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--white);
  overflow: hidden;
  padding-block: 5.5rem 6rem;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(59,130,246,.18) 0%, transparent 70%);
  pointer-events: none;
}

/* hero-grid: stacked on mobile, 2-col on desktop */
.hero-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-img {
  max-height: 450px;
  width: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

@media (min-width: 900px) {
  .hero-grid {
    flex-direction: row;
    align-items: center;
    gap: 3rem;
  }

  .hero-inner {
    flex: 0 0 55%;
  }

  .hero-image {
    flex: 0 0 45%;
    justify-content: flex-end;
  }

  .hero-img {
    max-height: 450px;
    width: auto;
    max-width: 100%;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--blue-400);
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
}

.highlight {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.125rem;
  color: rgba(255,255,255,.7);
  line-height: 1.7;
  max-width: 580px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .875rem;
  margin-bottom: 1.5rem;
}

.hero-trust {
  font-size: .875rem;
  color: rgba(255,255,255,.45);
}

/* ══════════════════════════════════════════════════════════════
   SERVICIOS — CARDS
══════════════════════════════════════════════════════════════ */
.cards {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px)  { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  background: var(--white);
  border: 1.5px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-featured {
  border-color: var(--blue);
  background: linear-gradient(160deg, #eff6ff 0%, var(--white) 60%);
}

.card-badge {
  position: absolute;
  top: -1px;
  right: 1.5rem;
  background: var(--blue);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .75rem;
  border-radius: 0 0 var(--radius) var(--radius);
  letter-spacing: .03em;
}

.card-icon {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.card-title {
  font-size: 1.1875rem;
  font-weight: 700;
  margin-bottom: .625rem;
  color: var(--navy);
}

.card-desc {
  font-size: .9375rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.card-list li {
  font-size: .9rem;
  color: var(--navy-700);
  padding-left: 1.375rem;
  position: relative;
}

.card-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

/* ══════════════════════════════════════════════════════════════
   INDUSTRIAS
══════════════════════════════════════════════════════════════ */
.industries {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 480px)  { .industries { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .industries { grid-template-columns: repeat(4, 1fr); } }

.industry {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: background var(--transition), border-color var(--transition);
}

.industry:hover {
  background: rgba(59,130,246,.12);
  border-color: rgba(59,130,246,.4);
}

.industry-icon {
  font-size: 2.5rem;
  margin-bottom: .875rem;
  line-height: 1;
}

.industry h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: .5rem;
}

.industry p {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   PASOS
══════════════════════════════════════════════════════════════ */
.steps {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  max-width: 640px;
  margin-inline: auto;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.75rem 0;
}

.step-number {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-600) 100%);
  color: var(--white);
  font-size: .875rem;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: 0 4px 16px rgba(59,130,246,.4);
}

.step-content h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .375rem;
}

.step-content p {
  font-size: .9375rem;
  color: var(--gray-600);
  line-height: 1.65;
}

.step-connector {
  width: 2px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--blue), rgba(59,130,246,.2));
  margin-left: 1.4375rem;
}

/* ══════════════════════════════════════════════════════════════
   CTA FINAL
══════════════════════════════════════════════════════════════ */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-800) 100%);
  position: relative;
  overflow: hidden;
  color: var(--white);
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 120%, rgba(59,130,246,.22) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
}

.cta-title {
  font-size: clamp(1.625rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.cta-sub {
  font-size: 1.0625rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 2rem;
  line-height: 1.65;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════════ */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,.07);
  color: rgba(255,255,255,.6);
  padding-block: 2.5rem 1.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-brand .logo {
  margin-bottom: .5rem;
}

.footer-brand p {
  font-size: .875rem;
  max-width: 280px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}

.footer-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}

.footer-nav a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 1.25rem;
  font-size: .8125rem;
  color: rgba(255,255,255,.35);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE TWEAKS
══════════════════════════════════════════════════════════════ */
@media (max-width: 479px) {
  .hero-actions { flex-direction: column; }
  .cta-actions  { flex-direction: column; align-items: center; }
  .btn-lg       { width: 100%; justify-content: center; }
}

@media (min-width: 640px) {
  .steps {
    flex-direction: column;
  }
}

/* ── Focus visible (accesibilidad) ──────────────────────────── */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}
