Files
Nazim KriandClaude Opus 5.5 ad214a24dd Landing redesign: animated hero, draw cards, how-it-works, footer
Keeps only countries with archived results (Québec, France, US, Spain,
Portugal). The landing gets motion and a real structure: staggered
fade-in hero with a floating Loki, twinkling stars, a shimmering gold CTA
and counters that tick up (draws archived, lotteries, countries); draw
cards in place of the table, with lottery balls dropping in and a
lift-on-hover; a three-step "Comment ça marche"; and a site-wide footer
with links, covered countries, responsible-play note and 18+ notice.
All motion is disabled under prefers-reduced-motion.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 11:58:21 -04:00

76 lines
2.1 KiB
TypeScript

/**
* One mascot, palette-swapped per country. `flagPrimary`/`flagSecondary` are
* the true flag hex values (used for the small flag swatch / badges).
* `accent`/`accentSoft` are OKLCH values tuned for legibility as a UI accent
* on a dark background — several flag colors (navy, dark green, deep red)
* are too dark/desaturated to use directly as an accent on dark UI, so they
* are lightened here rather than algorithmically derived, same as the
* manual-override policy described for the mascot palette.
*/
export interface CountryTheme {
code: string // ISO 3166-1 alpha-2, or a region code like 'CA-QC'
name: string
flagPrimary: string
flagSecondary: string
accent: string // oklch(), CSS custom property value
accentSoft: string // oklch() with alpha, for subtle backgrounds
}
const FALLBACK_ACCENT = 'oklch(0.77 0.118 84.8)' // LokiLab gold
export const COUNTRIES: CountryTheme[] = [
{
code: 'CA-QC',
name: 'Québec',
flagPrimary: '#1768C4',
flagSecondary: '#183653',
accent: 'oklch(0.62 0.16 255.5)',
accentSoft: 'oklch(0.62 0.16 255.5 / 14%)',
},
{
code: 'FR',
name: 'France',
flagPrimary: '#0055A4',
flagSecondary: '#EF4135',
accent: 'oklch(0.63 0.19 28.6)',
accentSoft: 'oklch(0.63 0.19 28.6 / 14%)',
},
{
code: 'US',
name: 'États-Unis',
flagPrimary: '#B22234',
flagSecondary: '#3C3B6E',
accent: 'oklch(0.6 0.17 20.7)',
accentSoft: 'oklch(0.6 0.17 20.7 / 14%)',
},
{
code: 'ES',
name: 'Espagne',
flagPrimary: '#AA151B',
flagSecondary: '#F1BF00',
accent: 'oklch(0.76 0.16 89.6)',
accentSoft: 'oklch(0.76 0.16 89.6 / 14%)',
},
{
code: 'PT',
name: 'Portugal',
flagPrimary: '#046A38',
flagSecondary: '#DA020E',
accent: 'oklch(0.63 0.14 153.6)',
accentSoft: 'oklch(0.63 0.14 153.6 / 14%)',
},
]
export function countryTheme(code: string): CountryTheme {
return (
COUNTRIES.find((c) => c.code === code) ?? {
code,
name: code,
flagPrimary: '#D7AE54',
flagSecondary: '#242B36',
accent: FALLBACK_ACCENT,
accentSoft: 'oklch(0.77 0.118 84.8 / 14%)',
}
)
}