:root {
  --bg: #0b0b0b;
  --panel: #131313;
  --well: #0e0e0e;
  --border: #4a4a4a;
  --border-dim: #333333;
  --text: #c8c8c8;
  --text-dim: #5a5a5a;
  --text-bright: #ffffff;
  --invert-bg: #e0e0e0;
  --marker: #9a9a9a;
}

@font-face {
  font-family: "BoldPixels";
  src: url("/fonts/boldpixels.ttf") format("truetype");
  font-display: block;
}

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

body {
  font-family: ui-monospace, "DejaVu Sans Mono", Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.6;
}

/* Pixel font: headings, buttons, navigation. Only 16px or 32px. */
.px,
h1, h2, h3,
nav,
button, .btn,
header,
footer .px {
  font-family: "BoldPixels", monospace;
  text-transform: uppercase;
  font-size: 16px;
  -webkit-font-smoothing: none;
  font-smooth: never;
}

h1 {
  font-size: 32px;
}

.logo {
  font-size: 32px;
  color: var(--text-bright);
  text-decoration: none;
}

.btn, button {
  display: inline-block;
  padding: 4px 10px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.btn:hover, button:hover {
  background: var(--invert-bg);
  color: var(--bg);
  border-color: var(--invert-bg);
}

.btn:active, button:active {
  background: var(--text-bright);
  color: #000;
}

a {
  color: var(--text-bright);
}

code, pre {
  background: var(--well);
  border: 1px solid var(--border-dim);
}

pre {
  padding: 8px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
}

td, th {
  border: 1px solid var(--border-dim);
  padding: 4px 8px;
}

/* Corners stay square everywhere. appearance:none keeps
   browsers from drawing native rounded controls. */
input:not([type="checkbox"]):not([type="radio"]) {
  background: var(--well);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 4px 8px;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px;
}

header, footer {
  max-width: 860px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

header {
  border-bottom: 1px solid var(--border-dim);
}

footer {
  border-top: 1px solid var(--border-dim);
  color: var(--text-dim);
}

footer a {
  color: var(--text);
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-left: auto;
}

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

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

img, video {
  max-width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  main, header, footer {
    padding: 16px;
  }

  nav {
    margin-left: 0;
  }
}

/* Landing page */
.hero {
  position: relative;
  overflow: hidden;
  padding: 32px 16px 16px;
  border: 1px solid var(--border);
  background: var(--bg) url(/media/hero.png) center/cover no-repeat;
  image-rendering: pixelated;
}

/* The looping clip sits under the text; hero.png stays as the poster and the
   fallback when the video is off. */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.85;
  image-rendering: pixelated;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
}

/* Semi-transparent --bg behind the hero text keeps it readable over the art. */
.hero > :not(.hero-video) {
  position: relative;
  z-index: 1;
  background: rgba(11, 11, 11, 0.8);
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  box-sizing: border-box;
}

.hero .btn {
  margin-right: 8px;
}

img.shot, video.demo {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  image-rendering: pixelated;
  margin: 32px 0 0;
  box-sizing: border-box;
}

img.shot {
  margin-bottom: 32px;
}

.features article img {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 8px;
  border: 1px solid var(--border-dim);
  image-rendering: pixelated;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.features h2 {
  grid-column: 1 / -1;
  margin: 0;
}

.features article {
  border: 1px solid var(--border-dim);
  background: var(--panel);
  padding: 16px;
}

.features h3 {
  margin: 0 0 8px;
  color: var(--text-bright);
}

.features p {
  margin: 0;
}

.buy {
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 16px;
  margin: 32px 0;
}

.buy h2 {
  margin-top: 0;
}

.buy input {
  margin-right: 8px;
  max-width: 100%;
}

.buy small {
  color: var(--text-dim);
}

.docs-nav {
  border-top: 1px solid var(--border-dim);
  padding-top: 16px;
  margin-top: 32px;
}

@media (max-width: 900px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .features {
    grid-template-columns: 1fr;
  }
}
