From 417379d1af470774d93452ffda925c23b85565ec Mon Sep 17 00:00:00 2001 From: Tyler Date: Wed, 17 Jun 2026 13:36:15 -0600 Subject: [PATCH] feat(design): add Field Almanac tokens (type, color, spacing, motion) --- src/app/globals.css | 82 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/src/app/globals.css b/src/app/globals.css index 98a6ca9..2dc3e42 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -75,6 +75,88 @@ --color-citrus-900: #7c2d12; } +/* ─── Field Almanac palette (mobile-first / HIG Accessibility) ─── */ +:root { + /* Surfaces */ + --color-bg: #ffffff; + --color-surface: #faf8f5; + --color-surface-2: #f5f5f7; + --color-surface-3: #e8e8ed; + + /* Text — all AAA on --color-surface (14.6 / 9.4) except --text-faint (5.3 / AA only) */ + --color-text: #1d1d1f; + --color-text-muted: #424245; + --color-text-faint: #6e6e73; + + /* Accent / status — AAA on --color-surface */ + --color-accent: #166534; /* primary actions, brand */ + --color-accent-2: #15803d; /* hover state */ + --color-accent-soft: #dcfce7; /* tinted backgrounds, accent at ~10% */ + --color-danger: #b91c1c; /* errors, destructive */ + --color-danger-soft: #fee2e2; + --color-warning: #854d0e; /* warnings, low stock */ + --color-warning-soft: #fef9c3; + --color-success: #166534; /* completed, positive */ + --color-success-soft: #dcfce7; + --color-info: #1e40af; /* informational */ + --color-info-soft: #dbeafe; +} + +/* ─── Type scale (HIG Accessibility-tier) ─── */ +:root { + --text-display: 32px; + --text-display--line-height: 1.15; + --text-display--letter-spacing: -0.01em; + + --text-h1: 24px; + --text-h1--line-height: 1.2; + + --text-h2: 19px; + --text-h2--line-height: 1.3; + + --text-body: 18px; + --text-body--line-height: 1.45; + + --text-label: 15px; + --text-label--line-height: 1.3; + --text-label--letter-spacing: 0.02em; + + --text-mono: 14px; + --text-mono--line-height: 1.4; + + --text-meta: 13px; + --text-meta--line-height: 1.4; +} + +/* ─── Spacing (8pt grid) ─── */ +:root { + --space-1: 4px; + --space-2: 8px; + --space-3: 12px; + --space-4: 16px; + --space-6: 24px; + --space-8: 32px; + --space-12: 48px; + --space-16: 64px; +} + +/* ─── Motion ─── */ +:root { + --ease-apple: cubic-bezier(0.32, 0.72, 0, 1); + --duration-fast: 150ms; + --duration-base: 200ms; + --duration-slow: 320ms; +} + +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + scroll-behavior: auto !important; + } +} + /* ─── Base ─────────────────────────────────────────────────────── */ *, *::before, *::after {