/* =====================================================================
   NGERO — Nyanza Gulf Ecosystem Restoration Organization
   Shared stylesheet
   Palette grounded in the Nyanza Gulf: reed green, lake blue,
   papyrus ochre, off-white paper.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Core palette */
  --reed-900: #1c3325;   /* deepest forest/reed green */
  --reed-800: #234331;   /* primary dark green */
  --reed-700: #2f5a41;   /* mid green */
  --reed-500: #4f8464;   /* lighter foliage green */
  --lake-700: #175c66;   /* deep lake blue */
  --lake-500: #2c848f;   /* water teal-blue */
  --lake-300: #7fb3ba;   /* shallow water */
  --ochre-500: #c8912e;  /* papyrus / reed gold accent */
  --ochre-300: #e3c583;  /* soft reed light */

  /* Neutrals */
  --paper: #f6f3ec;      /* off-white paper */
  --paper-2: #efe9dc;    /* warm sand */
  --sand-line: #ddd4c2;  /* hairline */
  --ink: #23291f;        /* warm charcoal-green text */
  --ink-soft: #4f5647;   /* muted body text */
  --white: #ffffff;

  /* Placeholder grey (per brief) */
  --ph-grey: #d9d9d9;
  --ph-grey-2: #cfcfcf;
  --ph-label: #7a7a7a;

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Rhythm */
  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(3.5rem, 8vw, 7rem);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(28, 51, 37, .06), 0 12px 30px -18px rgba(28, 51, 37, .35);
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--lake-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--reed-700); }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--reed-900);
  line-height: 1.12;
  font-weight: 560;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p  { margin: 0 0 1rem; color: var(--ink-soft); }

/* ---------- Utility layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tint { background: var(--paper-2); }
.section--reed { background: var(--reed-800); color: var(--paper); }
.section--reed h2, .section--reed h3 { color: var(--white); }
.section--reed p { color: rgba(246,243,236,.82); }

.center { text-align: center; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--ink-soft); max-width: 62ch; }
.narrow { max-width: 72ch; }

/* Eyebrow label — a small waterline marker */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--body);
  font-size: .74rem; font-weight: 650;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--lake-700);
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: ""; width: 34px; height: 2px;
  background: linear-gradient(90deg, var(--ochre-500), var(--lake-500));
  border-radius: 2px;
}
.section--reed .eyebrow { color: var(--ochre-300); }
.section--reed .eyebrow::before { background: var(--ochre-300); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--body); font-weight: 600; font-size: .98rem;
  padding: .8rem 1.5rem; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--ochre-500); color: var(--reed-900); }
.btn--primary:hover { background: #d89e35; color: var(--reed-900); }
.btn--ghost { background: transparent; color: var(--reed-800); border-color: var(--reed-700); }
.btn--ghost:hover { background: var(--reed-800); color: var(--paper); }
.btn--on-dark { background: transparent; color: var(--paper); border-color: rgba(246,243,236,.6); }
.btn--on-dark:hover { background: var(--paper); color: var(--reed-900); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,243,236,.9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--sand-line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 120%, var(--lake-500) 0 40%, transparent 41%),
    linear-gradient(160deg, var(--reed-700), var(--reed-900));
  position: relative; flex: none;
  box-shadow: inset 0 0 0 2px rgba(246,243,236,.15);
}
.brand__mark::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 3px; height: 20px; top: 7px;
  background: var(--ochre-300); border-radius: 3px;
  transform: rotate(-8deg); box-shadow: 5px 1px 0 -1px var(--ochre-500), -5px 1px 0 -1px var(--reed-500);
}
.brand__name { font-family: var(--display); font-weight: 600; color: var(--reed-900); font-size: 1.15rem; line-height: 1; }
.brand__name span { display: block; font-family: var(--body); font-weight: 500; font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lake-700); margin-top: 3px; }

