/* kevmomc.xyz. Colours are tokens: change them here, light and dark both. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef0f4;
  --text: #11141a;
  --muted: #5b6372;
  --faint: #8b93a1;
  --line: #e3e6eb;
  --accent: #3a5bd9;
  --accent-ink: #ffffff;
  --ok: #17935a;
  --warn: #b7791f;
  --sleep: #6870c4;
  --void: #0d1018;          /* map thumbnails: unexplored space, same in both themes */
  --shadow: 0 1px 2px rgb(16 20 30 / .06), 0 4px 16px rgb(16 20 30 / .06);
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c11;
    --surface: #11141b;
    --surface-2: #181c25;
    --text: #e8ebf1;
    --muted: #9aa2b1;
    --faint: #687083;
    --line: #222735;
    --accent: #8fa6ff;
    --accent-ink: #0a0c11;
    --ok: #3ccf8b;
    --warn: #f0b429;
    --sleep: #a4abff;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
  }
}
:root[data-theme="dark"] {
  --bg: #0a0c11; --surface: #11141b; --surface-2: #181c25; --text: #e8ebf1; --muted: #9aa2b1;
  --faint: #687083; --line: #222735; --accent: #8fa6ff; --accent-ink: #0a0c11; --ok: #3ccf8b;
  --warn: #f0b429; --sleep: #a4abff; --shadow: 0 1px 2px rgb(0 0 0 / .4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code {
  font: .88em var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .05em .4em;
  white-space: nowrap;
}
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
#nav {
  display: flex; gap: 4px; }
#nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  color: var(--muted); font-size: 14px; font-weight: 500;
}
#nav a:hover { color: var(--text); background: var(--surface-2); }
#nav .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
#nav a[data-state="online"] .dot { background: var(--ok); }
#nav a[data-state="starting"] .dot { background: var(--warn); }
#nav a[data-state="asleep"] .dot { background: var(--sleep); }

/* ---- server section ---- */
.server { padding: 48px 0 24px; }
.server + .server { border-top: 1px solid var(--line); margin-top: 32px; }
.server.featured { padding-top: 56px; }

.eyebrow {
  font: 600 12px/1 var(--mono);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--faint);
}
.server-name {
  margin: 12px 0 8px;
  font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.05;
  letter-spacing: -.03em; font-weight: 750;
}
.featured .server-name { font-size: clamp(2.75rem, 8vw, 4.75rem); }
.tagline { margin: 0; color: var(--muted); font-size: 1.075rem; max-width: 46ch; }

.head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }

/* status pill */
.status {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px; font-weight: 500; color: var(--muted);
}
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.status[data-state="online"] .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }
.status[data-state="starting"] .dot { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
.status[data-state="asleep"] .dot { background: var(--sleep); }
.status[data-state="online"] { color: var(--text); }
@keyframes pulse { 50% { opacity: .3; } }

/* address + buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  font: 500 14px var(--sans); cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.btn:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.address .mono { font: 500 14px var(--mono); }
.address .copy { font-size: 12px; color: var(--faint); border-left: 1px solid var(--line); padding-left: 10px; }
.address.copied .copy { color: var(--ok); }

/* players online */
.players { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.players:empty { display: none; }
.player {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px;
}
a.player:hover { border-color: var(--accent); }
.player img { width: 24px; height: 24px; border-radius: 6px; image-rendering: pixelated; background: var(--surface-2); }
.player .where { color: var(--faint); }

/* ---- worlds ---- */
.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 48px 0 0;
}
.section-title h3 { margin: 0; font-size: 1.25rem; letter-spacing: -.01em; }
.section-title .hint { color: var(--faint); font-size: 14px; }
.group-label { margin: 24px 0 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.server:not(.featured) .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.world {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease;
}
.world:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.world:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.thumb {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background:
    radial-gradient(1px 1px at 20% 30%, #fff8 50%, transparent 51%),
    radial-gradient(1px 1px at 70% 60%, #fff6 50%, transparent 51%),
    radial-gradient(1px 1px at 45% 80%, #fff5 50%, transparent 51%),
    radial-gradient(1px 1px at 85% 20%, #fff7 50%, transparent 51%),
    radial-gradient(1px 1px at 10% 75%, #fff4 50%, transparent 51%),
    var(--void);
}
/* .square = the world's border (a square in block space), centred; the 4:3 frame crops top and bottom */
.square {
  position: absolute; left: 0; width: 100%; aspect-ratio: 1; top: 50%;
  transform: translateY(-50%); transition: transform .5s ease;
}
.square img {
  position: absolute; image-rendering: pixelated;
  opacity: 0; transition: opacity .4s ease;
}
.square img.loaded { opacity: 1; }
.world:hover .square { transform: translateY(-50%) scale(1.03); }

.dot-player {
  position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border-radius: 5px; border: 2px solid #fff; background: #222;
  box-shadow: 0 1px 4px rgb(0 0 0 / .5);
  image-rendering: pixelated;
}
.badge {
  position: absolute; top: 10px; left: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  background: rgb(10 12 17 / .72); color: #fff;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 600 12px var(--sans);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #3ccf8b; }
.badge[hidden] { display: none; }
.uncharted {
  position: absolute; inset: 0; display: none; place-items: center;
  color: #ffffff70; font: 600 11px var(--mono); letter-spacing: .14em; text-transform: uppercase;
}
.thumb.empty .uncharted { display: grid; }

.world-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.world-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 650; letter-spacing: -.01em; }
.world-title .arrow { color: var(--faint); transition: transform .2s, color .2s; }
.world:hover .arrow { color: var(--accent); transform: translate(2px, -2px); }
.facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font: 12px var(--mono); color: var(--faint); }
.blurb { margin: 2px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* phones: two cards per row, tighter text */
@media (max-width: 560px) {
  .grid, .server:not(.featured) .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .world-body { padding: 10px 12px 12px; gap: 4px; }
  .world-title { font-size: 15px; }
  .facts { font-size: 11px; gap: 2px 8px; }
  .blurb { font-size: 13px; }
  .section-title { flex-direction: column; gap: 2px; }
  .server { padding-top: 32px; }
  .head-row > * { flex: 1 1 auto; justify-content: center; }
}

/* ---- join + notes ---- */
.info { display: grid; gap: 16px; margin-top: 48px; }
@media (min-width: 860px) { .info.two { grid-template-columns: 1fr 1.2fr; } }
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.panel h3 { margin: 0 0 16px; font-size: 1rem; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--muted); font-size: 15px; }
.steps li::before {
  content: counter(step);
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--text);
  font: 600 13px var(--mono);
}
.notes { margin: 0; display: grid; gap: 12px; }
.notes div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; font-size: 15px; }
.notes dt { font-weight: 600; }
.notes dd { margin: 0; color: var(--muted); }
@media (max-width: 480px) { .notes div { grid-template-columns: 1fr; gap: 2px; } }

/* ---- footer ---- */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  margin-top: 64px; padding-top: 24px; padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--faint); font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- guide links (mods + commands) ---- */
#nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.guides { display: grid; gap: 12px; grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 0; }
@media (min-width: 640px) { .guides { grid-template-columns: 1fr 1fr; } }
.guide {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--muted); font-size: .95rem;
}
.guide strong { color: var(--text); font-size: 1.25rem; letter-spacing: -.02em; }
.guide-kicker { font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.guide:hover { border-color: var(--accent); }
.guide:hover strong { color: var(--accent); }
