/* Kuantar motion layer — animated hero, scroll reveals, glow cards, marquee.
 * Pure CSS + /js/motion.js (no inline scripts, CSP-safe). Everything calms down under
 * prefers-reduced-motion, and content stays visible when JavaScript is off. */

@keyframes k-rise { from { opacity: 0; transform: translateY(28px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes k-pop { 0% { opacity: 0; transform: translateY(14px) scale(.6); } 70% { transform: translateY(-3px) scale(1.06); } 100% { opacity: 1; transform: none; } }
@keyframes k-drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(80px, -60px) scale(1.15); } 66% { transform: translate(-40px, 50px) scale(.92); } }
@keyframes k-drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-120px, 70px) scale(1.2); } }
@keyframes k-drift3 { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(60px, 80px) rotate(30deg); } }
@keyframes k-float-up { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-110vh) scale(1.2); opacity: 0; } }
@keyframes k-shimmer { to { background-position: 200% center; } }
@keyframes k-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes k-dash { to { stroke-dashoffset: 0; } }
@keyframes k-ring { 0% { r: 8; opacity: .9; } 100% { r: 22; opacity: 0; } }
@keyframes k-typing { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes k-marquee { to { transform: translateX(-50%); } }
@keyframes k-spin { to { transform: rotate(360deg); } }
@keyframes k-shine { 0% { transform: translateX(-120%) skewX(-20deg); } 60%, 100% { transform: translateX(220%) skewX(-20deg); } }
@keyframes k-wheel { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(10px); opacity: 0; } }
@keyframes k-aurora { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes k-glow { 0%, 100% { text-shadow: 0 0 12px rgba(255, 194, 26, .45); } 50% { text-shadow: 0 0 26px rgba(255, 194, 26, .9), 0 0 4px #fff; } }
@keyframes k-bubble { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes k-orb { 0% { box-shadow: 0 0 0 0 rgba(106, 43, 217, .45); } 100% { box-shadow: 0 0 0 14px rgba(106, 43, 217, 0); } }

/* ------------------------------------------------------------------ header */
.site-header { transition: box-shadow .3s, background .3s; }
.site-header.scrolled { box-shadow: 0 10px 30px rgba(11, 20, 55, .08); background: rgba(255, 255, 255, .82); }
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--accent), #FF7300, #6A2BD9, var(--primary)); }

/* ------------------------------------------------------------------ hero */
.hero.hero-x { background: linear-gradient(160deg, #061566 0%, #0B27A8 35%, #1E46E6 70%, #3A6BFF 100%); padding: 84px 0 140px; isolation: isolate; }
.hero.hero-x::after { display: none; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-bg .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; mix-blend-mode: screen; }
.hero-bg .b1 { width: 520px; height: 520px; left: -120px; top: -160px; background: #6A2BD9; animation: k-drift1 18s ease-in-out infinite; }
.hero-bg .b2 { width: 460px; height: 460px; right: -100px; top: 10%; background: #00B3FF; animation: k-drift2 22s ease-in-out infinite; }
.hero-bg .b3 { width: 380px; height: 380px; left: 35%; bottom: -200px; background: #FFC21A; opacity: .28; animation: k-drift3 26s ease-in-out infinite; }
.hero-grid-lines { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%); }
.hero-bg .spot { position: absolute; inset: 0; background: radial-gradient(500px circle at var(--mx, 70%) var(--my, 30%), rgba(255, 255, 255, .16), transparent 45%); transition: background .1s; }
.particles i { position: absolute; bottom: -20px; left: calc(var(--i) * 5.6%); width: calc(3px + (var(--i) % 4) * 2px); height: calc(3px + (var(--i) % 4) * 2px); border-radius: 50%; background: rgba(255, 255, 255, .75); box-shadow: 0 0 10px rgba(255, 255, 255, .8); animation: k-float-up calc(9s + (var(--i) % 5) * 3s) linear infinite; animation-delay: calc(var(--i) * -1.3s); }
.particles i:nth-child(3n) { background: rgba(255, 194, 26, .9); box-shadow: 0 0 12px rgba(255, 194, 26, .9); }

.rise { display: inline-block; opacity: 0; animation: k-rise .9s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: var(--d, 0s); }
.hero-ai.rise, .lead.rise, .hero-cta.rise, .hero-stats.rise { display: flex; }
.hero-ai.rise { display: inline-flex; }
.lead.rise { display: block; }
.hero-visual.rise { display: block; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-title { font-size: clamp(2.2rem, 4.4vw, 3.45rem); letter-spacing: -.025em; }
.shimmer { background: linear-gradient(90deg, #FFC21A 0%, #FFE58A 25%, #FF9F1A 50%, #FFE58A 75%, #FFC21A 100%); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: k-rise .9s cubic-bezier(.2, .7, .2, 1) forwards, k-shimmer 4s linear infinite; animation-delay: var(--d, 0s), 1.2s; }
.ai-glow { color: var(--accent) !important; animation: k-glow 2.6s ease-in-out infinite; }

.glass-btn { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(10px); }
.glass-btn:hover { background: rgba(255, 255, 255, .22); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent); transform: translateX(-120%) skewX(-20deg); animation: k-shine 3.4s ease-in-out infinite; z-index: -1; }
.btn.accent.btn-shine { box-shadow: 0 10px 30px rgba(255, 194, 26, .35); }
[data-magnetic] { transition: transform .25s cubic-bezier(.2, .7, .2, 1), background .15s, box-shadow .15s; }

.tilt { transform-style: preserve-3d; transition: transform .35s cubic-bezier(.2, .7, .2, 1); will-change: transform; }
.glass-card { background: rgba(255, 255, 255, .9); backdrop-filter: blur(18px) saturate(160%); border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 30px 80px rgba(3, 12, 70, .45), inset 0 1px 0 rgba(255, 255, 255, .8); }
.hero-card.glass-card { padding: 16px; }

.mini-map { position: relative; height: 150px; border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, #EAF0FF, #F5F8FF); border: 1px solid var(--outline-soft); }
.mini-map svg { width: 100%; height: 100%; }
.mini-map .streets path { stroke: #fff; stroke-width: 10; fill: none; stroke-linecap: round; }
.mini-map .blocks rect { fill: #DCE5FB; }
.mini-map .route-bg { fill: none; stroke: rgba(30, 70, 230, .15); stroke-width: 9; stroke-linecap: round; }
.mini-map .route { fill: none; stroke: url(#routeGrad); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 520; stroke-dashoffset: 520; animation: k-dash 2.2s .8s cubic-bezier(.6, 0, .2, 1) forwards; }
.mini-map .pin-pick circle { fill: #16A34A; }
.mini-map .pin-drop circle { fill: #DC2626; }
.mini-map .ring { fill: none !important; stroke-width: 2; animation: k-ring 1.8s ease-out infinite; }
.mini-map .pin-pick .ring { stroke: #16A34A; }
.mini-map .pin-drop .ring { stroke: #DC2626; }
.mini-map .rider circle { fill: #1E46E6; stroke: #fff; stroke-width: 3; filter: drop-shadow(0 4px 6px rgba(30, 70, 230, .5)); }
.mini-map .rider text { fill: #fff; font-family: 'Material Symbols Rounded'; font-variation-settings: 'FILL' 1; }
.map-live { position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px; background: rgba(11, 20, 55, .82); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.map-live .dot { width: 7px; height: 7px; border-radius: 50%; background: #FF4D4D; animation: pulse 1.4s infinite; }
.map-eta { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--ink); font-size: .8rem; font-weight: 600; padding: 6px 10px; border-radius: 12px; box-shadow: var(--shadow-2); }
.map-eta .ms { color: var(--success); }

.svc.pop { opacity: 0; animation: k-pop .6s cubic-bezier(.2, .7, .2, 1.2) forwards; animation-delay: var(--d, 0s); }
.hero-card .svc .ic { transition: transform .3s cubic-bezier(.2, .7, .2, 1.4), box-shadow .3s; }
.hero-card .svc:hover .ic { transform: translateY(-5px) rotate(-6deg) scale(1.08); box-shadow: 0 12px 24px -6px var(--c, var(--primary)); }
.va-row { position: relative; }
.ai-orb { background: linear-gradient(135deg, #1E46E6, #6A2BD9) !important; color: #fff !important; animation: k-orb 2s ease-out infinite; }
.typing { display: inline-flex; gap: 4px; margin-left: auto; padding: 8px 10px; background: var(--surface-2); border-radius: 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); animation: k-typing 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

.bob { animation: k-bob 5s ease-in-out infinite; animation-delay: var(--bd, 0s); }
.hero-float { backdrop-filter: blur(10px); background: rgba(255, 255, 255, .95); border: 1px solid rgba(255, 255, 255, .8); z-index: 2; }
.hero-float.f3 { left: -54px; top: 20%; }

.scroll-cue { position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 2; opacity: .85; }
.scroll-cue .mouse { display: block; width: 26px; height: 40px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 14px; position: relative; }
.scroll-cue .mouse span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: k-wheel 1.6s ease-in-out infinite; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 90px; z-index: 1; }
.hero-wave path { fill: var(--bg); }
@media (max-width: 960px) {
  .hero.hero-x { padding: 48px 0 110px; }
  .scroll-cue { display: none; }
  .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
}

/* ------------------------------------------------------------------ marquee */
.marquee { overflow: hidden; padding: 18px 0; background: var(--bg); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: k-marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-item { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 10px; background: var(--surface); border: 1px solid var(--outline-soft); border-radius: 999px; font-weight: 600; color: var(--ink); white-space: nowrap; box-shadow: var(--shadow-1); }
.mq-item .ic { width: 30px; height: 30px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.mq-item.alt { padding-left: 16px; color: var(--primary-700); background: var(--primary-50); border-color: var(--primary-100); }

/* ------------------------------------------------------------------ reveal on scroll */
.motion .reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.motion .in .reveal, .motion .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ glow cards */
.glow-card { position: relative; isolation: isolate; transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s; }
.glow-card::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--a, 0deg), transparent 0 60%, var(--c, var(--primary)) 75%, var(--accent) 85%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity .35s; pointer-events: none; z-index: 1; }
.glow-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(380px circle at var(--x, 50%) var(--y, 50%), color-mix(in srgb, var(--c, var(--primary)) 12%, transparent), transparent 55%); opacity: 0; transition: opacity .35s; pointer-events: none; z-index: -1; }
.glow-card:hover::before, .glow-card:hover::after { opacity: 1; }
.glow-card:hover::before { animation: k-angle 3s linear infinite; }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes k-angle { to { --a: 360deg; } }
.glow-card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -18px rgba(11, 39, 168, .35); }
.feature.glow-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--outline-soft); }
.grad-ic { background: linear-gradient(135deg, var(--primary), #6A2BD9) !important; color: #fff !important; box-shadow: 0 10px 20px -8px rgba(30, 70, 230, .6); transition: transform .4s cubic-bezier(.2, .7, .2, 1.4); }
.feature.glow-card:hover .grad-ic { transform: rotate(-8deg) scale(1.1); }
.svc-card.glow-card::after { background: radial-gradient(380px circle at var(--x, 50%) var(--y, 50%), color-mix(in srgb, var(--c) 14%, transparent), transparent 55%); width: auto; height: auto; right: 0; top: 0; }
.svc-card .ic { transition: transform .45s cubic-bezier(.2, .7, .2, 1.4), box-shadow .45s; }
.svc-card:hover .ic { transform: translateY(-6px) rotate(-8deg) scale(1.08); box-shadow: 0 16px 30px -10px var(--c); }
.arrow { transition: transform .3s; }
.card-link:hover .arrow, .btn:hover .arrow { transform: translateX(5px); }

/* ------------------------------------------------------------------ how it works */
.flow { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.flow-line { position: absolute; left: 12.5%; right: 12.5%; top: 36px; height: 3px; background: var(--outline-soft); border-radius: 3px; overflow: hidden; }
.flow-line span { position: absolute; inset: 0; background: linear-gradient(90deg, var(--primary), #6A2BD9, var(--accent)); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.6s cubic-bezier(.6, 0, .2, 1) .3s; }
.flow.in .flow-line span, .flow:not([data-reveal]) .flow-line span { transform: scaleX(1); }
.flow-step { text-align: center; position: relative; }
.flow-ic { position: relative; width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 22px; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--primary), #6A2BD9); box-shadow: 0 16px 30px -12px rgba(30, 70, 230, .7); transition: transform .4s cubic-bezier(.2, .7, .2, 1.4); }
.flow-ic .ms { font-size: 32px; }
.flow-ic b { position: absolute; right: -8px; top: -8px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--ink); font: 800 .85rem/28px var(--font-display); box-shadow: 0 0 0 4px var(--surface); }
.flow-step:hover .flow-ic { transform: translateY(-6px) rotate(6deg); }
@media (max-width: 960px) { .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flow-line { display: none; } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ AI band */
.aurora { background: linear-gradient(120deg, #071A6E, #1E46E6, #6A2BD9, #0B27A8, #071A6E); background-size: 300% 300%; animation: k-aurora 14s ease infinite; }
.aurora::before { content: ''; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; background: conic-gradient(from 0deg, rgba(255, 194, 26, .0), rgba(255, 194, 26, .35), rgba(0, 179, 255, .25), rgba(255, 194, 26, 0)); filter: blur(40px); animation: k-spin 16s linear infinite; pointer-events: none; }
.ai-band > * { position: relative; z-index: 1; }
.motion .chat-seq .bubble { opacity: 0; }
.motion .in .chat-seq .bubble, .motion .chat-seq.in .bubble { animation: k-bubble .55s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: var(--d, 0s); }
.typing-bubble .typing { background: none; padding: 2px 0; margin: 0; }
.ai-chat-demo { backdrop-filter: blur(8px); }

/* ------------------------------------------------------------------ misc */
.chip-hover { transition: transform .25s, background .25s, color .25s, box-shadow .25s; cursor: default; }
.chip-hover:hover { transform: translateY(-3px); background: var(--primary); color: #fff; box-shadow: 0 10px 20px -10px rgba(30, 70, 230, .8); }
.partner-card { overflow: hidden; }
.cta-animated { position: relative; overflow: hidden; background: linear-gradient(120deg, #FFC21A, #FFD54A, #FF9F1A, #FFC21A); background-size: 300% 300%; animation: k-aurora 10s ease infinite; }
.cta-animated::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 36px solid rgba(255, 255, 255, .25); animation: k-bob 6s ease-in-out infinite; pointer-events: none; }
.cta-animated > * { position: relative; z-index: 1; }
.app-card[data-tilt] { transform-style: preserve-3d; }

/* Lighter on phones: fewer particles, cheaper blur. */
@media (max-width: 640px) {
  .particles i:nth-child(n+9) { display: none; }
  .hero-bg .blob { filter: blur(48px); mix-blend-mode: normal; opacity: .4; }
  .hero-bg .b1, .hero-bg .b2 { width: 300px; height: 300px; }
  .hero-float.f3 { display: none; }
}

/* ------------------------------------------------------------------ calm mode */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .particles, .hero-bg .blob, .scroll-cue { display: none; }
  .rise, .svc.pop, .motion .reveal, .motion .chat-seq .bubble { opacity: 1 !important; transform: none !important; filter: none !important; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .mini-map .route { stroke-dashoffset: 0; }
}
