# Gem Frame

A cheeky fantasy-quest look for everyday products. The page is night-blue stone with faint drawn cracks. Headlines are a calligraphic serif with a slight swagger, labels and buttons are carved small caps, and the important things sit inside gilded frames with clipped corners and one glowing sapphire set in the top edge. Gold buttons glow like lanterns. Progress is never a plain number: it's an XP bar, a quest log or a reward in gold. It feels nostalgic and playful, like the menu screen of an old role-playing game, while staying readable enough for a real product.

Use it for: habit and chore apps, games and play, kids and family products, hobby clubs, learning streaks, loyalty programs, community memberships, anything that rewards people for showing up. Avoid it for: banking, health records, legal or B2B tools where the joke would undercut trust, and anything that needs a light theme.

## How to use this file

Give this file, `tokens.css` and `components.css` to your AI coding tool and say:

> Build [your page] in the Gem Frame style. Follow DESIGN.md exactly. Use the tokens in tokens.css and the classes in components.css; don't invent new colors, fonts, radii or shadows.

`demo.html` (a landing page), `pricing.html`, `blog.html` and `signup.html` are complete example pages built only with the kit, for a made-up chore app called Hearthquest.

## Fonts

All free on Google Fonts:

```html
<link href="https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,500;0,700;0,800;1,500&family=Cinzel:wght@600;700&family=Figtree:wght@400;500;600&display=swap" rel="stylesheet">
```

| Role | Font | Use |
|---|---|---|
| Headlines | Alegreya 700 to 800 | Hero, section headings, card titles, plan names, big numbers. Italic 500 for quotes. |
| Carved labels | Cinzel 600 to 700 | Buttons, eyebrows, badges, panel titles, table headers, form labels. Always uppercase with wide tracking (0.12em to 0.2em). Never for sentences. |
| Body | Figtree 400 to 600 | Paragraphs, nav, quest names, form inputs, everything people read at length. |
| Mono | System mono | Exported text and code blocks only. |

## Color

| Token | Hex | Role |
|---|---|---|
| `--gf-stone` | #141A28 | The page. Always night-blue stone, with the crack drawing on `.gf` |
| `--gf-stone-2` | #1C2335 | Inside frames, cards and panels |
| `--gf-stone-3` | #262F46 | Secondary buttons, table headers, badges |
| `--gf-deep` | #0C1019 | Inset wells: inputs, bars, code, footer, the herald strip |
| `--gf-crack` | #2F3954 | Every border and divider |
| `--gf-parchment` | #EFE6D3 | Headlines and body text |
| `--gf-soft` | #A9AEC2 | Leads and secondary text |
| `--gf-gold` | #E3B04B | Frames, the primary button, eyebrows, rewards, gilt words |
| `--gf-gold-light` / `--gf-gold-deep` | #F6D98A / #9C6B22 | The top and bottom of every gold gradient |
| `--gf-bronze` | #5E3C24 | Inner edge of the crest, the wooden rail |
| `--gf-gem` | #45BDE8 | The one sapphire per frame, links, focus rings, callouts |
| `--gf-xp` / `--gf-hp` / `--gf-mana` | #63C46F / #DC5A43 / #8A78E6 | Game stats: bars and badges only. HP red doubles as the error color |

Rules:
- Gold is metal, not paint. It always appears as a gradient (light at the top, deep at the bottom) on frames, crests and gilt text, and as a flat color only for small labels and rewards.
- One gem per frame, set in the top edge, centered. Never scatter gems.
- Stat colors live inside bars, badges and quest logs. Never use them for page chrome or buttons.
- No light sections. Variety comes from `--raised` panels, `--deep` wells and the wooden rail.

## Type scale

| Token | Size | Use |
|---|---|---|
| `--gf-text-hero` | clamp(42px, 6.4vw, 80px) | Hero headline, line-height 1.02, a dark drop shadow underneath |
| `--gf-text-h2` | clamp(32px, 4vw, 50px) | Section headings |
| `--gf-text-h3` | 24px | Card titles, sub-headings |
| `--gf-text-lead` | 19px | The sentence under a headline, soft color, max 620px |
| `--gf-text-body` | 16px | Body |
| `--gf-text-label` | 12px | Carved caps |

