/* FireFeatureRules — Main Stylesheet
   Aesthetic: Warm industrial / editorial reference
   Palette: Charcoal, ember amber, ash white, deep smoke
   Typography: Playfair Display (display) + Source Serif 4 (body) + JetBrains Mono (data)
*/

@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');

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --ember:       #D4511A;
  --ember-light: #F07040;
  --ember-dark:  #9E3A0E;
  --charcoal:    #1C1C1E;
  --smoke:       #2E2E30;
  --ash:         #F5F1EC;
  --ash-mid:     #E8E2D9;
  --ash-dark:    #C8BFB4;
  --text:        #1C1C1E;
  --text-muted:  #5A5550;
  --text-light:  #8A847E;
  --white:       #FFFFFF;
  --border:      #D8D0C8;
  --border-dark: #A89F95;

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

  --max-w: 1140px;
  --max-w-narrow: 740px;
  --radius: 4px;
  --radius-lg: 8px;
  --shadow: 0 2px 12px rgba(28,28,30,0.08);
  --shadow-lg: 0 8px 40px rgba(28,28,30,0.14);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--text);
  background: var(--ash);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ember); text-decoration: none; }
a:hover { color: var(--ember-dark); text-decoration: underline; }
ul, ol { padding-left: 1.5em; }
li { margin-bottom: 0.35em; }

/* ─── Layout ─────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section--tight { padding: 2.5rem 0; }
.section--dark { background: var(--charcoal); color: var(--ash); }
.section--smoke { background: var(--smoke); color: var(--ash); }
.section--mid { background: var(--ash-mid); }

/* ─── Header / Nav ───────────────────────────────────────────── */
.site-header {
  background: var(--charcoal);
  border-bottom: 3px solid var(--ember);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.site-logo__icon {
  width: 32px;
  height: 32px;
  color: var(--ember);
}
.site-logo__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
  line-height: 1;
}
.site-logo__name span { color: var(--ember-light); }
.site-nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.site-nav a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ash-dark);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--ember-light); text-decoration: none; }
.nav-cta {
  background: var(--ember);
  color: var(--white) !important;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--ember-dark) !important; }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--ash); padding: 4px; }
@media (max-width: 768px) {
  .site-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--smoke); flex-direction: column; align-items: flex-start; padding: 1rem 1.5rem; gap: 1rem; border-bottom: 2px solid var(--ember); }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
}

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
  background: var(--charcoal);
  color: var(--white);
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(212,81,26,0.18) 0%, transparent 65%),
              radial-gradient(ellipse at 10% 80%, rgba(212,81,26,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember-light);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero__eyebrow::before { content: '—'; }
.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--white);
  max-width: 780px;
  margin-bottom: 1.25rem;
}
.hero__headline em { color: var(--ember-light); font-style: normal; }
.hero__sub {
  font-size: 1.15rem;
  color: var(--ash-dark);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 2rem;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all 0.2s;
  line-height: 1;
}
.btn--primary { background: var(--ember); color: var(--white); }
.btn--primary:hover { background: var(--ember-dark); color: var(--white); text-decoration: none; }
.btn--outline { background: transparent; color: var(--ash); border-color: var(--ash-dark); }
.btn--outline:hover { border-color: var(--ember-light); color: var(--ember-light); text-decoration: none; }
.btn--dark { background: var(--charcoal); color: var(--white); }
.btn--dark:hover { background: var(--smoke); text-decoration: none; color: var(--white); }

