/* Codrop Documentation & Showcase — Extends FrontTerrain Design System */

/* ─── Hero Architecture Flow ─── */
.arch-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 0;
}

.arch-node {
  background: var(--hr-surface-card);
  border: 1px solid var(--hr-line);
  padding: 1rem 1.4rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.33, 1, 0.68, 1);
  min-width: 140px;
  border-radius: 4px;
}

.arch-node:hover {
  border-color: var(--hr-cyan);
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(56, 189, 248, 0.1);
}

.arch-node-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  display: block;
  margin-bottom: 0.35rem;
}

.arch-node-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--hr-ink-strong);
}

.arch-arrow {
  color: var(--hr-ink-subtle);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  padding: 0 0.4rem;
  user-select: none;
  flex-shrink: 0;
}

/* ─── Docs Section Navigation (Sticky Sidebar) ─── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--hr-surface-card);
  border: 1px solid var(--hr-line);
  padding: 1.25rem;
  border-radius: 4px;
}

.docs-sidebar a {
  display: block;
  padding: 0.5rem 0.8rem;
  color: var(--hr-ink-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
  border-radius: 0 3px 3px 0;
}

.docs-sidebar a:hover,
.docs-sidebar a.active {
  color: var(--hr-ink-strong);
  border-left-color: var(--hr-rust);
  background: rgba(255, 255, 255, 0.04);
}

.docs-sidebar-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--hr-rust);
  padding: 0.5rem 0.8rem;
  margin-top: 0.75rem;
}

.docs-sidebar-title:first-child {
  margin-top: 0;
}

/* ─── Profile Cards ─── */
.profile-card {
  background: var(--hr-surface-card);
  border: 1px solid var(--hr-line);
  padding: 2rem;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-card:hover {
  border-color: var(--hr-line-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.profile-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--hr-ink-strong);
}

/* ─── Code Blocks & Tabs ─── */
.code-block {
  background: #07080a;
  border: 1px solid var(--hr-line-strong);
  overflow: hidden;
  margin: 1.25rem 0;
  border-radius: 4px;
}

.code-block-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--hr-line);
}

.code-block-lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--hr-ink-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.code-block-copy {
  background: transparent;
  border: 1px solid var(--hr-line-strong);
  color: var(--hr-ink-muted);
  padding: 0.25rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 3px;
}

.code-block-copy:hover {
  color: var(--hr-ink-strong);
  border-color: var(--hr-ink-strong);
}

.code-block pre {
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.75;
  color: #e2e8f0;
  overflow-x: auto;
  margin: 0;
  background: transparent;
  border: none;
}

.code-block pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* Syntax Highlighting */
.syn-kw { color: var(--hr-violet); font-weight: 600; }
.syn-fn { color: var(--hr-cyan); }
.syn-str { color: var(--hr-emerald); }
.syn-num { color: #fbbf24; }
.syn-cm { color: var(--hr-ink-subtle); font-style: italic; }
.syn-op { color: var(--hr-rust); }
.syn-typ { color: #38bdf8; font-weight: 600; }
.syn-mac { color: #e15b37; }

/* ─── Interactive Multi-Language Code Tabs ─── */
.lang-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--hr-line);
  overflow-x: auto;
}

.lang-tab {
  padding: 0.7rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hr-ink-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.lang-tab:hover {
  color: var(--hr-ink-strong);
  background: rgba(255, 255, 255, 0.03);
}

.lang-tab.active {
  color: var(--hr-cyan);
  border-bottom-color: var(--hr-cyan);
  background: rgba(56, 189, 248, 0.05);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ─── Package Registry Hub Cards ─── */
.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.registry-card {
  background: var(--hr-surface-card);
  border: 1px solid var(--hr-line);
  padding: 1.5rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.registry-card:hover {
  border-color: var(--hr-line-strong);
  transform: translateY(-2px);
  background: var(--hr-surface-hover);
}

.registry-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--hr-cyan);
  letter-spacing: 0.08em;
}

.registry-cmd {
  background: #07080a;
  border: 1px solid var(--hr-line);
  padding: 0.6rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  margin: 1rem 0;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  overflow-x: auto;
}

/* ─── Comparison / Benchmark Tables ─── */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--hr-line);
  border-radius: 4px;
}

.bench-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.bench-table th {
  background: rgba(255, 255, 255, 0.03);
  color: var(--hr-ink-strong);
  font-weight: 700;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--hr-line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.bench-table td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid var(--hr-line);
  color: var(--hr-ink-muted);
}

.bench-table tr:last-child td {
  border-bottom: none;
}

.bench-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ─── Responsive Media Queries ─── */
@media (max-width: 992px) {
  .docs-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .docs-sidebar {
    position: static;
  }
}
