/* Funding Matters | site stylesheet */

:root {
  --ink: #1d2620;
  --lead: #59625b;
  --moss: #79a12f;          /* logo green: marks, rules, accents */
  --moss-deep: #46661a;     /* accessible green for links and buttons */
  --moss-wash: #eef3e4;
  --limestone: #edeee8;
  --paper: #ffffff;
  --rule: #d6d9cf;

  --font-display: "Marcellus", "Trajan Pro", Georgia, "Times New Roman", serif;
  --font-body: "Libre Franklin", "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 68ch;
  --wrap: 1160px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--moss-deep); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* ---------- Header and navigation ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center;
  gap: 1.5rem; min-height: 84px;
}
.brand { flex: none; display: block; }
.brand img { width: 118px; }
.site-nav { margin-left: auto; }

.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: clamp(1rem, 2.2vw, 2rem);
}
.nav-list a {
  display: inline-block;
  padding: 0.4rem 0;
  font-size: 0.95rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav-list a:hover { color: var(--moss-deep); }
.nav-list a[aria-current="page"] { border-bottom-color: var(--moss); color: var(--moss-deep); }

.page-head .btn-banner {
  flex: none;
  padding: 0.5rem 1.1rem; font-size: 0.92rem;
  background: #fff; color: var(--moss-deep); border-color: #fff;
}
.page-head .btn-banner:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--rule); border-radius: 4px;
  padding: 0.55rem 0.8rem; font: inherit; font-size: 0.95rem; color: var(--ink); cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.5rem; margin-left: auto; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    display: none; margin: 0;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 0; padding: 0.5rem var(--gutter) 1rem; }
  .nav-list a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
  .nav-list a[aria-current="page"] { border-bottom-color: var(--rule); box-shadow: inset 3px 0 0 var(--moss); padding-left: 0.8rem; }
}

/* ---------- Page heading band ---------- */

.page-head {
  background: var(--moss-deep);
  padding: clamp(1.5rem, 3.5vw, 2.25rem) 0;
  position: relative; overflow: hidden;
}
.page-head .wrap {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 1.25rem 2rem;
}
.page-head h1 {
  margin: 0 0 0.35em; color: #fff;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}
.page-head .lede {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.5;
  max-width: 42ch;
  color: #e6eedb;
  margin: 0;
  width: 52ch; max-width: 100%;
  min-height: 3em;          /* reserve two lines so every banner matches */
}
@media (max-width: 600px) {
  .page-head .lede { min-height: 4.5em; }   /* three lines on phones */
}
.page-head :focus-visible { outline-color: #fff; }

/* ---------- Generic sections ---------- */

.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--limestone); }
.prose { max-width: var(--measure); }
.prose p:last-child { margin-bottom: 0; }

/* Pointed arch window used to frame images */
.arch {
  border-radius: 50% 50% 4px 4px / 34% 34% 4px 4px;
  overflow: hidden;
  background: var(--moss-wash);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

/* Buttons */
.btn {
  display: inline-block;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.6rem;
  background: var(--moss-deep); color: #fff;
  border: 2px solid var(--moss-deep); border-radius: 3px;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-quiet { background: transparent; color: var(--moss-deep); }
.btn-quiet:hover { background: var(--moss-deep); color: #fff; border-color: var(--moss-deep); }

/* ---------- Services ---------- */

.services { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.service {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(160px, 1fr) 2fr;
  gap: 1rem 2.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--rule);
}
.service h3 { margin: 0; }
.service .k {
  display: block; font-size: 0.85rem; font-weight: 600;
  color: var(--moss-deep); margin-bottom: 0.3rem;
}
.service p { margin: 0; }
.service .ideal { color: var(--lead); }

@media (max-width: 820px) {
  .service { grid-template-columns: 1fr; gap: 0.8rem; }
}

.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.cta-band h2 { margin: 0; max-width: 24ch; }

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.portrait {
  aspect-ratio: 3 / 4;
  display: grid; place-items: center;
  color: var(--moss-deep); font-size: 0.95rem; text-align: center; padding: 2rem;
  border: 1px solid var(--moss);
}
.portrait-photo { aspect-ratio: 960 / 990; }
.about-grid .lead-para { font-size: 1.25rem; line-height: 1.55; }
.credentials {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule);
  color: var(--lead);
}
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait, .portrait-photo { max-width: 280px; }
}

.docs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.doc-link {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.4rem;
  background: var(--paper); border: 1px solid var(--rule); border-left: 4px solid var(--moss);
  text-decoration: none; color: var(--ink);
}
.doc-link:hover { border-color: var(--moss-deep); border-left-color: var(--moss-deep); color: var(--ink); }
.doc-link svg { flex: none; width: 34px; height: 40px; color: var(--moss-deep); }
.doc-link strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; }
.doc-link span { font-size: 0.9rem; color: var(--lead); }

/* ---------- Testimonials ---------- */

.quotes { display: grid; gap: 0; }
.quote {
  margin: 0;
  display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 44rem);
  gap: 1rem clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 4vw, 2.75rem) 0;
  border-top: 1px solid var(--rule);
}
.quote:first-child { border-top: 0; padding-top: 0; }
.quote figcaption {
  font-family: var(--font-display); font-size: 1.3rem; line-height: 1.25;
}
.quote figcaption span {
  display: block; margin-top: 0.15rem;
}
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: 1.125rem; line-height: 1.7; }
.quote blockquote p:last-child { margin-bottom: 0; }
@media (max-width: 700px) {
  .quote { grid-template-columns: 1fr; }
}

