/* Design tokens mirror the marketing site (doagood-site/src/styles/global.css) so both feel like one place. */

@font-face {
  font-family: "Fraunces Variable";
  src: url("/assets/fraunces-latin-wght-normal-0f433db6.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  --bg: #fdf8f0;
  --bg-warm: #f8eedf;
  --bg-sun: #fcf0cf;
  --surface: #fffdf9;
  --text: #2e2219;
  --text-muted: #6b5848;
  --border: #ecdfcb;
  --border-strong: #d9c5a8;
  --accent: #b8502f;
  --accent-hover: #963c1f;
  --accent-soft: #f9e0d2;
  --on-accent: #ffffff;
  --sun: #f2bd4f;
  --sage: #557556;
  --sage-soft: #e3ead9;
  --danger: #a8321f;
  --danger-soft: #fbe3dc;
  --focus: #2457c5;

  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces Variable", Georgia, "Times New Roman", serif;
  --radius-sm: 10px;
  --radius: 18px;
  --shadow: 0 1px 2px rgb(46 34 25 / 0.05), 0 4px 16px rgb(46 34 25 / 0.04);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1, h2, h3 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 4vw + 1rem, 2.8rem); margin-top: 1.5rem; }
h2 { font-size: 1.5rem; margin-top: 2.25rem; }
h3 { font-size: 1.15rem; margin: 0.35rem 0; }

.container { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 440px; margin: 0 auto; }
.muted { color: var(--text-muted); }
.small { font-size: 0.875rem; }
.lead { font-size: 1.15rem; color: var(--text-muted); max-width: 36em; }

/* Header and footer */
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); }
.site-nav {
  max-width: 760px; margin: 0 auto; padding: 14px 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 650; font-size: 1.25rem;
  color: var(--text); text-decoration: none;
}
.brand:hover { color: var(--text); }
.nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; font-size: 0.95rem; }
.nav-links a { color: var(--text); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.nav-links a.button { color: var(--on-accent); }
.nav-links form { display: inline; }

.site-footer {
  margin-top: 4rem; padding-top: 1.25rem; padding-bottom: 2.5rem;
  border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--text-muted);
}

/* Home */
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(2.4rem, 6vw + 0.5rem, 3.6rem); }
.underline-sun {
  background-image: linear-gradient(transparent 70%, var(--bg-sun) 70%);
  padding: 0 0.1em;
}

/* Buttons */
.button, input[type="submit"].button {
  display: inline-block; padding: 12px 22px; border: 1.5px solid var(--accent); border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; transition: background 0.15s ease;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.button-small { padding: 6px 16px; font-size: 0.9rem; }
.button-secondary { background: transparent; color: var(--text); border-color: var(--text); }
.button-secondary:hover { background: var(--bg-warm); color: var(--text); border-color: var(--text); }
.button-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.button-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.link-button {
  background: none; border: 0; padding: 0; color: var(--accent); font: inherit;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
form.inline { display: inline-block; }

/* Cards and lists */
.card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.card-link { color: inherit; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.card-link:hover { color: inherit; border-color: var(--border-strong); transform: translateY(-1px); }

.community-list, .plain-list { list-style: none; padding: 0; }
.community-list .card { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.plain-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0 1.75rem; }
.chip {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); text-decoration: none; font-size: 0.9rem;
}
.chip:hover { color: var(--text); background: var(--bg-warm); }
.chip-active, .chip-active:hover { background: var(--text); border-color: var(--text); color: var(--bg); }

.need-card-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 0.9rem; }
.need-card p { margin: 0.2rem 0; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600;
  background: var(--accent-soft); color: var(--accent-hover);
}
.tag-companionship, .tag-rides { background: var(--bg-sun); color: #7a5410; }
.tag-meals, .tag-groceries, .tag-kids_food { background: var(--accent-soft); color: var(--accent-hover); }
.tag-shelter_supplies, .tag-errands { background: var(--sage-soft); color: var(--sage); }

/* Need detail */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 1.25rem 0; }
.facts dt { font-weight: 600; color: var(--text-muted); }
.facts dd { margin: 0; }
.prose { max-width: 38em; }

.actions { margin: 1.75rem 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.badge { display: inline-block; padding: 8px 14px; border-radius: var(--radius-sm); background: var(--bg-warm); margin: 0; }
.badge-success { background: var(--sage-soft); color: var(--sage); font-weight: 600; }

.notice {
  background: var(--bg-sun); padding: 14px 18px; border-radius: var(--radius-sm);
  border-left: 4px solid var(--sun);
}
.coordinator-panel { margin-top: 2.5rem; padding: 20px; border-radius: var(--radius); background: var(--bg-warm); }
.coordinator-panel h2 { margin-top: 0; }
.volunteer-list { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.thank-you { margin: 0 0 14px; border-left: 4px solid var(--sun); }
.thank-you p { margin-top: 0; font-family: var(--font-display); font-size: 1.15rem; }

.empty { text-align: center; padding: 2.5rem 1rem; background: var(--bg-warm); border-radius: var(--radius); }

/* Flash */
.flash { padding: 12px 18px; border-radius: var(--radius-sm); margin: 1.25rem 0; }
.flash ul { margin: 0.25rem 0 0; }
.flash p { margin: 0; }
.flash-notice { background: var(--sage-soft); color: var(--sage); }
.flash-alert { background: var(--danger-soft); color: var(--danger); }

/* Forms */
.stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.field-row { display: flex; flex-wrap: wrap; gap: 16px; }
.field-checkbox { flex-direction: row; align-items: flex-start; gap: 10px; }
.field-checkbox input { margin-top: 5px; accent-color: var(--accent); }
label { font-weight: 600; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"],
input[type="search"], input[type="number"], input[type="datetime-local"], select, textarea {
  width: 100%; padding: 11px 14px; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--focus); outline-offset: 1px; }

/* Help */
.help-list .card h2 { margin: 0; font-size: 1.8rem; color: var(--accent); }
.help-list .card p { margin: 0.25rem 0 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Admin */
.admin-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px;
  margin-top: 1.25rem; padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--bg-warm); font-size: 0.95rem;
}
.admin-nav a { color: var(--text); text-decoration: none; }
.admin-nav a.is-current { color: var(--accent); font-weight: 600; }
.admin-label { font-weight: 700; color: var(--text-muted); text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.06em; }

.row h1 { margin-bottom: 0.5rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.stat-value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; }

.table-wrap { overflow-x: auto; margin: 1rem 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--surface); border-radius: var(--radius-sm); }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.admin-table form { display: inline; }

.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 1rem 0; }
.inline-form input[type="email"], .inline-form input[type="search"] { flex: 1; min-width: 200px; width: auto; }
