/**
 * Feature pages — motion, depth, and visual polish (scroll reveal, hero mesh, card hover).
 * Loaded after apple-experience.css. Respects prefers-reduced-motion.
 */

:root {
  --cd-lp-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --cd-lp-ease-spring: cubic-bezier(0.34, 1.02, 0.68, 1);
}

/* Shared “rich LP” entrance curves (used by page CSS under assets/css/pages/) */
@keyframes cd-lp-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cd-lp-rise-subtle {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cd-lp-scale-soft {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes cd-lp-line-expand {
  from {
    transform: scaleX(0);
    opacity: 0;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes cd-lp-draw-line {
  from {
    transform: scaleY(0);
    opacity: 0.35;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes cd-lp-shine-sweep {
  0% {
    transform: translateX(-120%) skewX(-12deg);
    opacity: 0;
  }
  18% {
    opacity: 0.22;
  }
  45% {
    opacity: 0;
  }
  100% {
    transform: translateX(220%) skewX(-12deg);
    opacity: 0;
  }
}

@keyframes cd-fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cd-mesh-drift {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(2%, -2%) scale(1.05);
  }
}

@keyframes cd-shimmer-soft {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.75;
  }
}

@keyframes cd-cta-glow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ——— Hero: layered mesh + grid (content stays above) ——— */
main[class*="-lp"] .hero-gradient {
  position: relative;
  overflow: hidden;
}

main[class*="-lp"] .hero-gradient::before {
  content: "";
  position: absolute;
  inset: -35% -20%;
  background:
    radial-gradient(ellipse 55% 45% at 85% 15%, rgba(0, 113, 227, 0.17) 0%, transparent 52%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(52, 199, 89, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 42% 36% at 50% 48%, rgba(0, 113, 227, 0.06) 0%, transparent 60%);
  animation: cd-mesh-drift 24s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

main[class*="-lp"] .hero-gradient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

main[class*="-lp"] .hero-gradient > .container {
  position: relative;
  z-index: 1;
}

/* Hero columns: stagger when section becomes visible */
section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"] {
  animation: cd-fade-up 0.72s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"]:nth-child(1) {
  animation-delay: 0.06s;
}

section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"]:nth-child(2) {
  animation-delay: 0.14s;
}

/* Rich marketing LPs: inner hero stagger (page CSS); disable whole-column drift to avoid double motion */
main.stock-advice-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
main.product-bundles-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
main.po-management-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
main.stock-alerts-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
main.lvb-fba-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
main.solution-sellers-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
main.solution-fulfillment-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
main.prices-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"] {
  animation: none !important;
}

/* Floating card: accent edge + lift on hover */
main[class*="-lp"] .floating-card {
  position: relative;
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease;
}

main[class*="-lp"] .floating-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 113, 227, 0.35), rgba(52, 199, 89, 0.2), rgba(0, 113, 227, 0.15));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
}

main[class*="-lp"] .floating-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.09) !important;
}

/* Product cards */
main[class*="-lp"] .card {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease;
}

main[class*="-lp"] .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(0, 40, 100, 0.09) !important;
}

main[class*="-lp"] .border.rounded-4.p-4 {
  transition:
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease,
    border-color 0.25s ease;
  background: rgba(255, 255, 255, 0.65);
}

main[class*="-lp"] .border.rounded-4.p-4:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 113, 227, 0.18) !important;
}

/* Icon circles */
main[class*="-lp"] .icon-circle {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

main[class*="-lp"] .card:hover .icon-circle {
  transform: scale(1.06);
}

/* CTA band: slow gradient drift */
main[class*="-lp"] .cta-band {
  position: relative;
  overflow: hidden;
  background-size: 200% 200% !important;
  animation: cd-cta-glow 14s ease infinite;
}

main[class*="-lp"] .cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 120% at 50% -20%, rgba(255, 255, 255, 0.2), transparent 55%);
  animation: cd-shimmer-soft 8s ease-in-out infinite;
  pointer-events: none;
}

main[class*="-lp"] .cta-band > * {
  position: relative;
  z-index: 1;
}

/* Mini stats under hero */
main[class*="-lp"] .mini-stat > div {
  transition: transform 0.25s ease, color 0.25s ease;
}

main[class*="-lp"] .mini-stat > div:hover {
  transform: translateY(-2px);
}

/* Trust strip: subtle top rule */
main[class*="-lp"] section.border-bottom.bg-white .trust-logos {
  position: relative;
  display: inline-block;
}

main[class*="-lp"] section.border-bottom.bg-white .trust-logos::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 0.65rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(0, 113, 227, 0.45), transparent);
}

/* Scroll reveal */
main[class*="-lp"] section.cd-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--cd-reveal-delay, 0s);
  will-change: opacity, transform;
}

main[class*="-lp"] section.cd-reveal.cd-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Buttons */
main[class*="-lp"] .btn {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

main[class*="-lp"] .btn-primary:hover,
main[class*="-lp"] .btn-outline-primary:hover {
  transform: translateY(-1px);
}

main[class*="-lp"] .btn:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  main[class*="-lp"] .hero-gradient::before {
    animation: none;
  }

  main[class*="-lp"] .cta-band {
    animation: none;
    background-size: 100% 100% !important;
  }

  main[class*="-lp"] .cta-band::after {
    animation: none;
  }

  main[class*="-lp"] section.cd-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
  main.stock-advice-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
  main.product-bundles-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
  main.po-management-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
  main.stock-alerts-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
  main.lvb-fba-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
  main.solution-sellers-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
  main.solution-fulfillment-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"],
  main.prices-lp section.cd-reveal.cd-reveal--visible .hero-gradient .row > [class*="col"] {
    animation: none !important;
  }

  main[class*="-lp"] .floating-card:hover,
  main[class*="-lp"] .card:hover,
  main[class*="-lp"] .border.rounded-4.p-4:hover {
    transform: none;
  }

  main[class*="-lp"] .btn-primary:hover,
  main[class*="-lp"] .btn-outline-primary:hover {
    transform: none;
  }

}
