/* ================================
   TIPOGRAFÍA Y BASE
=================================== */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at top, rgba(129, 140, 248, 0.18) 0, transparent 50%),
    radial-gradient(circle at bottom, rgba(56, 189, 248, 0.16) 0, transparent 55%),
    #f9fafb;
  color: #020617;
}

/* Quita el resaltado feo en móviles */
a,
button {
  -webkit-tap-highlight-color: transparent;
}

/* ================================
   HEADER Y NAV
=================================== */

header.sticky {
  /* ya tiene classes de Tailwind, aquí le damos sombra y animación */
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(16px);
  transition: background-color 0.3s ease, box-shadow 0.3s ease,
    transform 0.3s ease;
}

header.sticky:hover {
  transform: translateY(-1px);
}

/* Nav links – subrayado animado */
header nav a {
  position: relative;
  overflow: hidden;
}

header nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #4f46e5, #22c55e, #38bdf8);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

header nav a:hover::after {
  transform: translateX(0);
}

/* ================================
   SECCIONES Y ENTRADA SUAVE
=================================== */

main section {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUp 0.9s ease-out forwards;
}

/* Pequeñas variaciones de delay para que no aparezcan todas igual */
main section:nth-of-type(1) {
  animation-delay: 0.05s;
}
main section:nth-of-type(2) {
  animation-delay: 0.12s;
}
main section:nth-of-type(3) {
  animation-delay: 0.18s;
}
main section:nth-of-type(4) {
  animation-delay: 0.24s;
}
main section:nth-of-type(5) {
  animation-delay: 0.3s;
}
main section:nth-of-type(6) {
  animation-delay: 0.36s;
}
main section:nth-of-type(7) {
  animation-delay: 0.42s;
}
main section:nth-of-type(8) {
  animation-delay: 0.48s;
}
main section:nth-of-type(9) {
  animation-delay: 0.54s;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.99);
    filter: blur(3px);
  }
  60% {
    opacity: 1;
    transform: translateY(-4px) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ================================
   HERO / PORTADA
=================================== */

/* Sutil glow en el título principal */
#inicio h1 {
  text-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
}

/* Efecto de gradiente animado detrás del hero */
#inicio {
  position: relative;
  overflow: hidden;
}

#inicio::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 0% 0%, rgba(129, 140, 248, 0.36) 0, transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.32) 0, transparent 55%);
  opacity: 0.75;
  mix-blend-mode: screen;
  filter: blur(8px);
  animation: heroGlow 18s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes heroGlow {
  0% {
    transform: translate3d(-6%, 4%, 0) scale(1.02);
    opacity: 0.7;
  }
  50% {
    transform: translate3d(4%, -4%, 0) scale(1.08);
    opacity: 0.9;
  }
  100% {
    transform: translate3d(2%, 6%, 0) scale(1.12);
    opacity: 0.75;
  }
}

/* ================================
   CARDS (usa las clases de Tailwind existentes)
=================================== */

div[class*="rounded-2xl"][class*="border"][class*="shadow-sm"] {
  position: relative;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease;
  will-change: transform, box-shadow;
}

div[class*="rounded-2xl"][class*="border"][class*="shadow-sm"]::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle at 0 0,
    rgba(129, 140, 248, 0.15),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

div[class*="rounded-2xl"][class*="border"][class*="shadow-sm"]:hover {
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  border-color: rgba(129, 140, 248, 0.55);
  background-color: #ffffff;
}

div[class*="rounded-2xl"][class*="border"][class*="shadow-sm"]:hover::before {
  opacity: 1;
}

/* ================================
   BADGES
=================================== */

span[class*="rounded-full"][class*="shadow-sm"] {
  position: relative;
  overflow: hidden;
  background-clip: padding-box;
}

span[class*="rounded-full"][class*="shadow-sm"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(129, 140, 248, 0.16),
    rgba(56, 189, 248, 0.08),
    rgba(129, 140, 248, 0.2)
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

span[class*="rounded-full"][class*="shadow-sm"]:hover::before {
  opacity: 1;
}

/* ================================
   BOTONES CTA
=================================== */

/* Botón primario – cualquier link con bg-indigo-600 */
a[class*="bg-indigo-600"] {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    filter 0.22s ease;
  box-shadow: 0 18px 35px rgba(79, 70, 229, 0.45);
}

a[class*="bg-indigo-600"]::before {
  content: "";
  position: absolute;
  top: -120%;
  left: -40%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(248, 250, 252, 0.8) 0, transparent 55%);
  opacity: 0;
  transform: translateX(-60%);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

a[class*="bg-indigo-600"]:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.05);
  box-shadow: 0 22px 45px rgba(79, 70, 229, 0.6);
}

a[class*="bg-indigo-600"]:hover::before {
  opacity: 0.7;
  transform: translateX(10%);
}

/* Botón secundario con borde claro (blanco) en el footer */
section[class*="bg-indigo-700"] a[class*="border-white"] {
  transition:
    transform 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

section[class*="bg-indigo-700"] a[class*="border-white"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.4);
}

/* Botones tipo "borde gris" */
a[class*="border"][class*="bg-white"][class*="shadow-sm"] {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

a[class*="border"][class*="bg-white"][class*="shadow-sm"]:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.15);
  background-color: #f9fafb;
}

/* Efecto "pulse" muy suave en el CTA principal del hero */
#inicio a[class*="bg-indigo-600"] {
  animation: subtlePulse 3.2s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 18px 35px rgba(79, 70, 229, 0.45);
  }
  50% {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 24px 50px rgba(79, 70, 229, 0.7);
  }
}

/* ================================
   LISTAS CON ICONOS (CHECKS)
=================================== */

li svg {
  flex-shrink: 0;
  filter: drop-shadow(0 4px 8px rgba(79, 70, 229, 0.4));
}

/* ================================
   FAQ / TEXTO
=================================== */

#faq h4 {
  position: relative;
  padding-left: 0.85rem;
}

#faq h4::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 4px;
  height: 1.4rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #4f46e5, #38bdf8);
}

/* ================================
   FOOTER
=================================== */

footer {
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at top,
    rgba(15, 23, 42, 0.06) 0,
    transparent 55%
  );
  pointer-events: none;
}

/* Línea superior del footer con animación sutil */
footer > div:last-child {
  position: relative;
}

footer > div:last-child::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(148, 163, 184, 0.7),
    transparent
  );
  opacity: 0.7;
}

/* ================================
   TOQUES PEQUEÑOS
=================================== */

/* Enlaces subrayados (tel, mail) */
a[href^="tel:"],
a[href^="mailto:"] {
  position: relative;
  transition: color 0.2s ease;
}

a[href^="tel:"]::after,
a[href^="mailto:"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.12rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

a[href^="tel:"]:hover::after,
a[href^="mailto:"]:hover::after {
  transform: scaleX(1);
}

/* Pequeño parallax muy light en hover de secciones (solo en pantallas grandes) */
@media (min-width: 1024px) {
  main section:hover {
    transform: translateY(-2px);
  }
}
