/* Ecoimpacts — styles
   Palette drawn from the logo: forest greens, teal, earth/gold.
   Design intent: understated, clean, content first. Formatting subordinate to substance. */

:root {
  --green-deep: #1f5135;
  --green: #2e7d4f;
  --teal: #1b6f7a;
  --earth: #8a6d3b;
  --ink: #21302a;
  --muted: #5b6b63;
  --line: #e3e8e4;
  --bg: #ffffff;
  --bg-soft: #f6f8f6;
  --bg-deep: #14271d;
  --maxw: 1600px;
  --pad: clamp(1.2rem, 4vw, 3rem);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 140px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; color: var(--muted); margin: 0 0 .8rem; }
h3 { font-size: 1.15rem; margin: 0 0 .35rem; }
p { margin: 0 0 1rem; }
a { color: var(--green-deep); }

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

/* Header / nav */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .6rem var(--pad); max-width: var(--maxw); margin: 0 auto;
}
.nav__logo { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.nav__logo img { height: 112px; width: auto; display: block; }
.nav__wordmark {
  display: flex; flex-direction: column; line-height: 1;
  font-weight: 800; font-size: 3.1rem; letter-spacing: .01em; color: var(--green-deep);
}
.nav__wordmark small {
  font-size: .72rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--earth); margin-top: .35rem;
}
@media (max-width: 560px) {
  .nav__logo img { height: 60px; }
  .nav__wordmark { font-size: 1.7rem; }
  .nav__wordmark small { font-size: .58rem; letter-spacing: .2em; }
}
.nav__links { display: flex; gap: 1.4rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 600;
  padding: .3rem 0; border-bottom: 2px solid transparent;
}
.nav__links a:hover { color: var(--green-deep); border-bottom-color: var(--green); }
.nav__toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--ink); cursor: pointer; }
.nav__links .lang { display: flex; gap: .45rem; align-items: center; }
.nav__links .lang span { color: var(--line); }
.nav__links .lang a { padding: 0; border-bottom: 0; }
.nav__links .lang a[aria-current="page"] { color: var(--green-deep); border-bottom: 2px solid var(--green); }

/* Sections */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
/* keep running prose to a readable line length even on a wide layout */
section p { max-width: 74ch; }

