united-tattoo/components/hero-section.tsx
2025-09-16 21:36:20 -06:00

71 lines
2.1 KiB
TypeScript

"use client"
import { useEffect, useState } from "react"
import { Button } from "@/components/ui/button"
export function HeroSection() {
const [isVisible, setIsVisible] = useState(false)
const [scrollY, setScrollY] = useState(0)
useEffect(() => {
const timer = setTimeout(() => setIsVisible(true), 300)
return () => clearTimeout(timer)
}, [])
useEffect(() => {
const handleScroll = () => {
setScrollY(window.scrollY)
}
window.addEventListener("scroll", handleScroll, { passive: true })
return () => window.removeEventListener("scroll", handleScroll)
}, [])
return (
<section id="home" className="min-h-screen flex items-center justify-center relative overflow-hidden">
<div
className="absolute inset-0 bg-cover bg-center bg-no-repeat"
style={{
backgroundImage: "url(/united-logo-full.jpg)",
transform: `translateY(${scrollY * 0.5}px)`,
}}
/>
<div className="absolute inset-0 bg-black/70" />
<div
className="relative z-10 text-center max-w-4xl px-8"
style={{ transform: `translateY(${scrollY * -0.1}px)` }}
>
<div
className={`transition-all duration-1000 ${
isVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-8"
}`}
>
<h1 className="text-5xl lg:text-7xl font-bold text-white mb-6 tracking-tight">UNITED TATTOO</h1>
</div>
<div
className={`transition-all duration-1000 delay-300 ${
isVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-8"
}`}
>
<p className="text-xl lg:text-2xl text-gray-200 mb-12 font-light">Where artistry meets precision</p>
</div>
<div
className={`transition-all duration-1000 delay-500 ${
isVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-8"
}`}
>
<Button
size="lg"
className="bg-gray-50 text-gray-900 hover:bg-gray-100 px-12 py-6 text-lg font-medium rounded-lg"
>
Book Consultation
</Button>
</div>
</div>
</section>
)
}