/*
 * Beulah Park Water System — public site
 * "One green room per page." Recreated from the Claude Design hi-fi handoff
 * (BPWS Site Final: screens 2a/3a/3b/4a/4b). Deep-green field, Newsreader
 * serif display, Public Sans UI. Desktop-first; the @media block at the
 * bottom is the mobile composition.
 */

:root {
  --green:      #2C4023;  /* page field */
  --green-dark: #1F2F18;  /* hover-dark */
  --cream:      #F1EEDD;  /* primary text / buttons */
  --cream-hi:   #FFFFFF;  /* cream hover */
  --body:       #DDE2C8;  /* body copy on green */
  --secondary:  #C9D3B4;  /* secondary text */
  --tertiary:   #A9B98F;  /* tertiary / kickers / meta */
  --terra:      #E8A87E;  /* terracotta accent */
  --terra-hi:   #F4CDB3;  /* terracotta hover */

  --hair-15: rgba(241, 238, 221, 0.15);
  --hair-25: rgba(241, 238, 221, 0.25);
  --hair-30: rgba(241, 238, 221, 0.30);
  --hair-35: rgba(241, 238, 221, 0.35);
  --terra-hair: rgba(232, 168, 126, 0.40);

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Public Sans', system-ui, -apple-system, sans-serif;

  --gutter: 34px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--green);
  color: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
strong { color: var(--cream); font-weight: 700; }

/* ── The room ─────────────────────────────────────────── */
.room {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
.room.home { overflow: hidden; }

/* ── Top bar ──────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px var(--gutter);
  position: relative;
  z-index: 2;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .leaf { width: 26px; height: auto; }
.brand.lg .leaf { width: 34px; }
.lockup {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  font-weight: 600;
}
.home-link {
  font-size: 13px;
  color: var(--secondary);
  transition: color 0.15s ease;
}
.home-link:hover { color: var(--cream); }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  font-size: 13px;
  color: var(--tertiary);
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--cream); }
.nav a.active {
  color: var(--cream);
  font-weight: 600;
  border-bottom: 1px solid var(--tertiary);
  padding-bottom: 2px;
}

/* ── Centered content (inner pages) ───────────────────── */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 40px var(--gutter);
  position: relative;
  z-index: 2;
}

/* ── Bottom meta line ─────────────────────────────────── */
.meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 20px var(--gutter) 30px;
  font-size: 13px;
  color: var(--tertiary);
  position: relative;
  z-index: 2;
}
.meta .right { text-align: right; }
.meta a:hover { color: var(--cream); }

/* Shared bits */
.kicker {
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--tertiary);
}
.headline {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.lede {
  font-size: 18px;
  line-height: 1.65;
  color: var(--body);
  max-width: 58ch;
  margin: 0;
}
.btn {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--cream);
  color: var(--green);
  border-radius: 4px;
  padding: 15px 30px;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--cream-hi); }

/* Email link (address assembled at runtime by site.js) */
.mail { color: var(--cream); font-weight: 700; transition: color 0.15s ease; }
.mail:hover { color: var(--cream-hi); }

/* ── Home (2a) ────────────────────────────────────────── */
.home-leaf {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  pointer-events: none;
}
.home-leaf img {
  width: 560px;
  max-width: 72vw;
  height: auto;
  opacity: 0.9;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.35));
  /* Optically center in the open field: the blade's mass sits low in the PNG,
     and the entry links weight the bottom, so lift it off geometric center. */
  transform: translateY(-70px);
}
.home-bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--gutter) 32px;
  position: relative;
  z-index: 2;
}
.home-entries { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.entry {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.1;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hair-35);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.entry.cream { color: var(--cream); }
.entry.cream:hover { color: var(--cream-hi); border-bottom-color: var(--cream); }
.entry.terra { color: var(--terra); border-bottom-color: var(--terra-hair); }
.entry.terra:hover { color: var(--terra-hi); border-bottom-color: var(--terra-hi); }
.home-kicker { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.home-kicker .k {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tertiary);
  font-weight: 700;
}
.home-kicker .sub { font-size: 13px; color: var(--secondary); }

/* ── Report a leak (3a) ───────────────────────────────── */
.leak-num {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 10vw, 120px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--terra);
  white-space: nowrap;
  transition: color 0.15s ease;
}
.leak-num:hover { color: var(--terra-hi); }
.leak-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 var(--gutter);
  padding: 20px 0 30px;
  border-top: 1px solid var(--hair-15);
  font-size: 14px;
  color: var(--secondary);
  position: relative;
  z-index: 2;
}
.leak-foot .right { font-size: 13px; color: var(--tertiary); white-space: nowrap; }
.leak-foot a:hover { color: var(--cream); }

