/** @type {import('tailwindcss').Config} */
module.exports = {
  darkMode: ['class'],
  content: ['./src/**/*.{js,ts,jsx,tsx}'],
  theme: {
    container: {
      center: true,
      padding: '1rem',
      screens: { sm: '640px', md: '768px', lg: '1024px' },
    },
    extend: {
      colors: {
        // ---- Calm, dignified palette ----
        // "paper" = warm off-white, "ink" = warm black, "saffron" = a single
        // restrained accent gesturing at Jain/cultural context.
        paper: {
          DEFAULT: 'hsl(40 35% 97%)',
          50: 'hsl(40 40% 99%)',
          100: 'hsl(40 35% 97%)',
          200: 'hsl(40 30% 93%)',
          300: 'hsl(40 25% 87%)',
          400: 'hsl(40 20% 75%)',
        },
        ink: {
          DEFAULT: 'hsl(30 20% 12%)',
          50: 'hsl(30 12% 98%)',
          100: 'hsl(30 12% 92%)',
          200: 'hsl(30 12% 80%)',
          300: 'hsl(30 12% 60%)',
          400: 'hsl(30 12% 45%)',
          500: 'hsl(30 14% 30%)',
          600: 'hsl(30 16% 22%)',
          700: 'hsl(30 18% 16%)',
          900: 'hsl(30 20% 8%)',
        },
        saffron: {
          DEFAULT: 'hsl(30 80% 50%)',
          50: 'hsl(30 80% 96%)',
          100: 'hsl(30 80% 90%)',
          300: 'hsl(30 80% 70%)',
          500: 'hsl(30 80% 50%)',
          600: 'hsl(28 78% 44%)',
          700: 'hsl(26 75% 36%)',
        },
        moss: {
          DEFAULT: 'hsl(140 25% 30%)',
          100: 'hsl(140 20% 92%)',
          500: 'hsl(140 25% 30%)',
          700: 'hsl(140 30% 22%)',
        },
        rust: 'hsl(10 60% 45%)',

        // shadcn-compatible aliases (for components that expect them)
        background: 'hsl(40 35% 97%)',
        foreground: 'hsl(30 20% 12%)',
        border: 'hsl(40 25% 87%)',
        input: 'hsl(40 25% 87%)',
        ring: 'hsl(30 80% 50%)',
        muted: { DEFAULT: 'hsl(40 30% 93%)', foreground: 'hsl(30 12% 45%)' },
        primary: { DEFAULT: 'hsl(30 18% 16%)', foreground: 'hsl(40 35% 97%)' },
        secondary: { DEFAULT: 'hsl(40 30% 93%)', foreground: 'hsl(30 18% 16%)' },
        destructive: { DEFAULT: 'hsl(10 60% 45%)', foreground: 'hsl(40 35% 97%)' },
        accent: { DEFAULT: 'hsl(30 80% 50%)', foreground: 'hsl(30 20% 12%)' },
        popover: { DEFAULT: 'hsl(40 40% 99%)', foreground: 'hsl(30 20% 12%)' },
        card: { DEFAULT: 'hsl(40 40% 99%)', foreground: 'hsl(30 20% 12%)' },
      },
      fontFamily: {
        // Display: a refined serif. Body: a calm humanist sans.
        // Both loaded via next/font/google in the root layout.
        display: ['var(--font-display)', 'Georgia', 'serif'],
        sans: ['var(--font-sans)', 'system-ui', 'sans-serif'],
        mono: ['var(--font-mono)', 'ui-monospace', 'monospace'],
      },
      borderRadius: {
        lg: '0.625rem',
        md: '0.5rem',
        sm: '0.375rem',
      },
      keyframes: {
        'accordion-down': { from: { height: 0 }, to: { height: 'var(--radix-accordion-content-height)' } },
        'accordion-up': { from: { height: 'var(--radix-accordion-content-height)' }, to: { height: 0 } },
        'fade-in': { from: { opacity: 0, transform: 'translateY(4px)' }, to: { opacity: 1, transform: 'translateY(0)' } },
      },
      animation: {
        'accordion-down': 'accordion-down 0.2s ease-out',
        'accordion-up': 'accordion-up 0.2s ease-out',
        'fade-in': 'fade-in 0.4s ease-out',
      },
    },
  },
  plugins: [require('tailwindcss-animate')],
};
