/* agents.css - Public agent directory page
   Intentional warm cream surface — spacing/radius aligned with design-system grid */

:root {
  --agents-bg: #f5f2ec;
  --agents-text: #1a1916;
  --agents-text-muted: rgba(26, 25, 22, 0.55);
  --agents-border: rgba(26, 25, 22, 0.08);
  --agents-surface: rgba(26, 25, 22, 0.06);
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --radius-pill: 100px;
  --radius-md: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--agents-bg);
  color: var(--agents-text);
}

a { color: inherit; text-decoration: none; }
a, button, [role="button"] { touch-action: manipulation; }
a:focus-visible, button:focus-visible { outline: 2px solid rgba(26,25,22,0.6); outline-offset: 3px; border-radius: 4px; }

/* ── Skip link ── */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; top: 16px; left: 16px;
  width: auto; height: auto; overflow: visible;
  padding: 8px 16px; background: #1a1916; color: #f5f2ec;
  border-radius: 8px; z-index: 9999; font-size: 14px;
}

/* ── Header ── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 242, 236, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 25, 22, 0.08);
}
header .container {
  max-width: 1120px; margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  display: inline-flex; align-items: center;
  line-height: 0;
}
.logo img {
  height: 32px; width: auto;
  filter: brightness(0);
}
.header-cta {
  display: inline-flex; align-items: center;
  background: var(--agents-text); color: var(--agents-bg);
  padding: var(--space-sm) 18px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 600;
  transition: opacity 0.15s;
}
.header-cta:hover { opacity: 0.8; }

/* ── Container ── */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ── */
.hero {
  padding: 64px 0 40px;
  text-align: center;
}
.hero h1 {
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1a1916;
  margin-bottom: 12px;
  line-height: 1.15;
}
.hero-trust {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--agents-text-muted);
  margin-bottom: var(--space-md);
}
.hero-sub {
  font-size: 16px;
  color: var(--agents-text-muted);
  margin-bottom: var(--space-2xl);
}
.agent-count {
  display: inline-block;
  font-size: 14px; font-weight: 600;
  color: #1a1916;
  background: rgba(26, 25, 22, 0.06);
  border-radius: 100px;
  padding: 6px 14px;
  margin-bottom: 32px;
}

/* ── Search ── */
.search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto 24px;
}
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: rgba(26, 25, 22, 0.35);
  pointer-events: none;
}
#search-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: #fff;
  border: 1.5px solid rgba(26, 25, 22, 0.12);
  border-radius: 14px;
  font-size: 15px;
  color: #1a1916;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
#search-input::placeholder { color: rgba(26, 25, 22, 0.4); }
#search-input:focus {
  border-color: #1a1916;
  box-shadow: 0 0 0 3px rgba(26, 25, 22, 0.06);
}

