/* PermitLocal — styles.css */
/* Aesthetic: Editorial civic utility. Warm cream background, deep navy authority,
   amber accent. Typefaces: Playfair Display (headings) + Source Serif 4 (body).
   Feels like a well-designed government handbook, not a startup. */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&family=JetBrains+Mono:wght@400;600&display=swap');

/* ─── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
  --cream:     #faf7f2;
  --cream-mid: #f0ebe0;
  --cream-dark:#e0d9cb;
  --navy:      #1a2744;
  --navy-mid:  #263560;
  --navy-light:#3a4f82;
  --amber:     #c8711a;
  --amber-lt:  #e8922f;
  --amber-pale:#fdf0e0;
  --green:     #2a6049;
  --green-lt:  #d6ede5;
  --red:       #8b2020;
  --red-lt:    #fdeaea;
  --text:      #1e1e1e;
  --text-mid:  #3d3d3d;
  --text-light:#6b6b6b;
  --border:    #d0c9bb;
  --shadow:    rgba(26,39,68,0.10);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius:  6px;
  --radius-lg: 12px;
  --max-w:   1100px;
  --content: 740px;
}

/* ─── RESET ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-mid); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--amber); }

/* ─── UTILITY ─────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.content-width { max-width: var(--content); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── SITE HEADER ─────────────────────────────────────────────────────────── */
.site-header {
  background: var(--navy);
  border-bottom: 3px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px var(--shadow);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo .wordmark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
}
.site-logo .badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--amber-lt);
  text-transform: uppercase;
  border: 1px solid var(--amber);
  padding: 1px 6px;
  border-radius: 3px;
}
.site-nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.site-nav a {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.site-nav a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.site-nav a.tool-link {
  background: var(--amber);
  color: #fff;
  font-weight: 600;
}
.site-nav a.tool-link:hover { background: var(--amber-lt); }

/* ─── BREADCRUMB ─────────────────────────────────────────────────────────── */
.breadcrumb {
  background: var(--cream-mid);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  font-size: 0.82rem;
  color: var(--text-light);
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumb li + li::before { content: "›"; margin-right: 4px; }
.breadcrumb a { color: var(--navy-mid); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  background-image:
    radial-gradient(ellipse at 70% 50%, rgba(200,113,26,0.15) 0%, transparent 65%),
    radial-gradient(ellipse at 20% 80%, rgba(58,79,130,0.4) 0%, transparent 60%);
  padding: 72px 0 64px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber), var(--amber-lt), var(--amber));
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber-lt);
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -1px;
  margin-bottom: 20px;
  max-width: 680px;
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.80);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--amber);
  color: #fff;
  box-shadow: 0 3px 12px rgba(200,113,26,0.35);
}
.btn-primary:hover { background: var(--amber-lt); color: #fff; box-shadow: 0 5px 18px rgba(200,113,26,0.45); }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.45);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.7); }
.btn-navy {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 8px var(--shadow);
}
.btn-navy:hover { background: var(--navy-mid); color: #fff; }

/* ─── ALERT / INFO BOXES ──────────────────────────────────────────────────── */
.callout {
  border-left: 4px solid var(--amber);
  background: var(--amber-pale);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
  font-size: 0.95rem;
}
.callout.green {
  border-color: var(--green);
  background: var(--green-lt);
}
.callout.red {
  border-color: var(--red);
  background: var(--red-lt);
}
.callout strong { display: block; margin-bottom: 4px; }

/* ─── CARDS ───────────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card:hover {
  box-shadow: 0 8px 28px var(--shadow);
  transform: translateY(-2px);
  border-color: var(--navy-light);
  color: var(--text);
}
.card-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}
.card p {
  font-size: 0.90rem;
  color: var(--text-mid);
  line-height: 1.55;
  margin: 0;
}
.card-arrow {
  margin-top: auto;
  font-size: 0.82rem;
  color: var(--amber);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ─── COUNTY TABLE ────────────────────────────────────────────────────────── */
.county-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
}
.county-table th {
  background: var(--navy);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 16px;
  text-align: left;
}
.county-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--cream-mid);
  vertical-align: top;
}
.county-table tr:last-child td { border-bottom: none; }
.county-table tr:hover td { background: var(--cream); }
.county-table .req { color: var(--red); font-weight: 600; }
.county-table .no-req { color: var(--green); font-weight: 600; }
.county-table .varies { color: var(--amber); font-weight: 600; }

