# Bella Mobile — Design System

The one reference for anything that carries the Bella brand: the app, the
website, email, social graphics, decks. It is written to be read by people
**and** by AI tools — paste or upload this file (plus `tokens/tokens.json` if the
tool accepts files) and ask it to "follow the Bella design system".

Bella Mobile is a mobile app for international calling, airtime top-up and
eSIM data. Users trust it with money and phone numbers, so the brand is calm,
precise and neutral. Colour is used for meaning, not decoration.

**Source of truth.** Values come from the Flutter theme in
`lib/shared/theme/` (see `lib/shared/theme/THEME.md`). If you change a value
there, update `tools/generate_tokens.py` and re-run it. Everything marked
**Marketing extension** exists only for web and email and has no app
equivalent.

---

## 1. Principles

1. **Neutral first.** Near-black, white and greys carry the interface. The
   primary action is near-black (`#25292E`), not a brand hue.
2. **Colour means something.** Blue = link/focus/info. Green = success. Red =
   error or destructive. Amber = warning/pending. Purple = promo/done. Never use
   a status colour as decoration.
3. **Navy is the brand moment.** Brand navy `#000E19` with the white logo is
   reserved for hero bands, email headers, the app icon and splash. One navy
   block per page or email, not more.
4. **Bordered, not shadowed.** Controls and cards use a 1px `border` and soft
   radii. Shadows are not part of the system.
5. **Simple and professional.** Fewer elements, generous spacing, one clear
   action per screen or section.

---

## 2. Logo

