/* Meridian — design system */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Inter+Tight:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #FAFAF7;
  --bg-band: #F2F1EC;
  --bg-inverse: #0E0E0C;
  --text: #0E0E0C;
  --text-muted: #6B6B66;
  --text-faint: #9B9B95;
  --text-inverse: #FAFAF7;
  --divider: #E5E3DC;
  --divider-strong: #C9C7BF;
  --accent: #0E0E0C;
  --accent-rare: #1F4DD8;
  --positive: #1F6B3C;
  --warning: #8A5A1B;
  --negative: #9B2A1F;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-none: 0 0 0 1px var(--divider);

  --font-display: "Inter Tight", -apple-system, system-ui, sans-serif;
  --font-body: "Inter", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1200px;
  --container-tight: 960px;
}

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

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

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

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

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

.num, .tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: var(--font-mono); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--divider);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 500; font-size: 17px; letter-spacing: -0.01em;
}
.brand__mark {
  width: 22px; height: 22px;
  background: var(--text); color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 500;
  font-size: 12px;
}
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { font-size: 14px; color: var(--text); }
.nav a:hover { text-decoration: none; color: var(--text-muted); }
.header-cta { display: flex; gap: 12px; align-items: center; }
.header-cta a.text-link { font-size: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 40px; padding: 0 18px;
  font-size: 14px; font-weight: 500;
  border-radius: var(--radius);
  transition: opacity 120ms ease, background 120ms ease;
  letter-spacing: -0.005em;
}
.btn--primary { background: var(--text); color: var(--text-inverse); }
.btn--primary:hover { background: #1A1A18; text-decoration: none; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--divider); }
.btn--ghost:hover { background: var(--bg-band); text-decoration: none; }
.btn--sm { height: 32px; padding: 0 14px; font-size: 13px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; }

.text-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text);
  font-weight: 500; font-size: 14px;
  border-bottom: 1px solid var(--divider-strong);
  padding-bottom: 1px;
  transition: border-color 120ms ease;
}
.text-link:hover { border-bottom-color: var(--text); text-decoration: none; }
.text-link__arrow { transition: transform 120ms ease; }
.text-link:hover .text-link__arrow { transform: translateX(2px); }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
section + section { border-top: 1px solid var(--divider); }
.section--band { background: var(--bg-band); }
.section--dark { background: var(--bg-inverse); color: var(--text-inverse); }
.section--dark .text-muted, .section--dark .eyebrow { color: rgba(250, 250, 247, 0.6); }
.section--tight { padding: 72px 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.eyebrow::before { content: "— "; color: var(--text-faint); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}

.h-display {
  font-size: 72px;
  line-height: 1.02;
  font-weight: 500;
  letter-spacing: -0.025em;
  max-width: 18ch;
}
.h-section {
  font-size: 44px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
  max-width: 18ch;
}
.h-card {
  font-size: 22px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 56ch;
}

.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 64px; }
.hero__title { margin-bottom: 28px; }
.hero__lede { margin-bottom: 40px; }
.hero__cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

