/* Motion layer — extra animations, parallax orbs, marquees, counters, illustrations.
   Designed to run on top of the existing layout without rewriting any other CSS. */

/* ─── Hero atmosphere: drifting orbs + sparkles ─── */
.hero__bg-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero__bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  will-change: transform;
  animation: orb-drift 18s ease-in-out infinite;
  mix-blend-mode: screen;
}

:root[data-theme="light"] .hero__bg-orb,
:root:not([data-theme]) .hero__bg-orb {
  mix-blend-mode: multiply;
  opacity: 0.32;
}

.hero__bg-orb--a {
  width: clamp(280px, 38vw, 520px);
  height: clamp(280px, 38vw, 520px);
  top: -6%;
  right: -6%;
  background: radial-gradient(circle at 30% 30%, #14b8a6, transparent 65%);
  animation-duration: 22s;
}

.hero__bg-orb--b {
  width: clamp(240px, 32vw, 440px);
  height: clamp(240px, 32vw, 440px);
  bottom: -8%;
  left: -8%;
  background: radial-gradient(circle at 50% 50%, #06b6d4, transparent 60%);
  animation-duration: 26s;
  animation-direction: reverse;
}

.hero__bg-orb--c {
  width: clamp(180px, 22vw, 300px);
  height: clamp(180px, 22vw, 300px);
  top: 40%;
  left: 45%;
  background: radial-gradient(circle at 50% 50%, #7c3aed, transparent 65%);
  opacity: 0.35;
  animation-duration: 30s;
}

@keyframes orb-drift {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  33% {
    transform: translate3d(40px, -30px, 0) scale(1.08);
  }
  66% {
    transform: translate3d(-30px, 25px, 0) scale(0.95);
  }
}

/* Sparkle particles — JS injects a handful of these */
.sparkle-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.sparkle {
  position: absolute;
  width: var(--sz, 6px);
  height: var(--sz, 6px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(20, 184, 166, 0.6) 45%, transparent 70%);
  opacity: 0;
  animation: sparkle-twinkle var(--dur, 3.6s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  filter: drop-shadow(0 0 8px rgba(20, 184, 166, 0.55));
}

:root[data-theme="light"] .sparkle,
:root:not([data-theme]) .sparkle {
  background: radial-gradient(circle, rgba(13, 148, 136, 0.85) 0%, rgba(13, 148, 136, 0.4) 45%, transparent 70%);
  filter: drop-shadow(0 0 6px rgba(13, 148, 136, 0.45));
}

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.4) translateY(0); }
  35% { opacity: 1; transform: scale(1) translateY(-8px); }
  60% { opacity: 0.8; transform: scale(1.1) translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__bg-orb,
  .sparkle {
    animation: none !important;
  }
}

/* ─── Step illustrations: small animated SVGs above each step number ─── */
.step-illus {
  width: 100%;
  height: 88px;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.step-illus svg {
  width: 100%;
  height: 100%;
  max-width: 140px;
  overflow: visible;
}

.step-illus .si-card {
  transform-origin: center;
  animation: si-card-float 4s ease-in-out infinite;
}
.step-illus .si-card--2 { animation-delay: 0.4s; }
.step-illus .si-card--3 { animation-delay: 0.8s; }

@keyframes si-card-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(0deg); }
}

.step-illus .si-spark {
  animation: si-spark-pulse 2.4s ease-in-out infinite;
  transform-origin: center;
}

@keyframes si-spark-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.step-illus .si-bar {
  transform-origin: bottom;
  animation: si-bar-grow 3.4s ease-in-out infinite;
}
.step-illus .si-bar--2 { animation-delay: 0.2s; }
.step-illus .si-bar--3 { animation-delay: 0.4s; }
.step-illus .si-bar--4 { animation-delay: 0.6s; }

@keyframes si-bar-grow {
  0%, 100% { transform: scaleY(0.55); }
  50% { transform: scaleY(1); }
}

.step-illus .si-wave {
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
  animation: si-wave-draw 4s ease-in-out infinite;
}

@keyframes si-wave-draw {
  0% { stroke-dashoffset: 180; }
  55% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -180; }
}

.step-illus .si-ring {
  transform-origin: center;
  animation: si-ring-spin 8s linear infinite;
}

@keyframes si-ring-spin {
  to { transform: rotate(360deg); }
}

.step-illus .si-dot {
  animation: si-dot-orbit 5s linear infinite;
  transform-origin: 32px 32px;
}

@keyframes si-dot-orbit {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .step-illus * { animation: none !important; }
}

/* ─── Marquee for trust / brand strip ─── */
.brand-marquee {
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-6);
  padding: var(--space-3) 0;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.brand-marquee__track {
  display: flex;
  width: max-content;
  gap: var(--space-6);
  animation: marquee-scroll 38s linear infinite;
}

.brand-marquee:hover .brand-marquee__track {
  animation-play-state: paused;
}

.brand-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-marquee__item svg {
  flex-shrink: 0;
  color: var(--accent);
}

.brand-marquee__item--accent {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-elevated));
  border-color: color-mix(in srgb, var(--accent) 25%, var(--border));
}

