/* ═══════════════════════════════════════════
   DYNEROS DOCS — MAIN STYLESHEET
   Gold on Black. Enterprise. No compromises.
═══════════════════════════════════════════ */

:root {
  --gold: #C9A227;
  --gold-bright: #F0C040;
  --gold-dim: #8A6E1A;
  --gold-glow: rgba(201, 162, 39, 0.15);
  --gold-glow-strong: rgba(201, 162, 39, 0.3);

  --bg-base: #060608;
  --bg-surface: #0D0D10;
  --bg-card: #111116;
  --bg-card-hover: #16161C;
  --bg-border: #1E1E26;
  --bg-input: #0A0A0E;

  --text-primary: #F0EDE6;
  --text-secondary: #8A8890;
  --text-muted: #4A4A58;
  --text-code: #C9A227;

  --sidebar-width: 260px;
  --header-height: 56px;

  --font-display: 'Syne', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-body: 'Inter', sans-serif;

  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  display: flex;
  min-height: 100vh;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--bg-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ══════════════════════════════════
   SIDEBAR
══════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--bg-border);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 100;
  padding-bottom: 24px;
}

.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: 8px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-icon {
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.logo-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.1em;
  margin-left: 2px;
}

/* Search */
.sidebar-search {
  padding: 0 12px 12px;
  position: relative;
}

.sidebar-search input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius);
  padding: 8px 36px 8px 12px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}

.sidebar-search input:focus {
  border-color: var(--gold-dim);
}

.sidebar-search input::placeholder { color: var(--text-muted); }

.sidebar-search kbd {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-border);
  padding: 1px 5px;
  border-radius: 3px;
}

.search-icon {
  display: none;
}

/* Nav sections */
.nav-section {
  padding: 4px 0;
  margin-bottom: 4px;
}

.nav-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 10px 20px 4px;
}

.nav-item {
  display: block;
  padding: 7px 20px;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-left-color: var(--gold-dim);
}

.nav-item.active {
  color: var(--gold);
  background: var(--gold-glow);
  border-left-color: var(--gold);
  font-weight: 500;
}

