/* CA Ecology — site styles. Palette drawn from the logo: leaf green + amber underline. */
:root {
  --green-950: #0d2a18;
  --green-900: #143d24;
  --green-800: #1b5230;
  --green-700: #226741;
  --green-leaf: #0a9932;          /* logo square */
  --amber: #ee9420;               /* logo underline */
  --amber-dark: #cf7a0a;
  --bg: #fafaf6;
  --paper: #ffffff;
  --ink: #263029;
  --muted: #5d6a61;
  --line: #e4e7e0;
  --max: 1120px;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(20, 40, 28, .08), 0 8px 24px rgba(20, 40, 28, .07);
  --font-head: "Titillium Web", "Segoe UI", system-ui, sans-serif;
  --font-body: system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--green-700); }
a:hover { color: #9c5b06; } /* amber family, darkened to pass 4.5:1 on white */

@font-face {
  font-family: "Titillium Web";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/titillium-400.woff2") format("woff2");
}
@font-face {
  font-family: "Titillium Web";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/titillium-600.woff2") format("woff2");
}
@font-face {
  font-family: "Titillium Web";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/titillium-700.woff2") format("woff2");
}

h1, h2, h3, h4 { font-family: var(--font-head); color: var(--green-900); line-height: 1.25; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--green-900); color: #fff;
  padding: 8px 16px; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 4px rgba(20,40,28,.12); }
