/* ==========================================================
   Green Hearts Organization — main stylesheet
   One file controls the look of every page.
   Colours are set once in :root, so you can change the whole
   site's palette by editing the values below.
   ========================================================== */

:root {
  --forest: #17402F;
  --moss: #3F7D4E;
  --leaf: #8DB255;
  --earth: #8A6A45;
  --earth-text: #6B5033;   /* darker earth, readable on cream */
  --cream: #F5F2E8;
  --cream-deep: #ECE7D6;
  --white: #FFFFFF;
  --dark: #10291F;
  --glow: #B1CB6B;          /* ONE glow colour (logo leaf yellow-green) for buttons, links and icons */

  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(16, 41, 31, .12);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--dark);
  background: var(--cream);
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--forest); }
a:hover { color: var(--moss); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; color: var(--forest); }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

/* Visible keyboard focus everywhere */
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute !important; 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: 12px; top: -60px; z-index: 200;
  background: var(--forest); color: var(--white); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; color: var(--white); }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--leaf); color: var(--dark); }
.btn-primary:hover { background: #A0C566; color: var(--dark); }
.btn-outline { border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: var(--white); color: var(--forest); }
.btn-dark { background: var(--forest); color: var(--white); }
.btn-dark:hover { background: var(--moss); color: var(--white); }
.btn-ghost { border-color: var(--forest); color: var(--forest); }
.btn-ghost:hover { background: var(--forest); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 242, 232, .97);
  border-bottom: 1px solid rgba(23, 64, 47, .12);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--forest); }
/* The logo is a circle: fixed square box + contain = never stretched */
.brand img, .footer-logo {
  width: 52px; height: 52px; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 50%; flex: none;
}
.brand-text { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; line-height: 1.1; white-space: nowrap; color: var(--forest); }
.brand-text small { display: block; font-family: var(--font-body); font-weight: 600; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--earth-text); }

.primary-nav ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; }
.primary-nav a {
  display: block; padding: .5rem .65rem; border-radius: 999px; text-decoration: none;
  font-size: .9rem; font-weight: 600; color: var(--forest); white-space: nowrap;
}
.primary-nav a:hover { background: rgba(141, 178, 85, .25); }
.primary-nav a[aria-current="page"] { background: var(--forest); color: var(--white); }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 2px solid var(--forest); border-radius: 12px;
  background: transparent; cursor: pointer; position: relative;
}
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
  content: ""; position: absolute; left: 11px; right: 11px; height: 2.5px; background: var(--forest); border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-toggle .bars { top: 20px; }