/* ---------- Case studies ---------- */

.jump { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.jump a { font-weight: 500; }

.study {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  scroll-margin-top: 110px;
}
.study + .study { margin-top: clamp(4rem, 9vw, 7rem); padding-top: clamp(4rem, 9vw, 7rem); border-top: 1px solid var(--rule); }
.study .arch { aspect-ratio: 3 / 4; position: sticky; top: 120px; }
.study:nth-of-type(even) { grid-template-columns: 1fr minmax(220px, 360px); }
.study:nth-of-type(even) .arch { order: 2; }
.study-meta { color: var(--lead); margin: -0.2rem 0 2rem; font-size: 1.05rem; }
.stage { max-width: var(--measure); margin-bottom: 1.75rem; }
.stage h3 { font-size: 1.15rem; color: var(--moss-deep); margin-bottom: 0.35rem; }
.stage p:last-child { margin-bottom: 0; }

@media (max-width: 820px) {
  .study, .study:nth-of-type(even) { grid-template-columns: 1fr; }
  .study:nth-of-type(even) .arch { order: 0; }
  .study .arch { position: static; max-width: 320px; }
}

/* ---------- Clients ---------- */

.capital { list-style: none; margin: 0; padding: 0; max-width: 46rem; }
.capital li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--rule);
  font-size: 1.1rem;
}
.capital .amt {
  order: 2;
  font-family: var(--font-display); font-size: 1.45rem; color: var(--moss-deep);
  white-space: nowrap; font-variant-numeric: lining-nums;
}

.client-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 3rem; }
.client-groups ul { list-style: none; margin: 0; padding: 0; }
.client-groups li { padding: 0.55rem 0 0.55rem 1.1rem; border-bottom: 1px solid var(--rule); position: relative; }
.client-groups li::before {
  content: ""; position: absolute; left: 0; top: 1.15em;
  width: 6px; height: 6px; background: var(--moss); transform: rotate(45deg);
}

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-lines { list-style: none; padding: 0; margin: 2rem 0 0; }
.contact-lines li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.contact-lines .k { display: block; font-size: 0.85rem; font-weight: 600; color: var(--lead); }
.contact-lines a, .contact-lines .v { font-family: var(--font-display); font-size: 1.4rem; text-decoration: none; color: var(--ink); overflow-wrap: anywhere; }
.contact-lines a:hover { color: var(--moss-deep); text-decoration: underline; }

.form { background: var(--limestone); padding: clamp(1.5rem, 4vw, 2.5rem); border-top: 4px solid var(--moss); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 560px) { .form .row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.25rem; }
.field label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; }
.field .req { font-weight: 400; color: var(--lead); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  padding: 0.75rem 0.85rem;
  background: var(--paper); border: 1px solid #b9bdb2; border-radius: 3px;
}
.field input:focus, .field textarea:focus { outline: 3px solid var(--moss); outline-offset: 0; border-color: var(--moss-deep); }
.field textarea { min-height: 150px; resize: vertical; }
.field .error { display: none; color: #9b2c1f; font-size: 0.9rem; margin-top: 0.3rem; }
.field.invalid input { border-color: #9b2c1f; }
.field.invalid .error { display: block; }
.form-status { margin: 1rem 0 0; font-weight: 500; }

/* ---------- Footer ---------- */

.site-footer { background: var(--moss-deep); color: #edf3e3; padding: 3.5rem 0 2.5rem; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #dbe9c2; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; }
.footer-grid h2 { font-size: 1.3rem; color: #fff; margin-bottom: 0.8rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.4rem; }
.footer-base { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.25); color: #dbe5cf; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

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


.jump-top { margin: 0 0 clamp(2.5rem, 6vw, 4rem); padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }

.footer-company { font-size: 0.875rem; color: #dbe5cf; }

.footer-logos {
  display: grid; grid-template-columns: repeat(2, minmax(0, 120px));
  gap: 0.75rem;
}
.logo-slot {
  display: flex; align-items: center; justify-content: center;
  height: 64px; padding: 0.5rem;
  background: #fff; border-radius: 3px;
  color: var(--lead); font-size: 0.8rem;
}
.logo-slot:not(:has(img)) { background: rgba(255,255,255,0.08); border: 1px dashed rgba(255,255,255,0.5); color: #dbe5cf; }
.logo-slot img { max-width: 100%; max-height: 100%; object-fit: contain; }

.footer-grid .footer-subhead { margin-top: 1.75rem; }
.footer-company strong { font-weight: 600; color: #fff; }
.logo-slot--wide { grid-column: span 2; height: 96px; max-width: 252px; padding: 0.75rem 1rem; }
a.logo-slot { text-decoration: none; transition: box-shadow 0.15s; }
a.logo-slot:hover { box-shadow: 0 0 0 3px #dbe9c2; }

.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }
.form-note { font-size: 0.875rem; color: var(--lead); margin: 0 0 1.25rem; }
.form-status.is-success { color: var(--moss-deep); padding: 0.75rem 1rem; background: #fff; border-left: 4px solid var(--moss); }
.form-status.is-error { color: #9b2c1f; }
.form .btn[disabled] { opacity: 0.7; cursor: wait; }