.hero__stats {
  margin-top: 96px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--divider);
}
.hero__stat {
  padding: 28px 0 0;
  border-right: 1px solid var(--divider);
  padding-right: 24px;
}
.hero__stat:last-child { border-right: none; }
.hero__stat-value {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 500; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.hero__stat-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Logo strip ---------- */
.infrastructure-strip {
  padding: 32px 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  background: var(--bg-band);
}
.infrastructure-strip__inner {
  display: flex; gap: 48px; align-items: center;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}
.infrastructure-strip__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.infrastructure-strip__item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ---------- How it works ---------- */
.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 64px;
  border-top: 1px solid var(--divider);
}
.how__col {
  padding: 32px 32px 32px 0;
  border-right: 1px solid var(--divider);
}
.how__col:last-child { border-right: none; padding-right: 0; }
.how__col + .how__col { padding-left: 32px; }
.how__num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.how__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 16px;
}
.how__body {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ---------- Code block ---------- */
.code {
  background: var(--bg-inverse);
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
}
.code .c-key { color: #B8B8B0; }
.code .c-str { color: #D9C68F; }
.code .c-num { color: #9CC4F0; }
.code .c-com { color: #6B6B66; font-style: italic; }
.code .c-fn  { color: #FFFFFF; }
.code .c-op  { color: #B8B8B0; }

/* ---------- Console / dashboard preview ---------- */
.console {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.console__top {
  display: flex; align-items: center; justify-content: space-between;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--divider);
  background: var(--bg-band);
}
.console__dots { display: flex; gap: 6px; }
.console__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--divider-strong); }
.console__url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.console__body { padding: 0; }

.dash {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 540px;
}
.dash__sidebar {
  border-right: 1px solid var(--divider);
  padding: 20px 16px;
  background: var(--bg);
}
.dash__sidebar-section {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 16px 8px 8px;
}
.dash__sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  font-size: 13px;
  border-radius: 4px;
  color: var(--text);
}
.dash__sidebar-link.is-active { background: var(--bg-band); font-weight: 500; }
.dash__sidebar-link .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--divider-strong); }
.dash__sidebar-link.is-active .dot { background: var(--text); }

.dash__main { padding: 24px 28px; }

.dash__topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--divider);
}
.dash__org {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}
.dash__org-mark {
  width: 18px; height: 18px;
  background: var(--text); color: var(--bg);
  font-family: var(--font-mono); font-size: 10px;
  display: grid; place-items: center;
}

.kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  margin-bottom: 28px;
}
.kpi {
  padding: 18px 20px;
  border-right: 1px solid var(--divider);
}
.kpi:last-child { border-right: none; }
.kpi__label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.04em;
  color: var(--text-muted); text-transform: uppercase;
  margin-bottom: 8px;
}
.kpi__value {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 500;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}
.kpi__delta {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-top: 4px;
  color: var(--text-muted);
}
.kpi__delta--up { color: var(--positive); }

.panel {
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--bg);
  margin-bottom: 24px;
}
.panel__head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: space-between;
}
.panel__title {
  font-family: var(--font-display);
  font-weight: 500; font-size: 14px;
  letter-spacing: -0.01em;
}
.panel__action {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.panel__body { padding: 0; }

table.feed {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.feed th, table.feed td {
  padding: 12px 18px;
  text-align: left;
  border-bottom: 1px solid var(--divider);
  font-variant-numeric: tabular-nums;
}
table.feed th {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
table.feed tr:last-child td { border-bottom: none; }
.feed__hash {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.feed__amt { font-weight: 500; }
.feed__status {
  font-family: var(--font-mono);
  font-size: 11px;
  display: inline-flex; align-items: center; gap: 6px;
}
.feed__status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--positive); }
.feed__status--pending .dot { background: var(--warning); }

/* ---------- Compliance grid ---------- */
.compliance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-top: 56px;
}
.compliance__list { list-style: none; }
.compliance__list li {
  padding: 20px 0;
  border-bottom: 1px solid var(--divider);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: baseline;
}
.compliance__list li:first-child { padding-top: 0; }
.compliance__label {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.compliance__value {
  font-size: 15px;
  color: var(--text);
}

/* ---------- Token panels ---------- */
.token-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  margin-top: 56px;
}
.token-cell {
  background: var(--bg);
  padding: 32px;
}
.token-cell__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.token-cell__value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}
.token-cell__sub {
  font-size: 14px;
  color: var(--text-muted);
}

