/* ============================================================
   Babylon.js 中文站 — 设计系统
   深空黑 + 巴比伦暖橙 · 编辑排版 · 电影质感
   ============================================================ */

:root {
  --bg: #05060a;
  --bg-2: #090b12;
  --surface: #0c0f17;
  --surface-2: #10141f;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef1f7;
  --text-2: #99a1b3;
  --text-3: #5c6577;
  --accent: #ff6a2b;
  --accent-2: #ffb03a;
  --accent-soft: rgba(255, 106, 43, 0.12);
  --cyan: #59d4ff;
  --green: #4ade80;
  --red: #f87171;
  --font-display: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 16px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(255, 106, 43, 0.32); color: #fff; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1c2230; border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3347; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
canvas { display: block; }
[hidden] { display: none !important; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.mono { font-family: var(--font-mono); }

/* ---------- 颗粒质感层 ---------- */
.grain {
  position: fixed;
  inset: -60%;
  width: 220%;
  height: 220%;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 9s steps(8) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2.5%, 2%); }
  50% { transform: translate(2%, -2.5%); }
  75% { transform: translate(-2%, -2%); }
}

/* ---------- 滚动显现 ---------- */
.rv { opacity: 0; transform: translateY(28px); }
.rv.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              background 0.3s, border-color 0.3s, color 0.3s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff8a3d);
  color: #1c0d03;
  box-shadow: 0 8px 28px -8px rgba(255, 106, 43, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -8px rgba(255, 106, 43, 0.55);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: rgba(255, 106, 43, 0.55);
  color: var(--accent-2);
  transform: translateY(-2px);
}

.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 9px; }

/* ============================================================
   导航
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
.nav.scrolled {
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1c0d03;
  font-weight: 700; font-size: 17px;
  border-radius: 9px;
  box-shadow: 0 4px 16px -4px rgba(255, 106, 43, 0.5);
}
.brand-name { font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; }
.brand-name em { font-style: normal; color: var(--accent-2); }
.brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 7px;
  letter-spacing: 0.08em;
}

.nav-menu { display: flex; gap: 6px; }
.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-2);
  border-radius: 8px;
  transition: color 0.25s;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--accent-2); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 1px;
  background: var(--accent);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 10%, transparent 40%, rgba(5, 6, 10, 0.55) 100%),
    linear-gradient(180deg, rgba(5, 6, 10, 0.35) 0%, transparent 22%, transparent 62%, var(--bg) 100%);
}
.hero-ghost {
  position: absolute;
  right: -2vw;
  bottom: 4vh;
  font-size: clamp(6rem, 17vw, 15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.055);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 90px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--text-2);
  border: 1px solid var(--line);
  background: rgba(12, 15, 23, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 34px;
}
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgba(255, 106, 43, 0.7);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero-title {
  font-size: clamp(2.9rem, 8vw, 6.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}
.grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 60%, #ffd08a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 620px;
  margin: 0 auto 42px;
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  color: var(--text-2);
  line-height: 1.85;
}

.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 76px;
  padding-bottom: 30px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-3);
}
.hero-meta i {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-3);
  opacity: 0.6;
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: 1px; height: 52px;
  background: var(--line-strong);
  overflow: hidden;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: var(--accent);
  animation: cue 2s var(--ease) infinite;
}
@keyframes cue { to { top: 110%; } }

/* ============================================================
   跑马灯
   ============================================================ */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 17px 0;
  background: rgba(9, 11, 18, 0.5);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: marquee 36s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--text-3);
  white-space: nowrap;
}
.marquee-track b { color: var(--accent); font-size: 10px; opacity: 0.8; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   章节通用
   ============================================================ */
.section { padding: 130px 0 40px; scroll-margin-top: 60px; }

.sec-head { margin-bottom: 52px; }
.sec-lead { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.sec-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.sec-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--text-3);
}
.sec-title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 18px;
}
.dot-accent { color: var(--accent); }
.sec-desc {
  max-width: 640px;
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.8;
}

/* ============================================================
   展厅 STAGE
   ============================================================ */
