/* MH SERVICES - DESIGN SYSTEM v2.0 
   Philosophy: Silent Luxury | Premium Simplicity | Atmospheric Consistency
   Base Unit: 8px | Mobile First | Core Web Vitals < 2.5s
*/

/* ===== DESIGN TOKENS ===== */
:root {
  /* Colors - Semantic naming */
  --mh-primary: #003B5A;
  --mh-accent: #EB6E0B;
  --mh-neutral-100: #ffffff;
  --mh-neutral-200: #f8f9fa;
  --mh-neutral-300: #e9ecef;
  --mh-neutral-700: #495057;
  --mh-neutral-900: #212529;
  
  /* Typography Scale - Perfect Fourth (1.333) */
  --font-size-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8rem);
  --font-size-sm: clamp(0.875rem, 0.8rem + 0.375vw, 0.95rem);
  --font-size-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --font-size-lg: clamp(1.125rem, 1rem + 0.625vw, 1.375rem);
  --font-size-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.75rem);
  --font-size-2xl: clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
  --font-size-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.875rem);
  --font-size-4xl: clamp(2.25rem, 1.9rem + 1.75vw, 3.5rem);
  
  /* Spacing Scale - 8px base */
  --space-1: 0.125rem; /* 2px */
  --space-2: 0.25rem;  /* 4px */
  --space-3: 0.5rem;   /* 8px */
  --space-4: 0.75rem;  /* 12px */
  --space-5: 1rem;     /* 16px */
  --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 */
  
  /* Transitions - Subtle & Purposeful */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadows - Layered depth */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Fira Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--mh-neutral-700);
  background-color: var(--mh-neutral-100);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY SYSTEM ===== */
.h1, h1 { font-size: var(--font-size-4xl); font-weight: 800; line-height: 1.1; color: var(--mh-primary); }
.h2, h2 { font-size: var(--font-size-3xl); font-weight: 700; line-height: 1.2; color: var(--mh-primary); }
.h3, h3 { font-size: var(--font-size-2xl); font-weight: 600; line-height: 1.3; color: var(--mh-primary); }
.h4, h4 { font-size: var(--font-size-xl); font-weight: 600; line-height: 1.4; color: var(--mh-primary); }
.h5, h5 { font-size: var(--font-size-lg); font-weight: 500; line-height: 1.5; color: var(--mh-primary); }

.text-lead { font-size: var(--font-size-lg); color: var(--mh-neutral-700); }
.text-small { font-size: var(--font-size-sm); }
.text-xs { font-size: var(--font-size-xs); }

/* ===== LAYOUT SYSTEM ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-16) 0;
}

@media (min-width: 768px) {
  .section { padding: var(--space-24) 0; }
  .container { padding: 0 var(--space-8); }
}

/* ===== COMPONENT SYSTEM ===== */

/* Navigation */
.nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mh-neutral-300);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) var(--space-6);
}

.nav__logo {
  height: 3rem;
}

.nav__link {
  color: var(--mh-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav__link:hover,
.nav__link--active {
  color: var(--mh-accent);
}

/* Buttons - Minimal but purposeful */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--font-size-sm);
  line-height: 1;
  padding: var(--space-4) var(--space-6);
  border-radius: 0.375rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
  min-height: 44px; /* Touch target */
}

.btn--primary {
  background-color: var(--mh-accent);
  color: var(--mh-neutral-100);
}

.btn--primary:hover {
  background-color: #d4610a;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background-color: transparent;
  color: var(--mh-primary);
  border: 2px solid var(--mh-primary);
}

.btn--secondary:hover {
  background-color: var(--mh-primary);
  color: var(--mh-neutral-100);
}

/* Forms - Clean & functional */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-weight: 500;
  color: var(--mh-primary);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-4);
  border: 2px solid var(--mh-neutral-300);
  border-radius: 0.375rem;
  font-size: var(--font-size-base);
  transition: border-color var(--transition-fast);
  min-height: 44px; /* Touch target */
}

.form-input:focus {
  outline: none;
  border-color: var(--mh-accent);
  box-shadow: 0 0 0 3px rgba(235, 110, 11, 0.1);
}

.form-input::placeholder {
  color: var(--mh-neutral-700);
  opacity: 0.6;
}

/* Cards - Subtle elevation */
.card {
  background: var(--mh-neutral-100);
  border-radius: 0.5rem;
  border: 1px solid var(--mh-neutral-300);
  padding: var(--space-6);
  transition: box-shadow var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

@media (min-width: 768px) {
  .grid { gap: var(--space-8); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-primary { color: var(--mh-primary); }
.text-accent { color: var(--mh-accent); }

.mb-1 { margin-bottom: var(--space-3); }
.mb-2 { margin-bottom: var(--space-5); }
.mb-3 { margin-bottom: var(--space-6); }
.mb-4 { margin-bottom: var(--space-8); }
.mb-5 { margin-bottom: var(--space-12); }

.mt-1 { margin-top: var(--space-3); }
.mt-2 { margin-top: var(--space-5); }
.mt-3 { margin-top: var(--space-6); }
.mt-4 { margin-top: var(--space-8); }
.mt-5 { margin-top: var(--space-12); }

.hidden { display: none; }

@media (min-width: 768px) {
  .md\\:block { display: block; }
  .md\\:hidden { display: none; }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.lazy-load {
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.lazy-load.loaded {
  opacity: 1;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html { scroll-behavior: auto; }
}