/* ─── PERMIT CHECKER TOOL ─────────────────────────────────────────────────── */
.tool-section {
  background: var(--navy);
  background-image: radial-gradient(ellipse at 80% 20%, rgba(200,113,26,0.2) 0%, transparent 60%);
  color: #fff;
  padding: 64px 0;
}
.tool-wrapper {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 680px;
  margin: 0 auto;
}
.tool-wrapper h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.tool-step {
  margin-top: 24px;
}
.tool-step label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}
.tool-step select,
.tool-step input[type="number"] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--cream);
  appearance: none;
  transition: border-color 0.15s;
}
.tool-step select:focus,
.tool-step input:focus {
  outline: none;
  border-color: var(--navy-mid);
  background: #fff;
}
#tool-result {
  margin-top: 24px;
  padding: 20px;
  border-radius: var(--radius);
  display: none;
  font-size: 0.95rem;
  line-height: 1.65;
}
#tool-result.show { display: block; }
#tool-result.permit-required {
  background: var(--red-lt);
  border-left: 4px solid var(--red);
}
#tool-result.no-permit {
  background: var(--green-lt);
  border-left: 4px solid var(--green);
}
#tool-result.check-local {
  background: var(--amber-pale);
  border-left: 4px solid var(--amber);
}
#tool-result h3 { font-family: var(--font-display); margin-bottom: 8px; }

/* ─── FAQ ─────────────────────────────────────────────────────────────────── */
.faq-list { list-style: none; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-question:hover { color: var(--amber); }
.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: var(--cream-mid);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.2s, background 0.15s;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--amber);
  color: #fff;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding: 0 0 20px;
  color: var(--text-mid);
  font-size: 0.96rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 600px; }

/* ─── THRESHOLD TABLE ─────────────────────────────────────────────────────── */
.threshold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 24px 0;
}
.threshold-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.threshold-card .project-type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 6px;
}
.threshold-card .threshold-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
.threshold-card .threshold-note {
  font-size: 0.82rem;
  color: var(--text-mid);
  margin-top: 4px;
}

/* ─── SECTION TITLES ──────────────────────────────────────────────────────── */
.section { padding: 60px 0; }
.section + .section { padding-top: 0; }
.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; }
h2.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
  margin-bottom: 12px;
}
.section-intro {
  color: var(--text-mid);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 36px;
}

/* ─── CONTENT PROSE ───────────────────────────────────────────────────────── */
.prose { max-width: var(--content); }
.prose h2 {
  font-size: 1.75rem;
  color: var(--navy);
  margin: 44px 0 16px;
  padding-top: 16px;
  border-top: 2px solid var(--cream-dark);
}
.prose h2:first-child { margin-top: 0; border-top: none; padding-top: 0; }
.prose h3 {
  font-size: 1.25rem;
  color: var(--navy-mid);
  margin: 30px 0 10px;
}
.prose p { margin-bottom: 18px; color: var(--text-mid); }
.prose ul, .prose ol {
  padding-left: 24px;
  margin-bottom: 18px;
  color: var(--text-mid);
}
.prose li { margin-bottom: 7px; }
.prose strong { color: var(--text); }
.prose a { color: var(--navy-mid); }
.prose a:hover { color: var(--amber); }

/* ─── TWO-COL LAYOUT ──────────────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 90px;
}
.sidebar-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.sidebar-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cream-dark);
}
.sidebar-card ul { list-style: none; padding: 0; }
.sidebar-card ul li {
  padding: 7px 0;
  border-bottom: 1px solid var(--cream-mid);
  font-size: 0.90rem;
}
.sidebar-card ul li:last-child { border-bottom: none; }
.sidebar-card ul li a { text-decoration: none; color: var(--navy-mid); }
.sidebar-card ul li a:hover { color: var(--amber); text-decoration: underline; }

/* ─── DISCLAIMER ──────────────────────────────────────────────────────────── */
.disclaimer {
  background: var(--cream-mid);
  border: 1px solid var(--cream-dark);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-top: 40px;
}
.disclaimer strong { color: var(--text-mid); }

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.65);
  padding: 48px 0 32px;
  margin-top: 80px;
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .wordmark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: #fff;
  display: block;
  margin-bottom: 10px;
}
.footer-brand p { font-size: 0.85rem; line-height: 1.6; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber-lt);
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
}
.footer-col ul li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,0.65); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ─── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { display: none; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  html { font-size: 16px; }
  .hero { padding: 48px 0 40px; }
}

/* ─── PRINT ───────────────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .sidebar { display: none; }
  body { background: #fff; color: #000; }
  .prose h2 { page-break-before: always; }
}