.topbar { background: var(--green-950); color: #cfe0d4; font-size: 14px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: 12px; }
.topbar a { color: #cfe0d4; text-decoration: none; }
.topbar a:hover { color: #fff; }
.topbar-contact { display: flex; gap: 18px; flex-wrap: wrap; }
.topbar-contact a { display: inline-flex; align-items: center; gap: 6px; }
.topbar-social { display: flex; gap: 10px; align-items: center; }
.topbar-social a { display: inline-flex; opacity: .85; }
.topbar-social a:hover { opacity: 1; }

.mainbar { background: var(--paper); border-bottom: 3px solid var(--amber); }
.mainbar-in { display: flex; align-items: center; gap: 18px; min-height: 68px; max-width: 1300px; }
.mainbar-in .brand img { height: 40px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand img { display: block; }

.site-nav { flex: 1 1 auto; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; flex-wrap: wrap; }
.nav > li { position: relative; }
.nav a {
  display: block; padding: 10px 9px; text-decoration: none; color: var(--ink);
  font-family: var(--font-head); font-weight: 600; font-size: 15px; border-radius: 6px;
  white-space: nowrap;
}
.nav > li.active > a, .nav a:hover { color: var(--green-800); background: #eef4ee; }
.sub-toggle {
  display: none; background: none; border: 0; font-size: 12px; cursor: pointer;
  color: var(--muted); padding: 4px;
}
.nav .sub {
  list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%;
  background: var(--paper); min-width: 300px; border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow); border-top: 3px solid var(--amber);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s ease;
}
.nav li:hover > .sub, .nav li:focus-within > .sub, .nav li.open > .sub {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav .sub a { padding: 8px 12px; font-weight: 400; font-family: var(--font-body); font-size: 15px; }
.nav .sub li.active a { color: var(--green-800); font-weight: 600; }

.head-search { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #f4f6f2; }
.head-search input { border: 0; background: transparent; padding: 7px 12px; width: 105px; font-size: 14px; outline: none; }
.head-search button { border: 0; background: transparent; padding: 6px 10px; cursor: pointer; color: var(--muted); display: flex; }
.head-search button:hover { color: var(--green-800); }

/* search inside the collapsed mobile menu (hidden wherever the menu is expanded) */
.nav-search { display: none; }
.nav-search form { display: flex; gap: 8px; padding: 12px 10px; }
.nav-search input { flex: 1; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.nav-search button { border: 0; background: var(--green-800); color: #fff; border-radius: 8px; padding: 9px 16px; font-family: var(--font-head); font-weight: 600; cursor: pointer; }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 3px; background: var(--green-900); margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(rgba(10,30,18,.55), rgba(10,30,18,.55)), var(--green-900);
  background-size: cover !important; background-position: center !important;
  color: #fff;
}
.hero-in { padding: 88px 20px; max-width: var(--max); margin: 0 auto; }
.hero h1 {
  color: #fff; font-size: clamp(30px, 5vw, 48px); margin: 0 0 10px; max-width: 720px;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.hero-sub { font-size: clamp(17px, 2.2vw, 21px); max-width: 620px; margin: 0 0 22px; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.hero-small .hero-in { padding: 46px 20px; }
.hero-small h1 { font-size: clamp(26px, 4vw, 38px); }

.btn {
  display: inline-block; background: var(--green-800); color: #fff; text-decoration: none;
  padding: 11px 22px; border-radius: 24px; font-family: var(--font-head); font-weight: 600;
  border: 0; cursor: pointer; font-size: 16px; transition: background .15s;
}
.btn:hover { background: var(--green-700); color: #fff; }
.btn-accent { background: var(--amber); color: #1d1509; }
.btn-accent:hover { background: #f5a63c; color: #1d1509; }
.btn-ghost { background: transparent; color: var(--green-800); box-shadow: inset 0 0 0 2px var(--green-800); }
.btn-ghost:hover { background: #eef4ee; }

/* ---------- home ---------- */
.home-intro { padding: 42px 0 4px; }
.home-intro .lead { max-width: 860px; font-size: 19px; }
.home-intro h2 a { text-decoration: none; }
.stats-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 30px 0 8px; }
.stat { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; border-top: 4px solid var(--green-leaf); }
.stat-n { display: block; font-family: var(--font-head); font-weight: 700; font-size: 38px; color: var(--green-800); line-height: 1.1; }
.stat-t { color: var(--muted); font-size: 15px; }
.section-title { font-size: 30px; margin: 40px 0 22px; position: relative; padding-bottom: 10px; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 4px; background: var(--amber); border-radius: 2px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; margin-bottom: 26px; }
.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  text-decoration: none; color: var(--ink); display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(20,40,28,.12), 0 14px 34px rgba(20,40,28,.13); color: var(--ink); }
.card-img { display: block; height: 150px; background-size: cover; background-position: center; background-color: #dfe7df; }
.card-body { padding: 14px 16px 18px; display: block; }
.card-title { display: block; font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--green-900); margin-bottom: 6px; }
.card:hover .card-title { color: var(--green-700); }
.card-text { display: block; font-size: 14.5px; color: var(--muted); line-height: 1.5; }

.home-quotes { background: var(--green-950); padding: 8px 0 46px; margin-top: 46px; color: #e7efe9; }
.home-quotes .section-title { color: #fff; }
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; margin-bottom: 26px; }
.home-quotes .testimonial { background: rgba(255,255,255,.06); border-radius: var(--radius); padding: 22px 24px; margin: 0; border-left: 4px solid var(--amber); }
.home-quotes .testimonial blockquote { margin: 0 0 12px; font-style: italic; color: #e7efe9; }
.home-quotes .testimonial figcaption { font-family: var(--font-head); font-weight: 600; color: #fff; }
.home-quotes .testimonial figcaption span { font-weight: 400; color: #b9c9be; }
.home-quotes .btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.home-quotes .btn-ghost:hover { background: rgba(255,255,255,.1); }

.home-cta { text-align: center; padding: 54px 0 60px; }
.home-cta h2 { font-size: 28px; margin-bottom: 8px; }

/* ---------- page ---------- */
.page-wrap { padding: 38px 20px 64px; }
.page-body { margin: 0 auto; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 48px 48px; }
.page-body > h2:first-child { margin-top: 0; }
.page-body h2 { font-size: 26px; margin: 34px 0 12px; }
.page-body h3 { font-size: 21px; margin: 26px 0 10px; }
.page-body ul, .page-body ol { padding-left: 26px; }
.page-body li { margin-bottom: 6px; }
.page-body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.page-body table { border-collapse: collapse; width: 100%; margin: 18px 0; }
.page-body td, .page-body th { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.page-body th { background: #eef4ee; font-family: var(--font-head); }

figure.content-img { margin: 24px 0; text-align: center; }
figure.content-img figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
/* content images get the card look whether wrapped in a figure or a bare
   paragraph (the editor stores them as <p><img></p>) */
figure.content-img img, .page-body p > img {
  display: block; margin: 8px auto; border-radius: var(--radius); box-shadow: var(--shadow);
}

/* testimonials: a quote block followed by an attribution paragraph that starts
   bold ("Name, role") — exactly what the editor's ❝ button + bold produce */
.page-body blockquote {
  background: #f2f6f1; border-left: 4px solid var(--amber); border-radius: 8px;
  padding: 18px 22px; margin: 22px 0 8px; font-style: italic;
}
.page-body blockquote + p { margin: 0 0 26px; padding-left: 26px; color: var(--muted); }
.page-body blockquote + p strong { font-family: var(--font-head); color: var(--green-900); }

.testimonial blockquote { margin: 0 0 10px; font-style: italic; color: var(--ink); background: none; border: 0; padding: 0; }
.testimonial blockquote p { margin: 0 0 10px; }
.testimonial figcaption { font-family: var(--font-head); font-weight: 600; color: var(--green-900); }
.testimonial figcaption span { font-weight: 400; color: var(--muted); }

.pull-callout {
  border-top: 6px solid var(--green-leaf); background: #f2f6f1; padding: 14px 18px; border-radius: 0 0 8px 8px;
  font-family: var(--font-head); font-weight: 600; color: var(--green-800); font-size: 18px; margin: 22px 0;
}

/* ---------- forms ---------- */
.contact-form-wrap { margin-top: 38px; border-top: 1px solid var(--line); padding-top: 26px; }
.contact-form .ff { margin-bottom: 16px; }
.contact-form label { display: block; font-family: var(--font-head); font-weight: 600; margin-bottom: 4px; }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c9d2c9; border-radius: 8px;
  font: inherit; background: #fdfdfb;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--green-leaf); border-color: var(--green-leaf); }
.hp { position: absolute; left: -9999px; }
.form-ok { background: #e5f5e8; border: 1px solid #9fd3ab; border-radius: 8px; padding: 16px 20px; margin: 20px 0; }

.search-page-form { display: flex; gap: 10px; margin-bottom: 26px; }
.search-page-form input { flex: 1; padding: 10px 14px; border: 1px solid #c9d2c9; border-radius: 8px; font: inherit; }
.search-results { list-style: none; padding: 0; }
.search-results li { margin-bottom: 20px; }
.search-results a { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.search-results p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- footer ---------- */
.site-foot { background: var(--green-950); color: #b9c9be; margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding: 46px 20px 30px; }
.site-foot h3 { color: #fff; font-size: 17px; margin: 0 0 12px; }
.site-foot a { color: #d9e5dc; }
.site-foot a:hover { color: var(--amber); }
.foot-logo { background: #fff; padding: 6px 10px; border-radius: 6px; margin-bottom: 12px; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links li { margin-bottom: 7px; }
.foot-links a { text-decoration: none; }
.foot-addr { font-size: 14.5px; }
.foot-legal { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; padding-bottom: 20px; font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  /* icon-only: submitting the empty form lands on the full /search page */
  .head-search { border: 0; background: transparent; }
  .head-search input { display: none; }
}
@media (max-width: 940px) {
  .head-search { display: none; }
  .nav-search { display: block; }
  .nav-toggle { display: block; margin-left: auto; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 3px solid var(--amber); box-shadow: var(--shadow);
    max-height: calc(100vh - 110px); overflow: auto;
  }
  .site-nav.open { display: block; }
  .nav { flex-direction: column; padding: 10px 14px 16px; }
  .nav a { padding: 12px 10px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav > li { display: flex; flex-wrap: wrap; align-items: center; }
  .nav > li > a { flex: 1; }
  .sub-toggle { display: block; font-size: 16px; padding: 10px 14px; }
  .nav .sub {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border-top: 0; min-width: 0; padding: 0 0 0 18px; display: none; flex-basis: 100%;
  }
  .nav li.open > .sub { display: block; }
  .nav li:hover > .sub { display: none; }
  .nav li.open:hover > .sub, .nav li.open > .sub { display: block; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
  .page-body { padding: 28px 22px 34px; }
  .topbar-in { justify-content: center; }
  .topbar-social { display: none; }
}
@media print {
  .site-head, .site-foot, .hero, .contact-form-wrap { display: none; }
}
