/* Shared styles for /agencies/<state>/ directory pages.
   Linked from each generated state page + the /agencies/ hub.
   Built on the same design tokens as /solutions/_styles.css so brand
   consistency holds across the site. */

:root {
  --bg: #08080d;
  --bg2: #0e0e16;
  --bg3: #14141f;
  --surface: #1a1a2a;
  --border: #2a2a3a;
  --text: #e8e6e3;
  --text2: #9a9aaa;
  --text3: #6a6a7a;
  --amber: #f0a830;
  --amber-dim: rgba(240, 168, 48, 0.12);
  --amber-glow: rgba(240, 168, 48, 0.25);
  --green: #4ade80;
  --blue: #60a5fa;
  --red: #f87171;
  --purple: #a78bfa;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--amber);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  padding: 72px 20px 56px;
  background: linear-gradient(135deg, #1a0a2e 0%, #0a1a2e 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(240, 168, 48, 0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(240, 168, 48, 0.1);
  border: 1px solid rgba(240, 168, 48, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5.2vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.hero h1 em {
  color: var(--amber);
  font-style: normal;
}
.hero .lede {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text2);
  max-width: 760px;
  line-height: 1.6;
  margin-bottom: 22px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
}
.hero-meta strong {
  color: var(--amber);
}

/* ── Trust strip ─────────────────────────────────────────────────── */
.trust-strip {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 28px 20px;
}
.trust-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.trust-stat {
  text-align: center;
}
.trust-stat .num {
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--amber);
  line-height: 1.1;
}
.trust-stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Sections ────────────────────────────────────────────────────── */
.section {
  padding: 60px 20px;
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.section h2 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.6vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.section h3 {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 600;
  margin: 24px 0 10px;
}
.section p {
  color: var(--text2);
  margin-bottom: 14px;
}
.section ul,
.section ol {
  color: var(--text2);
  padding-left: 22px;
  margin-bottom: 14px;
}
.section li {
  margin-bottom: 6px;
}

/* ── Directory table ─────────────────────────────────────────────── */
.directory {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg2);
  overflow: hidden;
}
.directory-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.directory-table thead th {
  background: var(--bg3);
  padding: 14px 14px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  border-bottom: 1px solid var(--border);
}
.directory-table tbody td {
  padding: 18px 14px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}
.directory-table tbody tr:hover {
  background: rgba(240, 168, 48, 0.04);
}
.directory-table .rank {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--text3);
  font-weight: 700;
  width: 50px;
}
.directory-table .agency-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}
.directory-table .agency-name a {
  color: inherit;
}
.directory-table .agency-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 8px;
}
.directory-table .citations {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.directory-table .citation-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text2);
  transition: border-color 0.15s;
}
.directory-table .citation-chip:hover {
  border-color: var(--amber);
  color: var(--amber);
  text-decoration: none;
}
.directory-table .price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  white-space: nowrap;
}
.directory-table .verdict {
  color: var(--text3);
  font-size: 12px;
  font-style: italic;
  max-width: 240px;
}

/* Highlighted ahmeego row */
.directory-table tr.row-recommended {
  background: linear-gradient(90deg, rgba(240, 168, 48, 0.08) 0%, rgba(240, 168, 48, 0.02) 100%);
  position: relative;
}
.directory-table tr.row-recommended:hover {
  background: linear-gradient(90deg, rgba(240, 168, 48, 0.12) 0%, rgba(240, 168, 48, 0.04) 100%);
}
.directory-table tr.row-recommended td {
  border-top-color: var(--amber);
}
.directory-table tr.row-recommended .rank {
  color: var(--amber);
}
.directory-table tr.row-recommended .agency-name {
  color: var(--amber);
}
.directory-table .badge-recommended {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--amber);
  color: #0a0a0f;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Mobile: stack table cells */
@media (max-width: 880px) {
  .directory-table thead {
    display: none;
  }
  .directory-table,
  .directory-table tbody,
  .directory-table tr,
  .directory-table td {
    display: block;
    width: 100%;
  }
  .directory-table tr {
    padding: 16px 14px;
    border-top: 1px solid var(--border);
  }
  .directory-table tr.row-recommended {
    border-top: 2px solid var(--amber);
  }
  .directory-table td {
    padding: 4px 0;
    border: none;
  }
  .directory-table .rank {
    display: inline-block;
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
  }
  .directory-table .col-agency {
    display: inline-block;
    vertical-align: middle;
  }
  .directory-table .col-price::before,
  .directory-table .col-verdict::before {
    content: attr(data-label) ': ';
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text3);
    text-transform: uppercase;
  }
}

