games_app/prediqo_web/src/features/landing/components/LandingHero.tsx
2026-10-30 13:59:23 +02:00

75 lines
2.4 KiB
TypeScript

/**
* Desktop-first hero — brand + one headline + one sentence + one primary CTA.
* Login lives in the header only (no duplicate auth buttons here).
*/
import { Link as RouterLink } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { PLATFORM_WORDMARK } from '../../../shared/brand/platformName';
/** Candlestick heights/direction for the atmospheric chart (deterministic, not data). */
const CANDLES: Array<{ h: number; up: boolean; live?: boolean }> = [
{ h: 38, up: true },
{ h: 54, up: false },
{ h: 30, up: true },
{ h: 62, up: true },
{ h: 44, up: false },
{ h: 72, up: true },
{ h: 50, up: false },
{ h: 84, up: true },
{ h: 60, up: true },
{ h: 46, up: false },
{ h: 78, up: true },
{ h: 92, up: true, live: true },
{ h: 66, up: false },
{ h: 100, up: true },
];
export function LandingHero() {
const { t } = useTranslation();
return (
<section id="top" className="tl-hero">
<div className="tl-hero-visual" aria-hidden>
<div className="tl-hero-glow" />
<div className="tl-hero-mark" />
<div className="tl-candles">
{CANDLES.map((c, i) => (
<span
key={i}
className={`tl-candle ${c.up ? 'tl-candle--up' : 'tl-candle--down'}${
c.live ? ' tl-candle--live' : ''
}`}
style={{ height: `${c.h}%`, animationDelay: `${i * 0.06}s` }}
/>
))}
</div>
</div>
<div className="tl-container tl-hero-inner">
<div className="tl-hero-copy">
<p className="tl-eyebrow tl-hero-tagline tl-rise">{t('landing.hero.tagline')}</p>
<h1 className="tl-display tl-wordmark tl-rise tl-rise-delay-1">{PLATFORM_WORDMARK}</h1>
<p className="tl-display tl-hero-headline tl-rise tl-rise-delay-2">
{t('landing.hero.title')}
</p>
<p className="tl-hero-sentence tl-rise tl-rise-delay-2">{t('landing.hero.subtitle')}</p>
<div className="tl-hero-ctas tl-rise tl-rise-delay-3">
<RouterLink to="/register" className="tl-btn tl-btn--primary">
{t('landing.hero.ctaPrimary')}
</RouterLink>
</div>
<span className="tl-hero-live tl-rise tl-rise-delay-4">
<span className="tl-dot" />
{t('landing.hero.liveSignal')}
</span>
</div>
</div>
</section>
);
}