Files in `assets/logos/` (exact copies of the app's marks — never redraw):

| File | Use on |
|---|---|
| `bella-logo-white.svg` | Brand navy, `card-inverse`, photos with dark overlay |
| `bella-logo-navy.svg` | White, `background`, `surface`, `brand-mist` |
| `bella-wordmark-light.svg` | Small "bella" wordmark on dark cards (no "Mobile") |
| `bella-b-watermark.svg` | The "b" at 10% opacity — decorative corner mark on inverse cards only |
| `bella-icon-on-navy.svg` | Square tile, white lockup on navy — app icon, social avatar, favicon |
| `bella-icon-on-white.svg` | Square tile, navy lockup on white — light grounds and print |
| `bella-icon-stacked-on-navy.svg` | Stacked "b" over "Mobile" on navy — favicon and anything under ~64px |
| `bella-icon-stacked-on-white.svg` | The stacked tile on white |
| `png/bella-icon-on-navy-{512,1024}.png` | Store listings — rendered from the tile above |
| `png/*-hires.png` | Transparent high-resolution masters for print and partners |
| `png/*.png` | Raster logos for email (SVG is not supported in Gmail/Outlook) |

**Two lockups.** The horizontal lockup ("bella" + Mobile) is the default
everywhere. The stacked lockup — the "b" over "Mobile" — is for square spaces and
small sizes: app icon, avatar, favicon. Don't build either one by hand.

**Tiles vs. marks.** `bella-icon-*` files are square tiles with the ground baked
in, for places where the mark stands alone and the platform supplies the shape
(app icon, avatar, favicon). Never put a tile on another coloured background,
add a border, or round its corners yourself. Everywhere else, use a transparent
mark on an approved ground.

**Rules**
- Clear space on all sides = the height of the "b" bowl (≈ ⅓ of the logo height).
- Minimum width: 96px on screen, 25mm in print. Below ~64px square, switch to the
  stacked tile.
- Logo is navy or white only. Don't recolour, stretch, outline, add effects, or
  place it on busy imagery without a dark overlay.
- "bella" is always lowercase. In copy, the company is **Bella Mobile**; the app
  is **Bella**.

---

## 3. Colour

All colours exist as CSS variables (`--bella-<name>`) in `tokens/tokens.css`,
which switch automatically between light and dark.

### Core (light / dark)

| Token | Light | Dark | Use |
|---|---|---|---|
| `background` | `#F6F8FA` | `#0D1117` | Page background |
| `surface` | `#FFFFFF` | `#151B23` | Cards, sheets, list containers |
| `text-heading` | `#1F2328` | `#F0F6FC` | Headings, primary copy |
| `text-body` | `#59636E` | `#9198A1` | Paragraphs, secondary copy |
| `primary` | `#25292E` | `#F0F6FC` | Primary button, selected chip |
| `on-primary` | `#FFFFFF` | `#0D1117` | Text/icons on `primary` |
| `on-primary-muted` | white 70% | `#0D1117` 60% | Secondary text on `primary` |
| `button-secondary` | `#F6F8FA` | `#212830` | Secondary button fill (+ border) |
| `button-secondary-text` | `#25292E` | `#F0F6FC` | Secondary button label |
| `button-disabled` | `#D1D9E0` | `#3D444D` | Disabled button fill |
| `card-inverse` | `#25292E` | `#3D444D` | Balance/eSIM cards — dark in both themes |
| `text-on-inverse` | `#FFFFFF` | `#FFFFFF` | Text on `card-inverse` / navy |
| `text-on-inverse-muted` | white 70% | white 70% | Secondary text on `card-inverse` / navy |
| `input-fill` | `#FFFFFF` | `#0D1117` | Input background |
| `focus` | `#0969DA` | `#1F6FEB` | Focus ring, focused input border (2px) |
| `border` | `#D1D9E0` | `#3D444D` | All 1px borders and dividers |
| `icon` | `#59636E` | `#9198A1` | Default icons |
| `icon-background` | `#818B98` 12% | `#212830` | Circle behind an icon |
| `subtle-fill` | `#818B98` 12% | `#656C76` 20% | Skeletons, hover, quiet tags |

### Status (light / dark, each with a `-muted` tint for backgrounds)

| Token | Light | Dark | Muted light | Meaning |
|---|---|---|---|---|
| `link` | `#0969DA` | `#4493F8` | `#DDF4FF` | Links, info. Never a button fill |
| `success` | `#1A7F37` | `#3FB950` | `#DAFBE1` | Success, live call, paid |
| `danger` | `#D1242F` | `#F85149` | `#FFEBE9` | Error, failed, destructive |
| `attention` | `#9A6700` | `#D29922` | `#FFF8C5` | Warning, pending |
| `done` | `#8250DF` | `#AB7DF8` | `#FBEFFF` | Promo, referral, completed |
| `severe` | `#BC4C00` | `#DB6D28` | — | Severe warning (low balance) |

Pair a status colour with its own muted tint: e.g. `danger` text on
`danger-muted` background.

### Brand — Marketing extension (theme-independent)

| Token | Value | Use |
|---|---|---|
| `brand-navy` | `#000E19` | Hero bands, email header, footer, app icon |
| `brand-white` | `#FFFFFF` | Logo and headline on navy |
| `brand-mist` | `#F5F6FB` | Soft light section band on web; wordmark on dark cards |

On navy, body text is white at 70%; buttons are white fill with navy text.

### Contrast

Body text must reach **4.5:1** against its background in both themes (3:1 for
text ≥ 24px, icons and control borders). All text/background pairs listed above
pass. Don't put `text-body` on `subtle-fill` over `background` at sizes under 14px.

---

## 4. Typography

**Typeface: Host Grotesk** (Google Fonts; app bundles the TTFs in
`assets/fonts/`). Weights used: 400 Regular, 500 Medium, 600 SemiBold
(700 Bold only for numbers that need extra weight).

```html
<link href="https://fonts.googleapis.com/css2?family=Host+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
```

Fallback stack: `'Host Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif`.
Email: `'Host Grotesk', Helvetica, Arial, sans-serif`.

| Token | Size | Weight | Line height | Use |
|---|---|---|---|---|
| `display-lg` ✦ | 64 | 600 | 1.1 | Website hero (desktop) |
| `display-md` ✦ | 48 | 600 | 1.15 | Website hero (tablet), section openers |
| `display-sm` ✦ | 40 | 600 | 1.2 | Website hero (phone), email hero max |
| `h1` | 32 | 600 | 1.4 | Page titles |
| `h2` | 28 | 600 | 1.4 | Section titles |
| `h3` | 24 | 600 | 1.4 | Card / modal titles |
| `h4` | 20 | 600 | 1.4 | Sub-section headers |
| `h5` | 18 | 500 | 1.4 | List group headers |
| `h6` | 16 | 500 | 1.4 | Small headers, primary button label |
| `h7` | 14 | 500 | 1.4 | Row titles |
| `body-lg` | 16 | 400 | 1.4 | Prominent copy; **default body on web/email** |
| `body` | 14 | 400 | 1.4 | Default body in the app |
| `body-sm` | 12 | 400 | 1.4 | Supporting text, legal |
| `caption` | 10 | 500 | 1.4 | Badges, helper labels |
| `overline` | 10 | 500 | 1.4, +1.2px tracking, UPPERCASE | Section labels |

✦ Marketing extension. Display sizes use −0.01em tracking. Long-form web text
uses line height 1.6 (`--bella-leading-prose`) and a 680px max width.

Money amounts: tabular figures (`font-variant-numeric: tabular-nums`), currency
symbol before the amount, two decimals (`$24.50`, `₦5,000.00`).

---

## 5. Spacing, radius, borders

**Spacing** (px): 0, 2, 4, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 64; marketing
adds 96, 128. Use only these values.

- Screen/page gutter: 16px (never less, at any width).
- Card padding: 16px. Button padding: 12px × 20px.
- Website sections: 96px vertical (64px on phones). Container max 1200px.

**Radius** (px): 2, 4, 8, 12, 16, 24, 32, pill (999).

| Element | Radius |
|---|---|
| Buttons, inputs, chips | pill |
| Inverse cards (balance, eSIM) | 24 |
| Standard cards, sheets | 16 |
| Small tiles, thumbnails | 8–12 |

**Borders:** 1px `border` on controls and cards; 2px `focus` on focused inputs.
Widths available: 1, 2, 3, 4.

**Opacity steps:** 10–90% in tens. White 70% is the standard "muted on dark".

---

## 6. Components

Specs mirror `lib/shared/widgets/`. HTML snippets use `tokens.css`.

### Button
- **Primary:** `primary` fill, `on-primary` label in `h6` (16/500), pill radius,
  no border. App: 64px tall, full width. Web/email: 48px tall, 12×20 padding.
- **Secondary:** `button-secondary` fill, 1px `border`, `button-secondary-text`
  label in `body` (14/400).
- **On navy:** white fill, navy label.
- **Disabled:** `button-disabled` fill. **Destructive:** `danger-emphasis` fill, white label.
- One primary button per view/section. Labels are verbs: "Top up", "Buy eSIM".

```html
<a class="bella-btn" href="#">Top up</a>
<style>
.bella-btn{display:inline-flex;align-items:center;justify-content:center;height:48px;padding:0 20px;
  border-radius:999px;background:var(--bella-primary);color:var(--bella-on-primary);
  font:500 16px/1.4 var(--bella-font-sans);text-decoration:none}
.bella-btn--secondary{background:var(--bella-button-secondary);color:var(--bella-button-secondary-text);
  border:1px solid var(--bella-border);font-weight:400;font-size:14px}
</style>
```

### Text input
Pill radius, `input-fill`, 1px `border`, 20px horizontal padding, `body` text in
`text-heading`, placeholder in `text-body`. Focus: 2px `focus` border.

### Inverse card (balance, eSIM)
`card-inverse` fill, radius 24, padding 16. Label in `body` `text-on-inverse-muted`,
amount in `h1` `text-on-inverse`. Optional `bella-b-watermark.svg` bottom-right.

### Chip / amount selector
Pill, 1px `border`, `surface` fill, `h6` label. Selected: `primary` fill and
border, `on-primary` label.

### Badge
Muted tint background + matching status colour text, `caption` (10/500), pill.
E.g. "Active" = `success` on `success-muted`.

### List row
`surface` container with 1px `border`, radius 16. Row: 40px icon circle in
`icon-background`, title `h7`, subtitle `body-sm` `text-body`, value right-aligned
with tabular figures. Rows separated by 1px `border`.

---

## 7. Iconography

Outline icons on a 24px grid, 1.5px stroke, round caps (the app's icons follow
the Solar "Linear" style). Filled variant only for the selected tab in
navigation. Colour `icon`; on dark, white. Sit small icons in a 40px `icon-background` circle when they label a row. Source SVGs
are in the app at `assets/images/` (nav, call, esim, home).

## 8. Imagery

Real people using their phones, natural light, warm and uncluttered. Navy or
neutral overlays only (navy at 60–80% when text sits on a photo). No stock-style
handshakes, no globe-with-network-lines clichés, no gradients.

---

## 9. Voice and copy

- Plain and direct. Short sentences. Say what happens: "Top up $10" not "Proceed".
- Friendly but not cute. No exclamation marks in errors or money flows.
- Numbers are exact: show the amount, the fee and the total.
- Errors say what went wrong and what to do: "Payment didn't go through. Check
  your card details and try again." Never show codes, stack traces or raw API text.
- Privacy: never show a full phone number in marketing or examples — mask it
  (`+234 ••• ••• 5678`). Never put a full card number anywhere.
- Spelling: "eSIM", "top-up" (noun) / "top up" (verb), "Bella Mobile".

---

## 10. Channel rules

### Website ✦
- Navy hero with white logo, `display-*` headline, one primary (white) button
  and one secondary link. Then `background` / `surface` / `brand-mist` sections.
- 1200px container, 16px min gutter, 96px section padding.
- Respect `prefers-color-scheme` via `tokens.css`; navy sections stay navy in both.
- Tailwind: `presets: [require('./design-system/tokens/tailwind.preset.js')]`, then
  `bg-bella-surface`, `text-bella-text-heading`, `text-h1`, `rounded-full`.

### Email ✦ — see `email/SPEC.md`
- 600px, table layout, inline styles, literal hex values (no CSS variables).
- **No header band, no card, no gradient, no shadow.** One white column with a
  48px margin (24px on phones). Hierarchy comes from scale, 1px hairlines and space.
- Structure: logo and context, hairline, then an eyebrow, one large statement
  (a figure at 48/600 or a headline at 40/600), a small 20/600 section heading,
  body at 16/1.7, hairline-separated detail rows, one solid button, footer.
- The only colour in a message is a 6px status dot beside the eyebrow. Everything
  else is near-black, grey and hairline — colour still means something.
- Logos and icons are PNG; Gmail and Outlook don't render SVG.

### Social / print ✦
- Navy or white ground, one headline in Host Grotesk 600, logo bottom-left or
  centred with clear space. Max two colours plus one status/accent if it carries meaning.

---

## 11. Rules for AI tools

When generating anything for Bella Mobile:

1. Use only the colours, sizes, spacing and radii in this file. Don't invent
   new hues, gradients or shadows.
2. Primary buttons are near-black (`#25292E`) on light grounds and white on navy.
   Blue is only for links and focus.
3. Use Host Grotesk with the listed fallback stack.
4. Use the real logo files from `assets/logos/`; never typeset or redraw "bella".
5. One navy brand block per page or email; the rest is neutral.
6. Bordered cards (1px `#D1D9E0`), radius 16 (24 for inverse cards), pill
   buttons and inputs.
7. Check every text colour against its background for 4.5:1.
8. Write copy per §9; mask phone numbers.

| Do | Don't |
|---|---|
| Near-black primary buttons | Blue or purple primary buttons |
| Navy hero, then white/grey sections | Navy everywhere, or gradients |
| 1px borders | Drop shadows, glows |
| Motion as garnish, static reads complete | Motion that carries meaning |
| Pill buttons, 16/24 card radius | Square buttons, mixed radii |
| Status colour + its muted tint | Status colours as decoration |
| Host Grotesk 400/500/600 | Inter, Poppins, serif display faces |
| Real logo files | Re-typed "Bella" in a font |
| Outline icons in the app style | Emoji as icons or section markers |

---

## 12. Files

```
brand-guidelines/
├── DESIGN.md                  ← this file
├── index.html                 ← the published site: every section, live in light and dark
├── css/site.css, js/site.js   ← site layout and the generated token tables
├── 404.html, robots.txt, sitemap.xml
├── tokens/tokens.json         ← W3C DTCG tokens (Figma Tokens Studio, Style Dictionary)
├── tokens/tokens.css          ← CSS variables + .bella-<type> classes, light/dark
├── tokens/tailwind.preset.js  ← Tailwind preset
├── tools/generate_tokens.py   ← regenerates the three token files
├── tools/render_email_icons.py ← exports email icon PNGs from the app's SVGs
├── tools/render_app_icons.py  ← renders store, avatar and touch icons from the tiles
├── tools/build_emails.py      ← renders the emails from one declaration each
├── tools/check_links.py       ← link and asset check, run in CI before deploy
├── email/SPEC.md              ← the email specification
├── email/src/content.py       ← the fourteen emails; `build_emails.py` renders them
├── email/templates/           ← generated: paste these into OneSignal
├── assets/logos/              ← logo files (SVG + PNG)
├── assets/social/             ← social icons (SVG + PNG for email)
├── assets/icons/png/          ← email feature-row icons
└── claude-skill/SKILL.md      ← Claude skill version of these rules
```

The site is deployed from `main` by `.github/workflows/deploy.yml`; `README.md`
has the deploy notes.
