/* ─── tokens ─────────────────────────────────────────────────────────
   品牌主色来自比特币官方橙 #F7931A，中性色随站定义。 */
:root {
  --bg:      #faf9f6;
  --surface: #ffffff;
  --fg:      #191714;
  --muted:   #6d6a63;
  --border:  #e7e4dc;
  --accent:  #F7931A;

  --accent-soft: color-mix(in oklch, var(--accent) 14%, transparent);
  --fg-soft:     color-mix(in oklch, var(--fg) 6%, transparent);

  --font-display: 'Iowan Old Style', 'Charter', Georgia, 'Songti SC', 'Noto Serif SC', serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono:    ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --fs-h1: clamp(40px, 5.6vw, 68px);
  --fs-h2: clamp(30px, 3.8vw, 44px);
  --fs-h3: 21px;
  --fs-lead: 18px;
  --fs-body: 16px;
  --fs-meta: 13px;

  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;
  --gap-xl: 56px;
  --gap-2xl: 96px;
  --container: 1120px;
  --gutter: 28px;

  --radius: 10px;
  --radius-lg: 16px;
}

/* ─── reset & base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ─── layout primitives ─────────────────────────────────────────── */
.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(52px, 8vw, var(--gap-2xl)); }
.section + .section { border-top: 1px solid var(--border); }
.stack { display: flex; flex-direction: column; }
.stack > * + * { margin-top: var(--gap-md); }
.row { display: flex; align-items: center; gap: var(--gap-md); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--gap-md); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── type ──────────────────────────────────────────────────────── */
.h1, h1 { font-family: var(--font-display); font-size: var(--fs-h1); line-height: 1.08; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
.h2, h2 { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.14; letter-spacing: -0.015em; margin: 0; font-weight: 600; }
.h3, h3 { font-size: var(--fs-h3); font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; margin: 0; }
.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--muted); max-width: 60ch; margin: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--gap-md);
}
.meta { font-family: var(--font-mono); font-size: var(--fs-meta); color: var(--muted); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ext { border-bottom: 1px solid var(--border); transition: border-color .15s ease; }
.ext:hover { border-color: var(--accent); }

/* ─── chrome: nav + footer ──────────────────────────────────────── */
.topnav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklch, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topnav-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; gap: 16px; }
.topnav .logo { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; display: inline-flex; align-items: center; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-size: 14px; color: var(--muted); transition: color .15s ease; }
.nav-links a:hover { color: var(--fg); }
.nav-gh { flex-shrink: 0; }
.nav-toggle {
  display: none;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 12px;
  color: var(--fg); font-size: 16px; line-height: 1;
}
.pagefoot { padding-block: var(--gap-xl); color: var(--muted); font-size: 13px; border-top: 1px solid var(--border); }
.pagefoot .row-between { flex-wrap: wrap; gap: var(--gap-md); }
@media (max-width: 920px) {
  .nav-links, .nav-gh { display: none; }
  .nav-toggle { display: inline-flex; }
  .topnav.nav-open .nav-links {
    display: flex; flex-direction: column;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 16px var(--gutter) 20px; gap: 14px;
  }
}

/* ─── buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.05s ease, background 0.15s ease, border-color 0.15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--fg); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 86%, black); }
.btn-secondary { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--fg); }
.btn-ghost { background: transparent; color: var(--fg); border-color: transparent; padding-inline: 8px; }
.btn-ghost:hover { color: var(--accent); }
.btn-arrow::after { content: '→'; transition: transform 0.15s ease; }
.btn-arrow:hover::after { transform: translateX(2px); }

/* ─── hero ─────────────────────────────────────────────────────── */
.hero { padding-block: clamp(72px, 11vw, 140px) clamp(56px, 8vw, 110px); }
.hero-center { text-align: center; }
.hero-center .lead { margin-inline: auto; }
.hero-cta { display: flex; gap: var(--gap-sm); flex-wrap: wrap; justify-content: center; }

