Files
webb/src/components/sections/ReviewsMarqueeSection.tsx
T

235 lines
9.5 KiB
TypeScript
Raw Normal View History

'use client';
2026-11-06 10:53:55 +05:30
import React from 'react';
import { Star, CheckCircle2 } from 'lucide-react';
import { Marquee } from '@/components/magicui/marquee';
import { KineticText } from '@/components/magicui/kinetic-text';
interface ReviewsMarqueeSectionProps {
title?: string;
badge?: string;
subtitle?: string;
/** Reviews loaded server-side from content/features/reviews.json. Falls back to FALLBACK_REVIEWS. */
reviews?: ReviewItem[];
}
interface ReviewItem {
name: string;
role: string;
location: string;
avatarInitials: string;
avatarColor: string;
body: string;
tool: string;
stars: number;
}
const FALLBACK_REVIEWS: ReviewItem[] = [
{
name: 'Elena Rostova',
role: 'Editorial Portrait Photographer',
location: 'Milan, IT',
avatarInitials: 'ER',
avatarColor: 'bg-indigo-600 text-white',
body: 'The blemish retoucher eliminates acne and surface redness while keeping natural pores and epidermal micro-texture completely intact. Zero plastic skin blur.',
tool: 'Skin & Blemish Retoucher',
stars: 5,
},
{
name: 'Marcus Vance',
role: 'Commercial Studio Director',
location: 'London, UK',
avatarInitials: 'MV',
avatarColor: 'bg-emerald-600 text-white',
body: 'P3M cutout matting separated flyaway hair strands and translucent glass reflections flawlessly. Saved our studio 4 hours of tedious manual pen-tooling.',
tool: 'Alpha Background Matting',
stars: 5,
},
{
name: 'David Chen',
role: 'Lead Concept Artist',
location: 'Vancouver, CA',
avatarInitials: 'DC',
avatarColor: 'bg-blue-600 text-white',
body: 'Zero-storage privacy was our mandatory compliance condition. Knowing inferences execute solely in volatile GPU RAM gave our legal team total confidence.',
tool: 'Volatile RAM Pipeline',
stars: 5,
},
{
name: 'Ananya Sharma',
role: 'Senior Wedding Retoucher',
location: 'Mumbai, IN',
avatarInitials: 'AS',
avatarColor: 'bg-amber-600 text-white',
body: 'Clean results directly in browser with no mandatory login friction. Tested on one shot, then handed off to the mobile app for 200-image batch delivery.',
tool: 'Mobile Studio Suite',
stars: 5,
},
{
name: 'Soren Lindqvist',
role: 'Fine Art Conservator',
location: 'Stockholm, SE',
avatarInitials: 'SL',
avatarColor: 'bg-teal-600 text-white',
body: 'The 4K Super Resolution reconstructed vintage tintypes without fabricating synthetic hallucinated artifacts. Irises and fiber weave look historically genuine.',
tool: 'Photo Enhancer 4K',
stars: 5,
},
{
name: 'Liam O’Connor',
role: 'Historical Print Archivist',
location: 'Dublin, IE',
avatarInitials: 'LO',
avatarColor: 'bg-rose-600 text-white',
body: 'Restored 1920s silver gelatin prints with astonishing fidelity. Scratches, folds, and mold stains disappeared while authentic grain was preserved.',
tool: 'Archival Restorer',
stars: 5,
},
{
name: 'Chloe Dubois',
role: 'Art Director & Animator',
location: 'Paris, FR',
avatarInitials: 'CD',
avatarColor: 'bg-purple-600 text-white',
body: 'The anime synthesis understands cel-shaded lighting and expressive contours. It is not just a generic posterize filter—it feels like hand-drawn key art.',
tool: 'Anime & Art Studio',
stars: 5,
},
{
name: 'Vikram Malhotra',
role: 'E-commerce Imaging Head',
location: 'Bengaluru, IN',
avatarInitials: 'VM',
avatarColor: 'bg-sky-600 text-white',
body: 'Instantaneous split-slider scrubbing with lossless 4K export straight in session. The speed on our product catalog shoots is truly transformative.',
tool: 'Lossless Studio Export',
stars: 5,
},
{
name: 'Sophie Tanaka',
role: 'Commercial Beauty Retoucher',
location: 'Tokyo, JP',
avatarInitials: 'ST',
avatarColor: 'bg-pink-600 text-white',
body: 'The enamel whitener brightens smiles while preserving delicate gum line tones and specular gloss. Clients love the subtle, natural perfection.',
tool: 'Teeth Whitener',
stars: 5,
},
{
name: 'Julian Mercer',
role: 'Fashion Photographer',
location: 'New York, US',
avatarInitials: 'JM',
avatarColor: 'bg-orange-600 text-white',
body: 'Colorization gave 1940s runway archives rich, historically researched pigment palettes. Skin tones have warm sub-surface scattering rather than flat hues.',
tool: 'AI Colorizer',
stars: 5,
},
];
export function ReviewsMarqueeSection({
2026-11-06 10:53:55 +05:30
title = 'Photographer & studio notes',
subtitle = 'Feedback from portrait photographers, archivists, and professional studio retouchers.',
reviews,
}: ReviewsMarqueeSectionProps) {
// Use server-provided reviews (from content/features/reviews.json) or fall back to built-in list
const displayReviews = reviews && reviews.length > 0 ? reviews : FALLBACK_REVIEWS;
return (
<section
id="user-reviews"
2026-11-06 10:53:55 +05:30
className="py-16 sm:py-24 bg-paper border-b border-rule relative overflow-hidden"
>
{/* Studio Lighting Ambient Glow */}
<div
className="pointer-events-none absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[700px] h-[400px] [background:radial-gradient(circle_at_center,color-mix(in_oklab,var(--color-accent)_8%,transparent)_0%,transparent_70%)]"
aria-hidden="true"
/>
<div
className="pointer-events-none absolute inset-0 opacity-20 studio-proof-grid"
aria-hidden="true"
/>
<div className="max-w-container mx-auto px-4 sm:px-6 md:px-8 lg:px-10 space-y-10 relative z-10">
{/* Section Header */}
2026-11-06 10:53:55 +05:30
<div className="max-w-2xl space-y-2 border-b border-rule pb-5">
<div className="flex items-center gap-2">
<span className="w-2 h-2 rounded-full bg-accent animate-pulse" aria-hidden="true" />
<span className="text-xs font-semibold text-accent font-body">
Verified studio reviews
</span>
</div>
2026-11-06 10:53:55 +05:30
<h2 className="text-3xl sm:text-4xl font-display font-bold text-ink tracking-tight">
<KineticText>{title}</KineticText>
</h2>
2026-11-06 10:53:55 +05:30
<p className="text-sm sm:text-base text-ink-2 font-body text-pretty">
{subtitle}
</p>
</div>
{/* Single Marquee Row of Feedbacks with Localized Edge Fades */}
<div className="relative overflow-hidden w-full">
{/* Subtle Local Edge Fades strictly confined to the moving review cards */}
<div
className="pointer-events-none absolute inset-y-0 left-0 w-10 sm:w-20 bg-gradient-to-r from-paper to-transparent z-10"
aria-hidden="true"
/>
<div
className="pointer-events-none absolute inset-y-0 right-0 w-10 sm:w-20 bg-gradient-to-l from-paper to-transparent z-10"
aria-hidden="true"
/>
<Marquee pauseOnHover repeat={2} className="[--duration:38s]">
{displayReviews.map((rev, i) => (
2026-11-06 10:53:55 +05:30
<div
key={i}
className="w-[320px] sm:w-[380px] p-5 sm:p-6 mx-3 rounded-3xl bg-paper-hi border border-rule shadow-sheet hover:border-accent hover:shadow-glow hover:-translate-y-0.5 motion-safe:transition-[border-color,box-shadow,transform] duration-200 flex flex-col justify-between"
2026-11-06 10:53:55 +05:30
>
<div>
{/* Top Bar: Tool Pill & 5 Stars */}
<div className="flex items-center justify-between border-b border-rule pb-3 mb-3">
<span className="text-xs font-semibold font-body text-accent bg-accent/10 px-2.5 py-0.5 rounded-full border border-accent/20">
{rev.tool}
</span>
<div className="flex items-center gap-0.5 text-amber-500" aria-label={`${rev.stars} stars`}>
{[...Array(rev.stars)].map((_, s) => (
<Star key={s} className="w-3.5 h-3.5 fill-amber-400 text-amber-400" aria-hidden="true" />
2026-11-06 10:53:55 +05:30
))}
</div>
</div>
{/* Review Quote */}
<p className="text-xs sm:text-sm text-ink-2 leading-relaxed font-body">
2026-11-06 10:53:55 +05:30
"{rev.body}"
</p>
</div>
{/* Author Info & Verified Badge */}
<div className="mt-5 pt-3 border-t border-rule flex items-center justify-between gap-3">
<div className="flex items-center gap-2.5 min-w-0">
<div className={`w-9 h-9 rounded-full ${rev.avatarColor} font-bold text-xs flex items-center justify-center shrink-0 shadow-sm`}>
{rev.avatarInitials}
</div>
<div className="min-w-0">
<span className="font-bold text-ink text-xs sm:text-sm block truncate">
{rev.name}
</span>
<span className="text-muted text-[11px] block truncate font-body">
{rev.role} · {rev.location}
</span>
</div>
</div>
<div className="flex items-center gap-1 text-[11px] font-medium text-emerald-700 bg-emerald-50 px-2 py-0.5 rounded-full border border-emerald-200/60 shrink-0">
<CheckCircle2 className="w-3 h-3 text-emerald-600" aria-hidden="true" />
<span>Verified</span>
</div>
2026-11-06 10:53:55 +05:30
</div>
</div>
))}
</Marquee>
</div>
</div>
</section>
);
}