:root {
  --bg: #0e1114;
  --bg-alt: #11151a;
  --panel: #14181c;
  --panel-2: #171c21;
  --line: #222a31;
  --line-soft: #1b2228;
  --text: #eef1f3;
  --muted: #8b949c;
  --faint: #5c666e;
  --accent: #7aa8b8;
  --accent-dim: rgba(122, 168, 184, 0.12);
  --topbar-h: 64px;
  --radius: 11px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans SC", "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

sup { font-size: 0.5em; vertical-align: super; }

/* ═══════════ 顶栏 ═══════════ */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 44px);
  padding: 0 clamp(18px, 3.4vw, 48px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, backdrop-filter 0.2s ease;
}

.topbar.is-scrolled {
  background: rgba(14, 17, 20, 0.82);
  border-bottom-color: var(--line-soft);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-brand {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: 0.14em;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.2vw, 30px);
  margin-right: auto;
}

.topbar-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}

.topbar-nav a:hover { color: var(--text); }

.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--faint);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 6px 9px;
  border-radius: 5px;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.lang-switch button:hover { color: var(--text); }

.lang-switch button[aria-pressed="true"] {
  color: var(--accent);
  background: var(--accent-dim);
}

.lang-switch button:focus-visible,
.topbar-nav a:focus-visible,
.nav-toggle:focus-visible,
.hero-arrow:focus-visible,
.hero-dots button:focus-visible,
.btn:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  gap: 9px;
  align-items: center;
  cursor: pointer;
  padding: 6px 2px;
}

.nav-toggle-bars { display: grid; gap: 4px; }
.nav-toggle-bars i { display: block; width: 18px; height: 1px; background: currentColor; }

.nav-toggle-label { letter-spacing: 0.06em; }

/* ═══════════ 首屏 ═══════════ */

.hero {
  padding: calc(var(--topbar-h) + clamp(24px, 5vh, 60px)) clamp(18px, 3.4vw, 48px) clamp(28px, 5vh, 56px);
}

.hero-inner { max-width: 1180px; margin: 0 auto; }

.slides { display: grid; }

.slide {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(30px, 4.6vw, 72px);
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}

.slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.slide-copy { min-width: 0; }

.slide-title {
  margin: 0 0 20px;
  font-size: clamp(29px, 4.2vw, 50px);
  line-height: 1.18;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.slide-sub {
  margin: 0 0 26px;
  font-size: clamp(15px, 1.25vw, 17px);
  color: var(--muted);
  max-width: 40em;
}

.slide-highlight {
  margin: 0;
  padding: 15px 18px;
  border-left: 2px solid var(--accent);
  background: linear-gradient(90deg, var(--accent-dim), transparent 82%);
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  color: var(--text);
  max-width: 40em;
}

.keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.keywords li {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}

/* 幻灯片 1 节点图 */

.slide-visual { min-width: 0; }

.workbench { display: block; width: 100%; height: auto; max-width: 520px; margin: 0 auto; }

.wb-links line {
  stroke: var(--line);
  stroke-width: 1.2;
  stroke-dasharray: 5 6;
  animation: wb-flow 5.5s linear infinite;
}

@keyframes wb-flow {
  to { stroke-dashoffset: -44; }
}

.wb-core {
  fill: var(--panel-2);
  stroke: var(--accent);
  stroke-opacity: 0.5;
  stroke-width: 1.4;
}

.wb-core-text {
  fill: var(--text);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-anchor: middle;
  dominant-baseline: middle;
}

.wb-node rect {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 1.2;
}

.wb-node text {
  fill: var(--muted);
  font-size: 13px;
  text-anchor: middle;
  dominant-baseline: middle;
}

/* 幻灯片 2 流程链 */

.flow-group + .flow-group { margin-top: clamp(30px, 5vh, 54px); }

.flow-label {
  margin: 0 0 12px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.flow-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.flow-chain li {
  position: relative;
  counter-increment: step;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
}

.flow-chain li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--faint);
  margin-bottom: 2px;
}

.flow-chain li + li { margin-left: 26px; }

.flow-chain li + li::after {
  content: "→";
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 13px;
}

