:root {
  --bg: #05080a;
  --bg-soft: #0a0f12;
  --panel: #0c1216;
  --line: rgba(148, 163, 164, 0.12);
  --text: #e6ecea;
  --muted: #8a9694;
  --jade: #34d399;
  --jade-soft: rgba(52, 211, 153, 0.12);
  --red: #f87171;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, 'Helvetica Neue', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--jade); color: #04110b; }

/* ---------- nav ---------- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 5vw;
  background: linear-gradient(rgba(5,8,10,0.9), rgba(5,8,10,0));
  backdrop-filter: blur(6px);
}
.logo {
  font-family: var(--mono); font-weight: 700; font-size: 18px;
  letter-spacing: 0.04em; color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.logo .mark {
  width: 26px; height: 26px; border: 1.5px solid var(--jade);
  border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; color: var(--jade);
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  letter-spacing: 0.02em; transition: color .2s;
}
.nav-links a:hover { color: var(--jade); }
.nav-links a.active { color: var(--jade); }
@media (max-width: 640px) { .nav-links { display: none; } }

/* ---------- hero (home) ---------- */
header {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px 5vw 80px;
}
#chart-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0.55; pointer-events: none;
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 70% 20%, rgba(52,211,153,0.07), transparent 70%),
    radial-gradient(40% 40% at 15% 85%, rgba(52,211,153,0.05), transparent 70%);
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--jade);
  border: 1px solid rgba(52,211,153,0.35); border-radius: 999px;
  padding: 6px 14px; margin-bottom: 28px;
  background: var(--jade-soft);
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--jade);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
h1 {
  font-size: clamp(44px, 7.5vw, 88px);
  font-weight: 700; line-height: 1.04; letter-spacing: -0.03em;
  margin-bottom: 24px;
}
h1 .accent {
  color: var(--jade);
  font-family: var(--mono); font-weight: 500;
}
.hero-sub {
  font-size: clamp(17px, 2vw, 20px); color: var(--muted);
  max-width: 560px; margin-bottom: 40px; font-weight: 300;
}
.hero-sub strong { color: var(--text); font-weight: 500; }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  font-family: var(--mono); font-size: 14px; letter-spacing: 0.04em;
  padding: 14px 28px; border-radius: 6px; text-decoration: none;
  transition: all .2s; display: inline-block;
}
.btn-primary {
  background: var(--jade); color: #04110b; font-weight: 700;
}
.btn-primary:hover { background: #6ee7b7; transform: translateY(-2px); }
.btn-ghost {
  border: 1px solid var(--line); color: var(--text);
}
.btn-ghost:hover { border-color: var(--jade); color: var(--jade); }

/* ---------- ticker ---------- */
.ticker-wrap {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg-soft); overflow: hidden; padding: 14px 0;
  position: relative; z-index: 2;
}
.ticker {
  display: flex; gap: 48px; width: max-content;
  animation: scroll 40s linear infinite;
  font-family: var(--mono); font-size: 13px;
}
@keyframes scroll { to { transform: translateX(-50%); } }
.tick { display: flex; gap: 10px; align-items: center; color: var(--muted); white-space: nowrap; }
.tick .sym { color: var(--text); font-weight: 500; }
.up { color: var(--jade); }
.down { color: var(--red); }