/* ── Why ahmeego #1 cards ────────────────────────────────────────── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.why-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}
.why-card .icon {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.why-card h4 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.why-card p {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.5;
  margin: 0;
}

/* ── Buddy demo ──────────────────────────────────────────────────── */
.buddy-demo {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}
.buddy-demo-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.buddy-demo-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.buddy-demo-header .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.buddy-demo .turn {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.buddy-demo .turn .who {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}
.buddy-demo .turn.user .who {
  background: var(--amber-dim);
  color: var(--amber);
}
.buddy-demo .turn.buddy .who {
  background: rgba(96, 165, 250, 0.15);
  color: var(--blue);
}
.buddy-demo .turn .body {
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
  flex: 1;
}

/* ── John bio + brand-SERP block ─────────────────────────────────── */
.bio-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-top: 24px;
}
.bio-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--amber);
}
.bio-card h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 4px;
}
.bio-card .role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber);
  margin-bottom: 12px;
}
.bio-card p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 12px;
}
.serp-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.serp-block .serp-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
  margin-bottom: 8px;
}
.serp-block .serp-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.serp-block .serp-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
  transition: all 0.15s;
}
.serp-block .serp-chip:hover {
  border-color: var(--amber);
  color: var(--amber);
  text-decoration: none;
}
@media (max-width: 640px) {
  .bio-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .bio-card img {
    margin: 0 auto;
  }
  .bio-card .serp-links {
    justify-content: center;
  }
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq-list {
  margin-top: 16px;
}
.faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber);
  font-size: 20px;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item .answer {
  padding: 0 20px 16px;
  color: var(--text2);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Methodology card (bottom of page) ──────────────────────────── */
.methodology {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  margin-top: 32px;
}
.methodology h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  margin-bottom: 14px;
}
.methodology h4 {
  font-size: 13px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin: 18px 0 6px;
}
.methodology p,
.methodology li {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
}
.methodology .last-verified {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.methodology .correction {
  background: var(--bg3);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 12px;
  margin-top: 12px;
}
.methodology .correction code {
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  color: var(--amber);
}

/* ── Related states grid ─────────────────────────────────────────── */
.related-states {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.related-states a {
  display: block;
  padding: 10px 12px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text2);
  transition: all 0.15s;
}
.related-states a:hover {
  border-color: var(--amber);
  color: var(--amber);
  text-decoration: none;
}

/* ── CTA band ────────────────────────────────────────────────────── */
.cta-band {
  background: linear-gradient(135deg, var(--amber-dim) 0%, rgba(96, 165, 250, 0.05) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 56px 20px;
  text-align: center;
}
.cta-band h2 {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.4vw, 32px);
  margin-bottom: 12px;
}
.cta-band p {
  color: var(--text2);
  margin-bottom: 22px;
}
.cta-band .cta-btn {
  display: inline-block;
  padding: 14px 28px;
  background: var(--amber);
  color: #0a0a0f;
  border-radius: 8px;
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: transform 0.15s;
}
.cta-band .cta-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

/* ── Lead-form (reused from solutions, but inlined here for SSR) ── */
.lead-form-wrap {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  margin-top: 24px;
  max-width: 640px;
}
/* Two-column layout: form sits beside the value-prop block right after
   the directory table. Stacks on mobile so nothing scrolls horizontally. */
@media (max-width: 880px) {
  .section-inner[style*='grid-template-columns'] {
    grid-template-columns: 1fr !important;
  }
}
.lead-form-wrap h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 6px;
}
.lead-form-wrap .form-sub {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 16px;
}
.lead-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.lead-form-wrap label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.lead-form-wrap input,
.lead-form-wrap select,
.lead-form-wrap textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}
.lead-form-wrap input:focus,
.lead-form-wrap select:focus,
.lead-form-wrap textarea:focus {
  outline: none;
  border-color: var(--amber);
}
.lead-form-wrap button {
  width: 100%;
  padding: 12px;
  background: var(--amber);
  color: #0a0a0f;
  border: none;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
}
.honeypot {
  display: none;
}
.lead-form-success {
  display: none;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid var(--green);
  color: var(--green);
  padding: 14px;
  border-radius: 6px;
  margin-top: 12px;
  font-size: 14px;
}

/* ── Footer breadcrumb ───────────────────────────────────────────── */
.crumb {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 14px;
}
.crumb a {
  color: var(--text3);
}
.crumb a:hover {
  color: var(--amber);
}
