Design system
Light only Ritorno tokens, fonts, type scale, radius, shadow and motion.
Light only, one blue, ink for actions. Mobile first: guests scan a QR code on a cheap Android phone, staff use the dashboard on a phone or a desktop.
Tokens live in packages/ui/src/styles/theme.css (values) and globals.css (Tailwind mapping, type scale, utilities). Never hard code a color, never add a per component token, never add a dark variant: there is no .dark and no theme switch.
Color
| Token | Hex | Use |
|---|---|---|
background, card, popover | #ffffff | pages, cards |
surface (= muted, secondary, sidebar) | #f4f4f3 | sidebar, table header, skeletons, panels |
canvas | #f0f0ef | landing below the hero, footer |
border, input | #e4e4e2 | every border |
foreground, primary, ink-900 | #0b0b0c | text, the black pill action |
muted-foreground, ink-500 | #6b6b70 | secondary text (4.8:1 on surface) |
ink-400 | #8e8e93 | icons only, never text |
navy | #0b1f3a | text on the sky |
blue-50 to blue-900 | brand blue-500 #0a84ff | accent is blue-50, ring is blue-600, links blue-700 |
success, warning, destructive, info | #1a7f37, #a15c00, #d1242f, blue-700 | text and icons, each with a *-soft fill |
chart-1 to chart-5 | blue-500, navy, #0e8a80, #c26a00, #6e56cf | one series is chart-1 |
sky-1 to sky-4, cloud | #0a84ff to #dcefff | PixelSky only |
Contrast rules:
- body text is
foregroundormuted-foreground, on white, surface or canvas blue-500is for icons and text of 24 px or more, never a button. Small blue text isblue-600orblue-700- buttons are ink with white text. Status is never color only: pair it with an icon or a word
Hotel branding
Our own UI keeps ink as --primary. A hotel's primary_color and accent_color become --primary and --brand-accent (with a black or white foreground, whichever reads better) through brandStyle (@ritorno/common/color), only on guest pages (/h, /s, /u, /r, /o), emails and the dashboard previews (hotel-previews, offer-card-preview, brand-preview). The dashboard shell never takes hotel colors. brandContrastIssues flags a color under 3:1 (WCAG 1.4.11) against PAGE_BACKGROUNDS (page white, surface #f4f4f3); the admin and settings forms show a warning, they do not block.
Fonts
All next/font/google, self hosted, display: "swap", declared in each app's app/fonts.ts.
| Role | Font | Loading |
|---|---|---|
UI (font-sans) | Geist, variable | preloaded |
Display en, fr (font-display) | Newsreader italic, variable opsz and wght | preloaded on web only |
Mono (font-mono) | Geist Mono | not preloaded |
| Arabic body | Noto Sans Arabic, variable | not preloaded |
| Arabic display | Noto Naskh Arabic, upright | not preloaded |
fonts.tssets--font-geist,--font-geist-mono,--font-newsreader,--font-noto-sans-arabic,--font-noto-naskh-arabic.globals.cssbuilds the Tailwind families from them:font-sans,font-serif,font-mono,font-arabic,font-arabic-seriffont-sansswitches onlang: Geist first in en and fr, Noto Sans Arabic first in ar. Mixed text still picks a font per characterfont-displayis the serif voice: Newsreader italic under:lang(en)and:lang(fr), upright Noto Naskh Arabic 600 with a 1.35 line height under:lang(ar).font-synthesis: noneis set, so there is never a fake slant or bold. Arabic emphasis is weight orblue-700, not italic- the serif is for the landing, the logo and the auth panel. Inside the app everything is Geist
- digits stay Western (
0-9); usetabular-numsfor numbers in tables and stats
Type scale
| Class | Size | Line height | Font |
|---|---|---|---|
text-display-xl | 48 to 112 px fluid | 0.95 | with font-display, landing hero only |
text-display | 40 to 72 px fluid | 1.0 | with font-display |
text-h1 | 28 to 40 px fluid | 1.15 | Geist 600, page title |
text-h2 | 22 to 30 px fluid | 1.2 | Geist 600, section title |
text-h3 | 20 px | 1.3 | Geist 600, card title |
text-lead | 18 px | 1.6 | intro paragraph |
text-body | 16 px | 1.6 | default, forms |
text-small | 14 px | 1.5 | secondary text, tables |
text-caption | 12 px | 1.4 | chips, hints, legal |
Inputs are 16 px on mobile (iOS zooms below that). Arabic text gets taller line heights and no letter spacing (globals.css).
Space, radius, shadow, motion
- container
max-w-6xl px-4 md:px-6, landing sectionspy-20 md:py-28 lg:py-36, Tailwind's 4 px scale,gap-*over margins - every tappable control is 44 px (
h-11,--spacing-touch, thecoarse:variant grows compact controls on touch) - radius:
--radius12 px,rounded-input10 px,rounded-card20 px,rounded-panel28 px,rounded-browser14 px,rounded-phone40 px, buttons and chipsrounded-full - shadow:
shadow-xs(secondary pill, active sidebar row),shadow-md(floating nav, popovers),shadow-device(browser and phone frames). App cards use a border, no shadow - motion:
--duration-fast120 ms,--duration-base200 ms,--duration-slow400 ms,--duration-slower600 ms;ease-outiscubic-bezier(0.22, 1, 0.36, 1),ease-in-outcubic-bezier(0.65, 0, 0.35, 1).prefers-reduced-motionturns animation off globally
Components
All in @ritorno/ui/components/*, shadcn on Base UI with the RTL migration. Add one with pnpm ui:add <component>, then check it against component patterns. Loading is a skeleton with the shape of the content, empty is EmptyState with one next action, errors are InlineAlert or a toast.
Logo
Logo from @ritorno/ui/brand/logo: variant is mark, wordmark or lockup (default), size is the tile side in px. The mark is a white Newsreader italic R on a blue tile (#0a84ff) with a dithered sky band; up to 48 px it is a solid tile with a heavier R. The wordmark takes currentColor. The lockup always reads mark then wordmark, left to right, in every language; only its place in the page follows the direction. Its accessible name is "Ritorno".
The glyphs are outlined, so no font is needed. The SVGs in packages/ui/assets/logo are the source; pnpm logo:build turns them into the favicon (16, 32, 48), apple icon, PWA and maskable icons (R shrunk into the 80% safe zone), the email logo and an OG base image, and copies them into each app (app/icon.svg, app/favicon.ico, app/apple-icon.png, public/brand/*). Never edit the copies.