/* Hiw v0.1.0 - A sustainable, minimalist CSS framework */

/* Reset with minimal footprint */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base HTML elements */
html {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  color: #333;
  background: #fff;
}

body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 1.5rem 0 1rem;
  line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p, ul, ol { margin-bottom: 1rem; }
li { margin-left: 1.5rem; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { width: 100%; padding: 0 1rem; }
.row { display: flex; flex-wrap: wrap; margin: 0 -0.5rem; }
.col { flex: 1; padding: 0 0.5rem; }

/* Grid system - simplified */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Spacing */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 1rem; }
.m-4 { margin: 1.5rem; }
.m-5 { margin: 3rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Directional spacing - minimal set */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }

/* Colors - minimal palette */
.text-primary { color: #0066cc; }
.text-success { color: #2e7d32; }
.text-warning { color: #ff9800; }
.text-error { color: #d32f2f; }
.text-light { color: #f5f5f5; }
.text-dark { color: #333; }
.text-muted { color: #757575; }

.bg-primary { background-color: #0066cc; }
.bg-success { background-color: #2e7d32; }
.bg-warning { background-color: #ff9800; }
.bg-error { background-color: #d32f2f; }
.bg-light { background-color: #f5f5f5; }
.bg-dark { background-color: #333; }
.bg-white { background-color: #fff; }

/* Components */
/* Card */
.card {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Button */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: #0066cc;
  color: white;
  border-color: #0066cc;
}

/* Form elements */
input, select, textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 1rem;
}

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

/* Flexbox utilities - minimal set */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-bold { font-weight: bold; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }

/* Borders and shadows - minimal set */
.border { border: 1px solid #ddd; }
.rounded { border-radius: 4px; }
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.12); }

/* Simple responsive breakpoint */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .row {
    flex-direction: column;
  }
}
