/* NSTChain homepage — dark theme, teal/blue brand. Zero deps. */

:root {
  --bg: #070b16;
  --bg-alt: #0b1122;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8edf7;
  --text-dim: #97a3b8;
  --text-faint: #6b7690;
  --teal: #2fd4c7;
  --blue: #3b82f6;
  --grad: linear-gradient(100deg, var(--teal), var(--blue));
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

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

img { display: block; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.92em; color: var(--teal); }

.container { width: min(1140px, 92%); margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--grad);
  color: #04121c;
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(47, 212, 199, 0.35); }
.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: var(--panel);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-ghost { color: var(--text-dim); background: transparent; }
.btn-ghost:hover { color: var(--teal); }
.btn-lg { padding: 14px 30px; font-size: 1.02rem; }
.btn-sm { padding: 8px 18px; font-size: 0.88rem; }
.btn-icon { width: 18px; height: 18px; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 22, 0.78);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 30px; height: 30px; }
.brand-name { font-size: 1.22rem; font-weight: 800; letter-spacing: 0.2px; }
.brand-accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links { display: flex; gap: 26px; font-size: 0.95rem; }
.nav-links a { color: var(--text-dim); transition: color 0.15s; }
.nav-links a:hover { color: var(--teal); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-lang { min-width: 52px; }
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 320px at 18% 0%, rgba(47, 212, 199, 0.16), transparent 70%),
    radial-gradient(640px 400px at 85% 15%, rgba(59, 130, 246, 0.18), transparent 70%),
    radial-gradient(500px 500px at 50% 110%, rgba(59, 130, 246, 0.08), transparent 70%);
}
.hero-inner { position: relative; text-align: center; }
.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid rgba(47, 212, 199, 0.4);
  background: rgba(47, 212, 199, 0.08);
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  margin-bottom: 26px;
}
.hero-title { font-size: clamp(2.4rem, 6vw, 4.2rem); font-weight: 800; line-height: 1.15; letter-spacing: 0.5px; }
.hero-title-main {
  background: linear-gradient(100deg, #eafffd 10%, var(--teal) 45%, var(--blue) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title-sep { color: var(--text-faint); margin: 0 10px; font-weight: 400; }
.hero-title-sub { font-size: 0.55em; font-weight: 700; color: var(--text); }
.hero-lead {
  max-width: 720px;
  margin: 22px auto 0;
  font-size: 1.12rem;
  color: var(--text-dim);
}
.hero-vision {
  max-width: 640px;
  margin: 12px auto 0;
  font-size: 0.95rem;
  color: var(--text-faint);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
}

.stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 58px;
}
.stat {
  background: rgba(11, 17, 34, 0.85);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-label { font-size: 0.78rem; color: var(--text-faint); letter-spacing: 0.5px; text-transform: uppercase; }
.stat-value { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-live { color: var(--teal); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.kicker {
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 800; margin-bottom: 44px; }
.section-lead { max-width: 720px; color: var(--text-dim); margin: -24px 0 40px; }
.sub-title { font-size: 1.25rem; font-weight: 700; margin: 52px 0 24px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 18px; }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 212, 199, 0.45);
  background: var(--panel-strong);
}
.card h3 { font-size: 1.02rem; font-weight: 700; margin-bottom: 10px; }
.card p { font-size: 0.88rem; color: var(--text-dim); }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(47, 212, 199, 0.14), rgba(59, 130, 246, 0.14));
  border: 1px solid rgba(47, 212, 199, 0.25);
  margin-bottom: 16px;
}
.card-icon svg { width: 22px; height: 22px; color: var(--teal); }
.card-flat .card-num { font-size: 0.8rem; color: var(--blue); font-weight: 800; letter-spacing: 1px; margin-bottom: 8px; }

