/* ToolSignal — index.css
   Styles for homepage, reviews index, categories index, and comparisons index pages.
   Loaded by build-site.js buildReviewsIndex(), buildCategoryPages(), etc. */

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  line-height: 1.6;
}

.hero {
  max-width: 1100px;
  margin: 58px auto 0;
  padding: 2.5rem 2rem 1.5rem;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: .5rem;
}

.hero-desc {
  color: var(--muted);
  max-width: 600px;
}

.count {
  display: inline-block;
  background: var(--surface2);
  color: var(--accent);
  border: 1px solid var(--border);
  padding: .2rem .8rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  margin-top: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.controls {
  max-width: 1100px;
  margin: 0 auto;
  padding: .75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.filter-pill,
.sort-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .75rem;
  cursor: pointer;
  transition: border-color .15s, color .15s, background-color .15s;
  font-family: inherit;
}

.filter-pill.active,
.sort-pill.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 229, 160, .08);
}

.sort-divider {
  width: 1px;
  background: var(--border);
  height: 20px;
  margin: 0 .25rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-badge {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.card-desc {
  font-size: .85rem;
  color: var(--muted);
  flex: 1;
  margin-bottom: .8rem;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-score {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.card-score span {
  font-weight: 700;
  color: var(--accent);
}

.score-bar {
  width: 60px;
  background: var(--surface2);
  border-radius: 4px;
  height: 4px;
}

.score-fill {
  background: var(--accent);
  height: 4px;
  border-radius: 4px;
}

/* Category index cards */
.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cat-icon {
  font-size: 2rem;
}

.cat-name {
  font-size: 1rem;
  font-weight: 700;
}

.cat-desc {
  font-size: .83rem;
  color: var(--muted);
  line-height: 1.5;
}

/* Comparison cards */
.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.compare-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .6rem;
}

.compare-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .4rem;
  line-height: 1.3;
}

.compare-desc {
  font-size: .85rem;
  color: var(--muted);
  flex: 1;
}

footer {
  text-align: center;
  padding: 2rem;
  color: var(--muted);
  font-size: .85rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

/* Social proof */
.social-proof {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

.proof-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.proof-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

.proof-label {
  font-size: .78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

@media (max-width: 600px) {
  .proof-items {
    grid-template-columns: repeat(2, 1fr);
  }
}
