/* ============================================================================
   docs.css — "Findings" API-documentation page
   Reuses the tokens / header / footer / buttons from style.css.
============================================================================ */

:root {
  --code-bg:   #0b121a;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}

/* Header CTA reused from style.css; keep it small here */
.header-cta { font-size: 0.72rem; padding: 0.7em 1.3em; }

/* ------------------------------ Docs hero -------------------------------- */
.docs-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + 70px) 28px 44px;
}
.docs-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(90% 140% at 80% -10%, rgba(255, 70, 85, 0.28), transparent 55%),
    linear-gradient(180deg, #15212c 0%, var(--val-navy) 100%);
}
.docs-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
}
.docs-hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 0.85;
  margin: 0;
  color: var(--val-cream);
}
.docs-hero__subtitle {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  margin: 1rem 0 0;
  color: rgba(236, 232, 225, 0.82);
}

/* ------------------------------ Layout ----------------------------------- */
.docs {
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 28px 90px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 52px;
}

/* Sidebar ----------------------------------------------------------------- */
.docs__sidebar {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  align-self: start;
}
.docs__nav-group {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--val-red);
  margin: 22px 0 8px;
}
.docs__nav-group:first-child { margin-top: 0; }
.docs__nav {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid rgba(236, 232, 225, 0.12);
}
.docs__nav a {
  display: block;
  padding: 7px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--val-muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.docs__nav a:hover { color: var(--val-cream); }
.docs__nav a.is-active {
  color: var(--val-cream);
  border-left-color: var(--val-red);
}

/* Content ----------------------------------------------------------------- */
.docs__content { min-width: 0; }

.docs-section { padding-top: 18px; margin-bottom: 46px; scroll-margin-top: 90px; }

.docs-section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 0.9;
  margin: 0 0 0.7rem;
  color: var(--val-cream);
}
.docs-section h3 {
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  margin: 26px 0 6px;
  color: var(--val-cream);
}
.docs-section p {
  font-family: var(--font-body);
  max-width: 70ch;
  line-height: 1.6;
  color: rgba(236, 232, 225, 0.78);
}
.docs-section a {
  color: var(--val-red);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 70, 85, 0.35);
  transition: border-color 0.15s ease;
}
.docs-section a:hover { border-bottom-color: var(--val-red); }

/* Inline code & endpoint path */
code.inline,
.endpoint__path {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(236, 232, 225, 0.08);
  color: var(--val-cream);
  padding: 2px 7px;
  border-radius: 2px;
}
.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
}
.endpoint__path { font-size: 0.95rem; background: rgba(236, 232, 225, 0.06); }

/* Method badge */
.badge {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  padding: 4px 10px;
  border: 1px solid currentColor;
}
.badge--get    { color: #3ddc97; background: rgba(61, 220, 151, 0.12); }
.badge--post   { color: #18e3d8; background: rgba(24, 227, 216, 0.12); }
.badge--delete { color: #ff4655; background: rgba(255, 70, 85, 0.12); }

/* ---------------------------- Code window -------------------------------- */
.code-window {
  background: var(--code-bg);
  border: 1px solid rgba(236, 232, 225, 0.1);
  clip-path: var(--clip-corner);
  margin: 14px 0 8px;
  overflow: hidden;
}
.code-window__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(236, 232, 225, 0.08);
}
.code-window__dots { display: inline-flex; gap: 7px; }
.code-window__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: block;
  background: #2a3742;
}
.code-window__dots i:nth-child(1) { background: #ff4655; }
.code-window__dots i:nth-child(2) { background: #f5c451; }
.code-window__dots i:nth-child(3) { background: #3ddc97; }

.code-window__name {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--val-muted);
}
.code-window__copy {
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(236, 232, 225, 0.22);
  color: var(--val-cream);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  padding: 5px 12px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.code-window__copy:hover { color: var(--val-red); border-color: var(--val-red); }
.code-window__copy.is-copied { color: #3ddc97; border-color: #3ddc97; }

.code-window__body {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--val-cream);
  tab-size: 2;
}
.code-window__body code { font-family: inherit; white-space: pre; }

/* Syntax tokens */
.tok-comment { color: #5f7a6b; font-style: italic; }
.tok-string  { color: #f5c451; }
.tok-number  { color: #18e3d8; }
.tok-keyword { color: #ff6c79; }

/* ------------------------------- Table ----------------------------------- */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-family: var(--font-body);
}
.docs-table th,
.docs-table td {
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(236, 232, 225, 0.08);
}
.docs-table th {
  color: var(--val-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
}
.docs-table td { color: rgba(236, 232, 225, 0.85); font-size: 0.9rem; }

/* ------------------------------ Responsive ------------------------------- */
@media (max-width: 820px) {
  .docs {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .docs__sidebar {
    position: static;
    top: auto;
  }
  .docs__nav {
    display: flex;
    flex-wrap: wrap;
    border-left: 0;
  }
  .docs__nav a { border-left: 0; padding: 6px 12px; }
  .docs__nav a.is-active { border-left: 0; color: var(--val-red); }
}
@media (max-width: 640px) {
  .docs-hero,
  .docs { padding-left: 18px; padding-right: 18px; }
  .header-cta { display: inline-block; }
}
