/* The guild directory (spawnix.gg/guilds), in the marketing site's look:
   Night colors, Chakra Petch for display and labels, Space Grotesk for
   text, rounded panels and diamond pips (web/marketing). */

:root {
  --bg: #050b16;
  --bg-raised: #08111f;
  --bg-panel: #0b1526;
  --bg-panel-hover: #111e35;
  --line: #1e2d4a;
  --line-strong: #2c3f63;
  --text: #e8effc;
  --text-soft: #b4c2da;
  --text-muted: #8798b8;
  --cyan: #3fcbf4;
  --blue: #4c84ff;
  --blue-hover: #6a98ff;
  --violet: #a57bff;
  --green: #3ddc97;
  --amber: #f5b84a;
  --red: #ff6b7a;
  --on-accent: #04101f;
  --glow: rgba(76, 132, 255, 0.32);
  --ascend: linear-gradient(90deg, #3fcbf4, #4c84ff 55%, #a57bff);
  --display: "Chakra Petch", "Space Grotesk", system-ui, sans-serif;
  --body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; background: var(--bg); }

body {
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--cyan); }
a:hover { color: var(--text); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

.muted { color: var(--text-muted); }

/* ── Buttons, pips, chips ─────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 12px;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.25s ease;
}
.btn-primary { background: var(--blue); color: var(--on-accent); }
.btn-primary:hover { background: var(--blue-hover); color: var(--on-accent); box-shadow: 0 0 24px var(--glow); }
.btn-ghost { background: var(--bg-panel); border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--blue); background: var(--bg-panel-hover); color: var(--text); }
.btn-small { min-height: 40px; padding: 8px 18px; font-size: 14px; }

.pip, .eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip {
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-soft);
  background: var(--bg-raised);
}
.chip a { color: inherit; text-decoration: none; }
.chip-on { border-color: rgba(61, 220, 151, 0.5); color: var(--green); background: rgba(61, 220, 151, 0.08); }

/* ── Nav and footer ───────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 11, 22, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.brand-mark { width: 46px; height: auto; filter: drop-shadow(0 0 10px rgba(76, 132, 255, 0.4)); }
.brand-word { background: var(--ascend); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) {
  color: var(--text-soft);
  text-decoration: none;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a:not(.btn):hover { color: var(--text); }
@media (max-width: 760px) {
  .nav-section { display: none; }
  .brand { font-size: 18px; }
  .brand-mark { width: 38px; }
}

.footer { margin-top: 80px; padding: 32px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-soft); }
.footer p { margin: 0 0 6px; }

/* ── List pages ───────────────────────────────────────────── */

.hero { padding: 56px 0 28px; background: radial-gradient(900px 300px at 20% 0%, rgba(76, 132, 255, 0.14), transparent 70%); }
h1 {
  font-family: var(--display);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  margin: 0 0 14px;
}
.lede { font-size: 18px; color: var(--text-soft); max-width: 680px; margin: 0 0 18px; }
.crumbs { margin: 0 0 12px; font-family: var(--display); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.crumbs a { color: var(--cyan); text-decoration: none; }

.filters {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field span { font-family: var(--display); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.field input, .field select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; color: var(--text-soft); white-space: nowrap; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.filter-actions { display: flex; align-items: center; gap: 12px; grid-column: 1 / -1; }
.reset { color: var(--text-muted); font-size: 14px; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr 1fr; } .field-q { grid-column: 1 / -1; } }
@media (max-width: 520px) { .filters { grid-template-columns: 1fr; } }

.count { min-height: 1.6em; margin: 18px 0 12px; color: var(--text-muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
@media (max-width: 360px) { .grid { grid-template-columns: 1fr; } }

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--line-strong); }
.card-recruiting { border-color: rgba(61, 220, 151, 0.25); }
.card-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 6;
  background: linear-gradient(135deg, #0f1d36, #1a1440);
  text-decoration: none;
}
.card-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-initials { font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: 0.1em; background: var(--ascend); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px 18px 18px; }
.card-meta { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.card-meta .pip { width: 6px; height: 6px; }
.card-name { margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.15; }
.card-name a { color: var(--text); text-decoration: none; }
.card-name a:hover { color: var(--cyan); }
.card-tagline { margin: 0; color: var(--text-soft); font-size: 15px; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 4px 0 0; font-size: 14px; }
.facts dt { font-family: var(--display); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.card-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }

.empty { padding: 48px 24px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 16px; color: var(--text-soft); }
.empty h2 { margin: 0 0 6px; font-family: var(--display); }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 28px 0 0; color: var(--text-muted); }

.games { margin-top: 56px; }
.games h2 { font-family: var(--display); font-size: 24px; margin: 0 0 14px; }
.games ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.games a {
  display: inline-flex;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-panel);
  color: var(--text);
  text-decoration: none;
}
.games a:hover { border-color: var(--blue); }
.games a span { color: var(--text-muted); }

/* ── A guild's page ───────────────────────────────────────── */

.profile-hero { position: relative; padding: 56px 0 32px; overflow: hidden; background: radial-gradient(900px 300px at 20% 0%, rgba(76, 132, 255, 0.14), transparent 70%); }
.profile-hero.has-banner { padding-top: 160px; }
.profile-banner { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.45; }
.profile-hero.has-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 11, 22, 0.2), var(--bg)); }
.profile-head { position: relative; z-index: 1; }
.profile-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.profile { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
@media (max-width: 800px) { .profile { grid-template-columns: 1fr; } }
.profile-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.panel { padding: 20px 22px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 16px; }
.panel h2 { margin: 0 0 10px; font-family: var(--display); font-size: 20px; }
.panel p { margin: 0 0 12px; color: var(--text-soft); overflow-wrap: anywhere; }
.panel p:last-child { margin-bottom: 0; }
.facts-stack { grid-template-columns: 1fr; gap: 14px; margin: 0; }
.roles { margin: 0; padding: 0; list-style: none; }
.roles li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.roles li:last-child { border-bottom: 0; }
.role { font-family: var(--display); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.role-open { color: var(--green); }
.role-limited { color: var(--amber); }
.role-closed { color: var(--text-muted); }
