/* Modoki docs — shared styles. Mirrors the landing page design system. */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #08090d;
  --bg-soft: #0e1018;
  --surface: #14161f;
  --border: #23262f;
  --border-soft: #1b1d26;
  --text: #f4f4f6;
  --text-dim: #9aa0ad;
  --text-mute: #6b7180;
  --accent: #8b5cf6;
  --accent-2: #06b6d4;
  --accent-soft: rgba(139, 92, 246, 0.12);
  --max: 920px;
}
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
code, .mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Nav */
nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(8, 9, 13, 0.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.logo { font-weight: 800; font-size: 18px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 14px; }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--text-dim); }
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 640px) { .nav-links { display: none; } }

/* Doc header */
.doc-hero { padding: 64px 0 32px; border-bottom: 1px solid var(--border-soft); }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.breadcrumb { font-size: 13px; color: var(--text-mute); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-mute); }
h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 16px; }
.lede { font-size: 19px; color: var(--text-dim); max-width: 720px; }

/* Article */
article { padding: 48px 0 80px; }
article h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; margin: 48px 0 16px; padding-top: 8px; }
article h2:first-child { margin-top: 0; }
article h3 { font-size: 19px; font-weight: 600; margin: 32px 0 10px; }
article p { color: var(--text-dim); margin: 14px 0; }
article ul, article ol { color: var(--text-dim); margin: 14px 0 14px 24px; }
article li { margin: 7px 0; }
article strong { color: var(--text); font-weight: 600; }
article code { background: var(--bg-soft); border: 1px solid var(--border-soft); border-radius: 5px; padding: 1px 6px; font-size: 0.88em; color: #c8cdd8; }
kbd { background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; font-family: 'JetBrains Mono', monospace; font-size: 0.82em; color: var(--text); }

/* Figures */
figure { margin: 28px 0; }
figure img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 12px; background: #0b0c12; }
figcaption { font-size: 13.5px; color: var(--text-mute); margin-top: 10px; text-align: center; }
figcaption strong { color: var(--text-dim); }

/* Step list */
.steps { list-style: none; margin: 24px 0; counter-reset: step; padding: 0; }
.steps > li { position: relative; padding: 0 0 20px 52px; margin: 0; counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); border: 1px solid var(--accent);
  color: var(--accent); font-weight: 700; font-size: 14px;
  display: grid; place-items: center;
}
.steps > li:not(:last-child)::after { content: ''; position: absolute; left: 15.5px; top: 34px; bottom: 0; width: 1px; background: var(--border); }
.steps > li strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 2px; }

/* Callout */
.callout { background: var(--accent-soft); border: 1px solid rgba(139,92,246,0.35); border-radius: 12px; padding: 16px 18px; margin: 24px 0; font-size: 14.5px; }
.callout.tip { background: rgba(6,182,212,0.08); border-color: rgba(6,182,212,0.35); }
.callout.warn { background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.35); }
.callout p { color: var(--text-dim); margin: 6px 0 0; }
.callout strong { color: var(--text); }

/* Feature grid (hub) */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin: 40px 0; }
@media (max-width: 680px) { .feat-grid { grid-template-columns: 1fr; } }
.feat-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px; overflow: hidden; transition: border-color .2s, transform .2s; }
.feat-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.feat-card .thumb { aspect-ratio: 16/9; overflow: hidden; background: #0b0c12; }
.feat-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.feat-card .body { padding: 16px 18px 18px; }
.feat-card h3 { margin: 0 0 6px; font-size: 17px; color: var(--text); }
.feat-card p { margin: 0; font-size: 13.5px; color: var(--text-dim); }

/* Prev/next + back */
.doc-foot { border-top: 1px solid var(--border-soft); padding: 28px 0; margin-top: 48px; }
.doc-foot a { font-weight: 600; }

footer { border-top: 1px solid var(--border-soft); padding: 32px 0; font-size: 13.5px; color: var(--text-mute); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-mute); }
.footer-links a:hover { color: var(--text); }
