'use client' import { useEffect, useState } from 'react' import { Phone, Wrench, ChevronDown } from 'lucide-react' export default function HeroSection() { const [videoLoaded, setVideoLoaded] = useState(false) useEffect(() => { // Detect iOS and set body position for safe area support const isIOS = /iPhone|iPad|iPod/.test(navigator.userAgent) if (isIOS) { document.body.style.position = 'fixed' document.body.style.width = '100%' } // Handle video loading with fallback const video = document.getElementById('hero-video') as HTMLVideoElement if (video) { // Check if video can play if (video.readyState >= 3) { setVideoLoaded(true) } else { video.addEventListener('loadeddata', () => { setVideoLoaded(true) }) } // Fallback timeout to show content even if video doesn't load setTimeout(() => { setVideoLoaded(true) }, 1000) // iOS autoplay fallback const tryPlay = () => { if (video.paused) { video.play().catch(() => {}) } } window.addEventListener('touchstart', tryPlay, { once: true }) } else { // If video element doesn't exist, show content anyway setVideoLoaded(true) } }, []) return (
{/* Video Background */}
{/* Overlay - Separate from video container */}
{/* Hero Content */}
{/* Logo - Responsive sizing */} Harbor Smith {/* Tagline - Responsive text sizing - much tighter on desktop */}

Personalized Service Maintenance for Your Boat

Reliable Care Above and Below the Waterline. Servicing the Bay Area and Beyond!

{/* CTAs - Responsive button sizing - more space on mobile */}
Call (510) 701-2535
{/* Scroll Indicator - Now visible on all screen sizes */}
document.getElementById('services')?.scrollIntoView({ behavior: 'smooth' })} >

Scroll to explore

) }