/*==============================================
   MMRisk Design System - Apple/Tesla-inspired
   Created as part of the modern website rebuild
   Using a single typography system based on Montserrat
===============================================*/

/*==============================================
   Design System Variables
===============================================*/
:root {
  /* Color System */
  --color-primary: #fdc716;
  /* Primary gold color */
  --color-primary-rgb: 253, 199, 22;
  /* RGB values for primary color */
  --color-primary-dark: #e6b000;
  /* Darker gold variation */
  --color-secondary: #fdc716;
  /* Yellow accent color */
  --color-secondary-dark: #e6b000;
  /* Darker yellow */

  /* Text Colors - Decoupled from backgrounds */
  --color-text-white: #ffffff;
  /* White text for dark backgrounds */
  --color-text-dark: #292929;
  /* For headings and important text */
  --color-text: #555555;
  /* Main body text color - darker than original for better contrast */
  --color-text-light: #888888;
  /* For secondary text */
  --color-border: #e4e4e4;
  /* For borders */

  /* Background Colors - Independent from text */
  --color-bg-white: #ffffff;
  /* Pure white background */
  --color-bg-light: #ffffff;
  /* Light background */
  --color-bg-off-white: #f8f8f8;
  /* Slightly darker background */
  --color-bg-accent: #f5f9fc;
  /* Accent background with slight blue tint */
  --color-bg-dark: #1a1a1a;
  /* Dark background for sections */
  --color-bg-dark-alt: #242424;
  /* Alternative dark background */

  /* Spacing System - based on 4px grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Typography Scale - also divisible by 4 */
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  /* New base font size */
  --font-size-md: 18px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --font-size-2xl: 28px;
  --font-size-3xl: 32px;
  --font-size-4xl: 36px;

  /* Line Heights - also divisible by 4 */
  --line-height-tight: 1.2;
  /* 20px for 16px font */
  --line-height-base: 1.5;
  /* 24px for 16px font */
  --line-height-relaxed: 1.75;
  /* 28px for 16px font */

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Border Radius - also divisible by 4 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Container Width */
  --container-max-width: 1200px;

  /* Z-index layers */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;
}

/*==============================================
   Base CSS
===============================================*/
html,
body {
  height: 100%;
}

body {
  font-family: 'Montserrat', sans-serif;
  /* Changed from Poppins to Montserrat */
  font-size: var(--font-size-base);
  color: var(--color-text);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-normal);
  background-color: var(--color-bg-light);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Montserrat', sans-serif;
  margin: 0 0 var(--space-4) 0;
  color: var(--color-text-dark);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-semibold);
}

h1 {
  font-size: var(--font-size-4xl);
  /* 36px */
  margin-bottom: var(--space-8);
}

h2 {
  font-size: var(--font-size-3xl);
  /* 32px */
  margin-bottom: var(--space-6);
}

h3 {
  font-size: var(--font-size-xl);
  /* 24px */
  margin-bottom: var(--space-5);
}

h4 {
  font-size: var(--font-size-lg);
  /* 20px */
  margin-bottom: var(--space-4);
}

h5 {
  font-size: var(--font-size-md);
  /* 18px */
  margin-bottom: var(--space-3);
}

/* Additional base element styles */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

p {
  margin: 0 0 var(--space-4) 0;
}

ul,
ol {
  margin: 0 0 var(--space-4) 0;
  padding-left: var(--space-5);
}

img {
  max-width: 100%;
  height: auto;
}

/* Utility classes */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.text-primary {
  color: var(--color-primary);
}

.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-1 {
  margin-bottom: var(--space-1);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-3 {
  margin-bottom: var(--space-3);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-5 {
  margin-bottom: var(--space-5);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mb-10 {
  margin-bottom: var(--space-10);
}

/* Responsive breakpoints */
@media (max-width: 992px) {
  h1 {
    font-size: var(--font-size-3xl);
  }

  h2 {
    font-size: var(--font-size-2xl);
  }

  h3 {
    font-size: var(--font-size-lg);
  }

  .container {
    padding: 0 var(--space-5);
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: var(--font-size-2xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }
}

@media (max-width: 576px) {
  body {
    font-size: var(--font-size-sm);
  }

  h1 {
    font-size: var(--font-size-xl);
  }

  h2 {
    font-size: var(--font-size-lg);
  }
}