/* ============================================================
   HONGXINGYE · Portfolio — 2026-10-23 首页重构
   设计语言：aneshk.design 式暗色编辑排版
   纯黑 / 超大负字距粗体 / 单一暖橙 / 发丝线 / 大留白 / 克制动效
   零框架 · 零 CDN · 系统字体 · 窄屏优先
   ============================================================ */

:root {
  --bg: #0b0b0c;
  --bg-2: #121214;
  --bg-3: #17171a;
  --ink: #f4f2ed;
  --ink-2: #94928b;
  --ink-3: #5d5b55;
  --line: rgba(255, 255, 255, 0.10);
  --line-soft: rgba(255, 255, 255, 0.06);
  --accent: #ff5a26;
  --accent-2: #ff8a5c;
  --accent-soft: rgba(255, 90, 38, 0.12);
  --font-display: "Arial Black", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
  --wrap: 1280px;
  --pad: 22px;
  --nav-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #fff; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--pad);
  width: 100%;
}

/* ---------- 通用大标题 / 区块索引 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 8.5vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.sec { padding: 84px 0; position: relative; }

.sec-index {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 44px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sec-index .si-no { color: var(--accent); font-weight: 700; }
.sec-index .si-line { flex: 1; height: 1px; background: var(--line); }

.sec-head { margin-bottom: 40px; max-width: 720px; }
.sec-head .display { margin-bottom: 18px; }
.sec-sub { color: var(--ink-2); font-size: 15px; max-width: 560px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  white-space: nowrap;
}
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: #ff6f42; transform: translateY(-2px); }
.btn-line { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: rgba(11, 11, 12, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.3s ease;
}
.nav.scrolled { background: rgba(11, 11, 12, 0.86); }
.nav-in {
  max-width: var(--wrap);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo .nl-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.nav-menu { display: none; align-items: center; gap: 4px; }
.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 3px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; background: none; border: 0;
}
.nav-toggle span { display: block; height: 2px; width: 22px; margin: 0 auto; background: var(--ink); transition: transform 0.3s ease, opacity 0.3s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: rgba(11, 11, 12, 0.97);
  border-bottom: 1px solid var(--line);
  padding: 12px var(--pad) 26px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 99;
}
.mobile-menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu a {
  display: block;
  padding: 15px 4px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--line-soft);
}
.mobile-menu a .mm-en { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.15em; vertical-align: middle; margin-left: 10px; }

/* ---------- HERO · 沉浸式全屏 ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* 背景层铺满首屏，无边框；scale 预留视差移动空间 */
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  transform: translateY(var(--bgy, 0px)) scale(1.05);
  will-change: transform;
  animation: heroBgIn 1.3s ease-out both;
}
.hero-bg picture, .hero-bg img { width: 100%; height: 100%; display: block; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
@keyframes heroBgIn { from { opacity: 0.55; } to { opacity: 1; } }
/* 渐变遮罩：保证文字可读，不盖掉场景细节 */
.hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(11,11,12,0.42) 0%, rgba(11,11,12,0) 16%),
    linear-gradient(90deg, rgba(11,11,12,0.62) 0%, rgba(11,11,12,0.30) 32%, rgba(11,11,12,0) 58%),
    linear-gradient(0deg, rgba(11,11,12,0.62) 0%, rgba(11,11,12,0) 26%);
}
/* 内容层 */
.hero-inner {
  position: relative; z-index: 2;
  width: 100%;
  padding: calc(var(--nav-h) + 26px) var(--pad) 120px;
}
.hero-left { max-width: 620px; min-width: 0; }
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}
.hero-name {
  position: relative;
  width: fit-content;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(64px, 10vw, 140px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 26px;
}
/* 标题橙色斜杠标记（紧贴"野"字右上） */
.hn-mark {
  position: absolute;
  top: 0.06em; right: -0.22em;
  width: 0.09em; height: 0.48em;
  background: var(--accent);
  transform: rotate(18deg);
}
.hero-line {
  font-size: clamp(16px, 1.9vw, 21px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.5;
  margin-bottom: 10px;
}
.hero-sub2 {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-bottom: 34px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-cta .b-arrow { display: inline-block; font-weight: 400; transition: transform 0.25s ease; }
.btn:hover .b-arrow { transform: translateX(4px); }

/* 左下坐标 */
.hero-coord {
  position: absolute;
  left: var(--pad); bottom: 34px; z-index: 2;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
/* 右上竖排 */
.hero-vertical {
  position: absolute;
  right: calc(var(--pad) + 4px); top: calc(var(--nav-h) + 24px); z-index: 2;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--ink-3);
}
/* 右下滚动提示 */
.hero-scroll {
  position: absolute;
  right: var(--pad); bottom: 30px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.hero-scroll > span:first-child { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.3em; color: var(--ink-3); }
.hs-line { width: 1px; height: 44px; background: linear-gradient(var(--accent), transparent); animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse { 0%, 100% { opacity: 0.3; transform: scaleY(0.7); } 50% { opacity: 1; transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) {
  .hs-line { animation: none; }
}

/* ---------- Marquee · 最新动态信息条 ---------- */
.marquee {
  position: relative;
  display: flex;
  align-items: stretch;
  border-top: 1px solid rgba(255, 90, 38, 0.28);
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 90, 38, 0.07), rgba(255, 90, 38, 0) 60%),
    linear-gradient(90deg, #0d0c0a, #12100b 55%, #0c0b0a);
  overflow: hidden;
}
/* —— 光效层 1：底部流动光轨（光点沿底线向右流动） —— */
.marquee::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent 20%, rgba(255, 120, 60, 0.95) 50%, transparent 80%);
  background-size: 220px 1px;
  background-repeat: repeat-x;
  animation: mqLineFlow 2.2s linear infinite;
  z-index: 2;
}
@keyframes mqLineFlow { from { background-position-x: 0; } to { background-position-x: 220px; } }
/* —— 光效层 2：弥散光晕（大光斑缓慢穿行 + 呼吸） —— */
.marquee::after {
  content: "";
  position: absolute; top: -70%; bottom: -70%; left: -38%;
  width: 55%;
  background: radial-gradient(closest-side, rgba(255, 90, 38, 0.42), rgba(255, 90, 38, 0.15) 45%, rgba(255, 90, 38, 0) 72%);
  filter: blur(26px);
  pointer-events: none;
  z-index: 0;
  animation: mqGlobe 18s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes mqGlobe {
  0%   { transform: translateX(0); opacity: 0.4; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateX(235%); opacity: 0.4; }
}
/* —— 光效层 3：光尘粒子（在横幅中漂浮闪烁，跟随光感） —— */
.mq-fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.mqf-dust {
  position: absolute; top: 50%;
  left: var(--x, 10%);
  width: 3px; height: 3px; border-radius: 50%;
  background: #ffb28d;
  box-shadow: 0 0 10px 2px rgba(255, 90, 38, 0.6);
  opacity: 0;
  transform: scale(var(--s, 1));
  animation: mqDust 8s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  will-change: transform, opacity;
}
@keyframes mqDust {
  0%, 100% { transform: translate(0, 0) scale(var(--s, 1)); opacity: 0; }
  12%      { opacity: 0.85; }
  45%      { transform: translate(26px, -9px) scale(var(--s, 1)); opacity: 1; }
  80%      { opacity: 0.5; }
}
/* —— 光效层 4：LATEST 指示点呼吸 + SCROLL 文字呼吸光 —— */
.mq-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: mqDotPulse 2.8s ease-in-out infinite; }
@keyframes mqDotPulse {
  0%, 100% { box-shadow: 0 0 6px 1px rgba(255, 90, 38, 0.45); }
  50%      { box-shadow: 0 0 15px 4px rgba(255, 90, 38, 0.8); }
}
.marquee > * { position: relative; z-index: 1; }
.mq-label {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: 0 20px; height: 52px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em;
  color: var(--accent);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.mq-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; }
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  height: 52px;
  animation: marquee 120s linear infinite;
  will-change: transform;
}
.marquee-track span {
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink-2);
  letter-spacing: 0.02em;
  padding: 0 20px;
}
.marquee-track .mq-sep {
  flex-shrink: 0;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); opacity: 0.75;
}
.mq-end {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 8px;
  padding: 0 20px; height: 52px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.22em;
  color: var(--accent);
  border-left: 1px solid var(--line);
  transition: background 0.25s ease, color 0.25s ease;
  white-space: nowrap;
  animation: mqEndGlow 3.4s ease-in-out infinite;
}
@keyframes mqEndGlow {
  0%, 100% { text-shadow: 0 0 0 rgba(255, 90, 38, 0); }
  50%      { text-shadow: 0 0 14px rgba(255, 90, 38, 0.5); }
}
.mq-end:hover { background: rgba(255, 90, 38, 0.08); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }
@media (max-width: 859px) {
  .mq-label { padding: 0 14px; font-size: 10px; }
  .mq-end { padding: 0 14px; font-size: 10px; }
  .mq-end span { display: none; }
  .marquee-track span { padding: 0 14px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track, .marquee::after, .marquee::before, .mq-dot, .mq-end { animation: none; }
  .marquee::before { background: linear-gradient(90deg, transparent, rgba(255, 90, 38, 0.55), transparent); background-size: auto; }
  .mq-fx { display: none; }
}

/* ---------- Directory 极简编辑式目录 ---------- */
.directory { padding: 72px 0 64px; }
.dir-head { display: flex; align-items: center; gap: 16px; margin-bottom: 6px; }
.dh-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3em; color: var(--ink-3); }
.dh-line { flex: 1; height: 1px; background: var(--line); }
.dir-grid { display: grid; grid-template-columns: 1fr; }
.dir-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 44px 30px 6px;
  border-top: 1px solid var(--line);
  background: transparent;
  transition: padding-left 0.3s ease, background 0.45s ease;
  overflow: hidden;
}
.dir-item::before {
  content: "";
  position: absolute; top: -1px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s ease;
}
.dir-item:last-child { border-bottom: 1px solid var(--line); }
.dir-item:hover {
  padding-left: 14px;
  background: linear-gradient(180deg, rgba(255, 90, 38, 0.035), rgba(255, 90, 38, 0) 60%);
}
.dir-item:hover::before { transform: scaleX(1); }
.di-no {
  position: absolute; top: 8px; right: 10px;
  font-family: var(--font-display); font-weight: 900;
  font-size: 72px; line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
  transition: color 0.45s ease, transform 0.45s ease;
}
.dir-item:hover .di-no { color: rgba(255, 90, 38, 0.26); transform: translateY(-4px) scale(1.03); }
.di-en {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.34em;
  color: var(--ink-3); text-transform: uppercase;
}
.di-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(28px, 5.5vw, 40px);
  color: var(--ink); letter-spacing: 0.01em;
  margin: 13px 0 10px;
  max-width: 9em;
  transition: color 0.3s ease;
}
.dir-item:hover .di-title { color: var(--accent); }
.di-desc { font-size: 14px; color: var(--ink-2); max-width: 30ch; transition: color 0.3s ease; }
.dir-item:hover .di-desc { color: var(--ink-1); }
.di-bar { display: block; width: 28px; height: 2px; background: var(--accent); margin-top: 18px; transition: width 0.35s ease; }
.dir-item:hover .di-bar { width: 56px; }
.di-arrow {
  position: absolute; right: 6px; top: 50%;
  transform: translateY(-50%);
  font-size: 24px; color: var(--ink-3);
  transition: color 0.3s ease, transform 0.3s ease;
}
.dir-item:hover .di-arrow { color: var(--accent); transform: translateY(-50%) translateX(6px); }
@media (min-width: 860px) {
  .directory { padding: 104px 0 40px; }
  .dir-grid { grid-template-columns: repeat(3, 1fr); gap: 0 34px; }
  .dir-item {
    min-height: 258px;
    padding: 30px 36px 34px 8px;
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  .dir-item:last-child { border-right: none; }
  .dir-item:hover { padding-left: 16px; }
  .di-no {
    position: static;
    display: inline-block;
    font-size: 13px;
    color: var(--accent);
    margin-right: 14px;
    font-family: var(--font-mono);
  }
  .di-en { display: inline-block; }
  .di-title { font-size: clamp(32px, 3.2vw, 44px); margin: 18px 0 12px; }
  .di-bar { margin-top: auto; }
  .di-arrow {
    opacity: 1;
    right: 16px;
    transform: translateY(-50%);
    font-size: 24px;
  }
  .dir-item:hover .di-arrow { transform: translateY(-50%) translateX(6px); }
}

/* ---------- Reveal（克制，非每卡铺满） ---------- */
[data-reveal], .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-reveal].in, .reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- 首屏顺序入场（kicker → 标题 → 文案 → 按钮） ---------- */
.hero [data-reveal] { transition-delay: 0s; }
.hero .hero-kicker { transition-delay: 0.08s; }
.hero .hero-name { transition-delay: 0.2s; }
.hero .hero-line { transition-delay: 0.34s; }
.hero .hero-sub2 { transition-delay: 0.46s; }
.hero .hero-cta { transition-delay: 0.58s; }
.hero .hero-coord { transition-delay: 0.85s; }
.hero .hero-scroll { transition-delay: 0.95s; }

