/* ==========================================================================
   Meridian Municipal — marketing site stylesheet
   Implements DESIGN.md: navy-anchored palette, Red Hat Display/Text,
   restrained accent, quiet elevation. Shared across all six pages.
   ========================================================================== */

:root {
  /* Core palette */
  --navy: #2A3B4E;
  --navy-deep: #223141;
  --steel: #4C607A;
  --blue-accent: #3E6E9C;
  --mist: #E8ECF1;
  --mist-deep: #DDE3EB;
  --white: #FFFFFF;
  --signal-red: #D13F33;

  /* Text */
  --text-strong: #2A3B4E;
  --text-body: #3A4655;
  --text-muted: #5A6675;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: #B9C4D2;

  /* Borders */
  --border: #D7DCE3;
  --border-strong: #B7C0CC;

  /* Semantic */
  --success: #2E7D5B;
  --warning: #B5852A;
  --error: #C0453B;
  --info: #3E6E9C;

  /* Chart palette (used sparingly, off the marketing pages) */
  --chart-teal: #3E7C74;
  --chart-plum: #7A5570;

  --paper: #F7F8FA;
  --shadow-sm: 0 1px 2px rgba(34,49,65,.06);
  --shadow-md: 0 4px 12px rgba(34,49,65,.08);

  --display: "Red Hat Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --sans: "Red Hat Text", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text-body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--text-strong);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
h1 { font-weight: 600; font-size: 42px; line-height: 1.1; letter-spacing: -0.5px; }
h2 { font-weight: 600; font-size: 28px; line-height: 1.2; letter-spacing: -0.3px; }
h3 { font-weight: 500; font-size: 19px; line-height: 1.25; }
p { margin: 0 0 16px; max-width: 68ch; }
a { color: var(--blue-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--blue-accent); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.section.on-mist { background: var(--mist); }
.section.on-navy { background: var(--navy); color: var(--text-on-dark-muted); }
.section.on-navy h1, .section.on-navy h2, .section.on-navy h3 { color: var(--white); }
.section.on-navy p { color: var(--text-on-dark-muted); }
.section + .section { border-top: 1px solid var(--border); }
.section.on-navy + .section, .section.on-mist + .section.on-navy { border-top: none; }

.eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--steel);
  margin: 0 0 10px;
}
.on-navy .eyebrow { color: var(--text-on-dark-muted); }
.lede { font-size: 18px; color: var(--text-muted); max-width: 62ch; }
.on-navy .lede { color: var(--text-on-dark-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 500; font-size: 15px;
  padding: 12px 22px; border-radius: var(--radius-sm); cursor: pointer;
  white-space: nowrap; border: 1px solid transparent; text-decoration: none !important;
  transition: background .12s, color .12s, border-color .12s, filter .12s;
}
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { filter: brightness(1.12); }
.btn-white { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-white:hover { filter: brightness(.94); }
.btn-ghost { background: transparent; color: var(--text-strong); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--steel); }
.btn-ondark-ghost { background: transparent; color: var(--text-on-dark); border-color: var(--steel); }
.btn-ondark-ghost:hover { background: rgba(255,255,255,.08); }

/* ---------- Nav ---------- */
header.site-nav {
  background: var(--navy);
  position: sticky; top: 0; z-index: 40;
}
.navbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 16px 0;
}
.brandlock { display: flex; align-items: center; gap: 12px; text-decoration: none !important; }
.brandlock .mark { width: 28px; height: 28px; flex: none; }
.brand-words { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 20px; line-height: 1; color: var(--white); letter-spacing: -0.01em; }
.brand-sub { font-family: var(--sans); font-weight: 500; font-size: 9.5px; line-height: 1; letter-spacing: 0.22em; color: var(--text-on-dark-muted); }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-on-dark-muted); font-size: 14.5px; font-weight: 500; }
.nav-links a:hover { color: var(--white); text-decoration: none; }
.nav-links a.active { color: var(--white); }
.nav-links a[aria-current="page"] { color: var(--white); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

@media (max-width: 800px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--navy);
    flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 24px 18px;
    border-top: 1px solid rgba(255,255,255,.1); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-toggle {
    display: inline-flex; background: none; border: 1px solid var(--steel); color: var(--white);
    border-radius: var(--radius-sm); padding: 8px 12px; font-family: var(--sans); font-size: 13px;
  }
}

/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; }
.hero h1 { color: var(--white); max-width: 16ch; }
.hero .lede { max-width: 54ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-meta { display: flex; gap: 32px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.14); padding-top: 24px; }
.hero-meta div { min-width: 160px; }
.hero-meta .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-on-dark-muted); margin-bottom: 5px; }
.hero-meta .v { font-family: var(--display); font-weight: 500; font-size: 15px; color: var(--white); }