.nav__links { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: inline-block; padding: .5rem .7rem; border-radius: 8px;
  font-size: .93rem; font-weight: 500; color: var(--ink); text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.nav__links a:hover { background: var(--paper-2); color: var(--reed-800); }
.nav__links a.is-active { color: var(--reed-800); font-weight: 650; }
.nav__links a.is-active::after {
  content: ""; display: block; height: 2px; margin-top: 3px; border-radius: 2px;
  background: var(--ochre-500);
}
.nav__cta { margin-left: .4rem; }

.nav__toggle {
  display: none; background: none; border: 1.5px solid var(--sand-line);
  border-radius: 8px; width: 44px; height: 40px; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--reed-900);
  border-radius: 2px; transition: transform .25s ease, opacity .2s ease;
}
.nav__toggle span { position: relative; }
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after  { position: absolute; top: 6px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--reed-900); color: var(--paper); overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::before { /* legibility scrim over the photo */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(95deg, rgba(18,36,26,.88), rgba(18,36,26,.58) 52%, rgba(18,36,26,.30));
}
.hero__inner {
  position: relative; z-index: 2;
  display: grid; align-content: center; gap: 1.4rem;
  min-height: min(78vh, 660px);
  padding-block: clamp(3rem, 8vw, 6rem);
  max-width: 62ch;
}
.hero h1 { color: var(--white); }
.hero__sub { font-family: var(--display); font-style: italic; font-size: clamp(1.2rem, 2.6vw, 1.7rem); color: var(--ochre-300); margin: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .6rem; }
.hero::after { /* waterline gradient at base */
  content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 45%;
  background: linear-gradient(to top, rgba(23,92,102,.55), transparent);
  pointer-events: none;
}

/* ---------- Image placeholders (per brief: plain grey #d9d9d9) ---------- */
.ph {
  background: var(--ph-grey);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--ph-label); font-size: .82rem; font-weight: 500;
  padding: 1rem; position: relative; overflow: hidden;
  border: 1px solid var(--ph-grey-2);
}
.ph::before { /* subtle image glyph */
  content: ""; position: absolute; top: 12px; left: 12px;
  width: 16px; height: 14px; border: 2px solid rgba(0,0,0,.18); border-radius: 3px;
}
.ph__label { position: relative; z-index: 1; max-width: 26ch; line-height: 1.35; }
.ph--hero { min-height: 100%; height: 100%; border-radius: 0; position: absolute; inset: 0; }
.ph--wide { aspect-ratio: 16 / 7; }
.ph--card { aspect-ratio: 16 / 10; margin-bottom: 1.1rem; border-radius: var(--radius-sm); }
.ph--icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1.1rem; }
.ph--icon::before { display: none; }
.ph--map { aspect-ratio: 16 / 8; }

/* ---------- Generic card ---------- */
.card {
  background: var(--white); border: 1px solid var(--sand-line);
  border-radius: var(--radius); padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }

/* Grids */
.grid { display: grid; gap: clamp(1.1rem, 2.5vw, 1.8rem); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Quote / statement blocks ---------- */
.statement {
  border-left: 4px solid var(--ochre-500);
  padding: .2rem 0 .2rem 1.4rem;
}
.statement__label {
  font-family: var(--body); font-size: .72rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--lake-700);
  margin-bottom: .5rem;
}
.statement p { font-family: var(--display); font-size: clamp(1.15rem, 2.1vw, 1.45rem); color: var(--reed-900); line-height: 1.4; margin: 0; }
.section--reed .statement p { color: var(--paper); }
.section--reed .statement__label { color: var(--ochre-300); }

.source-tag {
  display: inline-block; margin-top: .9rem;
  font-size: .74rem; letter-spacing: .04em; color: var(--ink-soft);
  background: var(--paper-2); border: 1px solid var(--sand-line);
  padding: .2rem .6rem; border-radius: 999px;
}
.section--reed .source-tag { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: rgba(246,243,236,.8); }

/* ---------- Numbered objective / program blocks ---------- */
.numbered { display: grid; gap: 1.5rem; }
.item {
  display: grid; grid-template-columns: auto 1fr; gap: 1.4rem;
  background: var(--white); border: 1px solid var(--sand-line);
  border-radius: var(--radius); padding: 1.8rem;
  box-shadow: var(--shadow);
}
.item__num {
  font-family: var(--display); font-size: 1.6rem; font-weight: 600;
  color: var(--ochre-500); line-height: 1;
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper-2); border: 1.5px solid var(--ochre-300); flex: none;
}
.item__body h3 { margin-bottom: .5rem; }
.align-line {
  margin-top: .9rem; padding-top: .9rem; border-top: 1px dashed var(--sand-line);
  font-size: .95rem;
}
.align-line strong { color: var(--lake-700); font-weight: 650; }

.item__body ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.item__body li { margin-bottom: .5rem; color: var(--ink-soft); }

/* ---------- Principles list ---------- */
.principles { counter-reset: p; display: grid; gap: 1.1rem; }
.principle {
  background: var(--white); border: 1px solid var(--sand-line);
  border-radius: var(--radius); padding: 1.4rem 1.5rem 1.4rem 1.4rem;
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start;
}
.principle__dot {
  width: 12px; height: 12px; border-radius: 50%; margin-top: .55rem;
  background: var(--lake-500); flex: none;
  box-shadow: 0 0 0 4px rgba(44,132,143,.15);
}
.principle h3 { font-size: 1.12rem; margin-bottom: .3rem; }
.principle p { margin: 0; }

