# Bauhaus Blocks - Complete Design System
> Version 1.0 - Theme 21 in the catalog - slug `bauhaus-blocks`

---

## Table of Contents

1. [System Overview](#1-system-overview)
2. [CSS Custom Properties - Master Token Sheet](#2-css-custom-properties--master-token-sheet)
3. [Color Palette](#3-color-palette)
4. [Typography System](#4-typography-system)
5. [Spacing System](#5-spacing-system)
6. [Border Radius System](#6-border-radius-system)
7. [Shadow & Elevation System](#7-shadow--elevation-system)
8. [Component Specifications](#8-component-specifications)
9. [Layout & Grid System](#9-layout--grid-system)
10. [Animation & Transition Tokens](#10-animation--transition-tokens)
11. [Z-Index System](#11-z-index-system)
12. [Breakpoints](#12-breakpoints)
13. [Icon System](#13-icon-system)
14. [State Definitions](#14-state-definitions)

---

## 1. System Overview

**Design Language:** Bauhaus Blocks
**Mode:** Light
**Typeface:** Josefin Sans
**Personality:** Primary red, blue and yellow on warm cream with thick black outlines, one quarter-round corner and Josefin Sans.
**Best Suited For:** Creative studios, education, art and culture sites, posters and event pages, bold marketing sites

**Core Principles:**
- Only red, blue, yellow, black and cream. Yellow is a fill colour, never a text colour.
- Every surface has a 3px black outline. Cards have one quarter-round corner (top right, 40px).
- Headings and buttons are uppercase and letterspaced.
- Blue offset shadow on cards, black offset shadow on buttons.

---

## 2. CSS Custom Properties - Master Token Sheet

All tokens are scoped under `[data-ds="bauhaus-blocks"]`. Nothing is defined at `:root`. The same sheet ships as `tokens.css` in this system's folder.

```css
/*
 * Bauhaus Blocks - scoped design-system tokens (Theme 21 in catalog).
 */

[data-ds="bauhaus-blocks"] {
  --ds-color-bg-base: #f3ead3;
  --ds-color-bg-surface: #fffaf0;
  --ds-color-bg-sunken: #e9dfc2;
  --ds-color-bg-secondary: #e9dfc2;
  --ds-color-bg-overlay: rgba(22,22,22,0.5);

  --ds-color-primary: #c8142a;
  --ds-color-primary-hover: #b01225;
  --ds-color-primary-active: #9c1021;
  --ds-color-primary-fg: #ffffff;

  --ds-color-text-primary: #161616;
  --ds-color-text-secondary: #3a3a3a;
  --ds-color-text-tertiary: #4a4a4a;
  --ds-color-text-muted: #4a4a4a;
  --ds-color-text-disabled: #8f8a78;
  --ds-color-text-inverse: #ffffff;

  --ds-color-border-light: #161616;
  --ds-color-border-medium: #161616;
  --ds-color-border-strong: #161616;

  --ds-color-success: #1b7441;
  --ds-color-success-bg: #d7f2e0;
  --ds-color-warning: #8a5700;
  --ds-color-warning-bg: #fff0cc;
  --ds-color-error: #c0262d;
  --ds-color-error-bg: #fde3e4;
  --ds-color-info: #1d5fbf;
  --ds-color-info-bg: #dce9fb;

  --ds-font-display: "Josefin Sans", system-ui, sans-serif;
  --ds-font-body: "Josefin Sans", system-ui, sans-serif;
  --ds-font-label: "Josefin Sans", system-ui, sans-serif;
  --ds-label-transform: uppercase;
  --ds-label-tracking: 0.12em;
  --ds-label-weight: 700;
  --ds-heading-tracking: 0.04em;
  --ds-heading-weight: 700;

  --ds-radius-badge: 999px;
  --ds-radius-sm: 0px;
  --ds-radius-md: 0px;
  --ds-radius-lg: 0px;
  --ds-radius-xl: 0px;
  --ds-radius-full: 9999px;

  --ds-border-width: 3px;

  --ds-shadow-card: 8px 8px 0 #1d4ed8;
  --ds-shadow-dropdown: 6px 6px 0 #161616;
  --ds-shadow-modal: 10px 10px 0 #1d4ed8;
  --ds-shadow-focus: 4px 4px 0 #f6c90e;
  --ds-shadow-btn-hover: 4px 4px 0 #161616;

  --ds-btn-text-transform: uppercase;
  --ds-btn-letter-spacing: 0.08em;
  --ds-btn-font-weight: 700;
  --ds-btn-active-transform: translate(4px, 4px);
  --ds-btn-secondary-bg: #1d4ed8;
  --ds-btn-secondary-text: #ffffff;
  --ds-btn-secondary-border: #161616;
  --ds-btn-secondary-hover-bg: #1a46c2;
  --ds-btn-outline-text: #161616;
  --ds-btn-outline-border: #161616;
  --ds-btn-outline-hover-bg: #e9dfc2;
  --ds-btn-outline-hover-text: #161616;

  --ds-table-header-bg: #f6c90e;
  --ds-table-header-text: #161616;
  --ds-table-header-border-bottom: 3px solid #161616;
  --ds-table-container-radius: 0px 40px 0px 0px;
  --ds-table-container-border: 3px solid #161616;

  --ds-focus-ring: 4px 4px 0 #f6c90e;

  --ds-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ds-duration-fast: 0ms;
  --ds-duration-base: 120ms;
  --ds-duration-slow: 200ms;
}

[data-ds="bauhaus-blocks"] .ds-card, [data-ds="bauhaus-blocks"] .ds-modal { border-radius: 0 40px 0 0; }
[data-ds="bauhaus-blocks"] .ds-btn:active:not(:disabled) { box-shadow: 0 0 0 #161616; }
```

---

## 3. Color Palette

### 3.1 Core Colors

| Role | Value |
|---|---|
| Page background | `#f3ead3` |
| Surface | `#fffaf0` |
| Sunken | `#e9dfc2` |
| Secondary surface | `#e9dfc2` |
| Primary action | `#c8142a` |
| Primary text on action | `#ffffff` |
| Accent / secondary button | `#1d4ed8` |
| Accent text | `#ffffff` |
| Text primary | `#161616` |
| Text secondary | `#3a3a3a` |
| Text muted | `#4a4a4a` |
| Border light | `#161616` |
| Border strong | `#161616` |

### 3.2 Semantic Colors

| Status | Foreground | Background | Contrast |
|---|---|---|---|
| Success | `#1b7441` | `#d7f2e0` | 4.9:1 |
| Warning | `#8a5700` | `#fff0cc` | 5.4:1 |
| Error | `#c0262d` | `#fde3e4` | 4.9:1 |
| Info | `#1d5fbf` | `#dce9fb` | 5.0:1 |

### 3.3 Contrast Checks

All pairs below meet WCAG AA (4.5:1) for normal text.

| Pair | Colors | Ratio |
|---|---|---|
| Body text | `#161616` on `#f3ead3` | 15.1:1 |
| Secondary text | `#3a3a3a` on `#f3ead3` | 9.5:1 |
| Muted text | `#4a4a4a` on `#f3ead3` | 7.4:1 |
| Primary button label | `#ffffff` on `#c8142a` | 5.9:1 |
| Accent button label | `#ffffff` on `#1d4ed8` | 6.7:1 |
| Table header | `#161616` on `#f6c90e` | 11.4:1 |

---

## 4. Typography System

### 4.1 Font Families

| Role | Family | Usage |
|---|---|---|
| Display | Josefin Sans | Uppercase headings, buttons |
| Body | Josefin Sans | Body copy, form fields |
| Label | Josefin Sans | Uppercase labels, badges, table headers |

### 4.2 Type Scale

| Token | Size | Weight | Tracking | Use |
|---|---|---|---|---|
| Display | 48-64px | 700 | 0.04em | Hero title |
| H1 | 36px | 700 | 0.04em | Page title |
| H2 | 28px | 700 | 0.04em | Section title |
| H3 | 20px | 700 | 0.04em | Card title |
| Body | 16px | 400 | 0 | Paragraphs |
| Label | 12px | 700 | 0.12em | Eyebrows, badges (uppercase) |

### 4.3 Google Fonts Import Block

```css
@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@400;600;700&display=swap");
```

The same URL is loaded by `app/design-systems/fonts.ts`.

---

## 5. Spacing System

Base unit: 4px. Use only these steps.

| Token | Value |
|---|---|
| space-1 | 4px |
| space-2 | 8px |
| space-3 | 12px |
| space-4 | 16px |
| space-6 | 24px |
| space-8 | 32px |
| space-12 | 48px |
| space-16 | 64px |

Component padding: card 20px, button 10px 20px (md), input 10px 14px, badge 2px 10px.

---

## 6. Border Radius System

| Element | Radius |
|---|---|
| Badge | 999px |
| Small controls (checkbox) | 0px |
| Buttons, inputs | 0px |
| Cards, modals | 0px (asymmetric, see tokens.css) |
| Large panels | 0px |
| Avatars, switches | 9999px |

Border width: 3px.

---

## 7. Shadow & Elevation System

| Level | Value |
|---|---|
| Card | `8px 8px 0 #1d4ed8` |
| Dropdown | `6px 6px 0 #161616` |
| Modal | `10px 10px 0 #1d4ed8` |
| Focus | `4px 4px 0 #f6c90e` |
| Button hover | `4px 4px 0 #161616` |

---

## 8. Component Specifications

### 8.1 Buttons
- Primary: background `--ds-color-primary`, label `--ds-color-primary-fg`. Hover `#b01225`, active `#9c1021`.
- Secondary: background `#1d4ed8`, label `#ffffff`.
- Outline: transparent, border `#161616`, label `#161616`.
- Label style: `uppercase` text, weight 700, tracking 0.08em.
- Active (pressed): `transform: translate(4px, 4px)`.

### 8.2 Form Inputs
Surface background, 3px border `#161616`, radius 0px. Focus uses the focus shadow. Error border `#c0262d`.

### 8.3 Labels
Font Josefin Sans, uppercase, weight 700, tracking 0.12em, colour `#4a4a4a`.

### 8.4 Card / Surface
Background `#fffaf0`, border 3px `#161616`, radius 0px, shadow card.

### 8.5 Badge
Pill or 999px radius, label style, semantic backgrounds from section 3.2.

### 8.6 Checkbox, Radio and Switch
Checked fill `#c8142a`, mark `#ffffff`. Switch track uses border strong when off.

### 8.7 Table
Header background `#f6c90e`, header text `#161616`. Container border `3px solid #161616`, radius 0px 40px 0px 0px.

### 8.8 Dropdown Panel
Surface background, border 3px `#161616`, dropdown shadow, item hover uses `#e9dfc2`.

---

## 9. Layout & Grid System

| Container | Max width |
|---|---|
| Narrow (forms, articles) | 640px |
| Default | 1040px |
| Wide (dashboards) | 1280px |

12-column grid, 24px gutters on desktop, 16px on mobile.

---

## 10. Animation & Transition Tokens

| Token | Value |
|---|---|
| Easing | `cubic-bezier(0.4, 0, 0.2, 1)` |
| Fast | 0ms |
| Base | 120ms |
| Slow | 200ms |

Animate colour, transform, opacity and shadow only. Never animate layout properties.

---

## 11. Z-Index System

| Layer | Value |
|---|---|
| Base | 0 |
| Sticky header | 10 |
| Dropdown | 20 |
| Modal backdrop | 40 |
| Modal | 50 |
| Toast | 60 |

---

## 12. Breakpoints

| Name | Min width |
|---|---|
| sm | 640px |
| md | 768px |
| lg | 1024px |
| xl | 1280px |

Page padding: 16px below md, 24px at md, 32px at lg and up.

---

## 13. Icon System

Use Lucide icons at 16, 20 or 24px, stroke 2px (1.5px for Bauhaus Blocks if the type is light). Icon colour follows text colour. Never use filled multi-colour icons.

---

## 14. State Definitions

| State | Treatment |
|---|---|
| Hover | Darker or lighter primary (see 8.1), shadow `4px 4px 0 #161616` |
| Active | `translate(4px, 4px)` |
| Focus | `4px 4px 0 #f6c90e` |
| Disabled | Text `#8f8a78`, no shadow, cursor not-allowed |
| Error | Border `#c0262d`, message in the same colour |
| Success | Border `#1b7441` |
