/* ======================================================
   VAULTFIRE DEVELOPER PORTAL — style.css
   Dark-themed developer docs
   ====================================================== */

/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --orange: #FF6B35;
  --orange-dim: #cc5529;
  --orange-glow: rgba(255, 107, 53, 0.15);
  --orange-glow-strong: rgba(255, 107, 53, 0.3);
  --bg: #0A0A0A;
  --bg-alt: #0F0F12;
  --surface: #141418;
  --surface-2: #1A1A2E;
  --surface-3: #22222E;
  --border: #2A2A35;
  --border-light: #3A3A48;
  --text: #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-muted: #707080;
  --text-faint: #505060;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --content-width: 1120px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #FF8F66; }

::selection {
  background: rgba(255, 107, 53, 0.25);
  color: var(--text);
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-orange { color: var(--orange); }

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--orange);
  text-decoration: none;
}
.nav-logo svg { flex-shrink: 0; display: inline-block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text); }
.nav-github {
  display: flex;
  align-items: center;
}
.nav-github svg { fill: var(--text-secondary); transition: fill var(--transition); }
.nav-github:hover svg { fill: var(--text); }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 0 24px 16px;
  gap: 12px;
}
.nav-mobile a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
}
.nav-mobile.open { display: flex; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
}

/* === Hero === */
.hero {
  position: relative;
  padding: 160px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(255, 107, 53, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(3rem, 1rem + 6vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.hero-tagline {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-sub {
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:hover {
  background: #FF8F66;
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-light);
}

/* === Stats Bar === */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 0;
  background: var(--surface);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: clamp(2rem, 1.5rem + 1.5vw, 3rem);
  font-weight: 800;
  color: var(--orange);
  line-height: 1.1;
}

.stat-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

.stat-sub {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
}

/* === Sections === */
.section {
  padding: clamp(64px, 8vw, 100px) 0;
}

.section-alt {
  background: var(--surface);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* === Quickstart === */
.quickstart-steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.qs-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.qs-step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-top: 4px;
}

.qs-step-content {
  flex: 1;
  min-width: 0;
}

.qs-step-content h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.qs-connector {
  width: 2px;
  height: 24px;
  background: var(--border-light);
  margin: 0 0 0 19px;
}

/* === Code Blocks === */
.code-block {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  color: #e0e0e0;
}

.code-block code {
  font-family: inherit;
  font-size: inherit;
  background: none !important;
  padding: 0 !important;
  color: inherit;
}

/* Prism overrides for dark theme */
.code-block .token.comment { color: #6a737d; }
.code-block .token.string { color: #a5d6ff; }
.code-block .token.keyword { color: #ff7b72; }
.code-block .token.function { color: #d2a8ff; }
.code-block .token.number { color: #79c0ff; }
.code-block .token.operator { color: #ff7b72; }
.code-block .token.punctuation { color: #8b949e; }
.code-block .token.property { color: #7ee787; }
.code-block .token.boolean { color: #79c0ff; }

/* === Framework Picker === */
.fw-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.fw-tab {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.fw-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}
.fw-tab.active {
  color: var(--orange);
  background: var(--orange-glow);
  border-color: rgba(255, 107, 53, 0.2);
}

.fw-panel {
  display: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.fw-panel.active { display: block; }

.fw-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.fw-panel-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.pkg-name {
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  color: var(--orange);
}

/* === Trust Flow === */
.trust-flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

.trust-step {
  text-align: center;
  flex: 0 1 180px;
}

.trust-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--orange-glow);
  border: 1px solid rgba(255, 107, 53, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.trust-step h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.trust-step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.trust-arrow {
  display: flex;
  align-items: center;
  padding-top: 20px;
}

@media (max-width: 700px) {
  .trust-flow { flex-direction: column; align-items: center; }
  .trust-arrow { transform: rotate(90deg); padding-top: 0; }
}

/* === Street Cred === */
.cred-section {
  max-width: 640px;
  margin: 0 auto;
}

.cred-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  text-align: center;
}

.cred-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.cred-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 6px;
}
.cred-label span:first-child { color: var(--text); font-weight: 500; }
.cred-label span:last-child { color: var(--text-muted); font-weight: 600; }

.cred-bar {
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.cred-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #FF8F66);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.tier-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.tier {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 100px;
}

.tier-icon { font-size: 24px; }
.tier-name { font-size: 14px; font-weight: 700; color: var(--text); }
.tier-req { font-size: 12px; color: var(--text-muted); }

.tier.bronze { border-color: #CD7F32; }
.tier.silver { border-color: #C0C0C0; }
.tier.gold { border-color: #FFD700; }
.tier.platinum { border-color: #B9F2FF; }

/* === Comparison Table === */
.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.comparison-table th, .comparison-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

.comparison-table td { color: var(--text-secondary); }
.comparison-table .highlight-col { background: rgba(255, 107, 53, 0.04); }
.comparison-table th.highlight-col { color: var(--orange); }

.check {
  color: #4ade80;
  font-weight: 700;
  margin-right: 6px;
}
.cross {
  color: #f87171;
  font-weight: 700;
  margin-right: 6px;
}

/* === Contract Tabs === */
.chain-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.chain-tab {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.chain-tab:hover { color: var(--text-secondary); background: rgba(255, 255, 255, 0.03); }
.chain-tab.active { color: var(--orange); background: var(--orange-glow); border-color: rgba(255, 107, 53, 0.2); }
.chain-id { font-size: 11px; color: var(--text-faint); margin-left: 6px; }

.chain-panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.chain-panel.active { display: block; }

.chain-panel-badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-glow);
  border: 1px solid rgba(255, 107, 53, 0.15);
  border-radius: 100px;
  margin-bottom: 16px;
}

.contract-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contract-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  gap: 16px;
}
.contract-row:hover { background: rgba(255, 255, 255, 0.04); }

.contract-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.contract-addr {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  word-break: break-all;
  transition: color var(--transition);
}
.contract-addr:hover { color: var(--orange); }

.deployer-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 24px;
}

/* === Ecosystem Table === */
.eco-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.eco-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.eco-table th, .eco-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.eco-table th {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
}

.eco-table td { color: var(--text-secondary); }
.eco-table td code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  background: var(--surface-2);
  padding: 2px 8px;
  border-radius: 4px;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 100px;
}
.badge.npm { background: rgba(203, 56, 55, 0.15); color: #f87171; }
.badge.pip { background: rgba(53, 114, 165, 0.15); color: #60a5fa; }

/* === Trust Checker === */
.checker-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.checker-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
}

.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.input-group input, .input-group select {
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  transition: border-color var(--transition);
}
.input-group input:focus, .input-group select:focus {
  border-color: var(--orange);
  outline: none;
}
.input-group input { min-width: 0; }
.input-group select { cursor: pointer; }
.input-group select option { background: var(--bg); color: var(--text); }

.btn-check { height: 42px; padding: 0 24px; white-space: nowrap; }

@media (max-width: 640px) {
  .checker-form {
    grid-template-columns: 1fr;
  }
  .btn-check { width: 100%; height: auto; padding: 12px 24px; }
}

.checker-result {
  min-height: 120px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 24px;
}

.checker-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  text-align: center;
}
.checker-placeholder p { color: var(--text-muted); font-size: 14px; }

.checker-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  color: var(--text-secondary);
  font-size: 14px;
}

.checker-loading .spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.checker-error {
  color: #f87171;
  font-size: 14px;
  text-align: center;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Trust result card */
.trust-result {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.trust-result-header {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.trust-score-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.trust-score-circle small {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.trust-score-circle.tier-none { background: var(--surface-2); color: var(--text-muted); border: 2px solid var(--border); }
.trust-score-circle.tier-bronze { background: rgba(205, 127, 50, 0.12); color: #CD7F32; border: 2px solid #CD7F32; }
.trust-score-circle.tier-silver { background: rgba(192, 192, 192, 0.12); color: #C0C0C0; border: 2px solid #C0C0C0; }
.trust-score-circle.tier-gold { background: rgba(255, 215, 0, 0.12); color: #FFD700; border: 2px solid #FFD700; }
.trust-score-circle.tier-platinum { background: rgba(185, 242, 255, 0.12); color: #B9F2FF; border: 2px solid #B9F2FF; }

.trust-meta { flex: 1; min-width: 0; }
.trust-meta h4 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.trust-meta p { font-size: 13px; color: var(--text-secondary); }

.trust-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.trust-breakdown-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
}
.trust-breakdown-item span:first-child { color: var(--text-secondary); }
.trust-breakdown-item span:last-child { font-weight: 700; color: var(--text); }

/* === Footer === */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.footer-mission {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
  max-width: 400px;
}

.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-bottom strong { color: var(--text-secondary); }

/* === Animations === */
@media (prefers-reduced-motion: no-preference) {
  .qs-step, .trust-step, .stat, .fw-panel, .chain-panel {
    animation: fadeInUp 0.4s ease both;
  }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Responsive fine-tuning === */
@media (max-width: 480px) {
  .hero { padding: 120px 0 60px; }
  .hero-title { letter-spacing: 0.03em; }
  .fw-panel { padding: 20px; }
  .chain-panel { padding: 16px; }
  .checker-card { padding: 20px; }
  .contract-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .tier-badges { gap: 8px; }
  .tier { padding: 12px 16px; min-width: 80px; }
}
