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

213 lines
8.6 KiB
TypeScript
Raw Normal View History

'use client';
import React, { useState, useEffect, useRef } from 'react';
import {
2026-11-06 10:53:55 +05:30
UploadCloud,
Cpu,
Download,
ArrowRight,
2026-11-06 10:53:55 +05:30
Check,
ShieldCheck
} from 'lucide-react';
interface HowItWorksSectionProps {
title?: string;
badge?: string;
subtitle?: string;
}
export function HowItWorks3DSection({
2026-11-06 10:53:55 +05:30
title = 'How the process works',
badge,
subtitle = 'Synchronous GPU inference in volatile memory, returning studio-quality exports in seconds.',
}: HowItWorksSectionProps) {
const [activeStep, setActiveStep] = useState<1 | 2 | 3>(1);
return (
<section
id="how-it-works"
2026-11-06 10:53:55 +05:30
className="py-16 sm:py-24 px-4 sm:px-6 md:px-8 lg:px-10 bg-paper border-b border-rule relative"
>
2026-11-06 10:53:55 +05:30
<div className="max-w-container mx-auto space-y-12">
{/* Section Header */}
<div className="max-w-2xl space-y-2 border-b border-rule pb-5">
<h2 className="text-3xl sm:text-4xl font-display font-bold text-ink tracking-tight">
{title}
</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>
2026-11-06 10:53:55 +05:30
{/* Step Selector Pills */}
<div className="pt-3 flex items-center gap-2 text-xs font-body">
<button
type="button"
onClick={() => setActiveStep(1)}
2026-11-06 10:53:55 +05:30
className={`px-3 py-1.5 rounded-pill transition-colors duration-100 ${
activeStep === 1
2026-11-06 10:53:55 +05:30
? 'bg-ink text-paper-hi font-medium'
: 'bg-paper-2 text-ink-2 hover:bg-paper-3 border border-rule'
}`}
>
2026-11-06 10:53:55 +05:30
1. Upload photograph
</button>
<button
type="button"
onClick={() => setActiveStep(2)}
2026-11-06 10:53:55 +05:30
className={`px-3 py-1.5 rounded-pill transition-colors duration-100 ${
activeStep === 2
2026-11-06 10:53:55 +05:30
? 'bg-ink text-paper-hi font-medium'
: 'bg-paper-2 text-ink-2 hover:bg-paper-3 border border-rule'
}`}
>
2026-11-06 10:53:55 +05:30
2. Neural processing
</button>
<button
type="button"
onClick={() => setActiveStep(3)}
2026-11-06 10:53:55 +05:30
className={`px-3 py-1.5 rounded-pill transition-colors duration-100 ${
activeStep === 3
2026-11-06 10:53:55 +05:30
? 'bg-ink text-paper-hi font-medium'
: 'bg-paper-2 text-ink-2 hover:bg-paper-3 border border-rule'
}`}
>
2026-11-06 10:53:55 +05:30
3. Studio export
</button>
</div>
</div>
2026-11-06 10:53:55 +05:30
{/* 3 Step Process Cards */}
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
{/* Step 1 */}
<div className={`studio-sheet p-6 crop-marked flex flex-col justify-between ${
activeStep === 1 ? 'border-accent' : ''
}`}>
<div className="space-y-4">
<div className="flex items-center justify-between border-b border-rule pb-3">
<span className="text-xs text-muted font-body">Step 01</span>
<UploadCloud className="w-4 h-4 text-accent" aria-hidden="true" />
</div>
2026-11-06 10:53:55 +05:30
<div>
<h3 className="text-lg font-body font-semibold text-ink">
Select your source photo
</h3>
<p className="mt-1.5 text-xs text-muted leading-relaxed font-body">
Drop any portrait, archive print, or product image into the studio widget. The engine validates JPEG, PNG, and WebP signatures client-side.
</p>
</div>
<ul className="space-y-1.5 text-xs text-ink-2 pt-2 border-t border-rule font-body">
<li className="flex items-center gap-2">
<Check className="w-3.5 h-3.5 text-accent shrink-0" aria-hidden="true" />
<span>Up to 12MB input resolution</span>
</li>
<li className="flex items-center gap-2">
<Check className="w-3.5 h-3.5 text-accent shrink-0" aria-hidden="true" />
<span>Presets available for immediate testing</span>
</li>
</ul>
</div>
2026-11-06 10:53:55 +05:30
<div className="mt-6 pt-3 border-t border-rule text-xs text-muted font-body">
Client validation passed
</div>
</div>
2026-11-06 10:53:55 +05:30
{/* Step 2 */}
<div className={`studio-sheet p-6 crop-marked flex flex-col justify-between ${
activeStep === 2 ? 'border-accent' : ''
}`}>
<div className="space-y-4">
<div className="flex items-center justify-between border-b border-rule pb-3">
<span className="text-xs text-muted font-body">Step 02</span>
<Cpu className="w-4 h-4 text-accent" aria-hidden="true" />
</div>
<div>
2026-11-06 10:53:55 +05:30
<h3 className="text-lg font-body font-semibold text-ink">
Synchronous neural inference
</h3>
2026-11-06 10:53:55 +05:30
<p className="mt-1.5 text-xs text-muted leading-relaxed font-body">
Inference executes inside isolated volatile GPU memory. The model separates alpha strands, removes blemishes, or interpolates sub-pixel details.
</p>
</div>
2026-11-06 10:53:55 +05:30
<ul className="space-y-1.5 text-xs text-ink-2 pt-2 border-t border-rule font-body">
<li className="flex items-center gap-2">
<Check className="w-3.5 h-3.5 text-accent shrink-0" aria-hidden="true" />
<span>Zero storage retention policy</span>
</li>
<li className="flex items-center gap-2">
<Check className="w-3.5 h-3.5 text-accent shrink-0" aria-hidden="true" />
<span>Sub-second turnaround time</span>
</li>
</ul>
</div>
2026-11-06 10:53:55 +05:30
<div className="mt-6 pt-3 border-t border-rule text-xs text-muted font-body">
Volatile GPU stream
</div>
2026-11-06 10:53:55 +05:30
</div>
{/* Step 3 */}
<div className={`studio-sheet p-6 crop-marked flex flex-col justify-between ${
activeStep === 3 ? 'border-accent' : ''
}`}>
<div className="space-y-4">
<div className="flex items-center justify-between border-b border-rule pb-3">
<span className="text-xs text-muted font-body">Step 03</span>
<Download className="w-4 h-4 text-accent" aria-hidden="true" />
</div>
<div>
2026-11-06 10:53:55 +05:30
<h3 className="text-lg font-body font-semibold text-ink">
Inspect & download result
</h3>
2026-11-06 10:53:55 +05:30
<p className="mt-1.5 text-xs text-muted leading-relaxed font-body">
Compare the output against the original with the interactive slider. Download the high-definition result directly or hand off to mobile for batch 4K.
</p>
</div>
2026-11-06 10:53:55 +05:30
<ul className="space-y-1.5 text-xs text-ink-2 pt-2 border-t border-rule font-body">
<li className="flex items-center gap-2">
<Check className="w-3.5 h-3.5 text-accent shrink-0" aria-hidden="true" />
<span>Full fidelity download in browser</span>
</li>
<li className="flex items-center gap-2">
<Check className="w-3.5 h-3.5 text-accent shrink-0" aria-hidden="true" />
<span>Direct QR handoff to native apps</span>
</li>
</ul>
</div>
2026-11-06 10:53:55 +05:30
<div className="mt-6 pt-3 border-t border-rule text-xs text-muted font-body">
Production ready export
</div>
</div>
</div>
2026-11-06 10:53:55 +05:30
{/* Clean Privacy Reassurance Strip without emojis or middle dots */}
<div className="studio-sheet p-5 flex flex-col sm:flex-row items-center justify-between gap-4">
<div className="flex items-center gap-3">
2026-11-06 10:53:55 +05:30
<ShieldCheck className="w-5 h-5 text-accent shrink-0" aria-hidden="true" />
<div>
2026-11-06 10:53:55 +05:30
<h4 className="font-body font-semibold text-ink text-sm">
Zero photo retention and free browser trials
</h4>
2026-11-06 10:53:55 +05:30
<p className="text-xs text-muted mt-0.5 font-body">
All photos are processed in volatile GPU memory and immediately purged upon response delivery.
</p>
</div>
</div>
2026-11-06 10:53:55 +05:30
<a href="#our-tools" className="btn-primary shrink-0">
<span>Try tools now</span>
<ArrowRight className="w-3.5 h-3.5" aria-hidden="true" />
</a>
</div>
</div>
</section>
);
}