/* ============================================
   ZimRoots — Warm Zimbabwean Earth Theme
   ============================================ */

:root {
  --bg: #FBF6EF;
  --bg-warm: #F5EDE0;
  --bg-card: #FFFFFF;
  --bg-input: #F5EDE0;
  --border: #DDD0BF;
  --border-hover: #C8A882;
  --text: #2C1810;
  --text-muted: #7A6555;
  --primary: #C75B39;
  --primary-dark: #A84830;
  --primary-light: rgba(199, 91, 57, 0.1);
  --accent: #D4A03C;
  --accent-light: rgba(212, 160, 60, 0.1);
  --earth-deep: #5C3D2E;
  --earth-olive: #6B7A4F;
  --earth-olive-light: rgba(107, 122, 79, 0.1);
  --earth-clay: #B8845E;
  --gradient: linear-gradient(135deg, #C75B39, #D4A03C, #6B7A4F);
  --gradient-warm: linear-gradient(135deg, #F5EDE0, #FBF6EF);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 2px 16px rgba(44, 24, 16, 0.08);
  --shadow-hover: 0 8px 32px rgba(44, 24, 16, 0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(251, 246, 239, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.brand-name {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--earth-deep);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--primary); }

/* ============================================
   Hero
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-warm) 100%);
  position: relative;
  overflow: hidden;
}

/* Subtle pattern overlay */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 20% 50%, rgba(199, 91, 57, 0.04) 0%, transparent 50%),
                    radial-gradient(circle at 80% 30%, rgba(212, 160, 60, 0.04) 0%, transparent 50%),
                    radial-gradient(circle at 50% 80%, rgba(107, 122, 79, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 24px 40px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid rgba(199, 91, 57, 0.2);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2.5rem, 6vw, 4.2rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--earth-deep);
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  padding: 32px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.stat { text-align: center; }

.stat-num {
  display: block;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(199, 91, 57, 0.25);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--earth-deep);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================
   Sections
   ============================================ */

.section {
  padding: 80px 0;
}

.section-warm {
  background: var(--bg-warm);
}

.section-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.2rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  color: var(--earth-deep);
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1.05rem;
}

/* ============================================
   Search Bar
   ============================================ */

.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.search-bar input {
  flex: 1;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus { border-color: var(--primary); }

.search-bar select {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

/* ============================================
   Tabs
   ============================================ */

.tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: inherit;
}

.tab:hover { border-color: var(--primary); color: var(--primary); }

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 600;
}

/* ============================================
   Grid & Cards
   ============================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.card-type {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.card-type.business { background: rgba(199, 91, 57, 0.1); color: var(--primary); }
.card-type.manufacturer { background: rgba(107, 122, 79, 0.1); color: var(--earth-olive); }
.card-type.product { background: rgba(212, 160, 60, 0.1); color: #B8860B; }
.card-type.event { background: rgba(184, 132, 94, 0.1); color: var(--earth-clay); }
.card-type.customer { background: rgba(92, 61, 46, 0.1); color: var(--earth-deep); }

.card-img {
  margin: -24px -24px 16px -24px;
  height: 160px;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card.has-img .card-body {
  padding: 0;
}

.card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  color: var(--earth-deep);
}

.card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.5;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-meta .label { color: var(--text); font-weight: 500; }

.card-meta .icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.loading {
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-state {
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* ============================================
   Chat
   ============================================ */

.chat-container {
  max-width: 700px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.chat-messages {
  height: 400px;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg);
}

.message {
  display: flex;
  gap: 12px;
  max-width: 85%;
}

.message.user {
  flex-direction: row-reverse;
  margin-left: auto;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.message.bot .message-avatar {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(199, 91, 57, 0.25);
}

.message.user .message-avatar {
  background: var(--earth-olive-light);
  color: var(--earth-olive);
  border: 1px solid rgba(107, 122, 79, 0.25);
}

.message-bubble {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.message.bot .message-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.message.user .message-bubble {
  background: var(--earth-olive-light);
  border: 1px solid rgba(107, 122, 79, 0.2);
  color: var(--earth-deep);
}

.chat-input-area {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.chat-input-area input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.chat-input-area input:focus { border-color: var(--primary); }

.message.bot .message-bubble .typing {
  display: inline-block;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================
   Features / About
   ============================================ */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: all 0.2s;
  box-shadow: var(--shadow);
}

.feature:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--primary);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.75;
}

.feature-icon.chat { background: var(--primary-light); color: var(--primary); }
.feature-icon.search { background: var(--accent-light); color: #B8860B; }
.feature-icon.list { background: var(--earth-olive-light); color: var(--earth-olive); }
.feature-icon.connect { background: rgba(184, 132, 94, 0.1); color: var(--earth-clay); }

.feature h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--earth-deep);
}

.feature p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.tech-stack {
  text-align: center;
}

.tech-stack h3 {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.tech-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

/* ============================================
   Footer
   ============================================ */

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-warm);
}

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

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.footer-links p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .nav { padding: 16px 20px; }
  .nav-links { gap: 16px; }
  .hero-content { padding: 40px 20px 20px; }
  .hero-stats { flex-wrap: wrap; gap: 24px; padding: 24px; }
  .stat { min-width: 80px; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 300px; }
  .btn { justify-content: center; }
  .search-bar { flex-direction: column; }
  .grid { grid-template-columns: 1fr; }
  .footer-content { flex-direction: column; gap: 16px; text-align: center; }
  .chat-messages { height: 300px; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2rem; }
}
