/* Landing unificada (Hostinger layout + estilo Agend One)
   Nota: todo usa tus tokens globales cuando existen.
*/

:root {
  --ao-landing-topbar-h: 74px; /* ajusta si tu topbar es más alta/baja */
}

.ao-landing {
  position: relative;
  isolation: isolate;
  padding-top: calc(var(--ao-landing-topbar-h, 74px) + 1rem) !important;
}

/* =========================
   HERO CARD
   ========================= */
.ao-landing-hero {
  position: relative;
  border-radius: var(--rad-lg, 18px);
  border: 1px solid var(--border, #d2d2d7);
  background: var(--card, #fff);
  box-shadow: var(--sh-md, 0 18px 45px rgba(15, 23, 42, 0.12));
  overflow: hidden;
}

.ao-landing-hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto -20%;
  height: 280px;
  background: var(--brand-grad);
  opacity: 0.14;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 0;
}

.ao-landing-hero::after {
  content: "";
  position: absolute;
  inset: auto -40% -35% auto;
  width: 520px;
  height: 520px;
  background: var(--brand-grad);
  opacity: 0.1;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.ao-hero-content {
  position: relative;
  z-index: 2;
}

.ao-landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border, #d2d2d7) 65%, transparent);
  background: color-mix(in srgb, var(--card, #fff) 92%, transparent);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--ink, #111827);
}

.ao-landing-badge i {
  color: var(--brand-1, #285bb0);
}

.ao-landing-kicker {
  color: color-mix(in srgb, var(--ink, #111827) 78%, transparent);
}

.ao-hero-title {
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 2.3vw + 1.2rem, 3rem);
}

.ao-accent {
  color: var(--brand-2, #5b8def);
}

.ao-hero-lead {
  color: color-mix(in srgb, var(--ink, #111827) 78%, transparent);
  max-width: 58ch;
}

.ao-hero-media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--border, #d2d2d7) 70%, transparent);
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.14);
  transform: translateY(0);
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.ao-hero-media:hover {
  transform: translateY(-2px);
}

.ao-hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================
   FEATURE CARDS (tilt)
   ========================= */
.ao-landing-feature {
  border: 1px solid var(--border, #d2d2d7);
  border-radius: var(--rad-md, 14px);
  background: color-mix(in srgb, var(--card, #fff) 96%, transparent);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    border-color 0.12s ease;
  height: 100%;
}

.ao-landing-feature:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  border-color: color-mix(
    in srgb,
    var(--brand-1, #285bb0) 45%,
    var(--border, #d2d2d7)
  );
}

/* Tilt real: el hover normal NO debe pelearse con el transform del JS */
.ao-landing-feature.tilt {
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
  transition:
    transform 380ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.12s ease,
    border-color 0.12s ease;
}

.ao-landing-feature.tilt:hover {
  transform: none;
}

/* Glow interno tipo cards del index */
.ao-landing-feature.tilt::before {
  content: "";
  position: absolute;
  inset: -60px;
  background:
    radial-gradient(
      600px 300px at 10% 10%,
      rgba(91, 141, 239, 0.18),
      transparent 60%
    ),
    radial-gradient(
      600px 300px at 90% 90%,
      rgba(40, 91, 176, 0.14),
      transparent 60%
    );
  opacity: 0.75;
  transform: translateZ(-1px);
  pointer-events: none;
}

.ao-landing-feature.tilt > * {
  position: relative;
}

.ao-landing-ico {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--brand-1, #285bb0) 12%, transparent);
  color: var(--brand-1, #285bb0);
  flex: 0 0 auto;
}

/* =========================
   TESTIMONIO
   ========================= */
.ao-testimonial-quote {
  font-style: italic;
  font-weight: 600;
  line-height: 1.35;
  font-size: clamp(1.1rem, 1vw + 1rem, 1.55rem);
  color: color-mix(in srgb, var(--ink, #111827) 92%, transparent);
}

.ao-testimonial-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--brand-2, #5b8def) 55%, #fff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

/* =========================
   FOOTER
   ========================= */
.ao-landing-footer {
  color: var(--muted, #4b5563);
  font-size: 0.9rem;
}

.ao-landing-footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dotted
    color-mix(in oklab, var(--ink, #111827), transparent 70%);
}

.ao-landing-footer a:hover {
  text-decoration: underline;
}

/* =========================
   GOOEY / BOLAS (hero)
   ========================= */
.ao-landing-goo {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -120px;
  height: 280px;
  pointer-events: none;
  z-index: 1;
  filter: url(#ao-goo);
  opacity: 0.55;
}

.ao-landing-goo__base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 175px;
  background: var(
    --brand-grad,
    linear-gradient(135deg, var(--brand-1, #285bb0), var(--brand-2, #5b8def))
  );
  border-radius: 999px;
}

#particle-container {
  position: absolute;
  inset: 0;
}

.ao-particle {
  position: absolute;
  left: var(--pos-x);
  bottom: 0;
  width: var(--dim);
  height: var(--dim);
  background: var(
    --brand-grad,
    linear-gradient(135deg, var(--brand-1, #285bb0), var(--brand-2, #5b8def))
  );
  border-radius: 999px;
  transform: translateX(-50%);
  animation: ao-float var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
  opacity: var(--alpha, 0.9);
  filter: blur(var(--blur, 0px));
}

@keyframes ao-float {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, calc(-1 * var(--uplift)));
  }
}

/* =========================
   Reveal on scroll
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(2px);
  transition:
    opacity 800ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 800ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 800ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Helpers: reemplaza style="--stagger:N" por clases (evita H021) */
.stagger-0 {
  --stagger: 0;
}
.stagger-1 {
  --stagger: 1;
}
.stagger-2 {
  --stagger: 2;
}
.stagger-3 {
  --stagger: 3;
}
.stagger-4 {
  --stagger: 4;
}
.stagger-5 {
  --stagger: 5;
}
.stagger-6 {
  --stagger: 6;
}

/* =========================
   Accesibilidad / reduce motion
   ========================= */
@media (prefers-reduced-motion: reduce) {
  .ao-particle {
    animation: none !important;
  }
  .ao-landing-goo {
    opacity: 0.25;
  }

  .ao-landing-feature,
  .ao-landing-feature:hover {
    transition: none !important;
    transform: none !important;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
}

/* Top nav (Producto/Servicio/Precios/Nosotros) */
.ao-topnav a {
  color: color-mix(in srgb, var(--ink, #111827) 88%, transparent);
  font-weight: 600;
}

.ao-topnav a:hover {
  text-decoration: underline;
}

/* ===== Top nav: en pantallas estrechas, que no reviente; scroll horizontal limpio ===== */
.ao-topnav {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px; /* evita cortes del underline */
  scrollbar-width: none; /* Firefox */
}
.ao-topnav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Opcional: targets más cómodos en táctil */
.ao-topnav a {
  padding: 0.25rem 0.1rem;
}

/* =========================
   TOPBAR LANDING: contenedor con fondo de marca
   ========================= */

/* El contenedor real de tu topbar (el que hemos marcado en landing.html) */
.ao-landing-topbar {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--brand-grad, var(--brand-1, #141c61));
  color: #fff;

  /* “sitio donde estar” visual */
  border-radius: 0 0 var(--rad-lg, 18px) var(--rad-lg, 18px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);

  position: fixed; /* antes: relative */
  top: 0;
  left: 0;
  right: 0;

  width: 100vw;
  max-width: 100vw;

  z-index: 1030;

  /* opcional pero recomendable con fixed */
  border-radius: 0 0 var(--rad-lg, 18px) var(--rad-lg, 18px);
}

.ao-landing-topbar.is-scrolled {
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
}

/* Contraste del texto/links sobre fondo de marca */
.ao-landing-topbar .fw-semibold {
  color: #fff;
}

.ao-landing-topbar .ao-topnav a {
  color: color-mix(in srgb, #fff 88%, transparent);
  font-weight: 600;
}

.ao-landing-topbar .ao-topnav a:hover {
  color: #fff;
  text-decoration: underline;
}

/* Ajuste para anchors con topbar fija */
.ao-landing-hero,
.ao-landing section,
.ao-landing footer {
  scroll-margin-top: calc(var(--ao-landing-topbar-h, 74px) + 16px);
}

/* Si usas text-muted dentro de la topbar en algún momento */
.ao-landing-topbar .text-muted {
  color: color-mix(in srgb, #fff 75%, transparent) !important;
}

/* =========================
   Topbar: nav centrado (desktop) + sticky
   ========================= */

/* En escritorio, evitamos wrap para que el centrado sea limpio */
@media (min-width: 992px) {
  .ao-landing-topbar {
    flex-wrap: nowrap !important; /* pisa el .flex-wrap de Bootstrap */
  }

  .ao-landing-topbar > div:first-child {
    flex-wrap: nowrap !important; /* pisa el .flex-wrap del contenedor izquierdo */
  }

  /* Centramos el nav en la topbar (independiente de marca y botón) */
  .ao-landing-topbar .ao-topnav {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-width: 55vw; /* evita que se coma la marca o el botón */
    justify-content: center;
  }
}

/* En móvil/tablet mantenemos tu comportamiento original (nav “normal” y scrolleable) */
@media (max-width: 991.98px) {
  .ao-landing-topbar .ao-topnav {
    position: static;
    transform: none;
    max-width: none;
  }
}