.alloc-bar {
  display: flex;
  height: 12px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--divider);
  margin: 28px 0 24px;
}
.alloc-seg {
  height: 100%;
  border-right: 1px solid var(--divider);
}
.alloc-seg:last-child { border-right: none; }
.alloc-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
  font-size: 14px;
}
.alloc-list li {
  list-style: none;
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}
.alloc-swatch {
  width: 12px; height: 12px;
  border: 1px solid var(--text);
}
.alloc-pct {
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.alloc-amt {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 64px 0 40px;
  background: var(--bg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: var(--text); }
.footer-col a:hover { color: var(--text-muted); text-decoration: none; }
.footer-disclaimer {
  border-top: 1px solid var(--divider);
  padding-top: 32px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 88ch;
}
.footer-disclaimer p + p { margin-top: 12px; }
.footer-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
}

/* ---------- Nav token popover (hover-reveal CA) ---------- */
.nav-token { position: relative; }
.nav-token > a { position: relative; }
.nav-token::after {
  /* invisible bridge so hover stays alive moving from link to popover */
  content: '';
  position: absolute;
  top: 100%;
  left: -16px; right: -16px;
  height: 18px;
}
.nav-token-pop {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 6px;
  padding: 14px 16px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.02);
  z-index: 60;
}
.nav-token:hover .nav-token-pop,
.nav-token:focus-within .nav-token-pop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-token-pop::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 9px; height: 9px;
  background: var(--bg);
  border-left: 1px solid var(--divider);
  border-top: 1px solid var(--divider);
}
.nav-token-pop__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.nav-token-pop__row {
  display: flex; align-items: center; gap: 12px;
}
.nav-token-pop__addr {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  user-select: all;
  letter-spacing: -0.01em;
}
.nav-token-pop__copy {
  border: 1px solid var(--divider);
  background: var(--bg-band);
  padding: 4px 10px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.nav-token-pop__copy:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.nav-token-pop__copy.copied {
  background: var(--positive);
  color: var(--bg);
  border-color: var(--positive);
}

/* ---------- Social icons ---------- */
.social-inline {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  height: 22px;
  padding-right: 16px;
  margin-right: 4px;
  border-right: 1px solid var(--divider);
}
.social-inline a {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  color: var(--text-muted);
  transition: color 120ms ease;
}
.social-inline a:hover { color: var(--text); text-decoration: none; }
.social-inline svg { width: 15px; height: 15px; display: block; }

.social-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 20px;
}
.social-row a {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--divider);
  border-radius: 4px;
  color: var(--text);
  transition: border-color 120ms ease, background 120ms ease;
}
.social-row a:hover {
  border-color: var(--text);
  background: var(--bg-band);
  text-decoration: none;
}
.social-row svg { width: 14px; height: 14px; display: block; }

/* ---------- Misc ---------- */
.eyebrow-row {
  display: flex; gap: 24px; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 24px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--divider);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.dl-spec {
  list-style: none;
}
.dl-spec li {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--divider);
  font-size: 14px;
}
.dl-spec dt, .dl-spec .dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- CTA band ---------- */
.cta-band {
  padding: 120px 0;
  background: var(--bg-inverse);
  color: var(--text-inverse);
}
.cta-band h2 {
  color: var(--text-inverse);
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin-bottom: 32px;
}
.cta-band .lede { color: rgba(250, 250, 247, 0.65); margin-bottom: 40px; }
.cta-band .btn--primary {
  background: var(--text-inverse);
  color: var(--text);
}
.cta-band .btn--primary:hover { background: #FFFFFF; }
.cta-band .btn--ghost {
  border-color: rgba(250, 250, 247, 0.25);
  color: var(--text-inverse);
}
.cta-band .btn--ghost:hover { background: rgba(250, 250, 247, 0.08); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  section { padding: 64px 0; }
  .h-display { font-size: 44px; letter-spacing: -0.02em; }
  .h-section { font-size: 32px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__stat { border-right: none; border-bottom: 1px solid var(--divider); padding-bottom: 24px; }
  .how { grid-template-columns: 1fr; }
  .how__col { border-right: none; border-bottom: 1px solid var(--divider); padding: 24px 0; }
  .how__col + .how__col { padding-left: 0; }
  .compliance { grid-template-columns: 1fr; gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .nav { display: none; }
  .dash { grid-template-columns: 1fr; }
  .dash__sidebar { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpi { border-right: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
  .kpi:nth-child(2n) { border-right: none; }
  .token-grid { grid-template-columns: 1fr; }
  .alloc-list { grid-template-columns: 1fr; }
  .cta-band h2 { font-size: 36px; }
  .compliance__list li { grid-template-columns: 1fr; gap: 6px; }
}
