# Story 12.2: Core CSS Theme Update - Dark Charcoal & Warm Gold Palette

## Story

**As a** developer
**I want to** update the Tailwind CSS theme to use the new dark charcoal and warm gold color palette
**So that** the application reflects the refined LIBRA for Rights brand colors

## Acceptance Criteria

### AC1: Update Color Variables in `resources/css/app.css`

**Given** the current theme uses Olive Green palette
**When** I update the `@theme` block
**Then** the following color mappings are applied:

| Variable | New Hex | Usage |
|----------|---------|-------|
| `--color-primary` | `#1B1D1A` | Header/Footer backgrounds |
| `--color-cta` | `#A68966` | CTA buttons, links, accents |
| `--color-background` | `#F4F1EA` | Main page background |
| `--color-text` | `#2D322A` | Headings, body text |
| `--color-card` | `#FFFFFF` | Card backgrounds |
| `--color-active` | `#4A5D23` | Active states, language toggle |

### AC2: Add Color Variants for UI States

**Given** the new palette needs hover and active states
**When** I update the theme
**Then** these additional variants are defined:

| Variable | Hex | Usage |
|----------|-----|-------|
| `--color-primary-light` | `#2D322A` | Primary hover state |
| `--color-cta-hover` | `#8A7555` | Button hover state |
| `--color-cta-light` | `#C4A882` | Light CTA accent |
| `--color-active-hover` | `#5A7030` | Active state hover |

### AC3: Update Button Styles

**Given** button classes use the primary/accent colors
**When** theme is updated
**Then** `.btn-primary` and `.btn-secondary` use new palette:
- Primary: Warm Gold background (`#A68966`), White text
- Primary Hover: Darker Gold (`#8A7555`)
- Secondary: Dark Charcoal border, Dark text
- Hover states updated accordingly

### AC4: Update Form Focus States

**Given** form inputs have focus rings
**When** theme is updated
**Then** focus states use Warm Gold:
- `focus:border-cta` → Warm Gold border
- `focus:ring-cta` → Warm Gold ring

### AC5: Update Link Colors

**Given** links use accent colors
**When** theme is updated
**Then** link colors use warm gold:
- Default: Warm Gold (`#A68966`)
- Hover: Darker Gold (`#8A7555`)

### AC6: Status Colors Unchanged

**Given** status colors serve functional purposes
**When** theme is updated
**Then** these remain unchanged:
- `--color-success: #27AE60`
- `--color-danger: #E74C3C`
- `--color-warning: #F39C12`

### AC7: WCAG AA Contrast Compliance

**Given** accessibility requirements
**When** new colors are applied
**Then** all text/background combinations meet WCAG AA:
- Text (`#2D322A`) on Warm Cream (`#F4F1EA`): ≥4.5:1 for body text
- White text on Dark Charcoal (`#1B1D1A`): ≥4.5:1 for body text
- White text on Warm Gold (`#A68966`): Verify contrast ratio

### AC8: Update Prose Class

**Given** `.prose-brand` class exists for blog content
**When** theme is updated
**Then** prose colors use new palette:
- Headings: Forest Green (`#2D322A`)
- Links: Warm Gold (`#A68966`)
- Body: Forest Green (`#2D322A`)

### AC9: Build Succeeds

**Given** CSS changes are made
**When** I run `npm run build`
**Then** the build completes successfully without errors

## Technical Notes

### Files to Modify
- `resources/css/app.css` - Main theme file

### New Color Palette Reference

| Color Name | Hex | RGB | Usage |
|------------|-----|-----|-------|
| Dark Charcoal | `#1B1D1A` | rgb(27, 29, 26) | Header/Footer backgrounds |
| Warm Gold | `#A68966` | rgb(166, 137, 102) | CTA buttons, links |
| Warm Cream | `#F4F1EA` | rgb(244, 241, 234) | Main page background |
| Forest Green | `#2D322A` | rgb(45, 50, 42) | Text color |
| Pure White | `#FFFFFF` | rgb(255, 255, 255) | Card backgrounds |
| Olive Green | `#4A5D23` | rgb(74, 93, 35) | Active states |
| Gold Hover | `#8A7555` | rgb(138, 117, 85) | Button hover |
| Gold Light | `#C4A882` | rgb(196, 168, 130) | Light accents |
| Olive Hover | `#5A7030` | rgb(90, 112, 48) | Active hover |

