/* ============================================================
   MechaPaint - docs.css
   Documentation pages (docs/) - builds on styles2.css tokens.
   Adds: docs hub grid, feature page layout, video placeholder,
   click-to-enlarge screenshot figures.
   ============================================================ */

/* ---------- shared page shell ---------- */

.doc-main {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 5vw, 40px) 80px;
}

/* breadcrumb */
.doc-crumbs {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  margin-bottom: 18px;
}

.doc-crumbs a { color: var(--text-mid); text-decoration: none; }
.doc-crumbs a:hover { color: var(--accent); }
.doc-crumbs span { color: var(--text-dim); }

/* feature header */
.doc-head { margin-bottom: 26px; }

.doc-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 9px;
  margin-bottom: 14px;
}

.doc-head h1 {
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.12;
  margin-bottom: 12px;
}

.doc-lede {
  font-size: 18px;
  color: var(--text-mid);
  max-width: 68ch;
}

/* ---------- video placeholder ---------- */

.doc-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 8px 0 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(79,156,247,0.06), transparent 60%),
    var(--panel);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  overflow: hidden;
}

.doc-video-play {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(13,16,23,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.doc-video-play::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 13px solid transparent;
  border-bottom: 13px solid transparent;
  border-left: 21px solid var(--accent);
}

.doc-video-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-mid);
}

.doc-video-sub {
  font-size: 12.5px;
  color: var(--text-dim);
  max-width: 46ch;
  padding: 0 16px;
}

.doc-video-file {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.8;
}

/* ---------- body copy ---------- */

.doc-body h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 34px 0 12px;
  letter-spacing: -0.2px;
}

.doc-body p { color: var(--text-mid); margin-bottom: 14px; }
.doc-body strong { color: var(--text); font-weight: 600; }

.doc-body ul {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.doc-body li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 9px;
  color: var(--text-mid);
}

.doc-body li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.doc-key {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 7px;
}

/* ---------- screenshot figure (click to enlarge) ---------- */

.doc-shot { margin: 26px 0 8px; }

.doc-shot-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-alt);
}

/* uv-card-img class hooks the existing lightbox.js */
.doc-shot .uv-card-img {
  display: block;
  width: 100%;
  height: auto;
}

.doc-shot figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-dim);
}

.doc-shot figcaption .doc-shot-hint {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
}

/* ---------- prev / next + back ---------- */

.doc-nav-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ============================================================
   DOCS HUB (docs/index.html)
   ============================================================ */

.doc-hub-head { text-align: center; margin-bottom: 40px; }
.doc-hub-head h1 {
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 14px;
}
.doc-hub-head p { color: var(--text-mid); max-width: 62ch; margin: 0 auto; font-size: 17px; }

.doc-group { margin-bottom: 44px; }

.doc-group-title {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.6px;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.doc-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.doc-card {
  display: block;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  transition: border-color 0.15s ease, transform 0.1s ease, background 0.15s ease;
}

.doc-card:hover {
  border-color: var(--accent);
  background: var(--panel-2);
  transform: translateY(-2px);
}

.doc-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.doc-card p {
  font-size: 13.5px;
  color: var(--text-mid);
  line-height: 1.5;
}

.doc-card-arrow { color: var(--accent); font-weight: 700; }
