/* ==========================================================================
   Blackfoot Crossing County Water & Sewer District
   Shared stylesheet — clean civic blue/green
   ========================================================================== */

:root {
  --navy:        #0b3b5c;   /* deep water blue — headers, footer */
  --blue:        #1668a5;   /* primary blue — links, buttons */
  --blue-dark:   #114e7d;
  --teal:        #17807a;   /* accent green-teal */
  --teal-dark:   #10635e;
  --sky:         #e8f2f8;   /* pale blue background wash */
  --mist:        #f4f8fb;
  --sand:        #f6f4ee;   /* warm neutral card */
  --ink:         #1d2833;   /* body text */
  --slate:       #52606d;   /* muted text */
  --line:        #d6e0e8;   /* borders */
  --gold:        #c6851b;   /* alert / notice accent */
  --white:       #ffffff;
  --radius:      10px;
  --shadow:      0 2px 10px rgba(11, 59, 92, .08);
  --shadow-lg:   0 8px 28px rgba(11, 59, 92, .14);
  --wrap:        1080px;
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section.tight { padding: 40px 0; }
.section.alt { background: var(--mist); }
.section.wash { background: var(--sky); }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.25; font-weight: 700; }
h1 { font-size: 2.1rem; margin: 0 0 .4em; }
h2 { font-size: 1.55rem; margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.4em 0 .4em; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }

.lead { font-size: 1.18rem; color: var(--slate); max-width: 62ch; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 .5em;
}
.center { text-align: center; }
.muted { color: var(--slate); }