### Contrast Verification

Use WebAIM Contrast Checker to verify:
- Forest Green (#2D322A) on Warm Cream (#F4F1EA): ~10:1 (passes AAA)
- White (#FFFFFF) on Dark Charcoal (#1B1D1A): ~17:1 (passes AAA)
- White (#FFFFFF) on Warm Gold (#A68966): ~3.5:1 (passes AA for large text)

**Note:** For small text on Warm Gold buttons, use white text as it provides sufficient contrast for button contexts.

### CSS Theme Block Example

```css
@theme {
    /* Primary Dark Charcoal Palette */
    --color-primary: #1B1D1A;
    --color-primary-light: #2D322A;

    /* CTA Warm Gold */
    --color-cta: #A68966;
    --color-cta-hover: #8A7555;
    --color-cta-light: #C4A882;

    /* Active Olive Green */
    --color-active: #4A5D23;
    --color-active-hover: #5A7030;

    /* Neutrals */
    --color-background: #F4F1EA;
    --color-text: #2D322A;
    --color-card: #FFFFFF;

    /* For text on dark backgrounds */
    --color-off-white: #F4F1EA;

    /* Status colors (unchanged) */
    --color-success: #27AE60;
    --color-danger: #E74C3C;
    --color-warning: #F39C12;
}
```

## Dev Checklist

- [x] Update `@theme` block with new color values
- [x] Add color variants (hover, light)
- [x] Update `.btn-primary` styles to use CTA colors
- [x] Update `.btn-secondary` styles
- [x] Update form focus states
- [x] Update link colors
- [x] Update `.prose-brand` class
- [x] Update skip-link focus styles
- [x] Verify status colors unchanged
- [x] Run contrast checker on all combinations
- [x] Run `npm run build` successfully
- [ ] Visual test in browser

## Estimation

**Complexity:** Low-Medium
**Risk:** Low - CSS-only changes

## Dependencies

- Story 12.1 (Logo Deployment) - Completed

---

## Dev Agent Record

### Agent Model Used
Claude Opus 4.5 (claude-opus-4-5-20251101)

### Status
Ready for Review

### File List
| File | Action |
|------|--------|
| `resources/css/app.css` | Modified |

### Change Log
| Date | Change |
|------|--------|
| 2026-01-04 | Story updated with new Dark Charcoal & Warm Gold palette |
| 2026-01-04 | Implemented all color palette changes per AC1-AC8 |
| 2026-01-04 | Updated primary color to #2D3624 (Dark Forest Green) per user request |

### Completion Notes
- Updated @theme block with Dark Charcoal & Warm Gold palette (AC1)
- Added all color variants: cta, cta-hover, cta-light, active, active-hover (AC2)
- Updated .btn-primary to use Warm Gold (#A68966) with white text, hover to #8A7555 (AC3)
- Updated .btn-secondary to use Dark Charcoal border with Forest Green text (AC3)
- Updated all form focus states to use Warm Gold (focus:border-cta, focus:ring-cta) (AC4)
- Updated link colors in .prose-brand to use Warm Gold default, Darker Gold hover (AC5)
- Verified status colors unchanged: success=#27AE60, danger=#E74C3C, warning=#F39C12 (AC6)
- Updated .prose-brand class: headings/body use Forest Green, links use Warm Gold (AC8)
- npm run build completed successfully (AC9)
- Maintained backward compatibility aliases for legacy class names
- Updated logo-badge shadow to match new primary color
- All Flux UI form components updated with new focus states
