import 'package:flutter/material.dart';

/// All color tokens from PRD §3.1 — light and dark values as static constants.
class AppColors {
  AppColors._();

  // ── Brand tokens: logo palette (teal + gold) ──
  static const Color brandTeal500 = Color(0xFF118A8D);
  static const Color brandTeal700 = Color(0xFF0C676A);
  static const Color brandTeal900 = Color(0xFF0A4447);

  static const Color brandGold200 = Color(0xFFF6DE96);
  static const Color brandGold300 = Color(0xFFE9C75B);
  static const Color brandGold400 = Color(0xFFD6A21D);
  static const Color brandGold700 = Color(0xFF8B6415);

  // ── Theme base tokens ──
  static const Color backgroundLight = Color(0xFFF3F4F6);
  static const Color backgroundDark = Color(0xFF0F1217);

  static const Color surfaceLight = Color(0xFFFFFFFF);
  static const Color surfaceLightElevated = Color(0xFFF9FAFB);

  static const Color surfaceDark = Color(0xFF171B22);
  static const Color surfaceDarkElevated = Color(0xFF1D222B);

  static const Color textPrimaryLight = Color(0xFF1F2937);
  static const Color textPrimaryDark = Color(0xFFE8ECF2);
  static const Color textSecondaryLight = Color(0xFF6B7280);
  static const Color textSecondaryDark = Color(0xFF9AA4B2);

  // ── Compatibility aliases (existing UI references) ──
  static const Color primary = brandTeal500;
  static const Color onPrimary = Color(0xFFFFFFFF);
  static const Color sage = brandTeal700;
  static const Color cream = Color(0xFFE5E7EB);

  // ── Luxury active-state tokens ──
  static const Color navActiveGold = brandGold400;
  static const Color navActiveGoldBright = brandGold300;
  static const Color navActiveGoldPale = brandGold200;
  static const Color navActiveGoldDeep = brandGold700;

  static const Color navActiveSurfaceDark = surfaceDarkElevated;
  static const Color navActiveSurfaceLight = surfaceLight;

  static const Color navGlowDark = Color(0x5CD6A21D);
  static const Color navGlowLight = Color(0x36D6A21D);
  static const Color navShadowLight = Color(0x1F0F172A);
  static const Color navStrokeNeutralDark = Color(0x33FFFFFF);
  static const Color navStrokeNeutralLight = Color(0x220F172A);

  static const Color navEmbossHighlight = Color(0xE6FFFFFF);
  static const Color navEmbossShadow = Color(0x2B0F172A);
  static const Color navEmbossGoldShadow = Color(0x42B88912);

  // ── Semantic ──
  static const Color errorLight = Color(0xFFEF4444);
  static const Color errorDark = Color(0xFFF87171);
  static const Color successLight = Color(0xFF22C55E);
  static const Color successDark = Color(0xFF4ADE80);

  // ── Convenience helpers for theme building ──

  static ColorScheme get lightColorScheme => const ColorScheme.light(
        primary: primary,
        onPrimary: onPrimary,
        primaryContainer: brandTeal700,
        onPrimaryContainer: Colors.white,
        surface: surfaceLight,
        onSurface: textPrimaryLight,
        error: errorLight,
        onError: Colors.white,
        secondary: navActiveGold,
        onSecondary: brandGold700,
      );

  static ColorScheme get darkColorScheme => const ColorScheme.dark(
        primary: primary,
        onPrimary: onPrimary,
        primaryContainer: brandTeal900,
        onPrimaryContainer: textPrimaryDark,
        surface: surfaceDark,
        onSurface: textPrimaryDark,
        error: errorDark,
        onError: Colors.black,
        secondary: navActiveGold,
        onSecondary: brandGold200,
      );
}