.nav-toggle .bars::before { left: 0; right: 0; top: -7px; }
.nav-toggle .bars::after { left: 0; right: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-toggle { display: block; }
  .primary-nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    background: var(--cream); border-bottom: 1px solid rgba(23, 64, 47, .15);
    box-shadow: var(--shadow); max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .3s ease, visibility .3s;
  }
  .primary-nav.is-open { max-height: calc(100vh - var(--header-h)); overflow-y: auto; visibility: visible; }
  .primary-nav ul { flex-direction: column; padding: .75rem 1.25rem 1.25rem; gap: .1rem; }
  .primary-nav a { font-size: 1.05rem; padding: .8rem 1rem; border-radius: 12px; }
}
@media (max-width: 380px) { .brand-text small { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: min(88vh, 820px); display: flex; align-items: center;
  color: var(--white); background: var(--dark) url("../images/green-hearts-hero.jpg") center / cover no-repeat;
  isolation: isolate; overflow: hidden;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::before { /* dark overlay so text stays readable */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(16, 41, 31, .88) 0%, rgba(16, 41, 31, .62) 55%, rgba(16, 41, 31, .35) 100%),
              linear-gradient(0deg, rgba(16, 41, 31, .6), transparent 40%);
}
.hero-inner { padding: 5rem 0 6rem; }
.hero .eyebrow { color: var(--leaf); }
.hero h1 { color: var(--white); max-width: 16ch; text-wrap: balance; }
.hero h1 span { color: var(--leaf); }
.hero-text { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 56ch; color: #E8F0E3; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-motto {
  position: absolute; right: max(1.25rem, calc((100vw - 1180px) / 2)); bottom: 2rem;
  font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(255, 255, 255, .85);
}
.video-toggle {
  position: absolute; left: max(1.25rem, calc((100vw - 1180px) / 2)); bottom: 1.5rem;
  background: rgba(16, 41, 31, .6); color: var(--white); border: 1.5px solid rgba(255, 255, 255, .7);
  border-radius: 999px; padding: .4rem 1rem; font-size: .85rem; cursor: pointer;
}
.video-toggle:hover { background: var(--white); color: var(--forest); }
.video-toggle[hidden] { display: none; }
@media (max-width: 700px) { .hero-motto { display: none; } .hero-inner { padding: 4rem 0 6rem; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-head { max-width: 720px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--earth-text); margin-bottom: .75rem;
}
.lead { font-size: 1.15rem; color: #2A4A3B; }
.on-dark { color: var(--white); }
.on-dark h2, .on-dark h3 { color: var(--white); }
.on-dark .eyebrow { color: var(--leaf); }

/* Intro */
.intro-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.arch {
  border-radius: 999px 999px var(--radius) var(--radius); overflow: hidden; aspect-ratio: 4 / 5;
  box-shadow: var(--shadow); border: 8px solid var(--white); max-width: 440px; margin-inline: auto;
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.fact-row { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.75rem 0; }
.fact {
  background: var(--white); border-left: 5px solid var(--leaf); border-radius: 10px;
  padding: .8rem 1.1rem; min-width: 150px; box-shadow: 0 4px 14px rgba(16, 41, 31, .07);
}
.fact strong { display: block; font-family: var(--font-head); font-size: 1.35rem; color: var(--forest); }
.fact span { font-size: .85rem; color: #3b5a4a; }
.values { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; margin: 0 0 1.5rem; }
.values li { background: var(--forest); color: var(--white); font-size: .85rem; font-weight: 600; padding: .35rem .9rem; border-radius: 999px; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }

/* Work areas */
.work { background: var(--cream-deep); }
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.work-card {
  background: var(--white); border-radius: var(--radius); padding: 1.6rem 1.4rem; box-shadow: 0 6px 20px rgba(16, 41, 31, .07);
  border-top: 5px solid var(--leaf); transition: transform .25s ease, box-shadow .25s ease;
}
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-card:nth-child(even) { border-top-color: var(--earth); }
.icon-badge {
  width: 52px; height: 52px; border-radius: 50%; background: var(--forest); display: grid; place-items: center; margin-bottom: 1rem;
}
.icon-badge svg { width: 26px; height: 26px; stroke: var(--leaf); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.work-card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.work-card p { font-size: .95rem; margin: 0; color: #2F4D3E; }
.section-cta { margin-top: 2.25rem; text-align: center; }
@media (max-width: 1000px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .work-grid { grid-template-columns: 1fr; } }

/* Aberdare landscape */
.landscape {
  background-color: var(--forest);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320' fill='none' stroke='%238DB255' stroke-opacity='.13' stroke-width='1.2'%3E%3Cpath d='M-20 60c60-40 120 30 190-10s110-20 170 10'/%3E%3Cpath d='M-20 100c60-40 120 30 190-10s110-20 170 10'/%3E%3Cpath d='M-20 140c60-40 120 30 190-10s110-20 170 10'/%3E%3Cpath d='M-20 180c60-40 120 30 190-10s110-20 170 10'/%3E%3Cpath d='M-20 220c60-40 120 30 190-10s110-20 170 10'/%3E%3Cpath d='M-20 260c60-40 120 30 190-10s110-20 170 10'/%3E%3C/svg%3E");
}
.theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.theme {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(141, 178, 85, .35); border-radius: var(--radius); padding: 1.2rem 1.2rem 1.3rem;
}
.theme h3 { font-size: 1.1rem; color: var(--leaf); margin-bottom: .35rem; }
.theme p { margin: 0; font-size: .93rem; color: #DCE8D6; }
.context-note {
  border-left: 4px solid var(--leaf); padding: .25rem 0 .25rem 1rem; max-width: 760px; color: #DCE8D6; font-size: .95rem;
}
@media (max-width: 1000px) { .theme-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .theme-grid { grid-template-columns: 1fr; } }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
.project-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 20px rgba(16, 41, 31, .08);
  display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.project-media { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--moss), var(--forest)); position: relative; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; }
.placeholder-label { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .75); font-size: .9rem; }
.project-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.tag { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--earth-text); margin-bottom: .5rem; }
.project-body h3 { font-size: 1.2rem; }
.project-body p { font-size: .95rem; color: #2F4D3E; flex: 1; }
.text-link { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--leaf); align-self: flex-start; }
.text-link:hover { border-color: var(--forest); }

/* Impact */
.impact { background: var(--cream-deep); }
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.pillar { text-align: center; padding: 1.5rem 1rem; }
.pillar .icon-badge { margin-inline: auto; width: 64px; height: 64px; }
.pillar .icon-badge svg { width: 30px; height: 30px; }
.pillar p { font-size: .95rem; margin: 0; color: #2F4D3E; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-top: 2rem; }
.stat-grid:empty { display: none; }
.stat { background: var(--forest); color: var(--white); border-radius: var(--radius); padding: 1.4rem; text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: 2.4rem; color: var(--leaf); }
@media (max-width: 1000px) { .pillar-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .pillar-grid { grid-template-columns: 1fr; } }

/* Get involved */
.involve-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.involve-card {
  display: block; text-decoration: none; background: var(--white); color: var(--dark); border-radius: var(--radius);
  padding: 1.5rem 1.2rem; border-bottom: 5px solid var(--leaf); box-shadow: 0 6px 18px rgba(16, 41, 31, .07);
  transition: transform .25s ease, background .25s ease;
}
.involve-card:hover { transform: translateY(-4px); background: var(--forest); color: var(--white); }
.involve-card:hover h3 { color: var(--leaf); }
.involve-card h3 { font-size: 1.1rem; }
.involve-card p { font-size: .9rem; margin: 0; }
@media (max-width: 1100px) { .involve-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .involve-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .involve-grid { grid-template-columns: 1fr; } }

/* Gallery preview */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.gallery-item { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--moss), var(--forest)); }
.gallery-item:nth-child(1), .gallery-item:nth-child(6) { grid-column: span 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }

/* Downloads + Blog previews */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.panel { border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.75rem); }
.panel-downloads { background: var(--forest); color: var(--white); }
.panel-downloads h2 { color: var(--white); }
.panel-downloads .eyebrow { color: var(--leaf); }
.panel-blog { background: var(--white); border: 2px dashed rgba(23, 64, 47, .25); }
.blog-list { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.blog-list:empty { display: none; }
.blog-post a { font-weight: 700; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }

/* Contact CTA */
.cta { background: var(--dark); color: var(--white); position: relative; overflow: hidden; text-align: center; }
.cta::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; right: -140px; top: -140px;
  background: url("../images/logo.png") center / contain no-repeat; opacity: .07;
}
.cta .container { position: relative; }
.cta h2 { color: var(--white); max-width: 18ch; margin-inline: auto; }
.cta p { max-width: 55ch; margin-inline: auto; color: #DCE8D6; }
.contact-list { list-style: none; padding: 0; margin: 2rem 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 2.25rem; }
.contact-list a { color: var(--white); }
.contact-list a:hover { color: var(--leaf); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: #CFE0C9; border-top: 6px solid var(--leaf); padding: 3.5rem 0 1.5rem; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr; gap: 2rem; }
.site-footer h2, .site-footer h3 { color: var(--white); font-size: 1.05rem; margin-bottom: .8rem; }
.site-footer a { color: #CFE0C9; text-decoration: none; }
.site-footer a:hover { color: var(--leaf); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-brand { display: flex; gap: .85rem; align-items: center; margin-bottom: 1rem; }
.footer-brand strong { font-family: var(--font-head); font-size: 1.2rem; color: var(--white); }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Placeholder pages (built in later stages) ---------- */
.page-hero { background: var(--forest); color: var(--white); padding: 4.5rem 0 3.5rem; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 4.5vw, 3.2rem); }
.page-hero p { max-width: 60ch; color: #DCE8D6; margin: 0; }
.coming { max-width: 640px; background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }

/* ---------- Gentle scroll reveal (only when JavaScript is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================
   STAGE 2 additions (About Us, Our Work, Projects)
   Everything above this line is unchanged from Stage 1.
   ========================================================== */

/* Anchor links stop below the sticky header instead of hiding under it */
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- Inner-page hero (same photo and dark overlay as the homepage) ---------- */
.page-hero.has-image {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--dark) url("../images/green-hearts-hero.jpg") center / cover no-repeat;
  padding: clamp(4.5rem, 11vw, 7.5rem) 0 clamp(3rem, 6vw, 4.5rem);
}
.page-hero.has-image::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(16, 41, 31, .93) 0%, rgba(16, 41, 31, .74) 60%, rgba(16, 41, 31, .5) 100%);
}
.page-hero .eyebrow { color: var(--leaf); }
.page-hero .lead { color: #E8F0E3; max-width: 62ch; }
.breadcrumb { font-size: .85rem; margin: 0 0 1.25rem; color: #CFE0C9; }
.breadcrumb a { color: #CFE0C9; }
.breadcrumb a:hover { color: var(--leaf); }
.jump { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.75rem 0 0; }
.jump a {
  display: inline-block; padding: .4rem .95rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  text-decoration: none; color: var(--white); border: 1.5px solid rgba(255, 255, 255, .55);
}
.jump a:hover { background: var(--white); color: var(--forest); }

/* ---------- Shared text blocks ---------- */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.flip { grid-template-columns: 1.15fr 1fr; }
@media (max-width: 860px) { .split, .split.flip { grid-template-columns: 1fr; } }
.alt-bg { background: var(--cream-deep); }
.small-note { font-size: .9rem; color: #3b5a4a; }
.small-note.on-dark-note { color: #DCE8D6; }

/* ---------- About: timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.75rem; border-left: 3px solid var(--leaf); display: grid; gap: 2rem; max-width: 760px; }
.timeline li { position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-1.75rem - 11px); top: .35rem; width: 19px; height: 19px;
  border-radius: 50%; background: var(--cream); border: 4px solid var(--forest);
}
.alt-bg .timeline li::before { background: var(--cream-deep); }
.timeline .year { display: block; font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; color: var(--forest); line-height: 1.1; }
.timeline h3 { font-size: 1.15rem; margin: .15rem 0 .35rem; }
.timeline p { margin: 0; }

/* ---------- About: vision and mission ---------- */
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 860px) { .vm-grid { grid-template-columns: 1fr; } }
.vm-card { background: var(--forest); color: var(--white); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.75rem); border-top: 6px solid var(--leaf); }
.vm-card h2 { color: var(--leaf); font-size: clamp(1.6rem, 3vw, 2.1rem); }
.vm-card blockquote { margin: 0 0 1.25rem; font-family: var(--font-head); font-size: clamp(1.2rem, 2.4vw, 1.5rem); line-height: 1.4; }
.vm-card .extended { border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 1rem; font-size: .95rem; color: #DCE8D6; }
.vm-card .extended strong { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--leaf); margin-bottom: .3rem; }
.vm-card .extended p { margin: 0; }

/* ---------- About: values, approach, places, team ---------- */
.value-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.value-card { background: var(--white); border-radius: var(--radius); padding: 1.4rem 1rem; text-align: center; box-shadow: 0 6px 18px rgba(16, 41, 31, .07); border-bottom: 5px solid var(--leaf); }
.value-card .n { display: block; font-family: var(--font-head); font-size: 1.1rem; color: var(--earth-text); margin-bottom: .25rem; }
.value-card strong { font-family: var(--font-head); font-size: 1.25rem; color: var(--forest); }
@media (max-width: 1000px) { .value-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .value-grid { grid-template-columns: 1fr 1fr; } }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.info-card { background: var(--white); border-radius: var(--radius); padding: 1.6rem 1.4rem; box-shadow: 0 6px 20px rgba(16, 41, 31, .07); border-top: 5px solid var(--leaf); }
.info-card:nth-child(even) { border-top-color: var(--earth); }
.info-card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.info-card p { font-size: .95rem; margin: 0; color: #2F4D3E; }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

.place-list { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .75rem; }
.place-list li { background: var(--white); border-left: 5px solid var(--leaf); border-radius: 10px; padding: .8rem 1.1rem; box-shadow: 0 4px 14px rgba(16, 41, 31, .07); }
.place-list strong { display: block; font-family: var(--font-head); color: var(--forest); }
.place-list span { font-size: .92rem; color: #3b5a4a; }

.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); gap: 1.5rem; justify-content: center; }
@media (max-width: 640px) { .team-grid { grid-template-columns: 1fr; } }
.team-card { background: var(--white); border-radius: var(--radius); padding: 2rem 1.5rem; text-align: center; box-shadow: var(--shadow); }
.team-card h3 { margin-bottom: .15rem; }
.team-card .role { color: var(--earth-text); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; margin: 0; }
.avatar {
  width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 1.1rem; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--moss), var(--forest)); color: var(--white);
  font-family: var(--font-head); font-size: 2.2rem; border: 5px solid var(--cream-deep);
}

/* ---------- Our Work: legend and work areas ---------- */
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
@media (max-width: 760px) { .legend { grid-template-columns: 1fr; } }
.legend > div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); border-radius: 14px; padding: 1rem 1.2rem; font-size: .95rem; color: #E8F0E3; }
.legend p { margin: .5rem 0 0; }

.badge { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .75rem; border-radius: 999px; }
.badge-does { background: var(--leaf); color: var(--dark); }
.badge-context { background: var(--cream-deep); color: var(--earth-text); border: 1.5px dashed var(--earth); }

.work-areas { display: grid; gap: 1.75rem; }
.work-area { background: var(--white); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(16, 41, 31, .07); overflow: hidden; }
.work-area-head { display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; background: var(--forest); }
.work-area-head .num { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--leaf); color: var(--dark); font-weight: 800; }
.work-area-head h3 { margin: 0; color: var(--white); font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
.work-area-body { display: grid; grid-template-columns: 1.15fr 1fr; }
@media (max-width: 860px) { .work-area-body { grid-template-columns: 1fr; } }
.panel-does { padding: 1.5rem; border-right: 1px solid rgba(23, 64, 47, .1); }
.panel-context { padding: 1.5rem; background: #FAF8F1; }
@media (max-width: 860px) { .panel-does { border-right: 0; border-bottom: 1px solid rgba(23, 64, 47, .1); } }
.panel-does p, .panel-context p { margin: .75rem 0 0; font-size: .97rem; }
.panel-context p { color: #3A4F43; }
.ref { font-size: .75em; }

/* ---------- Aberdare context section ---------- */
.theme-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .theme-grid.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .theme-grid.three { grid-template-columns: 1fr; } }
.landscape a { color: var(--leaf); }
.landscape a:hover { color: var(--white); }
.landscape .lead { color: #DCE8D6; }
.callout { background: rgba(255, 255, 255, .08); border: 1px solid rgba(141, 178, 85, .45); border-left: 6px solid var(--leaf); border-radius: var(--radius); padding: 1.5rem 1.6rem; margin: 2rem 0; color: #E8F0E3; }
.callout h3 { color: var(--leaf); }
.callout p:last-child { margin-bottom: 0; }
.callout ul { margin: 0 0 1em; padding-left: 1.2rem; }
.callout li { margin-bottom: .4rem; }
.source-list { margin: 1rem 0 0; padding-left: 1.4rem; font-size: .93rem; color: #DCE8D6; }
.source-list li { margin-bottom: .4rem; overflow-wrap: anywhere; }

/* ---------- Projects ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.filter-btn {
  font: inherit; font-size: .9rem; font-weight: 700; padding: .5rem 1.1rem; min-height: 44px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--forest); border: 2px solid var(--forest);
}
.filter-btn:hover { background: rgba(141, 178, 85, .25); }
.filter-btn[aria-pressed="true"] { background: var(--forest); color: var(--white); }
.filter-status { font-size: .9rem; color: #3b5a4a; margin: 0 0 1.5rem; }
.project-card[hidden] { display: none; }
.project-card .tag { color: var(--earth-text); }
.project-body details { margin: 0 0 1rem; }
.project-body summary { cursor: pointer; font-weight: 700; color: var(--forest); padding: .35rem 0; min-height: 44px; display: flex; align-items: center; }
.project-body details p { font-size: .93rem; margin: .5rem 0 0; }
.project-body .card-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: auto; }

/* Clearly marked placeholder for photos that have not been added yet */
.photo-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  text-align: center; padding: 1rem; color: var(--white); font-size: .95rem; font-weight: 700;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 14px, rgba(255, 255, 255, .02) 14px 28px);
  border: 3px dashed rgba(255, 255, 255, .55); border-radius: inherit;
}
.photo-placeholder small { font-weight: 400; font-size: .78rem; opacity: .9; overflow-wrap: anywhere; }

.filter-bar:empty { display: none; }
.landscape a.btn-primary, .landscape a.btn-primary:hover { color: var(--dark); }
.landscape a.btn-primary:hover { background: #A0C566; }
.project-body summary { list-style: none; justify-content: space-between; }
.project-body summary::-webkit-details-marker { display: none; }
.project-body summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--moss); }
.project-body details[open] summary::after { content: "\2212"; }

.ref a + a::before { content: ", "; color: inherit; text-decoration: none; display: inline-block; }

/* ==========================================================
   STAGE 3 additions (Downloads, Blog, Gallery)
   Everything above this line is unchanged from Stage 2.
   ========================================================== */

.search-row { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin: 0 0 1rem; }
.search-input {
  font: inherit; min-height: 44px; padding: .5rem 1rem; border-radius: 999px; border: 2px solid var(--forest);
  background: var(--white); color: var(--dark); width: min(100%, 340px);
}
.search-input:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }

/* ---------- Downloads ---------- */
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.25rem; }
.doc-card {
  background: var(--white); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(16, 41, 31, .08);
  border-top: 5px solid var(--leaf); padding: 1.4rem; display: flex; flex-direction: column; gap: .35rem;
}
.doc-card[hidden] { display: none; }
.doc-card.is-soon { border-top-color: var(--earth); background: #FBF9F2; border-style: dashed; border-width: 2px; border-top-width: 5px; border-color: rgba(138, 106, 69, .5); }
.doc-top { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .35rem; }
.doc-icon { flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--forest); display: grid; place-items: center; }
.doc-icon svg { width: 24px; height: 24px; stroke: var(--leaf); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.is-soon .doc-icon { background: var(--cream-deep); border: 2px dashed var(--earth); }
.is-soon .doc-icon svg { stroke: var(--earth-text); }
.doc-card h3 { font-size: 1.15rem; margin: 0; }
.doc-card p { font-size: .95rem; color: #2F4D3E; margin: 0 0 .5rem; flex: 1; }
.doc-meta { font-size: .82rem; color: #3b5a4a; margin: 0 0 .9rem; }
.badge-soon { background: var(--cream-deep); color: var(--earth-text); border: 1.5px dashed var(--earth); }
.badge-cat { background: rgba(141, 178, 85, .3); color: var(--forest); }
.btn[aria-disabled="true"], .btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; background: transparent; color: var(--earth-text); border: 2px dashed var(--earth); }
.doc-empty { background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); max-width: 680px; }
.doc-empty[hidden] { display: none; }
.doc-note { font-size: .9rem; color: #7a3b1d; margin: 0 0 .75rem; font-weight: 600; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.5rem; }
.blog-card { background: var(--white); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(16, 41, 31, .08); overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.blog-card[hidden] { display: none; }
.blog-card .project-media { display: block; }
.blog-card .project-body h3 { font-size: 1.2rem; }
.blog-card .project-body h3 a { text-decoration: none; color: var(--forest); }
.blog-card .project-body h3 a:hover { color: var(--moss); text-decoration: underline; }
.post-meta { font-size: .82rem; color: #3b5a4a; margin: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .25rem .9rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; }
.tag-list li { font-size: .75rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; background: var(--cream-deep); color: var(--earth-text); }

.article { max-width: 780px; margin-inline: auto; }
.article-head { padding: clamp(2rem, 5vw, 3.5rem) 0 1.5rem; }
.article-head .breadcrumb { color: #3b5a4a; }
.article-head .breadcrumb a { color: var(--forest); }
.article-head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); margin: .75rem 0 .75rem; text-wrap: balance; }
.article-figure { margin: 0 0 2rem; border-radius: var(--radius); overflow: hidden; background: var(--forest); }
.article-figure img { width: 100%; height: auto; max-height: 460px; object-fit: cover; }
.article-excerpt { font-size: 1.2rem; color: #2A4A3B; font-family: var(--font-head); line-height: 1.5; }
.prose { font-size: 1.08rem; }
.prose h2 { font-size: clamp(1.4rem, 2.8vw, 1.8rem); margin: 2rem 0 .6rem; }
.prose ul { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45rem; }
.prose blockquote { margin: 1.5rem 0; padding: .5rem 0 .5rem 1.25rem; border-left: 5px solid var(--leaf); font-family: var(--font-head); font-size: 1.25rem; }
.cite { font-size: .75em; line-height: 0; }
.cite a { padding: 0 .1em; }
.gh-note { background: var(--white); border: 1px solid rgba(23, 64, 47, .15); border-left: 6px solid var(--leaf); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin: 2.25rem 0; }
.gh-note p { margin: .6rem 0; }
.gh-note ul { margin: .5rem 0 0; padding-left: 1.2rem; }
.article-sources { margin: 2rem 0; padding-top: 1.25rem; border-top: 1px solid rgba(23, 64, 47, .2); font-size: .95rem; }
.article-sources h2 { font-size: 1.2rem; }
.article-sources ol { padding-left: 1.3rem; }
.article-sources li { margin-bottom: .45rem; overflow-wrap: anywhere; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2.5rem 0 4rem; }
.post-nav a { display: block; padding: 1rem 1.2rem; background: var(--white); border-radius: 14px; box-shadow: 0 4px 14px rgba(16, 41, 31, .08); text-decoration: none; font-weight: 700; }
.post-nav a small { display: block; font-weight: 600; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--earth-text); }
.post-nav .next { text-align: right; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { text-align: left; } }
.empty-note { background: var(--white); border-radius: var(--radius); padding: 2rem; max-width: 680px; box-shadow: var(--shadow); }

/* ---------- Gallery ---------- */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.gal-item { margin: 0; position: relative; }
.gal-item[hidden] { display: none; }
.gal-btn {
  display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--moss), var(--forest)); position: relative; font: inherit;
}
.gal-btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gal-btn:hover img { transform: scale(1.05); }
.gal-btn .gal-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem .9rem .75rem; text-align: left; color: var(--white);
  font-weight: 700; font-size: .95rem; background: linear-gradient(to top, rgba(16, 41, 31, .85), transparent);
}
.gal-ph { cursor: default; }
.gal-ph .photo-placeholder { border-radius: var(--radius); }

.lb { position: fixed; inset: 0; z-index: 300; background: rgba(8, 20, 15, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 1rem 1rem; }
.lb[hidden] { display: none; }
.lb-stage { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lb-stage img { max-width: min(100%, 1100px); max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.lb-info { color: #E8F0E3; text-align: center; max-width: 760px; padding: .9rem .5rem .25rem; font-size: .98rem; }
.lb-info strong { display: block; font-family: var(--font-head); font-size: 1.25rem; color: var(--white); }
.lb-info p { margin: .25rem 0 0; }
.lb-info small { color: #B8CDB0; }
.lb-count { position: absolute; top: 1rem; left: 1rem; color: #CFE0C9; font-size: .9rem; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6);
  background: rgba(16, 41, 31, .75); color: var(--white); font-size: 1.6rem; line-height: 1; cursor: pointer; display: grid; place-items: center; font-family: inherit;
}
.lb-btn:hover { background: var(--white); color: var(--forest); }
.lb-close { top: .75rem; right: .75rem; }
.lb-prev { left: .5rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: 7.5rem; transform: none; }
  .lb-prev { left: .75rem; } .lb-next { right: .75rem; }
}
body.lb-open { overflow: hidden; }


/* ==========================================================
   STAGE 3 additions (Downloads, Blog, Gallery)
   Everything above this line is unchanged from Stage 2.
   ========================================================== */

button.btn { font: inherit; font-weight: 700; }
.btn[disabled] { opacity: 1; background: #E6E0CC; color: #4A4636; cursor: not-allowed; transform: none; border-color: transparent; }
.btn[disabled]:hover { background: #E6E0CC; color: #4A4636; transform: none; }
.page-note { max-width: 62ch; }

/* ---------- Downloads ---------- */
.doc-toolbar { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-end; justify-content: space-between; margin: 0 0 1rem; }
.doc-toolbar .filter-bar { margin: 0; flex: 1 1 360px; }
.search-field { display: flex; flex-direction: column; gap: .25rem; flex: 0 1 300px; min-width: min(100%, 240px); }
.search-field label { font-size: .85rem; font-weight: 700; color: var(--forest); }
.search-field input {
  font: inherit; padding: .6rem 1.1rem; min-height: 44px; border: 2px solid var(--forest); border-radius: 999px;
  background: var(--white); color: var(--dark);
}
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.doc-card {
  background: var(--white); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(16, 41, 31, .08);
  padding: 1.4rem; display: flex; flex-direction: column; gap: .65rem; border-top: 5px solid var(--leaf);
}
.doc-card[hidden] { display: none; }
.doc-card.is-soon { background: #FAF8F1; box-shadow: none; border: 2px dashed rgba(107, 80, 51, .45); }
.doc-head { display: flex; gap: .9rem; align-items: flex-start; }
.doc-icon { flex: none; width: 44px; height: 52px; }
.doc-icon svg { width: 100%; height: 100%; }
.doc-card h3 { font-size: 1.15rem; margin: .1rem 0 0; }
.doc-card p { margin: 0; font-size: .95rem; color: #2F4D3E; }
.doc-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .85rem; color: #3b5a4a; }
.doc-actions { margin-top: auto; padding-top: .6rem; }
.doc-card .tag { color: var(--earth-text); margin-bottom: .2rem; }
.doc-empty { max-width: 640px; background: var(--white); border: 2px dashed rgba(23, 64, 47, .3); border-radius: var(--radius); padding: 2rem; }
.doc-empty h2 { font-size: 1.6rem; }
.doc-summary { margin: 0 0 1.5rem; font-size: .95rem; color: #3b5a4a; }
.doc-note { margin: 2.5rem 0 0; padding: 1rem 1.25rem; background: var(--cream-deep); border-radius: 14px; font-size: .95rem; }

/* ---------- Blog ---------- */
.blog-card .project-media { display: block; }
.blog-card .project-media img { transition: transform .5s ease; }
.blog-card:hover .project-media img { transform: scale(1.04); }
.blog-card h3 a { text-decoration: none; color: var(--forest); }
.blog-card h3 a:hover { color: var(--moss); text-decoration: underline; }
.meta-line { font-size: .85rem; color: #3b5a4a; margin: 0 0 .6rem; }
.empty-state { background: var(--white); border: 2px dashed rgba(23, 64, 47, .3); border-radius: var(--radius); padding: 1.75rem; max-width: 640px; }

.article { max-width: 780px; margin-inline: auto; }
.article h1 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); margin-bottom: .5rem; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-size: .9rem; color: #3b5a4a; margin: 1rem 0 1.5rem; }
.article-figure { margin: 0 0 1.75rem; border-radius: var(--radius); overflow: hidden; background: var(--forest); box-shadow: var(--shadow); }
.article-figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.article-lead { font-size: 1.2rem; color: #2A4A3B; margin-bottom: 1.5rem; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.5rem; margin: 2.1rem 0 .6rem; }
.prose ul { padding-left: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45rem; }
.prose blockquote { border-left: 5px solid var(--leaf); margin: 1.5rem 0; padding: .4rem 1.2rem; font-family: var(--font-head); font-size: 1.25rem; }
.gh-box { background: var(--white); border-left: 6px solid var(--leaf); border-radius: var(--radius); padding: 1.4rem 1.5rem; margin: 2.5rem 0 2rem; box-shadow: 0 6px 20px rgba(16, 41, 31, .08); }
.gh-box h2 { font-size: 1.25rem; margin: .75rem 0 .5rem; }
.gh-box p { margin: 0 0 .5rem; }
.gh-box ul { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; }
.article .source-list { color: var(--dark); font-size: .95rem; }
.article h2.small-h { font-size: 1.2rem; margin-top: 2rem; }
.tag-list { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.tag-chip { display: inline-block; background: var(--cream-deep); color: var(--earth-text); border-radius: 999px; padding: .25rem .8rem; font-size: .82rem; font-weight: 700; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.5rem; }
.post-nav a { display: block; padding: 1rem 1.2rem; background: var(--white); border-radius: 14px; text-decoration: none; box-shadow: 0 4px 14px rgba(16, 41, 31, .08); font-family: var(--font-head); font-weight: 700; }
.post-nav a:hover { background: var(--forest); color: var(--white); }
.post-nav a:hover small { color: var(--leaf); }
.post-nav small { display: block; font-family: var(--font-body); color: #3b5a4a; text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 800; margin-bottom: .2rem; }
.post-nav .next { text-align: right; grid-column: 2; }
@media (max-width: 600px) { .post-nav { grid-template-columns: 1fr; } .post-nav .next { grid-column: 1; text-align: left; } }

/* ---------- Gallery ---------- */
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.gal-grid li[hidden] { display: none; }
.gal-item {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--moss), var(--forest)); cursor: zoom-in; aspect-ratio: 4 / 3; font: inherit; text-align: left;
}
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gal-item:hover img { transform: scale(1.05); }
.gal-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem .95rem .75rem; color: var(--white); font-weight: 700; font-size: .93rem;
  background: linear-gradient(to top, rgba(16, 41, 31, .9), transparent); pointer-events: none;
}
.gal-item.is-placeholder { cursor: default; }
.gal-item.is-placeholder .photo-placeholder { position: absolute; }

.lb {
  position: fixed; inset: 0; z-index: 300; background: rgba(10, 24, 18, .95); display: flex; align-items: center; justify-content: center;
  padding: 4rem 1rem 1.25rem; touch-action: pan-y;
}
.lb[hidden] { display: none; }
.lb figure { margin: 0; max-width: min(1000px, 100%); display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.lb img { max-height: 66vh; max-width: 100%; width: auto; border-radius: 10px; object-fit: contain; background: #0d1f17; }
.lb figcaption { color: #E8F0E3; text-align: center; max-width: 62ch; font-size: .95rem; }
.lb-title { display: block; font-family: var(--font-head); font-size: 1.3rem; color: var(--white); margin-bottom: .2rem; }
.lb-sub { display: block; font-size: .82rem; color: #BFD3B8; margin-top: .3rem; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .65);
  background: rgba(16, 41, 31, .8); color: var(--white); font-size: 1.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0;
}
.lb-btn:hover { background: var(--leaf); color: var(--dark); }
.lb-btn[hidden] { display: none; }
.lb-close { top: .85rem; right: .85rem; }
.lb-prev { left: .85rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .85rem; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 1.35rem; left: 1.1rem; color: #CFE0C9; font-size: .9rem; }
@media (max-width: 640px) {
  .lb { padding-bottom: 5rem; }
  .lb-prev, .lb-next { top: auto; bottom: .9rem; transform: none; }
  .lb-prev { left: 28%; } .lb-next { right: 28%; }
  .lb img { max-height: 55vh; }
}
body.lb-open { overflow: hidden; }

.article .breadcrumb a { color: var(--forest); }
.article .breadcrumb a:hover { color: var(--moss); }


/* ==========================================================
   STAGE 4 additions (Get Involved, Contact, footer, accessibility)
   Everything above this line is unchanged from Stage 3.
   ========================================================== */

/* ---------- Get Involved ---------- */
.way-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); gap: 1.5rem; }
.way-card {
  background: var(--white); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(16, 41, 31, .08);
  padding: 1.6rem; border-top: 5px solid var(--leaf); display: flex; flex-direction: column; gap: .75rem;
}
.way-card:nth-child(even) { border-top-color: var(--earth); }
.way-card h3 { margin: 0; font-size: 1.35rem; }
.way-card p { margin: 0; font-size: .97rem; }
.way-card .documented { font-size: .9rem; background: var(--cream-deep); border-radius: 12px; padding: .75rem .95rem; color: #2F4D3E; }
.way-actions { margin-top: auto; padding-top: .5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-cards { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: 1rem; }
.contact-cards > li { background: var(--white); border-left: 5px solid var(--leaf); border-radius: 12px; padding: 1rem 1.25rem; box-shadow: 0 4px 14px rgba(16, 41, 31, .07); }
.contact-cards h3 { font-size: 1rem; margin: 0 0 .3rem; color: var(--earth-text); font-family: var(--font-body); letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; font-weight: 800; }
.contact-cards ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.contact-cards a, .contact-cards li li { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.contact-cards a { display: inline-block; padding: .2rem 0; }
.plain-address { font-style: normal; font-size: 1.05rem; font-weight: 600; }
.where-box { background: var(--cream-deep); border-radius: var(--radius); padding: 1.25rem 1.4rem; }
.where-box h3 { font-size: 1.2rem; }
.where-box p:last-child { margin-bottom: 0; }

.form-panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 2.5rem); border-top: 6px solid var(--leaf); }
.form-panel h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.form .field { margin-bottom: 1.25rem; }
.form label { display: block; font-weight: 700; color: var(--forest); margin-bottom: .35rem; }
.form .req { font-weight: 400; font-size: .85rem; color: #3b5a4a; }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%; font: inherit; color: var(--dark); background: var(--white);
  padding: .75rem 1rem; min-height: 48px; border: 2px solid #4A6B59; border-radius: 12px;
}
.form textarea { resize: vertical; min-height: 160px; }
.form input[aria-invalid="true"], .form textarea[aria-invalid="true"] { border-color: #9B2C1F; background: #FFF8F7; }
.field-error { color: #9B2C1F; font-weight: 700; font-size: .92rem; margin: .4rem 0 0; }
.field-error[hidden] { display: none; }
.char-count { font-size: .85rem; color: #3b5a4a; text-align: right; margin: .25rem 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { border-radius: 14px; padding: 1rem 1.2rem; margin: 0 0 1.25rem; font-size: .96rem; }
.alert[hidden] { display: none; }
.alert a { font-weight: 700; }
.alert-error { background: #FDECEA; border: 2px solid #9B2C1F; color: #5F1A12; }
.alert-error a { color: #5F1A12; }
.alert-info { background: #EAF3E3; border: 2px solid var(--moss); color: var(--dark); }
.alert-success { background: #E4F3E8; border: 2px solid #2E7D4A; color: var(--dark); }
#form-status { margin-top: 1.25rem; }
#form-status:empty { margin: 0; }
.form button[disabled] { opacity: .7; cursor: progress; }

/* ---------- Footer ---------- */
.footer-address { font-style: normal; }
.site-footer a { text-underline-offset: 3px; }

/* ---------- Accessibility ---------- */
/* Focus ring that shows on both light and dark backgrounds */
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; box-shadow: 0 0 0 5px rgba(16, 41, 31, .85); }
.site-footer :focus-visible, .cta :focus-visible, .page-hero :focus-visible, .landscape :focus-visible, .lb :focus-visible { box-shadow: 0 0 0 5px rgba(16, 41, 31, .85), 0 0 0 7px rgba(255, 255, 255, .9); }

.map-frame { margin: 1rem 0; border-radius: 14px; overflow: hidden; border: 2px solid rgba(23, 64, 47, .25); background: var(--cream); aspect-ratio: 4 / 3; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

/* ---- Impact: grouped numbers, award and proof photos ---- */
#impact-stats.stat-grid { display: block; }
.stat-group + .stat-group { margin-top: 2.2rem; }
.stat-group h3 { margin: 0 0 .25rem; }
.stat-note { margin: 0 0 .25rem; color: var(--earth-text); }
.stat-group .stat-grid { margin-top: .9rem; }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 1.75rem; }
.proof-fig { margin: 0; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 6px 20px rgba(16, 41, 31, .08); }
.proof-fig .project-media { border-radius: 0; }
.proof-fig figcaption { padding: .9rem 1.1rem 1.1rem; font-size: .95rem; }
.proof-fig figcaption strong { display: block; color: var(--forest); font-family: var(--font-head); font-size: 1.05rem; }

/* ---- Impact: list of the 6 schools ---- */
.school-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.school-item { display: flex; align-items: center; gap: .9rem; background: var(--white); border-radius: var(--radius); padding: 1rem 1.2rem; box-shadow: 0 6px 20px rgba(16, 41, 31, .08); }
.school-n { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--forest); color: var(--white); font-family: var(--font-head); font-weight: 700; }
.school-name { font-weight: 600; color: var(--forest); }
.school-item.is-todo { border: 2px dashed var(--earth); box-shadow: none; background: transparent; }
.school-item.is-todo .school-name { font-weight: 400; color: var(--earth-text); font-style: italic; }

/* ---- team photo sits over the initials; if the file is missing, JS removes it and the initials show ---- */
.avatar { position: relative; }
.avatar img { position: absolute; inset: 0; }
.team-card .bio { margin: .9rem 0 0; font-size: .95rem; }


/* ==========================================================
   Final polish: glow, footer icons, one-line brand name
   Every glow uses var(--glow) = #B1CB6B (set at the top).
   ========================================================== */
.brand { min-width: 0; }
.btn { transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease; }
.btn:hover, .btn:focus-visible { box-shadow: 0 0 0 3px rgba(177, 203, 107, .35), 0 0 18px 4px var(--glow); }
.btn[disabled]:hover, .btn[aria-disabled="true"]:hover { box-shadow: none; }
.btn-donate { background: var(--white); color: var(--forest); }
.btn-donate:hover { background: var(--glow); color: var(--dark); }

.site-footer a { transition: color .25s ease, text-shadow .25s ease; }
.site-footer a:hover { color: var(--glow); text-shadow: 0 0 10px var(--glow); }

.contact-list li { display: flex; align-items: flex-start; gap: .65rem; }
.contact-list li.no-icon { padding-left: 2.1rem; }
.contact-list .ci { flex: none; width: 1.5rem; height: 1.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(177, 203, 107, .16); color: var(--glow); margin-top: .05rem; }
.contact-list .ci svg { width: .9rem; height: .9rem; fill: currentColor; }

.social-list { display: flex !important; flex-wrap: wrap; gap: .5rem !important; }
.social-icon {
  width: 2.3rem; height: 2.3rem; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1.5px solid rgba(177, 203, 107, .55); color: var(--glow);
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.social-icon svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.site-footer a.social-icon:hover, .site-footer a.social-icon:focus-visible {
  transform: translateY(-4px); background: var(--glow); color: var(--dark); border-color: var(--glow);
  box-shadow: 0 0 16px 3px var(--glow); text-decoration: none; text-shadow: none;
}

@media (max-width: 480px) { .brand-text { font-size: 1rem; } .brand { gap: .5rem; } }
@media (max-width: 360px) { .brand-text { font-size: .86rem; } .brand img { width: 44px; height: 44px; } }
@media (max-width: 320px) { .brand-text { font-size: .78rem; } }
@media (prefers-reduced-motion: reduce) { .btn, .social-icon { transition: none; } .social-icon:hover { transform: none; } }
