/* Worldscar Bestiary — public showcase styling. Reuses the studio design tokens
   (:root in styles-*.css). Pages + creature data are generated by
   wildward/scripts/gen-bestiary-site.mjs, so this is the only hand-written CSS. */

.bestiary-count {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* biome switcher */
.biome-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.biome-chip {
  --bc: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid var(--line);
  background: rgba(13, 28, 53, 0.6);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}
.biome-chip::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--bc);
  box-shadow: 0 0 10px var(--bc);
}
.biome-chip:hover { transform: translateY(-2px); border-color: var(--bc); }
.biome-chip.is-active {
  border-color: var(--bc);
  background: color-mix(in srgb, var(--bc) 16%, transparent);
}

/* creature grid + cards */
.bestiary-grid {
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}
.creature-card.is-boss { border-color: rgba(255, 184, 105, 0.5); }
.creature-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0.8rem;
  overflow: hidden;
  display: grid;
  place-items: center;
  margin-bottom: 0.85rem;
  background:
    radial-gradient(circle at 50% 28%, rgba(86, 213, 255, 0.16), transparent 60%),
    linear-gradient(160deg, rgba(8, 20, 37, 0.6), rgba(8, 20, 37, 0.95));
}
.creature-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
}
.creature-card h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: 0.01em;
}
.creature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem;
  margin: 0.5rem 0 0;
}
.creature-chip {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
}
.creature-chip.is-boss { color: var(--accent); border-color: rgba(255, 184, 105, 0.5); }
.creature-tag {
  margin: 0.7rem 0 0;
  font-style: italic;
  color: var(--brand-soft);
  font-size: 0.92rem;
  line-height: 1.4;
}
.creature-lore {
  margin: 0.5rem 0 0;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
}
.creature-meta {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}
.creature-aff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.aff-label {
  min-width: 4.1rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.type-chip {
  --tc: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tc);
  border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent);
  background: color-mix(in srgb, var(--tc) 12%, transparent);
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
}
.creature-combat { font-size: 0.85rem; font-weight: 700; }
.creature-where {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.biome-dot {
  --bc: var(--brand);
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--bc);
  box-shadow: 0 0 8px var(--bc);
  flex: none;
}

@media (max-width: 520px) {
  .bestiary-grid { grid-template-columns: 1fr; }
}
