/* General */
:root {
  /* Base / variables principales */
  --color-bg: #f4f8ff;
  --color-bg-soft: #eef4ff;
  --color-surface: #ffffff;
  --color-border-soft: #dde7ff;
  --color-text: #0b1020;
  --color-text-soft: #5b647c;

  /* Acentos inspirados en la imagen del hero */
  --color-accent: #2f8de4;
  --color-accent-soft: #e1f0ff;
  --color-accent-strong: #1665c0;

  /* Neutros */
  --color-neutral-soft: #d5d9e5;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

.bg-light-subtle {
  background-color: var(--color-bg-soft);
}

.section-padding {
  padding: 5rem 0;
}

@media (max-width: 767.98px) {
  .section-padding {
    padding: 3.5rem 0;
  }
}

/* Separador sutil entre secciones */
.section-padding + .section-padding {
  position: relative;
}

.section-padding + .section-padding::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(80%, 900px);
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(47, 141, 228, 0),
    rgba(47, 141, 228, 0.35),
    rgba(47, 141, 228, 0)
  );
  opacity: 0.7;
}

.section-title {
  font-size: clamp(2rem, 2.4vw, 2.3rem);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-subtitle {
  max-width: 540px;
  margin: 0 auto;
  color: var(--color-text-soft);
}

/* Fondos específicos por sección para variedad visual */
#servicios.section-padding {
  /* Fondo claro, tipo tarjeta grande, con muy leve tinte azul */
  background: linear-gradient(
    to bottom,
    #f7f9ff 0%,
    #eef4ff 100%
  );
}

#proyectos.section-padding {
  /* Bloque ligeramente más azul, sin llegar a oscuro */
  background: linear-gradient(
    135deg,
    #e4f0ff 0%,
    #f7fbff 100%
  );
}

#sobre-nosotros.section-padding {
  /* Blanco casi puro, estilo landing SaaS */
  background: #ffffff;
}

.cta-section {
  /* Banda visual con degradado azul suave y claro */
  background: radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.18),
      transparent 55%
    ),
    linear-gradient(to right, #e3efff 0%, #f6f9ff 100%);
}

#contacto.section-padding {
  /* Pie limpio, casi blanco, con apenas tinte azul */
  background: linear-gradient(
    to bottom,
    #f6f9ff 0%,
    #ffffff 100%
  );
}

#modelo-de-trabajo.section-padding {
  background: linear-gradient(
    to bottom,
    #eef4ff 0%,
    #f7faff 100%
  );
}

/* Marquee */
.marquee-section {
  padding: 2.5rem 0;
  background: linear-gradient(
    to right,
    #eef4ff 0%,
    #f8fbff 50%,
    #eef4ff 100%
  );
}

.marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 32s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-inline: 0;
  flex-shrink: 0;
  min-width: 100%;
}

.marquee-item {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4b5563;
  opacity: 0.85;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Navbar */
.custom-navbar {
  padding: 1rem 0;
  transition: background-color 0.2s ease, box-shadow 0.2s ease,
    padding 0.2s ease;
  background-color: transparent;
  border-bottom: 1px solid transparent;
}

.custom-navbar.navbar-scrolled {
  background-color: rgba(248, 251, 255, 0.98);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.09);
  padding: 0.6rem 0;
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(186, 199, 234, 0.9);
}

.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f9fbff;
}

.brand-accent {
  color: var(--color-accent);
}

.navbar-nav .nav-link {
  font-size: 0.95rem;
  margin: 0 0.35rem;
  color: #e5efff;
  position: relative;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width 0.2s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 100%;
}

.navbar-nav .nav-link:hover {
  color: #ffffff;
}

.navbar-toggler {
  border-color: rgba(148, 163, 184, 0.6);
}

.navbar-toggler:focus {
  box-shadow: none;
}

.navbar-toggler-icon {
  filter: invert(0.9);
}

/* Menú móvil: fondo blanco y links visibles */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: #ffffff;
    padding: 1rem;
    margin: 0.5rem -1rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  }

  .navbar-collapse .nav-link {
    color: var(--color-text) !important;
  }

  .navbar-collapse .nav-link:hover {
    color: var(--color-accent) !important;
  }
}

/* Colores del navbar al hacer scroll */
.custom-navbar.navbar-scrolled .navbar-brand {
  color: var(--color-text);
}

.custom-navbar.navbar-scrolled .navbar-nav .nav-link {
  color: #4b5563;
}

.custom-navbar.navbar-scrolled .navbar-nav .nav-link:hover {
  color: #111827;
}

.btn-primary {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease, border-color 0.25s ease;
}

