/* Global styles for public site (Pages 1–4) and staff/admin pages (5–10).
 *
 * Sections:
 *   1. Tokens         colors, fonts, radii (change the look here)
 *   2. Base           element defaults
 *   3. Components     buttons, cards, tags, pills, stats, forms, flash; shared by every part of the site
 *   4. Public layout  header, footer, sections (Pages 1–4)
 *   5. Admin layout   sidebar, top bar, page header (Pages 5–7, 9, 10). Use <body class="app">.
 *   6. Field layout   mobile field app (Page 8). Use <body class="app field">.
 *   7. Pages          page-specific styles (home)
 */

/* ========== 1. Tokens ========== */
:root {
  --bg: #faf6ee;
  --surface: #ffffff;
  --band: #f2ecdf;
  --ink: #15292b;
  --muted: #56666a;
  --border: #e4dac8;

  --primary: #0b5d63;        /* teal from the field app header */
  --primary-dark: #113b3e;   /* admin sidebar */
  --on-primary: #ffffff;
  --accent: #f5b31c;         /* logo sun */
  --on-accent: #15292b;

  --success: #2c6e3f;
  --success-bg: #e6f2e8;
  --warning: #8a5300;
  --warning-bg: #fdf3dc;
  --danger: #a3261d;
  --danger-bg: #fbe9e7;

  /* Pillars use the logo colors. --pillar fills; --pillar-ink is safe for text on white. */
  --edu: #1c5fae;
  --needs: #e3a11a;
  --needs-ink: #845400;
  --jobs: #3d8a22;
  --jobs-ink: #2c6818;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', system-ui, sans-serif;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
}

/* ========== 2. Base ========== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
/* :where() keeps this reset at zero specificity so component margins (e.g. .card-grid) win. */
:where(ul[role="list"], ol[role="list"]) { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }
.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;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--primary); color: var(--on-primary); padding: 0.5rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* ========== 3. Components ========== */

/* --- Icons (views/partials/icon.ejs) --- */
.icon { width: 1.5rem; height: 1.5rem; flex: none; }
.icon--sm { width: 1.125rem; height: 1.125rem; }
.icon--xs { width: 0.875rem; height: 0.875rem; }

/* --- Text helpers --- */
.eyebrow {
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--primary);
}
.lead { font-size: 1.125rem; color: var(--muted); }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 1.5rem 0; }

/* --- Buttons. Pill-shaped on the public site; squarer inside .app (admin + field). --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: 999px; padding: 0.875rem 1.75rem;
  font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: filter 0.15s, background-color 0.15s, border-color 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn--sm { padding: 0.5rem 1.125rem; font-size: 0.9375rem; }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { filter: brightness(1.06); }
.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-dark); }
.btn--dark { background: var(--primary-dark); color: var(--on-primary); }
.btn--dark:hover { background: var(--ink); }
.btn--outline { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn--outline:hover { border-color: var(--primary); }
.btn--ghost-light { color: var(--on-primary); border-color: rgba(255, 255, 255, 0.45); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.1); }
.app .btn { border-radius: var(--radius-sm); padding: 0.75rem 1.25rem; }
.app .btn--sm { padding: 0.5rem 0.875rem; }

.link-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-weight: 500; color: var(--ink); text-decoration: none;
}
.link-button:hover { color: var(--primary); text-decoration: underline; }
.link-button--light { color: var(--on-primary); text-decoration: underline; }
.link-button--light:hover { color: var(--on-primary); opacity: 0.85; }
.inline-form { display: inline; margin: 0; }

/* --- Pillar color scopes. Add .pillar-<key> to any card, tag or label to color it. --- */
.pillar-education { --pillar: var(--edu); --pillar-ink: var(--edu); --on-pillar: #fff; }
.pillar-basic_needs { --pillar: var(--needs); --pillar-ink: var(--needs-ink); --on-pillar: var(--ink); }
.pillar-jobs { --pillar: var(--jobs); --pillar-ink: var(--jobs-ink); --on-pillar: #fff; }

.dot { width: 0.625rem; height: 0.625rem; border-radius: 50%; background: var(--pillar, currentColor); flex: none; }
.pillar-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--pillar-ink, var(--muted));
}

