/* Nova — black cinematic (beanzz-style sky + chess) */

:root {
  --bg: #05070d;
  --bg-2: #0a0e18;
  --bg-3: #121826;
  --panel: rgba(12, 16, 28, 0.82);
  --panel-solid: #0e1320;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f6fb;
  --text-2: #b8c0d4;
  --muted: #7a849c;
  --accent: #5b8cff;
  --accent-2: #8eb0ff;
  --ok: #3dd68c;
  --warn: #f5b942;
  --danger: #ff5c5c;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1120px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #fff; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* nav */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1rem 0;
  background: linear-gradient(180deg, rgba(5,7,13,.85), transparent);
}

.site-nav .inner {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: #fff;
  text-decoration: none;
}
.brand span { color: var(--accent-2); }

.nav-links {
  display: none;
  gap: 1.5rem;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a:hover { color: #fff; }

.nav-actions {
  display: flex;
  gap: 0.6rem;
  margin-left: auto;
}
@media (min-width: 800px) {
  .nav-links { display: flex; }
  .nav-actions { margin-left: 0; }
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8em 1.35em;
  border-radius: var(--radius-pill);
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-fill {
  background: #fff;
  color: #070a12;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 8px 24px rgba(0,0,0,0.25);
}
.btn-fill:hover {
  background: #eef2ff;
  color: #070a12;
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 10px 28px rgba(91,140,255,0.2);
}
.btn-line {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.16);
  color: #fff;
  backdrop-filter: blur(8px);
}
.btn-line:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
}
.btn-accent {
  background: linear-gradient(180deg, #6b98ff, #4a7af0);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 8px 24px rgba(91,140,255,0.35);
}
.btn-accent:hover {
  background: linear-gradient(180deg, #7aa4ff, #5b8cff);
}
.btn-sm { padding: 0.5em 1em; font-size: 0.82rem; }
.btn-ghost { color: var(--muted); padding-inline: 0.75em; }
.btn-ghost:hover { color: #fff; }

/* search */
.search-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(10, 14, 24, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  max-width: 420px;
  width: 100%;
}
.search-bar svg { flex-shrink: 0; opacity: 0.55; }
.search-bar input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
}
.search-bar input::placeholder { color: var(--muted); }

/* panels */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.panel-solid {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.panel-body { padding: 1.15rem; }

.h-display {
  font-size: clamp(2.6rem, 7vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0;
  color: #fff;
}
.h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}
.h2 { font-size: 1.15rem; font-weight: 650; margin: 0; }
.h3 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.lede {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 34em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.28em 0.7em;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--text-2);
  background: rgba(255,255,255,0.04);
}
.badge-ok { color: var(--ok); border-color: rgba(61,214,140,0.35); background: rgba(61,214,140,0.1); }
.badge-online::before {
  content: "";
  width: 0.4em; height: 0.4em;
  border-radius: 50%;
  background: currentColor;
}

.muted { color: var(--muted); }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; align-items: center; gap: 0.75rem; }

.editor-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0a0e16;
  min-height: 180px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