/* ---------- Board / team ---------- */
.team-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.1rem, 2.5vw, 1.8rem);
}
.person { text-align: center; }
.person__photo {
  position: relative; width: 150px; height: 150px; margin: 0 auto 1rem;
  border-radius: 50%; overflow: hidden;
  background: var(--ph-grey);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 1px var(--sand-line), var(--shadow);
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 2; }
.person__initials {
  position: absolute; inset: 0; z-index: 1;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 600; font-size: 2.2rem;
  color: var(--reed-800);
  background: linear-gradient(160deg, var(--paper-2), var(--ph-grey));
}
.person h3 { margin: 0 0 .15rem; font-size: 1.15rem; }
.person__title { font-size: .9rem; font-weight: 600; color: var(--lake-700); margin: 0 0 .5rem; }
.person__title em { font-weight: 500; color: var(--ink-soft); font-style: normal; font-size: .82rem; display: block; }
.person p { font-size: .92rem; margin: 0; }

/* ---------- Get involved cards ---------- */
.involve { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.1rem, 2.5vw, 1.8rem); }
.involve .card { display: flex; flex-direction: column; }
.involve .card .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--reed-800); }
.field input, .field textarea, .field select {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  padding: .75rem .85rem; border: 1.5px solid var(--sand-line); border-radius: var(--radius-sm);
  background: var(--white); width: 100%;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--lake-500); outline-offset: 1px; border-color: var(--lake-500); }
.field textarea { min-height: 140px; resize: vertical; }
.contact-detail { display: grid; gap: 1rem; }
.contact-detail dt { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lake-700); font-weight: 700; }
.contact-detail dd { margin: .1rem 0 0; color: var(--ink); font-weight: 500; }
.form-note { font-size: .82rem; color: var(--ink-soft); }

/* ---------- Callout band ---------- */
.callout { text-align: center; }
.callout .btn { margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--reed-900); color: rgba(246,243,236,.75); padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand .brand__name { color: var(--paper); }
.footer-brand p { color: rgba(246,243,236,.7); margin-top: .8rem; max-width: 34ch; }
.footer-tagline { font-family: var(--display); font-style: italic; color: var(--ochre-300); margin-top: .6rem; }
.footer-col h4 { color: var(--paper); font-family: var(--body); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-col a { color: rgba(246,243,236,.75); text-decoration: none; font-size: .93rem; }
.footer-col a:hover { color: var(--ochre-300); }
.socials { display: flex; gap: .6rem; margin-top: .3rem; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  display: grid; place-items: center; color: rgba(246,243,236,.8);
}
.socials a:hover { background: rgba(255,255,255,.1); color: var(--ochre-300); }
.socials svg { width: 18px; height: 18px; fill: currentColor; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; padding-top: 1.4rem; font-size: .82rem; color: rgba(246,243,236,.55); }

/* ---------- Page intro band ---------- */
.page-hero { background: var(--reed-800); color: var(--paper); padding-block: clamp(3rem, 7vw, 5rem); }
.page-hero h1 { color: var(--white); }
.page-hero p { color: rgba(246,243,236,.85); max-width: 60ch; }
.page-hero .eyebrow { color: var(--ochre-300); }
.page-hero .eyebrow::before { background: var(--ochre-300); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid--3, .team-grid, .involve { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--sand-line);
    padding: .6rem var(--gutter) 1rem;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .8rem .4rem; border-radius: 0; border-bottom: 1px solid var(--sand-line); }
  .nav__links a.is-active::after { display: none; }
  .nav__cta { margin: .7rem 0 0; }
  .nav__cta .btn { width: 100%; }
}
@media (max-width: 620px) {
  .grid--3, .grid--2, .team-grid, .involve { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr; gap: 1rem; }
  .item__num { width: 46px; height: 46px; font-size: 1.3rem; }
}

/* ---------- A11y ---------- */
:focus-visible { outline: 2px solid var(--lake-500); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--reed-900); color: var(--paper); padding: .7rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 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; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Real content photos ---------- */
.media-card {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: center;
  border-radius: var(--radius-sm); margin-bottom: 1.1rem; display: block;
  background: var(--ph-grey); border: 1px solid var(--sand-line);
}
.media-hl {
  width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: center;
  border-radius: var(--radius-sm); margin-bottom: 1.1rem; display: block;
  background: var(--ph-grey);
}
.media-band {
  width: 100%; aspect-ratio: 16 / 6; object-fit: cover; object-position: center 35%;
  border-radius: var(--radius); display: block; background: var(--ph-grey);
  box-shadow: var(--shadow);
}
@media (max-width: 620px) { .media-band { aspect-ratio: 4 / 3; } }
