/* nv-lang.org — production stylesheet */
/* Zero external dependencies. System font stack only. */

/* ── Custom properties ─────────────────────────────────────────────────── */
:root {
  --fg:           #1a1a1a;
  --fg-muted:     #5a5a6a;
  --fg-subtle:    #888899;
  --bg:           #ffffff;
  --bg-alt:       #f7f7fb;
  --bg-code:      #f3f3f7;
  --accent:       #6b3fa0;
  --accent-light: #ede6f7;
  --accent-hover: #55328a;
  --border:       #e2e2ea;
  --border-soft:  #ececf3;
  --hero-bg:      #faf9fd;
  --warn-bg:      #fffbea;
  --warn-fg:      #6b4b00;
  --warn-border:  #f0e090;
  --shadow:       0 1px 4px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);

  /* Syntax token colors — light */
  --tok-kw:      #6b3fa0;
  --tok-type:    #0b6e4f;
  --tok-str:     #b5440c;
  --tok-comment: #7a7a8c;
  --tok-num:     #1a6fa6;
  --tok-fn:      #1a1a1a;
  --tok-effect:  #1066b8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fg:           #e8e8ee;
    --fg-muted:     #9494aa;
    --fg-subtle:    #66667a;
    --bg:           #0f0f14;
    --bg-alt:       #16161e;
    --bg-code:      #1a1a24;
    --accent:       #a97dd1;
    --accent-light: #2a1e3a;
    --accent-hover: #bf99e0;
    --border:       #2a2a38;
    --border-soft:  #222230;
    --hero-bg:      #111118;
    --warn-bg:      #26210e;
    --warn-fg:      #f0d580;
    --warn-border:  #5a4a10;
    --shadow:       0 1px 4px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.2);

    /* Syntax token colors — dark */
    --tok-kw:      #c792ea;
    --tok-type:    #7fdbca;
    --tok-str:     #f08060;
    --tok-comment: #636378;
    --tok-num:     #6eb4e8;
    --tok-fn:      #e8e8ee;
    --tok-effect:  #79b8f8;
  }
}

/* ── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-top: 0;
}

p { margin-top: 0; }

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

code, pre, kbd {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas,
               "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
}

/* ── Layout helpers ─────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container--narrow {
  max-width: 780px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Site header ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
}

.site-header__inner {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.03em;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo:hover { color: var(--accent); text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.site-nav a {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.site-nav a:hover {
  background: var(--bg-alt);
  color: var(--fg);
  text-decoration: none;
}
.site-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.lang-switch a {
  padding: 0.2rem 0.55rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.lang-switch a:hover { background: var(--bg-alt); text-decoration: none; }
.lang-switch a.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--fg);
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    gap: 0.25rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { font-size: 1rem; padding: 0.5rem 0.75rem; }
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 2.5rem 1.5rem;
  margin-top: 5rem;
}

.site-footer__inner {
  max-width: 1100px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--fg);
  letter-spacing: -0.02em;
}

.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-subtle);
  margin-bottom: 0.75rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li { margin-bottom: 0.45rem; }

.footer-col a {
  color: var(--fg-muted);
  font-size: 0.88rem;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1100px;
  margin-inline: auto;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--fg-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.3rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
  box-shadow: 0 2px 8px rgba(107, 63, 160, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--fg-muted);
  background: var(--bg-alt);
  color: var(--fg);
}

/* ── Status banner ───────────────────────────────────────────────────────── */
.status-banner {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-fg);
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--hero-bg);
  border-bottom: 1px solid var(--border);
  padding: 5rem 1.5rem 4.5rem;
  text-align: center;
}

.hero__badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  margin-bottom: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--fg);
}

.hero__tagline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--fg-muted);
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

/* ── Code block ──────────────────────────────────────────────────────────── */
pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  overflow-x: auto;
  margin: 0;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

code {
  background: var(--bg-code);
  padding: 0.12em 0.38em;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
}

/* Syntax highlight classes */
.tok-kw      { color: var(--tok-kw);      font-weight: 600; }
.tok-type    { color: var(--tok-type); }
.tok-str     { color: var(--tok-str); }
.tok-comment { color: var(--tok-comment);  font-style: italic; }
.tok-num     { color: var(--tok-num); }
.tok-fn      { color: var(--tok-fn);       font-weight: 600; }
.tok-effect  { color: var(--tok-effect);   font-weight: 600; }
.tok-punct   { color: var(--fg-muted); }

/* Code window chrome */
.code-window {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-window__bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.code-window__dots {
  display: flex;
  gap: 6px;
}

.code-window__dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--border);
}

.code-window__title {
  font-size: 0.8rem;
  color: var(--fg-subtle);
  margin-left: 0.5rem;
}