/* Sidebar footer */
.sidebar-footer {
  margin-top: auto;
  padding: 16px 20px 0;
  border-top: 1px solid var(--bg-border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ext-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.ext-link:hover { color: var(--gold); }

/* ══════════════════════════════════
   MOBILE HEADER
══════════════════════════════════ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--bg-border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 200;
}

.menu-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

.mobile-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
}

/* ══════════════════════════════════
   MAIN CONTENT
══════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  max-width: 900px;
  padding: 60px 64px 80px;
  min-height: 100vh;
}

/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero-section {
  padding-bottom: 56px;
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: 56px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold);
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 28px;
  letter-spacing: 0.05em;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.gold-text {
  color: var(--gold);
  position: relative;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

/* Stats Bar */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 100px;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.stat-value.mono { font-family: var(--font-mono); color: var(--gold); }
.stat-value.status-ok { color: #4CAF50; }

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--bg-border);
  align-self: center;
}

/* ══════════════════════════════════
   BUTTONS
══════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: #000;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 10px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--gold-bright);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--gold-glow-strong);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  padding: 10px 22px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--bg-border);
  transition: all var(--transition);
}

.btn-ghost:hover {
  border-color: var(--gold-dim);
  color: var(--text-primary);
}

/* ══════════════════════════════════
   CARDS GRID
══════════════════════════════════ */
.cards-section { margin-bottom: 56px; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.doc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--gold-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.doc-card:hover {
  border-color: var(--gold-dim);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.doc-card:hover::before { opacity: 1; }

.card-featured {
  border-color: var(--gold-dim);
  background: linear-gradient(135deg, rgba(201,162,39,0.08) 0%, var(--bg-card) 50%);
}

.card-icon {
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
}

.card-body h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-body p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.card-arrow {
  margin-top: auto;
  font-size: 16px;
  color: var(--gold-dim);
  transition: color var(--transition), transform var(--transition);
}

.doc-card:hover .card-arrow {
  color: var(--gold);
  transform: translateX(4px);
}

/* ══════════════════════════════════
   CONTENT SECTIONS
══════════════════════════════════ */
.content-section {
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--bg-border);
}

.content-section:last-of-type {
  border-bottom: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-intro {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.section-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--gold);
  text-decoration: none;
  font-family: var(--font-mono);
  transition: opacity var(--transition);
}

.section-link:hover { opacity: 0.7; }

/* ══════════════════════════════════
   PARAMS TABLE
══════════════════════════════════ */
.params-table {
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.param-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  gap: 16px;
  border-bottom: 1px solid var(--bg-border);
  transition: background var(--transition);
}

.param-row:last-child { border-bottom: none; }
.param-row:hover { background: var(--bg-card); }

.param-key {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  min-width: 140px;
  letter-spacing: 0.05em;
}

.param-val {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}

.param-val.mono {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
}

/* ══════════════════════════════════
   COPY BUTTON
══════════════════════════════════ */
.copy-btn {
  background: var(--bg-border);
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: var(--gold-dim);
}

.copy-btn.copied {
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
}

/* ══════════════════════════════════
   TOKENS LIST
══════════════════════════════════ */
.tokens-list {
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.token-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
  border-bottom: 1px solid var(--bg-border);
  transition: background var(--transition);
}

.token-row:last-child { border-bottom: none; }
.token-row:hover { background: var(--bg-card); }

.token-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}

.token-symbol {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}

.token-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.token-address {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ══════════════════════════════════
   PILLARS
══════════════════════════════════ */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.pillar {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition);
}

.pillar:hover { border-color: var(--gold-dim); }

.pillar-icon {
  font-size: 20px;
  color: var(--gold);
  margin-bottom: 10px;
}

.pillar h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.pillar p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ══════════════════════════════════
   CTA SECTION
══════════════════════════════════ */
.cta-section {
  background: linear-gradient(135deg, rgba(201,162,39,0.1) 0%, var(--bg-card) 60%);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 40px;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-text h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cta-text p {
  font-size: 14px;
  color: var(--text-secondary);
}

.cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ══════════════════════════════════
   CODE BLOCKS
══════════════════════════════════ */
pre {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  overflow-x: auto;
  margin: 16px 0;
  position: relative;
}

code {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-code);
}

p code, li code {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}

.code-block {
  position: relative;
}

.code-copy {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--bg-border);
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition);
}

.code-copy:hover { background: var(--gold-glow); color: var(--gold); }

/* ══════════════════════════════════
   PAGE CONTENT (inner pages)
══════════════════════════════════ */
.page-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.15;
}

.page-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.page-divider {
  border: none;
  border-top: 1px solid var(--bg-border);
  margin: 40px 0;
}

h3.doc-h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 32px 0 12px;
}

p.doc-p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 680px;
}

/* Step indicator */
.step-list { display: flex; flex-direction: column; gap: 0; }

.step-item {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 32px;
}

.step-item:last-child { padding-bottom: 0; }

.step-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 40px;
  bottom: 0;
  width: 1px;
  background: var(--bg-border);
}

.step-num {
  width: 36px;
  height: 36px;
  background: var(--gold-glow);
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  flex-shrink: 0;
  z-index: 1;
}

.step-content h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  padding-top: 6px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Alert / callout */
.callout {
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.6;
}

.callout-info {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: #93C5FD;
}

.callout-warning {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  color: #FDE68A;
}

.callout-success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86EFAC;
}

.callout-icon { font-size: 16px; margin-top: 1px; }

/* Table */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

.doc-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--bg-border);
  text-align: left;
}

.doc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bg-border);
  color: var(--text-secondary);
  vertical-align: top;
}

.doc-table tr:hover td { background: var(--bg-card); }
.doc-table td.mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--gold); }

/* ══════════════════════════════════
   TOAST
══════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 10px 20px;
  border-radius: var(--radius);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════
   RESPONSIVE
══════════════════════════════════ */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,0.5);
  }

  .mobile-header { display: flex; }

  .main-content {
    margin-left: 0;
    padding: calc(var(--header-height) + 24px) 20px 60px;
  }

  .hero-title { font-size: 34px; }

  .stat-divider { display: none; }
  .stats-bar { gap: 12px; }

  .cta-inner { flex-direction: column; }

  .token-address { display: none; }

  .param-key { min-width: 110px; }
}
