/* ===== 页面进度指示器 ===== */
.scroll-indicator {
  position: fixed;
  right: 20px;
  top: 50%;
  z-index: 40;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  pointer-events: none;
}
.scroll-indicator-track {
  position: relative;
  width: 2px;
  height: 200px;
  background: rgba(0, 0, 0, .1);
  border-radius: 1px;
  overflow: hidden;
  pointer-events: auto;
}
.scroll-indicator-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, #0071e3, #a070ff);
  border-radius: 1px;
  transition: height .15s ease-out;
}
.scroll-indicator-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}
.scroll-indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .2);
  border: 2px solid transparent;
  transition: all .3s var(--ease);
  cursor: pointer;
  display: block;
  text-decoration: none;
  position: relative;
}
.scroll-indicator-dot:hover {
  background: rgba(0, 113, 227, .6);
  border-color: rgba(0, 113, 227, .3);
}
.scroll-indicator-dot.active {
  background: #0071e3;
  border-color: #0071e3;
  width: 12px;
  height: 12px;
  box-shadow: 0 0 8px rgba(0, 113, 227, .4);
}
.scroll-indicator-dot::after {
  content: attr(data-section);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #1d1d1f;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
  background: rgba(255, 255, 255, .95);
  padding: 4px 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}
.scroll-indicator-dot:hover::after {
  opacity: 1;
}

