// Problema V1 — Focus PRINCIPAL: draft orders / coșuri abandonate.
// Confirmare COD = serviciu paralel, secundar.
const { useState: useStatePV1, useEffect: useEffectPV1, useRef: useRefPV1 } = React;
const lerpPV1 = (a, b, t) => a + (b - a) * t;
const clampPV1 = (v, lo, hi) => Math.max(lo, Math.min(hi, v));
const easeOutPV1 = (t) => 1 - Math.pow(1 - t, 2.2);
const MorphLine = () => {
const ref = useRefPV1(null);
const [p, setP] = useStatePV1(0); // scroll progress 0..1
const [pulseKey, setPulseKey] = useStatePV1(0); // increments each time threshold crossed upward
const wasAbove = useRefPV1(false);
useEffectPV1(() => {
const el = ref.current;
if (!el) return;
let raf = 0;
const update = () => {
raf = 0;
const r = el.getBoundingClientRect();
const vh = window.innerHeight || 1;
const start = vh * 0.95;
const end = vh * 0.35;
const raw = (start - r.top) / (start - end);
const next = clampPV1(raw, 0, 1);
setP(next);
// Re-trigger pulse on every upward crossing through 0.5
// Reset arming when progress drops below 0.35 (hysteresis)
if (next >= 0.5 && !wasAbove.current) {
wasAbove.current = true;
setPulseKey((k) => k + 1);
} else if (next < 0.35 && wasAbove.current) {
wasAbove.current = false;
}
};
const onScroll = () => {
if (!raf) raf = requestAnimationFrame(update);
};
update();
window.addEventListener("scroll", onScroll, { passive: true });
window.addEventListener("resize", onScroll);
return () => {
window.removeEventListener("scroll", onScroll);
window.removeEventListener("resize", onScroll);
if (raf) cancelAnimationFrame(raf);
};
}, []);
const t = easeOutPV1(p);
const blur = lerpPV1(14, 0, t);
const opacity = lerpPV1(0, 1, Math.min(1, t * 1.6));
const ty = lerpPV1(60, 0, t);
const scale = lerpPV1(0.94, 1, t);
const greenAlpha = clampPV1((t - 0.35) / 0.55, 0, 1);
const greenColor = `rgba(52, 211, 153, ${0.55 + 0.45 * greenAlpha})`;
const greenGlow = greenAlpha > 0
? `0 0 ${22 * greenAlpha}px rgba(52,211,153,${0.55 * greenAlpha})`
: "none";
return (
0.05 ? `blur(${blur}px)` : "none",
opacity,
willChange: "transform, filter, opacity",
}}
>
Dacă ai recupera cei{" "}
0 ? "pv1-pulse-once" : ""}
style={{
color: greenColor,
textShadow: greenGlow,
transition: "text-shadow 0.15s ease",
display: "inline-block",
}}
>
11 - 13K €
{" "}
lunar,
cum ar arăta afacerea ta?
);
};
const ProblemaV1 = () => {
const [isMobile, setIsMobile] = useStatePV1(false);
useEffectPV1(() => {
const check = () => setIsMobile(window.innerWidth < 760);
check();
window.addEventListener("resize", check);
return () => window.removeEventListener("resize", check);
}, []);
const secondary = [
{
big: "40%", bigLabel: "comenzi COD neconfirmate",
head: "Fără confirmarea comenzilor, pierzi mii de lei.",
body: "4 din 10 SMS-uri de confirmare sunt către numere invalide, clienți care nu răspund/intră căsuța vocală sau clienți care se răzgândesc fix după ce plasează comanda. Noi trimitem automat SMS pe Whatsapp cu opțiune de Confirmare sau Refuz ca tu să știi sigur dacă trimiți comanda.",
colorRgb: "239,68,68", color: "#ef4444",
},
{
big: "70%", bigLabel: "coșuri abandonate",
head: "7 din 10 clienți abandonează comanda",
body: "Un apel de confirmare convertește 3 din 5 comenzi. Dar nimeni nu are timp să sune sute de comenzi în timp util - mai ales un singur angajat. În funcție de volumul tău de comenzi, noi îți oferim 1,2 sau chiar 3 agenți pentru confirmarea comenzilor.",
colorRgb: "239,68,68", color: "#ef4444",
},
{
big: "1.000€", bigLabel: "salariu lunar / angajat",
head: "Angajații costă, dar nu scalează.",
body: "1000€+ pentru un angajat căruia trebuie să îi faci training, să îi dai pauze, concedii și care omite comenzi și nu lucrează în weekend. Echipa Confirmări.ro sună clienții în fiecare zi, fără training din partea ta, pauze sau concedii de care să îți faci griji.",
colorRgb: "249,115,22", color: "#f97316",
},
];
return (
{/* Soft top fade */}
{/* Top-left indigo blob that continues from Hero's bottom-left blob — seamless bridge (desktop only) */}
{!isMobile && (
)}
Confirmarea Comenzilor Plasate și a Comenzilor Abandonate este{" "}
esențială pentru a avea un{" "}
magazin profitabil.
{/* 3 secondary problems */}
{isMobile ? (
{secondary.map((p, i) => (
))}
) : (
{secondary.map((p, i) => (
{
e.currentTarget.style.borderColor = `rgba(${p.colorRgb},0.45)`;
e.currentTarget.style.transform = "translateY(-4px)";
e.currentTarget.style.boxShadow = `0 24px 60px rgba(0,0,0,0.5), 0 0 30px rgba(${p.colorRgb},0.25)`;
}}
onMouseLeave={(e) => {
e.currentTarget.style.borderColor = `rgba(${p.colorRgb},0.22)`;
e.currentTarget.style.transform = "translateY(0)";
e.currentTarget.style.boxShadow = "0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08)";
}}>
{p.big}
{p.bigLabel}
{p.head}
{p.body}
))}
)}
Dacă ai 3.000 comenzi/lună, minim ~60.000—70.000 RON nu ajung lunar în contul tău.
{/* Bottom fade — masks the grid out and softens the color transition into next section */}
);
};
window.ProblemaV1 = ProblemaV1;