/* Nexo website — pixel theme shared with the app.
   SPDX-License-Identifier: AGPL-3.0-or-later
   Copyright (C) 2026 Apiwish Anutravanichkul */

@font-face {
  font-family: 'Press Start 2P';
  src: url('../fonts/PressStart2P-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'VT323';
  src: url('../fonts/VT323-Regular.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #121316;
  --surface: #1e2025;
  --surface2: #2a2d33;
  --primary: #a8c7fa;
  --on-primary: #062020;
  --text: #e3e3e6;
  --muted: #9aa0a6;
  --outline: #3a3d44;
  --error: #f2b8b5;
  --success: #a0d6a8;
  --shadow: #07080a;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--outline) 1px, transparent 1px),
    linear-gradient(90deg, var(--outline) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  background-blend-mode: normal;
  color: var(--text);
  font-family: 'VT323', ui-monospace, monospace;
  font-size: 20px;
  line-height: 1.45;
  -webkit-font-smoothing: none;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- Header / nav -------------------------------------------------------- */
header.site {
  border-bottom: 2px solid var(--outline);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--primary);
  letter-spacing: 1px;
}
.brand img { height: 32px; image-rendering: pixelated; }
.nav .spacer { flex: 1; }
.nav a.link {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  padding: 6px 4px;
}
.nav a.link:hover { color: var(--primary); text-decoration: none; }
.nav a.link.active { color: var(--primary); }

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 14px 18px;
  border: 2px solid var(--outline);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 3px 3px 0 var(--shadow);
  cursor: pointer;
  transition: transform .05s ease;
}
.btn:hover { text-decoration: none; transform: translate(-1px, -1px); }
.btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--shadow); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.accent { border-color: var(--success); color: var(--success); background: var(--surface); }
.btn.block { display: flex; justify-content: center; width: 100%; }

/* ---- Panels -------------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 2px solid var(--outline);
  border-radius: 4px;
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 20px;
}
.label {
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---- Layout helpers ------------------------------------------------------ */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) {
  .cols-2, .cols-3 { grid-template-columns: 1fr; }
}

section { padding: 48px 0; }
section.tight { padding: 32px 0; }
h1, h2, h3 { font-family: 'Press Start 2P', monospace; line-height: 1.5; }
h1 { font-size: 34px; color: var(--primary); margin: 0 0 20px; }
h2 { font-size: 18px; color: var(--text); margin: 0 0 16px; }
h3 { font-size: 12px; color: var(--primary); margin: 0 0 10px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.lead { font-size: 24px; color: var(--text); }

/* ---- Hero ---------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 32px; align-items: center; padding: 56px 0; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; text-align: center; } .hero .btn-row { justify-content: center; } }
.hero img.art { width: 100%; max-width: 360px; image-rendering: pixelated; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Feature / card ------------------------------------------------------ */
.card .card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.chip {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--success);
  border: 2px solid var(--success);
  border-radius: 3px;
  padding: 6px 8px;
  margin: 0 8px 8px 0;
}

/* ---- Screenshots --------------------------------------------------------- */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .shots { grid-template-columns: 1fr; } }
.shot { background: var(--surface); border: 2px solid var(--outline); border-radius: 4px; box-shadow: 3px 3px 0 var(--shadow); padding: 10px; }
.shot img { width: 100%; display: block; image-rendering: pixelated; border: 1px solid var(--outline); border-radius: 2px; }
.shot .cap { font-family: 'Press Start 2P', monospace; font-size: 8px; color: var(--muted); margin-top: 8px; letter-spacing: 1px; }

/* ---- Download cards ------------------------------------------------------ */
.dl .meta { color: var(--muted); font-size: 18px; margin: 6px 0 14px; }
.dl code { background: var(--surface2); padding: 2px 6px; border-radius: 3px; font-family: ui-monospace, monospace; font-size: 16px; }

/* ---- Docs / prose -------------------------------------------------------- */
.prose h2 { margin-top: 28px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose code { background: var(--surface2); padding: 2px 6px; border-radius: 3px; font-family: ui-monospace, monospace; }
.prose pre {
  background: var(--surface); border: 2px solid var(--outline); border-radius: 4px;
  box-shadow: 3px 3px 0 var(--shadow); padding: 16px; overflow-x: auto; font-size: 16px;
}
.prose pre code { background: none; padding: 0; }

/* ---- Footer -------------------------------------------------------------- */
footer.site {
  border-top: 2px solid var(--outline);
  margin-top: 40px;
  padding: 28px 0;
  color: var(--muted);
  font-size: 18px;
}
footer.site .cols { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--primary); }

.pixel-divider { height: 2px; background: var(--outline); margin: 0; border: 0; }
.note { border-left: 4px solid var(--primary); padding-left: 12px; color: var(--muted); }
