/* SignPermitGuide.com — Main Stylesheet */
/* Aesthetic: Municipal-editorial. Authoritative but human. */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ─── DESIGN TOKENS ─────────────────────────────────────────── */
:root {
  --cream:       #F5F2EC;
  --paper:       #FDFBF7;
  --ink:         #1A1A18;
  --charcoal:    #2E2E2B;
  --mid:         #6B6B65;
  --rule:        #D8D4CB;
  --blue:        #1C3F6E;
  --blue-light:  #2A5FA3;
  --blue-faint:  #EBF1F8;
  --amber:       #C8760A;
  --amber-faint: #FDF3E3;
  --green:       #1A6B3A;
  --green-faint: #EBF5EE;
  --red:         #A02020;
  --red-faint:   #FAEAEA;

  --ff-display: 'DM Serif Display', Georgia, serif;
  --ff-body:    'DM Sans', system-ui, sans-serif;

  --max-w:  1100px;
  --max-article: 720px;
  --gap:    clamp(1.5rem, 4vw, 3rem);
  --r:      4px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
}

/* ─── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--ff-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  font-weight: 300;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5rem; }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--charcoal);
}
h1 { font-size: clamp(1.9rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin-top: 2.5rem; margin-bottom: 0.75rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.35rem); margin-top: 2rem; margin-bottom: 0.5rem; }
h4 { font-size: 1rem; font-family: var(--ff-body); font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.4rem; }
p { margin-bottom: 1rem; }
strong { font-weight: 600; }
em { font-style: italic; }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.container--narrow { max-width: var(--max-article); margin: 0 auto; padding: 0 1.25rem; }

/* ─── SITE HEADER ────────────────────────────────────────────── */
.site-header {
  background: var(--blue);
  color: #fff;
  border-bottom: 3px solid var(--amber);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  flex-wrap: wrap;
}
.site-logo {
  font-family: var(--ff-display);
  font-size: 1.35rem;
  color: #fff;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}
.site-logo span { color: var(--amber); }
.site-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 400;
  padding: 0.3rem 0.65rem;
  border-radius: var(--r);
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.site-nav a:hover { background: rgba(255,255,255,0.12); color: #fff; }
.site-nav a.nav-cta {
  background: var(--amber);
  color: var(--ink);
  font-weight: 500;
}
.site-nav a.nav-cta:hover { background: #b86a08; color: #fff; }

/* ─── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  font-size: 0.8rem;
  color: var(--mid);
}
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; align-items: center; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.25rem; color: var(--rule); }
.breadcrumb a { color: var(--blue-light); }

/* ─── HERO ───────────────────────────────────────────────────── */
.hero {
  background: var(--blue);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(255,255,255,0.03) 40px
    );
  pointer-events: none;
}
.hero h1 { color: #fff; max-width: 700px; }
.hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.8);
  margin-top: 0.75rem;
  max-width: 580px;
  font-weight: 300;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 680px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem;
  min-width: 220px;
  font-size: 0.875rem;
}
.hero-badge strong { display: block; font-size: 1.5rem; font-family: var(--ff-display); color: var(--amber); font-weight: 400; }

/* ─── SEARCH BAR ─────────────────────────────────────────────── */
.search-bar {
  display: flex;
  gap: 0;
  margin-top: 1.75rem;
  max-width: 540px;
}
.search-bar input {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--ff-body);
  border: none;
  border-radius: var(--r) 0 0 var(--r);
  background: #fff;
  color: var(--ink);
  outline: none;
}
.search-bar button {
  padding: 0.75rem 1.25rem;
  background: var(--amber);
  color: var(--ink);
  border: none;
  border-radius: 0 var(--r) var(--r) 0;
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.search-bar button:hover { background: #b86a08; color: #fff; }

/* ─── QUICK ANSWER BAND ──────────────────────────────────────── */
.quick-band {
  background: var(--blue-faint);
  border-top: 3px solid var(--blue);
  padding: 1.5rem 0;
}
.quick-band .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.quick-item { display: flex; gap: 0.75rem; align-items: flex-start; }
.quick-icon {
  width: 36px; height: 36px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.quick-item strong { font-weight: 600; font-size: 0.875rem; display: block; color: var(--charcoal); }
.quick-item span { font-size: 0.8rem; color: var(--mid); }

/* ─── SECTION ────────────────────────────────────────────────── */
.section { padding: var(--gap) 0; }
.section--shaded { background: var(--cream); }
.section-label {
  font-family: var(--ff-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.5rem;
}
.section-title { margin-top: 0; }

/* ─── CARD GRID ──────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.5rem;
}
.card h3 { font-size: 1.1rem; margin-top: 0; margin-bottom: 0.5rem; }
.card p { font-size: 0.875rem; color: var(--mid); flex: 1; margin-bottom: 1rem; }
.card a.card-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--blue-light);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.card a.card-link::after { content: "→"; }

/* ─── STATE GRID ─────────────────────────────────────────────── */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.state-chip {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--charcoal);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.state-chip:hover { border-color: var(--blue-light); background: var(--blue-faint); text-decoration: none; color: var(--blue); }
.state-chip .arrow { color: var(--mid); font-size: 0.75rem; }

/* ─── ALERT BOXES ────────────────────────────────────────────── */
.alert {
  border-left: 4px solid;
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}
.alert--info    { border-color: var(--blue-light); background: var(--blue-faint); }
.alert--warning { border-color: var(--amber);      background: var(--amber-faint); }
.alert--success { border-color: var(--green);      background: var(--green-faint); }
.alert--danger  { border-color: var(--red);        background: var(--red-faint); }
.alert strong { display: block; margin-bottom: 0.25rem; }

/* ─── TABLE ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--r); border: 1px solid var(--rule); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th {
  background: var(--blue);
  color: #fff;
  text-align: left;
  padding: 0.7rem 1rem;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--cream); }

/* ─── FAQ ────────────────────────────────────────────────────── */
.faq { margin: 2rem 0; }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1rem 0;
  font-family: var(--ff-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-q .faq-icon { color: var(--blue-light); font-style: normal; flex-shrink: 0; transition: transform 0.2s; }
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }
.faq-a { display: none; padding-bottom: 1rem; font-size: 0.9rem; color: var(--charcoal); }
.faq-a.open { display: block; }

/* ─── CALLOUT / CTA BOX ──────────────────────────────────────── */
.callout {
  background: var(--blue);
  color: #fff;
  border-radius: var(--r);
  padding: 2rem 2.5rem;
  margin: 2.5rem 0;
}
.callout h3 { color: #fff; margin-top: 0; }
.callout p { color: rgba(255,255,255,0.85); margin-bottom: 1.25rem; }
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: var(--r);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.btn--amber { background: var(--amber); color: var(--ink); }
.btn--amber:hover { background: #b86a08; color: #fff; text-decoration: none; }
.btn--white { background: #fff; color: var(--blue); }
.btn--white:hover { background: var(--cream); text-decoration: none; }
.btn--outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.4); }
.btn--outline:hover { background: rgba(255,255,255,0.1); text-decoration: none; }

/* ─── TOOL WIDGET ────────────────────────────────────────────── */
.tool-widget {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 2rem 0;
}
.tool-widget-header {
  background: var(--charcoal);
  color: #fff;
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.tool-widget-body { padding: 1.5rem; }
.tool-label { font-size: 0.8rem; font-weight: 600; color: var(--mid); margin-bottom: 0.4rem; display: block; text-transform: uppercase; letter-spacing: 0.06em; }
.tool-input, .tool-select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  font-family: var(--ff-body);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--cream);
  color: var(--ink);
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.15s;
}
.tool-input:focus, .tool-select:focus { border-color: var(--blue-light); }
.tool-result {
  background: var(--blue-faint);
  border: 1px solid var(--blue-light);
  border-radius: var(--r);
  padding: 1.25rem;
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
}
.tool-result.visible { display: block; }
.tool-result .result-verdict {
  font-size: 1.2rem;
  font-family: var(--ff-display);
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

/* ─── ARTICLE LAYOUT ─────────────────────────────────────────── */
.article-header {
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
}
.article-meta {
  font-size: 0.8rem;
  color: var(--mid);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.article-meta span { display: flex; align-items: center; gap: 0.25rem; }

.article-body {
  padding: var(--gap) 0;
}
.article-body h2:first-child { margin-top: 0; }

/* ─── ASIDE / TOC ────────────────────────────────────────────── */
.article-with-aside {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 3rem;
  align-items: start;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (max-width: 800px) {
  .article-with-aside { grid-template-columns: 1fr; }
  .article-aside { order: -1; }
}
.article-aside { position: sticky; top: 1.5rem; }
.toc {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 1.25rem;
  font-size: 0.85rem;
}
.toc-title {
  font-family: var(--ff-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.75rem;
}
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: 0.4rem; }
.toc a { color: var(--charcoal); font-size: 0.83rem; }
.toc a:hover { color: var(--blue-light); text-decoration: none; }

/* ─── CHECKLIST ──────────────────────────────────────────────── */
.checklist { list-style: none; padding: 0; margin: 1rem 0; }
.checklist li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
}
.checklist li:last-child { border-bottom: none; }
.checklist .check { color: var(--green); flex-shrink: 0; font-size: 1rem; }

/* ─── SITE FOOTER ────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.7);
  padding: clamp(2rem, 5vw, 4rem) 0 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand {
  font-family: var(--ff-display);
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 0.75rem;
}
.footer-brand span { color: var(--amber); }
.footer-desc { font-size: 0.8rem; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--ff-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.85rem; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,0.8); }

/* ─── DISCLAIMER ─────────────────────────────────────────────── */
.disclaimer {
  font-size: 0.78rem;
  color: var(--mid);
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  line-height: 1.6;
}

/* ─── ANALYTICS PLACEHOLDER ──────────────────────────────────── */
/* Paste GA4, AdSense, and Clarity IDs here after AdSense approval */

/* ─── UTILITY ────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-mid { color: var(--mid); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.tag {
  display: inline-block;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid);
}
.tag--blue { background: var(--blue-faint); border-color: var(--blue-light); color: var(--blue); }
.tag--amber { background: var(--amber-faint); border-color: var(--amber); color: var(--amber); }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .card-grid { grid-template-columns: 1fr; }
  .callout { padding: 1.5rem; }
}

/* ─── PRINT ──────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .site-nav, .search-bar { display: none; }
  body { font-size: 11pt; }
}
