/*
 * Patoo landing motion styles. Tokens (--m-*) are set by motion.js from one
 * MOTION object; the fallbacks here match it so the page still looks right
 * if the script loads late. Only transform and opacity are animated.
 */
:root {
    --m-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --m-micro: 200ms; --m-reveal: 560ms; --m-hero: 1000ms; --m-rise: 20px; --m-swap: 500ms;
}

/* ---------------------------------------------------------------- Reveal */
[data-reveal] { opacity: 0; transform: translateY(var(--m-rise)); transition: opacity var(--m-reveal) var(--m-ease), transform var(--m-reveal) var(--m-ease);
                transition-delay: var(--m-delay, 0ms); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------- Micro: buttons */
.btn-p, .btn-ghost, .btn-light { transition: transform var(--m-micro) var(--m-ease), box-shadow var(--m-micro) var(--m-ease), background-color var(--m-micro), color var(--m-micro), border-color var(--m-micro); }
.btn-p:hover, .btn-ghost:hover, .btn-light:hover { transform: translateY(-2px); }
.btn-p:hover { box-shadow: 0 18px 30px -12px rgba(117,57,255,.7); }
.btn-p:active, .btn-ghost:active, .btn-light:active { transform: scale(.98); }
/* Shine sweep on the primary CTA every ~7s */
.btn-shine { position: relative; overflow: hidden; isolation: isolate; }
.btn-shine::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
    transform: translateX(-120%); animation: m-shine 7s var(--m-ease) 2.5s infinite; }
@keyframes m-shine { 0% { transform: translateX(-120%); } 14%, 100% { transform: translateX(120%); } }

/* Links: underline grows from the left */
.lp-nav .nav-link, .link-grow { position: relative; }
.lp-nav .nav-link::after, .link-grow::after { content: ''; position: absolute; left: .5rem; right: .5rem; bottom: .2rem; height: 2px; border-radius: 2px;
    background: var(--p); transform: scaleX(0); transform-origin: left; transition: transform var(--m-micro) var(--m-ease); }
.lp-nav .nav-link:hover::after, .link-grow:hover::after { transform: scaleX(1); }

/* Cards: lift 4px, border takes the accent colour */
.p-card, .s-card, .f-card, .biz, .card-patoo { transition: transform var(--m-micro) var(--m-ease), box-shadow var(--m-micro) var(--m-ease), border-color var(--m-micro) var(--m-ease) !important; }
.p-card:hover, .s-card:hover, .f-card:hover, .card-patoo:hover { transform: translateY(-4px) !important; }

/* ---------------------------------------------------------------- Navbar */
.lp-nav { transition: transform 360ms var(--m-ease), background-color 300ms, box-shadow 300ms, backdrop-filter 300ms;
          background: transparent !important; backdrop-filter: none !important; }
.lp-nav.is-solid { background: rgba(255,255,255,.88) !important; backdrop-filter: blur(14px) !important; box-shadow: 0 8px 30px -14px rgba(20,20,43,.18); }
.lp-nav.is-hidden { transform: translateY(-110%); }

/* ------------------------------------------------------------------ Hero */
.hero2 { position: relative; padding: 140px 0 70px; overflow: hidden; background: #FBFAFF; }
.hero2 .glow { position: absolute; inset: -20% -10% auto -10%; height: 900px; pointer-events: none; z-index: 0;
    background: radial-gradient(600px 380px at 20% 30%, rgba(117,57,255,.16), transparent 70%),
                radial-gradient(520px 360px at 80% 20%, rgba(18,194,180,.14), transparent 70%),
                radial-gradient(500px 300px at 60% 80%, rgba(255,178,30,.10), transparent 70%);
    animation: m-glow 24s ease-in-out infinite alternate; }
.hero2 .grid-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
    background-image: linear-gradient(rgba(117,57,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(117,57,255,.07) 1px, transparent 1px);
    background-size: 44px 44px; mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 30%, transparent 75%); }
