# Moonwax on iPhone — Small Hours

The Expo SDK 54 app in `mobile/` uses the palette and type below through `mobile/theme.ts`. Brand values come from `tokens.json`; the concept is in `docs/brand/direction.json`.

## Identity

- **App icon.** The 1024 px opaque illustration fills the square. Keep both tips of the crescent visible. iOS rounds its corners.
- **Launch.** The splash screen uses the same painted image on Night.
- **Wordmark**: `components/ui/Wordmark` renders `assets/wordmark.png` (the dark lockup) contain-fit, with one VoiceOver label, “Moonwax”.

## Colour

| Brand | Theme key | Use |
| --- | --- | --- |
| Night `#0A1222` | `colors.bg`, `colors.accentInk` | Screen background; text on Lamp |
| Dusk `#111C32` | `colors.surface` | Inputs, segmented controls, image placeholders |
| Horizon `#1A2A47` | `colors.surface2` | Pressed rows, selected segment |
| Sky `#24406B` | `colors.sky` | Top-of-screen glow, gradients only |
| Line `#253551` | `colors.border` | Hairlines |
| Line Strong `#566B90` | `colors.lineStrong` | Input and outlined-button borders (3:1) |
| Moonlight `#F3ECDF` | `colors.text` | Titles, scores |
| Mist `#A9B5CA` | `colors.text2` | Artist, year, body |
| Dim `#7B8BA8` | `colors.text3` | Ranks, captions. Not on Horizon |
| Lamp `#F2B661` | `colors.accent` | Primary action, selected segment label, refresh tint |
| Lamp Deep `#D99A45` | `colors.accentDim` | Pressed primary action |

Lamp never colours a score.

## Type

- **Display**: `fonts.serifItalic` (Fraunces Italic). Charts title 36 pt, sign-in headline 46 pt, the lead record’s title 26 pt. Cap with `maxFontSizeMultiplier` 1.3–1.4.
- **Text**: `fonts.sans`, `fonts.sansMedium`, `fonts.sansSemi` (Inter). Row titles 16 pt semibold, metadata 14 pt.
- **Numerals**: `fonts.sansSemi` with `fontVariant: ['tabular-nums']`. Ranks 15 pt in Dim, scores 17 pt in Moonlight.
- Keep Dynamic Type on.

## Charts (`app/(tabs)/charts.tsx`)

- The `FlatList` is the screen’s scroll container, with `contentInsetAdjustmentBehavior="automatic"` and a Night scrim under the status bar.
- Header: “Charts” with the header role, a one-line summary, then a segmented control for Albums, Songs and Trending. Trending adds Albums and Songs. The selected segment is a Horizon thumb with a Lamp label, exposed as a tab with `selected` state. Changing segment plays `Haptics.selectionAsync()` on iOS.
- Lead record (number one): 128 pt artwork over a blurred copy of itself (`blurRadius` 50, 50 percent) that fades into Night.
- Rows: rank column 24 pt, artwork 56 pt with radius 6, title up to two lines, “Artist · Year”, then a trailing column at least 56 pt wide. Top charts show the score; Trending shows the weekly ranking count with “this week”.
- One VoiceOver stop per row: “Rank 4. Title, Artist, 1997. Score 59.2.” Artwork is decorative inside the row.
- At `fontScale` 1.6 and above the score moves under the artist so titles keep their width.
- States: a spinner under the header while loading, “The charts didn’t load.” with Try again on failure, an empty message otherwise. Pull to refresh.

## Sign-in (`app/(auth)/sign-in.tsx`, `email-sign-in.tsx`)

- The sign-in screen bundles the night scene locally so it is visible immediately.
- Everything sits in one `ScrollView` padded by the safe-area insets, so large text never hides a button.
- Sign in with Apple uses the white style, 52 pt, capsule. Continue with Google is Dusk with a Line Strong border. Continue with email is a 44 pt text button.
- The email screen scrolls with `automaticallyAdjustKeyboardInsets` and `keyboardShouldPersistTaps="handled"`; inputs carry labels and `textContentType` for AutoFill, and Return on the password field submits.

## Controls and motion

- Primary action: Lamp fill, Night label in Inter 600 17 pt, at least 44 pt tall, pressed state Lamp Deep.
- Rounded corners use `borderCurve: 'continuous'`; shadows use `boxShadow`.
- With Reduce Motion on, nothing moves; changes are instant. Haptics stay limited to selection changes.

## Files to place after export

`mobile/assets/icon.png`, `splash-icon.png`, `adaptive-icon.png`, `favicon.png` and `wordmark.png` (dark lockup, transparent PNG at 3x).
