import { createTheme } from '@mantine/core';
import { palette } from './palette';

export const theme = createTheme({
  colors: palette,
  primaryColor: 'brand',
  primaryShade: { light: 6, dark: 5 },
  defaultRadius: 'md',
  radius: {
    xs: '4px',
    sm: '6px',
    md: '8px',
    lg: '12px',
    xl: '22px',
  },
  fontFamily: 'var(--font-outfit), "Segoe UI", sans-serif',
  fontFamilyMonospace: 'ui-monospace, SFMono-Regular, Menlo, monospace',
  headings: {
    fontFamily: 'var(--font-outfit), "Segoe UI", sans-serif',
    fontWeight: '500',
    textWrap: 'pretty',
    sizes: {
      h1: { fontSize: '2.75rem', lineHeight: '1.08', fontWeight: '500' },
      h2: { fontSize: '2.25rem', lineHeight: '1.1', fontWeight: '500' },
      h3: { fontSize: '1.75rem', lineHeight: '1.15', fontWeight: '500' },
      h4: { fontSize: '1.375rem', lineHeight: '1.2', fontWeight: '600' },
      h5: { fontSize: '1.125rem', lineHeight: '1.3', fontWeight: '600' },
      h6: { fontSize: '1rem', lineHeight: '1.4', fontWeight: '600' },
    },
  },
  fontSizes: {
    xs: '0.75rem',
    sm: '0.875rem',
    md: '1rem',
    lg: '1.125rem',
    xl: '1.25rem',
  },
  lineHeights: {
    xs: '1.25',
    sm: '1.4',
    md: '1.5',
    lg: '1.6',
    xl: '1.7',
  },
  fontWeights: {
    regular: '400',
    medium: '500',
    bold: '700',
  },
  spacing: {
    xs: '0.5rem',
    sm: '0.75rem',
    md: '1rem',
    lg: '1.5rem',
    xl: '2rem',
  },
  shadows: {
    xs: '0 4px 12px rgba(26, 43, 35, 0.05)',
    sm: '0 10px 24px rgba(26, 43, 35, 0.05)',
    md: '0 14px 34px rgba(26, 43, 35, 0.1)',
    lg: '0 18px 40px rgba(26, 43, 35, 0.12)',
    xl: '0 24px 50px rgba(26, 43, 35, 0.13)',
  },
  breakpoints: {
    xs: '36em',
    sm: '48em',
    md: '62em',
    lg: '75em',
    xl: '88em',
  },
  focusRing: 'auto',
  respectReducedMotion: true,
  cursorType: 'pointer',
  other: {
    colorPage: '#f4f1eb',
    colorSurface: '#fffcf8',
    colorInk: '#1a2b23',
    colorInkSoft: '#3e4d45',
    colorMuted: '#6a756e',
    colorLine: 'rgba(26, 43, 35, 0.12)',
    colorOrange: '#e3782f',
    colorOrangeDeep: '#c9621c',
    colorForestDeep: '#152e25',
    containerWidth: '1200px',
    easeOut: 'cubic-bezier(0.22, 1, 0.36, 1)',
  },
});
