/**
 * Adaptación del motion system para sub-landings (temas propios).
 * Requiere /css/motion.css cargado antes.
 */

/* Compatibilidad con reveals existentes (.is-visible) */
.reveal.is-visible,
.reveal.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

.reveal-delay-1 { transition-delay: 80ms !important; }
.reveal-delay-2 { transition-delay: 160ms !important; }
.reveal-delay-3 { transition-delay: 240ms !important; }

/* Botones en landings */
.button,
.btn,
.nav__cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.button--primary,
.btn--primary,
.btn--dark {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Cards premium (selectores por landing) */
.motion-landing .pain-card,
.motion-landing .package-card,
.motion-landing .enterprise-card,
.motion-landing .feature-card,
.motion-landing .segment,
.motion-landing .package,
.motion-landing .symptom,
.motion-landing .hm-line,
.motion-landing .hm-proofitem,
.motion-landing .booking-card,
.motion-landing .cost-card,
.motion-landing .agent,
.motion-landing .package-card,
.motion-landing .ai-card,
.motion-landing .pillar,
.motion-landing .metric-row > article,
.motion-landing .deliverable-card,
.motion-landing .case-card,
.motion-landing .cta-box {
  position: relative;
  isolation: isolate;
  transition:
    transform var(--motion-duration-fast, 180ms) cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow var(--motion-duration, 420ms) cubic-bezier(0.16, 1, 0.3, 1),
    border-color var(--motion-duration-fast, 180ms) ease;
}

.motion-landing .pain-card:hover,
.motion-landing .package-card:hover,
.motion-landing .enterprise-card:hover,
.motion-landing .feature-card:hover,
.motion-landing .segment:hover,
.motion-landing .package:hover,
.motion-landing .symptom:hover,
.motion-landing .hm-line:hover,
.motion-landing .hm-proofitem:hover,
.motion-landing .booking-card:hover,
.motion-landing .agent:hover,
.motion-landing .package-card:hover,
.motion-landing .ai-card:hover,
.motion-landing .pillar:hover,
.motion-landing .metric-row > article:hover {
  transform: translate3d(0, -4px, 0) scale(1.02);
}

/* hm-hero (software-consultation) */
.hm-hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.hm-hero .hero-aurora {
  inset: -20% -15%;
}

[data-theme="light"] .hero-aurora__blob--1 {
  background: radial-gradient(circle, rgba(217, 74, 22, 0.12), transparent 70%);
}

[data-theme="light"] .hero-aurora__blob--2 {
  background: radial-gradient(circle, rgba(19, 17, 24, 0.06), transparent 68%);
}

/* Esperar splash intro */
.home-page:not(.intro-done) .hm-hero .motion-hero-item {
  opacity: 0;
}

.home-page.intro-done .hm-hero.is-ready .motion-hero-item,
.hm-hero.is-ready .motion-hero-item {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* Formularios lead */
.lead-form label {
  transition: color var(--motion-duration-fast, 180ms) ease;
}

.lead-form input:focus,
.lead-form textarea:focus,
.lead-form select:focus {
  transform: translate3d(0, -1px, 0);
}

.lead-form.is-success {
  animation: successPulse 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Section headers reveal */
.motion-landing .section__head,
.motion-landing .hm-section__intro,
.motion-landing .section__header,
.motion-landing .platforms__header,
.motion-landing .demo__intro {
  /* heredan .reveal cuando se añade la clase en HTML */
}

/* Hero stats (automatizaciones) */
.hero__stats [data-motion-counter] {
  font-variant-numeric: tabular-nums;
}

/* No duplicar grain/mesh con noise de motion-page */
.motion-landing.motion-page::before {
  opacity: 0.02;
}

.bg-mesh + .motion-page::before,
.grain + .motion-page::before {
  opacity: 0.025;
}
