/* Motion layer for public pages. Everything here is switched off for prefers-reduced-motion. */

/* ---------- scroll reveal */
.js-motion [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js-motion [data-reveal="left"] { transform: translateX(-28px); }
.js-motion [data-reveal="right"] { transform: translateX(28px); }
.js-motion [data-reveal="zoom"] { transform: scale(.94); }
.js-motion [data-reveal].in { opacity: 1; transform: none; }

/* ---------- hero */
.hero { isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-bg .blob { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(80px); opacity: .45; animation: drift 18s ease-in-out infinite alternate; }
.hero-bg .b1 { background: #8eeccf; top: -180px; left: -120px; }
.hero-bg .b2 { background: #a8d1ff; top: 40px; right: -200px; opacity: .55; animation-duration: 22s; animation-delay: -6s; }
.hero-bg .b3 { background: #ffd9a8; bottom: -260px; left: 35%; opacity: .5; animation-duration: 26s; animation-delay: -12s; }
.hero-bg .grid {
  position: absolute; inset: -2px; opacity: .35;
  background-image: linear-gradient(rgba(16,36,26,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(16,36,26,.05) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  animation: gridpan 30s linear infinite;
}
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(80px, 40px) scale(1.1); } 100% { transform: translate(-40px, 90px) scale(.95); } }
@keyframes gridpan { to { background-position: 48px 48px, 48px 48px; } }
.hero::before { display: none; }

.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; }
.js-motion .hero h1 .line > span { transform: translateY(110%); animation: rise-up .9s var(--ease) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise-up { to { transform: none; } }
.hero h1 em { background: linear-gradient(90deg, #14c9a0, #3b82f6, #8b5cf6, #14c9a0); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 4s linear infinite; }
@keyframes shine { to { background-position: -200% 0; } }
.js-motion .hero .fade-seq > * { opacity: 0; transform: translateY(14px); animation: fade-up .7s var(--ease) forwards; }
.js-motion .hero .fade-seq > *:nth-child(1) { animation-delay: 80ms; }
.js-motion .hero .fade-seq > *:nth-child(3) { animation-delay: 650ms; }
.js-motion .hero .fade-seq > *:nth-child(4) { animation-delay: 800ms; }
.js-motion .hero .fade-seq > *:nth-child(5) { animation-delay: 950ms; }
@keyframes fade-up { to { opacity: 1; transform: none; } }

.eyebrow .ico { animation: zap 2.4s ease-in-out infinite; }
@keyframes zap { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-12deg) scale(1.2); } 90% { transform: rotate(10deg) scale(1.2); } }

.btn.primary.glow { position: relative; overflow: hidden; }
.btn.primary.glow::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); animation: sweep 3.2s ease-in-out infinite; }
@keyframes sweep { 60%, 100% { transform: translateX(120%); } }

/* ---------- chat demo (played by motion.js) */
.chat { position: relative; }
.chat::before { content: ""; position: absolute; inset: -1px; border-radius: 21px; padding: 1px; background: conic-gradient(from var(--a, 0deg), transparent 70%, #2dd4ae, transparent 85%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin-border 6s linear infinite; pointer-events: none; }
@property --a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin-border { to { --a: 360deg; } }
.chat-body { min-height: 700px; }
.js-motion .chat [data-step] { opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.js-motion .chat [data-step].show { opacity: 1; transform: none; }
/* typing dots take no space: they sit over the (still hidden) reply below, so the page never jumps */
.js-motion .chat .typing-row { height: 0; margin: 0; align-items: flex-start; overflow: visible; position: relative; z-index: 1; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; background: #dcfaf1; border: 1px solid rgba(20, 201, 160,.25); border-radius: 16px; border-bottom-left-radius: 4px; margin-bottom: 10px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #14c9a0; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.slip-thumb .scan { position: absolute; left: 0; right: 0; height: 3px; top: 0; background: linear-gradient(90deg, transparent, #2dd4ae, transparent); box-shadow: 0 0 18px 4px rgba(20, 201, 160,.55); opacity: 0; }
.slip-thumb.scanning .scan { opacity: 1; animation: scan 1.1s ease-in-out 2; }
@keyframes scan { 0% { top: 4%; } 50% { top: 92%; } 100% { top: 4%; } }
.bubble .tick { display: inline-block; animation: pop 0.5s var(--ease); }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ---------- stats strip with counters */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.stats-strip > div { background: var(--card); padding: 24px; }
.stats-strip b { display: block; font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats-strip b em { font-style: normal; color: var(--accent); }
.stats-strip span { color: var(--fg-3); font-size: 14px; }
@media (max-width: 760px) { .stats-strip { grid-template-columns: 1fr 1fr; } }

/* ---------- marquee of banks */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); padding: 6px 0; }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { white-space: nowrap; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--fg-2); font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.marquee-track span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- cards: lift + cursor spotlight */
.feature, .price { position: relative; transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); }
.feature::after, .price::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(20, 201, 160,.12), transparent 60%); }
.feature:hover, .price:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.feature:hover::after, .price:hover::after { opacity: 1; }
.feature .fi { transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.feature:hover .fi { transform: rotate(-8deg) scale(1.12); box-shadow: 0 0 24px rgba(20, 201, 160,.45); }
.price.hot { animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 1px rgba(20, 201, 160,.4), 0 0 40px rgba(20, 201, 160,.18); } }

/* steps: line that draws itself */
.steps { position: relative; }
.steps::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--accent), transparent); transform-origin: top; transform: scaleY(var(--p, 0)); transition: transform 1.2s var(--ease); }
.steps.in::before { --p: 1; }

/* code block typing caret */
.code.live pre::after { content: "▋"; color: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

/* back to top progress bar */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: linear-gradient(90deg, #14b892, #8eeccf); transform-origin: left; transform: scaleX(var(--s, 0)); z-index: 30; }

@media (prefers-reduced-motion: reduce) {
  .js-motion [data-reveal], .js-motion .hero h1 .line > span, .js-motion .hero .fade-seq > *, .js-motion .chat [data-step] { opacity: 1 !important; transform: none !important; animation: none !important; }
  .hero-bg .blob, .hero-bg .grid, .marquee-track, .price.hot, .btn.primary.glow::after, .chat::before, .hero h1 em { animation: none !important; }
}
