# Forest Floor - Complete Design System
> Version 1.0 - Theme 17 in the catalog - slug `forest-floor`

---

## 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:** Forest Floor
**Mode:** Light
**Typeface:** Merriweather
**Personality:** Warm cream and deep moss green with leaf-shaped corners and Merriweather serif text.
**Best Suited For:** Sustainability and outdoors brands, blogs, education, community and nonprofit sites

**Core Principles:**
- Leaf corners: cards are 16px 4px 16px 4px, buttons are 12px 4px 12px 4px.
- Everything is serif (Merriweather). Hierarchy comes from weight and size.
- Green is the action colour. Amber (#c98b3a) is a rare highlight, used once per view.
- Background is warm cream, never pure white.

---

## 2. CSS Custom Properties - Master Token Sheet

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

```css
/*
 * Forest Floor - scoped design-system tokens (Theme 17 in catalog).
 */

[data-ds="forest-floor"] {
  --ds-color-bg-base: #f4efe1;
  --ds-color-bg-surface: #fbf8ee;
  --ds-color-bg-sunken: #ebe5d0;
  --ds-color-bg-secondary: #e8e1c9;
  --ds-color-bg-overlay: rgba(36,59,42,0.45);

  --ds-color-primary: #2f6b3f;
  --ds-color-primary-hover: #295e37;
  --ds-color-primary-active: #255331;
  --ds-color-primary-fg: #f4efe1;

  --ds-color-text-primary: #243b2a;
  --ds-color-text-secondary: #46604a;
  --ds-color-text-tertiary: #546a4f;
  --ds-color-text-muted: #546a4f;
  --ds-color-text-disabled: #98a38f;
  --ds-color-text-inverse: #f4efe1;

  --ds-color-border-light: #d9d2b6;
  --ds-color-border-medium: #b9b08c;
  --ds-color-border-strong: #5f7a4b;

  --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: "Merriweather", Georgia, serif;
  --ds-font-body: "Merriweather", Georgia, serif;
  --ds-font-label: "Merriweather", Georgia, serif;
  --ds-label-transform: none;
  --ds-label-tracking: 0.02em;
  --ds-label-weight: 700;
  --ds-heading-tracking: -0.005em;
  --ds-heading-weight: 700;

  --ds-radius-badge: 999px;
  --ds-radius-sm: 8px;
  --ds-radius-md: 12px;
  --ds-radius-lg: 16px;
  --ds-radius-xl: 20px;
  --ds-radius-full: 9999px;

  --ds-border-width: 1px;

  --ds-shadow-card: 0 6px 14px rgba(36,59,42,0.14);
  --ds-shadow-dropdown: 0 10px 24px rgba(36,59,42,0.18);
  --ds-shadow-modal: 0 20px 44px rgba(36,59,42,0.24);
  --ds-shadow-focus: 0 0 0 3px rgba(47,107,63,0.35);
  --ds-shadow-btn-hover: 0 4px 10px rgba(36,59,42,0.2);

  --ds-btn-text-transform: none;
  --ds-btn-letter-spacing: 0.01em;
  --ds-btn-font-weight: 700;
  --ds-btn-active-transform: translateY(1px);
  --ds-btn-secondary-bg: #c98b3a;
  --ds-btn-secondary-text: #2a1c05;
  --ds-btn-secondary-border: #c98b3a;
  --ds-btn-secondary-hover-bg: #b57d34;
  --ds-btn-outline-text: #243b2a;
  --ds-btn-outline-border: #5f7a4b;
  --ds-btn-outline-hover-bg: #e8e1c9;
  --ds-btn-outline-hover-text: #243b2a;

  --ds-table-header-bg: #e0d9bb;
  --ds-table-header-text: #243b2a;
  --ds-table-header-border-bottom: 1px solid #b9b08c;
  --ds-table-container-radius: 16px 4px 16px 4px;
  --ds-table-container-border: 1px solid #d9d2b6;

  --ds-focus-ring: 0 0 0 3px rgba(47,107,63,0.35);

  --ds-ease-standard: cubic-bezier(0.3, 0.7, 0.3, 1);
  --ds-duration-fast: 140ms;
  --ds-duration-base: 220ms;
  --ds-duration-slow: 320ms;
}

[data-ds="forest-floor"] .ds-card, [data-ds="forest-floor"] .ds-modal { border-radius: 16px 4px 16px 4px; }
[data-ds="forest-floor"] .ds-btn-primary, [data-ds="forest-floor"] .ds-btn-secondary, [data-ds="forest-floor"] .ds-btn-outline { border-radius: 12px 4px 12px 4px; }
```

---

## 3. Color Palette

### 3.1 Core Colors

| Role | Value |
|---|---|
| Page background | `#f4efe1` |
| Surface | `#fbf8ee` |
| Sunken | `#ebe5d0` |
| Secondary surface | `#e8e1c9` |
| Primary action | `#2f6b3f` |
| Primary text on action | `#f4efe1` |
| Accent / secondary button | `#c98b3a` |
| Accent text | `#2a1c05` |
| Text primary | `#243b2a` |
| Text secondary | `#46604a` |
| Text muted | `#546a4f` |
| Border light | `#d9d2b6` |
| Border strong | `#5f7a4b` |

### 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 | `#243b2a` on `#f4efe1` | 10.5:1 |
| Secondary text | `#46604a` on `#f4efe1` | 6.0:1 |
| Muted text | `#546a4f` on `#f4efe1` | 5.1:1 |
| Primary button label | `#f4efe1` on `#2f6b3f` | 5.5:1 |
| Accent button label | `#2a1c05` on `#c98b3a` | 5.7:1 |
| Table header | `#243b2a` on `#e0d9bb` | 8.5:1 |

---

## 4. Typography System

### 4.1 Font Families

| Role | Family | Usage |
|---|---|---|
| Display | Merriweather | Headings, hero titles |
| Body | Merriweather | Body copy, buttons, form fields |
| Label | Merriweather | Labels, eyebrows, metadata |

### 4.2 Type Scale

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

### 4.3 Google Fonts Import Block

```css
@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@400;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) | 8px |
| Buttons, inputs | 12px |
| Cards, modals | 16px (asymmetric, see tokens.css) |
| Large panels | 20px |
| Avatars, switches | 9999px |

Border width: 1px.

---

## 7. Shadow & Elevation System

| Level | Value |
|---|---|
| Card | `0 6px 14px rgba(36,59,42,0.14)` |
| Dropdown | `0 10px 24px rgba(36,59,42,0.18)` |
| Modal | `0 20px 44px rgba(36,59,42,0.24)` |
| Focus | `0 0 0 3px rgba(47,107,63,0.35)` |
| Button hover | `0 4px 10px rgba(36,59,42,0.2)` |

---

## 8. Component Specifications

### 8.1 Buttons
- Primary: background `--ds-color-primary`, label `--ds-color-primary-fg`. Hover `#295e37`, active `#255331`.
- Secondary: background `#c98b3a`, label `#2a1c05`.
- Outline: transparent, border `#5f7a4b`, label `#243b2a`.
- Label style: `none` text, weight 700, tracking 0.01em.
- Active (pressed): `transform: translateY(1px)`.

### 8.2 Form Inputs
Surface background, 1px border `#b9b08c`, radius 12px. Focus uses the focus shadow. Error border `#c0262d`.

### 8.3 Labels
Font Merriweather, none, weight 700, tracking 0.02em, colour `#546a4f`.

### 8.4 Card / Surface
Background `#fbf8ee`, border 1px `#d9d2b6`, radius 16px, 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 `#2f6b3f`, mark `#f4efe1`. Switch track uses border strong when off.

### 8.7 Table
Header background `#e0d9bb`, header text `#243b2a`. Container border `1px solid #d9d2b6`, radius 16px 4px 16px 4px.

### 8.8 Dropdown Panel
Surface background, border 1px `#b9b08c`, dropdown shadow, item hover uses `#e8e1c9`.

---

## 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.3, 0.7, 0.3, 1)` |
| Fast | 140ms |
| Base | 220ms |
| Slow | 320ms |

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 Forest Floor 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 `0 4px 10px rgba(36,59,42,0.2)` |
| Active | `translateY(1px)` |
| Focus | `0 0 0 3px rgba(47,107,63,0.35)` |
| Disabled | Text `#98a38f`, no shadow, cursor not-allowed |
| Error | Border `#c0262d`, message in the same colour |
| Success | Border `#1b7441` |