/* ─── pill / field / input ─────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: color-mix(in oklch, var(--accent) 60%, black);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
}
.input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

/* ─── card ──────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: color-mix(in oklch, var(--fg) 22%, var(--border)); }
.card-flat { background: transparent; border: 0; padding: 0; }
.card-rule { background: transparent; border: 0; border-top: 1px solid var(--fg); padding: 24px 0 0; border-radius: 0; }

/* ─── feature / stat ────────────────────────────────────────────── */
.feature h3 { margin-bottom: 6px; }
.stat .stat-num {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-weight: 600;
}
.stat .stat-label { color: var(--muted); font-size: 14px; margin-top: 10px; max-width: 26ch; }
.stat .stat-unit { font-size: 0.5em; opacity: 0.75; margin-left: 2px; }

/* ─── logo tiles ────────────────────────────────────────────────── */
.logo-tile {
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  min-height: 150px;
}
.logo-tile img { width: 72px; height: 72px; }
.logo-tile-wide img { width: 160px; height: auto; }

/* ─── swatches ──────────────────────────────────────────────────── */
.swatch {
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer;
  min-height: 128px;
  justify-content: flex-end;
  transition: transform .12s ease, box-shadow .12s ease;
}
.swatch:hover, .swatch:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 24px color-mix(in oklch, var(--fg) 10%, transparent); }
.swatch-hero { background: var(--accent); min-height: 220px; justify-content: flex-end; }
.swatch-name { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--fg); }
.swatch-hero .swatch-hex { font-size: 22px; font-weight: 600; }
.swatch-hex { font-size: 15px; font-weight: 600; }
.swatch-hero .swatch-tag, .swatch-hero .swatch-hex { color: #211204; }
.swatch-tag { font-size: 12px; color: var(--muted); }
.swatch.sm { min-height: 96px; padding: 16px; }
.swatch-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 920px) { .swatch-row { grid-template-columns: repeat(2, 1fr); } }

/* ─── quote ─────────────────────────────────────────────────────── */
.quote-box { position: relative; }
.quote-mark {
  font-family: var(--font-display);
  font-size: 120px; line-height: 0.7;
  color: var(--accent); opacity: 0.22;
  margin-bottom: -20px;
}
.quote { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); line-height: 1.4; letter-spacing: -0.01em; margin: 0; min-height: 4.2em; font-weight: 500; }
.quote-cn { color: var(--muted); font-size: 15px; margin: 14px 0 0; max-width: 62ch; }
.quote-author { color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
.q-btn { padding: 8px 14px; }

/* ─── stories timeline ──────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.story-item {
  display: grid; grid-template-columns: 150px 44px 1fr; gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--border);
}
.story-year { font-family: var(--font-mono); font-size: 14px; color: var(--accent); font-weight: 600; padding-top: 4px; }
.story-dot {
  width: 12px; height: 12px; border-radius: 999px;
  background: var(--accent); margin: 7px auto 0;
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.story-body h3 { font-size: 19px; margin-bottom: 8px; }
.story-body p { margin: 0 0 10px; color: var(--muted); font-size: 15px; max-width: 68ch; }
.story-en { font-style: italic; }
.story-src { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.story-src a { border-bottom: 1px solid var(--border); }
.story-src a:hover { border-color: var(--accent); }
@media (max-width: 700px) {
  .story-item { grid-template-columns: 24px 1fr; }
  .story-year { grid-column: 2; padding-top: 0; }
  .story-dot { grid-row: 1; grid-column: 1; margin-top: 6px; }
  .story-body { grid-column: 2; }
}

/* ─── terms grid ────────────────────────────────────────────────── */
.term-card h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.term-en { font-family: var(--font-mono); font-size: 12px; color: var(--muted); font-weight: 400; }
.term-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.term-card mark { background: var(--accent-soft); color: inherit; border-radius: 3px; padding: 0 2px; }
.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}

/* ─── toast ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(8px);
  background: var(--fg); color: var(--bg);
  padding: 10px 18px; border-radius: 999px;
  font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ─── reveal animation ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