.btn-primary:hover {
  background-color: var(--color-accent-strong);
  border-color: var(--color-accent-strong);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.35);
}

.btn-outline-secondary {
  border-color: var(--color-border-soft);
  color: #0f172a;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease, border-color 0.25s ease;
}

.btn-outline-secondary:hover {
  background-color: rgba(243, 246, 255, 0.95);
  color: #020617;
  border-color: rgba(204, 214, 245, 0.9);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.15);
}

/* Hero */
.hero-section {
  min-height: 100vh;
  padding-top: 6rem;
  padding-bottom: 5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fbff;
  background-image: linear-gradient(
      120deg,
      rgba(5, 20, 56, 0.88),
      rgba(13, 110, 253, 0.55),
      rgba(56, 189, 248, 0.25)
    );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top right,
    rgba(191, 219, 254, 0.3),
    transparent 55%
  );
  mix-blend-mode: screen;
}

.hero-section > .container {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: #c7e2ff;
}

.hero-title {
  font-size: clamp(2.4rem, 3.2vw, 3rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: #f9fbff;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(226, 238, 255, 0.92);
  max-width: 540px;
}

.hero-meta-label {
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #c4d7ff;
  margin-bottom: 0.15rem;
}

.hero-meta-text {
  font-size: 0.9rem;
  color: rgba(219, 234, 254, 0.88);
}

.hero-card {
  background: radial-gradient(
      circle at top left,
      rgba(59, 130, 246, 0.2),
      transparent 55%
    ),
    rgba(12, 22, 60, 0.92);
  border-radius: 1.5rem;
  padding: 2.2rem;
  border: 1px solid rgba(129, 140, 248, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
  color: #e5edff;
}

.hero-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.7);
  border-color: rgba(96, 165, 250, 0.8);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  background-color: rgba(37, 99, 235, 0.15);
  color: #bfdbfe;
}

.hero-card-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: #e5edff;
}

.hero-card-text {
  font-size: 0.98rem;
  color: rgba(203, 213, 225, 0.9);
}

.hero-list li {
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.95);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.hero-list i {
  color: #38bdf8;
  font-size: 1.1rem;
}

.hero-link {
  font-size: 0.95rem;
  color: #e0ecff;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.hero-link:hover {
  border-color: rgba(191, 219, 254, 0.9);
  transform: translateX(2px);
}

.hero-meta {
  color: #e5edff;
}

/* Estilo de meta info dentro de "Sobre Nosotros" en fondo claro */
.about-meta .hero-meta-label {
  color: #1f2937;
}

.about-meta .hero-meta-text {
  color: var(--color-text-soft);
}

/* Servicios */
.service-card {
  background: linear-gradient(
      135deg,
      rgba(226, 238, 255, 0.9),
      rgba(255, 255, 255, 0.98)
    );
  border-radius: 1.25rem;
  padding: 1.9rem 1.7rem;
  border: 1px solid var(--color-border-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease, background-color 0.25s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
  border-color: rgba(47, 141, 228, 0.7);
  background: radial-gradient(
      circle at top left,
      rgba(191, 219, 254, 0.85),
      transparent 55%
    ),
    #ffffff;
}

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-size: 1.2rem;
}

.service-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.service-text {
  font-size: 0.96rem;
  color: var(--color-text-soft);
}

/* Proyectos */
.project-card {
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid var(--color-border-soft);
  background-color: var(--color-surface);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.09);
  border-color: rgba(47, 141, 228, 0.7);
}

.project-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.5s ease;
}

.project-card:hover .project-image {
  transform: scale(1.06);
}

.project-content {
  padding: 1.4rem 1.5rem 1.4rem;
}

.project-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.project-text {
  font-size: 0.95rem;
  color: var(--color-text-soft);
}

/* Sobre Nosotros */
.about-text {
  font-size: 0.98rem;
  color: var(--color-text-soft);
}

.about-card {
  background-color: var(--color-surface);
  border-radius: 1.5rem;
  padding: 2rem;
  border: 1px solid var(--color-border-soft);
}

.about-card-title {
  font-size: 1.2rem;
  font-weight: 600;
}

.about-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.about-list i {
  color: var(--color-accent);
  font-size: 1.1rem;
  margin-top: 0.15rem;
}

/* Modelo de Trabajo / Timeline */
.work-model-timeline {
  position: relative;
}

.timeline-line {
  position: absolute;
  bottom: 0;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(
    to right,
    rgba(47, 141, 228, 0.15),
    rgba(47, 141, 228, 0.5) 15%,
    rgba(47, 141, 228, 0.5) 85%,
    rgba(47, 141, 228, 0.15)
  );
  z-index: 0;
}

