/* KindGrit — Community Feed Styles */

:root {
  --bg: #faf7f2;
  --fg: #2a2118;
  --accent: #c8622f;
  --accent-soft: rgba(200, 98, 47, 0.12);
  --green: #4a6741;
  --green-soft: rgba(74, 103, 65, 0.12);
  --cream: #f0e9de;
  --muted: #8a7a6d;
  --border: #e0d6c8;
  --font: 'DM Sans', system-ui, sans-serif;
  --font-heading: 'Fraunces', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Nav ─── */
.nav {
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  padding: 0 8%;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; color: var(--accent); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--fg); text-decoration: none; }
.btn-nav {
  background: var(--accent);
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
}
.btn-nav:hover { background: #b5572a; text-decoration: none; }

/* ─── Feed Container ─── */
.feed-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ─── Feed Header ─── */
.feed-header { margin-bottom: 40px; }
.feed-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 10px;
}
.feed-header p { color: var(--muted); font-size: 16px; }

/* ─── New Moment Form ─── */
.moment-form {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 40px;
  box-shadow: 0 2px 12px rgba(42,33,24,0.06);
}
.moment-form h2 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.form-row { margin-bottom: 16px; }
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.form-row input[type="text"],
.form-row textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--fg);
  background: var(--bg);
  transition: border-color 0.15s;
  resize: none;
}
.form-row input[type="text"]:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row textarea { min-height: 100px; }
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--muted); opacity: 0.6; }

/* Tag selector */
.tag-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.tag-option {
  display: none;
}
.tag-option + label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  transition: all 0.15s;
}
.tag-option:checked + label {
  border-color: transparent;
  color: #fff;
}
.tag-option[value="kind"]:checked + label { background: var(--green); }
.tag-option[value="brave"]:checked + label { background: var(--accent); }
.tag-option[value="switched-on"]:checked + label { background: #7b5ea7; }
.tag-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.submit-btn {
  width: 100%;
  background: var(--fg);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}
.submit-btn:hover { background: var(--accent); }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-error {
  background: #fff0ed;
  border: 1.5px solid #f5a89a;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #b03a2e;
  margin-bottom: 16px;
  display: none;
}

/* ─── Feed Divider ─── */
.feed-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.feed-divider::before, .feed-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Post Card ─── */
.post-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: 0 1px 6px rgba(42,33,24,0.05);
  transition: box-shadow 0.15s;
}
.post-card:hover { box-shadow: 0 3px 16px rgba(42,33,24,0.1); }

.post-card .post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.post-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cream);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.post-meta { flex: 1; }
.post-author { font-weight: 600; font-size: 15px; }
.post-time { font-size: 12px; color: var(--muted); }

.post-card .post-content {
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg);
  margin-bottom: 16px;
}

.post-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.post-tag.kind { background: var(--green-soft); color: var(--green); }
.post-tag.brave { background: var(--accent-soft); color: var(--accent); }
.post-tag.switched-on { background: rgba(123, 94, 167, 0.12); color: #7b5ea7; }

/* ─── Empty State ─── */
.empty-feed {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-feed .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-feed h3 { font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: 8px; color: var(--fg); }

/* ─── Footer ─── */
.feed-footer {
  text-align: center;
  padding: 32px 0 16px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

/* ─── Animation for new posts ─── */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-card.new-post { animation: slideIn 0.3s ease-out; }

/* ─── Responsive ─── */
@media (max-width: 600px) {
  .nav { padding: 0 16px; }
  .nav-links { gap: 16px; }
  .feed-container { padding: 32px 16px 60px; }
  .moment-form { padding: 20px; }
  .post-card { padding: 20px; }
}