.slide.is-active .flow-chain li {
  animation: chain-in 0.5s ease backwards;
}

.slide.is-active .flow-chain li:nth-child(1) { animation-delay: 0.04s; }
.slide.is-active .flow-chain li:nth-child(2) { animation-delay: 0.10s; }
.slide.is-active .flow-chain li:nth-child(3) { animation-delay: 0.16s; }
.slide.is-active .flow-chain li:nth-child(4) { animation-delay: 0.22s; }
.slide.is-active .flow-chain li:nth-child(5) { animation-delay: 0.28s; }
.slide.is-active .flow-chain li:nth-child(6) { animation-delay: 0.34s; }
.slide.is-active .flow-chain li:nth-child(7) { animation-delay: 0.40s; }

@keyframes chain-in {
  from { opacity: 0; transform: translateY(8px); }
}

/* 幻灯片 3 生长图 */

.grow-map { display: grid; justify-items: center; gap: 0; }

.grow-core {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 18px 30px;
  border: 1px solid var(--accent);
  border-color: rgba(122, 168, 184, 0.45);
  border-radius: var(--radius);
  background: var(--panel-2);
  text-align: center;
}

.grow-core strong { font-size: 17px; letter-spacing: 0.12em; }
.grow-core span { font-size: 12.5px; color: var(--faint); }

.grow-stem {
  width: 1px;
  height: clamp(20px, 4vh, 34px);
  background: linear-gradient(var(--line), rgba(122, 168, 184, 0.4));
}

.grow-plugins {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.grow-plugins li {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.grow-plugins li.is-open {
  border-color: rgba(122, 168, 184, 0.38);
  color: var(--text);
}

.slide.is-active .grow-plugins li {
  animation: chain-in 0.45s ease backwards;
}

.slide.is-active .grow-plugins li:nth-child(1) { animation-delay: 0.06s; }
.slide.is-active .grow-plugins li:nth-child(2) { animation-delay: 0.12s; }
.slide.is-active .grow-plugins li:nth-child(3) { animation-delay: 0.18s; }
.slide.is-active .grow-plugins li:nth-child(4) { animation-delay: 0.24s; }
.slide.is-active .grow-plugins li:nth-child(5) { animation-delay: 0.30s; }
.slide.is-active .grow-plugins li:nth-child(6) { animation-delay: 0.36s; }

.grow-entry {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--faint);
  text-align: center;
}

.grow-entry-arrow { color: var(--accent); }

/* 首屏控制 */

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: clamp(30px, 5vh, 52px);
}

.hero-arrow {
  appearance: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.hero-arrow:hover { color: var(--text); border-color: var(--faint); }

.hero-dots { display: flex; align-items: center; gap: 9px; }

.hero-dots button {
  appearance: none;
  width: 22px;
  height: 2px;
  padding: 0;
  border: 0;
  background: var(--line);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hero-dots button.is-active { background: var(--accent); }

/* ═══════════ 通用区块 ═══════════ */

.section { padding: clamp(76px, 11vh, 150px) clamp(18px, 3.4vw, 48px); }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line-soft); }

.wrap { max-width: 1080px; margin: 0 auto; }

.section-title {
  margin: 0 0 22px;
  font-size: clamp(25px, 3.4vw, 40px);
  line-height: 1.24;
  font-weight: 620;
  letter-spacing: -0.012em;
  max-width: 22em;
}

.section-body {
  margin: 0 0 14px;
  font-size: clamp(15px, 1.15vw, 16.5px);
  color: var(--muted);
  max-width: 46em;
}

/* 卡片 */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(30px, 4.5vh, 52px);
}