Headlines are cheeky one-liners that treat ordinary tasks as epic ("The dishes won't slay themselves."). One phrase per page can be wrapped in `.gf-gilt` for gold lettering.

## Shape and space

- Corners are clipped, not rounded: frames and buttons use a 10px and 8px notch (`--gf-notch`). Inputs get a 2px radius. Only avatar coins are round.
- Frames: a 2px gold gradient edge (`.gf-frame`), or a stone edge (`.gf-frame--stone`) for supporting panels. Drop shadows are deep and soft (`drop-shadow`), never colored except the gold glow.
- Glow: gold buttons carry a warm lantern glow; gems twinkle softly. Nothing else glows.
- Inset wells (`--gf-inset`) for anything you fill: bars, inputs, quest checks, code.
- Sections: 72px to 120px vertical padding. Container 1140px, text 720px.
- Motion: a short rise on entry and the gem twinkle. Both stop under reduced motion.

## Components (in components.css)

| Class | What it is |
|---|---|
| `.gf` | Body class: stone background with drawn cracks, base type |
| `.gf-herald` | Slim deep strip above the nav with one gold word |
| `.gf-nav`, `__links`, `__actions`, `.gf-logo` | Logo with a tiny gem, plain links, a stone button |
| `.gf-crest`, `__gem`, `__word` | The signature gilded plaque with a gem in its top edge. Use once per page |
| `.gf-hero-title`, `.gf-h2`, `.gf-h3`, `.gf-gilt` | Serif headlines; `.gf-gilt` turns a phrase into gold lettering |
| `.gf-lead`, `.gf-eyebrow`, `.gf-label`, `.gf-small` | Lead text; carved eyebrow flanked by two gems; carved label; meta text |
| `.gf-btn--gold/stone/ghost`, `--sm`, `--block` | Clipped-corner carved buttons. Gold glows; stone is secondary; ghost is a gem-blue text link with an arrow |
| `.gf-btn-row`, `.gf-btn-note` | Button group and the small note under it ("(free for a party of four)") |
| `.gf-frame`, `__body`, `--gem`, `--stone` | The gilded frame. Content goes in `__body`. Add `--gem` for the top gem |
| `.gf-panel`, `__head`, `__title` | A product window inside a frame, with a carved title row |
| `.gf-quests`, `.gf-quest`, `--done`, `__check/__name/__meta/__reward` | Quest log rows with diamond checks and a gold reward |
| `.gf-bar`, `--hp/--mana/--gold`, `__fill`, `.gf-bar-label` | Segmented stat bars; set `--v` on the fill for the value |
| `.gf-badge`, `--gold/--gem/--xp/--hp` | Small carved tags with clipped corners |
| `.gf-coin`, `.gf-party` | Round avatar coin with a gold edge; overlapping coins with a count |
| `.gf-grid`, `.gf-card`, `__icon/__title/__text` | Feature cards; the icon sits in a rotated diamond well |
| `.gf-stats`, `.gf-stat__num/__label` | Big serif numbers, best in `.gf-gilt` |
| `.gf-quote`, `__text/__by` | Italic serif quote with a coin and byline |
| `.gf-section`, `--raised`, `--deep`, `.gf-rail` | Section surfaces and the bronze wooden rail between big sections |
| `.gf-toggle` | Inset two-option toggle (Monthly / Yearly) |
| `.gf-plans`, `.gf-plan`, `--featured`, `__tier/__name/__desc/__price/__amount/__per/__list` | Pricing cards; the featured plan uses a gold gem frame and the only gold button |
| `.gf-table-wrap`, `.gf-table`, `__yes/__no` | Comparison table; the wrap scrolls on small screens |
| `.gf-faq` | `<details>` list with a diamond that lights up when open |
| `.gf-prose`, `.gf-callout`, `.gf-meta`, `.gf-author`, `--card` | Article text with carved h3s and diamond bullets; gem-edged callout; author line and closing card |
| `.gf-post`, `__thumb/__body/__title/__text` | Related post card inside a stone frame |
| `.gf-form`, `.gf-field`, `__label`, `.gf-field-row`, `.gf-input`, `.gf-select` | Stacked fields with carved labels and dark inset inputs |
| `.gf-input-wrap`, `.gf-input-toggle`, `.gf-help`, `.gf-error`, `.gf-field--error` | Show/hide password, hints, and errors in HP red |
| `.gf-check` | Diamond checkbox that lights gold when checked |
| `.gf-btn--social`, `.gf-btn__letter`, `.gf-divider-text` | Plain social buttons with letter tiles (no brand logos); "or" divider |
| `.gf-footer`, `__cols`, `__bottom` | Deep footer with carved column titles |
| `.gf-rise`, `.gf-clip` | Entrance animation; a wrapper that clips sideways overflow |

