레퍼런스(statworx·jitter·infinith) 실측값으로 디자인 시스템을 다시 잡고, 스크롤 재생형 콘솔을 사용자가 직접 협상하는 데모로 교체했다. 디자인 토큰 - 타이포: 굵기·크기·자간을 함께 조정(섹션 제목 44→64px/600→800/자간 -0.042em). 한글 행간은 1.07 — 라틴 기준 0.95 를 쓰면 네모틀이 꽉 차 줄이 닿는다. - 모서리: 12가지로 흩어져 있던 값을 card 8px / control 4px / full 셋으로 수렴. 20~32px 짜리 뭉툭한 카드가 제네릭 SaaS 의 가장 강한 신호였다. - 다크 무대 토큰 신설(stage/on-stage/counter) + 배경 그라데이션. - primary-on-stage(#7C8CFF) 추가 — #0101F3 은 무대 배경 대비 2.0:1 로 WCAG 최소(4.5:1)의 절반도 안 돼 다크 위에서 읽히지 않았다. - 영문 디스플레이 서체 Playfair Display self-host(latin 서브셋 39KB). 히어로 - 배경 캔버스가 실제 파이프라인을 그린다: 수집→분류→대조→산정→협상→학습. 분류 단계는 거래 품목(시트)·사용자·협력사로 갈라지고 라벨이 붙는다. - z 좌표 + 원근 투영. 군집마다 z 평면을 하나씩 줘 격자는 온전한 채 깊이만 생긴다. - 순환 링(정원, 점선 궤도 회전). 진행도는 ref 로 공유해 60fps 리렌더를 피한다. - 카피에 진입 애니메이션을 걸지 않는다 — LCP 요소라 opacity:0 으로 시작하면 하이드레이션 전까지 첫 화면이 빈다. 협상 데모 (신규) - 역할 선택(공급사/구매 담당자) → 품목·단가 제시 → 턴 협상 → 낙찰/개찰 → 상담 신청. - 판정 규칙은 실제 엔진과 동일: 앵커링가 이하 낙찰, 협상 카드 3장, 소진 시 개찰. - 로직은 lib/negotiation-sim.ts 순수 함수로 분리 — 나중에 agent 서비스 연동 시 컴포넌트를 건드리지 않는다. 카피 감사 - "봇" 21곳 → "에이전트"(로봇 아이콘 3개 포함). 대리인은 조달 실무의 정당한 역할이다. - "악역은 봇이", "단가를 깎는 악역" 제거 — 협력사를 적으로 규정하는 프레임은 같은 페이지 FAQ(공급사 만족도 82%)와 모순이고, 동반성장 평가를 받는 대기업 구매팀 결재 라인에 올릴 수 없다. - 번역투 최상급(초정밀·압도적·완벽히·최적의)과 데모 대화문 전면 재작성. 버그 수정 - 헤더가 흰 배경 위에 흰 글자 버튼을 그리던 문제. onStage 를 스크롤 수치로 계산해 하이드레이션 전 스크롤 복원 시 초기값이 굳었다 → IntersectionObserver 로 교체. - 버튼 transition-all → transition-colors (variant 교체 시 배경 플리커). - 폼 입력 14px → 16px. iOS 사파리는 16px 미만 입력에 포커스하면 화면을 확대해 모바일 폼 이탈을 만든다. 정리 - 대체된 히어로 3종·기존 협상 콘솔 삭제(약 760줄). - 라벨 아이콘·알약 배지·blur(120px) 글로우 블롭 제거. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
176 lines
6.5 KiB
TypeScript
176 lines
6.5 KiB
TypeScript
import { useEffect, useRef, useState } from "react"
|
|
import { AnimatePresence, motion } from "motion/react"
|
|
import { Clock, Database, Handshake, Scale, TrendingUp, UserRound, type LucideIcon } from "lucide-react"
|
|
|
|
import { Section } from "@/components/ui/section"
|
|
import { SectionHeading } from "@/components/ui/section-heading"
|
|
import { Typography } from "@/components/ui/typography"
|
|
import { useFadeUp } from "@/lib/motion"
|
|
|
|
/** 기존 방식 ↔ 도입 후 토글 비교 — 화면 진입 시 자동으로 오가고, 누르면 잠시 수동(8초 후 자동 재개). */
|
|
export function Comparison() {
|
|
const fadeUp = useFadeUp()
|
|
const toggleFadeUp = useFadeUp(0.1)
|
|
const [mode, setMode] = useState<Mode>("before")
|
|
// 사용자가 토글을 누르면 잠시 자동 전환 중단, 8초 무조작 시 재개
|
|
const [locked, setLocked] = useState(false)
|
|
const [inView, setInView] = useState(false)
|
|
const sectionRef = useRef<HTMLDivElement>(null)
|
|
const lockTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)
|
|
|
|
const selectMode = (key: Mode) => {
|
|
setMode(key)
|
|
setLocked(true)
|
|
if (lockTimerRef.current) clearTimeout(lockTimerRef.current)
|
|
lockTimerRef.current = setTimeout(() => setLocked(false), 8000)
|
|
}
|
|
|
|
useEffect(() => {
|
|
const el = sectionRef.current
|
|
if (!el) return
|
|
const observer = new IntersectionObserver(([entry]) => setInView(entry.isIntersecting), { threshold: 0.35 })
|
|
observer.observe(el)
|
|
return () => {
|
|
observer.disconnect()
|
|
if (lockTimerRef.current) clearTimeout(lockTimerRef.current)
|
|
}
|
|
}, [])
|
|
|
|
useEffect(() => {
|
|
if (!inView || locked) return
|
|
const timer = setInterval(() => setMode((m) => (m === "before" ? "after" : "before")), 3000)
|
|
return () => clearInterval(timer)
|
|
}, [inView, locked])
|
|
|
|
return (
|
|
<Section id="comparison">
|
|
<motion.div {...fadeUp} className="mb-12">
|
|
<SectionHeading
|
|
align="center"
|
|
eyebrow="Before & After"
|
|
title="협상 방식을 바꾸면, 무엇이 달라질까요"
|
|
description="기존 가격 협상의 문제는 사람이 아니라 구조입니다."
|
|
descriptionClassName="mt-4 text-[17px] max-w-2xl"
|
|
/>
|
|
</motion.div>
|
|
|
|
{/* 모드 토글 — 이용 가이드 탭과 같은 세그먼트 문법 */}
|
|
<motion.div {...toggleFadeUp} className="flex justify-center mb-14">
|
|
{/* 액티브를 bg-white 로 두면 트랙(bg-fill #F0F2F8) 과 거의 같은 밝기라
|
|
멀리서 어느 쪽이 켜졌는지 안 보인다. 채움색으로 확실히 갈라준다. */}
|
|
<div className="p-1.5 bg-fill rounded-full inline-flex gap-1.5">
|
|
{MODES.map((m) => (
|
|
<button
|
|
key={m.key}
|
|
onClick={() => selectMode(m.key)}
|
|
className={`px-7 py-3 rounded-full text-[15px] font-semibold transition-colors cursor-pointer ${
|
|
mode === m.key ? "bg-primary text-white" : "text-ink-muted hover:text-ink"
|
|
}`}
|
|
>
|
|
<span>{m.label}</span>
|
|
</button>
|
|
))}
|
|
</div>
|
|
</motion.div>
|
|
|
|
<div ref={sectionRef} className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
{ITEMS.map((item, idx) => (
|
|
<CompareCard key={item.label} item={item} mode={mode} index={idx} />
|
|
))}
|
|
</div>
|
|
</Section>
|
|
)
|
|
}
|
|
|
|
type Mode = "before" | "after"
|
|
|
|
const MODES: { key: Mode; label: string }[] = [
|
|
{ key: "before", label: "기존 방식" },
|
|
{ key: "after", label: "negotium 도입 후" },
|
|
]
|
|
|
|
type CompareItem = { label: string; icon: LucideIcon; before: string; after: string }
|
|
|
|
function CompareCard({ item, mode, index }: { item: CompareItem; mode: Mode; index: number }) {
|
|
const fadeUp = useFadeUp(0.06 * (index + 1))
|
|
const active = mode === "after"
|
|
|
|
return (
|
|
<motion.div
|
|
{...fadeUp}
|
|
className={`p-7 rounded-card flex flex-col gap-5 transition-colors duration-500 ${
|
|
active ? "bg-primary-soft/60" : "bg-surface"
|
|
}`}
|
|
>
|
|
<div className="flex items-center justify-between">
|
|
<div
|
|
className={`w-11 h-11 rounded-card flex items-center justify-center transition-colors duration-500 ${
|
|
active ? "bg-primary/10 text-primary" : "bg-ink-muted/10 text-ink-muted"
|
|
}`}
|
|
>
|
|
<item.icon className="w-5 h-5" />
|
|
</div>
|
|
<Typography variant="micro" className={active ? "text-primary" : ""}>
|
|
{item.label}
|
|
</Typography>
|
|
</div>
|
|
|
|
{/* 전환 시 레이아웃 점프 방지용 최소 높이 */}
|
|
<div className="min-h-[72px]">
|
|
<AnimatePresence mode="wait">
|
|
<motion.div
|
|
key={mode}
|
|
initial={{ opacity: 0, y: 10 }}
|
|
animate={{ opacity: 1, y: 0 }}
|
|
exit={{ opacity: 0, y: -8 }}
|
|
transition={{ duration: 0.28, delay: 0.05 * index }}
|
|
>
|
|
<Typography variant="small" className={active ? "text-ink font-semibold" : "text-ink-muted"}>
|
|
{active ? item.after : item.before}
|
|
</Typography>
|
|
</motion.div>
|
|
</AnimatePresence>
|
|
</div>
|
|
</motion.div>
|
|
)
|
|
}
|
|
|
|
const ITEMS: CompareItem[] = [
|
|
{
|
|
label: "거래 시간",
|
|
icon: Clock,
|
|
before: "일일 거래의 한계 — 사람의 인력과 시간만큼만 협상합니다.",
|
|
after: "24시간 연중무휴, 전 품목·전 공급사와 동시에 협상합니다.",
|
|
},
|
|
{
|
|
label: "협상 성과",
|
|
icon: TrendingUp,
|
|
before: "담당자의 역량·감정·컨디션에 따라 성과가 흔들립니다.",
|
|
after: "전략 강화 학습으로 기준선이 상승하고, 점진적으로 개선됩니다.",
|
|
},
|
|
{
|
|
label: "노하우",
|
|
icon: Database,
|
|
before: "잘 깎는 노하우가 개인의 머릿속에만 남습니다.",
|
|
after: "모든 협상이 데이터로 축적되어 다음 전략에 재활용됩니다.",
|
|
},
|
|
{
|
|
label: "사람",
|
|
icon: UserRound,
|
|
before: "반복 협상에 시간을 뺏겨 전략 업무가 계속 밀립니다.",
|
|
after: "반복 협상은 에이전트가 맡고, 담당자는 전략 구매와 대형 건에 집중합니다.",
|
|
},
|
|
{
|
|
label: "파트너 관계",
|
|
icon: Handshake,
|
|
before: "담당자마다 기준이 달라 협력사가 조건을 예측하기 어렵습니다.",
|
|
after: "에이전트가 같은 기준으로 상시 응대해 조건이 일관됩니다.",
|
|
},
|
|
{
|
|
label: "의사 결정",
|
|
icon: Scale,
|
|
before: "개인 편향과 컴플라이언스 리스크에 노출됩니다.",
|
|
after: "객관적·데이터 기반의 투명한 프로세스로 기록됩니다.",
|
|
},
|
|
]
|