/* --- Cards --- */
.card {
  display: block; background: var(--surface); color: inherit;
  border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem;
}
.card__title { font-size: 1.375rem; }
.card__body { margin-top: 0.75rem; color: var(--muted); }
.card__link { color: inherit; text-decoration: none; }
.card__link:hover { text-decoration: underline; }
.card-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
}

/* Pillar card (views/partials/pillarCard.ejs) */
.pillar-card { border-top: 4px solid var(--pillar); padding: 1.75rem; }
.pillar-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; margin-bottom: 1.5rem; border-radius: var(--radius);
  background: var(--pillar); color: var(--on-pillar);
}

/* Project card (views/partials/projectCard.ejs) */
.project-card { width: 100%; text-align: left; padding: 1.125rem 1.25rem; transition: border-color 0.15s, box-shadow 0.15s; }
button.project-card { cursor: pointer; }
button.project-card:hover { border-color: var(--primary); }
.project-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 93, 99, 0.18); }
.project-card__name { display: block; margin-top: 0.375rem; font-weight: 600; }
.project-card__place {
  display: flex; align-items: center; gap: 0.25rem; margin-top: 0.125rem;
  font-size: 0.8125rem; color: var(--muted);
}
.project-card__summary { display: block; margin-top: 0.5rem; font-size: 0.9375rem; color: var(--muted); }