@media (max-width: 1024px) {
  .scroll-indicator {
    right: 12px;
  }
  .scroll-indicator-track {
    height: 160px;
  }
  .scroll-indicator-dot::after {
    right: 20px;
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  .scroll-indicator {
    display: none;
  }
}
:root {
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --dark: #000;
  --radius: 28px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro SC", "PingFang SC",
          "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.47;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
code { font-family: var(--mono); }
.svg-defs { position: absolute; width: 0; height: 0; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 10px; background: var(--ink); color: #fff;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* ===== 液态玻璃 ===== */
.glass {
  position: relative;
  isolation: isolate;
  background: rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),     /* 顶部高光 */
    inset 0 -1px 0 rgba(255, 255, 255, .15),
    inset 0 0 18px rgba(255, 255, 255, .18),    /* 内部辉光 */
    0 10px 30px rgba(0, 0, 0, .08);
}
/* 斜向镜面反光 */
.glass::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background:
    radial-gradient(120% 80% at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, .55), transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, .25), transparent 40%, transparent 70%, rgba(255, 255, 255, .12));
  pointer-events: none;
  transition: background .3s;
}
/* 边缘折射描边 */
.glass::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .1) 35%,
                              rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-strong {
  background: rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  backdrop-filter: blur(30px) saturate(200%);
}
/* Chromium：叠加 SVG 位移滤镜，模拟光线折射 */
.liquid-ok .nav.glass,
.liquid-ok .cta-panel.glass {
  backdrop-filter: url(#liquid) blur(14px) saturate(190%);
}

/* ===== 导航 ===== */
.nav-wrap {
  position: fixed; inset: 12px 0 auto; z-index: 50;
  display: flex; justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 28px;
  width: min(980px, 100%);
  height: 52px;
  padding: 0 10px 0 20px;
  border-radius: 999px;
  font-size: 13px;
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.scrolled { background: rgba(255, 255, 255, .5); }
.nav-logo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 16px; }
.logo-img {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 2px 6px rgba(122, 8, 8, .15);
}
.nav-links { display: flex; gap: 26px; margin: 0 auto; padding: 0; list-style: none; }
.nav-links a { color: rgba(29, 29, 31, .8); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  padding: 7px 15px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 500;
  transition: background .2s;
}
.nav-cta:hover { background: var(--accent-hover); }
.nav-toggle { display: none; }

/* ===== 按钮 ===== */
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px; margin-top: 30px; }
.hero .hero-actions { margin-top: clamp(22px, 3.2vh, 32px); }
.btn { font-size: 17px; transition: background .2s, transform .2s var(--ease); }
.btn-primary {
  padding: 12px 24px; border-radius: 999px;
  background: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-link { color: var(--accent); }
.btn-link:hover { text-decoration: underline; }
/* ===== 流动极光背景 ===== */
.aurora { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: .75;
  will-change: transform;
  animation: drift 22s var(--ease) infinite alternate;
}
.b1 { width: 46vw; height: 46vw; left: -8vw; top: 6vh;  background: #8ec5ff; }
.b2 { width: 40vw; height: 40vw; right: -6vw; top: -4vh; background: #c9b6ff; animation-duration: 26s; animation-delay: -6s; }
.b3 { width: 36vw; height: 36vw; left: 30vw; bottom: -12vh; background: #ffc6a8; animation-duration: 30s; animation-delay: -12s; }
.b4 { width: 28vw; height: 28vw; right: 18vw; bottom: 4vh; background: #9ff0d6; animation-duration: 24s; animation-delay: -3s; }
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  33%  { transform: translate3d(6vw, 4vh, 0) scale(1.12) rotate(40deg); }
  66%  { transform: translate3d(-4vw, 8vh, 0) scale(.92) rotate(-30deg); }
  100% { transform: translate3d(3vw, -5vh, 0) scale(1.06) rotate(20deg); }
}

/* ===== 固定背景舞台：首页纯白，向下滚动渐变为浅灰 ===== */
.stage {
  position: fixed; inset: 0; z-index: -1;
  background: var(--stage-bg, #fff);
  pointer-events: none;
}
.aurora-light { opacity: var(--aur, 0); }

/* ===== 第一页：纯白 Hero（滚动钉住） ===== */
.hero { position: relative; height: 145vh; }
.hero-sticky, .luoshu-sticky {
  position: sticky; top: 0;
  height: 100vh; min-height: 680px;
  overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 76px 20px 76px;
  text-align: center;
}
.hero-copy, .luoshu, .hero-note, .luoshu-eyebrow { position: relative; z-index: 1; will-change: transform, opacity; }
.eyebrow { font-size: 17px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.hero .eyebrow { font-size: clamp(17px, 1.6vw, 21px); margin-bottom: 6px; }
.hero-title {
  font-size: clamp(64px, min(11vw, 15vh), 136px);
  font-weight: 700; letter-spacing: -.04em; line-height: 1.02;
  background: linear-gradient(180deg, #1d1d1f 35%, #55555c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { margin-top: 14px; font-size: clamp(21px, min(2.7vw, 3.9vh), 32px); font-weight: 500; color: var(--ink); line-height: 1.35; }
.hero .btn { font-size: clamp(17px, 1.4vw, 19px); }
.br-sm { display: none; }

/* 首页背景：香槟金 × 冷银灰的珍珠渐变，缓慢流动；第二页的彩色光斑不同 */
.hero-bg {
  position: absolute; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(42% 38% at 22% 28%, rgba(236, 222, 200, .85), transparent 70%),
    radial-gradient(38% 42% at 80% 22%, rgba(214, 222, 232, .9), transparent 70%),
    radial-gradient(46% 40% at 70% 82%, rgba(232, 226, 236, .8), transparent 70%),
    radial-gradient(40% 36% at 18% 86%, rgba(222, 230, 224, .7), transparent 70%),
    #fff;
  background-size: 140% 140%;
  animation: pearl 28s ease-in-out infinite alternate;
  -webkit-mask: linear-gradient(#000 70%, transparent);
  mask: linear-gradient(#000 70%, transparent);
}
@keyframes pearl {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 40%; }
  100% { background-position: 30% 100%; }
}

/* 项目图标徽章 */
.hero-logo {
  position: relative;
  width: clamp(76px, min(8vw, 11vh), 108px); aspect-ratio: 1;
  margin: 0 auto 16px;
  animation: logoIn 1.2s var(--ease) both;
}
.hero-logo img {
  position: relative; z-index: 1;
  display: block; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 14px 40px rgba(122, 8, 8, .18), 0 2px 6px rgba(0, 0, 0, .06);
}
/* 缓慢旋转的品牌红光环 */
.hero-logo-ring {
  position: absolute; inset: -7px; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(230, 0, 18, .0), rgba(230, 0, 18, .55), rgba(122, 8, 8, .0) 40%,
                             rgba(0, 113, 227, .35) 70%, rgba(230, 0, 18, 0));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin 9s linear infinite;
}
@keyframes spin { to { transform: rotate(1turn); } }
@keyframes logoIn { from { opacity: 0; transform: scale(.85) translateY(10px); } }

/* ===== 上线倒计时：光点粒子文字（canvas，见 sparks.js） ===== */
.countdown { margin-top: clamp(22px, 3.2vh, 34px); }
.cd-title { font-size: clamp(15px, 1.3vw, 18px); font-weight: 500; letter-spacing: .02em; color: var(--ink-2); }
.cd-title strong { font-weight: 700; color: var(--ink); }
.cd-sparks {
  display: block;
  width: min(760px, 92vw);
  height: clamp(84px, min(11vw, 14vh), 132px);
  margin: 6px auto 0;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.scroll-hint {
  position: absolute; bottom: 22px; left: 50%; z-index: 1;
  width: 24px; height: 38px; margin-left: -12px;
  border: 1.5px solid rgba(29, 29, 31, .25); border-radius: 12px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 7px;
  width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
  background: rgba(29, 29, 31, .4);
  animation: hint 1.8s var(--ease) infinite;
}
@keyframes hint { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ===== 第二页：洛书九宫（滚动钉住） ===== */
.luoshu-section { position: relative; height: 230vh; }
.luoshu-eyebrow { font-size: 17px; font-weight: 600; color: var(--ink-2); }
.luoshu {
  --size: min(300px, 70vw);
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  width: var(--size); height: var(--size);
  margin-top: 56px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
}
.cell {
  display: grid; place-items: center;
  border-radius: 22px;
  font-size: calc(var(--size) / 7); font-weight: 600;
  color: rgba(29, 29, 31, .85);
  opacity: 0;
  transform: translateY(20px) scale(.9);
  transition: color .4s, scale .4s var(--ease);
}
.luoshu.in .cell { animation: cellIn .9s var(--ease) forwards; animation-delay: calc(var(--d) * .07s); }
.cell-core { color: var(--accent); }
.cell.lit { color: var(--accent); scale: 1.05; }
/* 九宫格整体压暗：灰色玻璃底 + 减弱常驻反光，衬托悬停时的高光 */
.luoshu .cell {
  background: rgba(90, 90, 100, .22);
  border-color: rgba(255, 255, 255, .3);
}
.luoshu .cell::before { opacity: .35; transition: opacity .3s var(--ease); }
/* 悬停：加强跟随光标的玻璃反光，使高光更明显 */
@media (hover: hover) {
  .luoshu .cell:hover::before {
    opacity: 1;
    background:
      radial-gradient(90% 70% at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, .95), rgba(255, 255, 255, .35) 35%, transparent 65%),
      linear-gradient(135deg, rgba(255, 255, 255, .4), transparent 40%, transparent 70%, rgba(255, 255, 255, .2));
  }
}
@keyframes cellIn { to { opacity: 1; transform: none; } }

.sum-lines { position: absolute; inset: -6%; width: 112%; height: 112%; pointer-events: none; overflow: visible; }
.sum-lines path {
  fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round;
  stroke-dasharray: 400; stroke-dashoffset: calc(400 - 400 * var(--draw, 0));
  opacity: calc(var(--draw, 0) * .7);
}
.sum-badge {
  position: absolute; left: 50%; bottom: -54px;
  padding: 6px 16px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--accent);
  transform: translate(-50%, calc((1 - var(--draw, 0)) * 12px));
  opacity: var(--draw, 0);
}
.hero-note { margin-top: 112px; font-size: 15px; color: var(--ink-2); }

/* ===== 逐字点亮 ===== */
.statement { height: 220vh; background: var(--bg); }
.statement-sticky {
  position: sticky; top: 0; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 0 24px;
}
.scrub-text {
  display: grid; gap: clamp(28px, 4.5vh, 48px);
  max-width: 940px;
  color: var(--ink);
}
.scrub-lead {
  font-size: clamp(30px, 3.9vw, 56px); font-weight: 700; line-height: 1.2; letter-spacing: -.02em;
  text-wrap: balance;
}
.scrub-body {
  max-width: 30em;
  font-size: clamp(21px, 2.3vw, 30px); font-weight: 600; line-height: 1.7; letter-spacing: 0;
}
.scrub-text .ch { opacity: .14; transition: opacity .25s linear; }
.scrub-text .ch.on { opacity: 1; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}
.feature-card {
  padding: 40px 32px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all .3s var(--ease);
  background: rgba(255, 255, 255, .7) !important;
}
@media (hover: hover) {
  .feature-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .85) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  }
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 15px;
  color: #86868b;
  margin: 0;
  line-height: 1.5;
}
#core-features {
  background: var(--bg);
  padding: 120px 24px;
}
#core-features .section-head {
  margin-bottom: 88px;
}
#core-features .feature-grid {
  gap: 28px;
}
.backend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}
.backend-card {
  padding: 48px 40px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(255, 255, 255, .7) !important;
  transition: background .3s var(--ease);
}
@media (hover: hover) {
  .backend-card:hover {
    background: rgba(255, 255, 255, .85) !important;
  }
}
.backend-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #1d1d1f;
  letter-spacing: -0.01em;
}
.backend-card p {
  font-size: 16px;
  line-height: 1.6;
  color: #6e6e73;
  margin: 0;
}
#backends {
  background: #fff;
  padding: 120px 24px;
}
#backends .section-head {
  margin-bottom: 88px;
}
#backends .backend-grid {
  gap: 40px;
}
.section { position: relative; overflow: hidden; padding: 100px 24px; }
.section-light { background: #fff; }
.section-gray { background: var(--bg); }
.section-head {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto 80px;
  text-align: center;
}
.section-head h2, .tile h2, .cta h2 {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.03em;
  margin: 0;
}
.lead {
  margin-top: 24px;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-2);
  line-height: 1.5;
  letter-spacing: -0.01em;
}
.lead code { font-size: .9em; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); color: #fff; }

