/* 工作流专页（flow.html）专属样式与「沉思」动效——index.html 不加载本文件。
 *
 * 动效语言：缓慢呼吸的思考节点、沿线流动的思绪、终端里逐个浮现的思考点。
 * 刻意不做快节奏或大幅位移——调性是沉思，不是兴奋。颜色一律走 tokens.css
 * 令牌（本文件不是令牌源，不得出现颜色字面量）；动画全部是纯 CSS
 * @keyframes，无 JS 定时器，降级由 site.css 的 prefers-reduced-motion 块
 * 统一关闭（animation 与 transition 同关）。 */

/* ── hero ── */
.flow-hero {
  width: min(var(--page), 100% - var(--s6) * 2);
  margin-inline: auto;
  padding-block: var(--s7) var(--s8);
  text-align: center;
}

.flow-back {
  margin-bottom: var(--s6);
  text-align: left;
}

.flow-back a {
  color: var(--dim);
  font-size: var(--f-sm);
  text-decoration: none;
  transition: color var(--t);
}

.flow-back a:hover { color: var(--accent); }

/* 终端卡 + 节点图：桌面两列，窄屏单列。 */
.flow-hero-grid {
  margin-top: var(--s7);
  display: grid;
  grid-template-columns: minmax(280px, 5fr) minmax(320px, 6fr);
  gap: var(--s6);
  align-items: center;
}

/* 终端式「思考中」元素——页面动效语义的核心：输入一行，思考一行，推进一行。 */
.flow-term {
  padding: var(--s4) var(--s5);
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  font-family: var(--mono);
  font-size: var(--f-sm);
  text-align: left;
}

.flow-term-line { display: flex; align-items: baseline; gap: var(--s2); }

.flow-term-line code { color: var(--accent); }

.flow-term-out code { color: var(--dim); }

/* 三个思考点逐个浮现：错峰 delay 让它们轮流亮起，像一句没说完的话。 */
.dots { display: inline-flex; gap: var(--s1); }

.dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .2;
  animation: dot-fade 1.8s ease-in-out infinite;
}

.dots i:nth-child(2) { animation-delay: .3s; }
.dots i:nth-child(3) { animation-delay: .6s; }

@keyframes dot-fade {
  0%, 100% { opacity: .2; }
  30% { opacity: 1; }
}

/* ── 思考节点图 ──
   呼吸（错峰）形成涟漪感：中心节点慢而稳，卫星节点各自起伏。
   transform-box: fill-box 让 SVG 元素能以自身中心做 scale。 */
.think-map { width: 100%; height: auto; }

.think-node {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 3.2s ease-in-out infinite;
}

/* 卫星错峰：每颗节点相位不同。选择器按 circle 在同标签兄弟中的序位计数
 * （nth-of-type 不看类也不看 line），卫星是 circle 第 1-6 个、hub 是第 7 个
 * 且类为 .hub 而非 .sat——两类互不误伤，收拢图的 hub 也不会被牵连。 */
.think-node.sat:nth-of-type(1) { animation-delay: .5s; }
.think-node.sat:nth-of-type(2) { animation-delay: 1.1s; }
.think-node.sat:nth-of-type(3) { animation-delay: 1.7s; }
.think-node.sat:nth-of-type(4) { animation-delay: .2s; }
.think-node.sat:nth-of-type(5) { animation-delay: 1.4s; }
.think-node.sat:nth-of-type(6) { animation-delay: .8s; }

.think-node.hub {
  stroke-width: 2;
  fill: var(--overlay-code);
  animation-duration: 5s;
}

@keyframes breathe {
  0%, 100% { opacity: .45; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.18); }
}

/* 思绪流线：dash 沿线缓慢单向流动，像信号在连线上传递。 */
.think-edge {
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 4 7;
  animation: drift 6s linear infinite;
}

@keyframes drift {
  to { stroke-dashoffset: -44; }
}

/* ── 阶段流程条 ── */
.stage-strip {
  margin-top: var(--s6);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) 0;
  align-items: center;
}

.stage-strip li {
  display: inline-flex;
  align-items: baseline;
  padding: var(--s2) var(--s4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  font-size: var(--f-sm);
}

/* The arrow is what carries the order here — the strip deliberately numbers
   nothing, so this is the only thing saying these are steps and not a set. */
.stage-strip li:not(:last-child)::after {
  content: "→";
  margin-left: var(--s4);
  color: var(--dim);
}

/* ── 注意力区块：三点 + 收拢示意 ── */
.attn-grid {
  margin-top: var(--s6);
  display: grid;
  grid-template-columns: minmax(280px, 5fr) minmax(320px, 6fr);
  gap: var(--s6);
  align-items: center;
}

.flow-points { list-style: none; }

.flow-points li {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
  color: var(--dim);
}

.flow-points li::before {
  content: "·";
  margin-right: var(--s3);
  color: var(--accent);
  font-weight: 700;
}

/* 五条杂乱细线收拢为一条主线：已完成输出的归宿。
   dash 周期与关键帧终点必须配套：周期 9（3+6）配 -45（=5×9）才能无缝循环，
   复用 think-edge 的 -44 会在每次循环边界相位回跳、可见地抖一下。 */
.gather-map { width: 100%; height: auto; }

.gather-strand {
  fill: none;
  stroke: var(--dim);
  stroke-width: 1;
  opacity: .55;
  stroke-dasharray: 3 6;
  animation: gather-drift 8s linear infinite;
}

@keyframes gather-drift {
  to { stroke-dashoffset: -45; }
}

.gather-spine {
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* ── CTA ── */
.flow-cta { text-align: center; }

.flow-cta .trial-cta-row { justify-content: center; }

/* ── 断点（与 site.css 同档） ── */
@media (max-width: 960px) {
  .flow-hero-grid, .attn-grid { grid-template-columns: 1fr; }
  .think-map { max-width: 420px; margin-inline: auto; }
}
