@font-face { font-family: Pixel; src: url(fonts/pixelify-sans-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Pixel; src: url(fonts/pixelify-sans-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Pixel; src: url(fonts/pixelify-sans-latin-700-normal.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin-400-normal.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin-500-normal.woff2) format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Rubik; src: url(fonts/rubik-latin-600-normal.woff2) format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --black: #0d0c11;
  --glass: rgba(22, 21, 27, 0.74);
  --glass-strong: rgba(18, 17, 23, 0.9);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(167, 155, 211, 0.55);
  --purple: #a79bd3;
  --purple-bright: #c2b8ea;
  --sky: #8fb0d6;
  --text: #f1effb;
  --muted: #9f9bba;
  --pixel: Pixel, 'Courier New', monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
/* The pixel font joins "fi" into one broken-looking letter; letters stay separate.
   !important because every `font:` shorthand below would otherwise switch ligatures back on. */
*, *::before, *::after { font-variant-ligatures: none !important; font-feature-settings: 'liga' 0, 'clig' 0, 'dlig' 0 !important; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  color: var(--text); font: 400 15px/1.5 Rubik, system-ui, sans-serif;
  background-color: var(--black);
  /* A faint dot grid over black. */
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
a { color: var(--sky); }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 8px; }

/* The selected feature, blurred far behind everything. */
.backdrop { position: fixed; inset: -60px; z-index: -1; overflow: hidden; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(46px) saturate(1.15); opacity: 0.3; transition: opacity 400ms ease; }
.backdrop img.fading { opacity: 0; }
/* The dot grid and the pointer trail (effects.js). When the grid is drawn, the CSS dots step aside. */
body.has-field { background-image: none; }
.field, .trail { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.field { z-index: -1; }
.trail { z-index: 30; }

/* ---- top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--purple-bright); font: 600 22px/1 var(--pixel); }
.brand img { border-radius: 8px; }
.top-actions { display: flex; gap: 10px; }
.button {
  display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 12px;
  background: var(--purple); color: #120d2b; font-weight: 600; font-size: 14px; text-decoration: none;
  box-shadow: 0 0 24px rgba(167, 155, 211, 0.35);
}
.button:hover { background: var(--purple-bright); }
.button.quiet { background: rgba(255, 255, 255, 0.04); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.button.quiet:hover { background: rgba(255, 255, 255, 0.08); }

main { flex: 1; display: flex; }

/* ---- home: introduction left, a strip of features right */
.home { flex: 1; display: grid; grid-template-columns: minmax(340px, 480px) minmax(0, 1fr); gap: 56px; align-items: center; padding: 24px 0 24px clamp(20px, 6vw, 96px); }
.wordmark { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.wordmark img { border-radius: 22px; }
.wordmark span { font: 700 54px/1 var(--pixel); color: var(--purple-bright); text-shadow: 4px 4px 0 #2a2156; }
h1 { font: 700 clamp(38px, 4.2vw, 58px)/1.08 var(--pixel); margin: 0 0 24px; text-shadow: 4px 4px 0 rgba(0, 0, 0, 0.75); letter-spacing: 0.01em; }

.command {
  margin: 0 0 14px; padding: 12px 14px; min-height: 48px; display: flex; align-items: center;
  background: #000; border: 1px solid var(--line); border-radius: 6px; font: 400 20px/1 var(--pixel);
}
.command .cmd { color: var(--text); }
.command .opt { color: var(--muted); }
.command .val { color: var(--purple-bright); }
.caret { width: 10px; height: 3px; align-self: flex-end; margin: 0 0 4px 3px; background: var(--text); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.counters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.counters div { display: flex; flex-direction: column-reverse; gap: 4px; padding: 14px 16px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.counters dt { color: var(--muted); font-size: 13px; }
.counters dd { margin: 0; font: 600 28px/1 var(--pixel); font-variant-numeric: tabular-nums; }
.counters div:nth-child(odd) dd { color: var(--purple-bright); }
.counters div:nth-child(even) dd { color: var(--sky); }

/* The feature strip: the focused tile is large, the next ones peek in from the right. */
.rail-wrap { min-width: 0; }
.rail {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 24px clamp(20px, 6vw, 96px) 24px 4px; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.tile {
  flex: none; width: min(460px, 70vw); scroll-snap-align: start; text-decoration: none; color: inherit;
  padding: 14px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px);
  transition: transform 250ms ease, opacity 250ms ease, border-color 200ms ease;
  transform-origin: left center; opacity: 0.55; transform: scale(0.82);
}
.tile.focused { opacity: 1; transform: none; }
.tile:hover, .tile:focus-visible { border-color: var(--line-strong); opacity: 1; }
.tile-art { aspect-ratio: 1400 / 950; border-radius: 10px; overflow: hidden; background: #0c0a18; position: relative; }
.tile-art img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.tile h3 { margin: 14px 4px 2px; font: 600 26px/1.1 var(--pixel); }
.tile p { margin: 0 4px 2px; color: var(--muted); font-size: 14px; }
.rail-hint { margin: 0 0 0 4px; color: var(--muted); font-size: 13px; }

/* Art for features shown as panels rather than cards: a few of the real controls. */
.mock { position: absolute; inset: 0; padding: 22px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font: 400 19px/1 var(--pixel); }
.mock-row .state { margin-left: auto; font-size: 16px; padding: 3px 10px; border-radius: 999px; background: rgba(167, 155, 211, 0.18); color: var(--purple-bright); }
.mock-row .state.sky { background: rgba(167, 199, 240, 0.15); color: var(--sky); }

/* ---- an opened feature */
.feature { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 24px 24px; display: flex; flex-direction: column; }
.feature-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.feature-head h2 { margin: 0; font: 700 40px/1 var(--pixel); color: var(--purple-bright); text-shadow: 0 0 18px rgba(167, 155, 211, 0.55), 3px 3px 0 #2a2540; }
.feature-head h2:focus { outline: none; }
.back { color: var(--text); text-decoration: none; font-size: 14px; padding: 7px 12px; border-radius: 9px; background: rgba(0, 0, 0, 0.55); border: 1px solid var(--line); }
.back::before { content: '‹'; margin-right: 7px; }
.back:hover { border-color: var(--line-strong); }
.feature-body { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
.commands { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.commands button {
  width: 100%; text-align: left; cursor: pointer; color: var(--text); font: inherit;
  padding: 10px 12px; border-radius: 10px; background: var(--glass-strong); border: 1px solid var(--line);
}
.commands button:hover { border-color: rgba(167, 155, 211, 0.35); }
.commands button[aria-pressed='true'] { border-color: var(--line-strong); box-shadow: 0 0 0 1px rgba(167, 155, 211, 0.25), 0 0 18px rgba(167, 155, 211, 0.18); }
.commands .name { display: block; font: 600 19px/1.15 var(--pixel); }
.commands button[aria-pressed='true'] .name { color: var(--purple-bright); }
.commands .slash { display: block; font-size: 12px; color: var(--muted); }

.viewer { display: flex; flex-direction: column; min-width: 0; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--line); backdrop-filter: blur(10px); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; }
.chip { font: 400 16px/1 var(--pixel); color: var(--purple-bright); background: rgba(167, 155, 211, 0.14); border: 1px solid rgba(167, 155, 211, 0.35); padding: 6px 10px; border-radius: 7px; }
.viewer-bar select { font: inherit; color: var(--text); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; min-width: 180px; }
.viewer-stage { padding: 4px 22px 22px; display: flex; flex-direction: column; align-items: center; }
.viewer-card { width: 100%; max-width: 760px; border-radius: 14px; }
.viewer-note { color: var(--muted); font-size: 13px; margin: 12px 0 0; text-align: center; }
.what { color: var(--muted); max-width: 62ch; margin: 0 0 14px; text-align: center; }

/* A Discord message, for features that are messages rather than cards. */
.embed { width: 100%; max-width: 620px; background: #18152c; border-radius: 10px; border-left: 4px solid var(--purple); padding: 16px 18px; }
.embed h4 { margin: 0 0 8px; font-size: 17px; }
.embed p { margin: 0 0 8px; color: #dcd9ee; }
.embed-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.embed-buttons span { padding: 7px 14px; border-radius: 8px; background: #3a3466; font-size: 14px; font-weight: 500; }
.embed-buttons span.primary { background: #6a59c4; }
.steps { width: 100%; max-width: 620px; margin: 0; padding-left: 24px; color: #dcd9ee; }
.steps li { margin-bottom: 12px; }
.steps b { color: var(--text); }

/* ---- footer */
.bottom { display: flex; justify-content: space-between; gap: 16px; padding: 12px 20px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: rgba(0, 0, 0, 0.4); }
.bottom p { margin: 0; }
.bottom a { color: var(--muted); }

/* ---- smaller screens */
@media (max-width: 1100px) {
  .home { grid-template-columns: 1fr; gap: 28px; padding: 16px 20px 24px; }
  .intro { max-width: 560px; }
  .rail { padding: 8px 20px 12px 2px; }
}
@media (max-width: 720px) {
  /* On a phone keep one button: "Add to Discord" once it exists, otherwise "Join our server". */
  .top-actions:has(#invite:not([hidden])) .quiet { display: none; }
  .wordmark img { width: 64px; height: 64px; border-radius: 16px; }
  .wordmark span { font-size: 40px; }
  .feature-body { grid-template-columns: 1fr; }
  .commands { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .commands li { flex: none; }
  .feature-head h2 { font-size: 30px; }
  .viewer-bar select { min-width: 0; }
  .viewer-stage { padding: 4px 12px 14px; }
  .bottom { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  .tile, .backdrop img { transition: none; }
  .rail { scroll-behavior: auto; }
}

/* Privacy policy and terms: a plain readable page in the same look. */
.legal-page { background: var(--black); }
.legal { flex: 1; display: flex; justify-content: center; padding: 32px 20px 48px; }
.legal article { max-width: 760px; width: 100%; padding: 36px 40px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line); line-height: 1.65; font-size: 16px; }
.legal h1 { margin: 0 0 6px; font: 700 38px/1.15 var(--pixel); color: var(--purple-bright); }
.legal h2 { margin: 32px 0 10px; font: 600 22px/1.25 var(--pixel); color: var(--text); }
.legal p, .legal li { color: #d9d6e6; }
.legal strong { color: var(--text); }
.legal a { color: var(--sky); }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 4px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 15px; }
.legal th, .legal td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--muted); font-weight: 500; }
@media (max-width: 720px) { .legal article { padding: 24px 20px; } .legal h1 { font-size: 30px; } }
