/* ATA Coin website styles.
   The ATA Coin Design System is the source of truth: tokens, the global
   reset, and the core component styles are imported below, and every value
   here derives from those tokens. Light/dark ships from the same tokens
   (paper/ink swap on prefers-color-scheme) — no per-theme overrides live in
   this file. See DESIGN.md and the design-system README for the rules. */

@import "tokens/colors.css";
@import "tokens/typography.css";
@import "tokens/spacing.css";
@import "tokens/effects.css";
@import "tokens/motion.css";
@import "base.css";
@import "components.css";

/* --- Bridge: names the site JS/charts expect, mapped onto design tokens.
   Allocation colors are locked to their roles (never reassigned per theme);
   the neutrals and status tints recompute automatically because they are
   color-mixes of ink into paper. --- */
:root {
  --series-1: var(--allocation-founder);
  --series-2: var(--allocation-liquidity);
  --series-3: var(--allocation-community);
  --series-4: var(--allocation-treasury);

  --grid: var(--border-default);
  --baseline: var(--border-strong);
  --surface-1: var(--bg-card);
  --border: var(--border-default);
  --text-muted: var(--text-tertiary);

  --badge-pre: var(--bg-sunken);
  --badge-live: color-mix(in oklch, var(--allocation-treasury) 16%, var(--paper));
  --badge-testnet: color-mix(in oklch, var(--allocation-community) 18%, var(--paper));
}

/* --- Layout: a single reading column, document not dashboard. --- */
body {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-7) var(--space-5) var(--space-9);
}

/* --- Type scale (weight + space, one typeface, no webfonts). --- */
h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: var(--space-3) 0 var(--space-2);
}
h2 {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-snug);
  margin-top: var(--space-8);
  padding-bottom: var(--space-2);
  border-bottom: var(--border-width) solid var(--border-default);
}
h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  margin-top: var(--space-6);
}
h4 {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-2);
}

p { margin: var(--space-3) 0; }

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-sunken);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
}

/* --- Brand header --- */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.brand h1 { margin: 0; }
.brand-mark { width: 40px; height: 40px; display: block; }
/* The lockup already carries the "ATA" wordmark; theme swap via <picture>. */
.brand-lockup { height: 32px; width: auto; display: block; }

.tagline {
  font-size: var(--text-md);
  line-height: var(--leading-snug);
  color: var(--text-secondary);
  max-width: 46rem;
}
.aside {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* --- Status badges: quiet pills, never sirens. --- */
.badge {
  display: inline-block;
  margin: 0;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-xs);
  border: var(--border-width) solid var(--border-default);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
}
.badge-pre { background: var(--badge-pre); color: var(--text-secondary); }
.badge-live { background: var(--badge-live); }
.badge-testnet { background: var(--badge-testnet); }
.badge a { color: inherit; }

.banner {
  background: var(--badge-testnet);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

/* --- Tables: first-class, bordered not elevated. --- */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--text-sm);
}
th, td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--border-width) solid var(--border-default);
}
tbody tr:last-child td { border-bottom: none; }
th { color: var(--text-secondary); font-weight: var(--weight-semibold); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td a { font-family: var(--font-mono); font-size: var(--text-sm); }

/* --- Allocation swatches (locked colors). --- */
.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-xs);
  margin-right: var(--space-2);
}
.swatch-1 { background: var(--series-1); }
.swatch-2 { background: var(--series-2); }
.swatch-3 { background: var(--series-3); }
.swatch-4 { background: var(--series-4); }

/* --- Stat tiles & cards: bordered containers, generous padding. --- */
.stat-row, .card-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin: var(--space-4) 0;
}
.stat-tile, .card {
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  flex: 1 1 240px;
}
.stat-caption {
  display: block;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
.stat-value {
  display: block;
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  font-variant-numeric: tabular-nums;
  margin: var(--space-1) 0;
}

/* --- Definition lists inside vesting cards. --- */
dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px var(--space-3);
  font-size: var(--text-sm);
}
dt { color: var(--text-secondary); }
dd { margin: 0; font-variant-numeric: tabular-nums; }

/* --- Charts / visualizations. --- */
.viz-row { display: flex; flex-wrap: wrap; gap: var(--space-5); align-items: center; }
.viz-row table { flex: 1 1 380px; }

figure.viz-root {
  margin: var(--space-4) 0;
  background: var(--bg-card);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  flex: 0 1 360px;
}
figure.viz-root.wide { flex: 1 1 100%; }
figure svg { width: 100%; height: auto; display: block; }

.chart-label { font-size: 13px; fill: var(--text-primary); font-family: var(--font-sans); }
.chart-annotation { font-size: 11px; fill: var(--text-secondary); font-family: var(--font-sans); }
.chart-tick { font-size: 11px; fill: var(--text-tertiary); font-family: var(--font-sans); }
.chart-grid { stroke: var(--grid); stroke-width: 1; }
.chart-cliff { fill: var(--baseline); }
.chart-today { stroke: var(--text-primary); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart-center-value { font-size: 30px; font-weight: var(--weight-bold); fill: var(--text-primary); font-family: var(--font-sans); }
.chart-center-caption { font-size: 12px; fill: var(--text-secondary); font-family: var(--font-sans); }

/* --- Buttons: secondary/outline style (see components.css for the primitive). --- */
button {
  font: inherit;
  font-weight: var(--weight-semibold);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  border: var(--border-width) solid var(--border-strong);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard);
}
button:hover { background: var(--bg-sunken); }

footer {
  margin-top: var(--space-8);
  padding-top: var(--space-4);
  border-top: var(--border-width) solid var(--border-default);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}