/* 导航轻微淡入 */
.nav { animation: navFadeIn 0.7s ease-out both; }
@keyframes navFadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal], .reveal { opacity: 1; transform: none; }
  .hero-bg { transform: none; animation: none; }
  .nav { animation: none; }
}

/* ========== PROJECTS — 编辑式大列表 ========== */
.plist { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.prow {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 34px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.35s ease, padding 0.35s ease;
  overflow: hidden;
}
.prow::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--bg-2);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 0;
}
.prow:hover::before { transform: scaleY(1); }
.prow > * { position: relative; z-index: 1; }
.prow-no { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.15em; }
.prow-cat { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.prow-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(28px, 6vw, 52px);
  line-height: 1.04; letter-spacing: -0.02em;
  margin-bottom: 12px;
  transition: color 0.3s ease, transform 0.35s ease;
}
.prow:hover .prow-title { color: var(--ink); transform: translateX(8px); }
.prow-desc { color: var(--ink-2); font-size: 14px; max-width: 580px; }
.prow-metrics { display: flex; flex-wrap: wrap; gap: 0; margin-top: 18px; }
.pmetric {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink-2); border: none; padding: 0; background: none;
}
.pmetric b { color: var(--accent-2); font-weight: 700; }
.pmetric + .pmetric::before { content: "·"; margin: 0 11px; color: var(--ink-3); }
.prow-arrow {
  position: absolute; right: 10px; top: 34px;
  font-size: 30px; color: var(--ink-3);
  transition: transform 0.35s ease, color 0.3s ease;
}
.prow:hover .prow-arrow { transform: translate(6px, -6px); color: var(--accent); }

