/**
 * Design Tokens - Haverford IFL
 * Centralized design system variables
 * Import this file first in all pages
 */

:root {
  /* ========== Brand Colors ========== */
  --color-maroon: #670000;
  --color-maroon-hover: #8B0000;
  --color-maroon-light: #A52A2A;

  /* Extended Maroon Palette */
  --color-maroon-50: #fdf5f5;
  --color-maroon-100: #f5e6e6;
  --color-maroon-200: #e6c9c9;
  --color-maroon-300: #cc9999;
  --color-maroon-400: #a64d4d;
  --color-maroon-500: #870000;
  --color-maroon-600: #670000;
  --color-maroon-700: #520000;
  --color-maroon-800: #3d0000;
  --color-maroon-900: #290000;

  /* ========== Accent Colors ========== */
  --color-gold: #D4AF37;
  --color-gold-light: #F4D03F;
  --color-gold-dark: #B8860B;
  --color-slate-blue: #4A5568;
  --color-navy-accent: #1A365D;

  /* ========== Neutral Colors ========== */
  --color-white: #ffffff;
  --color-black: #000000;

  /* Gray Scale */
  --color-gray-50: #f9f9f9;
  --color-gray-100: #f3f3f3;
  --color-gray-200: #e9ecef;
  --color-gray-300: #E1E8ED;
  --color-gray-400: #ddd;
  --color-gray-500: #bdbdbd;
  --color-gray-600: #7F8C8D;
  --color-gray-700: #414141;
  --color-gray-800: #313131;
  --color-gray-900: #212121;

  /* ========== Semantic Colors ========== */
  /* Success */
  --color-success: #28a745;
  --color-success-light: #4CAF50;
  --color-success-dark: #155724;
  --color-success-bg: #d4edda;

  /* Warning */
  --color-warning: #ffc107;
  --color-warning-dark: #856404;
  --color-warning-bg: #fff3cd;

  /* Error/Danger */
  --color-error: #dc3545;
  --color-error-light: #F44336;
  --color-error-dark: #721c24;
  --color-error-bg: #f8d7da;

  /* Info */
  --color-info: #17a2b8;
  --color-info-light: #3498DB;
  --color-info-dark: #0c5460;
  --color-info-bg: #d1ecf1;

  /* ========== Typography ========== */
  /* Font Families */
  --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Allerta Stencil", sans-serif;
  --font-roboto: 'Roboto', sans-serif;

  /* Font Sizes - Modular Scale (1.25 ratio) */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 2rem;        /* 32px */
  --text-4xl: 2.5rem;      /* 40px */

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* Line Heights */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;
  --leading-loose: 2;

  /* ========== Spacing Scale ========== */
  --space-0: 0;
  --space-1: 0.25rem;      /* 4px */
  --space-2: 0.5rem;       /* 8px */
  --space-3: 0.75rem;      /* 12px */
  --space-4: 1rem;         /* 16px */
  --space-5: 1.25rem;      /* 20px */
  --space-6: 1.5rem;       /* 24px */
  --space-8: 2rem;         /* 32px */
  --space-10: 2.5rem;      /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-16: 4rem;        /* 64px */

  /* ========== Border Radius ========== */
  --radius-none: 0;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-full: 9999px;
  --radius-circle: 50%;

  /* ========== Shadows ========== */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.2);
  --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.3);

  /* Brand-specific shadows */
  --shadow-maroon-sm: 0 2px 8px rgba(103, 0, 0, 0.1);
  --shadow-maroon-md: 0 4px 16px rgba(103, 0, 0, 0.15);
  --shadow-maroon-lg: 0 8px 24px rgba(103, 0, 0, 0.3);
  --shadow-maroon-xl: 0 12px 32px rgba(103, 0, 0, 0.4);

  /* Modern Card Shadows */
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.08), 0 12px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow-maroon: 0 0 20px rgba(103, 0, 0, 0.25);
  --shadow-glow-gold: 0 0 20px rgba(212, 175, 55, 0.3);

  /* ========== Glass Morphism ========== */
  --glass-white: rgba(255, 255, 255, 0.85);
  --glass-white-light: rgba(255, 255, 255, 0.6);
  --glass-dark: rgba(0, 0, 0, 0.75);
  --glass-dark-light: rgba(0, 0, 0, 0.5);
  --glass-maroon: rgba(103, 0, 0, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);

  /* Backdrop Blur Levels */
  --blur-sm: blur(4px);
  --blur-md: blur(8px);
  --blur-lg: blur(16px);
  --blur-xl: blur(24px);

  /* ========== Gradients ========== */
  --gradient-maroon: linear-gradient(135deg, #670000 0%, #a70000 100%);
  --gradient-maroon-dark: linear-gradient(135deg, #3d0000 0%, #670000 100%);
  --gradient-maroon-vertical: linear-gradient(180deg, #670000 0%, #3d0000 100%);
  --gradient-gold: linear-gradient(135deg, #D4AF37 0%, #F4D03F 100%);
  --gradient-subtle: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  --gradient-hero: linear-gradient(135deg, rgba(103, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
  --gradient-card: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  --gradient-overlay: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);

  /* ========== Transitions ========== */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Animation Easing Functions */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* ========== Z-Index Scale ========== */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 500;
  --z-modal-backdrop: 1000;
  --z-modal: 1100;
  --z-popover: 1200;
  --z-tooltip: 1300;

  /* ========== Breakpoints (for reference in media queries) ========== */
  /* These are defined as comments since CSS variables can't be used in @media queries */
  /* --breakpoint-sm: 640px;  */
  /* --breakpoint-md: 768px;  */
  /* --breakpoint-lg: 1024px; */
  /* --breakpoint-xl: 1280px; */
}

/* ========== Utility Classes ========== */

/* Focus Visible - Accessibility */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--color-maroon);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Box Sizing Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ========== Typography Utilities ========== */

/* Display Headings */
.heading-display {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  letter-spacing: -0.025em;
  line-height: var(--leading-tight);
}

/* Gradient Text */
.heading-gradient {
  background: var(--gradient-maroon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Underlined Heading with Accent */
.heading-underlined {
  position: relative;
  padding-bottom: var(--space-3);
}

.heading-underlined::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--gradient-maroon);
  border-radius: var(--radius-full);
}

.heading-underlined.centered::after {
  left: 50%;
  transform: translateX(-50%);
}

/* Text Truncation */
.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Clamp to lines */
.text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