@keyframes marquee-scroll {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-marquee__track { animation: none; }
}

/* ─── Animated counters ─── */
.count-up {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  transition: color 0.25s ease;
}

.count-up.is-running {
  color: color-mix(in srgb, var(--accent) 75%, var(--text));
}

.roi-block strong .count-up {
  color: inherit;
}

.roi-block {
  position: relative;
  overflow: hidden;
}

.roi-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.roi-block:hover::after {
  opacity: 1;
}

/* ─── Testimonial gradient avatars ─── */
.testimonial {
  position: relative;
  overflow: hidden;
}

.testimonial__avatar-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.testimonial__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.875rem;
  color: #fff;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--av-from, #0d9488), var(--av-to, #06b6d4));
  background-size: 220% 220%;
  animation: avatar-gradient 8s ease infinite;
  box-shadow: 0 0 0 2px var(--bg-elevated), 0 4px 14px color-mix(in srgb, var(--accent) 25%, transparent);
  flex-shrink: 0;
}

.testimonial__avatar--violet { --av-from: #7c3aed; --av-to: #a78bfa; }
.testimonial__avatar--rose { --av-from: #be123c; --av-to: #fb7185; }
.testimonial__avatar--amber { --av-from: #b45309; --av-to: #fbbf24; }

.testimonial__avatar-meta {
  display: flex;
  flex-direction: column;
}

.testimonial__name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text);
}

.testimonial__role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.testimonial::before {
  content: "“";
  position: absolute;
  top: -20px;
  right: 8px;
  font-size: 7rem;
  line-height: 1;
  color: color-mix(in srgb, var(--accent) 18%, transparent);
  font-family: Georgia, serif;
  pointer-events: none;
}

.testimonial__stars {
  display: inline-flex;
  gap: 2px;
  color: #f59e0b;
  margin-top: var(--space-2);
}

.testimonial__star {
  animation: star-pop 2.4s ease-in-out infinite;
  transform-origin: center;
}
.testimonial__star:nth-child(2) { animation-delay: 0.12s; }
.testimonial__star:nth-child(3) { animation-delay: 0.24s; }
.testimonial__star:nth-child(4) { animation-delay: 0.36s; }
.testimonial__star:nth-child(5) { animation-delay: 0.48s; }

@keyframes star-pop {
  0%, 90%, 100% { transform: scale(1); }
  45% { transform: scale(1.18); }
}

@keyframes avatar-gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ─── Feature card micro-visuals ─── */
.feature-viz {
  margin-top: var(--space-4);
  height: 56px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding-top: var(--space-2);
  border-top: 1px dashed var(--border);
}

.feature-viz__bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--accent) 30%, var(--bg-muted)), color-mix(in srgb, var(--accent) 70%, transparent));
  transform-origin: bottom;
  animation: fv-bar 3.6s ease-in-out infinite;
}
.feature-viz__bar:nth-child(1) { --h: 32%; animation-delay: 0s; }
.feature-viz__bar:nth-child(2) { --h: 58%; animation-delay: 0.2s; }
.feature-viz__bar:nth-child(3) { --h: 42%; animation-delay: 0.4s; }
.feature-viz__bar:nth-child(4) { --h: 72%; animation-delay: 0.6s; }
.feature-viz__bar:nth-child(5) { --h: 64%; animation-delay: 0.8s; }
.feature-viz__bar:nth-child(6) { --h: 88%; animation-delay: 1s; }
.feature-viz__bar:nth-child(7) { --h: 52%; animation-delay: 1.2s; }

@keyframes fv-bar {
  0%, 100% { transform: scaleY(calc(var(--h, 50%) / 100 * 0.55)); }
  50% { transform: scaleY(calc(var(--h, 50%) / 100)); }
}

.feature-card:hover .feature-viz__bar {
  animation-duration: 1.6s;
}

/* ─── "Live" dashboard mockup section ─── */
.showcase {
  position: relative;
}

.showcase__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-7);
  align-items: center;
}

@media (max-width: 960px) {
  .showcase__grid { grid-template-columns: 1fr; }
}

.showcase__copy h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-3);
}

.showcase__copy p {
  color: var(--text-muted);
  font-size: 1.0625rem;
  margin: 0 0 var(--space-4);
}

.showcase__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.showcase__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 0.9375rem;
  color: var(--text);
}

.showcase__list li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--ai-gradient);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.showcase__visual {
  position: relative;
  perspective: 1200px;
  min-height: 460px;
}