.stage-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.stage-tab {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s, transform 0.3s var(--ease);
}
.stage-tab:hover { transform: translateY(-2px); color: var(--text); }
.stage-tab em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 11px;
  color: var(--text-3);
}
.stage-tab span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.stage-tab.active {
  color: var(--text);
  border-color: rgba(255, 106, 43, 0.5);
  background: linear-gradient(180deg, rgba(255, 106, 43, 0.12), rgba(255, 106, 43, 0.03));
}
.stage-tab.active em { color: var(--accent); }

.stage {
  position: relative;
  aspect-ratio: 16 / 8.4;
  min-height: 420px;
  background: #07090f;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
  transition: opacity 0.25s;
}
.stage.switching { opacity: 0.25; }
#stageCanvas { width: 100%; height: 100%; outline: none; }

.stage-chip {
  position: absolute;
  top: 16px;
  z-index: 6;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--text-2);
  background: rgba(5, 6, 10, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 11px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.stage-chip.tl { left: 16px; }
.stage-chip.tr { right: 16px; color: var(--accent-2); }

.stage-loading {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  background: rgba(7, 9, 15, 0.86);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.stage-loading.show { opacity: 1; pointer-events: all; }
.stage-loading p {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--text-3);
}
.spin {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* HUD 控制条 */
.hud {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  justify-content: center;
  max-width: calc(100% - 32px);
  background: rgba(8, 10, 16, 0.66);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.hud-set { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }

.hud-btn {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.hud-btn:hover { color: var(--text); border-color: var(--line-strong); }
.hud-btn.is-on {
  color: var(--accent-2);
  border-color: rgba(255, 106, 43, 0.45);
  background: var(--accent-soft);
}

.hud-slider {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
  padding: 0 6px;
}
.hud-slider input[type="range"] {
  width: 110px;
  accent-color: var(--accent);
  cursor: pointer;
}
.hud-slider span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-2);
  min-width: 38px;
}

.hud-seg { display: flex; gap: 5px; }
.hud-mini {
  font-size: 12px;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.hud-mini:hover { color: var(--text); }
.hud-mini.is-on {
  color: var(--accent-2);
  border-color: rgba(255, 106, 43, 0.45);
  background: var(--accent-soft);
}

/* 场景信息 */
.stage-info { margin-top: 26px; }
.si-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: start;
}
.si-text h3 { font-size: 19px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.si-text p { color: var(--text-2); font-size: 14.5px; line-height: 1.8; max-width: 680px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 380px; }
.chips span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

/* ============================================================
   沙箱
   ============================================================ */
.sandbox {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.8);
}
.sandbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.sandbox-left { display: flex; align-items: center; gap: 14px; }
.dot-row { display: inline-flex; gap: 6px; }
.dot-row i { width: 10px; height: 10px; border-radius: 50%; background: #232a3a; }
.dot-row i:first-child { background: rgba(248, 113, 113, 0.5); }
.dot-row i:nth-child(2) { background: rgba(255, 176, 58, 0.5); }
.dot-row i:last-child { background: rgba(74, 222, 128, 0.5); }
.sandbox-file { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); }
.sandbox-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.select {
  appearance: none;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-family: var(--font-display);
  font-size: 12.5px;
  padding: 9px 32px 9px 13px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2399a1b3' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select:hover { border-color: var(--line-strong); }

.sandbox-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 480px;
}
.sandbox-editor { border-right: 1px solid var(--line); display: flex; }
#codeEditor {
  flex: 1;
  width: 100%;
  min-height: 480px;
  background: #07090f;
  color: #c9d4e8;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  padding: 22px 24px;
  tab-size: 2;
}
#codeEditor::selection { background: rgba(255, 106, 43, 0.25); }

.sandbox-preview { display: flex; flex-direction: column; min-width: 0; }
#sandboxCanvas { flex: 1; width: 100%; min-height: 340px; outline: none; }

.console {
  height: 118px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  background: #07090f;
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.9;
}
.c-line { white-space: pre-wrap; word-break: break-all; }
.c-info { color: var(--text-3); }
.c-ok { color: var(--green); }
.c-err { color: var(--red); }

/* ============================================================
   特性
   ============================================================ */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.feat-card {
  background: var(--surface);
  padding: 36px 32px;
  transition: background 0.35s;
}
.feat-card:hover { background: var(--surface-2); }
.feat-icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--accent-2);
  margin-bottom: 22px;
  transition: border-color 0.35s, box-shadow 0.35s;
}
.feat-icon svg { width: 21px; height: 21px; }
.feat-card:hover .feat-icon {
  border-color: rgba(255, 106, 43, 0.5);
  box-shadow: 0 0 24px -6px rgba(255, 106, 43, 0.35);
}
.feat-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.feat-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.8; }

