/* The whole palette hangs off these four values. A pull request that changes
   one of them changes the entire site, which makes a preview environment
   worth opening rather than worth taking someone's word for. */
:root {
  --accent: #7c5cff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --bg: #0b0b12;
  --surface: #14141f;

  --text: #f2f2f7;
  --muted: #9a9ab0;
  --border: #24243a;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------- header --- */
header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.logo .dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-size: 15px;
}

nav {
  display: flex;
  gap: 26px;
  color: var(--muted);
  font-size: 0.93rem;
}

nav a {
  color: inherit;
  text-decoration: none;
}

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

/* ------------------------------------------------------------------ hero --- */
.hero {
  padding: 76px 0 56px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 560px;
  margin: 0 auto 28px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  filter: brightness(1.12);
}

/* ----------------------------------------------------------------- games --- */
h2 {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px;
  padding-bottom: 64px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.card .art {
  height: 108px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  margin-bottom: 14px;
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ------------------------------------------------------------------ game --- */
.arena {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 64px;
}

.arena-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.score {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.score b {
  color: var(--accent);
  font-size: 1.3rem;
}

#board {
  position: relative;
  height: 300px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: crosshair;
}

.target {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  border: 0;
  cursor: pointer;
  padding: 0;
}

.target:hover {
  filter: brightness(1.2);
}

.hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  pointer-events: none;
}

/* ----------------------------------------------------------------- badge --- */
/* Which environment is this? Every preview looks alike without it. */
#env-badge {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.76rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  z-index: 20;
  max-width: 260px;
}

#env-badge strong {
  color: var(--accent);
  display: block;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.86rem;
  padding: 22px 0 40px;
}