.phone-mock {
  position: relative;
  margin: 0 auto;
  width: min(260px, 70%);
  aspect-ratio: 9 / 18;
  border-radius: 38px;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  padding: 14px;
  box-shadow:
    0 30px 60px -20px rgba(15, 23, 42, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: rotateY(-10deg) rotateX(6deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  animation: phone-hover 7s ease-in-out infinite;
}

@keyframes phone-hover {
  0%, 100% { transform: rotateY(-10deg) rotateX(6deg) translateY(0); }
  50% { transform: rotateY(-8deg) rotateX(4deg) translateY(-10px); }
}

.phone-mock::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 18px;
  border-radius: 999px;
  background: #000;
  z-index: 2;
}

.phone-mock__screen {
  position: relative;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  display: flex;
  flex-direction: column;
  padding: 36px 14px 14px;
  gap: 10px;
}

:root[data-theme="dark"] .phone-mock__screen {
  background: linear-gradient(180deg, #0b1120 0%, #111827 100%);
}

.phone-mock__statusbar {
  display: flex;
  justify-content: space-between;
  font-size: 0.625rem;
  font-weight: 700;
  color: #0f172a;
  opacity: 0.7;
}

:root[data-theme="dark"] .phone-mock__statusbar { color: #f1f5f9; }

.phone-mock__hero {
  background: var(--ai-gradient);
  border-radius: 14px;
  padding: 12px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.phone-mock__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.25) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: phone-shimmer 4s ease-in-out infinite;
}

@keyframes phone-shimmer {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(120%); }
}

.phone-mock__hero-label {
  font-size: 0.55rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
}

.phone-mock__hero-pts {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-top: 4px;
}

.phone-mock__hero-sub {
  font-size: 0.55rem;
  opacity: 0.85;
  margin-top: 2px;
}

.phone-mock__row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.05);
  font-size: 0.6rem;
  color: #0f172a;
  align-items: center;
  animation: phone-row-in 0.6s ease-out backwards;
}

:root[data-theme="dark"] .phone-mock__row {
  background: rgba(241, 245, 249, 0.06);
  color: #f1f5f9;
}

.phone-mock__row:nth-child(3) { animation-delay: 0.4s; }
.phone-mock__row:nth-child(4) { animation-delay: 0.6s; }
.phone-mock__row:nth-child(5) { animation-delay: 0.8s; }

@keyframes phone-row-in {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.phone-mock__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-mock__row-title {
  font-weight: 700;
  font-size: 0.65rem;
}

.phone-mock__row-sub {
  font-size: 0.55rem;
  opacity: 0.65;
}

.phone-mock__amount {
  font-weight: 800;
  color: var(--accent);
  font-size: 0.7rem;
}

.phone-mock__notif {
  margin-top: auto;
  padding: 10px;
  border-radius: 12px;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.3);
  font-size: 0.6rem;
  color: var(--accent);
  font-weight: 600;
  position: relative;
  animation: phone-notif-pulse 3.2s ease-in-out infinite;
}

@keyframes phone-notif-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(13, 148, 136, 0); }
}

/* Floating chips around the phone */
.showcase__chip {
  position: absolute;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--text) 30%, transparent);
  animation: float-chip 6s ease-in-out infinite;
}

.showcase__chip svg {
  color: var(--accent);
  flex-shrink: 0;
}

.showcase__chip-strong {
  color: var(--text);
  font-weight: 800;
}

.showcase__chip-sub {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.6875rem;
}

.showcase__chip--tl {
  top: 8%;
  left: -4%;
  animation-delay: 0s;
}
.showcase__chip--br {
  bottom: 10%;
  right: -4%;
  animation-delay: 1.2s;
}
.showcase__chip--ml {
  top: 50%;
  left: -8%;
  animation-delay: 2.4s;
}

@keyframes float-chip {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@media (prefers-reduced-motion: reduce) {
  .phone-mock,
  .phone-mock__hero::after,
  .phone-mock__notif,
  .showcase__chip { animation: none; }
}

/* ─── Scroll progress bar at very top ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--ai-gradient);
  z-index: calc(var(--z-header) + 1);
  pointer-events: none;
  transition: width 0.08s linear;
}

/* ─── Section title underline animation on reveal ─── */
.section__title {
  position: relative;
}

.section__title::after {
  content: "";
  display: block;
  width: 0;
  height: 3px;
  margin: var(--space-3) auto 0;
  border-radius: 3px;
  background: var(--ai-gradient);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.section__header.reveal.is-visible .section__title::after {
  width: 56px;
}

/* ─── Tilt-on-hover for step / feature cards ─── */
.step-card,
.feature-card {
  position: relative;
  transform-style: preserve-3d;
}

.step-card::before,
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.step-card:hover::before,
.feature-card:hover::before {
  opacity: 1;
}

.step-card:hover,
.feature-card:hover {
  transform: translateY(-4px);
}

/* ─── Pricing card hover lift + accent bar ─── */
.pricing-card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.3s ease;
  overflow: hidden;
}

.pricing-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--ai-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.pricing-card:hover {
  transform: translateY(-6px);
}

.pricing-card:hover::after {
  transform: scaleX(1);
}

/* ─── Eyebrow pulse for the AI sections, slightly enriched ─── */
.eyebrow--ai .eyebrow__pulse {
  box-shadow: 0 0 0 0 var(--ai-mint);
  animation: eyebrow-pulse-ring 2.5s ease-out infinite;
}

@keyframes eyebrow-pulse-ring {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--ai-mint) 70%, transparent);
    transform: scale(1);
  }
  70% {
    box-shadow: 0 0 0 10px transparent;
    transform: scale(0.85);
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
    transform: scale(1);
  }
}