/* centred single-column sections */
#cotswolds .wrap, #contact .wrap { text-align: center; }
#cotswolds p, #contact .lead { margin-left: auto; margin-right: auto; }
#contact .contact-list { display: inline-block; text-align: left; }
#contact .btns { justify-content: center; }
section:nth-of-type(even) { background: var(--bg-soft); }
.eyebrow { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: .005em; color: var(--green-deep); margin: 0 0 .25rem; line-height: 1.15; }
.lead { font-size: 1.0625rem; color: var(--muted); max-width: 70ch; }

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(20,39,29,.72), rgba(20,39,29,.78)),
    var(--hero-img, linear-gradient(135deg, var(--green-deep), var(--teal)));
  background-size: cover; background-position: center;
  color: #fff; padding: clamp(4rem, 10vw, 7rem) 0;
}
.hero .wrap { text-align: center; }
.hero h1 { color: #fff; max-width: 20ch; margin-left: auto; margin-right: auto; }
.hero .tagline { text-transform: uppercase; letter-spacing: .2em; font-size: .85rem; color: #cfe6d6; margin: 0 0 1.2rem; }
.hero p { color: #eef4ef; max-width: 60ch; font-size: 1.0625rem; margin-left: auto; margin-right: auto; }
.hero .proof { display: inline-block; text-align: left; gap: .6rem; margin: 1.6rem auto 2rem; padding: 0; list-style: none; }
.hero .proof li { padding-left: 1.4rem; position: relative; color: #eef4ef; margin-bottom: .6rem; font-size: 1.0625rem; }
.hero .proof li::before { content: ""; position: absolute; left: 0; top: .65em; width: .5rem; height: .5rem; background: var(--green); border-radius: 50%; }
.hero .this-year { font-size: .98rem; color: #d7e6db; max-width: 60ch; margin: 0 auto; font-style: italic; }

/* Buttons */
.btns { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: .4rem; }
.hero .btns { justify-content: center; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: .7rem 1.3rem; border-radius: 6px; border: 2px solid transparent; cursor: pointer;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-deep); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { border-color: #fff; }

/* Cards grid */
.grid { margin-top: 2rem; }
/* flex wrap with centered rows, so an incomplete last row sits centred under the row above */
.grid--services, .grid--work { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem; }
.grid--services > .card, .grid--work > .card { flex: 1 1 300px; max-width: 360px; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 1.3rem 1.4rem;
}
.card .promise { font-style: italic; color: var(--teal); margin: 0 0 .6rem; }
.card p { font-size: 1.0625rem; color: var(--muted); margin: 0; }
.card--work { display: flex; flex-direction: column; }
.card--work .work-img { order: 0; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; margin: 0 0 .9rem; display: block; }
.card--work h3 { font-size: 1.15rem; order: 1; }
.card--work .meta { font-size: .85rem; color: var(--teal); font-weight: 600; margin: .3rem 0 .7rem; order: 2; }
.card--work p:not(.meta) { order: 3; }

/* About layout */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.4rem; align-items: stretch; }
.about-grid img { width: 100%; border-radius: 10px; display: block; }
.about-grid aside { display: flex; flex-direction: column; }
.about-grid figure { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.about-grid .photo-fill { flex: 1 1 auto; min-height: 0; position: relative; display: block; border-radius: 10px; overflow: hidden; }
.about-grid .photo-fill img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.affil { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem 1.4rem; }
.affil h3 { font-size: 1.15rem; }
.affil ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.affil li { font-size: 1.02rem; color: var(--muted); margin-bottom: .45rem; }
.affil .voluntary { border-top: 1px solid var(--line); padding-top: 1rem; }
.affil .voluntary .note { font-size: .95rem; font-style: italic; color: var(--teal); }

/* Image placeholder */
.imgph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: repeating-linear-gradient(45deg, #eef3 ee 0 12px, #e8efe8 12px 24px);
  background: var(--bg-soft);
  border: 1px dashed #b9c9bd; border-radius: 10px; color: var(--muted);
  font-size: .85rem; padding: 2rem 1rem; min-height: 220px;
}

/* Cotswolds photos */
.photo-pair, .photo-grid { display: grid; gap: 1rem; margin-top: 1.8rem; align-items: start; }
.photo-pair { grid-template-columns: repeat(2, 1fr); }
.photo-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.photo-pair figure, .photo-grid figure { margin: 0; }
/* before/after pair: matched landscape crop */
.photo-pair img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; }
/* uniform square crops for an even-topped row (cow framed in full) */
.photo-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; display: block; }
.photo-pair figcaption, .photo-grid figcaption { font-size: .95rem; color: var(--muted); margin-top: .4rem; }
@media (max-width: 640px) { .photo-pair { grid-template-columns: 1fr; } }

/* Section band photos (full-width) */
.band {
  position: relative; margin: 0;
  height: clamp(220px, 34vw, 460px);
  background: var(--band) center/cover no-repeat;
}
.band figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.4rem var(--pad) .8rem;
  font-size: .9rem; color: #fff;
  background: linear-gradient(to top, rgba(20,39,29,.7), rgba(20,39,29,0));
}
.band figcaption span { max-width: var(--maxw); margin: 0 auto; display: block; }

/* Contact */
.contact-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.contact-list li { margin-bottom: .6rem; }
.contact-list a { font-weight: 600; }

/* Insights */
.insights-list { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.insights-list li { padding: .9rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.insights-list li:first-child { border-top: 1px solid var(--line); }
.insights-list a { font-weight: 600; white-space: nowrap; }

/* Footer */
.site-footer { background: var(--bg-deep); color: #cdd8d0; padding: 2.4rem 0; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer .strap { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; color: #9fb6a6; }
.site-footer .foot-flex { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }

/* Responsive */
@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-grid .photo-fill { flex: none; aspect-ratio: 3 / 4; }
  .photo-row { grid-template-columns: 1fr; }
  .nav__links {
    display: none; position: absolute; top: 96px; right: 0; left: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: .5rem var(--pad);
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav__toggle { display: block; }
}
