/* SPARO — shared design tokens & base components
   Exact token system: brand #41B9F1, Space Grotesk + Satoshi, dark only. */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&display=swap');

:root {
  /* surfaces */
  --bg: #16181D;
  --card: #1C1E23;
  --card-2: #20232A;
  --border: rgba(255,255,255,0.08);
  --border-soft: rgba(255,255,255,0.05);
  --border-hover: rgba(255,255,255,0.13);

  /* text */
  --text: #f0f0f0;
  --muted: #94A3B8;       /* info-muted, secondary text */
  --dim: rgba(255,255,255,0.34);

  /* brand + system */
  --brand: #41B9F1;
  --brand-deep: #2A9FD8;
  --accent: #A78BFA;      /* purple secondary */
  --tertiary: #00DCFD;    /* cyan */
  --success: #00E676;
  --danger: #EF4444;
  --warning: #F59E0B;
  --neutral: #6B7280;
  --live: var(--success);
  --gold: #F59E0B;

  /* podium */
  --pos-1: #F59E0B;                              /* warning gold */
  --pos-2: #94A3B8;                              /* info-muted */
  --pos-3: rgba(245,158,11,0.62);               /* warning / ~70 */

  /* archetypes (exact mapping) */
  --fast: #A78BFA;     --fast-bg: color-mix(in oklab, #A78BFA 13%, var(--card));     /* Speed → accent */
  --counter: #41B9F1;  --counter-bg: color-mix(in oklab, #41B9F1 13%, var(--card));  /* Timing → brand */
  --iron: #00DCFD;     --iron-bg: color-mix(in oklab, #00DCFD 13%, var(--card));     /* Guard → tertiary */
  --heavy: #F59E0B;    --heavy-bg: color-mix(in oklab, #F59E0B 13%, var(--card));    /* Technique → warning */
  --complete: #00E676; --complete-bg: color-mix(in oklab, #00E676 13%, var(--card)); /* Complete → success */

  --font: 'Satoshi', system-ui, sans-serif;
  --cond: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'Space Grotesk', system-ui, sans-serif;

  /* radius scale */
  --r-sm: 8px;
  --r-md: 12px;
  --r: 16px;       /* lg — main cards */
  --r-xl: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-family: var(--cond); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

.mono { font-family: var(--mono); }
.cond { font-family: var(--cond); }

/* ---- archetype badge (pattern: color/10 bg + color text) ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.1;
}
.badge[data-arch="fast"]     { color: var(--fast);     background: color-mix(in oklab, var(--fast) 13%, transparent); }
.badge[data-arch="counter"]  { color: var(--counter);  background: color-mix(in oklab, var(--counter) 13%, transparent); }
.badge[data-arch="iron"]     { color: var(--iron);     background: color-mix(in oklab, var(--iron) 13%, transparent); }
.badge[data-arch="heavy"]    { color: var(--heavy);    background: color-mix(in oklab, var(--heavy) 13%, transparent); }
.badge[data-arch="complete"] { color: var(--complete); background: color-mix(in oklab, var(--complete) 14%, transparent); }

/* ---- rarity dot ---- */
.rdot {
  width: 0.62em; height: 0.62em; border-radius: 999px;
  display: inline-block; flex: none;
}
.rdot[data-r="common"]    { background: var(--neutral); }
.rdot[data-r="rare"]      { background: var(--brand);   box-shadow: 0 0 8px color-mix(in oklab, var(--brand) 60%, transparent); }
.rdot[data-r="epic"]      { background: var(--accent);  box-shadow: 0 0 9px color-mix(in oklab, var(--accent) 65%, transparent); }
.rdot[data-r="legendary"] { background: var(--warning); box-shadow: 0 0 11px color-mix(in oklab, var(--warning) 78%, transparent); }

/* ---- avatar (initials) ---- */
.avatar {
  display: grid; place-items: center;
  border-radius: 999px;
  font-family: var(--cond);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
  background: var(--card-2);
  box-shadow: inset 0 0 0 1px var(--border);
  flex: none;
}
.avatar[data-arch="fast"]     { color: var(--fast);     background: var(--fast-bg); }
.avatar[data-arch="counter"]  { color: var(--counter);  background: var(--counter-bg); }
.avatar[data-arch="iron"]     { color: var(--iron);     background: var(--iron-bg); }
.avatar[data-arch="heavy"]    { color: var(--heavy);    background: var(--heavy-bg); }
.avatar[data-arch="complete"] { color: var(--complete); background: var(--complete-bg); }

/* ---- live dot ---- */
.livedot {
  width: 9px; height: 9px; border-radius: 999px; background: var(--live);
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--live) 70%, transparent);
  animation: livepulse 2s infinite;
}
@keyframes livepulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, var(--live) 60%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ---- generic card ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
}

/* ---- buttons ---- */
.btn {
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.005em;
  border: none;
  border-radius: var(--r-md);
  padding: 12px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  transition: transform .12s ease, filter .2s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--brand); color: #fff; box-shadow: 0 0 16px rgba(65,185,241,0.3); }
.btn-accent:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; color: rgba(255,255,255,0.8); box-shadow: inset 0 0 0 1px var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: var(--text); }

/* eyebrow / section label */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand);
}

::selection { background: var(--brand); color: #fff; }

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 999px; }
*::-webkit-scrollbar-track { background: transparent; }