/* ─── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-light);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--ember); }
.breadcrumb span { margin: 0 0.4rem; }

/* ─── Alert Banner ───────────────────────────────────────────── */
.alert {
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid;
  font-size: 0.9375rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.alert--warning { background: #FFF3E0; border-color: var(--ember); color: #5D3A00; }
.alert--info    { background: #E8F4FD; border-color: #2196F3; color: #0D3A5C; }
.alert--note    { background: var(--ash-mid); border-color: var(--ash-dark); color: var(--text-muted); }
.alert__icon { flex-shrink: 0; margin-top: 2px; }
.alert strong { font-weight: 600; }

/* ─── Stat Bar ───────────────────────────────────────────────── */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
}
.stat-bar__item {
  padding: 1.5rem 1.25rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-bar__item:last-child { border-right: none; }
.stat-bar__num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--ember);
  line-height: 1;
  display: block;
}
.stat-bar__label { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.3rem; line-height: 1.3; }

/* ─── Card Grid ──────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.card-grid--2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: var(--shadow); border-color: var(--ash-dark); }
.card__tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ember);
  margin-bottom: 0.5rem;
}
.card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
  line-height: 1.3;
}
.card__title a { color: inherit; }
.card__title a:hover { color: var(--ember); text-decoration: none; }
.card__body { font-size: 0.9375rem; color: var(--text-muted); line-height: 1.6; }
.card__footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: 0.875rem; }
.card--featured { border-left: 4px solid var(--ember); }

/* ─── Data Table ─────────────────────────────────────────────── */
.data-table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: var(--white); }
.data-table thead { background: var(--charcoal); color: var(--ash); }
.data-table th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.data-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.5;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--ash); }
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge--yes    { background: #D4EDDA; color: #155724; }
.badge--no     { background: #F8D7DA; color: #721C24; }
.badge--varies { background: #FFF3CD; color: #856404; }
.badge--required { background: #D1ECF1; color: #0C5460; }

/* ─── Article Layout ─────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .article-layout { grid-template-columns: 1fr; } }
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  margin: 2.5rem 0 0.75rem;
  line-height: 1.25;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.article-body h2:first-child { margin-top: 0; border-top: none; }
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.75rem 0 0.5rem;
}
.article-body p { margin-bottom: 1.1rem; }
.article-body ul, .article-body ol { margin-bottom: 1.1rem; }
.article-body strong { font-weight: 600; color: var(--text); }
.article-body blockquote {
  border-left: 4px solid var(--ember);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--ash-mid);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-muted);
}

/* Sidebar */
.sidebar { position: sticky; top: 84px; }
.sidebar__box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.sidebar__title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.toc-list { list-style: none; padding: 0; }
.toc-list li { margin-bottom: 0.4rem; }
.toc-list a { font-size: 0.875rem; color: var(--text-muted); line-height: 1.4; display: block; }
.toc-list a:hover { color: var(--ember); text-decoration: none; }

/* ─── FAQ ─────────────────────────────────────────────────────── */
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.1rem 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  line-height: 1.4;
}
.faq-question:hover { color: var(--ember); }
.faq-question .faq-icon { flex-shrink: 0; transition: transform 0.25s; font-size: 1.2rem; color: var(--ember); }
.faq-question.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 0 1.1rem; color: var(--text-muted); font-size: 0.9375rem; line-height: 1.7; }
.faq-answer.open { display: block; }

/* ─── Tool / Wizard ──────────────────────────────────────────── */
.tool-box {
  background: var(--white);
  border: 2px solid var(--ember);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: 2rem 0;
}
.tool-box__title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.tool-box__sub { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 1.5rem;
}
.wizard-progress__dot {
  height: 4px;
  flex: 1;
  background: var(--border);
  border-radius: 2px;
  transition: background 0.3s;
}
.wizard-progress__dot.done { background: var(--ember); }
.question-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  display: block;
}
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.choice-btn {
  border: 2px solid var(--border);
  background: var(--ash);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  transition: all 0.2s;
  line-height: 1.4;
}
.choice-btn:hover { border-color: var(--ember); background: #FFF3ED; }
.choice-btn.selected { border-color: var(--ember); background: #FFF3ED; color: var(--ember-dark); font-weight: 600; }
.wizard-nav { display: flex; gap: 0.75rem; margin-top: 1rem; }
.wizard-result {
  background: var(--ash-mid);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1rem;
}
.wizard-result__verdict {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.verdict--permit { color: var(--ember-dark); }
.verdict--likely  { color: #B07800; }
.verdict--likely2 { color: #B07800; }
.verdict--nopermit { color: #1B5E20; }

/* ─── State Map Grid ─────────────────────────────────────────── */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.6rem;
}
.state-chip {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: all 0.18s;
  text-align: center;
}
.state-chip:hover { border-color: var(--ember); background: #FFF3ED; color: var(--ember); text-decoration: none; }

/* ─── City Directory ─────────────────────────────────────────── */
.city-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.5rem; list-style: none; padding: 0; }
.city-list a { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; color: var(--text-muted); padding: 0.35rem 0; }
.city-list a::before { content: '→'; color: var(--ember); font-size: 0.8rem; }
.city-list a:hover { color: var(--ember); text-decoration: none; }

/* ─── Download CTA ───────────────────────────────────────────── */
.download-box {
  background: linear-gradient(135deg, var(--smoke) 0%, var(--charcoal) 100%);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.download-box__icon { font-size: 2.5rem; flex-shrink: 0; }
.download-box__text h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 0.35rem; }
.download-box__text p { color: var(--ash-dark); font-size: 0.9rem; margin: 0; }
.download-box .btn { margin-top: 0; flex-shrink: 0; margin-left: auto; }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--charcoal);
  color: var(--ash-dark);
  padding: 3rem 0 1.5rem;
  font-size: 0.875rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { color: var(--ash-dark); font-size: 0.875rem; margin-top: 0.75rem; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ember-light);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--ash-dark); text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.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: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
}
.footer-bottom a { color: var(--text-light); }
.footer-bottom a:hover { color: var(--ash); }

/* ─── Disclaimer ─────────────────────────────────────────────── */
.disclaimer {
  background: var(--ash-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.6;
  margin: 2rem 0;
}
.disclaimer strong { color: var(--text-muted); }

/* ─── Page Header ─────────────────────────────────────────────── */
.page-header {
  background: var(--charcoal);
  color: var(--white);
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--ember-light), transparent);
}
.page-header__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ember-light);
  margin-bottom: 0.75rem;
}
.page-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.page-header__sub {
  font-size: 1.05rem;
  color: var(--ash-dark);
  max-width: 640px;
  line-height: 1.6;
}
.page-header__meta {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ─── Utilities ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-ember  { color: var(--ember); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-top { margin-top: 3rem; }
.inline-link { color: var(--ember); font-weight: 600; text-decoration: underline; }
.inline-link:hover { color: var(--ember-dark); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.section-sub { color: var(--text-muted); font-size: 1.0625rem; margin-bottom: 2rem; max-width: 580px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }

/* ─── Print / A11y ───────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
@media print { .site-header, .site-footer, .sidebar { display: none; } .article-layout { grid-template-columns: 1fr; } }