/* ---------- Top emergency / utility bar ---------- */
.util-bar {
  background: var(--navy);
  color: #cfe3f0;
  font-size: .86rem;
}
.util-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  align-items: center;
  justify-content: space-between;
  padding-top: 7px;
  padding-bottom: 7px;
}
.util-bar a { color: #fff; text-decoration: none; font-weight: 600; }
.util-bar a:hover { text-decoration: underline; }
.util-bar .emergency strong { color: #ffd7a1; }

/* ---------- Header / masthead ---------- */
.masthead {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand .mark {
  width: 46px; height: 46px; flex: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: grid; place-items: center;
  color: #fff; box-shadow: var(--shadow);
}
.brand .mark svg { width: 26px; height: 26px; }
.brand .name { line-height: 1.15; }
.brand .name strong { display: block; color: var(--navy); font-size: 1.06rem; }
.brand .name span { color: var(--slate); font-size: .78rem; letter-spacing: .02em; }

/* ---------- Navigation ---------- */
.nav-toggle {
  display: none;
  background: var(--sky);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .95rem;
  color: var(--navy);
  cursor: pointer;
  align-items: center;
  gap: 8px;
}
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0; padding: 0;
  flex-wrap: wrap;
}
.primary-nav a {
  display: block;
  padding: 9px 13px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
}
.primary-nav a:hover { background: var(--sky); color: var(--navy); }
.primary-nav a[aria-current="page"] {
  background: var(--navy);
  color: #fff;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid var(--blue);
  cursor: pointer;
  transition: background .15s ease;
}
.btn:hover { background: var(--blue-dark); color: #fff; }
.btn.teal { background: var(--teal); border-color: var(--teal); }
.btn.teal:hover { background: var(--teal-dark); }
.btn.ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn.ghost:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(11,59,92,.90), rgba(23,128,122,.86)),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,.12), transparent 60%);
  color: #fff;
  padding: 70px 0 76px;
}
.hero h1 { color: #fff; font-size: 2.5rem; max-width: 18ch; }
.hero p { color: #e2eef6; font-size: 1.2rem; max-width: 56ch; }
.hero .btn.ghost { color: #fff; border-color: #fff; }
.hero .btn.ghost:hover { background: #fff; color: var(--navy); }

/* page hero (interior pages) */
.page-hero {
  background: linear-gradient(135deg, var(--navy), var(--blue-dark));
  color: #fff;
  padding: 48px 0 42px;
}
.page-hero h1 { color: #fff; margin-bottom: .2em; }
.page-hero p { color: #d3e6f2; margin: 0; max-width: 62ch; }
.crumbs { font-size: .85rem; color: #a9c9dd; margin-bottom: 14px; }
.crumbs a { color: #d3e6f2; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--sky);
  color: var(--blue);
  display: grid; place-items: center;
  margin-bottom: 12px;
}
.card .icon svg { width: 24px; height: 24px; }
.card.link-card { transition: transform .12s ease, box-shadow .12s ease; }
a.card.link-card { text-decoration: none; color: inherit; display: block; }
a.card.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .more { color: var(--blue); font-weight: 600; font-size: .93rem; }

/* ---------- Quick links strip ---------- */
.quicklinks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.quicklinks a {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.quicklinks a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.quicklinks .ql-icon {
  width: 40px; height: 40px; margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff; display: grid; place-items: center;
}
.quicklinks .ql-icon svg { width: 22px; height: 22px; }

/* ---------- Notices / alerts ---------- */
.notice {
  border-left: 5px solid var(--gold);
  background: #fdf6e9;
  border-radius: 8px;
  padding: 16px 18px;
  margin: 0 0 16px;
}
.notice.info { border-left-color: var(--blue); background: var(--sky); }
.notice.teal { border-left-color: var(--teal); background: #e7f4f2; }
.notice h3, .notice h4 { margin: 0 0 .3em; }
.notice .date { font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); }
.notice.info .date { color: var(--blue); }

/* placeholder marker for info the district must supply */
.ph {
  background: #fff3d6;
  border-bottom: 1px dashed #c99b2e;
  padding: 0 3px;
  border-radius: 3px;
  font-style: normal;
  color: #7a5a10;
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 18px; }
table.data {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 480px;
}
table.data caption { text-align: left; font-size: .85rem; color: var(--slate); padding: 6px 2px; }
table.data th, table.data td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--line); }
table.data thead th { background: var(--navy); color: #fff; font-size: .92rem; }
table.data tbody tr:nth-child(even) { background: var(--mist); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Document list ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 10px;
}
.doc-list .doc-ico { color: var(--teal); flex: none; }
.doc-list .doc-ico svg { width: 24px; height: 24px; display: block; }
.doc-list .doc-name { font-weight: 600; color: var(--navy); }
.doc-list .doc-meta { font-size: .82rem; color: var(--slate); }
.doc-list .doc-dl { margin-left: auto; font-size: .88rem; font-weight: 600; white-space: nowrap; }

/* ---------- Definition / info rows ---------- */
.info-rows { border-top: 1px solid var(--line); margin: 8px 0 0; }
.info-rows > div {
  display: flex; gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.info-rows dt { flex: 0 0 190px; font-weight: 700; color: var(--navy); margin: 0; }
.info-rows dd { margin: 0; color: var(--ink); }

/* ---------- Board member cards ---------- */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.person {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-align: center; box-shadow: var(--shadow);
}
.person .avatar {
  width: 66px; height: 66px; margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: #fff; display: grid; place-items: center; font-size: 1.4rem; font-weight: 700;
}
.person strong { display: block; color: var(--navy); }
.person span { font-size: .9rem; color: var(--slate); }

/* ---------- FAQ ---------- */
details.faq {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 18px;
  margin-bottom: 10px;
  background: #fff;
}
details.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  padding: 12px 0;
  list-style: none;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "＋ "; color: var(--teal); font-weight: 700; }
details.faq[open] summary::before { content: "－ "; }
details.faq p:last-child { margin-bottom: 14px; }

/* ---------- Callout band ---------- */
.band {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 34px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 22px; flex-wrap: wrap;
}
.band h2 { color: #fff; margin: 0 0 .3em; }
.band p { color: #dcefec; margin: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #c4d8e6;
  padding: 48px 0 26px;
  font-size: .93rem;
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 .8em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin-bottom: 7px; }
.site-footer .foot-brand strong { color: #fff; font-size: 1.05rem; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 34px; padding-top: 18px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: .84rem; color: #9fbdd1;
}
.foot-bottom a { color: #cfe1ee; }

/* ---------- Utility ---------- */
.stack > * + * { margin-top: 1em; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
hr.rule { border: none; border-top: 1px solid var(--line); margin: 34px 0; }
.pill {
  display: inline-block; background: var(--sky); color: var(--blue-dark);
  font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: .04em;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid.cols-3, .grid.cols-4, .people, .quicklinks { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 2rem; }

  .nav-toggle { display: inline-flex; }
  .primary-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 2px; }
  .primary-nav a { padding: 12px 10px; border-radius: 6px; }
  .masthead .wrap { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .people, .quicklinks { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .info-rows > div { flex-direction: column; gap: 2px; }
  .info-rows dt { flex-basis: auto; }
  .band { flex-direction: column; align-items: flex-start; }
  .hero { padding: 48px 0; }
}

@media print {
  .util-bar, .masthead, .site-footer, .nav-toggle, .btn { display: none !important; }
  body { font-size: 12pt; }
}
