/* AdvancedKanban docs — shares its visual language with NerdSnipe Inc's
   other developer-facing docs (DesignFoundation) for brand consistency
   across the org's open-source properties. */

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

:root {
  --bg: #0a0a0f;
  --surface: #13131a;
  --surface2: #1c1c26;
  --border: rgba(255,255,255,0.08);
  --primary: #6366f1;
  --primary-glow: rgba(99,102,241,0.25);
  --text: #f0f0f5;
  --text-secondary: #9090a8;
  --radius: 12px;
  --success: #10b981;
  --warning: #f59e0b;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

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

/* ── Skip link ── */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff;
  padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ── Focus visibility ── */
a:focus-visible, button:focus-visible, .nav-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ── Nav ── */
nav {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
nav .inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 980px; margin: 0 auto; padding: 0 24px;
  gap: 16px; flex-wrap: wrap;
}
.nav-brand {
  font-size: 15px; font-weight: 600; color: var(--text);
  text-decoration: none; letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-brand span { color: var(--primary); }
.nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nav-link {
  font-size: 13px; color: var(--text-secondary); text-decoration: none;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 5px 13px; transition: border-color 0.15s, color 0.15s;
}
.nav-link:hover { border-color: var(--primary); color: var(--text); text-decoration: none; }
.nav-link.active {
  border-color: rgba(99,102,241,0.5); color: var(--text);
  background: rgba(99,102,241,0.08);
}

/* ── Layout ── */
.container { max-width: 820px; margin: 0 auto; padding: 0 24px; }
hr.divider { border: none; border-top: 1px solid var(--border); margin: 0; }
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 10px;
}
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
h3 { font-size: 17px; font-weight: 600; margin: 28px 0 8px; color: var(--text); }
h3:first-child { margin-top: 0; }
.section-sub { color: var(--text-secondary); margin-bottom: 32px; font-size: 16px; max-width: 640px; }
p { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin-bottom: 14px; }
p:last-child { margin-bottom: 0; }
ul.prose-list, ol.prose-list { color: var(--text-secondary); font-size: 15px; line-height: 1.7; margin: 0 0 14px 20px; }
ul.prose-list li, ol.prose-list li { margin-bottom: 6px; }
strong { color: var(--text); font-weight: 600; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  border-radius: 10px; padding: 12px 24px;
  transition: opacity 0.15s, transform 0.12s;
  cursor: pointer; border: none;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-lg { font-size: 16px; padding: 14px 32px; border-radius: 12px; }

/* ── Hero ── */
.hero { padding: 80px 0 56px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--primary); background: var(--primary-glow);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 100px; padding: 4px 14px; margin-bottom: 28px;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 800; letter-spacing: -0.035em; line-height: 1.08;
  margin-bottom: 20px;
}
h1 .accent { color: var(--primary); }
.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary); max-width: 600px;
  margin: 0 auto 40px; line-height: 1.55;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

/* ── Hero board mockup (the one signature element) ── */
.hero-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: left;
}
@media (max-width: 640px) { .hero-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hb-col { display: flex; flex-direction: column; gap: 8px; }
.hb-col-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700; color: var(--text-secondary);
  letter-spacing: 0.02em; padding: 2px 4px 6px;
}
.hb-count {
  font-size: 10px; font-weight: 700; color: var(--text-secondary);
  background: var(--surface2); border-radius: 100px; padding: 1px 7px;
}
.hb-count.over { color: var(--warning); }
.hb-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 10px;
  font-size: 11.5px; font-weight: 500; color: var(--text);
}
.hb-card.dragging {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 8px 20px rgba(99,102,241,0.25);
  transform: translateY(-2px) rotate(-1deg);
}
.hb-card.ghost-slot {
  background: transparent; border: 1.5px dashed rgba(99,102,241,0.4);
}
.hb-tag {
  display: inline-block; font-size: 9.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 100px; margin-top: 6px;
}
.hb-tag.low { background: rgba(16,185,129,0.14); color: var(--success); }
.hb-tag.med { background: rgba(245,158,11,0.14); color: var(--warning); }
.hb-tag.high { background: rgba(239,68,68,0.14); color: #ef4444; }

/* ── Stats strip ── */
.stats-strip {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 14px;
  background: var(--surface); overflow: hidden;
  margin: 40px 0 0;
}
.stat-item { flex: 1; min-width: 120px; padding: 20px 14px; text-align: center; border-right: 1px solid var(--border); }
.stat-item:last-child { border-right: none; }
.stat-value { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--text); line-height: 1; margin-bottom: 4px; }
.stat-value span { color: var(--primary); }
.stat-label { font-size: 11px; color: var(--text-secondary); font-weight: 500; }

/* ── Cards / grid ── */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 680px) { .card-grid { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.card-body { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; }

/* ── Step list (guides) ── */
.steps { list-style: none; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 32px 44px;
  border-left: 1px solid var(--border);
  margin-left: 15px;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -15px; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--primary); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps h3 { margin-top: 0; margin-bottom: 6px; }

/* ── Callouts ── */
.callout {
  border: 1px solid var(--border); border-left: 3px solid var(--primary);
  background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; margin: 20px 0;
}
.callout p { color: var(--text-secondary); font-size: 14px; margin: 0; }
.callout .callout-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 6px; display: block;
}
.callout.warn { border-left-color: var(--warning); }
.callout.warn .callout-label { color: var(--warning); }

/* ── Code ── */
code {
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-size: 0.875em;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 4px; padding: 1px 5px; color: var(--primary);
}
pre {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  overflow-x: auto; max-width: 100%;
  font-family: "SF Mono", "Fira Code", Menlo, monospace;
  font-size: 13px; line-height: 1.7; margin: 20px 0;
}
pre code { background: none; border: none; padding: 0; color: inherit; font-size: 1em; }
.kw { color: #c678dd; }
.type { color: #e5c07b; }
.fn { color: #61afef; }
.str { color: #98c379; }
.cm { color: #5c6370; font-style: italic; }
.prop { color: #56b6c2; }

/* ── API reference table ── */
.api-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13.5px; }
.api-table th, .api-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.api-table th { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.api-table td:first-child { font-weight: 600; color: var(--text); font-family: "SF Mono", "Fira Code", Menlo, monospace; font-size: 12.5px; white-space: nowrap; }
.api-table td { color: var(--text-secondary); }
.api-table tr:last-child td { border-bottom: none; }

/* ── Checklist ── */
.check-list { list-style: none; }
.check-list li {
  font-size: 14px; padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--text-secondary);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before { content: "✓"; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* ── Footer ── */
.cta-band { text-align: center; padding: 64px 24px; border-top: 1px solid var(--border); }
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { max-width: 480px; margin: 0 auto 28px; }
footer { padding: 32px 24px; text-align: center; border-top: 1px solid var(--border); }
footer p { font-size: 13px; color: var(--text-secondary); }
