/* ============================================================
   History Finder — Earth-Tone Design System
   Palette: walnut, clay, sage, parchment, slate
   Font: Georgia, serif — rugged, historical feel
   ============================================================ */

:root {
  /* Primary palette */
  --walnut: #2B2622;
  --clay: #A45D33;
  --clay-light: #C07040;
  --clay-glow: rgba(164, 93, 51, 0.15);
  --sage: #707A5E;
  --sage-light: #8A9474;
  --parchment: #E6D5B8;
  --parchment-muted: #C4B08A;
  --slate: #3C3630;

  /* Semantic tokens */
  --bg: #1E1B18;
  --surface: #262220;
  --card: #2E2A26;
  --border: #443D36;
  --border-accent: var(--clay);
  --text: var(--parchment);
  --text-muted: #9E937F;
  --accent: var(--clay);
  --accent-light: var(--clay-light);
  --accent-glow: var(--clay-glow);

  /* Status colors */
  --green: #6B8F5E;
  --green-dim: rgba(107, 143, 94, 0.15);
  --red: #B85450;
  --red-dim: rgba(184, 84, 80, 0.15);
  --amber: #C4A040;
  --amber-dim: rgba(196, 160, 64, 0.15);
}

/* Base typography */
body {
  font-family: Georgia, 'Times New Roman', serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
}

/* Common elements */
a { color: var(--clay-light); text-decoration: none; }
a:hover { color: var(--parchment); }

select, input[type="text"], input[type="email"], input[type="search"] {
  background: rgba(30, 27, 24, 0.8);
  color: var(--text);
  border: 1px solid var(--clay);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: Georgia, serif;
  outline: none;
  transition: border-color 0.2s;
}
select:focus, input:focus {
  border-color: var(--clay-light);
  box-shadow: 0 0 0 2px var(--clay-glow);
}

/* Buttons */
.btn-clay {
  padding: 10px 24px;
  background: var(--clay);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: Georgia, serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn-clay:hover { background: var(--clay-light); }
.btn-clay:active { transform: scale(0.98); }

/* Header */
.hf-header {
  padding: 12px 20px;
  background: var(--slate);
  border-bottom: 2px solid var(--clay);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  z-index: 1000;
}

.hf-logo {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--parchment);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.hf-logo span { color: var(--clay); }

/* Bottom nav */
.hf-bottom-nav {
  background: var(--slate);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.hf-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.15s;
  font-family: Georgia, serif;
}
.hf-nav-item.active { color: var(--clay); }
.hf-nav-item:hover { color: var(--clay-light); }
.hf-nav-item .icon { font-size: 1.2rem; }

/* Proximity alert badge */
.hf-alert-badge {
  background: var(--clay);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: Georgia, serif;
}

/* Cards */
.hf-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.2s;
}
.hf-card:hover { border-color: var(--clay); }

/* Leaflet overrides */
.leaflet-control-layers {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  font-family: Georgia, serif !important;
}
.leaflet-control-layers label { color: var(--text) !important; }
.leaflet-popup-content-wrapper {
  background: var(--card) !important;
  color: var(--text) !important;
  border-radius: 10px !important;
  font-family: Georgia, serif !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}
.leaflet-popup-tip { background: var(--card) !important; }
.leaflet-popup-content { font-family: Georgia, serif !important; }
