:root {
  --bg: #0b0e14;
  --surface: #121722;
  --border: #1f2734;
  --text: #e6edf3;
  --muted: #8b96a5;
  --up: #3fb950;
  --down: #f85149;
  --display: "JetBrains Mono", ui-monospace, monospace;
  --body: "Inter", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

.wrap { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--up); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--up); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.2; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  z-index: 10;
}
.site-header nav { display: flex; justify-content: space-between; align-items: center; height: 3.5rem; }
.brand { font-family: var(--display); font-weight: 700; color: var(--text); font-size: 1rem; }
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--up); }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--muted); font-size: 0.9rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* Hero */
.hero { padding: 5rem 0 4rem; border-bottom: 1px solid var(--border); }
.hero h1 { font-size: clamp(1.75rem, 4.5vw, 3rem); font-weight: 700; margin-bottom: 1rem; }
.hero-sub { color: var(--muted); font-size: 1.1rem; max-width: 34rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

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

.btn {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  background: var(--up);
  color: #04120a;
  border: 1px solid var(--up);
}
.btn:hover { text-decoration: none; filter: brightness(1.15); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); }

/* Candlestick signature */
.candles { width: min(560px, 100%); height: auto; margin-bottom: 2.5rem; display: block; }
.candle line { stroke-width: 2; }
.candle.up line, .candle.up rect { stroke: var(--up); fill: var(--up); }
.candle.down line, .candle.down rect { stroke: var(--down); fill: var(--down); }
.candle rect { opacity: 0.85; }

@media (prefers-reduced-motion: no-preference) {
  .candle { opacity: 0; transform: translateY(6px); animation: rise 0.5s ease-out forwards; }
  .candle:nth-child(1) { animation-delay: 0.05s; }
  .candle:nth-child(2) { animation-delay: 0.1s; }
  .candle:nth-child(3) { animation-delay: 0.15s; }
  .candle:nth-child(4) { animation-delay: 0.2s; }
  .candle:nth-child(5) { animation-delay: 0.25s; }
  .candle:nth-child(6) { animation-delay: 0.3s; }
  .candle:nth-child(7) { animation-delay: 0.35s; }
  .candle:nth-child(8) { animation-delay: 0.4s; }
  .candle:nth-child(9) { animation-delay: 0.45s; }
  .candle:nth-child(10) { animation-delay: 0.5s; }
  .candle:nth-child(11) { animation-delay: 0.55s; }
  .candle:nth-child(12) { animation-delay: 0.6s; }
  .candle:nth-child(13) { animation-delay: 0.65s; }
  .candle:nth-child(14) { animation-delay: 0.7s; }
  @keyframes rise { to { opacity: 1; transform: translateY(0); } }
}

/* Sections */
section.what, section.apps { padding: 3.5rem 1.25rem; }
section h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }
section h2::before { content: "$ "; color: var(--up); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}
.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.95rem; }
.card-tag { font-family: var(--display); font-size: 0.8rem; margin-bottom: 0.75rem; }
.card-links { margin-top: 1rem; display: flex; gap: 1rem; font-size: 0.9rem; }

.empty { color: var(--muted); font-style: italic; }

/* Legal pages */
.legal { padding: 3.5rem 1.25rem; max-width: 720px; }
.legal-eyebrow { font-family: var(--display); color: var(--up); font-size: 0.85rem; margin-bottom: 0.5rem; }
.legal h1 { font-size: 1.8rem; margin-bottom: 0.25rem; }
.legal-updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 2rem; }
.legal h2 { font-size: 1.15rem; margin: 2rem 0 0.75rem; }
.legal p, .legal li { color: #c4cdd6; font-size: 0.95rem; margin-bottom: 0.75rem; }
.legal ul { padding-left: 1.25rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 2rem; }
.site-footer p { color: var(--muted); font-size: 0.85rem; }
.footer-note { font-size: 0.8rem; margin-top: 0.25rem; }
