/* ================= Base ================= */
:root {
  --c-blue: #2563eb;
  --c-indigo: #4f46e5;
  --c-purple: #7c3aed;
  --c-pink: #9333ea;
  --c-text: #ffffff;
  --c-text-soft: rgba(255, 255, 255, 0.86);
  --c-btn-bg: #ffffff;
  --c-btn-text: #4f46e5;
  --c-btn-bg-hover: #4f46e5;
  --c-btn-text-hover: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--c-text);
  background: #1e1b4b;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================= Fondo animado: degradado en movimiento ================= */
.bg-gradient {
  position: fixed;
  inset: -20%;
  z-index: -3;
  background: linear-gradient(
    130deg,
    #1d4ed8 0%,
    #4f46e5 25%,
    #7c3aed 50%,
    #9333ea 75%,
    #2563eb 100%
  );
  background-size: 300% 300%;
  animation: gradientShift 18s ease infinite;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ================= Blobs flotantes ================= */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  filter: blur(60px);
}

.blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}

.blob-1 {
  width: 42vw;
  height: 42vw;
  min-width: 320px;
  min-height: 320px;
  background: radial-gradient(circle at 30% 30%, #38bdf8, transparent 70%);
  top: -8%;
  left: -6%;
  animation: float1 16s ease-in-out infinite;
}

.blob-2 {
  width: 38vw;
  height: 38vw;
  min-width: 280px;
  min-height: 280px;
  background: radial-gradient(circle at 60% 40%, #e879f9, transparent 70%);
  bottom: -10%;
  right: -8%;
  animation: float2 20s ease-in-out infinite;
}

.blob-3 {
  width: 30vw;
  height: 30vw;
  min-width: 240px;
  min-height: 240px;
  background: radial-gradient(circle at 50% 50%, #818cf8, transparent 70%);
  top: 55%;
  left: 8%;
  animation: float3 24s ease-in-out infinite;
}

.blob-4 {
  width: 26vw;
  height: 26vw;
  min-width: 200px;
  min-height: 200px;
  background: radial-gradient(circle at 40% 60%, #22d3ee, transparent 70%);
  top: 5%;
  right: 12%;
  animation: float4 18s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(12vw, 8vh) scale(1.12); }
  66%      { transform: translate(4vw, 16vh) scale(0.94); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(-14vw, -6vh) scale(1.08); }
  66%      { transform: translate(-6vw, -14vh) scale(0.9); }
}

@keyframes float3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(16vw, -12vh) scale(1.2); }
}

@keyframes float4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-10vw, 14vh) scale(1.15); }
}

/* ================= Partículas (canvas) ================= */
#particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Sutil textura de ruido */
.bg-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ================= Contenido ================= */
.hero {
  position: relative;
  z-index: 1;
  width: min(760px, 92vw);
  padding: 4rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  width: clamp(120px, 22vw, 180px);
  height: auto;
  object-fit: contain;
  margin-bottom: 2rem;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.35));
  animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.title {
  font-size: clamp(1.9rem, 5.5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  margin-bottom: 1.25rem;
}

.message {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--c-text-soft);
  max-width: 620px;
  margin-bottom: 2.5rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* ================= Botón principal ================= */
.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 2.25rem;
  border-radius: 9999px;
  background: var(--c-btn-bg);
  color: var(--c-btn-text);
  font-family: inherit;
  font-size: clamp(0.98rem, 2.2vw, 1.1rem);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
  transition: background-color 0.3s ease, color 0.3s ease,
    transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.btn-main .btn-arrow {
  transition: transform 0.3s ease;
}

.btn-main:hover,
.btn-main:focus-visible {
  background: var(--c-btn-bg-hover);
  color: var(--c-btn-text-hover);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.55);
}

.btn-main:hover .btn-arrow,
.btn-main:focus-visible .btn-arrow {
  transform: translateX(6px);
}

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

/* ================= Botón flotante WhatsApp ================= */
.whatsapp-fab {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: 50;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25d366;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: background-color 0.3s ease, transform 0.3s ease,
    box-shadow 0.3s ease;
}

.whatsapp-fab .wa-icon {
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease, color 0.3s ease;
}

.whatsapp-fab:hover,
.whatsapp-fab:focus-visible {
  background: #ffffff;
  color: #128c7e;
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(18, 140, 126, 0.45);
}

.whatsapp-fab:hover .wa-icon,
.whatsapp-fab:focus-visible .wa-icon {
  transform: scale(1.18);
  color: #128c7e;
}

/* Anillo de pulso */
.wa-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: waPulse 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes waPulse {
  0%   { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.75); opacity: 0; }
}

/* ================= Entradas escalonadas ================= */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= Responsivo ================= */
@media (max-width: 640px) {
  .hero {
    padding: 3rem 1.25rem 6.5rem;
  }

  .logo {
    margin-bottom: 1.5rem;
  }

  .message {
    margin-bottom: 2rem;
  }

  .btn-main {
    width: 100%;
    max-width: 340px;
    justify-content: center;
    padding: 0.95rem 1.5rem;
  }

  .whatsapp-fab {
    width: 54px;
    height: 54px;
  }

  .whatsapp-fab .wa-icon {
    width: 27px;
    height: 27px;
  }
}

/* ================= Accesibilidad: movimiento reducido ================= */
@media (prefers-reduced-motion: reduce) {
  .bg-gradient,
  .blob,
  .logo,
  .wa-pulse,
  .fade-up {
    animation: none !important;
  }

  .fade-up {
    opacity: 1;
    transform: none;
  }
}
