/**
 * Global design tokens for the Recipe Manager frontend.
 *
 * Keep these semantic and reusable so components can evolve without large refactors.
 */

export const colors = {
  primary: '#2563eb',
  primaryDark: '#1d4ed8',
  primaryLight: '#dbeafe',
  accent: '#9333ea',

  success: '#15803d',
  successLight: '#dcfce7',
  warning: '#ca8a04',
  warningLight: '#fef3c7',
  error: '#dc2626',
  errorLight: '#fee2e2',

  bg: '#f4f7fb',
  bgAlt: '#edf2f7',
  surface: '#ffffff',
  surfaceMuted: '#f8fafc',
  border: '#dbe3ef',

  text: '#1f2937',
  textDim: '#64748b',
  textHeading: '#0f172a',

  focusRing: '#2563eb',
} as const;

export const typography = {
  fontFamily: {
    sans: "Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
    heading: "Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",
    mono: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
  },
  fontSize: {
    xs: '0.75rem',
    sm: '0.875rem',
    base: '1rem',
    lg: '1.125rem',
    xl: '1.25rem',
    '2xl': '1.5rem',
    '3xl': '1.875rem',
    '4xl': '2.25rem',
  },
  lineHeight: {
    tight: '1.2',
    normal: '1.5',
    relaxed: '1.65',
  },
  fontWeight: {
    regular: 400,
    medium: 500,
    semibold: 600,
    bold: 700,
    extrabold: 800,
  },
} as const;

export const spacing = {
  xxs: '0.25rem',
  xs: '0.5rem',
  sm: '0.75rem',
  md: '1rem',
  lg: '1.5rem',
  xl: '2rem',
  '2xl': '2.5rem',
  '3xl': '3rem',
} as const;

export const radius = {
  xs: '0.375rem',
  sm: '0.5rem',
  md: '0.75rem',
  lg: '1rem',
  xl: '1.25rem',
  full: '9999px',
} as const;

export const shadows = {
  subtle: '0 1px 2px rgba(15, 23, 42, 0.06)',
  card: '0 10px 30px rgba(15, 23, 42, 0.08)',
  hover: '0 14px 34px rgba(15, 23, 42, 0.12)',
  focus: '0 0 0 3px rgba(37, 99, 235, 0.25)',
} as const;

export const recipeAccentPalette = ['#f97316', '#ef4444', '#22c55e', '#06b6d4', '#3b82f6', '#a855f7'] as const;

export const designTokens = {
  colors,
  typography,
  spacing,
  radius,
  shadows,
  recipeAccentPalette,
} as const;