/* ============================================================
   接入
   ============================================================ */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  border: 1px solid rgba(255, 176, 58, 0.25);
  background: rgba(255, 176, 58, 0.06);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 22px;
}
.notice-icon {
  flex: none;
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 176, 58, 0.5);
  color: var(--accent-2);
  font-weight: 700;
  font-size: 13px;
}
.notice p { font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.notice strong { color: var(--accent-2); font-weight: 600; }

.code-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #07090f;
  overflow: hidden;
  margin-bottom: 22px;
}
.code-head {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  padding: 8px 10px;
}
.code-tabs { display: flex; gap: 4px; }
.code-tab {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.25s, background 0.25s;
}
.code-tab:hover { color: var(--text); }
.code-tab.active { color: var(--accent-2); background: var(--accent-soft); }

.code-pane { position: relative; }
.code-pane pre {
  padding: 24px 26px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12.8px;
  line-height: 1.85;
  color: #b8c4dc;
}
.copy-btn {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-2);
  background: rgba(12, 15, 23, 0.85);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.copy-btn:hover { color: var(--text); border-color: var(--line-strong); }
.copy-btn.copied { color: var(--green); border-color: rgba(74, 222, 128, 0.4); }

.pkg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.pkg {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 18px 20px;
  transition: border-color 0.3s;
}
.pkg:hover { border-color: var(--line-strong); }
.pkg-name { font-weight: 600; font-size: 14px; }
.pkg-desc { font-size: 12px; color: var(--text-3); }
.pkg code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cyan);
  margin-top: 6px;
  word-break: break-all;
}

/* ============================================================
   生态
   ============================================================ */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.eco-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px 26px;
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}
.eco-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 106, 43, 0.4);
  background: var(--surface-2);
}
.eco-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.eco-top h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.eco-arrow {
  color: var(--text-3);
  font-size: 17px;
  transition: color 0.3s, transform 0.3s var(--ease);
}
.eco-card:hover .eco-arrow { color: var(--accent-2); transform: translate(2px, -2px); }
.eco-card p { font-size: 13.5px; color: var(--text-2); line-height: 1.75; }

/* ============================================================
   页脚
   ============================================================ */
.footer {
  position: relative;
  margin-top: 130px;
  border-top: 1px solid var(--line);
  padding: 80px 0 34px;
  overflow: hidden;
}
.footer-ghost {
  position: absolute;
  left: 50%;
  top: -24px;
  transform: translateX(-50%);
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.05);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}
.footer-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer-brand p {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.85;
  max-width: 340px;
}
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: 6px;
}
.footer-col a { font-size: 13.5px; color: var(--text-2); transition: color 0.25s; width: fit-content; }
.footer-col a:hover { color: var(--accent-2); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
  font-size: 12px;
  color: var(--text-3);
}
.footer-bottom .mono { font-size: 10.5px; letter-spacing: 0.14em; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .eco-grid { grid-template-columns: repeat(2, 1fr); }
  .si-item { grid-template-columns: 1fr; }
  .chips { justify-content: flex-start; max-width: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .nav-menu { display: none; }
  .section { padding: 90px 0 30px; }

  .hero-content { padding-top: 110px; }
  .hero-meta { margin-top: 52px; gap: 12px; }
  .hero-ghost { font-size: 22vw; bottom: 10vh; }

  .stage { aspect-ratio: auto; height: 74vw; min-height: 380px; }
  .stage-chip.tl { display: none; }
  .hud { bottom: 12px; padding: 6px 8px; border-radius: 12px; }
  .hud-slider input[type="range"] { width: 84px; }

  .sandbox-body { grid-template-columns: 1fr; }
  .sandbox-editor { border-right: none; border-bottom: 1px solid var(--line); }
  #codeEditor { min-height: 320px; }

  .feat-grid, .eco-grid, .pkg-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer { margin-top: 90px; }
}

/* ---------- 减少动态 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .marquee-track, .scroll-cue span, .pulse { animation: none; }
  .rv { opacity: 1; transform: none; }
}
