/* Global Layout and Grid System */

/* Base Styles */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--ceramic-white);
}

/* Container System */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--default {
  max-width: var(--container-max);
}

.container--wide {
  max-width: var(--container-wide);
}

.container--content {
  max-width: var(--container-content);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  align-items: center;
  justify-content: space-between;
}

.flex--column {
  flex-direction: column;
}

.flex--wrap {
  flex-wrap: wrap;
}

/* Section Spacing */
section {
  padding: var(--space-3xl) 0;
}

.section--hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: var(--space-4xl) 0;
}

.section--compact {
  padding: var(--space-xl) 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

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

/* Responsive Utilities */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  section {
    padding: var(--space-2xl) 0;
  }
  
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  
  .mobile-hide { display: none; }
}

@media (min-width: 769px) {
  .mobile-only { display: none; }
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Background Utilities */
.bg-dark {
  background-color: var(--steel-dark);
  color: var(--ceramic-white);
}

.bg-light {
  background-color: var(--ceramic-white);
  color: var(--text-dark);
}

.bg-gradient {
  background: linear-gradient(135deg, var(--steel-dark) 0%, var(--steel-mid) 100%);
  color: var(--ceramic-white);
}