/* ---------- Cards / grid ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid3, .grid2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 26px 24px; box-shadow: var(--shadow-sm);
}
.practice-card { display: flex; flex-direction: column; gap: 10px; }
.practice-card .num {
  font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--signal-red);
}
.practice-card h3 { margin: 0; }
.practice-card p { color: var(--text-muted); font-size: 14.5px; margin: 0 0 6px; }
.practice-card .link { font-size: 14px; font-weight: 500; }

/* ---------- Link callout (strategy-to-budget) ---------- */
.link-callout {
  background: var(--mist); border-left: 3px solid var(--signal-red); border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 20px 24px; display: flex; gap: 16px; align-items: flex-start;
}
.link-callout .lbl {
  font-family: var(--display); font-weight: 600; font-size: 12.5px; color: var(--navy);
  text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; padding-top: 2px; flex: none;
}
.link-callout p { margin: 0; font-size: 15px; color: var(--text-body); }

/* ---------- Engagement / stat blocks ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.stat-cell { background: var(--white); padding: 22px 24px; }
.stat-cell .v { font-family: var(--display); font-weight: 600; font-size: 26px; color: var(--navy); }
.stat-cell .k { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 700px) { .stat-row { grid-template-columns: 1fr; } }

/* ---------- Methodology / step list ---------- */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 20px; padding: 22px 0; border-top: 1px solid var(--border); }
.step:first-child { border-top: none; }
.step .n {
  counter-increment: step; font-family: var(--display); font-weight: 600; font-size: 15px;
  color: var(--white); background: var(--navy); border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.step .n::before { content: counter(step); }
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; color: var(--text-strong); }
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 15px; color: var(--text-body);
  background: var(--white); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 11px 13px; width: 100%; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--blue-accent); box-shadow: 0 0 0 3px rgba(62,110,156,.16);
}
.field .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-muted); }
.field .consent input { width: auto; margin-top: 3px; }
.form-note { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

/* ---------- Toolkit list ---------- */
.tool-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.tool-row { background: var(--white); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tool-row .t { font-family: var(--display); font-weight: 500; font-size: 15.5px; color: var(--text-strong); }
.tool-row .d { font-size: 13.5px; color: var(--text-muted); margin-top: 2px; max-width: 56ch; }
.tool-row.locked { opacity: .55; }
.tag { font-size: 11.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 5px; }
.tag.locked { background: var(--mist); color: var(--text-muted); }
.tag.open { background: rgba(46,125,91,0.12); color: var(--success); }
.tag.watch { background: rgba(62,110,156,0.12); color: var(--blue-accent); border: none; cursor: pointer; font-family: var(--sans); }
.tag.watch:hover { background: rgba(62,110,156,0.2); }
.tag.watch:focus-visible { outline: 2px solid var(--blue-accent); outline-offset: 2px; }

/* ---------- Toolkit row with a video thumbnail ---------- */
.tool-main { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1 1 320px; }
.tool-thumb { flex: none; width: 84px; height: 47px; border-radius: 6px; overflow: hidden; position: relative; border: 1px solid var(--border); background: var(--navy); cursor: pointer; padding: 0; }
.tool-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tool-thumb .play-badge { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(42,59,78,.28); transition: background .12s; }
.tool-thumb .play-badge::before { content: ""; width: 0; height: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent var(--white); margin-left: 2px; }
.tool-thumb:hover .play-badge { background: rgba(42,59,78,.5); }
.tool-thumb:focus-visible { outline: 2px solid var(--blue-accent); outline-offset: 2px; }
.tool-text { min-width: 0; }

/* ---------- Video modal ---------- */
.video-modal { position: fixed; inset: 0; background: rgba(20,26,34,.88); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 24px; }
.video-modal[hidden] { display: none; }
.video-modal-inner { max-width: 960px; width: 100%; }
.video-modal-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 10px; }
.video-modal-title { color: var(--white); font-family: var(--display); font-weight: 500; font-size: 15px; }
.video-modal-close { background: transparent; border: 1px solid rgba(255,255,255,.3); color: var(--white); border-radius: 6px; padding: 7px 14px; cursor: pointer; font-family: var(--sans); font-size: 13px; font-weight: 500; }
.video-modal-close:hover { background: rgba(255,255,255,.08); }
.video-modal video { width: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.4); background: #000; display: block; }

/* ---------- Footer ---------- */
footer.site-footer { background: var(--navy-deep); padding: 48px 0 32px; color: var(--text-on-dark-muted); }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 24px; }
.footer-brand .brandlock { margin-bottom: 12px; }
.footer-brand p { color: var(--text-on-dark-muted); font-size: 14px; max-width: 40ch; margin: 0; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--sans); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-on-dark-muted); margin: 0 0 12px; }
.footer-col a { display: block; color: var(--white); font-size: 14.5px; margin-bottom: 9px; opacity: .9; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-on-dark-muted); }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.max-60 { max-width: 60ch; }