.card {
  padding: 22px 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.card:hover { border-color: var(--faint); background: var(--panel-2); }

.card h3 {
  margin: 0 0 9px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* 底座 + 插件 */

.ext-layers {
  display: grid;
  justify-items: center;
  margin-top: clamp(34px, 5vh, 56px);
}

.layer {
  width: 100%;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.layer-core {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  max-width: 560px;
  border-color: rgba(122, 168, 184, 0.32);
  background: var(--panel-2);
}

.layer-core strong { font-size: 19px; letter-spacing: 0.11em; }

.layer-tag {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.layer-note { font-size: 13.5px; color: var(--muted); }

.layer-stem {
  width: 1px;
  height: clamp(26px, 4.5vh, 44px);
  background: linear-gradient(rgba(122, 168, 184, 0.4), var(--line));
}

.layer-plugins { display: grid; gap: 14px; justify-items: start; }

.plugin-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.plugin-list li {
  position: relative;
  padding: 11px 14px 11px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-alt);
  font-size: 13.5px;
  color: var(--muted);
}

.plugin-list li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.entry-block {
  margin-top: clamp(34px, 5vh, 56px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.entry-block h3 {
  margin: 0 0 10px;
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 620;
}

.entry-block p { margin: 0; font-size: 15px; color: var(--muted); max-width: 44em; }

/* 中文专属段落 */

.zh-only[hidden] { display: none !important; }

.zh-only {
  margin-top: 26px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--panel);
}

.zh-lead {
  margin: 0 0 10px;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
}

.zh-only .section-body { margin-bottom: 0; }

/* 收尾 */

.section-cta { text-align: left; }

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 4vh, 40px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 14.5px;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.btn:hover { border-color: var(--faint); }

.btn-primary {
  border-color: transparent;
  background: var(--accent);
  color: #0b0e10;
  font-weight: 600;
}

.btn-primary:hover { background: #8db7c5; border-color: transparent; }

/* ═══════════ 页脚 ═══════════ */

.footer {
  padding: clamp(34px, 5vh, 54px) clamp(18px, 3.4vw, 48px);
  border-top: 1px solid var(--line-soft);
  background: var(--bg-alt);
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  font-size: 13px;
  color: var(--faint);
}

.footer-main { display: grid; gap: 12px; }

.footer-brand { flex: none; display: block; }

.footer-brand img {
  display: block;
  width: 148px;
  height: auto;
  opacity: 0.88;
  transition: opacity 0.15s ease;
}

.footer-brand:hover img { opacity: 1; }

.footer-entity { color: var(--muted); letter-spacing: 0.04em; }

.footer-contacts { display: flex; flex-wrap: wrap; gap: 8px 26px; }

.footer-legal { margin-top: 6px; letter-spacing: 0.02em; }

/* ═══════════ 滚动进入 ═══════════ */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-in { opacity: 1; transform: none; }

/* ═══════════ 响应式 ═══════════ */

@media (max-width: 1023px) {
  .slide { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench { max-width: 440px; }
}

@media (max-width: 767px) {
  :root { --topbar-h: 58px; }

  .topbar { gap: 12px; }
  .topbar-nav {
    position: fixed;
    inset: var(--topbar-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0;
    padding: 12px clamp(18px, 3.4vw, 48px) 18px;
    background: rgba(14, 17, 20, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: none;
  }

  .topbar-nav.is-open { display: flex; }

  .topbar-nav a { padding: 9px 0; font-size: 15px; width: 100%; }

  .lang-switch { margin-left: auto; }
  .nav-toggle { display: flex; }

  .slide-title { font-size: clamp(25px, 7vw, 32px); }
  .slide-sub { font-size: 15px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .grow-plugins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plugin-list { grid-template-columns: minmax(0, 1fr); }
  .flow-chain li { font-size: 12.5px; padding: 8px 11px; }
  .flow-chain li + li { margin-left: 22px; }
  .flow-chain li + li::after { left: -19px; }
  .hero-controls { margin-top: 34px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 22px; }
  .footer-brand img { width: 118px; }
}

@media (max-width: 400px) {
  .grow-plugins { grid-template-columns: minmax(0, 1fr); }
  .lang-switch button { padding: 6px 7px; font-size: 12.5px; }
}

/* ═══════════ 降低动效 ═══════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .wb-links line,
  .slide.is-active .flow-chain li,
  .slide.is-active .grow-plugins li {
    animation: none !important;
  }

  .slide,
  .reveal {
    transform: none !important;
    transition: opacity 0.2s ease !important;
  }

  .reveal { opacity: 1; }
}