/* ---------- sections ---------- */
section { padding: 110px 5vw; max-width: 1200px; margin: 0 auto; }
.section-label {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--jade); margin-bottom: 16px;
}
h2 {
  font-size: clamp(28px, 4vw, 42px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 20px;
}
.section-desc { color: var(--muted); max-width: 560px; margin-bottom: 56px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 32px 28px;
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(52,211,153,0.4); transform: translateY(-4px); }
.card .num {
  font-family: var(--mono); font-size: 12px; color: var(--jade);
  margin-bottom: 20px; display: block;
}
.card h3 { font-size: 19px; font-weight: 600; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 14.5px; }

/* ---------- tech / terminal ---------- */
.tech-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center;
}
@media (max-width: 860px) { .tech-grid { grid-template-columns: 1fr; } }
.tech-list { list-style: none; margin-top: 28px; }
.tech-list li {
  padding: 16px 0; border-bottom: 1px solid var(--line);
  display: flex; gap: 14px; align-items: baseline; color: var(--muted); font-size: 15px;
}
.tech-list li::before {
  content: '→'; color: var(--jade); font-family: var(--mono); flex-shrink: 0;
}
.tech-list strong { color: var(--text); font-weight: 500; }
.terminal {
  background: #070b0d; border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.terminal-bar {
  display: flex; gap: 8px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); align-items: center;
}
.terminal-bar span { width: 11px; height: 11px; border-radius: 50%; }
.terminal-bar span:nth-child(1) { background: #ff5f57; }
.terminal-bar span:nth-child(2) { background: #febc2e; }
.terminal-bar span:nth-child(3) { background: #28c840; }
.terminal-bar .title {
  margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.terminal pre {
  padding: 24px; font-family: var(--mono); font-size: 13px;
  line-height: 1.75; overflow-x: auto; color: #a8b5b2;
}
.tok-k { color: var(--jade); }
.tok-s { color: #fbbf24; }
.tok-c { color: #5c6b68; }
.tok-f { color: #7dd3fc; }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.stat {
  padding: 40px 28px; border-right: 1px solid var(--line);
  background: var(--panel);
}
.stat:last-child { border-right: none; }
@media (max-width: 760px) { .stat { border-right: none; border-bottom: 1px solid var(--line); } }
.stat .val {
  font-family: var(--mono); font-size: 34px; font-weight: 700;
  color: var(--jade); letter-spacing: -0.02em;
}
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 6px; }

/* ---------- contact (home) ---------- */
.contact { text-align: center; padding-bottom: 140px; }
.contact h2 { margin-bottom: 16px; }
.contact p { color: var(--muted); margin-bottom: 36px; }
.contact .email {
  font-family: var(--mono); font-size: clamp(18px, 3vw, 26px);
  color: var(--jade); text-decoration: none;
  border-bottom: 1px solid rgba(52,211,153,0.4); padding-bottom: 4px;
  transition: border-color .2s;
}
.contact .email:hover { border-color: var(--jade); }

footer {
  border-top: 1px solid var(--line); padding: 32px 5vw;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- subpage hero ---------- */
.subhero { position: relative; padding: 180px 5vw 40px; max-width: 1200px; margin: 0 auto; }
.subhero h1 { font-size: clamp(38px, 5.5vw, 64px); }
.subhero .section-desc { margin-bottom: 0; }
.subhero > *:not(.hero-glow) { position: relative; z-index: 2; }
.subhero + section { padding-top: 48px; }

/* ---------- pillars (approach page) ---------- */
.pillar {
  display: grid; grid-template-columns: 90px 1fr; gap: 32px;
  padding: 56px 0; border-top: 1px solid var(--line);
}
.pillar:last-child { border-bottom: 1px solid var(--line); }
.pillar .p-num {
  font-family: var(--mono); color: var(--jade); font-size: 15px; padding-top: 5px;
}
.pillar h3 { font-size: 24px; font-weight: 600; margin-bottom: 14px; letter-spacing: -0.01em; }
.pillar p { color: var(--muted); max-width: 640px; margin-bottom: 18px; }
.pillar ul { list-style: none; }
.pillar li {
  padding: 7px 0; color: var(--muted); font-size: 14.5px;
  display: flex; gap: 12px; align-items: baseline;
}
.pillar li::before { content: '→'; color: var(--jade); font-family: var(--mono); flex-shrink: 0; }
@media (max-width: 640px) { .pillar { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- process timeline ---------- */
.process {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.pstep { padding: 28px 22px; border-right: 1px solid var(--line); background: var(--panel); }
.pstep:last-child { border-right: none; }
.pstep .s-num {
  font-family: var(--mono); font-size: 12px; color: var(--jade);
  display: block; margin-bottom: 14px;
}
.pstep h4 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
.pstep p { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
@media (max-width: 900px) {
  .process { grid-template-columns: 1fr; }
  .pstep { border-right: none; border-bottom: 1px solid var(--line); }
  .pstep:last-child { border-bottom: none; }
}

/* ---------- cta band ---------- */
.cta-band { text-align: center; padding: 110px 5vw 130px; }
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { color: var(--muted); margin-bottom: 36px; }

/* ---------- contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.inq { border-top: 1px solid var(--line); }
.inq a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--text); transition: padding-left .2s, color .2s;
}
.inq a:hover { padding-left: 8px; color: var(--jade); }
.inq a small { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.inq a .arrow { font-family: var(--mono); color: var(--jade); flex-shrink: 0; }
form .field { margin-bottom: 20px; }
form label {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
form input, form textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 13px 16px; color: var(--text);
  font-family: 'Inter', sans-serif; font-size: 15px;
  outline: none; transition: border-color .2s;
}
form input:focus, form textarea:focus { border-color: var(--jade); }
form textarea { min-height: 150px; resize: vertical; }
form button { cursor: pointer; border: none; width: 100%; }
.form-note { font-size: 13px; color: var(--muted); margin-top: 16px; text-align: center; }
.form-note a { color: var(--jade); text-decoration: none; }

/* ---------- language switch ---------- */
.nav-right { display: flex; align-items: center; gap: 32px; }
.lang-switch {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; text-decoration: none; transition: all .2s; white-space: nowrap;
}
.lang-switch:hover { color: var(--jade); border-color: var(--jade); }

/* ---------- Chinese pages ---------- */
html[lang="zh-CN"] body {
  font-family: 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
html[lang="zh-CN"] h1 { letter-spacing: 0; line-height: 1.14; }