/* ========== WORKS ========== */
.wgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.wcard {
  position: relative;
  display: block;
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.wcard:hover { border-color: var(--accent); }
.wmedia {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-3);
}
.wmedia img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.wcard:hover .wmedia img { transform: scale(1.05); }
.wmedia .wtype-tag {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em;
  color: #fff; background: rgba(11, 11, 12, 0.7);
  padding: 4px 9px; border-radius: 2px;
}
.wcap { padding: 12px 13px 14px; }
.wcap .w-title { font-weight: 600; font-size: 13.5px; line-height: 1.4; margin-bottom: 3px; }
.wcap .w-tag { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; }
.works-more { margin-top: 36px; text-align: center; }

/* ========== PROCESS ========== */
.ptrack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}
.pstep {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 16px;
  align-items: start;
  transition: padding-left 0.3s ease;
}
.pstep:hover { padding-left: 10px; }
.pstep .pno { font-family: var(--font-display); font-weight: 900; font-size: 30px; color: var(--accent); line-height: 1; }
.pstep .ptitle { font-family: var(--font-display); font-weight: 900; font-size: 19px; }
.pstep .pen { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-3); display: block; margin-top: 3px; }
.pstep .pdesc { grid-column: 2; color: var(--ink-2); font-size: 13.5px; margin-top: 6px; }

/* ========== CONTACT ========== */
.sec-contact { padding-bottom: 100px; }
.contact-stage { margin-bottom: 44px; }
.contact-big {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(40px, 7.5vw, 92px);
  line-height: 1.04; letter-spacing: -0.035em;
  color: var(--ink);
}
.contact-big .accent { color: var(--accent); }
.contact-main { color: var(--ink); font-size: 18px; font-weight: 600; margin-top: 28px; }
.contact-lead { color: var(--ink-2); font-size: 15px; max-width: 560px; margin-top: 10px; }
.contact-rows { border-top: 1px solid var(--line); margin-bottom: 40px; }
.contact-rows:empty { display: none; }
.contact-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 4px; border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, padding 0.3s ease;
}
.contact-row:hover { background: var(--bg-2); padding-left: 14px; }
.contact-row .cr-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.contact-row .cr-value { font-size: 17px; font-weight: 600; }
.contact-row .cr-arrow { color: var(--ink-3); font-size: 20px; transition: transform 0.3s ease, color 0.3s ease; }
.contact-row:hover .cr-arrow { color: var(--accent); transform: translateX(6px); }
.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ========== FOOTER ========== */
.footer { border-top: 1px solid var(--line); padding: 40px 0 34px; background: var(--bg); }
.footer-in { display: flex; flex-direction: column; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 900; font-size: 17px; }
.footer-brand .nl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; color: var(--ink-2); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-copy {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); letter-spacing: 0.05em;
  margin-top: 18px;
}
.footer-top { font-size: 13px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.footer-top:hover { color: var(--accent); }
/* 联系页专用收尾栏：低调一行，去除品牌/导航/感谢语，高度收敛 */
body.home .footer { padding: 18px 0 16px; border-top: 1px solid var(--line-soft); }
body.home .footer-in { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.footer-min-brand { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--ink-3); }

/* ========== GALLERY 页 ========== */
.pagehead {
  padding: calc(var(--nav-h) + 70px) 0 50px;
  border-bottom: 1px solid var(--line);
}
.pagehead .ph-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em; color: var(--accent); text-transform: uppercase; margin-bottom: 18px; }
.pagehead h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(42px, 11vw, 110px); line-height: 0.98; letter-spacing: -0.03em; margin-bottom: 18px; }
.pagehead p { color: var(--ink-2); max-width: 560px; font-size: 15px; }

.gallery-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 10px; }
.filter-btn {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 2px;
  padding: 9px 18px; transition: all 0.25s ease;
}
.filter-btn:hover { border-color: var(--accent); color: var(--ink); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.gallery-block { padding: 56px 0 8px; }
.gblock-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.gblock-head h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(28px, 6vw, 50px); letter-spacing: -0.02em; }
.gblock-head .gb-count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); letter-spacing: 0.1em; }
.gblock-desc { color: var(--ink-2); font-size: 14px; max-width: 560px; margin: 8px 0 26px; }