/* ── New to the neighborhood (3b) ─────────────────────── */
.stack { display: flex; flex-direction: column; gap: 12px; }
.intro { font-size: 17px; line-height: 1.65; color: var(--body); max-width: 58ch; margin: 0; }
.steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 980px;
}
.step { display: flex; gap: 20px; border-top: 1px solid var(--hair-25); padding-top: 18px; }
.step .n { font-family: var(--serif); font-size: 54px; font-weight: 500; color: var(--terra); line-height: 0.9; }
.step .t { font-size: 16px; line-height: 1.6; color: var(--body); }
.cta-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-note { font-size: 15px; color: var(--secondary); }

/* ── Contact & Board (4a) ─────────────────────────────── */
.dir-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  max-width: 1050px;
}
.col { display: flex; flex-direction: column; gap: 6px; }
.col-head {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--tertiary);
  border-bottom: 1px solid var(--hair-25);
  padding-bottom: 10px;
}
.row { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; }
.row .label { font-size: 15px; font-weight: 600; color: var(--cream); white-space: nowrap; }
.row .label .muted { font-weight: 400; color: var(--tertiary); }
.row .leader { flex: 1; border-bottom: 1px dotted var(--hair-35); transform: translateY(-4px); }
.row .val { font-size: 15px; font-weight: 700; color: var(--cream); white-space: nowrap; transition: color 0.15s ease; }
.row .val.terra { color: var(--terra); }
.row .val.body { color: var(--body); font-weight: 400; }
a.val:hover { color: var(--cream-hi); }
a.val.terra:hover { color: var(--terra-hi); }
.row .role { font-size: 15px; color: var(--secondary); font-style: italic; font-family: var(--serif); white-space: nowrap; }
.col-note { font-size: 14px; color: var(--secondary); padding-top: 8px; }

/* ── Resources (4b) ───────────────────────────────────── */
.res-sub { font-size: 16px; color: var(--secondary); }
.res-list { display: flex; flex-direction: column; max-width: 1050px; }
.res-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--hair-25);
  transition: padding-left 0.18s ease;
}
.res-row:last-child { border-bottom: 1px solid var(--hair-25); }
.res-row:hover { padding-left: 10px; }
.res-main { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.res-title { font-family: var(--serif); font-weight: 500; font-size: 24px; color: var(--cream); }
.res-desc { font-size: 14px; color: var(--tertiary); }
.res-tag {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--tertiary);
  border: 1px solid var(--hair-30);
  border-radius: 3px;
  padding: 4px 10px;
  white-space: nowrap;
}
.res-arrow { font-family: var(--serif); font-size: 24px; color: var(--terra); }

/* ── Article / long-form (resource content pages) ─────── */
.article {
  flex: 1;
  padding: 44px var(--gutter) 56px;
  position: relative;
  z-index: 2;
}
.prose { max-width: 66ch; display: flex; flex-direction: column; gap: 34px; }
.prose-head { display: flex; flex-direction: column; gap: 16px; }
.article-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--cream);
}
.prose-lede { font-size: 18px; line-height: 1.65; color: var(--body); margin: 0; }
.prose section { display: flex; flex-direction: column; gap: 12px; }
.prose h2 { font-family: var(--serif); font-weight: 500; font-size: 26px; color: var(--cream); margin: 0; }
.prose p { font-size: 16px; line-height: 1.7; color: var(--body); margin: 0; }
.prose ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 11px; }
.prose li { font-size: 16px; line-height: 1.6; color: var(--body); padding-left: 22px; position: relative; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terra);
}
.prose a { color: var(--terra); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--terra-hi); }
.back-link { display: inline-block; margin-top: 8px; font-size: 15px; color: var(--secondary); transition: color 0.15s ease; }
.back-link:hover { color: var(--cream); }

/* ── Mobile ───────────────────────────────────────────── */
@media (max-width: 760px) {
  :root { --gutter: 20px; }

  .topbar { flex-wrap: wrap; gap: 10px 16px; padding-top: 20px; padding-bottom: 20px; }
  .nav { gap: 16px; flex-wrap: wrap; }

  /* ~44px tap targets on the quiet nav without shifting the visible layout */
  .nav a, .home-link { position: relative; }
  .nav a::after, .home-link::after { content: ""; position: absolute; inset: -13px -10px; }

  .content { gap: 22px; padding-top: 32px; padding-bottom: 32px; }

  .home-bottom { flex-direction: column; align-items: flex-start; gap: 28px; }
  .home-kicker { align-items: flex-start; text-align: left; }
  .home-leaf img { max-width: 78vw; }
  .entry { font-size: 30px; }

  .headline { font-size: clamp(38px, 9vw, 64px) !important; }
  .article-title { font-size: clamp(32px, 8vw, 48px); }

  .steps { grid-template-columns: 1fr; gap: 24px; }
  .dir-grid { grid-template-columns: 1fr; gap: 40px; }

  .meta { flex-direction: column; align-items: flex-start; gap: 6px; }
  .meta .right { text-align: left; }
  .leak-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
  .leak-foot .right { white-space: normal; }

  /* dotted-leader rows wrap value below label on narrow screens */
  .row { flex-wrap: wrap; }
  .row .leader { min-width: 24px; }
}