## Pages in this kit

- `demo.html`: the landing page (herald, crest hero, quest log and stat panels, how it works, party board, quote and stats, final call to action).
- `pricing.html`: three plans with a Monthly / Yearly toggle, a comparison table, an FAQ and a call to action.
- `blog.html`: a long-form article with a framed cover panel, prose, a stat-bar figure, an author card and related posts.
- `signup.html`: a split page, the form on stone and a deep panel with a crest, a starter quest log and a quote.

## Page recipe

1. `.gf-herald` with one gold word, then the nav.
2. Hero, centered: the `.gf-crest` with the product name, a cheeky `.gf-hero-title`, a lead, a gold button next to a ghost link, and a small note under them.
3. The product below the hero: a gem frame holding a quest log, next to one or two stone frames with stat bars. This is your product shot; draw it, don't screenshot it.
4. `.gf-rail`, then a raised section: carved eyebrow, h2, lead and three gem-framed cards.
5. A split section: text on one side, a framed leaderboard or panel on the other.
6. Raised section with a quote and three gilt stats.
7. `.gf-rail`, a centered final call to action, then the footer.

## Pricing page recipe

1. Herald and nav as on the landing page.
2. Centered eyebrow, a hero title with one `.gf-gilt` phrase, a lead, then `.gf-toggle`. Keep both prices in `data-monthly` and `data-yearly` and swap them in a few lines of JS.
3. `.gf-plans` with three plans. Side plans in `.gf-frame--stone` with stone buttons; the middle plan in `.gf-frame--gem` with `.gf-plan--featured`, a gold badge and the only gold button.
4. One line of small print, then `.gf-rail`.
5. Raised section with the comparison table.
6. `.gf-faq` in the narrow container, first item open.
7. `.gf-rail` and a final call to action.

## Article page recipe

1. Nav, no herald.
2. In the narrow container: carved eyebrow for the category, the hero title at a smaller clamp, a lead, then `.gf-author` with `.gf-meta`.
3. A wide gem frame as the cover, holding real-looking product UI (a table of tiers, a quest log). No photos needed.
4. `.gf-prose` body: short paragraphs, h2 sections, carved h3s, one pull quote, one `.gf-callout`, a `<pre>` block and a `<figure>` with a framed panel and caption.
5. `.gf-author--card` in a stone frame.
6. `.gf-rail`, a raised section with three `.gf-post` cards, then the footer.

## Sign-up page recipe

1. Two columns, full height. Left on stone: logo, an h2, a one-line lead.
2. `.gf-form`: a `.gf-field-row` with two fields, email, password with `.gf-input-wrap`, a select, a `.gf-check`, and a gold block button with a playful label ("Raise the banner").
3. `.gf-divider-text`, two `.gf-btn--social` buttons side by side, then a log in link.
4. Right column in `--gf-deep`: a crest with the user's house name, a gem frame with three starter quests, and a quote. Hide it below 860px.

## Don'ts

- Don't round the frames or buttons. Clip the corners.
- Don't use flat gold on big shapes; gold is always a gradient there.
- Don't put more than one gem on a frame, or more than one crest on a page.
- Don't use Cinzel for sentences or Alegreya for body text.
- Don't add a light section or a white card.
- Don't use real game art, logos or characters. Draw everything with CSS and simple inline SVG.
- Don't use em dashes in copy.