.masonry { columns: 2; column-gap: 12px; }
.masonry .wcard { break-inside: avoid; margin-bottom: 12px; }
.masonry .wmedia { aspect-ratio: auto; }
.masonry .wmedia img { height: auto; }

/* ========== DETAIL 页（编辑式双栏 · 2026-10 重构） ========== */
.detail-container { max-width: 1160px; }

.detail-hero {
  padding: calc(var(--nav-h) + 46px) 0 42px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 88% -12%, rgba(255,90,38,0.10), transparent 52%);
}
.dh-back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; color: var(--ink-2); margin-bottom: 22px; text-transform: uppercase; }
.dh-back i { font-style: normal; color: var(--ink-3); }
.dh-back:hover { color: var(--accent); }
.detail-hero .dh-cat { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.2em; color: var(--accent); text-transform: uppercase; margin-bottom: 24px; }
.dh-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 30px; }
.dh-main, .dh-aside { min-width: 0; }
.detail-hero h1 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(26px, 4.6vw, 42px);
  line-height: 1.16; letter-spacing: -0.02em;
  max-width: 15em;
  text-wrap: balance;
  margin-bottom: 24px;
}
.dh-oneliner { color: var(--ink-1); font-size: 15.5px; font-weight: 500; line-height: 1.6; margin-bottom: 26px; max-width: 42em; }
.dh-summary { color: var(--ink-2); font-size: 14.5px; line-height: 1.8; max-width: 60em; }

.dh-card { border: 1px solid var(--line); border-radius: 2px; background: var(--bg-2); padding: 20px 22px; }
.dh-overview { margin-bottom: 4px; }
.dh-overview > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.dh-overview dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; }
.dh-overview dd { font-size: 13.5px; color: var(--ink); text-align: right; }
.dh-card-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; margin: 18px 0 11px; }
.dh-flow { display: flex; flex-direction: column; gap: 8px; }
.dh-flow-item { display: flex; align-items: center; gap: 11px; font-size: 13px; color: var(--ink-2); }
.dh-flow-no { font-family: var(--font-mono); font-size: 11px; color: var(--accent); width: 20px; flex: 0 0 auto; }
.dh-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.dh-stack span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 2px; }

.dh-metrics { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 28px; }
.dh-metric { border: 1px solid var(--line); border-radius: 2px; padding: 15px 18px; background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent); }
.dh-metric b { display: block; font-family: var(--font-display); font-weight: 900; font-size: clamp(23px, 4vw, 30px); color: var(--accent-2); letter-spacing: -0.02em; line-height: 1.1; }
.dh-metric span { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; margin-top: 3px; }

.detail-body { padding: 44px 0 20px; }
.detail-layout { display: block; }
#detail-article { min-width: 0; }
.detail-aside { min-width: 0; }

.dsection { padding: 6px 0 28px; margin-bottom: 4px; scroll-margin-top: calc(var(--nav-h) + 18px); }
.dsection h2 { font-family: var(--font-display); font-weight: 900; font-size: clamp(23px, 4vw, 33px); letter-spacing: -0.02em; margin-bottom: 17px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.dsection h2 .d-no { font-family: var(--font-mono); font-size: 12.5px; font-weight: 400; color: var(--accent); letter-spacing: 0.1em; }
.dsection h2 .d-en { font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.14em; text-transform: uppercase; }
.dsection p { color: var(--ink-2); font-size: 14.5px; line-height: 1.85; margin-bottom: 14px; }
.dsection ul, .dsection ol { margin: 0 0 14px; padding-left: 20px; color: var(--ink-2); }
.dsection li { margin-bottom: 11px; font-size: 14px; line-height: 1.8; }
.dsection li::marker { color: var(--accent); }
.dsection li b.li-ht { color: var(--ink); font-weight: 700; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.detail-tags span { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); border: 1px solid var(--line); padding: 6px 13px; border-radius: 2px; }

/* 方法四阶段卡 */
.msteps { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 6px 0 16px; }
.mstep { border: 1px solid var(--line); border-radius: 2px; background: var(--bg-2); padding: 17px 20px; }
.mstep-h { display: flex; align-items: baseline; gap: 13px; margin-bottom: 9px; }
.mstep-no { font-family: var(--font-display); font-weight: 900; font-size: 22px; color: var(--accent); line-height: 1; }
.mstep-t { font-family: var(--font-display); font-weight: 900; font-size: 16px; color: var(--ink); }
.mstep-d { color: var(--ink-2); font-size: 13.5px; line-height: 1.78; margin-bottom: 12px; }
.mstep-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mstep-tags span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.03em; color: var(--accent-2); border: 1px solid rgba(255,138,92,0.32); padding: 3px 9px; border-radius: 2px; }

/* 结果区 */
.result-lead { font-size: 14.5px; color: var(--ink-2); line-height: 1.85; border-left: 2px solid var(--accent); padding-left: 15px; margin: 8px 0 24px; }
.charts { display: grid; grid-template-columns: 1fr; gap: 16px; }
.charts .visual { margin: 0; }
.chart-card { padding: 22px; }
.result-findings { margin-top: 26px; }
.result-findings-h { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }

