/* global React, Icon, Eyebrow, Reveal, Grain */ const { useState, useEffect, useRef } = React; function Testimonials() { const items = window.TB_PHOTOS.testimonials; const [idx, setIdx] = useState(0); const ref = useRef(null); // Auto-advance every 6s, pause on hover const [paused, setPaused] = useState(false); useEffect(() => { if (paused || window.matchMedia('(prefers-reduced-motion: reduce)').matches) return; const t = setInterval(() => setIdx((i) => (i + 1) % items.length), 6000); return () => clearInterval(t); }, [paused, items.length]); const item = items[idx]; return ( setPaused(true)} onMouseLeave={() => setPaused(false)} style={{ position: 'relative', background: 'transparent', color: 'var(--limestone)', padding: '140px 32px', overflow: 'hidden' }}> {/* Soft dark wash so the quote stays legible over the brick reveal */} kind words setIdx((idx - 1 + items.length) % items.length)} icon="chevron-left" /> setIdx((idx + 1) % items.length)} icon="chevron-right" /> {/* Two-column quote + photo */} “{item.quote}” {item.name} {item.meta} {/* Dots */} {items.map((_, i) => { const active = i === idx; return ( setIdx(i)} aria-label={`testimonial ${i + 1}`} style={{ width: active ? 28 : 6, height: 6, padding: 0, borderRadius: 999, border: 'none', background: active ? 'var(--taxi)' : 'rgba(232,226,212,0.32)', cursor: 'pointer', transition: 'width 480ms var(--ease-cinematic), background 240ms var(--ease-out)', }} /> ); })} 0{idx + 1} / 0{items.length} {/* Portrait paired with the current testimonial */} {/* Frame badge */} frame {String(idx + 12).padStart(3, '0')} {/* Caption strip */} {item.meta.split(' · ')[0]} kodak portra · 35mm ); } function NavBtn({ onClick, icon }) { const [hover, setHover] = useState(false); return ( setHover(true)} onMouseLeave={() => setHover(false)} style={{ width: 44, height: 44, borderRadius: 999, border: '1px solid ' + (hover ? 'var(--taxi)' : 'rgba(232,226,212,0.32)'), background: hover ? 'var(--taxi)' : 'transparent', color: hover ? 'var(--asphalt)' : 'var(--limestone)', cursor: 'pointer', display: 'inline-flex', alignItems: 'center', justifyContent: 'center', transition: 'all 180ms var(--ease-out)' }}> ); } window.Testimonials = Testimonials;
“{item.quote}”