/* --- Stat card (views/partials/statCard.ejs) --- */
.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); }
.stat-card {
  display: flex; flex-direction: column; gap: 0.25rem;
  background: var(--surface); color: inherit; text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.875rem 1rem;
}
a.stat-card:hover { border-color: var(--primary); }
.stat-card[aria-current="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(11, 93, 99, 0.18); }
.stat-card__label { font-size: 0.8125rem; color: var(--muted); }
.stat-card__value { font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.stat-card__note { font-size: 0.75rem; color: var(--muted); }
.stat-card--warning { background: var(--warning-bg); border-color: #f1d9a6; }
.stat-card--warning .stat-card__label, .stat-card--warning .stat-card__value { color: var(--warning); }

/* --- Tags (interest/pillar chips) and status pills --- */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.tag {
  display: inline-flex; align-items: center; padding: 0.125rem 0.625rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.6;
  background: #eef0ec; color: var(--ink);
}
.tag[class*="pillar-"] { background: color-mix(in srgb, var(--pillar) 14%, white); color: var(--pillar-ink); }
.tag--accent { background: var(--warning-bg); color: var(--warning); }

.status-pill {
  display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.75rem; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600;
  background: var(--success-bg); color: var(--success); --pillar: currentColor;
}
.status-pill--warning { background: var(--warning-bg); color: var(--warning); }
.status-pill--danger { background: var(--danger-bg); color: var(--danger); }
.status-pill--muted { background: #eef0ec; color: var(--muted); }
.status-pill--on-dark { background: rgba(255, 255, 255, 0.14); color: var(--on-primary); }

.badge {
  margin-left: auto; min-width: 1.375rem; padding: 0 0.375rem; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-size: 0.75rem; font-weight: 700; line-height: 1.375rem; text-align: center;
}
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--band); color: var(--ink); font-size: 0.8125rem; font-weight: 700;
}

/* --- Forms (views/partials/formField.ejs) --- */
.form-stack { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.field { display: flex; flex-direction: column; gap: 0.375rem; }
.field__label { font-weight: 600; font-size: 0.9375rem; }
.field__required { color: var(--danger); }
.input {
  width: 100%; padding: 0.75rem 0.875rem;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:hover { border-color: #cfc3ad; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 93, 99, 0.18); }
.input::placeholder { color: #8a9597; }
textarea.input { resize: vertical; min-height: 6rem; }
.field__hint { font-size: 0.8125rem; color: var(--muted); }
.field__error { display: flex; align-items: center; gap: 0.375rem; font-size: 0.8125rem; font-weight: 600; color: var(--danger); }
.field--error .input { border-color: var(--danger); }

.fieldset { display: flex; flex-direction: column; gap: 0.75rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.fieldset > legend { padding: 0; margin-bottom: 0.25rem; }
.fieldset > .field__hint { margin-top: -0.5rem; }

/* Radio/checkbox choices shown as selectable chips */
.choice-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice {
  position: relative; display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  padding: 0.5rem 0.875rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); font-size: 0.9375rem; font-weight: 500;
}
.choice:hover { border-color: #cfc3ad; }
.choice input { accent-color: var(--primary); margin: 0; }
.choice:has(input:checked) { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, white); }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.field--error .choice { border-color: var(--danger); }

/* Error summary at the top of a form that failed validation */
.error-summary {
  padding: 1rem 1.125rem; border: 2px solid var(--danger); border-radius: var(--radius-sm);
  background: var(--danger-bg); color: var(--danger);
}
.error-summary:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.error-summary__title { font-weight: 700; }
.error-summary ul { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.error-summary a { color: var(--danger); font-weight: 600; }

/* Confirmation shown in place of a form after it was submitted */
.form-success { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.form-success:focus { outline: none; }
.form-success__icon {
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 0.75rem;
  width: 3rem; height: 3rem; border-radius: 50%; background: var(--success-bg); color: var(--success);
}
.form-success .btn { margin-top: 1.5rem; }

/* Honeypot field for middleware/spamGuard.js: off-screen rather than display:none, which bots skip */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.search-input { position: relative; }
.search-input .icon { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-input .input { padding-left: 2.5rem; }

/* --- Flash messages (views/partials/flash.ejs) --- */
.flash {
  display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem;
  padding: 0.875rem 1rem; border-radius: var(--radius-sm); border: 1px solid;
}
.flash .icon { width: 1.25rem; height: 1.25rem; margin-top: 0.125rem; }
.flash--success { background: var(--success-bg); color: var(--success); border-color: #bcdcc4; }
.flash--error { background: var(--danger-bg); color: var(--danger); border-color: #f0c2bd; }

/* ========== 4. Public layout ========== */
.section { padding-block: 5rem; }
.section--band { background: var(--band); }
.section-title { margin-top: 0.75rem; font-size: clamp(1.875rem, 3.5vw, 2.5rem); }
.section-title + .lead { margin-top: 1rem; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem 2rem; flex-wrap: wrap; padding-block: 1rem;
}
.site-logo img { height: 48px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 0.75rem 1.75rem; flex-wrap: wrap; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--primary); text-decoration: underline; }

.site-footer { background: var(--primary-dark); color: rgba(255, 255, 255, 0.85); padding-top: 3rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.site-footer__name { font-family: var(--font-display); font-size: 1.25rem; color: #fff; }
.site-footer__tagline { margin-top: 0.5rem; max-width: 28rem; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer__links a { color: #fff; text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__legal {
  margin-top: 3rem; padding-block: 1.25rem; font-size: 0.875rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 640px) {
  .site-nav { gap: 0.75rem 1.25rem; font-size: 0.9375rem; }
  .site-logo img { height: 40px; }
  .section { padding-block: 3.5rem; }
}

/* ========== 5. Admin layout ==========
 * <body class="app">
 *   <div class="admin-shell">
 *     include adminNav
 *     <div class="admin-main">
 *       include adminTopbar
 *       <main id="main" class="admin-content"> .page-header, content </main>
 */
.admin-shell { display: grid; grid-template-columns: 15.5rem 1fr; min-height: 100vh; }
.admin-sidebar {
  display: flex; flex-direction: column; gap: 1.5rem;
  background: var(--primary-dark); color: rgba(255, 255, 255, 0.85); padding: 1.25rem 0.75rem;
}
.admin-brand { display: flex; align-items: center; gap: 0.75rem; padding: 0 0.5rem; color: #fff; text-decoration: none; }
.admin-brand img { width: 40px; height: 40px; }
.admin-brand__name { display: block; font-weight: 700; font-size: 0.875rem; line-height: 1.2; }
.admin-brand__sub { display: block; font-size: 0.6875rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.75; }
.admin-nav__heading {
  margin: 1rem 0 0.375rem; padding: 0 0.75rem;
  font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6;
}
.admin-nav { display: flex; flex-direction: column; gap: 0.125rem; }
.admin-nav__link {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.625rem 0.75rem; border-radius: var(--radius-sm); border: 0;
  background: none; color: inherit; text-decoration: none; text-align: left; cursor: pointer;
  font-size: 0.9375rem; font-weight: 500;
}
.admin-nav__link .icon { width: 1.125rem; height: 1.125rem; opacity: 0.85; }
.admin-nav__link:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.admin-nav__link[aria-current="page"] { background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 600; }
.admin-sidebar__footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.12); }

.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 2.5rem; background: var(--surface); border-bottom: 1px solid var(--border);
}
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.375rem; list-style: none; margin: 0; padding: 0; font-size: 0.875rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.375rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }
.admin-topbar__user { display: flex; align-items: center; gap: 0.75rem; }
.admin-content { flex: 1; padding: 2.5rem; }

.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.page-header__title { margin-top: 0.375rem; font-size: clamp(1.75rem, 3vw, 2.25rem); }
.page-header__subtitle { margin-top: 0.5rem; color: var(--muted); }
.page-header__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { gap: 0.75rem; padding: 0.75rem 1rem; }
  .admin-sidebar nav { display: flex; gap: 0.25rem; overflow-x: auto; }
  .admin-nav__heading { display: none; }
  .admin-nav { flex-direction: row; }
  .admin-nav__link { white-space: nowrap; }
  .admin-sidebar__footer { display: flex; gap: 0.25rem; margin-top: 0; padding-top: 0.5rem; }
  .admin-topbar, .admin-content { padding-inline: 1.25rem; }
  .admin-content { padding-block: 1.75rem; }
}

/* ========== 6. Field layout (mobile-first) ==========
 * <body class="app field">
 *   include fieldHeader (pass back: { href, label } for sub-pages)
 *   <main id="main" class="field-content"> ... </main>
 */
.field-header {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.875rem 1.25rem; background: var(--primary); color: var(--on-primary);
}
.field-header__title { margin-right: auto; color: inherit; font-weight: 700; font-size: 1.0625rem; text-decoration: none; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.25rem;
  max-width: 32rem; margin: 1.25rem auto 0; padding: 0 1.25rem; width: 100%;
  color: var(--primary); font-weight: 500; text-decoration: none;
}
.back-link:hover { text-decoration: underline; }
.field-content { max-width: 32rem; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; }
.field-content h1 { font-size: 1.625rem; margin-bottom: 1.25rem; }
.field-content h2 { font-size: 1.125rem; margin: 2rem 0 0.75rem; }
.field .btn { padding-block: 1rem; font-size: 1.0625rem; }
.field .input { padding: 0.875rem 1rem; font-size: 1.0625rem; }

.photo-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 1.5rem; text-align: center; cursor: pointer;
  border: 1.5px dashed #d7cbb4; border-radius: var(--radius); background: var(--surface);
}
.photo-drop:hover { border-color: var(--primary); }
.photo-drop:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11, 93, 99, 0.18); }

.check-field {
  display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.875rem 1rem;
  border: 1px solid #f1d9a6; border-radius: var(--radius-sm); background: var(--warning-bg); font-size: 0.9375rem;
}
.check-field input { width: 1.125rem; height: 1.125rem; margin-top: 0.2rem; accent-color: var(--primary); flex: none; }

/* ========== 7. Pages ========== */

/* --- Home (views/public/home/index.ejs) --- */
/* Put the hero photo at public/images/hero.jpg. Until then the teal base color shows through. */
.hero {
  background:
    linear-gradient(90deg, rgba(17, 59, 62, 0.94), rgba(17, 59, 62, 0.65) 55%, rgba(17, 59, 62, 0.2)),
    url('/images/hero.jpg') center / cover,
    var(--primary-dark);
  color: var(--on-primary);
}
.hero__inner { padding-block: 7rem; }
.hero__eyebrow {
  font-size: 0.875rem; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
}
.hero__title { margin-top: 1rem; max-width: 42rem; font-size: clamp(2.25rem, 5.5vw, 3.75rem); }
.hero__lead { margin-top: 1.25rem; max-width: 36rem; font-size: 1.125rem; color: rgba(255, 255, 255, 0.88); }
.hero__actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.about { display: grid; gap: 2.5rem; }
.pillars { margin-top: 3.5rem; }

.projects__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter {
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  padding: 0.375rem 1rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink);
}
.filter:hover { border-color: var(--primary); }
.filter[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

.projects { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
.projects__map {
  position: relative; z-index: 0; height: 460px; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: #e7e1d3;
}
.projects__map.is-loading { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.6; } }
.map-error {
  position: absolute; inset: 0; display: grid; place-items: center;
  padding: 1.5rem; text-align: center; color: var(--muted);
}
.projects__list { padding: 0.25rem 0.5rem 0.25rem 0.25rem; }
#project-list { display: flex; flex-direction: column; gap: 1rem; }

.cta {
  background: var(--primary); color: var(--on-primary); text-align: center;
  border-radius: var(--radius-lg); padding: 3.5rem 1.5rem;
}
.cta .section-title { margin-top: 0; }
.cta__body { max-width: 36rem; margin: 1rem auto 2rem; color: rgba(255, 255, 255, 0.85); }

@media (min-width: 768px) {
  .about { grid-template-columns: 1fr 1.4fr; align-items: end; }
  .hero__inner { padding-block: 9rem; }
  .cta { padding: 3.5rem 4rem; }
}
@media (min-width: 1024px) {
  .projects { grid-template-columns: 1.6fr 1fr; }
  .projects__list { max-height: 460px; overflow-y: auto; }
}
/* --- Get Involved (views/public/involved/index.ejs) --- */
.page-hero {
  background:
    linear-gradient(90deg, rgba(17, 59, 62, 0.95), rgba(17, 59, 62, 0.8) 60%, rgba(17, 59, 62, 0.55)),
    url('/images/hero.jpg') center 60% / cover,
    var(--primary-dark);
  color: var(--on-primary);
  padding-block: 4.5rem;
}
.page-hero__title { margin-top: 0.875rem; max-width: 40rem; font-size: clamp(2rem, 4.5vw, 3rem); }
.page-hero__lead { margin-top: 1rem; max-width: 36rem; font-size: 1.125rem; color: rgba(255, 255, 255, 0.88); }

.needs { margin-top: 3rem; }
.need-card { display: flex; flex-direction: column; }
.need-card__title { margin-top: 0.75rem; }
.need-card__helps-heading {
  margin-top: 1.5rem; font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
}
.need-card__helps { margin-top: 0.625rem; display: flex; flex-direction: column; gap: 0.5rem; }
.need-card__helps li { display: flex; gap: 0.5rem; align-items: flex-start; }
.need-card__helps .icon { margin-top: 0.2rem; color: var(--pillar-ink); }
.need-card__link {
  display: inline-flex; align-items: center; gap: 0.375rem; margin-top: auto; padding-top: 1.5rem;
  font-weight: 600; color: var(--primary); text-decoration: none;
}
.need-card__link:hover { text-decoration: underline; }

.inquiry { display: grid; gap: 2.5rem; }
.inquiry__steps-heading { margin-top: 2.5rem; font-size: 1.25rem; }
.steps { margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; counter-reset: step; }
.steps li { position: relative; padding-left: 2.75rem; color: var(--muted); counter-increment: step; }
.steps li strong { display: block; color: var(--ink); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  display: grid; place-items: center; width: 1.875rem; height: 1.875rem; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 700; font-size: 0.875rem;
}
.inquiry__form-card { padding: 2rem; align-self: start; }
.inquiry__form-card .btn[type="submit"] { align-self: flex-start; }

@media (min-width: 960px) {
  .inquiry { grid-template-columns: 0.85fr 1.15fr; gap: 4rem; }
}
@media (max-width: 640px) {
  .page-hero { padding-block: 3.5rem; }
  .inquiry__form-card { padding: 1.5rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .projects__map.is-loading { animation: none; }
}
