/* ==========================================================================
   NORPACRRO — shared stylesheet
   North Rift Pastoralists Communities Relief and Rehabilitation Organization
   Deep green + earth-ochre institutional palette. No frameworks, no CDNs.
   ========================================================================== */

:root {
  --green-900: #0F2A1B;
  --green-800: #1B4332;
  --green-700: #24583F;
  --green-600: #2D6A4F;
  --green-200: #C7DCD0;
  --green-100: #E4EEE7;
  --ochre-700: #8C5610;
  --ochre-600: #A96C15;
  --ochre-500: #C8821F;
  --ochre-200: #EFD3A7;
  --ochre-100: #FBEFDC;
  --sand-50:  #FBF8F2;
  --sand-100: #F3EDE1;
  --ink:      #1B241F;
  --ink-soft: #4C5A52;
  --line:     #DAD3C4;
  --white:    #FFFFFF;
  --danger:   #7A2418;

  --radius-s: 6px;
  --radius:   10px;
  --radius-l: 16px;
  --shadow:   0 2px 10px rgba(15, 42, 27, 0.08);
  --shadow-l: 0 10px 30px rgba(15, 42, 27, 0.10);
  --maxw:     1140px;
  --gap:      1.25rem;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand-50);
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--green-900); margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.9rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 2rem); }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); }
h4 { font-size: 1.02rem; }
p  { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
a  { color: var(--green-700); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ochre-700); }

strong { color: var(--green-900); }

/* --------------------------------------------------------------- a11y */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ochre-500); color: var(--green-900);
  padding: .7rem 1rem; font-weight: 700; border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--ochre-500);
  outline-offset: 2px;
  border-radius: 3px;
}

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

