Files
o2o-clinicad-frontend/src/features/home/ui/HeroSection.tsx
T

79 lines
4.0 KiB
TypeScript

import InfinityLoopIcon from "@/assets/home/infinity-loop.svg?react";
import ArrowRightIcon from "@/assets/home/arrow-right.svg?react";
import {
HERO_BADGE_TEXT,
HERO_CTA_BUTTON_LABEL,
HERO_FOOTNOTE,
HERO_LEAD_EN,
HERO_LEAD_KO,
HERO_URL_PLACEHOLDER,
} from "@/features/home/content/hero";
import { useAnalyze } from "@/features/home/hooks/useAnalyze";
export function HeroSection() {
const { url, setUrl, handleAnalyze } = useAnalyze();
return (
<section className="relative pt-16 pb-12 md:pt-16 md:pb-16 overflow-hidden flex flex-col items-center justify-center text-center px-6">
{/* 배경 그라디언트 */}
<div className="absolute inset-0 -z-10 opacity-70 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-hero-wash-start via-hero-wash-mid to-hero-wash-end" />
<div className="max-w-4xl mx-auto">
{/* 배지 */}
<div className="animate-fade-in-up inline-flex items-center gap-2 px-4 py-2 rounded-full bg-white/60 backdrop-blur-sm border border-white/40 shadow-sm mb-8">
<InfinityLoopIcon aria-hidden="true" className="text-violet-500 shrink-0" />
<span className="body-14-medium text-neutral-80 break-keep">{HERO_BADGE_TEXT}</span>
</div>
{/* 제목 */}
<h1 className="animate-fade-in-up animation-delay-100 display-48 md:display-72 tracking-[-0.02em] text-navy-900 mb-6 break-keep">
<span className="tracking-[0.05em]">
In<span className="ml-[-0.04em]">f</span><span className="ml-[-0.04em]">inite</span>
</span>{" "}
Growth
<br className="hidden md:block" />
<span className="text-gradient">Marketing Engine.</span>
</h1>
{/* 설명 */}
<p className="animate-fade-in-up animation-delay-200 body-18-md-20 text-neutral-70 mb-10 max-w-3xl mx-auto leading-relaxed break-keep">
{HERO_LEAD_EN}
<br className="hidden md:block" />
{HERO_LEAD_KO}
</p>
{/* CTA */}
<div className="animate-fade-in-up animation-delay-300 flex flex-col items-center justify-center gap-5 max-w-lg mx-auto w-full">
<div className="relative w-full group">
<input
type="url"
placeholder={HERO_URL_PLACEHOLDER}
value={url}
onChange={(e) => setUrl(e.target.value)}
onKeyDown={(e) => e.key === "Enter" && handleAnalyze()}
className="w-full px-8 py-5 body-16-medium bg-white/80 backdrop-blur-sm border border-neutral-30 rounded-2xl focus:outline-none focus:ring-2 focus:ring-violet-500/20 focus:border-violet-500/40 shadow-sm text-center text-navy-900 placeholder:text-neutral-60 transition-all group-hover:border-neutral-40 break-keep"
/>
</div>
<button
onClick={handleAnalyze}
className="w-full px-8 py-5 body-16-medium text-white rounded-2xl bg-gradient-to-r from-violet-700 to-navy-950 shadow-xl hover:shadow-2xl hover:scale-[1.02] active:scale-[0.98] flex items-center justify-center gap-3 group transition-all cursor-pointer break-keep"
>
{HERO_CTA_BUTTON_LABEL}
<ArrowRightIcon aria-hidden="true" className="group-hover:translate-x-1 transition-transform" />
</button>
<p className="label-12 text-neutral-70 mt-2 break-keep">{HERO_FOOTNOTE}</p>
</div>
</div>
{/* 블롭 데코레이션 */}
<div className="absolute top-1/4 left-10 w-64 h-64 bg-lavender-300 rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-blob pointer-events-none" />
<div className="absolute top-1/3 right-10 w-64 h-64 bg-marketing-blush rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-blob animation-delay-2000 pointer-events-none" />
<div className="absolute -bottom-8 left-1/2 -translate-x-1/2 w-64 h-64 bg-hero-wash-start rounded-full mix-blend-multiply filter blur-3xl opacity-30 animate-blob animation-delay-4000 pointer-events-none" />
</section>
);
}