/* 图表通用 SVG 文本 */
.chart-svg { width: 100%; height: auto; display: block; }
.chart-tick { fill: #94928b; font-size: 11px; font-family: var(--font-mono); }
.chart-tick.is-hot { fill: var(--accent); font-weight: 700; }
.chart-vlabel { fill: #8c8981; font-size: 10px; font-family: var(--font-mono); }
.chart-anno { fill: var(--accent); font-size: 12.5px; font-weight: 700; }
.chart-axis-label { fill: #5d5b55; font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.03em; }

/* SSE 数据表 */
.chart-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-family: var(--font-mono); font-size: 12px; }
.chart-table th { color: var(--ink-3); font-weight: 400; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.chart-table td { padding: 8px 10px; color: var(--ink-2); border-bottom: 1px solid var(--line-soft); }
.chart-table tr.is-k4 td { color: var(--accent); font-weight: 700; background: rgba(255,90,38,0.07); }

/* 漏斗 */
.funnel { display: flex; flex-direction: column; gap: 11px; padding: 10px 0; }
.fn-row { display: grid; grid-template-columns: 86px 1fr 138px; align-items: center; gap: 14px; }
.fn-label { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.03em; color: var(--ink-2); text-align: right; }
.fn-track { display: flex; justify-content: center; }
.fn-bar { display: flex; align-items: center; justify-content: center; height: 48px; min-width: 46px; border-radius: 2px; background: linear-gradient(180deg, #ff6f42, #ff5a26); box-shadow: 0 6px 20px rgba(255,90,38,0.12); transition: width .5s ease; }
.fn-bar .fn-name { color: #fff; font-weight: 700; font-size: 13.5px; }
.fn-row:nth-child(2) .fn-bar { background: linear-gradient(180deg, #d07756, #b8613f); box-shadow: none; }
.fn-row:nth-child(3) .fn-bar { background: linear-gradient(180deg, #b8755c, #9c5c45); box-shadow: none; }
.fn-row:nth-child(3) .fn-bar.is-flag { outline: 1px dashed rgba(255,210,176,0.7); outline-offset: 2px; }
.fn-row:nth-child(4) .fn-bar { background: linear-gradient(180deg, #ff5a26, #e0440f); }
.fn-val { font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: var(--ink); }
.fn-rate { display: block; font-style: normal; font-size: 10.5px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.02em; margin-top: 2px; }

/* 商品分析 */
.items-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.sql-block { background: #0e0e10; border: 1px solid var(--line); border-radius: 2px; padding: 15px 17px; overflow-x: auto; margin: 0; }
.sql-block code { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75; color: #e8c9b4; white-space: pre; }
.items-note-h { font-family: var(--font-display); font-weight: 900; font-size: 15px; color: var(--ink); margin-bottom: 9px; }
.items-note p { font-size: 13.5px; color: var(--ink-2); line-height: 1.78; margin-bottom: 8px; }
.items-note .items-muted { color: var(--ink-3); font-size: 12px; }

/* RFM 沙盘 */
.sandbox { padding: 4px 0; }
.sb-row { display: grid; grid-template-columns: 116px 1fr 52px; align-items: center; gap: 16px; margin-bottom: 18px; }
.sb-key { font-family: var(--font-display); font-weight: 900; font-size: 18px; color: var(--accent); line-height: 1; }
.sb-key i { display: block; font-style: normal; font-family: var(--font-mono); font-size: 10px; font-weight: 400; color: var(--ink-3); letter-spacing: 0.04em; margin-top: 4px; }
.sb-range { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; background: var(--bg-3); border-radius: 2px; outline: none; cursor: pointer; }
.sb-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); border: 2px solid #0b0b0c; box-shadow: 0 0 0 1px var(--accent); cursor: pointer; }
.sb-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 2px solid #0b0b0c; cursor: pointer; }
.sb-pct { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--ink); text-align: right; }
.sb-bar { display: flex; height: 42px; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; margin: 22px 0 16px; }
.sb-seg { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #0b0b0c; white-space: nowrap; overflow: hidden; transition: width .35s ease; }
.sb-seg[data-seg="r"] { background: var(--accent); }
.sb-seg[data-seg="f"] { background: var(--accent-2); }
.sb-seg[data-seg="m"] { background: var(--ink-3); color: #fff; }
.sb-diag { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 2px; background: var(--bg-3); margin-bottom: 13px; }
.sb-diag-tag { flex: 0 0 auto; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--accent); border: 1px solid var(--accent); padding: 3px 10px; border-radius: 2px; }
.sb-diag-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.sb-formula { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); margin-bottom: 7px; line-height: 1.6; }
.sb-note { font-size: 12px; color: var(--ink-3); line-height: 1.65; }

/* 舆情 · 情感规则词典 */
.lex-rule { font-size: 13px; color: var(--ink-2); line-height: 1.7; border: 1px solid var(--line); border-radius: 2px; background: var(--bg-3); padding: 12px 16px; margin-bottom: 14px; }
.lex-rule b { color: var(--accent-2); font-family: var(--font-mono); }
.lex-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lex-col { border: 1px solid var(--line); border-radius: 2px; padding: 15px 16px; }
.lex-pos { border-left: 3px solid var(--accent); }
.lex-neg { border-left: 3px solid #c75a4d; }
.lex-neu { border-left: 3px solid var(--ink-3); }
.lex-h { font-family: var(--font-display); font-weight: 900; font-size: 13.5px; margin-bottom: 11px; }
.lex-pos .lex-h { color: var(--accent-2); }
.lex-neg .lex-h { color: #e08a7e; }
.lex-neu .lex-h { color: var(--ink-2); }
.lex-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.lex-chip { font-size: 13px; padding: 4px 12px; border-radius: 2px; border: 1px solid var(--line); }
.lex-chip.pos { color: #ffb59a; border-color: rgba(255,138,92,0.35); background: rgba(255,90,38,0.08); }
.lex-chip.neg { color: #e8a89e; border-color: rgba(199,90,77,0.35); background: rgba(199,90,77,0.08); }
.lex-chip.neu { color: var(--ink-2); background: var(--bg-3); }

/* 舆情 · 长度分箱 */
.lb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.lb-col { border: 1px solid var(--line); border-radius: 2px; background: var(--bg-3); padding: 15px 17px; }
.lb-no { font-family: var(--font-mono); font-size: 11px; color: var(--accent); margin-bottom: 8px; }
.lb-range { font-family: var(--font-display); font-weight: 900; font-size: 17px; color: var(--ink); margin-bottom: 4px; }
.lb-tag { font-size: 12.5px; color: var(--ink-2); }

/* 舆情 · 存储 */
.store-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.store-col { border: 1px solid var(--line); border-radius: 2px; padding: 15px 17px; background: var(--bg-2); }
.store-h { font-family: var(--font-display); font-weight: 900; font-size: 14px; color: var(--accent-2); margin-bottom: 10px; }
.store-paths { font-family: var(--font-mono); font-size: 11px; line-height: 1.75; color: #e8c9b4; background: #0e0e10; border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px; margin-bottom: 10px; white-space: pre-wrap; word-break: break-all; }
.store-col p { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; margin: 0; }

/* pipeline 节点内标题 */
.pipe-node span b.pn-t { display: block; font-family: var(--font-body); font-weight: 700; font-size: 12.5px; letter-spacing: 0; color: var(--ink); margin-bottom: 2px; }
/* 七节点链路在主列内走纵向，更清晰 */
.pipeline.pipeline-v { flex-direction: column; }
.pipeline.pipeline-v .pipe-node { flex-direction: row; justify-content: flex-start; align-items: center; gap: 16px; padding: 13px 18px; text-align: left; }
.pipeline.pipeline-v .pipe-node::before { left: 0; top: 0; bottom: 0; right: auto; width: 2px; height: auto; transform: scaleY(0.3); transform-origin: top center; }
.pipeline.pipeline-v .pipe-node:hover::before { transform: scaleY(1); }
.pipeline.pipeline-v .pipe-link { flex: 0 0 20px; width: 20px; height: 20px; transform: rotate(90deg); }

/* 侧栏（吸顶目录 + 技术栈 + 指标） */
.dtoc-h { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dtoc a { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line-soft); transition: color .2s ease, padding-left .2s ease; }
.dtoc a:hover { color: var(--ink); padding-left: 5px; }
.dtoc a.active { color: var(--accent); }
.dtoc-no { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-3); }
.dtoc a.active .dtoc-no { color: var(--accent); }
.dtoc-side { margin-top: 28px; }
.dtoc-block { margin-bottom: 22px; }
.dtoc-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 11px; }
.dtoc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.dtoc-tags span { font-family: var(--font-mono); font-size: 10.5px; color: var(--ink-2); border: 1px solid var(--line); padding: 3px 8px; border-radius: 2px; }
.dtoc-metrics { display: flex; flex-direction: column; gap: 8px; }
.dtoc-metric { border: 1px solid var(--line); border-radius: 2px; padding: 10px 12px; }
.dtoc-metric b { display: block; font-family: var(--font-display); font-weight: 900; font-size: 16px; color: var(--accent-2); line-height: 1.1; }
.dtoc-metric span { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.05em; color: var(--ink-3); text-transform: uppercase; }

.dnav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 30px 0; border-top: 1px solid var(--line); }
.dnav a { border: 1px solid var(--line); padding: 22px 20px; border-radius: 2px; transition: border-color 0.3s, background 0.3s; }
.dnav a:hover { border-color: var(--accent); background: var(--bg-2); }
.dnav a.next { text-align: right; }
.dnav .dn-label { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; display: block; margin-bottom: 8px; }
.dnav .dn-title { font-family: var(--font-display); font-weight: 900; font-size: 17px; }

/* 详情视觉卡（暗色简洁） */
.visual { border: 1px solid var(--line); border-radius: 2px; padding: 22px; background: var(--bg-2); margin: 20px 0; }
.visual-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 18px; }
.visual svg { width: 100%; height: auto; }
.visual-caption { font-size: 12.5px; color: var(--ink-3); margin-top: 14px; line-height: 1.6; }

/* ---------- 可交互词云：黑神话口碑 ---------- */
.wc-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.wc-head .visual-title { margin-bottom: 0; }
.wc-filters { display: inline-flex; border: 1px solid var(--line); }
.wc-filter {
  appearance: none; background: transparent; border: 0; border-left: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; color: var(--ink-3);
  padding: 7px 14px; cursor: pointer; transition: background .2s ease, color .2s ease;
}
.wc-filter:first-child { border-left: 0; }
.wc-filter:hover { color: var(--ink-2); }
.wc-filter.active { background: var(--accent); color: #0a0a0a; }
.wordcloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 22px; padding: 36px 6px 28px; }
.wordcloud .w {
  appearance: none; background: transparent; border: 0; padding: 4px 5px;
  font-family: var(--font-display); font-weight: 900; line-height: 1.15; letter-spacing: -.02em;
  cursor: pointer; transform-origin: center;
  transition: opacity .25s ease, transform .25s ease, color .25s ease;
}
.wordcloud .w:hover { transform: scale(1.08); }
.wordcloud .w.is-on { transform: scale(1.18); }
.wc-info { display: flex; align-items: flex-start; gap: 11px; border-top: 1px solid var(--line); padding: 15px 2px 0; min-height: 48px; }
.wci-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); margin-top: 6px; flex: 0 0 auto; transition: background .2s ease; }
.wci-dot.dot-pos { background: var(--accent); }
.wci-dot.dot-neg { background: #ff4d4d; }
.wci-line { font-size: 13px; line-height: 1.65; color: var(--ink-2); }
@media (max-width: 680px) {
  .wordcloud { gap: 10px 14px; padding: 28px 2px 22px; }
  .wc-filter { padding: 6px 11px; }
  .wci-line { font-size: 12.5px; }
}
.flow-step { border: 1px solid var(--line); padding: 12px 14px; border-radius: 2px; background: var(--bg-3); }
.flow-step b { color: var(--accent-2); font-size: 13px; display: block; margin-bottom: 3px; }
.flow-step span { font-size: 12px; color: var(--ink-2); }

/* 数据处理链路 pipeline（横向流向，窄屏转纵向） */
.pipeline { display: flex; align-items: stretch; }
.pipe-node {
  flex: 1 1 0; min-width: 0; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 18px 8px 15px; text-align: center;
  border: 1px solid var(--line); border-radius: 2px; background: var(--bg-3);
  transition: border-color .25s ease, transform .25s ease, background .25s ease;
}
.pipe-node::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent); opacity: .5;
  transform: scaleX(.3); transform-origin: left center;
  transition: transform .35s ease, opacity .3s ease;
}
.pipe-node:hover { border-color: rgba(255, 90, 38, .45); transform: translateY(-2px); background: var(--bg-2); }
.pipe-node:hover::before { transform: scaleX(1); opacity: 1; }
.pipe-node b { font-family: var(--font-mono); font-weight: 600; font-size: 12px; letter-spacing: .1em; color: var(--accent); }
.pipe-node span { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.pipe-link { flex: 0 0 22px; width: 22px; align-self: center; }
.pipe-link svg { width: 100%; height: 12px; display: block; }
@media (max-width: 860px) {
  .pipeline { flex-direction: column; }
  .pipe-node { flex-direction: row; justify-content: flex-start; align-items: center; gap: 16px; padding: 14px 16px; text-align: left; }
  .pipe-node::before { left: 0; top: 0; bottom: 0; right: auto; width: 2px; height: auto; transform: scaleY(.3); transform-origin: top center; }
  .pipe-node:hover::before { transform: scaleY(1); }
  .pipe-link { flex: 0 0 20px; width: 20px; height: 20px; transform: rotate(90deg); }
}

/* ---------- 可交互环形图：K-Means 客群 ---------- */
.donut-grid { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 48px; align-items: center; padding: 10px 0 4px; }
.donut-stage { position: relative; width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 1 / 1; }
.donut-svg { width: 100%; height: 100%; display: block; }
.donut-track { stroke-linecap: round; }
.donut-seg { cursor: pointer; stroke-linecap: round; transition: stroke-width .25s ease, opacity .25s ease; }
.donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  pointer-events: none; padding: 0 18%;
}
.dc-num { font-family: var(--font-display); font-weight: 900; font-size: 44px; line-height: 1; letter-spacing: -1px; color: #f4f2ed; }
.dc-name { font-size: 13.5px; font-weight: 700; color: #f4f2ed; margin-top: 11px; letter-spacing: .02em; }
.dc-desc { font-size: 10.5px; line-height: 1.5; color: var(--ink-3); margin-top: 5px; letter-spacing: .02em; }
.donut-side { min-width: 0; }
.donut-legend { border-top: 1px solid var(--line); }
.dl-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0;
  padding: 15px 4px; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; font-family: inherit; text-align: left;
  cursor: pointer; transition: background .2s ease;
}
.dl-item:hover, .dl-item.active { background: rgba(255, 255, 255, .025); }
.dl-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; transition: transform .2s ease; }
.dl-item:hover .dl-dot, .dl-item.active .dl-dot { transform: scale(1.35); }
.dl-name { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s ease; }
.dl-item:hover .dl-name, .dl-item.active .dl-name { color: #fff; }
.dl-val { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: #6f6d68; letter-spacing: -.01em; transition: color .2s ease; }
.dl-item:hover .dl-val, .dl-item.active .dl-val { color: var(--accent); }
.donut-hint { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; margin-top: 12px; opacity: .65; }
@media (max-width: 680px) {
  .donut-grid { grid-template-columns: 1fr; gap: 26px; justify-items: center; }
  .donut-stage { max-width: 240px; }
  .donut-side { width: 100%; }
  .dc-num { font-size: 36px; }
  .dc-name { font-size: 12.5px; }
  .dc-desc { font-size: 10px; }
  .dl-item { padding: 13px 4px; }
}

/* ========== LIGHTBOX ========== */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(7, 7, 8, 0.96);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-inner { max-width: min(1000px, 92vw); max-height: 86vh; text-align: center; transform: scale(0.96); transition: transform 0.3s ease; }
.lightbox.open .lightbox-inner { transform: scale(1); }
.lightbox-inner img { max-width: 100%; max-height: 78vh; margin: 0 auto; border: 1px solid var(--line); }
.lightbox-caption { color: var(--ink-2); font-size: 14px; margin-top: 16px; }
.lightbox-close {
  position: absolute; top: 22px; right: 22px;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  color: var(--ink); font-size: 22px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

/* 灯箱图集导航（上一张/下一张、计数） */
.lightbox-inner { max-width: min(1200px, 94vw); }
.lightbox-inner img { max-height: 82vh; }
.lightbox-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-top: 14px; }
.lightbox-meta .lightbox-caption { margin-top: 0; text-align: left; flex: 1; }
.lightbox-count { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: var(--ink-3); white-space: nowrap; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06);
  color: var(--ink); font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 2;
}
.lightbox-nav:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
@media (max-width: 600px) {
  .lightbox-nav { width: 46px; height: 46px; font-size: 26px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}

/* ========== TOAST ========== */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 20px);
  background: var(--bg-3); color: var(--ink);
  border: 1px solid var(--accent);
  padding: 13px 24px; border-radius: 2px;
  font-size: 14px; z-index: 300;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   桌面（≥860px）：宽屏布局
   ============================================================ */
@media (min-width: 860px) {
  :root { --pad: 40px; }
  body { font-size: 16px; }
  .sec { padding: 100px 0; }
  /* 首页专用：桌面容器随视口加宽（上限 1500px），减少大屏两侧黑边；
     仅作用于 body.home，画廊/详情/空间实验室等页面保持原 1280 宽度 */
  body.home .wrap { max-width: min(1500px, calc(100vw - 160px)); }
  /* 首页导航全宽铺满屏幕：品牌贴最左、菜单组贴最右（其他页面导航保持 1280 居中） */
  body.home .nav-in { max-width: none; }
  /* 项目区顶部收紧：目录区（.directory）与项目区相邻，上下边距叠加易成大片黑空；
     仅调 .sec-projects 顶部，不动 .sec 全局与其他区块节奏 */
  .sec-projects { padding-top: 68px; }
  .nav-menu { display: flex; }
  .nav-toggle { display: none; }
  /* 桌面：品牌固定在左，五个菜单项作为一组靠右排列（nav-in 已 space-between），组内保持合适间距 */
  .nav-menu { gap: 16px; }
  .nav-link { padding: 8px 18px; }
  /* 大屏（≥1280）组内间距，小桌面自动降级避免溢出 */
  @media (min-width: 1280px) {
    .nav-menu { gap: 36px; }
    .nav-link { padding: 8px 20px; }
  }

  /* projects 列表行：编号 / 主体 / 箭头 */
  .prow {
    grid-template-columns: 70px 1fr 70px;
    align-items: start;
    gap: 24px;
    padding: 42px 16px;
  }
  .prow-no { padding-top: 8px; }
  .prow-arrow { position: static; align-self: center; justify-self: end; font-size: 36px; }
  .prow-metrics { margin-top: 22px; }

  /* works */
  .wgrid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .masonry { columns: 3; column-gap: 16px; }
  .masonry .wcard { margin-bottom: 16px; }

  /* process */
  .ptrack { grid-template-columns: repeat(3, 1fr); }
  .pstep { grid-template-columns: 1fr; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 32px 24px; }
  .pstep:nth-child(3n) { border-right: 0; }
  .pstep .pdesc { grid-column: 1; }

  /* footer */
  .footer-in { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-width: 859px) {
  .hero { align-items: flex-start; }
  .hero-inner { padding: calc(var(--nav-h) + 24px) var(--pad) 100px; }
  .hero-name { font-size: clamp(52px, 16vw, 88px); }
  .hero-vertical { display: none; }
  /* 按钮：纵向、按内容宽度、两按钮等高，不强行铺满 */
  .hero-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-cta .btn { width: auto; min-width: 172px; min-height: 50px; }
  .hero-cta .btn-line { border-color: rgba(255, 255, 255, 0.24); }
  .hero-coord { bottom: 26px; font-size: 10px; }
  .hero-scroll { display: none; }
  /* 手机背景：偏右偏下构图，保留夕阳与右侧圆环 */
  .hero-bg img { object-position: 60% 54%; }
  /* 手机遮罩：顶部暗部加深并延伸，保证标题/文案/按钮可读，下半窗景保留 */
  .hero-veil {
    background:
      linear-gradient(180deg, rgba(11,11,12,0.82) 0%, rgba(11,11,12,0.46) 38%, rgba(11,11,12,0.16) 60%, rgba(11,11,12,0) 76%),
      linear-gradient(0deg, rgba(11,11,12,0.58) 0%, rgba(11,11,12,0) 20%);
  }
  .prow-arrow { font-size: 24px; }
}

/* ========== DETAIL 详情页 · 桌面双栏（≥980） ========== */
@media (min-width: 980px) {
  .dh-grid { grid-template-columns: minmax(0,1fr) 320px; gap: 56px; align-items: start; }
  .dh-metrics { grid-template-columns: repeat(3, 1fr); }
  .detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 248px; gap: 64px; align-items: start; }
  .detail-aside { position: sticky; top: calc(var(--nav-h) + 22px); }
  .items-grid { grid-template-columns: 1.05fr .95fr; gap: 22px; }
  .lex-grid { grid-template-columns: repeat(3, 1fr); }
  .lb-grid { grid-template-columns: repeat(4, 1fr); }
  .store-grid { grid-template-columns: repeat(3, 1fr); }
  .fn-row { grid-template-columns: 100px 1fr 150px; }
  .chart-card { padding: 26px 28px; }
}

/* ========== DETAIL 详情页 · 窄屏单栏（<980） ========== */
@media (max-width: 979px) {
  .detail-container { width: 100%; max-width: 100%; overflow-x: hidden; }
  .detail-layout { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; max-width: 100%; }
  .detail-aside { order: -1; margin-bottom: 10px; max-width: 100%; }
  .dtoc { display: block; width: 100%; max-width: 100%; min-width: 0; padding-bottom: 12px; margin-bottom: 0; border-bottom: 1px solid var(--line); line-height: 2.5; }
  .dtoc-h { display: none; }
  .dtoc a { display: inline-flex; align-items: baseline; gap: 8px; width: auto; margin: 0 8px 6px 0; padding: 7px 12px; white-space: nowrap; border: 1px solid var(--line); border-bottom-color: var(--line); border-radius: 2px; }
  .dtoc a:hover { padding-left: 12px; }
  .dtoc a.active { border-color: var(--accent); }
  .dtoc-side { display: none; }
}

@media (max-width: 560px) {
  .sb-row { grid-template-columns: 1fr 52px; grid-template-areas: "key pct" "range range"; row-gap: 10px; margin-bottom: 16px; }
  .sb-key { grid-area: key; } .sb-pct { grid-area: pct; } .sb-range { grid-area: range; }
  .fn-row { grid-template-columns: 72px 1fr 102px; gap: 9px; }
  .lb-grid { grid-template-columns: 1fr; }
  .chart-table { font-size: 11px; }
  .chart-card, .charts .visual { padding: 18px 16px; }
}

/* ========== 空间实验室入口（首页大卡 + 画廊横幅） ========== */
.wcard-arch { grid-column: 1 / -1; }
.wcard-arch .wmedia { aspect-ratio: 21 / 9; }
.warch-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 44px;
  background: linear-gradient(90deg, rgba(10,10,11,.92) 0%, rgba(10,10,11,.62) 48%, rgba(10,10,11,.08) 100%);
}
.warch-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .24em; color: #A9B49D; margin-bottom: 14px; }
.warch-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 4.6vw, 48px); line-height: 1; color: #fff; }
.warch-sub { font-size: 14px; color: var(--ink-2); margin-top: 12px; max-width: 46em; }
.warch-cta {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; letter-spacing: .04em; color: #fff;
  border: 1px solid rgba(255,255,255,.4); border-radius: 2px;
  padding: 10px 20px; align-self: flex-start; transition: all .25s ease;
}
.wcard-arch:hover .warch-cta { background: #fff; color: #111; border-color: #fff; }
.wcard-arch:hover .warch-cta span { transform: translateX(4px); }
.warch-cta span { display: inline-block; transition: transform .25s ease; }

/* 画廊页顶部横幅 */
.arch-entry {
  position: relative; display: block; margin: 44px 0 6px;
  border: 1px solid var(--line-soft); border-radius: 2px; overflow: hidden;
  transition: border-color .3s ease;
}
.arch-entry:hover { border-color: var(--accent); }
.arch-entry img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .5; transition: transform .6s cubic-bezier(.22,1,.36,1), opacity .3s;
}
.arch-entry:hover img { transform: scale(1.05); opacity: .62; }
.ae-body {
  position: relative; min-height: 280px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 46px 48px;
  background: linear-gradient(90deg, rgba(10,10,11,.94) 0%, rgba(10,10,11,.6) 52%, rgba(10,10,11,.15) 100%);
}
.ae-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: .24em; color: #A9B49D; margin-bottom: 14px; }
.ae-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 5vw, 52px); line-height: 1; color: #fff; }
.ae-sub { font-size: 14px; color: var(--ink-2); margin-top: 12px; max-width: 44em; }
.ae-cta {
  margin-top: 22px; font-size: 13px; color: #fff; display: inline-flex; align-items: center; gap: 9px;
  border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 5px; align-self: flex-start;
}
.arch-entry:hover .ae-cta { color: #fff; border-bottom-color: #fff; }

@media (max-width: 720px) {
  .wcard-arch .wmedia { aspect-ratio: 4 / 3; }
  .warch-overlay { padding: 0 24px; background: linear-gradient(180deg, rgba(10,10,11,.15) 0%, rgba(10,10,11,.85) 100%); justify-content: flex-end; padding-bottom: 26px; }
  .warch-cta { margin-top: 16px; padding: 9px 16px; }
  .ae-body { min-height: 240px; padding: 32px 26px; }
}
