/* ============================================
   Burgundata — Shared Styles
   ============================================ */

:root {
  /* Colour system */
  --bg-deep: #0A0A0F;
  --bg-card: #111118;
  --bg-surface: #1A1715;
  --gold: #C09B5C;
  --text-primary: #E8E0D0;
  --text-secondary: #8A826E;
  --text-muted: #6A6252;
  --text-faint: #4A4540;
  --text-ghost: #3A3530;
  --text-hidden: #2A2520;
  --border: #1A1A22;
  --border-subtle: #2A2520;
  --code-key: #5A6A7A;
  --code-string: #8AAA7A;
  --code-bool: #C09B5C;
  --blue-accent: #4A6FA5;

  /* Typography */
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'SF Mono', 'Fira Code', monospace;
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg-deep);
  color: var(--text-secondary);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  display: block;
}

/* ============================================
   Layout
   ============================================ */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Typography
   ============================================ */

h1 {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1.2;
}

h2 {
  font-size: 22px;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.3;
}

h3 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.section-label {
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.caption {
  font-size: 11px;
  color: var(--text-ghost);
  margin-top: 12px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 400;
  font-family: var(--font-body);
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-deep);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* ============================================
   Cards
   ============================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px;
}

/* ============================================
   Code blocks
   ============================================ */

.code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}

.code-block-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-code);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.code-block-header .method {
  color: var(--gold);
}

.code-block-header .path {
  color: var(--text-muted);
}

.code-block pre {
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.code-block code {
  font-family: var(--font-code);
}

/* Syntax highlighting */
.ck { color: var(--code-key); }
.cs { color: var(--code-string); }
.cb { color: var(--code-bool); }
.cp { color: var(--text-faint); }

/* Inline code */
code.inline {
  font-family: var(--font-code);
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
  color: var(--text-primary);
}

/* ============================================
   Stats row
   ============================================ */

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

.stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 20px 16px;
  text-align: center;
}

.stat-value {
  font-size: 22px;
  font-weight: 400;
  color: var(--gold);
  line-height: 1.2;
}

.stat-label {
  font-size: 10px;
  color: var(--text-faint);
  margin-top: 4px;
}

/* ============================================
   Pricing
   ============================================ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 28px 24px;
}

.pricing-card.premium {
  border-color: var(--gold);
}

.pricing-card .price {
  font-size: 22px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pricing-card .price-period {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.pricing-card .tier-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.pricing-card ul {
  list-style: none;
  margin: 16px 0 24px;
}

.pricing-card li {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-muted);
  padding: 2px 0;
}

.pricing-card li.disabled {
  color: var(--text-hidden);
}

.pricing-card li.gold {
  color: var(--gold);
}

.pricing-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 20px;
}

/* ============================================
   Sections (index)
   ============================================ */

section {
  padding: 64px 0;
}

/* Hero */
.hero {
  padding: 80px 0 48px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-badge .label {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 12px;
}

.hero .subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.hero .description {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

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

/* Slope */
.slope-section {
  padding: 32px 0;
}

.slope-svg-wrapper {
  width: 100%;
}

.slope-svg-wrapper svg {
  width: 100%;
  height: auto;
}

/* Reveals list */
.reveals-list {
  list-style: none;
}

.reveals-list li {
  margin-bottom: 24px;
}

.reveals-list li h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.reveals-list li p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Social proof */
.social-proof {
  text-align: center;
  padding: 32px 0;
}

.social-proof p {
  font-size: 12px;
  color: var(--text-muted);
}

/* Built for */
.built-for-list {
  list-style: none;
}

.built-for-list li {
  margin-bottom: 16px;
}

.built-for-list li h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.built-for-list li p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  border-top: 1px solid #1A1715;
  padding: 32px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer .attribution {
  font-size: 12px;
  color: var(--text-ghost);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--gold);
}

/* ============================================
   Docs-specific
   ============================================ */

.docs-nav {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-nav .logo {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
}

.docs-nav a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.docs-nav a:hover {
  color: var(--gold);
}

.docs-section {
  margin-bottom: 64px;
}

.docs-section h2 {
  margin-bottom: 16px;
}

.docs-section p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.endpoint-block {
  margin-bottom: 48px;
}

.endpoint-block h3 {
  margin-bottom: 8px;
}

.endpoint-block p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

.params-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13px;
}

.params-table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-faint);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.params-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  vertical-align: top;
}

.params-table td:first-child {
  font-family: var(--font-code);
  color: var(--text-primary);
  white-space: nowrap;
}

.tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--font-code);
}

.tag-public {
  color: var(--code-string);
  border: 1px solid var(--code-string);
}

.tag-auth {
  color: var(--gold);
  border: 1px solid var(--gold);
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}

.tier-table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-faint);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.tier-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.tier-table td:first-child {
  color: var(--text-primary);
}

.error-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 16px 0;
}

.error-table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-faint);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.error-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.error-table td:first-child {
  font-family: var(--font-code);
  color: var(--text-primary);
}

/* ============================================
   Responsive
   ============================================ */

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

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero .subtitle {
    font-size: 18px;
  }

  .site-footer {
    flex-direction: column;
    text-align: center;
  }

  section {
    padding: 48px 0;
  }
}
