:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --surface: #ffffff;
  --text: #1f2937;
  --text-soft: #4b5563;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #38bdf8;
  --border: #e5e7eb;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: #f8fafc;
  animation: pageFadeIn 0.6s ease-out both;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

header {
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.9), rgba(17, 24, 39, 0.85)),
    url("../imagenes/hero-bg.jpg") center / cover no-repeat;
  color: #fff;
  padding: 1rem 0 5rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.2px;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: #dbeafe;
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #fff;
}

.hero {
  margin-top: 3.5rem;
  display: grid;
  gap: 1.5rem;
  align-items: start;
  animation: heroFadeUp 0.9s ease-out 0.15s both;
}

.badge {
  display: inline-block;
  font-size: 0.85rem;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(147, 197, 253, 0.35);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.2;
  margin-bottom: 0.9rem;
}

.hero p {
  color: #d1d5db;
  max-width: 800px;
  margin-bottom: 1.4rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.72rem 1rem;
  font-weight: 600;
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  border-color: rgba(219, 234, 254, 0.4);
  color: #dbeafe;
}

.btn-outline:hover {
  background: rgba(219, 234, 254, 0.08);
  color: #fff;
}

section {
  padding: 4rem 0;
}

#servicios {
  background:
    linear-gradient(0deg, rgba(248, 250, 252, 0.95), rgba(248, 250, 252, 0.95)),
    url("../imagenes/servicios-bg.jpg") center / cover no-repeat;
}

#soluciones {
  background: #f8fafc;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 1rem;
  color: #111827;
}

.section-intro {
  color: var(--text-soft);
  max-width: 900px;
  margin-bottom: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.55rem;
  color: #111827;
}

.card p {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.list-check {
  list-style: none;
  margin-top: 0.5rem;
}

.list-check li {
  position: relative;
  color: var(--text-soft);
  padding-left: 1.3rem;
  margin-bottom: 0.55rem;
}

.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.highlight {
  border-left: 4px solid var(--accent);
  background: #f0f9ff;
  padding: 1rem;
  border-radius: 8px;
  color: #0f172a;
  margin-top: 1rem;
}

#nosotros {
  background: #f8fafc;
}

.section-dark {
  background: #eaf2ff;
}

.contact {
  background:
    linear-gradient(120deg, rgba(49, 114, 245, 0.92), rgba(11, 18, 32, 0.92)),
    url("../imagenes/contacto-bg.jpg") center / cover no-repeat;
  color: #e5e7eb;
  border-radius: 16px;
  padding: 2rem;
  display: grid;
  gap: 0.9rem;
}

.contact a {
  color: #93c5fd;
  text-decoration: none;
}

.contact a:hover {
  color: #bfdbfe;
}

footer {
  padding: 2rem 0 2.5rem;
  color: #6b7280;
  text-align: center;
  font-size: 0.9rem;
}

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: #25d366;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 24px rgba(37, 211, 102, 0.35);
  z-index: 999;
  animation: whatsappPulse 1.9s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.whatsapp-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #0f172a;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.35);
  animation: tooltipNudge 1.9s ease-in-out infinite;
}

.whatsapp-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #0f172a;
}

.whatsapp-float:hover {
  transform: scale(1.06);
  box-shadow: 0 16px 28px rgba(37, 211, 102, 0.45);
}

@keyframes whatsappPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 12px 24px rgba(37, 211, 102, 0.35);
  }
  40% {
    transform: scale(1.05);
    box-shadow: 0 14px 26px rgba(37, 211, 102, 0.5);
  }
  60% {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(37, 211, 102, 0.4);
  }
}

@keyframes tooltipNudge {
  0%,
  100% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(-3px);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .grid-3,
  .split {
    grid-template-columns: 1fr;
  }

  .hero {
    margin-top: 2.5rem;
  }

  .whatsapp-float {
    right: 14px;
    bottom: 14px;
    width: 58px;
    height: 58px;
  }

  .whatsapp-float img {
    width: 50px;
    height: 50px;
  }

  .whatsapp-tooltip {
    font-size: 0.76rem;
    padding: 0.45rem 0.6rem;
    right: calc(100% + 8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal.in-view {
    opacity: 1;
    transform: none;
  }

  .whatsapp-float,
  .whatsapp-tooltip {
    animation: none !important;
  }
}