/* --------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.1rem; }
.wrap--narrow { max-width: 820px; }

.section { padding: clamp(2.2rem, 1.4rem + 3vw, 4rem) 0; }
.section--tight { padding: clamp(1.5rem, 1rem + 1.5vw, 2.4rem) 0; }
.section--sand { background: var(--sand-100); }
.section--green { background: var(--green-800); color: #EAF3ED; }
.section--green h2, .section--green h3 { color: var(--white); }
.section--green a { color: var(--ochre-200); }
.section--green .lede { color: #D7E5DB; }

.lede { font-size: 1.09rem; color: var(--ink-soft); max-width: 70ch; }
.muted { color: var(--ink-soft); font-size: .95rem; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.divider { height: 1px; background: var(--line); border: 0; margin: 2.5rem 0; }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.split {
  display: grid; gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
}

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ochre-700); background: var(--ochre-100);
  padding: .25rem .6rem; border-radius: 999px; margin-bottom: .9rem;
}
.section--green .eyebrow { background: rgba(200,130,31,.18); color: var(--ochre-200); }

/* --------------------------------------------------------------- header */
.site-header {
  background: var(--green-800);
  border-bottom: 3px solid var(--ochre-500);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .6rem 1rem;
  padding-top: .6rem; padding-bottom: .6rem;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.brand__mark { height: 46px; width: auto; }
.brand__word { display: flex; flex-direction: column; line-height: 1.15; color: var(--white); }
.brand__word b { font-size: 1.12rem; letter-spacing: .06em; }
.brand__word small { font-size: .64rem; color: #BFD5C6; letter-spacing: .02em; max-width: 34ch; }

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .15rem .35rem;
}
.site-nav a {
  display: block; color: #DCEAE1; text-decoration: none;
  font-size: .93rem; font-weight: 600;
  padding: .45rem .6rem; border-radius: var(--radius-s);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.site-nav a.active,
.site-nav a[aria-current="page"] {
  color: var(--white);
  border-bottom-color: var(--ochre-500);
  background: rgba(255,255,255,.06);
}

/* --------------------------------------------------------------- hero */
.hero { background: var(--green-800); color: #EAF3ED; padding: 0; }
.hero__inner {
  display: grid; gap: clamp(1.4rem, 1rem + 2vw, 3rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  padding: clamp(2rem, 1.4rem + 3vw, 4rem) 0;
}
.hero h1 { color: var(--white); margin-bottom: .5rem; }
.hero__org { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre-200); font-weight: 700; }
.hero p { color: #D7E5DB; font-size: 1.08rem; max-width: 58ch; }
.hero__figure { margin: 0; }
.hero__figure img { border-radius: var(--radius-l); box-shadow: var(--shadow-l); }
.hero__figure figcaption { font-size: .8rem; color: #AFC6B7; margin-top: .5rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-block; padding: .72rem 1.15rem;
  border-radius: var(--radius-s); font-weight: 700; font-size: .95rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
}
.btn--primary { background: var(--ochre-500); color: #22190A; }
.btn--primary:hover { background: var(--ochre-200); color: var(--green-900); }
.btn--ghost { border-color: var(--green-200); color: var(--white); background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn--solid { background: var(--green-700); color: var(--white); }
.btn--solid:hover { background: var(--green-900); color: var(--white); }
.btn--outline { border-color: var(--green-700); color: var(--green-800); background: transparent; }
.btn--outline:hover { background: var(--green-100); color: var(--green-900); }

/* --------------------------------------------------------------- cards */
.card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.25rem 1.35rem;
  box-shadow: var(--shadow); height: 100%;
  display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card__icon { width: 44px; height: 44px; margin-bottom: .75rem; }
.card__more { margin-top: auto; padding-top: .8rem; font-weight: 700; font-size: .9rem; }

.card--ochre { border-top: 4px solid var(--ochre-500); }
.card--flat { box-shadow: none; }

.tile {
  background: var(--green-100); border-left: 4px solid var(--green-600);
  border-radius: var(--radius-s); padding: 1rem 1.1rem;
}
.tile--ochre { background: var(--ochre-100); border-left-color: var(--ochre-500); }

.note {
  background: var(--ochre-100); border-left: 4px solid var(--ochre-500);
  padding: .9rem 1.1rem; border-radius: var(--radius-s); margin: 1.2rem 0;
}

/* --------------------------------------------------------------- lists */
.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 1.6rem; }
.checklist li::before {
  content: ""; position: absolute; left: .25rem; top: .58em;
  width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--ochre-500);
}
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; }
.pill-list li {
  margin: 0; background: var(--green-100); color: var(--green-900);
  border: 1px solid var(--green-200); border-radius: 999px;
  padding: .3rem .75rem; font-size: .88rem; font-weight: 600;
}

/* --------------------------------------------------------------- stats */
.stats { display: grid; gap: var(--gap); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem; text-align: center;
}
.stat__value { font-size: 1.5rem; font-weight: 800; color: var(--green-800); display: block; line-height: 1.25; }
.stat__label { font-size: .87rem; color: var(--ink-soft); display: block; margin-top: .3rem; }

/* --------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .94rem; }
caption { caption-side: top; text-align: left; padding: .8rem 1rem 0; color: var(--ink-soft); font-size: .87rem; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--green-100); color: var(--green-900); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }

/* --------------------------------------------------------------- county blocks */
.county {
  display: grid; gap: 1.2rem;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: start;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem;
  box-shadow: var(--shadow);
}
.county h3 { margin-bottom: .35rem; }
.county__figure { margin: 0; }
.county__figure img { border-radius: var(--radius-s); }
.county__meta { font-size: .85rem; color: var(--ink-soft); }

/* --------------------------------------------------------------- placeholder token */
.ph {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82em; font-weight: 700; white-space: nowrap;
  color: var(--ochre-700); background: var(--ochre-100);
  border: 1px dashed var(--ochre-500); border-radius: 4px;
  padding: .05em .35em;
}

/* --------------------------------------------------------------- forms */
.form { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: .3rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .6rem .7rem; font: inherit; font-size: .96rem;
  color: var(--ink); background: var(--sand-50);
  border: 1px solid var(--line); border-radius: var(--radius-s);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--green-600); background: var(--white);
}
.field textarea { min-height: 140px; resize: vertical; }
.field .hint { font-size: .82rem; color: var(--ink-soft); margin-top: .25rem; display: block; }

/* --------------------------------------------------------------- contact blocks */
.contact-list { list-style: none; padding: 0; }
.contact-list li { margin-bottom: 1rem; }
.contact-list b { display: block; color: var(--green-900); font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; }

/* --------------------------------------------------------------- footer */
.site-footer { background: var(--green-900); color: #C9DCCF; padding: clamp(2rem, 1.4rem + 2vw, 3rem) 0 1.2rem; }
.site-footer h3 { color: var(--white); font-size: 1rem; margin-bottom: .6rem; }
.site-footer a { color: #DCEAE1; text-decoration: none; }
.site-footer a:hover { color: var(--ochre-200); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; font-size: .93rem; }
.footer-grid { display: grid; gap: 1.6rem; grid-template-columns: 1.4fr 1fr 1.2fr; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.16); margin-top: 1.8rem; padding-top: 1rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between;
  font-size: .85rem; color: #A8C0B2;
}
.footer-note { font-size: .82rem; color: #9DB6A8; margin-top: .6rem; }

/* --------------------------------------------------------------- breadcrumb / page head */
.page-head { background: var(--green-100); border-bottom: 1px solid var(--line); padding: clamp(1.5rem, 1rem + 2vw, 2.6rem) 0; }
.page-head h1 { margin-bottom: .3rem; }
.page-head .lede { color: var(--green-700); }

/* --------------------------------------------------------------- misc */
.tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ochre-700); }
.figure { margin: 0; }
.figure img { border-radius: var(--radius); border: 1px solid var(--line); }
.figure figcaption { font-size: .84rem; color: var(--ink-soft); margin-top: .5rem; }
h2 + .lede, .page-head h1 + .lede { margin-top: 0; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .grid--4, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .hero__inner, .split { grid-template-columns: minmax(0, 1fr); }
  .hero__figure { order: -1; }
  .county { grid-template-columns: minmax(0, 1fr); }
  .county__figure { max-width: 220px; }
  .site-header { position: static; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid--2, .grid--3, .grid--4, .stats, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .site-header__inner { flex-direction: column; align-items: flex-start; }
  .brand__word small { display: none; }
  .site-nav ul { gap: .1rem .2rem; }
  .site-nav a { font-size: .88rem; padding: .4rem .5rem; }
  .cta-row .btn { width: 100%; text-align: center; }
}

@media print {
  .site-header, .site-footer, .cta-row { display: none; }
  body { background: #fff; }
}