/* ── Filter chips ── */
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  min-height: 44px;
  touch-action: manipulation;
  border-radius: 100px;
  border: 1.5px solid rgba(26, 25, 22, 0.14);
  background: transparent;
  font-size: 13px; font-weight: 600;
  color: rgba(26, 25, 22, 0.6);
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.chip:hover {
  border-color: rgba(26, 25, 22, 0.3);
  color: #1a1916;
}
.chip.active {
  background: #1a1916;
  border-color: #1a1916;
  color: #f5f2ec;
}
.chip:focus-visible {
  outline: 2px solid #1127d2;
  outline-offset: 2px;
}
.chip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.chip-dot-verified { background: #22c55e; }
.chip-dot-pro { background: #3b82f6; }
.chip-dot-premium { background: #d4e84a; filter: brightness(0.8); }
.chip.active .chip-dot-premium { filter: brightness(1.3); }

/* ── Results bar ── */
.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.results-count {
  font-size: 13px;
  color: rgba(26, 25, 22, 0.5);
  font-weight: 500;
}

/* ── Agent grid ── */
.agent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}

/* ── Agent card ── */
.agent-card {
  background: #fff;
  border: 1.5px solid rgba(26, 25, 22, 0.08);
  border-radius: 20px;
  padding: 24px;
  display: flex; flex-direction: column;
  transition: box-shadow 0.22s cubic-bezier(0.22,1,0.36,1), border-color 0.22s cubic-bezier(0.22,1,0.36,1);
}
.agent-card:hover {
  box-shadow: 0 8px 32px rgba(26, 25, 22, 0.1);
  border-color: rgba(26, 25, 22, 0.14);
}
.card-photo-wrap {
  position: relative;
  width: 72px; height: 72px;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.card-photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(26, 25, 22, 0.08);
  display: block;
}
.card-photo-placeholder {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(26, 25, 22, 0.08);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Manrope', sans-serif;
  font-size: 22px; font-weight: 700;
  color: rgba(26, 25, 22, 0.4);
  letter-spacing: -0.5px;
}
.verified-badge {
  position: absolute; bottom: 0; right: 0;
  width: 22px; height: 22px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
}
.verified-badge svg { display: block; }

.card-name {
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 16px; font-weight: 700;
  color: #1a1916;
  margin-bottom: 4px;
  line-height: 1.25;
}
.card-agency {
  font-size: 13px;
  color: rgba(26, 25, 22, 0.5);
  margin-bottom: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-area {
  font-size: 12px;
  color: rgba(26, 25, 22, 0.45);
  margin-bottom: 12px;
}
.card-meta {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  margin-top: auto;
}
.tier-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
}
.tier-badge-premium {
  background: rgba(212, 232, 74, 0.18);
  color: #5a6600;
}
.tier-badge-pro {
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}
.lead-count {
  font-size: 12px;
  color: rgba(26, 25, 22, 0.45);
}
.card-cta {
  display: block; width: 100%;
  padding: 11px 16px;
  background: #1a1916;
  color: #f5f2ec;
  border-radius: 12px;
  font-size: 14px; font-weight: 600;
  text-align: center;
  transition: opacity 0.15s;
  margin-top: auto;
}
.card-cta:hover { opacity: 0.8; }

/* ── Join CTA card ── */
.agent-card-join {
  border: 2px dashed rgba(212, 232, 74, 0.5);
  background: rgba(212, 232, 74, 0.04);
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 12px;
}
.agent-card-join:hover {
  border-color: #d4e84a;
  background: rgba(212, 232, 74, 0.08);
  box-shadow: none;
  transform: none;
}
.join-card-icon {
  color: #5a6600;
  margin-bottom: 4px;
}
.join-card-heading {
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 16px; font-weight: 700;
  color: #1a1916;
}
.join-card-sub {
  font-size: 13px;
  color: rgba(26, 25, 22, 0.55);
  line-height: 1.5;
}
.join-card-cta {
  background: var(--color-brand);
  color: var(--color-text-primary);
  margin-top: 4px;
}
.join-card-cta:hover { opacity: 0.85; }

/* ── Empty state ── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
}
.empty-state h3 {
  font-size: 18px; font-weight: 700;
  color: #1a1916;
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 14px;
  color: rgba(26, 25, 22, 0.5);
  margin-bottom: 20px;
}
.empty-clear-btn {
  background: none;
  border: 1.5px solid rgba(26, 25, 22, 0.2);
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  color: #1a1916;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.empty-clear-btn:hover { background: rgba(26, 25, 22, 0.05); }
.empty-retry-btn {
  background: var(--color-brand);
  border: none;
  border-radius: 100px;
  padding: 10px 20px;
  font-size: 14px; font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.empty-retry-btn:hover { opacity: 0.85; }

/* ── Loading skeleton ── */
.skeleton-card {
  background: #fff;
  border: 1.5px solid rgba(26, 25, 22, 0.08);
  border-radius: 20px;
  padding: 24px;
}
.skel {
  background: linear-gradient(135deg, rgba(26,25,22,0.06) 25%, rgba(26,25,22,0.1) 50%, rgba(26,25,22,0.06) 75%);
  background-size: 400% 400%;
  animation: skel-shimmer 1.6s ease infinite;
  border-radius: 8px;
}
@keyframes skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0% 100%; }
}
.skel-avatar { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 16px; }
.skel-line { height: 14px; margin-bottom: 8px; }
.skel-line-sm { height: 12px; margin-bottom: 8px; }
.skel-btn { height: 42px; border-radius: 12px; margin-top: 16px; }

/* ── Footer ── */
.footer {
  padding: 32px 0;
  border-top: 1px solid rgba(26, 25, 22, 0.08);
  text-align: center;
}
.footer p {
  font-size: 13px;
  color: rgba(26, 25, 22, 0.4);
}
.footer-link {
  color: rgba(26, 25, 22, 0.5);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-link:hover { color: #1a1916; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .agent-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .agent-grid { grid-template-columns: 1fr; gap: 16px; }
  .hero { padding: 40px 0 28px; }
  .hero h1 { font-size: 26px; }
  header .container { padding: 0 16px; }
  .container { padding: 0 16px; }
}
