import 'package:flutter/material.dart';

/// App typography system following Material 3 type scale
/// Uses Roboto as the primary font family
class AppTypography {
  // Prevent instantiation
  AppTypography._();

  /// Font family used throughout the app
  static const String fontFamily = 'Roboto';

  // ==================== Display Styles ====================

  /// Display Large - 32sp, Bold
  /// Used for: Large hero text, splash screens
  static const TextStyle displayLarge = TextStyle(
    fontSize: 32,
    fontWeight: FontWeight.bold,
    fontFamily: fontFamily,
    letterSpacing: 0,
    height: 1.2,
  );

  /// Display Medium - 28sp, Semi-bold
  /// Used for: Page titles, section headers
  static const TextStyle displayMedium = TextStyle(
    fontSize: 28,
    fontWeight: FontWeight.w600,
    fontFamily: fontFamily,
    letterSpacing: 0,
    height: 1.2,
  );

  /// Display Small - 24sp, Semi-bold
  /// Used for: Sub-section headers
  static const TextStyle displaySmall = TextStyle(
    fontSize: 24,
    fontWeight: FontWeight.w600,
    fontFamily: fontFamily,
    letterSpacing: 0,
    height: 1.3,
  );

  // ==================== Headline Styles ====================

  /// Headline Large - 24sp, Semi-bold
  /// Used for: Main headings, dialog titles
  static const TextStyle headlineLarge = TextStyle(
    fontSize: 24,
    fontWeight: FontWeight.w600,
    fontFamily: fontFamily,
    letterSpacing: 0,
    height: 1.3,
  );

  /// Headline Medium - 20sp, Semi-bold
  /// Used for: Card titles, list headers
  static const TextStyle headlineMedium = TextStyle(
    fontSize: 20,
    fontWeight: FontWeight.w600,
    fontFamily: fontFamily,
    letterSpacing: 0.15,
    height: 1.3,
  );

  /// Headline Small - 18sp, Medium
  /// Used for: Small headers, emphasized text
  static const TextStyle headlineSmall = TextStyle(
    fontSize: 18,
    fontWeight: FontWeight.w500,
    fontFamily: fontFamily,
    letterSpacing: 0.15,
    height: 1.4,
  );

  // ==================== Title Styles ====================

  /// Title Large - 20sp, Medium
  /// Used for: App bar titles, prominent labels
  static const TextStyle titleLarge = TextStyle(
    fontSize: 20,
    fontWeight: FontWeight.w500,
    fontFamily: fontFamily,
    letterSpacing: 0.15,
    height: 1.4,
  );

  /// Title Medium - 16sp, Medium
  /// Used for: List item titles, card headers
  static const TextStyle titleMedium = TextStyle(
    fontSize: 16,
    fontWeight: FontWeight.w500,
    fontFamily: fontFamily,
    letterSpacing: 0.15,
    height: 1.5,
  );

  /// Title Small - 14sp, Medium
  /// Used for: Small titles, tab labels
  static const TextStyle titleSmall = TextStyle(
    fontSize: 14,
    fontWeight: FontWeight.w500,
    fontFamily: fontFamily,
    letterSpacing: 0.1,
    height: 1.5,
  );

  // ==================== Body Styles ====================

  /// Body Large - 16sp, Regular
  /// Used for: Main body text, descriptions
  static const TextStyle bodyLarge = TextStyle(
    fontSize: 16,
    fontWeight: FontWeight.normal,
    fontFamily: fontFamily,
    letterSpacing: 0.5,
    height: 1.5,
  );

  /// Body Medium - 14sp, Regular
  /// Used for: Secondary body text, captions
  static const TextStyle bodyMedium = TextStyle(
    fontSize: 14,
    fontWeight: FontWeight.normal,
    fontFamily: fontFamily,
    letterSpacing: 0.25,
    height: 1.5,
  );

  /// Body Small - 12sp, Regular
  /// Used for: Small body text, helper text
  static const TextStyle bodySmall = TextStyle(
    fontSize: 12,
    fontWeight: FontWeight.normal,
    fontFamily: fontFamily,
    letterSpacing: 0.4,
    height: 1.5,
  );

  // ==================== Label Styles ====================

  /// Label Large - 14sp, Medium
  /// Used for: Button text, input labels
  static const TextStyle labelLarge = TextStyle(
    fontSize: 14,
    fontWeight: FontWeight.w500,
    fontFamily: fontFamily,
    letterSpacing: 0.1,
    height: 1.4,
  );

  /// Label Medium - 12sp, Medium
  /// Used for: Small button text, chips
  static const TextStyle labelMedium = TextStyle(
    fontSize: 12,
    fontWeight: FontWeight.w500,
    fontFamily: fontFamily,
    letterSpacing: 0.5,
    height: 1.4,
  );

  /// Label Small - 12sp, Regular
  /// Used for: Overline text, tags, badges
  static const TextStyle labelSmall = TextStyle(
    fontSize: 12,
    fontWeight: FontWeight.normal,
    fontFamily: fontFamily,
    letterSpacing: 0.5,
    height: 1.4,
  );

  // ==================== Special Purpose Styles ====================

  /// Points Display - 28sp, Bold
  /// Used for: Loyalty points display on member cards
  static const TextStyle pointsDisplay = TextStyle(
    fontSize: 28,
    fontWeight: FontWeight.bold,
    fontFamily: fontFamily,
    letterSpacing: 0,
    height: 1.2,
  );

  /// Price Large - 20sp, Bold
  /// Used for: Product prices, totals
  static const TextStyle priceLarge = TextStyle(
    fontSize: 20,
    fontWeight: FontWeight.bold,
    fontFamily: fontFamily,
    letterSpacing: 0,
    height: 1.3,
  );

  /// Price Medium - 16sp, Semi-bold
  /// Used for: List item prices
  static const TextStyle priceMedium = TextStyle(
    fontSize: 16,
    fontWeight: FontWeight.w600,
    fontFamily: fontFamily,
    letterSpacing: 0,
    height: 1.3,
  );

  /// Price Small - 14sp, Semi-bold
  /// Used for: Small price displays
  static const TextStyle priceSmall = TextStyle(
    fontSize: 14,
    fontWeight: FontWeight.w600,
    fontFamily: fontFamily,
    letterSpacing: 0,
    height: 1.3,
  );

  /// Button Text - 14sp, Medium
  /// Used for: All button labels
  static const TextStyle buttonText = TextStyle(
    fontSize: 14,
    fontWeight: FontWeight.w500,
    fontFamily: fontFamily,
    letterSpacing: 1.25,
    height: 1.0,
  );

  /// Overline - 10sp, Medium, Uppercase
  /// Used for: Section labels, categories
  static const TextStyle overline = TextStyle(
    fontSize: 10,
    fontWeight: FontWeight.w500,
    fontFamily: fontFamily,
    letterSpacing: 1.5,
    height: 1.6,
  );

  /// Caption - 12sp, Regular
  /// Used for: Image captions, timestamps
  static const TextStyle caption = TextStyle(
    fontSize: 12,
    fontWeight: FontWeight.normal,
    fontFamily: fontFamily,
    letterSpacing: 0.4,
    height: 1.33,
  );
}
