@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-0: #07070c;
  --bg-1: #0f0f16;
  --bg-2: #17171f;
  --bg-3: #1f1f29;
  --border: #1e1e2a;
  --border-subtle: #14141e;
  --text-0: #eeeef2;
  --text-1: #a0a0b4;
  --text-2: #606074;
  --gold: #d4a72c;
  --gold-soft: rgba(212, 167, 44, 0.12);
  --gold-hover: #e0b83a;
  --blue: #5b9aff;
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.12);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.12);
  --radius: 10px;
  --radius-lg: 16px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  --max-w: 1180px;
  --transition: 150ms ease;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-0: #f5f5f8;
    --bg-1: #ffffff;
    --bg-2: #f0f0f5;
    --bg-3: #e8e8ee;
    --border: #dddde5;
    --border-subtle: #eeeeee;
    --text-0: #111122;
    --text-1: #55556a;
    --text-2: #8888a0;
    --gold: #b8901a;
    --gold-soft: rgba(184, 144, 26, 0.1);
    --gold-hover: #a07e12;
    --green: #16a367;
    --green-soft: rgba(22, 163, 103, 0.1);
    --red: #dc4545;
    --red-soft: rgba(220, 69, 69, 0.1);
  }
}

:root[data-theme="dark"] {
  --bg-0: #07070c;
  --bg-1: #0f0f16;
  --bg-2: #17171f;
  --bg-3: #1f1f29;
  --border: #1e1e2a;
  --border-subtle: #14141e;
  --text-0: #eeeef2;
  --text-1: #a0a0b4;
  --text-2: #606074;
  --gold: #d4a72c;
  --gold-soft: rgba(212, 167, 44, 0.12);
  --gold-hover: #e0b83a;
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.12);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.12);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg-0);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Layout ── */

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

.section {
  padding: 72px 0;
}

.section + .section {
  border-top: 1px solid var(--border-subtle);
}

/* ── Header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-0);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text-0);
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--gold);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: #07070c;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

nav a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}

nav a:hover, nav a.active {
  color: var(--text-0);
  background: var(--bg-2);
}

.nav-cta {
  background: var(--gold) !important;
  color: #07070c !important;
  font-weight: 600 !important;
  padding: 7px 16px !important;
  margin-left: 8px;
}

.nav-cta:hover {
  background: var(--gold-hover) !important;
}

.mobile-toggle {
  display: none;
  color: var(--text-1);
  font-size: 22px;
  padding: 4px;
}

/* ── Hero ── */

.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-size: 48px;
  font-weight: 800;
  color: var(--text-0);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 720px;
  margin: 0 auto 16px;
}

.hero p {
  font-size: 18px;
  color: var(--text-2);
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

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

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--gold);
  color: #07070c;
}

.btn-primary:hover {
  background: var(--gold-hover);
  color: #07070c;
}

.btn-secondary {
  background: var(--bg-2);
  color: var(--text-0);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-3);
  border-color: var(--text-2);
  color: var(--text-0);
}

/* ── Data Cards ── */

.cards-grid {
  display: grid;
  gap: 12px;
}

.cards-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.cards-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

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

.card:hover {
  border-color: var(--text-2);
  background: var(--bg-2);
}

.card-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.card-code {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 8px;
}

.card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-0);
  font-variant-numeric: tabular-nums;
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

.card-sub {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 4px;
}

.card-change {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 8px;
}

.positive {
  color: var(--green);
  background: var(--green-soft);
}

.negative {
  color: var(--red);
  background: var(--red-soft);
}

/* ── Section headers ── */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: -0.02em;
}

.section-header a {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.section-note {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 16px;
  text-align: right;
}

/* ── Tables ── */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-1);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-1);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-1);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--bg-2);
}

td:first-child {
  font-weight: 600;
  color: var(--text-0);
}

/* ── API / Pricing preview ── */

.api-section {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
}

.api-section h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-0);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.api-section p {
  max-width: 520px;
  margin: 0 auto 32px;
}

.code-block {
  background: var(--bg-0);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  text-align: left;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.7;
  overflow-x: auto;
  max-width: 600px;
  margin: 0 auto 28px;
}

.code-block .kw { color: var(--blue); }
.code-block .str { color: var(--green); }
.code-block .cmt { color: var(--text-2); }

/* ── Features ── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  padding: 28px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--gold-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 16px;
}

.feature h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-0);
  margin-bottom: 6px;
}

.feature p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ── Ticker ── */

.ticker {
  display: flex;
  gap: 24px;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border-subtle);
}

.ticker::-webkit-scrollbar {
  display: none;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.ticker-code {
  font-weight: 600;
  color: var(--text-0);
}

.ticker-value {
  color: var(--text-1);
  font-family: var(--mono);
  font-size: 12px;
}

.ticker-change {
  font-weight: 600;
  font-size: 12px;
}

/* ── Footer ── */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 0;
  color: var(--text-2);
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 40px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

.footer-brand p {
  max-width: 280px;
  margin-top: 8px;
  line-height: 1.6;
}

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

.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  color: var(--text-2);
  font-size: 14px;
  padding: 3px 0;
}

.footer-col a:hover {
  color: var(--text-0);
}

.footer-bottom {
  max-width: var(--max-w);
  margin: 32px auto 0;
  padding: 20px 20px 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
}

/* ── Loading ── */

.skeleton {
  background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
  }

  .hero p {
    font-size: 16px;
  }

  .section {
    padding: 48px 0;
  }

  .cards-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid-3 {
    grid-template-columns: 1fr;
  }

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

  .api-section {
    padding: 32px 20px;
  }

  .code-block {
    font-size: 12px;
  }

  nav {
    display: none;
  }

  nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg-0);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    gap: 4px;
  }

  nav.open a {
    padding: 10px 12px;
  }

  .mobile-toggle {
    display: block;
  }

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

  .footer-links {
    flex-wrap: wrap;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 26px;
  }

  .cards-grid-4, .cards-grid-3 {
    grid-template-columns: 1fr;
  }

  .card-value {
    font-size: 18px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}
