:root {
  --ink: #0d0e10;
  --surface-1: #16181b;
  --surface-2: #1c1f23;
  --line: #2a2d32;
  --line-soft: #202327;
  --ivory: #edeef0;
  --muted: #97a0aa;
  --faint: #5b6169;
  --gold: #c9a24a;
  --gold-soft: #8f7638;
  --buy: #6fae7f;
  --sell: #c4685a;

  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 2px;
}

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wrap {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 24px;
}

.font-data,
code {
  font-family: var(--font-mono);
}

code {
  color: var(--gold);
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(13, 14, 16, 0.85);
  backdrop-filter: blur(8px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.nav__logo {
  font-family: var(--font-mono);
  font-size: 14px;
}

.nav__links {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}

.nav__links a {
  transition: color 0.15s ease;
}

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

@media (max-width: 640px) {
  .nav__links {
    display: none;
  }
}


/* ---------- generic section ---------- */

.section {
  padding: 64px 0;
}

@media (min-width: 640px) {
  .section {
    padding: 80px 0;
  }
}

.section__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 12px;
}

.section__heading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section__note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  white-space: nowrap;
}

.section__lede {
  max-width: 62ch;
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

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

/* ---------- hero ---------- */

.hero {
  padding-top: 56px;
  padding-bottom: 64px;
}

@media (min-width: 640px) {
  .hero {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}

.hero__grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 640px) {
  .hero__grid {
    grid-template-columns: 1.3fr 0.9fr;
    gap: 32px;
  }
}

.hero__title {
  margin: 16px 0 0;
  font-size: 40px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.015em;
}

@media (min-width: 640px) {
  .hero__title {
    font-size: 48px;
  }
}

.hero__desc {
  max-width: 58ch;
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  display: inline-block;
}

.btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.btn--primary:hover {
  background: transparent;
  color: var(--gold);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--ivory);
}

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

.spec-card {
  height: max-content;
  border: 1px solid var(--line);
  background: rgba(22, 24, 27, 0.7);
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.spec-card__label {
  margin: 0 0 16px;
  color: var(--faint);
}

.spec-card__list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-card__row dt {
  color: var(--faint);
}

.spec-card__row dd {
  margin: 2px 0 0;
  color: var(--ivory);
}

/* ---------- reveal animation (hero only) ---------- */

.rise-in {
  animation: rise-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ticker__track {
    animation: none;
  }
  .rise-in {
    animation: none;
  }
}

/* ---------- video demo ---------- */

.video-frame {
  margin-top: 32px;
  border: 1px solid var(--line);
  background: var(--surface-1);
}

.video-frame__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.dot--sell {
  background: rgba(196, 104, 90, 0.7);
}

.dot--gold {
  background: rgba(201, 162, 74, 0.7);
}

.dot--buy {
  background: rgba(111, 174, 127, 0.7);
}

.video-frame__filename {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.video-frame__body {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: var(--ink);
}

.video-frame__body video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 24px;
  text-align: center;
}

.video-fallback p {
  max-width: 360px;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- architecture ---------- */

.arch-grid {
  display: grid;
  gap: 0;
  margin-top: 40px;
}

@media (min-width: 640px) {
  .arch-grid {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
  }
}

.arch-col {
  border: 1px solid var(--line);
  background: rgba(22, 24, 27, 0.6);
  padding: 16px;
}

.arch-col__title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
}

.arch-col ul {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.arch-col li {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
  font-family: var(--font-mono);
  color: var(--faint);
}

@media (min-width: 640px) {
  .arch-arrow {
    padding: 0 12px;
  }
}

/* ---------- features ledger table ---------- */

.ledger-wrap {
  margin-top: 32px;
  border: 1px solid var(--line);
  overflow-x: auto;
}

.ledger-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  text-align: left;
}

.ledger-table thead tr {
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.ledger-table th {
  padding: 12px 16px;
  font-weight: 400;
}

.ledger-table th:first-child {
  width: 220px;
}

.ledger-table tbody tr {
  border-bottom: 1px solid var(--line-soft);
}

.ledger-table tbody tr:last-child {
  border-bottom: none;
}

.ledger-table td {
  padding: 14px 16px;
  vertical-align: top;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

.ledger-table__name {
  font-weight: 500;
  color: var(--ivory);
  border-right: 1px solid var(--line-soft);
}

.ledger-table__impl {
  font-family: var(--font-mono);
  font-size: 12.5px;
  border-right: 1px solid var(--line-soft);
}

.ledger-table tbody tr:hover .ledger-table__name {
  color: var(--gold);
}

/* ---------- flow ---------- */

.flow-list {
  margin-top: 40px;
}

.flow-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
}

.flow-item:first-child {
  border-top: none;
}

.flow-item__num {
  flex-shrink: 0;
  width: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--faint);
}

.flow-item h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.flow-item p {
  max-width: 60ch;
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- stack / data model grids ---------- */

.stack-grid,
.data-grid {
  display: grid;
  gap: 32px;
  margin-top: 32px;
}

@media (min-width: 640px) {
  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .data-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .stack-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stack-group__title {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
}

.stack-group ul {
  margin-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.stack-group li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.data-group {
  border: 1px solid var(--line);
  background: rgba(22, 24, 27, 0.4);
  padding: 16px;
}

.data-group__title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ivory);
}

.data-group ul {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line-soft);
}

.footer .wrap {
  padding-top: 40px;
  padding-bottom: 40px;
}

.footer__note {
  max-width: 60ch;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
}

.footer__bottom a {
  transition: color 0.15s ease;
}

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