.code-window pre {
  border: none;
  border-radius: 0;
  margin: 0;
}

/* ── Feature cards ───────────────────────────────────────────────────────── */
.features {
  padding: 4.5rem 1.5rem;
}

.features__heading {
  text-align: center;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin-bottom: 0.75rem;
}

.features__sub {
  text-align: center;
  color: var(--fg-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

.feature-grid {
  max-width: 1100px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.feature-card__icon {
  width: 44px; height: 44px;
  background: var(--accent-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.feature-card__icon svg {
  width: 22px; height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--fg-muted);
  font-size: 0.93rem;
  margin: 0;
}

/* ── Install section ─────────────────────────────────────────────────────── */
.install {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.5rem;
  text-align: center;
}

.install h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 0.75rem;
}

.install p {
  color: var(--fg-muted);
  margin-bottom: 1.75rem;
}

.install-cmd {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.3rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--fg);
  max-width: 100%;
  overflow-x: auto;
}

.install-cmd__prefix { color: var(--fg-subtle); user-select: none; }

/* ── Community ───────────────────────────────────────────────────────────── */
.community {
  padding: 4.5rem 1.5rem;
  text-align: center;
}

.community h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 0.75rem;
}

.community p {
  color: var(--fg-muted);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: 2rem;
}

/* ── Code split layout (hero) ────────────────────────────────────────────── */
.hero-split {
  max-width: 1100px;
  margin-inline: auto;
  padding: 4.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-split__code { order: 2; }
  .hero-split__text { order: 1; }
}

.hero-split__text .badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.18rem 0.65rem;
  border-radius: 100px;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-split__text h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 1rem;
}

.hero-split__text p {
  font-size: 1.1rem;
  color: var(--fg-muted);
  margin-bottom: 1.75rem;
}

.hero-split__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ── Doc layout ──────────────────────────────────────────────────────────── */
.doc-layout {
  max-width: 1100px;
  margin-inline: auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-sidebar { position: static !important; }
}

.doc-sidebar {
  position: sticky;
  top: 72px;
}

.sidebar-section {
  margin-bottom: 1.75rem;
}

.sidebar-section__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-subtle);
  margin-bottom: 0.5rem;
}

.sidebar-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-section li { margin-bottom: 0.1rem; }

.sidebar-section a {
  display: block;
  padding: 0.28rem 0.6rem;
  border-radius: 5px;
  font-size: 0.88rem;
  color: var(--fg-muted);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.sidebar-section a:hover {
  background: var(--bg-alt);
  color: var(--fg);
  text-decoration: none;
}
.sidebar-section a.active {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

/* ── Article / prose ─────────────────────────────────────────────────────── */
.prose h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.prose h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-soft);
}
.prose h3 { font-size: 1.1rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose pre { margin: 1.25rem 0; }

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--fg-muted);
  font-size: 0.88rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}

.post-meta__author { font-weight: 500; color: var(--fg); }

.post-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.12rem 0.55rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── Page header (non-hero pages) ────────────────────────────────────────── */
.page-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 3rem 1.5rem 2.5rem;
}

.page-header .container--narrow h1 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.page-header .container--narrow p {
  color: var(--fg-muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ── Blog list ───────────────────────────────────────────────────────────── */
.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-list__item {
  border-bottom: 1px solid var(--border-soft);
  padding: 1.75rem 0;
}
.blog-list__item:last-child { border-bottom: none; }

.blog-list__date {
  font-size: 0.83rem;
  color: var(--fg-subtle);
  margin-bottom: 0.4rem;
}

.blog-list__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  margin-bottom: 0.4rem;
  display: block;
}
.blog-list__title:hover { color: var(--accent); text-decoration: none; }

.blog-list__excerpt {
  color: var(--fg-muted);
  font-size: 0.93rem;
  margin: 0;
}

/* ── Spec list ───────────────────────────────────────────────────────────── */
.spec-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.spec-list__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-soft);
}
.spec-list__item:last-child { border-bottom: none; }

.spec-list__num {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--fg-subtle);
  min-width: 2.5rem;
}

.spec-list__body h3 {
  font-size: 1rem;
  margin: 0 0 0.2rem;
}

.spec-list__body p {
  color: var(--fg-muted);
  font-size: 0.88rem;
  margin: 0;
}

.spec-list__link a {
  font-size: 0.83rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .spec-list__item { grid-template-columns: auto 1fr; }
  .spec-list__link { grid-column: 2; }
}

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-subtle);
  margin-bottom: 0.5rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

.note {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  color: var(--fg-muted);
}

.github-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.github-icon svg {
  width: 16px; height: 16px;
  fill: currentColor;
}
