:root {
  --bg: #0b0b0d;
  --bg2: #111114;
  --panel: #16171a;
  --line: rgba(255, 255, 255, 0.08);
  --ink: #f3efe7;
  --dim: #a7a39b;
  --faint: #6f6c66;
  --amber: #f2a93b;
  --teal: #4fc3a1;
  --blue: #5b8def;
  --coral: #ef6461;
  --violet: #a98bf5;
  --radius: 20px;
  --font: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Cascadia Mono", monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--amber); color: #111; }

/* 颗粒、进度条、光标光晕 */
.grain {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } 100% { transform: translate(0, 0); } }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, var(--coral), var(--amber), var(--teal), var(--blue)); }
.glow-cursor {
  position: fixed; left: 0; top: 0; width: 520px; height: 520px; margin: -260px 0 0 -260px; border-radius: 50%;
  pointer-events: none; z-index: 1; opacity: 0; transition: opacity 0.4s;
  background: radial-gradient(circle, rgba(242, 169, 59, 0.12), rgba(242, 169, 59, 0) 60%);
  transform: translate(var(--x, -999px), var(--y, -999px));
}
body.pointer .glow-cursor { opacity: 1; }

/* 导航 */
.nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 28px; padding: 8px 8px 8px 18px; border-radius: 999px;
  background: rgba(17, 17, 20, 0.6); border: 1px solid var(--line); backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); width: min(920px, calc(100% - 32px));
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.18em; font-size: 15px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; color: var(--dim); }
.nav .btn-small { margin-left: auto; }
.nav nav + .btn-small { margin-left: 0; }
.nav nav a { transition: color 0.2s; }
.nav nav a:hover { color: var(--ink); }