/* 滚动显现 */
.reveal {
  opacity: 0;
  transform: translateY(48px) scale(.98);
  filter: blur(6px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease);
  transition-delay: var(--delay, 0s);
}
.reveal.in { opacity: 1; transform: none; filter: none; }
/* ===== 代码窗口 ===== */
.window {
  margin: 0; border-radius: 20px; overflow: hidden;
  background: rgba(250, 250, 252, .7);
}
.window-bar {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  font-size: 12px; color: var(--ink-2);
}
.window-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.window-bar i:nth-child(2) { background: #febc2e; }
.window-bar i:nth-child(3) { background: #28c840; }
.window-bar span { margin-left: auto; margin-right: auto; transform: translateX(-30px); }
.window pre {
  margin: 0; padding: 24px 26px 28px;
  overflow-x: auto;
  font-size: 14px; line-height: 1.7;
}
.window-dark { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.window-dark .window-bar { border-bottom-color: rgba(255, 255, 255, .08); color: #86868b; }
.window-dark pre { color: #e5e5ea; }
.window-dark .line { display: block; opacity: .28; transition: opacity .5s var(--ease); }
.window-dark .line.on { opacity: 1; }

/* 语法高亮（由 main.js 生成） */
.tok-k { color: #ad3da4; font-weight: 600; }
.tok-s { color: #c41a16; }
.tok-c { color: #8e8e93; font-style: italic; }
.tok-n { color: #1c00cf; }
.tok-o { color: var(--accent); font-weight: 600; }
.window-dark .tok-k { color: #ff7ab2; }
.window-dark .tok-s { color: #ff8170; }
.window-dark .tok-c { color: #7f8c98; }
.window-dark .tok-n { color: #d9c97c; }
.window-dark .tok-o { color: #4eb0ff; }

/* ===== 语言 ===== */
.lang-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center;
  max-width: 1080px; margin: 0 auto;
}
.lang-grid .window { background: #fbfbfd; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 34px; }
.feature-list h3 { font-size: 21px; font-weight: 600; margin-bottom: 6px; }
.feature-list p { color: var(--ink-2); font-size: 17px; }

/* ===== 双卡片 ===== */
.tiles {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 12px; background: #fff;
}
.tile {
  position: relative; overflow: hidden;
  min-height: 680px; border-radius: var(--radius);
  display: flex; flex-direction: column; align-items: center;
  padding: 64px 40px 48px; text-align: center;
}
.tile h2 { font-size: clamp(32px, 3.6vw, 48px); }
.tile-copy p:last-child { margin: 18px auto 0; max-width: 440px; font-size: 19px; color: var(--ink-2); }
.tile-soft { background: linear-gradient(180deg, #f5f5f7, #f3ecf6); }
.tile-tint { background: linear-gradient(180deg, #f5f5f7, #e8eefc); }

/* 两张卡片用 subgrid 共享"文案行 + 图形行"：文案行取两者较高者，
   图形在等高的图形行里居中，从而共用同一条横向中轴线 */
@supports (grid-template-rows: subgrid) {
  .tiles { grid-template-rows: auto 1fr; }
  .tile { display: grid; grid-row: span 2; grid-template-rows: subgrid; justify-items: center; align-items: start; row-gap: 48px; }
}
.vm-stack, .qubits { margin: auto 0; align-self: center; }
.vm-stack {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  width: min(380px, 100%);
}
.vm-stack span {
  padding: 22px 0; border-radius: 16px;
  font-family: var(--mono); font-size: 15px; color: var(--ink);
  background: rgba(255, 255, 255, .6);
  animation: float 6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -.7s);
  transition: scale .35s var(--ease), box-shadow .35s var(--ease), background .35s,
              filter .35s var(--ease), opacity .35s var(--ease);
}
/* 悬停放大 + 投影：用独立的 scale 属性，不与 float 动画的 transform 冲突 */
@media (hover: hover) {
  /* 景深：悬停一格时，其余方格虚化、后退 */
  .vm-stack:has(span:hover) span:not(:hover) {
    filter: blur(1px);
    opacity: .55;
    scale: .94;
  }
  .vm-stack span:hover {
    z-index: 1; scale: 1.14;
    background: rgba(255, 255, 255, .92);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .9),
      inset 0 0 18px rgba(255, 255, 255, .25),
      0 8px 16px rgba(0, 0, 0, .11),
      0 22px 44px rgba(0, 0, 0, .19);
  }
}
@keyframes float { 50% { transform: translateY(-8px); } }

.qubits { display: grid; gap: 34px; width: min(400px, 100%); }
.wire { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-right: 20px; }
.wire::before {
  content: ""; position: absolute; left: 48px; right: 0; top: 50%; height: 2px;
  background: linear-gradient(90deg, rgba(0, 113, 227, .7) 0 var(--flow, 0%), rgba(29, 29, 31, .2) var(--flow, 0%));
}
.wire b { position: relative; width: 36px; font-family: var(--mono); font-weight: 500; color: var(--ink-2); }
.gate {
  display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 16px;
  font-family: var(--mono); font-size: 22px; font-weight: 600;
  background: rgba(255, 255, 255, .55);
}
.gate.dot::after { content: ""; position: static; width: 14px; height: 14px; padding: 0; border-radius: 50%; background: var(--ink); -webkit-mask: none; mask: none; }
.gate.plus { font-size: 30px; font-weight: 400; }

/* ===== 量子示例标签 ===== */
.algo-row {
  position: relative; z-index: 1;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin: 48px auto 0; padding: 0; list-style: none;
}
.algo-row li { padding: 10px 20px; border-radius: 999px; font-size: 15px; color: #e5e5ea; }

/* ===== 并发 ===== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1000px; margin: 0 auto; }
.stat {
  padding: 48px 28px; border-radius: var(--radius); text-align: center;
  background: linear-gradient(160deg, rgba(240, 244, 255, .9), rgba(255, 255, 255, .5));
}
.stat strong {
  display: block; font-size: 96px; line-height: 1; font-weight: 700; letter-spacing: -.04em;
  background: linear-gradient(135deg, #0071e3, #8e5cff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { display: block; margin-top: 16px; font-size: 17px; color: var(--ink-2); }
.states {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px;
  margin-top: 56px; font-family: var(--mono); font-size: 15px;
}
.states span { padding: 8px 16px; border-radius: 10px; background: var(--bg); transition: background .4s, color .4s; }
.states span.on { background: var(--accent); color: #fff; }
.states i { font-style: normal; color: var(--ink-2); }

/* ===== 模拟器卡片 ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1000px; margin: 0 auto; }
.card { padding: 40px 32px; border-radius: var(--radius); background: rgba(255, 255, 255, .7); }
.card h3 { font-size: 24px; font-weight: 600; margin-bottom: 10px; }
.card p { color: var(--ink-2); font-size: 17px; }

/* ===== CTA ===== */
/* 北极极光：黑色夜空，极光沿一条弧线发散 */
.cta { position: relative; overflow: hidden; padding: 160px 24px; background: #000; }
.cta-content {
  position: relative; z-index: 1;
  max-width: 760px; margin: 0 auto;
  text-align: center;
}
.cta .cta-title { color: #fff; font-size: clamp(34px, 4.6vw, 56px); }
.cta .cta-content > p { margin-top: 18px; font-size: 19px; color: #c7c7cc; }
.polar { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.8;
}
.cta-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.6) 20%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.6) 80%,
    rgba(0, 0, 0, 0.9) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.cta-panel > p { margin-top: 18px; font-size: 19px; color: var(--ink-2); }

/* ===== 页脚 ===== */
.footer { background: var(--bg); font-size: 12px; color: var(--ink-2); }
.footer-inner { max-width: 980px; margin: 0 auto; padding: 24px 22px 32px; }
.footer hr { border: 0; border-top: 1px solid #d2d2d7; margin: 16px 0; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-row nav { display: flex; gap: 18px; }
.footer-row a:hover { text-decoration: underline; }

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .nav { gap: 12px; }
  .nav-links {
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .85);
    -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .12);
    opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  .nav.open .nav-links { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { display: block; padding: 12px 16px; font-size: 17px; }
  .nav-cta { margin-left: auto; }
  .nav-toggle {
    display: grid; gap: 6px; place-content: center;
    width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 18px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
  .nav.open .nav-toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.open .nav-toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

  .br-sm { display: inline; }
  .lang-grid, .tiles, .stats, .cards { grid-template-columns: 1fr; }
  .lang-grid { gap: 48px; }
  .tile { min-height: 560px; }
  .tiles { grid-template-rows: none; }
  .tile { display: flex; grid-row: auto; }
  .section { padding: 100px 20px; }
  .window pre { font-size: 12.5px; }
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; filter: none; }
  .cell, .luoshu.in .cell { opacity: 1; transform: none; }
  .hero, .luoshu-section, .statement { height: auto; }
  .hero-sticky, .luoshu-sticky, .statement-sticky { position: relative; }
  .statement-sticky { height: auto; padding: 140px 24px; }
  .scrub-text .ch { opacity: 1; }
  .window-dark .line { opacity: 1; }
  .hero-logo-ring { display: none; }
}

/* ===== 量子：浅灰底，代码保留为深色卡片 ===== */
.section-quantum .lead code { background: rgba(0, 0, 0, .06); color: var(--ink); }
.section-quantum .window-dark {
  background: linear-gradient(180deg, #1c1c22, #121216);
  border-color: rgba(0, 0, 0, .2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.section-quantum .window-dark::before { background: radial-gradient(120% 80% at var(--mx, 30%) var(--my, 0%), rgba(255, 255, 255, .08), transparent 55%); }
.section-quantum .window-dark::after { background: linear-gradient(140deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .1)); }
.section-quantum .algo-row li {
  color: var(--ink); background: rgba(255, 255, 255, .8);
  transition: color .25s, background .25s;
}
/* 悬停：蓝底白字，同时压暗玻璃高光，避免把蓝色冲淡 */
.section-quantum .algo-row li:hover { color: #fff; background: var(--accent); }
.section-quantum .algo-row li:hover::before { opacity: .25; }

/* ===== 页脚品牌 ===== */
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { border-radius: 50%; object-fit: cover; }
.footer-brand span { display: flex; flex-direction: column; font-size: 12px; }
.footer-brand strong { font-size: 14px; color: var(--ink); }

/* ===== 从"量子编程"起逐页变暗：浅灰 → 深灰 → 黑，CTA 与页尾为纯黑 ===== */
#quantum { background: linear-gradient(180deg, #f5f5f7 0%, #f5f5f7 25%, #e8e8ea 100%); }
/* 并发：白色 */
#concurrency {
  background: #fff;
}
#concurrency .lead, #concurrency .stat span, #concurrency .states i { color: #3a3a3f; }
#concurrency .states span { background: rgba(255, 255, 255, .55); }
#concurrency .states span.on { background: var(--accent); }
/* 底层模拟：浅灰 → 深灰 → 黑，切换为浅色文字 */
#backend {
  --ink: #f5f5f7; --ink-2: #c7c7cc;
  color: var(--ink);
  background: linear-gradient(180deg, #e8e8ea 0%, #d8d8dc 20%, #c8c8cc 40%, #98989e 60%, #6a6a6f 75%, #3a3a3e 85%, #000 100%);
  padding: 140px 24px 120px;
  display: flex;
  flex-direction: column;
}
#backend .section-head {
  margin-bottom: 96px;
}
#backend .cards {
  display: flex;
  justify-content: center;
}
#backend .eyebrow { color: #e5e5ea; }
#backend .section-head h2,
#backend .section-head p { color: #000; }
#backend .card {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 30px rgba(0, 0, 0, .3);
  padding: 48px 40px;
  max-width: 480px;
  margin: 0 auto;
  transition: all .3s var(--ease);
}
@media (hover: hover) {
  #backend .card:hover {
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 16px 40px rgba(0, 0, 0, .4);
  }
}
#backend .card h3 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #fff;
  letter-spacing: -0.01em;
}
#backend .card p {
  font-size: 16px;
  line-height: 1.6;
  color: #f5f5f7;
  margin: 0;
}
.footer {
  --ink: #f5f5f7; --ink-2: #a1a1a6;
  background: #000;
}
.footer hr { border-top-color: #333336; }