.timeline-steps {
  position: relative;
  z-index: 1;
  padding-bottom: 2.5rem;
}

.work-step {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.work-model-section.is-visible .work-step {
  opacity: 1;
  transform: translateY(0);
}

.work-model-section.is-visible .work-step:nth-child(1) { transition-delay: 0.1s; }
.work-model-section.is-visible .work-step:nth-child(2) { transition-delay: 0.2s; }
.work-model-section.is-visible .work-step:nth-child(3) { transition-delay: 0.3s; }
.work-model-section.is-visible .work-step:nth-child(4) { transition-delay: 0.4s; }
.work-model-section.is-visible .work-step:nth-child(5) { transition-delay: 0.5s; }

.work-step-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95),
    rgba(248, 251, 255, 0.98)
  );
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  border: 1px solid var(--color-border-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.work-step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  border-color: rgba(47, 141, 228, 0.5);
}

.work-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-size: 1.35rem;
  margin-bottom: 1rem;
}

.work-step-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.work-step-text {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  margin-bottom: 0;
}

/* Timeline responsive: vertical en móvil/tablet */
@media (max-width: 991.98px) {
  .timeline-line {
    left: 24px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    transform: none;
  }

  .timeline-steps {
    flex-direction: column;
  }

  .work-step {
    display: flex;
    padding-left: 4rem;
  }

  .work-step::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 2rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--color-accent);
    border: 3px solid var(--color-surface);
    box-shadow: 0 0 0 2px var(--color-accent);
  }
}

@media (min-width: 992px) {
  .work-step {
    position: relative;
  }

  .work-step::before {
    content: "";
    position: absolute;
    bottom: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--color-accent);
    border: 3px solid var(--color-surface);
    box-shadow: 0 0 0 2px var(--color-accent);
  }
}

/* Llamado a la acción */
.cta-section {
  background: radial-gradient(
      circle at top left,
      rgba(47, 141, 228, 0.2),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(56, 189, 248, 0.18),
      transparent 55%
    );
}

.cta-card {
  background: linear-gradient(
    135deg,
    rgba(248, 250, 255, 0.98),
    rgba(226, 238, 255, 0.98)
  );
  border-radius: 1.8rem;
  padding: 3rem 2rem;
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid var(--color-border-soft);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.cta-title {
  font-size: 1.8rem;
  font-weight: 600;
}

.cta-text {
  font-size: 1rem;
  color: var(--color-text-soft);
}

/* Contacto */
.contact-card {
  background-color: var(--color-surface);
  border-radius: 1.5rem;
  padding: 2.2rem;
  border: 1px solid var(--color-border-soft);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.form-control {
  border-radius: 999px;
  border-color: var(--color-border-soft);
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
}

textarea.form-control {
  border-radius: 1.2rem;
}

.form-control:focus {
  border-color: rgba(47, 141, 228, 0.8);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.form-label {
  font-size: 0.9rem;
  color: #4b5563;
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, #a5f3fc, #22c55e);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.6rem;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.55);
  z-index: 1040;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.whatsapp-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 55px rgba(37, 99, 235, 0.7);
  background: radial-gradient(circle at 30% 0%, #7dd3fc, #16a34a);
}

/* Pie de página */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--color-border-soft);
  background-color: #f9fbff;
}

.footer-text {
  font-size: 0.9rem;
  color: var(--color-text-soft);
}

.footer-nav a {
  font-size: 0.9rem;
  color: #4b5563;
  margin: 0 0.25rem;
}

.footer-nav a:hover {
  color: #111827;
}

/* Dispositivos pequeños */
@media (max-width: 991.98px) {
  .hero-section {
    padding-top: 5.5rem;
  }

  .hero-subtitle {
    margin-inline: auto;
  }

  .hero-card {
    margin-top: 2rem;
  }

  .cta-card {
    padding: 2.5rem 1.75rem;
  }
}

/* Animaciones de aparición al hacer scroll */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Desplazamiento escalonado de tarjetas internas */
.reveal-on-scroll .service-card,
.reveal-on-scroll .project-card,
.reveal-on-scroll .about-card,
.reveal-on-scroll .contact-card,
.reveal-on-scroll .cta-card {
  transform: translateY(10px);
  transition: transform 0.45s ease-out, box-shadow 0.45s ease-out,
    border-color 0.3s ease-out;
}

.reveal-on-scroll.is-visible .service-card,
.reveal-on-scroll.is-visible .project-card,
.reveal-on-scroll.is-visible .about-card,
.reveal-on-scroll.is-visible .contact-card,
.reveal-on-scroll.is-visible .cta-card {
  transform: translateY(0);
}
