:root {
  --ink: #20211f;
  --soft-ink: #5f625d;
  --paper: #f4f0e8;
  --sheet: #fffdf8;
  --line: #d9d1c2;
  --green: #21483f;
  --green-2: #2e6559;
  --copper: #b86f34;
  --blue: #466b7a;
  --shadow: 0 22px 70px rgba(32, 33, 31, .13);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.72;
  background: var(--paper);
  overflow-x: hidden;
}

a { color: var(--green-2); text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }

.masthead {
  display: block;
  margin-left: 290px;
  min-height: 100vh;
}

.rail {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 290px;
  height: 100vh;
  padding: 34px 28px;
  color: #efe9dc;
  background: #17231f;
  overflow-y: auto;
}

.brand {
  display: block;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
}

.brand span {
  display: block;
  width: 46px;
  height: 4px;
  margin: 18px 0;
  background: var(--copper);
}

.rail p {
  color: rgba(255,255,255,.68);
  font-size: 14px;
}

.rail nav {
  display: grid;
  gap: 10px;
  margin: 38px 0;
  font-family: Arial, Helvetica, sans-serif;
}

.rail nav a {
  display: block;
  padding: 11px 0;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
  text-decoration: none;
}

.rail nav a:hover,
.rail nav a[aria-current="page"] { color: #f4b476; }

.rail-note {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: 13px;
}

.hero {
  display: grid;
  grid-template-rows: minmax(520px, 72vh) auto;
}

.hero-image {
  position: relative;
  display: grid;
  align-items: end;
  padding: clamp(34px, 6vw, 72px);
  color: #fff;
  background:
    linear-gradient(180deg, rgba(18, 24, 22, .05), rgba(18, 24, 22, .85)),
    url("/assets/images/municipal-sewage-treatment-plant-hero.png") center/cover;
}

.kicker {
  color: var(--copper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 920px;
  margin: 14px 0 16px;
  font-size: clamp(46px, 7vw, 92px);
  line-height: .96;
}

.hero p {
  max-width: 760px;
  color: rgba(255,255,255,.84);
  font-size: 20px;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--line);
  background: var(--sheet);
}

.hero-strip div {
  padding: 24px;
  border-right: 1px solid var(--line);
}

.hero-strip strong {
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--green);
  font-size: 24px;
}

.content {
  margin-left: 290px;
}

.section {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(44px, 7vw, 86px) clamp(24px, 7vw, 92px);
  border-bottom: 1px solid var(--line);
}

.section-label {
  color: var(--copper);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.section h2,
.page h1,
.page h2 {
  margin-top: 0;
  color: var(--green);
  line-height: 1.08;
}

.section h2 { font-size: clamp(34px, 5vw, 58px); }
.page h1 { font-size: clamp(40px, 6vw, 72px); }

.lead {
  max-width: 920px;
  color: var(--soft-ink);
  font-size: 20px;
}

.matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 30px 0;
  background: var(--line);
}

.matrix article {
  padding: 24px;
  background: var(--sheet);
}

.matrix h3 {
  margin-top: 0;
  color: var(--green);
  font-family: Arial, Helvetica, sans-serif;
}

.article-list {
  display: grid;
  gap: 18px;
}

.article-link {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  color: var(--ink);
  background: var(--sheet);
  border: 1px solid var(--line);
  text-decoration: none;
}

.article-link img {
  width: 160px;
  height: 110px;
  object-fit: cover;
}

.article-link strong {
  display: block;
  color: var(--green);
  font-size: 24px;
  line-height: 1.18;
}

.article-link span { color: var(--soft-ink); }

.page-shell {
  margin-left: 290px;
  padding: clamp(36px, 6vw, 82px);
}

.page {
  max-width: 1060px;
  padding: clamp(30px, 5vw, 60px);
  background: var(--sheet);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.article-hero {
  margin: 30px 0;
  border: 1px solid var(--line);
}

.caption {
  margin-top: 10px;
  padding-left: 14px;
  color: var(--soft-ink);
  border-left: 4px solid var(--copper);
  font-style: italic;
}

.longform p,
.longform li {
  font-size: 18px;
}

.longform h2 {
  margin-top: 42px;
}

.note {
  margin: 28px 0;
  padding: 22px;
  background: #eef4ef;
  border-left: 5px solid var(--green);
}

.site-footer {
  margin-left: 290px;
  padding: 30px clamp(24px, 7vw, 92px);
  color: #efe9dc;
  background: #17231f;
}

.site-footer a { color: #fff; }

#xq-floating-contact {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  width: 320px;
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.22);
  font-family: Arial, sans-serif;
}
#xq-floating-contact .header { display: flex; align-items: center; justify-content: space-between; padding: 14px; color: #fff; background: linear-gradient(90deg,#0078d4,#00b0f0); }
#xq-floating-contact h3 { margin: 0; font-size: 16px; }
#xq-floating-contact .close { cursor: pointer; font-size: 25px; }
#xq-floating-contact .body { padding: 17px; color: #333; line-height: 1.55; }
#xq-floating-contact .body a,
#xq-floating-contact .email-text { display: block; padding: 9px 0; color: #0078d4; border-bottom: 1px solid #eee; text-decoration: none; }
#xq-floating-contact .main-site { margin-top: 13px; padding: 11px; color: #fff !important; background: #0078d4; border-radius: 6px; text-align: center; font-weight: 700; }
#xq-floating-contact .close-btn { display: block; margin-top: 13px; padding: 10px; background: #f1f1f1; border-radius: 6px; text-align: center; cursor: pointer; }

@media (max-width: 980px) {
  .masthead,
  .section {
    grid-template-columns: 1fr;
  }
  .masthead {
    margin-left: 0;
  }
  .masthead,
  .rail,
  .hero,
  .hero-strip,
  .content,
  .page-shell {
    min-width: 0;
    width: 100%;
  }
  .rail {
    position: static;
    width: 100%;
    height: auto;
    overflow: visible;
  }
  .brand,
  .rail p,
  .rail nav,
  .rail nav a,
  .rail-note,
  h1,
  h2,
  p {
    overflow-wrap: anywhere;
  }
  .content,
  .page-shell,
  .site-footer {
    margin-left: 0;
  }
  .hero-strip,
  .matrix {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .article-link {
    grid-template-columns: 1fr;
  }
  .article-link img {
    width: 100%;
    height: auto;
  }
  #xq-floating-contact {
    right: 12px;
    bottom: 12px;
    width: min(320px, calc(100% - 24px));
  }
}
