/* Global Design System */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Montserrat:wght@600;700;800&display=swap');

:root {
  /* ========== Color Palette ========== */

  /* Primary Colors */
  --primary-vibrant: #FF6B35;
  --primary-vibrant-light: #FF8F5F;
  --primary-vibrant-dark: #E6551B;
  --primary-deep: #1E3A5F;
  --primary-deep-light: #2A4D7A;
  --primary-deep-dark: #152940;

  /* Accent Colors */
  --accent-mountain: #4A90A4;
  --accent-mountain-light: #68A5B8;
  --accent-earth: #8B7355;
  --accent-chalk: #F4F4F2;

  /* Neutral Colors */
  --neutral-dark: #2C2C2C;
  --neutral-mid: #6B6B6B;
  --neutral-light: #F8F9FA;
  --neutral-white: #FFFFFF;

  /* Semantic Colors */
  --color-success: #10B981;
  --color-error: #EF4444;
  --color-warning: #F59E0B;
  --color-info: #3B82F6;

  /* Gradients */
  --gradient-hero: linear-gradient(135deg, #1E3A5F 0%, #4A90A4 100%);
  --gradient-accent: linear-gradient(135deg, #FF6B35 0%, #FF8F5F 100%);
  --gradient-overlay: linear-gradient(180deg, rgba(30, 58, 95, 0.7) 0%, rgba(74, 144, 164, 0.5) 100%);

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

  /* Font Families */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Sizes - Perfect Fourth Scale (1.333) */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.333rem;     /* 21px */
  --text-2xl: 1.777rem;    /* 28px */
  --text-3xl: 2.369rem;    /* 38px */
  --text-4xl: 3.157rem;    /* 50px */
  --text-5xl: 4.209rem;    /* 67px */

  /* Fluid Typography (responsive) */
  --fluid-text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --fluid-text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --fluid-text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.333rem);
  --fluid-text-xl: clamp(1.333rem, 1.2rem + 0.7vw, 1.777rem);
  --fluid-text-2xl: clamp(1.777rem, 1.5rem + 1.3vw, 2.369rem);
  --fluid-text-3xl: clamp(2.369rem, 2rem + 1.8vw, 3.157rem);
  --fluid-text-4xl: clamp(3.157rem, 2.5rem + 3vw, 4.209rem);

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

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.1;
  --leading-snug: 1.25;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
  --leading-loose: 2;

  /* ========== Spacing Scale ========== */

  --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 */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */

  /* ========== Layout ========== */

  --container-max: 1280px;
  --container-padding: var(--space-4);
  --section-padding-y: var(--space-16);
  --section-padding-y-sm: var(--space-12);

  /* ========== Borders ========== */

  --border-radius-sm: 0.375rem;    /* 6px */
  --border-radius: 0.5rem;         /* 8px */
  --border-radius-md: 0.75rem;     /* 12px */
  --border-radius-lg: 1rem;        /* 16px */
  --border-radius-xl: 1.5rem;      /* 24px */
  --border-radius-full: 9999px;

  --border-width: 1px;
  --border-width-2: 2px;
  --border-width-4: 4px;

  /* ========== Shadows ========== */

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* ========== Transitions ========== */

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ========== Z-Index Scale ========== */

  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ========== Base Styles ========== */

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--neutral-dark);
  background-color: var(--neutral-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Typography Styles ========== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--primary-deep);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--fluid-text-4xl);
  font-weight: var(--font-extrabold);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fluid-text-3xl);
  font-weight: var(--font-bold);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--fluid-text-2xl);
  font-weight: var(--font-bold);
}

h4 {
  font-size: var(--fluid-text-xl);
  font-weight: var(--font-semibold);
}

h5 {
  font-size: var(--fluid-text-lg);
  font-weight: var(--font-semibold);
}

h6 {
  font-size: var(--fluid-text-base);
  font-weight: var(--font-semibold);
}

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--primary-vibrant);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-vibrant-dark);
}

a:focus-visible {
  outline: 2px solid var(--primary-vibrant);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

strong, b {
  font-weight: var(--font-semibold);
}

small {
  font-size: var(--text-sm);
}

/* ========== Container ========== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

@media (min-width: 640px) {
  .container {
    --container-padding: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .container {
    --container-padding: var(--space-8);
  }
}

/* ========== Section Spacing ========== */

.section {
  padding-top: var(--section-padding-y-sm);
  padding-bottom: var(--section-padding-y-sm);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
  }
}

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

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text Colors */
.text-primary { color: var(--primary-deep); }
.text-accent { color: var(--primary-vibrant); }
.text-muted { color: var(--neutral-mid); }
.text-white { color: var(--neutral-white); }

/* Background Colors */
.bg-primary { background-color: var(--primary-deep); }
.bg-accent { background-color: var(--primary-vibrant); }
.bg-light { background-color: var(--neutral-light); }
.bg-white { background-color: var(--neutral-white); }

/* Display Utilities */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* Flexbox Utilities */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* Spacing Utilities */
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }

/* Visibility Utilities */
@media (max-width: 1023px) {
  .hidden-mobile { display: none !important; }
}

@media (min-width: 1024px) {
  .hidden-desktop { display: none !important; }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-deep);
  color: var(--neutral-white);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  z-index: 100;
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: 0;
}
