/* ============================================
   PluckShot — Documentation Page Styles
   Inherits fonts, reset, and nav styles from styles.css
   ============================================ */

.docs-body {
  background: #ffffff;
  color: #0a0a0a;
}

/* ============================================
   DOCS HERO
   ============================================ */
.docs-hero {
  background: #0a0a0a;
  padding: calc(var(--nav-height) + 80px) clamp(20px, 4vw, 48px) 80px;
  text-align: center;
  border-bottom: 1px solid #1f1f1f;
}

.docs-hero-inner {
  max-width: 820px;
  margin: 0 auto;
}

.docs-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #4A9EFF;
  margin-bottom: 16px;
}

.docs-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 20px;
}

.docs-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: #9F9FA9;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto;
}

/* ============================================
   DOCS LAYOUT
   ============================================ */
.docs-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 64px;
  align-items: start;
}

/* ============================================
   SIDEBAR / TOC
   ============================================ */
.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
  padding-top: 80px;
  padding-bottom: 80px;
  max-height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.docs-toc {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.docs-toc-title {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b6b75;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4e4e8;
}

.docs-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc;
}

.docs-toc-list li {
  counter-increment: toc;
}

.docs-toc-list a {
  display: block;
  padding: 8px 12px 8px 14px;
  font-size: 0.88rem;
  font-weight: 500;
  color: #4a4a52;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  line-height: 1.35;
}

.docs-toc-list a:hover {
  color: #0a0a0a;
  background: #f7f7f8;
}

.docs-toc-list a.active {
  color: #4A9EFF;
  border-left-color: #4A9EFF;
  background: rgba(74, 158, 255, 0.06);
  font-weight: 600;
}

/* Mobile TOC toggle (hidden on desktop) */
.docs-toc-toggle {
  display: none;
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 24px;
  background: #f7f7f8;
  border: 1px solid #e4e4e8;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a0a0a;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease;
}

.docs-toc-toggle:hover {
  background: #f0f0f3;
}

.docs-toc-toggle svg {
  transition: transform 0.25s ease;
}

.docs-toc-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.docs-content {
  padding-top: 80px;
  padding-bottom: 120px;
  min-width: 0; /* Prevents grid blowout */
  max-width: 780px;
}

.docs-section {
  padding-top: 32px;
  padding-bottom: 16px;
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.docs-section + .docs-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid #e4e4e8;
}

.docs-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  line-height: 1.15;
  margin-bottom: 20px;
}

.docs-section h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: -0.01em;
  margin-top: 36px;
  margin-bottom: 12px;
}

.docs-section > p,
.docs-section > ol,
.docs-section > ul,
.docs-section > .docs-callout,
.docs-section > .docs-table {
  margin-top: 16px;
}

.docs-section p {
  font-size: 1rem;
  line-height: 1.7;
  color: #333338;
}

.docs-section p strong,
.docs-section li strong {
  font-weight: 600;
  color: #0a0a0a;
}

.docs-section em {
  font-style: italic;
  color: #4a4a52;
}

.docs-section a {
  color: #4A9EFF;
  text-decoration: none;
  border-bottom: 1px solid rgba(74, 158, 255, 0.3);
  transition: border-color 0.2s ease;
}

.docs-section a:hover {
  border-bottom-color: #4A9EFF;
}

/* Lists */
.docs-section ul,
.docs-section ol {
  padding-left: 24px;
}

.docs-section li {
  font-size: 1rem;
  line-height: 1.7;
  color: #333338;
  margin-bottom: 8px;
}

.docs-section ul li {
  list-style-type: disc;
}

.docs-section ol li {
  list-style-type: decimal;
}

/* Inline code */
.docs-section code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: #f0f0f3;
  color: #0a0a0a;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e4e4e8;
}

/* Keyboard keys */
.docs-section kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78em;
  font-weight: 600;
  padding: 3px 8px;
  background: #ffffff;
  border: 1px solid #d1d1d6;
  border-bottom-width: 2px;
  border-radius: 5px;
  color: #0a0a0a;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  line-height: 1;
}

/* Callouts */
.docs-callout {
  padding: 18px 22px;
  border-radius: 10px;
  border-left: 4px solid;
  font-size: 0.95rem;
  line-height: 1.6;
}

.docs-callout strong {
  display: inline;
  font-weight: 600;
  color: #0a0a0a;
}

.docs-callout-info {
  background: rgba(74, 158, 255, 0.06);
  border-left-color: #4A9EFF;
  color: #333338;
}

.docs-callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: #f59e0b;
  color: #333338;
}

/* Tables */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  border: 1px solid #e4e4e8;
  border-radius: 10px;
  overflow: hidden;
}

.docs-table th,
.docs-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #e4e4e8;
}

.docs-table th {
  background: #f7f7f8;
  font-weight: 600;
  color: #0a0a0a;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.docs-table tbody tr:last-child td {
  border-bottom: none;
}

.docs-table tbody tr:hover {
  background: #fbfbfc;
}

.docs-table td {
  color: #4a4a52;
}

.docs-table td:first-child {
  font-weight: 500;
  color: #0a0a0a;
}

/* End CTA */
.docs-end-cta {
  margin-top: 80px;
  padding: 40px;
  background: #f7f7f8;
  border: 1px solid #e4e4e8;
  border-radius: 14px;
  text-align: center;
}

.docs-end-cta h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #0a0a0a;
  margin-bottom: 10px;
}

.docs-end-cta p {
  font-size: 1rem;
  color: #4a4a52;
  line-height: 1.6;
}

.docs-end-cta a {
  color: #4A9EFF;
  font-weight: 500;
  border-bottom: 1px solid rgba(74, 158, 255, 0.3);
  transition: border-color 0.2s ease;
}

.docs-end-cta a:hover {
  border-bottom-color: #4A9EFF;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .docs-sidebar {
    position: static;
    padding-top: 32px;
    padding-bottom: 0;
    max-height: none;
    overflow: visible;
  }

  .docs-toc {
    display: none;
  }

  .docs-toc.open {
    display: flex;
    padding: 16px;
    border: 1px solid #e4e4e8;
    border-radius: 10px;
    background: #ffffff;
    margin-bottom: 24px;
  }

  .docs-toc-toggle {
    display: flex;
  }

  .docs-content {
    padding-top: 24px;
    padding-bottom: 80px;
  }

  .docs-section h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 600px) {
  .docs-hero {
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 48px;
  }

  .docs-end-cta {
    padding: 28px 20px;
  }

  .docs-table {
    font-size: 0.85rem;
  }

  .docs-table th,
  .docs-table td {
    padding: 10px 12px;
  }
}
