/* === TOM MÚA DESIGN SYSTEM === */
/* Single source of truth for all CSS variables, reset, and base styles */
/* Import this file in ALL HTML pages: <link rel="stylesheet" href="css/design-system.css"> */

:root {
  /* Colors - Semantic */
  --bg: #f6f5f0;
  --surface: #ffffff;
  --fg: #1a2e1a;
  --muted: #6b7b6b;
  --border: #e0ded8;
  
  /* Accent */
  --accent: #2d6a4f;
  --accent-light: #40916c;
  --accent-dark: #1b4332;
  
  /* Functional */
  --warm: #d97706;
  --warm-light: #f59e0b;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --success: #15803d;
  --success-light: #dcfce7;
  
  /* Type colors */
  --waterfall: #0e7490;
  --waterfall-dark: #155e75;
  --cave: #78716c;
  --cave-dark: #44403c;
  --historical: #57534e;
  --spirit: #9f1239;
  --spirit-dark: #881337;
  
  /* Spacing */
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-pill: 100px;
  
  /* Shadows */
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 16px 40px rgba(0,0,0,0.06);
  --shadow-xl: 0 8px 24px rgba(0,0,0,0.1), 0 24px 60px rgba(0,0,0,0.08);
  
  /* Typography */
  --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  
  /* Layout */
  --container-max: 1200px;
  --sidebar-width: 260px;
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

/* === TYPOGRAPHY SCALE === */
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 18px; }
.text-2xl { font-size: 20px; }
.text-3xl { font-size: 24px; }

/* === SPACING SCALE === */
.space-1 { gap: 4px; }
.space-2 { gap: 8px; }
.space-3 { gap: 12px; }
.space-4 { gap: 16px; }
.space-5 { gap: 20px; }
.space-6 { gap: 24px; }

/* === BORDER RADIUS === */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-pill { border-radius: var(--radius-pill); }
.rounded-full { border-radius: 50%; }

/* === COMMON COMPONENTS === */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(45,106,79,0.04);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 15px;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}

.badge-gray {
  background: var(--bg);
  color: var(--muted);
}

.badge-green {
  background: var(--success-light);
  color: var(--success);
}

.badge-amber {
  background: rgba(217,119,6,0.1);
  color: var(--warm);
}

.badge-red {
  background: var(--danger-light);
  color: var(--danger);
}

/* Filter Chips */
.filter-chip {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.2, 0, 0, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font);
}

.filter-chip:hover {
  border-color: var(--accent);
  background: rgba(45,106,79,0.04);
}

.filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.filter-chip.active:hover {
  background: var(--accent-dark);
}

/* Form Inputs */
.input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  background: var(--surface);
  transition: border-color 0.2s;
  outline: none;
}

.input:focus {
  border-color: var(--accent);
}

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

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}
