/* Healthy Habitats — rebuild stylesheet */

:root {
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --paper: #ffffff;
  --paper-warm: #f6f4ef;
  --line: #e4e0d8;
  --accent: #3a4a3f;      /* muted forest green */
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

h1, h2, h3 { font-weight: 500; line-height: 1.2; letter-spacing: -0.01em; }

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

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  max-width: var(--max); margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__brand { font-weight: 500; font-size: 1.05rem; letter-spacing: 0.01em; text-decoration: none; }
.nav__links { display: flex; gap: 26px; flex-wrap: wrap; }
.nav__links a {
  text-decoration: none; font-size: 0.9rem; font-weight: 400; color: var(--ink-soft);
  padding-bottom: 2px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 78vh; display: flex; align-items: flex-end;
  color: #fff; background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0.12) 55%, rgba(0,0,0,0.05));
}
.hero__inner { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: 0 28px 68px; width: 100%; }
.hero__title { font-size: clamp(1.7rem, 3.6vw, 3rem); font-weight: 400; max-width: 18ch; text-shadow: 0 1px 20px rgba(0,0,0,0.3); }
.hero--short { min-height: 56vh; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; margin-top: 26px; padding: 13px 30px;
  background: #fff; color: var(--ink); text-decoration: none;
  font-size: 0.85rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid #fff; transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: #fff; }
.btn--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn--dark:hover { background: transparent; color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section--warm { background: var(--paper-warm); }
.section--tight { padding: 64px 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.72rem; font-weight: 500; color: var(--accent); margin-bottom: 18px; }
.lede { font-size: clamp(1.25rem, 2.2vw, 1.7rem); font-weight: 300; max-width: 30ch; line-height: 1.35; }
.prose { max-width: 62ch; }
.prose p { margin-bottom: 1.1em; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.section__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 40px; font-weight: 400; }

/* ---------- Quote ---------- */
.quote {
  position: relative; color: #fff; text-align: center;
  padding: 130px 28px; background-size: cover; background-position: center;
}
.quote::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.quote__inner { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; }
.quote__text { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 300; font-style: italic; line-height: 1.4; }
.quote__cite { margin-top: 26px; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 44px 40px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.value h3 { font-size: 1.15rem; margin-bottom: 10px; }
.value .value__tag { color: var(--accent); font-style: italic; font-weight: 300; }
.value p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Cards (events / themes) ---------- */
.card { border-top: 1px solid var(--line); padding-top: 26px; }
.card__meta { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; font-weight: 500; }
.card h3 { font-size: 1.3rem; margin-bottom: 14px; font-weight: 500; }
.card p { color: var(--ink-soft); margin-bottom: 14px; }
.card a.inline { font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- People ---------- */
.person { text-align: left; }
.person__photo { width: 100%; aspect-ratio: 1/1; object-fit: cover; filter: grayscale(100%); transition: filter .3s; background: var(--paper-warm); }
.person:hover .person__photo { filter: grayscale(0); }
.person h3 { font-size: 1.05rem; margin: 16px 0 2px; font-weight: 500; }
.person__place { font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.person p { font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cfcfcf; padding: 64px 0 48px; font-size: 0.9rem; }
.footer__inner { max-width: var(--max); margin: 0 auto; padding: 0 28px; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer h4 { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; color: #fff; margin-bottom: 16px; font-weight: 500; }
.footer a { color: #cfcfcf; text-decoration: none; display: block; margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.footer__steward { max-width: 42ch; line-height: 1.6; }
.footer__steward a { display: inline; text-decoration: underline; }

/* ---------- Subscribe strip ---------- */
.subscribe { text-align: center; }
.subscribe .lede { margin: 0 auto 6px; text-align: center; max-width: 24ch; }
.subscribe p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
}
@media (max-width: 560px) {
  .grid--3 { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .hero { min-height: 68vh; }
}

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- CSS-only mobile nav ---------- */
.nav__toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav__burger {
  display: none; position: relative; width: 40px; height: 40px;
  margin-left: auto; cursor: pointer; border-radius: 4px;
}
.nav__burger-lines,
.nav__burger-lines::before,
.nav__burger-lines::after {
  content: ""; display: block; position: absolute; left: 10px; right: 10px;
  height: 1.5px; background: var(--ink); transition: transform .2s, opacity .2s, top .2s;
}
.nav__burger-lines { top: 19px; }
.nav__burger-lines::before { top: -7px; }
.nav__burger-lines::after { top: 7px; }
.nav__toggle:focus-visible + .nav__burger { outline: 1px solid var(--ink); outline-offset: 2px; }
.nav__toggle:checked + .nav__burger .nav__burger-lines { background: transparent; }
.nav__toggle:checked + .nav__burger .nav__burger-lines::before { top: 0; transform: rotate(45deg); }
.nav__toggle:checked + .nav__burger .nav__burger-lines::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav__inner { flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
  .nav__burger { display: block; }
  .nav__links {
    display: none; flex-direction: column; gap: 0; width: 100%;
    padding: 8px 0 12px; border-top: 1px solid var(--line);
  }
  .nav__links a { display: block; padding: 12px 0; border-bottom: 0; }
  .nav__toggle:checked ~ .nav__links { display: flex; }
}

/* ---------- Project cards ---------- */
.project-list { display: grid; gap: 28px; }
.project-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 36px 36px 32px;
}
.project-card__meta {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); font-weight: 500; margin-bottom: 12px;
}
.project-card h2 { font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 500; margin-bottom: 6px; }
.project-card__expand {
  font-size: 0.95rem; color: var(--ink-soft); font-weight: 300; margin-bottom: 22px;
  max-width: 46ch;
}
.project-card .prose { max-width: 62ch; }
.project-card .prose a {
  color: var(--ink); font-weight: 400;
  text-decoration: underline; text-underline-offset: 3px;
}

/* Team anchor offset under sticky nav */
#team { scroll-margin-top: 88px; }
.person__role {
  font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 2px;
}
