Foundations
Shared rules before surface-specific choices.
The foundation layer is the part of the system that should not drift. It defines the brand contract, token model, type system, theme behavior, and the rules for where visual decisions belong.
Foundations
The foundation layer is the part of the system that should not drift. It defines the brand contract, token model, type system, theme behavior, and the rules for where visual decisions belong.
Brand source colours, semantic tokens, and theme comparisons.
Approved gradient tokens and where they belong in the shared system.
Fonts, heading scales, and marketing/app type roles.
The core spacing scale and how density stays shared across surfaces.
Shared page-width and surface rhythm rules defined by current layer tokens.
The current repo already documents the semantic token groups in `Docs/brand-system/tokens.md`. The site mirrors those groups and keeps them tied to the real shared CSS layer.
Color tokens: `--color-primary`, `--color-surface-base`, `--color-text-heading`, `--color-overlay`
Typography tokens: `--font-heading-stack`, heading scales, marketing display size, app title size
Layout tokens: spacing scale, radius scale, shadow scale, motion duration and easing
Layer classes: `body.brand-layer-marketing` and `body.brand-layer-app`
Start with shared foundations. If the change belongs everywhere, it goes into `packages/brand`. If it affects reusable structure, it belongs in `packages/ui`. Only after those options are exhausted should a route carry one-off layout styling.
1. Reuse an existing token. 2. Reuse an existing shared component or class. 3. Extend a shared primitive if the pattern is repeated. 4. Add a new semantic token or primitive when the pattern becomes shared. 5. Keep styling local only when the need is truly one-off.