/* ============================================================
   02 解决方案 · SOLUTION
   选择器全部以 #solution 开头 · 仅使用 tokens.css 变量
   ============================================================ */

/* ============================================================
   核心逻辑流程时间线（横向，4 节点）
   ============================================================ */
#solution .sol-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2vw, 2rem);
  margin-bottom: clamp(4rem, 8vw, 6rem);
}

/* —— 节点间流动连接线 —— */
#solution .sol-flow-line {
  position: absolute;
  top: 30px;                       /* 对齐节点图标垂直中心 */
  left: 12%;
  width: 76%;                      /* 收窄到首末节点中心之间 */
  height: 8px;
  z-index: 0;
}
#solution .sol-flow-dash {
  animation: sol-dash-flow 1.6s linear infinite;
}
@keyframes sol-dash-flow {
  to { stroke-dashoffset: -48; }   /* dasharray(10+14)×2，保证无缝循环 */
}

/* —— 单个节点 —— */
#solution .sol-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* —— 节点容器（切角仪表框） —— */
#solution .sol-node-hex {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  background: var(--ink-2);
  border: 1px solid var(--line-bright);
  box-shadow: 0 0 0 6px var(--void), 0 0 30px -14px var(--cyan-glow);
  transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease),
              transform 0.4s var(--ease);
}
#solution .sol-node-hex svg { width: 40px; height: 40px; }

#solution .sol-node:hover .sol-node-hex {
  border-color: var(--cyan);
  transform: translateY(-4px);
  box-shadow: 0 0 0 6px var(--void), 0 10px 40px -12px var(--cyan-glow);
}

/* —— 节点序号 / 标签 —— */
#solution .sol-node-idx {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin-top: 1.1rem;
}
#solution .sol-node-label {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  color: var(--text);
  margin-top: 0.3rem;
}

/* ============================================================
   关键结论（视觉焦点）
   ============================================================ */
#solution .sol-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 1.15;
  text-align: center;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-block: clamp(2rem, 5vw, 3.5rem);
  text-wrap: balance;             /* 换行时两行更均衡 */
}
#solution .sol-headline .hl {
  color: var(--cyan);
  text-shadow: 0 0 32px var(--cyan-glow);
}

/* ============================================================
   产品设计原则（左右并排）
   ============================================================ */
#solution .sol-principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 1.6rem);
  margin-bottom: clamp(4rem, 9vw, 7rem);
}
#solution .sol-principle {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-left: 2px solid var(--cyan);
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
}
#solution .sol-principle:hover {
  background: var(--ink-3);
  border-color: var(--line-bright);
  border-left-color: var(--cyan);
}
#solution .sol-principle-k {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.18em;
  color: var(--text-mute);
  margin-bottom: 0.8rem;
}
#solution .sol-principle p {
  font-size: var(--fs-lead);
  line-height: 1.7;
  color: var(--text-dim);
}

/* ============================================================
   情感收尾标语（居中大留白）
   ============================================================ */
#solution .sol-tagline {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-h2);
  color: var(--text);
  letter-spacing: 0.02em;
  padding-block: clamp(2rem, 5vw, 4rem);
}

/* ============================================================
   响应式 —— 手机转竖向流程
   ============================================================ */
@media (max-width: 768px) {
  /* 流程竖排 */
  #solution .sol-flow {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0;
    padding-left: 32px;            /* 给竖线留位 */
  }
  /* 横向 SVG 线在竖排下失真，隐藏改用 CSS 竖线 */
  #solution .sol-flow-line { display: none; }
  /* 竖向连接线：底色 + 电光青流动虚线 */
  #solution .sol-flow::before {
    content: "";
    position: absolute;
    top: 32px;
    bottom: 32px;
    left: 32px;
    width: 1px;
    z-index: 0;
    background:
      linear-gradient(var(--cyan) 50%, transparent 0) 0 0 / 2px 24px repeat-y,
      var(--line);
    animation: sol-dash-flow-v 1.6s linear infinite;
  }
  @keyframes sol-dash-flow-v { to { background-position: 0 48px, 0 0; } }

  #solution .sol-node {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding-block: clamp(1rem, 4vw, 1.6rem);
    text-align: left;
  }
  #solution .sol-node-hex { flex: 0 0 auto; }
  #solution .sol-node-idx { margin-top: 0; }
  #solution .sol-node-label { margin-top: 0; }

  /* 原则并排转堆叠 */
  #solution .sol-principles { grid-template-columns: 1fr; }

  /* 关键结论：手机端强化冲击力，字号上调、限宽收紧使断行利落 */
  #solution .sol-headline {
    font-size: clamp(2rem, 9vw, 3rem);
    margin-inline: auto;
    max-width: 10ch;
  }
}

/* ============================================================
   动效偏好 —— 关闭流动动画
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  #solution .sol-flow-dash { animation: none; }
  #solution .sol-flow::before { animation: none; }
}
