/* Mendham Township Permit Center — shared styles
   Palette and type tuned to match the approved homepage design.
   Swap the logo badge for the real logo image when you have it (see header). */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=Pinyon+Script&display=swap');

:root {
  --cream: #F4F1E9;         /* page background */
  --cream-header: #F7F4EC;  /* header bar */
  --card: #FCFAF5;          /* card fill */
  --white: #FFFFFF;
  --navy: #1C2E4C;          /* headings, primary button, active nav */
  --navy-press: #16243D;
  --ink: #23303F;
  --slate: #5A6670;         /* muted body text */
  --slate-soft: #7A838C;
  --line: #E5DFD2;          /* hairlines on cream */
  --card-line: #E8E2D5;
  --error: #9B2C2C;
  --focus: rgba(28,46,76,.35);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius: 12px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}
a { color: inherit; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 40px; }
@media (max-width: 640px) { .container { padding: 0 20px; } }

/* ---------- Header ---------- */
.site-header {
  background: var(--cream-header);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 22px;
  min-height: 74px;
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.logo-badge {
  background: var(--white);
  border: 1px solid var(--card-line);
  border-radius: 8px;
  padding: 8px 16px 6px;
  text-align: center;
  line-height: 1;
}
.logo-badge .wordmark {
  font-family: 'Pinyon Script', cursive;
  font-size: 22px; color: var(--navy); display: block;
}
.logo-badge .sub {
  font-size: 7.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--slate); margin-top: 3px; font-weight: 600;
}
.brand .center-label { font-size: 16px; color: var(--ink); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a {
  text-decoration: none; color: var(--ink);
  font-size: 15px; padding: 8px 14px; border-radius: 8px;
}
.nav a:hover { background: rgba(28,46,76,.06); }
.nav a.active { background: var(--navy); color: #fff; }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav { gap: 2px; }
  .nav a { padding: 6px 9px; font-size: 13px; }
  .brand .center-label { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding: 60px 0 24px; }
.eyebrow {
  font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy); font-weight: 700; margin: 0 0 18px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(40px, 6vw, 66px); line-height: 1.04;
  letter-spacing: -0.01em; color: var(--navy);
  margin: 0; max-width: 720px;
}
.hero .lede {
  font-size: 19px; color: var(--slate); max-width: 600px;
  margin: 22px 0 0;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 15.5px; font-weight: 600;
  padding: 14px 26px; border-radius: 8px; cursor: pointer;
  text-decoration: none; border: 1.5px solid transparent; transition: background .15s, border-color .15s;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-press); }
.btn-ghost { background: transparent; color: var(--navy); border-color: #C9C3B4; }
.btn-ghost:hover { border-color: var(--navy); }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Category section ---------- */
.section { padding: 46px 0 90px; }
.section h2 {
  font-family: var(--serif); font-weight: 600; color: var(--navy);
  font-size: clamp(26px, 3.4vw, 34px); margin: 0; letter-spacing: -0.01em;
}
.section .sub { color: var(--slate); margin: 8px 0 30px; font-size: 16.5px; }

.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.cat-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--card-line);
  border-radius: var(--radius); padding: 22px 22px 20px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.cat-card:hover {
  border-color: #CFC7B4; transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(28,46,76,.06);
}
.cat-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cat-card .icon { font-size: 24px; line-height: 1; }
.cat-card h3 { font-size: 18px; font-weight: 700; margin: 14px 0 6px; color: var(--ink); }
.cat-card p { color: var(--slate); font-size: 14.5px; margin: 0 0 14px; }
.cat-card .meta { color: var(--slate-soft); font-size: 13.5px; }
.cat-card .meta .fee { color: var(--ink); font-weight: 600; }

/* ---------- Form (apply page) ---------- */
.page-narrow { max-width: 660px; margin: 0 auto; padding: 48px 20px 90px; }
.page-narrow .eyebrow { margin-bottom: 10px; }
.page-narrow h1 {
  font-family: var(--serif); font-weight: 600; color: var(--navy);
  font-size: clamp(30px, 4vw, 40px); margin: 0 0 8px; letter-spacing: -0.01em;
}
.page-narrow .intro { color: var(--slate); font-size: 16.5px; margin: 0 0 28px; }

.form-card {
  background: var(--white); border: 1px solid var(--card-line);
  border-radius: var(--radius); padding: 30px 26px;
}
.field { margin-bottom: 20px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.label-hint { font-weight: 400; color: var(--slate); font-size: 13px; }
input, select, textarea {
  width: 100%; padding: 12px 13px; font-size: 15px; font-family: inherit; color: var(--ink);
  background: #fff; border: 1px solid var(--card-line); border-radius: 8px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--focus);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -5000px; }
.form-card .btn-primary { width: 100%; margin-top: 4px; }
.err { color: var(--error); font-size: 14px; margin-top: 12px; }

.success {
  background: var(--white); border: 1px solid var(--card-line);
  border-left: 4px solid var(--navy); border-radius: var(--radius); padding: 30px 26px;
}
.success h2 { font-family: var(--serif); font-weight: 600; margin: 0 0 8px; font-size: 24px; color: var(--navy); }
.success p { margin: 0 0 6px; color: var(--slate); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); padding: 22px 0; color: var(--slate-soft); font-size: 13px;
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
