/* ============================================================
   Shared site chrome for conservewater.eco (nav + footer + blog)
   Injected on every page via nav.js. Scoped under .cw- classes
   to avoid colliding with each page's own styles.
   ============================================================ */
:root {
  --cw-blue-900: #0f4c81;
  --cw-blue-600: #0a7aff;
  --cw-cyan: #00d4ff;
  --cw-ink: #1d1d1f;
  --cw-muted: #6e6e73;
  --cw-ring: #dfe7f7;
  --cw-bg: #f5f5f7;
}

/* ---------- Top navigation ---------- */
.cw-nav {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--cw-ring);
}
.cw-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.cw-nav__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--cw-blue-900);
  text-decoration: none;
}
.cw-nav__links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cw-nav__links a {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--cw-ink);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.cw-nav__links a:hover {
  color: var(--cw-blue-600);
}
.cw-nav__links a.is-active {
  color: var(--cw-blue-900);
  border-bottom-color: var(--cw-blue-600);
}
.cw-nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 22px;
  color: var(--cw-blue-900);
}
@media (max-width: 860px) {
  .cw-nav__toggle { display: block; }
  .cw-nav__links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--cw-ring);
    padding: 8px 22px 16px;
    display: none;
    box-shadow: 0 16px 30px rgba(16, 40, 80, 0.08);
  }
  .cw-nav__links.is-open { display: flex; }
  .cw-nav__links a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--cw-ring);
  }
  .cw-nav__links a.is-active { border-bottom-color: var(--cw-ring); color: var(--cw-blue-600); }
}

/* ---------- Footer ---------- */
.cw-footer {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--cw-blue-900);
  color: #dbe7ff;
  margin-top: 60px;
}
.cw-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
  justify-content: space-between;
}
.cw-footer__brand {
  font-weight: 800;
  font-size: 20px;
  color: #fff;
}
.cw-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cw-footer__links a {
  color: #dbe7ff;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}
.cw-footer__links a:hover { color: #fff; text-decoration: underline; }
.cw-footer__note {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 18px;
  font-size: 13px;
  color: #9db6dd;
}

/* ---------- Blog prose (individual posts) ---------- */
.cw-prose {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 22px 20px;
  color: var(--cw-ink);
  line-height: 1.7;
}
.cw-prose .cw-back {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--cw-blue-600);
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}
.cw-prose .cw-back:hover { text-decoration: underline; }
.cw-prose article > header h1,
.cw-prose h1 {
  font-size: clamp(30px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--cw-blue-900);
  margin: 0 0 10px;
}
.cw-prose .cw-meta {
  color: var(--cw-muted);
  font-size: 15px;
  margin: 0 0 8px;
}
.cw-prose header p em, .cw-prose .cw-subtitle {
  color: var(--cw-muted);
  font-size: 18px;
}
.cw-prose h2 {
  font-size: clamp(21px, 2.6vw, 27px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--cw-ink);
  margin: 34px 0 10px;
}
.cw-prose p { margin: 0 0 16px; font-size: 17px; }
.cw-prose figure { margin: 26px 0; }
.cw-prose img { width: 100%; height: auto; border-radius: 16px; display: block; }
.cw-prose figcaption {
  color: var(--cw-muted);
  font-size: 14px;
  margin-top: 8px;
  text-align: center;
}

/* ---------- Blog index (listing) ---------- */
.cw-bloglist {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 22px 20px;
}
.cw-bloglist__head { text-align: center; margin-bottom: 36px; }
.cw-bloglist__head h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--cw-blue-900);
  margin: 0 0 8px;
}
.cw-bloglist__head p { color: var(--cw-muted); font-size: 18px; margin: 0; }
.cw-bloglist__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.cw-postcard {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cw-ring);
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s, box-shadow 0.25s;
}
.cw-postcard:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(16, 40, 80, 0.12);
}
.cw-postcard__img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  background: var(--cw-bg);
}
.cw-postcard__body { padding: 20px 22px 24px; }
.cw-postcard__date {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cw-blue-600);
}
.cw-postcard__title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--cw-ink);
  margin: 8px 0 8px;
  line-height: 1.25;
}
.cw-postcard__excerpt { color: var(--cw-muted); font-size: 15px; line-height: 1.5; margin: 0; }
