/* Moco270 Mutual Aid – crisp, minimal, with snap (inspired by Feeding America) */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text: #1a1a1a;
  --text-muted: #4a5568;
  --bg: #f8f9fa;
  --bg-section: #fff;
  --bg-alt: #fff;
  --border: #e2e8f0;
  --primary: #1a202c;
  --primary-hover: #2d3748;
  --accent: #2b6cb0;
  --accent-bar: #2b6cb0;
  --success-bg: #c6f6d5;
  --success-text: #276749;
  --error-bg: #fed7d7;
  --error-text: #c53030;
  --max-width: 65ch;
  --space: 1.5rem;
  --space-lg: 3rem;
  --tap-min: 44px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

.main { max-width: 900px; margin: 0 auto; padding: var(--space-lg) var(--space); }
@media (max-width: 640px) {
  .main { padding: 2rem 1rem; }
}

/* Nav */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space);
  padding: 0.875rem 1.5rem;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.nav a { color: #e2e8f0; text-decoration: none; margin-right: 0.75rem; min-height: var(--tap-min); display: inline-flex; align-items: center; font-weight: 500; }
.nav a:hover { text-decoration: underline; color: #fff; }
.nav-brand { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-form { margin: 0; display: inline; }
.nav-form button {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  border-radius: 4px;
  min-height: var(--tap-min);
  font-size: 1rem;
}
.nav-form button:hover { background: rgba(255,255,255,0.1); }

/* Typography */
h1 { font-size: 2rem; margin-bottom: 0.5rem; color: var(--primary); font-weight: 700; letter-spacing: -0.02em; }
h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin: 0 0 var(--space);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent-bar);
  display: inline-block;
}
@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.25rem; }
}

/* Hero */
.hero {
  text-align: center;
  margin-bottom: var(--space-lg);
  padding: 2rem 1rem 2.5rem;
}
.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}
.tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 0;
  font-weight: 500;
  max-width: 32ch;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta { margin-top: 1.75rem; }
.hero-cta .btn { margin: 0 0.5rem 0.5rem 0; }
@media (max-width: 640px) {
  .hero h1 { font-size: 2rem; }
  .tagline { font-size: 1.1rem; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  min-height: var(--tap-min);
  line-height: 1.2;
  font-size: 1rem;
  text-align: center;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--primary-hover); }
.btn-primary { background: var(--accent); font-weight: 600; }
.btn-primary:hover { background: #234e52; }

/* Messages */
.message { padding: 0.75rem; border-radius: 6px; margin-bottom: 1rem; }
.message.success { background: var(--success-bg); color: var(--success-text); }
.message.error { background: var(--error-bg); color: var(--error-text); }

/* Forms */
.form-page h1 { margin-bottom: 1rem; }
.form label { display: block; margin-bottom: 0.75rem; }
.form input, .form textarea {
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 0.5rem;
  margin-top: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
}
.form textarea { min-height: 100px; resize: vertical; }
.form button {
  padding: 0.6rem 1.25rem;
  min-height: var(--tap-min);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 0.5rem;
  font-size: 1rem;
}
.form button:hover { background: var(--primary-hover); }
@media (max-width: 640px) {
  .form input, .form textarea { max-width: none; }
}

/* Sections – alternating subtle backgrounds for rhythm */
.mission {
  margin: 0;
  padding: var(--space-lg) 0;
  background: var(--bg-section);
}
.mission-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
  margin-top: 1rem;
}
.mission-text p { margin: 0; color: var(--text-muted); font-size: 1.05rem; line-height: 1.65; max-width: 42ch; }
.mission-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.mission-image img { width: 100%; height: auto; display: block; vertical-align: top; }
@media (max-width: 640px) {
  .mission-content { grid-template-columns: 1fr; gap: var(--space); }
  .mission-text p { max-width: none; }
  .mission-image { order: -1; max-width: 320px; margin: 0 auto; }
}

.public-links {
  margin: 0;
  padding: var(--space-lg) 0;
  background: var(--bg);
}
.public-links h2 { margin-bottom: var(--space); }
.links-list { list-style: none; }
.links-list li { margin-bottom: 0.6rem; }
.links-list a { color: var(--accent); text-decoration: none; font-weight: 500; }
.links-list a:hover { text-decoration: underline; }

.news-section {
  margin: 0;
  padding: var(--space-lg) 0;
  background: var(--bg-section);
}
.news-section h2 { margin-bottom: var(--space); }
.news-list { list-style: none; }
.news-list li { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.news-date { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.03em; }
.news-summary { font-size: 0.95rem; color: var(--text-muted); margin-top: 0.35rem; line-height: 1.5; }

.cta-section {
  text-align: center;
  margin: 0;
  padding: var(--space-lg) 0;
  background: var(--bg);
}
.cta-section .btn { font-weight: 600; }

/* Admin */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.admin-table th, .admin-table td { padding: 0.5rem; text-align: left; border: 1px solid var(--border); }
.admin-table th { background: #edf2f7; }
.inline-form { display: inline; margin-right: 0.5rem; }
.inline-form button { padding: 0.25rem 0.5rem; font-size: 0.9rem; cursor: pointer; background: var(--primary); color: #fff; border: none; border-radius: 4px; }
.inline-form button.link { background: transparent; color: var(--accent); text-decoration: underline; }
.inline-form button:hover { opacity: 0.9; }
.btn.link { background: none; color: var(--accent); }

/* Carousel */
.carousel-section { margin: 0; padding: var(--space-lg) 0; background: var(--bg); }
.carousel-section h2 { margin-bottom: var(--space); }
.carousel {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.carousel-inner { position: relative; width: 100%; aspect-ratio: 16/10; background: var(--primary); }
.carousel-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.carousel-slide.active { opacity: 1; z-index: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
}
.carousel-btn:hover { background: rgba(0,0,0,0.6); }
.carousel-btn.prev { left: 0.5rem; }
.carousel-btn.next { right: 0.5rem; }
.carousel-dots {
  position: absolute;
  bottom: 0.75rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  z-index: 2;
}
.carousel-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  padding: 0;
}
.carousel-dots button.active { background: #fff; }