/* 按钮 */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px; border-radius: 999px; font-weight: 700; font-size: 16px; color: #17120a;
  background: linear-gradient(120deg, #ffd38a, var(--amber) 45%, #ff8a4c);
  box-shadow: 0 10px 40px -10px rgba(242, 169, 59, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: box-shadow 0.3s, filter 0.3s; overflow: hidden; white-space: nowrap;
}
.btn::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transition: transform 0.7s;
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { box-shadow: 0 16px 60px -10px rgba(242, 169, 59, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-ghost { color: var(--ink); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.btn-small { height: 38px; padding: 0 18px; font-size: 14px; }
.btn.disabled { filter: grayscale(1) brightness(0.6); pointer-events: none; }
.magnetic { will-change: transform; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s; }

/* 首屏 */
.hero { position: relative; height: 100vh; min-height: 680px; overflow: hidden; display: flex; align-items: center; }
#notes { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 70% at 22% 55%, rgba(11, 11, 13, 0.85), rgba(11, 11, 13, 0) 72%),
    linear-gradient(180deg, rgba(11, 11, 13, 0) 70%, var(--bg));
}
.hero-copy { position: relative; z-index: 2; padding: 0 clamp(20px, 7vw, 120px); max-width: 1100px; }
.eyebrow { font-size: 13px; letter-spacing: 0.22em; color: var(--amber); font-weight: 700; margin-bottom: 18px; }
h1 { font-size: clamp(44px, 7.4vw, 112px); line-height: 1.04; font-weight: 900; letter-spacing: -0.02em; }
h1 em, .grad {
  font-style: normal;
  background: linear-gradient(100deg, var(--amber), #ff7a59 30%, var(--violet) 60%, var(--teal) 85%, var(--amber));
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 8s linear infinite;
}
@keyframes flow { to { background-position: 250% 0; } }
.split .ch { display: inline-block; opacity: 0; transform: translateY(0.5em) rotate(6deg); filter: blur(10px);
  animation: chIn 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: calc(var(--i) * 38ms + 150ms); }
h1 em .ch { background: inherit; -webkit-background-clip: text; background-clip: text; }
@keyframes chIn { to { opacity: 1; transform: none; filter: none; } }
.lead { margin-top: 26px; max-width: 620px; font-size: clamp(17px, 1.5vw, 21px); color: #cfcac1; }
.cta { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.listen { display: inline-flex; align-items: center; gap: 12px; height: 52px; padding: 0 22px 0 18px; border-radius: 999px; font-weight: 600;
  background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.listen:hover { box-shadow: inset 0 0 0 1px var(--amber); }
.eq { display: inline-flex; gap: 3px; align-items: flex-end; height: 18px; }
.eq i { width: 3px; height: 30%; border-radius: 2px; background: var(--amber); transition: height 0.2s; }
.listen.on .eq i { animation: eq 0.9s ease-in-out infinite; }
.listen.on .eq i:nth-child(2) { animation-delay: -0.3s; }
.listen.on .eq i:nth-child(3) { animation-delay: -0.6s; }
.listen.on .eq i:nth-child(4) { animation-delay: -0.15s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.now { position: absolute; z-index: 2; left: clamp(20px, 7vw, 120px); bottom: 42px; display: flex; gap: 12px; align-items: center;
  font-size: 13px; color: var(--dim); font-family: var(--mono); flex-wrap: wrap; }
.now .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(239, 100, 97, 0.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(239, 100, 97, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 100, 97, 0); } }
.now .sec { color: var(--ink); padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); }
.scroll-hint { position: absolute; z-index: 2; right: clamp(20px, 5vw, 80px); bottom: 36px; width: 26px; height: 42px; border-radius: 13px; border: 2px solid rgba(255, 255, 255, 0.3); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* 跑马灯 */
.prompts { padding: 56px 0; display: flex; flex-direction: column; gap: 18px; overflow: hidden; border-block: 1px solid var(--line);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.prompts .track { display: flex; gap: 18px; width: max-content; animation: marquee 48s linear infinite; }
.prompts .r2 .track { animation-direction: reverse; animation-duration: 56s; }
.prompts span { white-space: nowrap; font-size: clamp(18px, 2.2vw, 30px); font-weight: 700; color: #3a3935; padding: 6px 22px; border-radius: 999px; border: 1px solid var(--line); transition: color 0.3s, border-color 0.3s; }
.prompts span:hover { color: var(--ink); border-color: var(--amber); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 通用段落 */
section { position: relative; }
h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.12; font-weight: 900; letter-spacing: -0.015em; }
.sub { margin-top: 18px; max-width: 720px; color: var(--dim); font-size: clamp(16px, 1.3vw, 19px); }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* 演示 */
.demo { height: 320vh; }
.demo-sticky { position: sticky; top: 0; height: 100vh; display: grid; grid-template-columns: minmax(300px, 0.8fr) 1.6fr; gap: clamp(24px, 4vw, 64px);
  align-items: center; padding: 90px clamp(20px, 5vw, 80px) 40px; }
.steps ol { list-style: none; margin-top: 34px; display: flex; flex-direction: column; gap: 6px; }
.steps li { display: flex; gap: 18px; padding: 16px 18px; border-radius: 16px; opacity: 0.35; transition: opacity 0.5s, background 0.5s, transform 0.5s; }
.steps li.on { opacity: 1; background: linear-gradient(90deg, rgba(242, 169, 59, 0.12), rgba(242, 169, 59, 0)); transform: translateX(8px); }
.steps li b { font-family: var(--mono); color: var(--amber); font-size: 14px; padding-top: 4px; }
.steps h3 { font-size: 21px; }
.steps li p { color: var(--dim); font-size: 15px; }
.note { margin-top: 22px; font-size: 12px; color: var(--faint); max-width: 420px; }
.window { position: relative; border-radius: 16px; overflow: hidden; background: #141517; border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 120px -30px rgba(242, 169, 59, 0.35);
  transform: perspective(1600px) rotateY(calc(var(--ry, -8) * 1deg)) rotateX(calc(var(--rx, 4) * 1deg)); transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.chrome { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; background: #1b1c1f; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.chrome i { width: 12px; height: 12px; border-radius: 50%; background: #3a3b3f; }
.chrome i:nth-child(1) { background: #ef6461; } .chrome i:nth-child(2) { background: #f2bb3b; } .chrome i:nth-child(3) { background: #4fc36a; }
.chrome span { margin-left: 10px; font-size: 12px; color: var(--faint); }
.window video { width: 100%; aspect-ratio: 1600 / 968; object-fit: cover; }

/* 原理 */
.how { padding: 140px clamp(20px, 5vw, 80px); }
.how-head { max-width: 900px; }
.how-grid { margin-top: 60px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; }
.code { border-radius: var(--radius); background: #0f0f12; border: 1px solid var(--line); overflow: hidden; }
.code-bar { display: flex; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 13px; color: var(--amber); }
.muted { color: var(--faint); }
.code pre { white-space: normal; padding: 22px 20px 26px; overflow-x: auto; font-family: var(--mono); font-size: clamp(12px, 1vw, 14px); line-height: 1.85; color: #d6d1c8; }
.code .l { display: block; opacity: 0; transform: translateX(-14px); transition: opacity 0.4s, transform 0.4s; transition-delay: calc(var(--i) * 90ms); white-space: pre; }
.code.in .l { opacity: 1; transform: none; }
k { color: #8fb6ff; } s { color: #f2c46b; text-decoration: none; } n { color: #7fe0c0; }
.compile { border-radius: var(--radius); background: #0f0f12; border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; }
#mini { width: 100%; flex: 1; min-height: 300px; }
.compile-cap { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.compile-cap div { padding: 20px 22px; display: flex; flex-direction: column; gap: 2px; }
.compile-cap div + div { border-left: 1px solid var(--line); }
.compile-cap b { font-size: 40px; font-weight: 900; font-family: var(--mono); letter-spacing: -0.03em; }
.compile-cap span { color: var(--dim); font-size: 14px; }
.pipeline { margin-top: 24px; display: flex; align-items: stretch; gap: 0; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.pipeline div { flex: 1; padding: 24px; display: flex; flex-direction: column; gap: 6px; background: rgba(255, 255, 255, 0.015); transition: background 0.4s; }
.pipeline div:hover { background: rgba(242, 169, 59, 0.07); }
.pipeline b { font-size: 18px; }
.pipeline span { color: var(--dim); font-size: 14px; }
.pipeline i { width: 1px; background: linear-gradient(180deg, transparent, var(--amber), transparent); }

/* 特性 */
.features { padding: 60px clamp(20px, 5vw, 80px) 140px; }
.feat-head { max-width: 900px; margin-bottom: 56px; }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { position: relative; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden;
  display: flex; flex-direction: column; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.4s; }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s; z-index: 2;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 169, 59, 0.16), transparent 40%); }
.card:hover::before { opacity: 1; }
.card:hover { border-color: rgba(242, 169, 59, 0.35); }
.card.big { grid-column: span 2; grid-row: span 2; }
.card-text { padding: 26px 26px 18px; position: relative; z-index: 1; }
.card h3 { font-size: 22px; }
.card.big h3 { font-size: 30px; }
.card p { margin-top: 8px; color: var(--dim); font-size: 15px; }
.card video { margin-top: auto; width: 100%; aspect-ratio: 1600 / 968; object-fit: cover; border-top: 1px solid var(--line); }
.mini-card { justify-content: space-between; background: radial-gradient(120% 120% at 100% 100%, rgba(91, 141, 239, 0.18), transparent 60%), var(--panel); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 26px 26px; }
.chips span { font-family: var(--mono); font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); }

/* 数据 */
.numbers { padding: 120px clamp(20px, 5vw, 80px); background: radial-gradient(60% 80% at 80% 0%, rgba(169, 139, 245, 0.12), transparent 70%), var(--bg2); border-block: 1px solid var(--line); }
.num-head { max-width: 900px; margin-bottom: 56px; }
.num-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.num { padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); display: flex; flex-direction: column; gap: 10px; }
.num b { font-size: clamp(44px, 5vw, 72px); line-height: 1; font-weight: 900; font-family: var(--mono); letter-spacing: -0.04em;
  background: linear-gradient(180deg, #fff, #b8b3aa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.num > span { color: var(--dim); font-size: 14px; }
.bars { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.bars i { display: block; height: 8px; border-radius: 4px; background: #3a3935; width: 0; transition: width 1.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s; }
.bars i.hot { background: linear-gradient(90deg, var(--amber), var(--coral)); }
.num.in .bars i { width: var(--w); }

/* 下载 */
.download { padding: 140px clamp(20px, 5vw, 80px) 100px; text-align: center; overflow: hidden; }
.download::before { content: ""; position: absolute; left: 50%; top: 40%; width: 900px; height: 900px; margin-left: -450px; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(242, 169, 59, 0.22), rgba(169, 139, 245, 0.2), rgba(79, 195, 161, 0.2), rgba(242, 169, 59, 0.22)); filter: blur(120px); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dl-head { position: relative; max-width: 820px; margin: 0 auto 56px; }
.dl-head .sub { margin-inline: auto; }
.dl-grid { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; }
.dl { padding: 34px 26px; border-radius: var(--radius); background: rgba(22, 23, 26, 0.75); border: 1px solid var(--line); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; align-items: center; gap: 10px; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dl h3 { font-size: 26px; }
.dl p { color: var(--dim); font-size: 14px; margin-bottom: 12px; }
.small { font-size: 12px; color: var(--faint); }
.repo { position: relative; margin-top: 36px; }
.repo a { color: var(--dim); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.repo a:hover { color: var(--amber); border-color: var(--amber); }

.foot { padding: 48px clamp(20px, 5vw, 80px); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; color: var(--dim); font-size: 13px; }

/* 窄屏 */
@media (max-width: 980px) {
  .nav nav { display: none; }
  .demo { height: auto; }
  .demo-sticky { position: relative; height: auto; grid-template-columns: 1fr; padding-top: 100px; }
  .steps li { opacity: 1; }
  .window { transform: none; }
  .how-grid, .bento, .num-grid, .dl-grid { grid-template-columns: 1fr; }
  .card.big { grid-column: auto; grid-row: auto; }
  .pipeline { flex-direction: column; }
  .pipeline i { width: auto; height: 1px; background: linear-gradient(90deg, transparent, var(--amber), transparent); }
  .num-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .num-grid { grid-template-columns: 1fr; }
  .now { font-size: 11px; bottom: 24px; }
  .scroll-hint { display: none; }
  .btn, .listen { height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .split .ch, .code .l { opacity: 1 !important; transform: none !important; filter: none !important; }
}