@keyframes m-glow { 0% { transform: translate3d(0,0,0) scale(1); } 100% { transform: translate3d(-3%, 2%, 0) scale(1.06); } }
.hero2 .container { position: relative; z-index: 1; }
.hero2 h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 800; line-height: 1.06; letter-spacing: -.03em; }
.hero2 h1 .hl { background: linear-gradient(90deg, var(--p), #A673FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero2 .wg { display: inline-block; opacity: 0; transform: translateY(18px); transition: opacity var(--m-hero) var(--m-ease), transform var(--m-hero) var(--m-ease); }
.hero2.is-in .wg { opacity: 1; transform: none; }
.hero2 .h-fade { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--m-ease), transform 700ms var(--m-ease); }
.hero2.is-in .h-fade { opacity: 1; transform: none; }

/* Dashboard stage */
.dash-stage { perspective: 1600px; position: relative; margin-top: 56px; }
.dash-frame { position: relative; max-width: 1040px; margin: 0 auto; border-radius: 18px; background: #fff; border: 1px solid #E7E3F3;
    box-shadow: 0 50px 100px -40px rgba(76,40,170,.45), 0 20px 40px -24px rgba(20,20,43,.25);
    opacity: 0; transform: rotateX(8deg) scale(.96) translateY(24px); transform-origin: 50% 0;
    transition: opacity 1100ms var(--m-ease) 250ms, transform 1100ms var(--m-ease) 250ms; }
.hero2.is-in .dash-frame { opacity: 1; transform: translate3d(var(--px,0), var(--py,0), 0); }
.dash-bar { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid #EFEDF6; }
.dash-bar i { width: 11px; height: 11px; border-radius: 50%; background: #E9E6F3; display: inline-block; }
.dash-bar i:nth-child(1) { background: #FF8A7A; } .dash-bar i:nth-child(2) { background: #FFC75A; } .dash-bar i:nth-child(3) { background: #5ED6A0; }
.dash-url { flex: 1; margin: 0 12px; background: #F5F3FA; border-radius: 8px; padding: 5px 12px; font-size: .78rem; color: #8A87A3; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .75rem; font-weight: 700; color: #0A8F84; background: var(--teal-soft); padding: 4px 10px; border-radius: 999px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); position: relative; }
.live-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--teal); animation: m-ping 2s var(--m-ease) infinite; }
@keyframes m-ping { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
.dash-shot { display: block; width: 100%; border-radius: 0 0 18px 18px; }
/* Overlay charts drawn on top of the screenshot's empty chart area */
.dash-overlay { position: absolute; left: 18.4%; right: 1.6%; bottom: 3%; height: 23%; display: grid; grid-template-columns: 1.85fr 1fr; gap: 1.6%; pointer-events: none; }
.dash-overlay .panel { background: #fff; border-radius: 10px; padding: 2% 3%; display: flex; align-items: flex-end; }
.dash-overlay svg { width: 100%; height: 100%; overflow: visible; }
[data-draw] { transition: stroke-dashoffset 1400ms var(--m-ease) 900ms; }
.mini-bars { display: flex; align-items: flex-end; gap: 8%; width: 100%; height: 100%; }
.mini-bars span { flex: 1; border-radius: 5px 5px 2px 2px; transform: scaleY(0); transform-origin: bottom;
    transition: transform 900ms var(--m-ease); background: linear-gradient(180deg, #FFCF6B, #FFB21E); }
.mini-bars span:nth-child(2n) { background: linear-gradient(180deg, #7FE6DC, var(--teal)); }
.mini-bars span:nth-child(3n) { background: linear-gradient(180deg, #B48BFF, var(--p)); }
.mini-bars span.is-grown { transform: scaleY(1); }

/* Floating KPI cards */
.kpi-float { position: absolute; z-index: 3; background: #fff; border: 1px solid #ECE9F5; border-radius: 16px; padding: 12px 16px;
    box-shadow: 0 24px 48px -20px rgba(20,20,43,.35); display: flex; gap: 12px; align-items: center; min-width: 200px;
    opacity: 0; transform: translate3d(var(--fx,0), var(--fy,0), 0) scale(.92);
    transition: opacity 800ms var(--m-ease), transform 800ms var(--m-ease); }
.hero2.is-in .kpi-float { opacity: 1; transform: translate3d(var(--px,0), var(--py,0), 0); }
.kpi-float .drift { display: flex; gap: 12px; align-items: center; animation: m-drift 7s ease-in-out infinite; animation-delay: var(--dd, 0s); }
@keyframes m-drift { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.kpi-float .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; flex: 0 0 auto; }
.kpi-float small { display: block; color: var(--muted); font-size: .74rem; font-weight: 600; }
.kpi-float b { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.08rem; color: var(--ink); white-space: nowrap; }
.kpi-float .chg { font-size: .72rem; font-weight: 700; margin-left: 4px; }
.kf-1 { left: -2%; top: 18%; --fx: 60px; transition-delay: 900ms; --dd: 0s; }
.kf-2 { right: -2%; top: 10%; --fx: -60px; transition-delay: 1050ms; --dd: 1.6s; }
.kf-3 { left: 3%; bottom: 14%; --fx: 60px; transition-delay: 1200ms; --dd: 3s; }
.kf-4 { right: 2%; bottom: 22%; --fx: -60px; transition-delay: 1350ms; --dd: 4.4s; }
@media (max-width: 991px) {
    .kpi-float { min-width: 0; padding: 8px 10px; border-radius: 12px; }
    .kpi-float .ic { width: 30px; height: 30px; font-size: .95rem; }
    .kpi-float b { font-size: .85rem; } .kpi-float small { font-size: .62rem; }
    .kf-1 { left: -6px; top: 6%; } .kf-2 { right: -6px; top: 30%; } .kf-3, .kf-4 { display: none; }
}

/* ------------------------------------------------------ Phone showcase */
.showcase .container { overflow: visible !important; }
.showcase { position: relative; transition: background-color 600ms var(--m-ease); --accent: #16A34A; }
.showcase::before { content: ''; position: absolute; inset: 0; background: var(--accent); opacity: .06; transition: background-color 600ms var(--m-ease); pointer-events: none; }
.sc-item { position: relative; padding: 26px 26px 26px 30px; border-radius: 20px; margin-bottom: 18px; background: rgba(255,255,255,.6);
    border: 1px solid transparent; transition: background-color 300ms, border-color 300ms, opacity 300ms; opacity: .55; cursor: default; }
.sc-item.is-active { opacity: 1; background: #fff; border-color: color-mix(in srgb, var(--item-accent) 35%, transparent); box-shadow: 0 20px 40px -26px rgba(20,20,43,.35); }
.sc-item .sc-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem;
    color: var(--item-accent); background: color-mix(in srgb, var(--item-accent) 12%, #fff); margin-bottom: 12px; }
.sc-item h3 { font-size: 1.2rem; font-weight: 800; margin: 0 0 .4rem; }
.sc-item p { color: var(--muted); margin: 0; line-height: 1.65; }
.sc-progress { position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 3px; background: #ECE9F5; overflow: hidden; }
.sc-progress::after { content: ''; position: absolute; inset: 0; background: var(--item-accent); transform-origin: top; transform: scaleY(var(--progress, 0)); }
@media (min-width: 992px) {
    .sc-list .sc-item { min-height: 46vh; display: flex; flex-direction: column; justify-content: center; }
    .showcase .row.g-5 { align-items: stretch !important; }
    .sc-sticky { position: -webkit-sticky; position: sticky; top: 12vh; height: 76vh; display: flex; align-items: center; justify-content: center; }
}
.sc-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 14px; }
.sc-tabs::-webkit-scrollbar { display: none; }
.sc-tab { flex: 0 0 auto; border: 1px solid #E6E2F2; background: #fff; border-radius: 999px; padding: .5rem 1rem; font-weight: 600; font-size: .88rem; color: var(--ink);
    transition: background-color var(--m-micro), color var(--m-micro), border-color var(--m-micro); }
.sc-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Phone mockup */
.phone { position: relative; width: 300px; height: 610px; border-radius: 46px; background: #14142B; padding: 12px;
    box-shadow: 0 50px 90px -40px rgba(20,20,43,.6), inset 0 0 0 2px #2B2B47; }
.phone::before { content: ''; position: absolute; top: 20px; left: 50%; width: 92px; height: 24px; transform: translateX(-50%); background: #14142B; border-radius: 14px; z-index: 5; }
.phone-inner { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #F7F6FB; }
.phone-screen { position: absolute; inset: 0; padding: 52px 16px 16px; opacity: 0; transform: translateY(20px); pointer-events: none;
    transition: opacity var(--m-swap) var(--m-ease), transform var(--m-swap) var(--m-ease); }
.phone-screen.is-active { opacity: 1; transform: none; pointer-events: auto; }
.ps-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ps-head b { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.05rem; }
.ps-chip { font-size: .68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #fff; background: var(--sa); }
.ps-card { background: #fff; border-radius: 16px; padding: 12px; margin-bottom: 10px; box-shadow: 0 6px 16px -10px rgba(20,20,43,.2); position: relative; }
.ps-row { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; }
.ps-muted { color: #8A87A3; font-size: .72rem; }
.ps-big { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 1.5rem; }
.ps-btn { display: block; text-align: center; border-radius: 12px; padding: 10px; font-weight: 700; color: #fff; background: var(--sa); font-size: .85rem; }
.cart-item { opacity: 0; transform: translateX(16px); transition: opacity 400ms var(--m-ease), transform 400ms var(--m-ease); }
.cart-item.is-in { opacity: 1; transform: none; }
.thumb { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-right: 10px; font-size: 1rem; background: color-mix(in srgb, var(--sa) 14%, #fff); color: var(--sa); flex: 0 0 auto; }
.stock-row { margin-bottom: 10px; } .stock-row .ps-row { margin-bottom: 4px; }
.stock-track { height: 8px; border-radius: 8px; background: #EEECF5; overflow: hidden; }
.stock-fill { height: 100%; border-radius: 8px; background: var(--sa); transform-origin: left; transition: transform 900ms var(--m-ease), background-color 400ms; }
.stock-fill.is-low { transform: scaleX(.12) !important; background: #DC2626; }
.stock-alert { display: inline-flex; gap: 6px; align-items: center; background: #FEE2E2; color: #B91C1C; font-weight: 700; font-size: .72rem; border-radius: 999px; padding: 4px 10px;
    opacity: 0; transform: scale(.8); transition: opacity 300ms var(--m-ease), transform 300ms var(--m-ease); }
.stock-alert.is-in { opacity: 1; transform: none; }
.loss-line { transition: stroke-dashoffset 1100ms var(--m-ease); }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-item { background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 6px 16px -10px rgba(20,20,43,.2); }
.cat-img { height: 64px; border-radius: 10px; display: grid; place-items: center; font-size: 1.6rem; color: #fff; margin-bottom: 6px; }
.wa-top { background: #075E54; color: #fff; margin: -52px -16px 10px; padding: 52px 14px 10px; display: flex; gap: 8px; align-items: center; }
.wa-av { width: 30px; height: 30px; border-radius: 50%; background: #25D366; display: grid; place-items: center; font-weight: 700; }
.wa-body { background: #ECE5DD; margin: 0 -16px -16px; padding: 10px 12px; height: calc(100% - 46px); }
.wa-step { opacity: 0; transform: translateY(10px); transition: opacity 350ms var(--m-ease), transform 350ms var(--m-ease); max-height: 120px; }
.wa-step.is-in { opacity: 1; transform: none; }
.wa-step.is-gone { opacity: 0; max-height: 0; margin: 0 !important; padding: 0 !important; overflow: hidden; transition: opacity 200ms, max-height 200ms; }
.wa-bub { max-width: 82%; padding: 7px 10px; border-radius: 10px; font-size: .78rem; margin-bottom: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wa-in { background: #fff; border-top-left-radius: 2px; }
.wa-out { background: #DCF8C6; margin-left: auto; border-top-right-radius: 2px; }
.wa-typing { display: inline-flex; gap: 3px; background: #fff; padding: 9px 12px; border-radius: 10px; margin-bottom: 8px; }
.wa-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9AA0A6; animation: m-dot 1s infinite; }
.wa-typing i:nth-child(2) { animation-delay: .15s; } .wa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes m-dot { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }
.wa-order { background: #fff; border-left: 4px solid #25D366; border-radius: 10px; padding: 9px 10px; font-size: .78rem; }

/* Callouts and highlight rings */
.callout { position: absolute; z-index: 6; display: flex; align-items: center; pointer-events: none; }
.callout .line { height: 2px; width: 46px; background: var(--sa); transform: scaleX(0); transition: transform var(--m-calloutLine, 300ms) var(--m-ease); }
.callout .lbl { background: #14142B; color: #fff; font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap;
    opacity: 0; transition: opacity 260ms var(--m-ease) 300ms; box-shadow: 0 10px 20px -10px rgba(20,20,43,.6); }
.callout .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sa); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sa) 25%, transparent); flex: 0 0 auto; }
.callout.left { flex-direction: row-reverse; } .callout.left .line { transform-origin: right; } .callout.right .line { transform-origin: left; }
.callout.is-in .line { transform: scaleX(1); } .callout.is-in .lbl { opacity: 1; }
.callout-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.callout-layer .callout { transform: translateY(-50%); background: none !important; box-shadow: none !important; padding: 0 !important; }
.callout.right { left: calc(100% - 10px); } .callout.left { right: calc(100% - 10px); }
.callout .dot { box-shadow: 0 0 0 4px #fff, 0 0 0 6px color-mix(in srgb, var(--sa) 35%, transparent); }
@media (max-width: 991px) { .callout { display: none; } }
.ring { position: absolute; inset: -4px; border-radius: inherit; pointer-events: none; box-shadow: 0 0 0 0 color-mix(in srgb, var(--sa) 55%, transparent); }
.ring.is-pulsing { animation: m-ring 1.2s var(--m-ease) 2; animation-delay: .5s; }
@keyframes m-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--sa) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }

/* ---------------------------------------------------------- Marquee */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 24px; width: max-content; animation: m-marquee 60s linear infinite; }
.marquee:hover .marquee-track, .marquee.is-paused-offscreen .marquee-track { animation-play-state: paused; }
.marquee-track > * { width: 360px; flex: 0 0 auto; }
@keyframes m-marquee { to { transform: translateX(-50%); } }

/* Pause ambient loops off-screen */
[data-ambient].is-offscreen .glow, [data-ambient].is-offscreen .drift, [data-ambient].is-offscreen .live-dot::after,
[data-ambient].is-offscreen .btn-shine::after { animation-play-state: paused; }

/* ----------------------------------------------------- Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
.m-reduce [data-reveal], .m-reduce .hero2 .wg, .m-reduce .hero2 .h-fade, .m-reduce .dash-frame, .m-reduce .kpi-float,
.m-reduce .cart-item, .m-reduce .wa-step, .m-reduce .callout .line, .m-reduce .callout .lbl, .m-reduce .stock-alert { opacity: 1 !important; transform: none !important; }
.m-reduce .mini-bars span { transform: scaleY(1) !important; }
/* Only the active screen's callouts are visible */
.callout-layer:not(.is-active) .callout { opacity: 0; }