/* Ecosystem cards */
.card-eco { display: flex; flex-direction: column; gap: 12px; padding: 24px 20px; }
.eco-mark { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.3px; }
.eco-defi { color: var(--teal); }
.eco-gamefi { color: #a78bfa; }
.eco-social { color: #f59e0b; }
.eco-aifi { color: var(--blue); }
.eco-meta {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Architecture stack ---------- */
.arch-stack { display: flex; flex-direction: column; gap: 12px; max-width: 880px; margin: 0 auto; }
.arch-layer {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  margin-left: calc(var(--i) * 34px);
  margin-right: calc(var(--i) * -34px);
  transition: border-color 0.2s;
}
.arch-layer:hover { border-color: rgba(59, 130, 246, 0.5); }
.arch-name {
  min-width: 132px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.arch-desc { font-size: 0.88rem; color: var(--text-dim); }

/* ---------- Tokenomics ---------- */
.supply-banner {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 30px 34px;
  border-radius: var(--radius);
  border: 1px solid rgba(47, 212, 199, 0.3);
  background:
    radial-gradient(420px 160px at 12% 50%, rgba(47, 212, 199, 0.12), transparent 70%),
    radial-gradient(420px 160px at 88% 50%, rgba(59, 130, 246, 0.12), transparent 70%),
    var(--panel);
}
.supply-token { width: 74px; height: 74px; flex-shrink: 0; }
.supply-token svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 18px rgba(47, 212, 199, 0.35)); }
.supply-label { display: block; font-size: 0.82rem; color: var(--text-faint); letter-spacing: 1px; text-transform: uppercase; }
.supply-value { font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 800; }

.dao-flow { display: flex; align-items: stretch; gap: 14px; }
.dao-step {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.dao-step h4 { font-size: 1rem; margin-bottom: 8px; }
.dao-step p { font-size: 0.87rem; color: var(--text-dim); }
.dao-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--grad);
  color: #04121c;
  font-weight: 800;
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.dao-arrow {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--text-faint);
}

/* ---------- Roadmap ---------- */
.roadmap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.road-head {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 2px solid;
}
.road-near { color: var(--teal); border-image: linear-gradient(90deg, var(--teal), transparent) 1; }
.road-far { color: var(--blue); border-image: linear-gradient(90deg, var(--blue), transparent) 1; }
.road-list { list-style: none; position: relative; }
.road-list::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, rgba(47, 212, 199, 0.5), rgba(59, 130, 246, 0.15));
}
.road-list li { position: relative; padding: 0 0 26px 34px; }
.road-list li:last-child { padding-bottom: 0; }
.road-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--teal);
}
.road-list h4 { font-size: 0.98rem; font-weight: 700; margin-bottom: 4px; }
.road-list p { font-size: 0.87rem; color: var(--text-dim); }

/* ---------- Developers ---------- */
.dev-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 30px 26px;
  max-width: 860px;
  margin: 0 auto;
}
.dev-table { width: 100%; border-collapse: collapse; }
.dev-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-faint);
  padding: 13px 0;
  width: 168px;
  font-size: 0.9rem;
}
.dev-table td { padding: 13px 0; font-size: 0.94rem; }
.dev-table tr + tr th, .dev-table tr + tr td { border-top: 1px solid var(--border); }
.dev-table a { color: var(--teal); }
.dim { color: var(--text-faint); font-size: 0.85em; }
.dev-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.dev-note { margin-top: 18px; font-size: 0.82rem; color: var(--text-faint); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 52px 0 34px; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}
.footer-desc { margin-top: 14px; font-size: 0.88rem; color: var(--text-dim); max-width: 340px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 0.9rem; }
.footer-links h4 { font-size: 0.8rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.footer-links a { color: var(--text-dim); transition: color 0.15s; }
.footer-links a:hover { color: var(--teal); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.footer-disclaimer { font-size: 0.78rem; color: var(--text-faint); max-width: 560px; }
.footer-copy { font-size: 0.8rem; color: var(--text-faint); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  background: #101a30;
  border: 1px solid rgba(47, 212, 199, 0.4);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 200;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(7, 11, 22, 0.97);
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links a { padding: 14px 6%; border-top: 1px solid var(--border); }
  .nav-open .nav-links { display: flex; }
  .nav-burger { display: flex; }
  #nav-add-wallet { display: none; }
  .nav-open #nav-add-wallet { display: inline-flex; }

  .stats-bar { grid-template-columns: repeat(3, 1fr); }
  .arch-layer { margin-right: 0; flex-direction: column; align-items: flex-start; gap: 6px; }
  .roadmap-grid { grid-template-columns: 1fr; gap: 26px; }
  .dao-flow { flex-direction: column; }
  .dao-arrow { transform: rotate(90deg); justify-content: center; }
  .supply-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 620px) {
  .grid-5, .grid-4 { grid-template-columns: 1fr 1fr; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 64px 0; }
  .hero { padding: 64px 0 56px; }
  .hero-cta .btn { width: 100%; }
  .dev-panel { padding: 6px 18px 22px; }
  .dev-table th { width: 118px; }
}

@media (max-width: 400px) {
  .grid-5, .grid-4 { grid-template-columns: 1fr; }
}
