/* ============================================================
   作品集 · 制片档案 — portfolio page styles
   ============================================================ */

/* ---------- 作品集页顶栏为静态流式，切换器独立吸顶 ---------- */
.page-archive .topbar {
  position: static;
  background: transparent;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}

/* ---------- 顶部 ---------- */
.p-hero { padding: 96px 0 40px; }
.p-hero .kicker b { color: var(--verm-bright); }
.p-hero h1 {
  font-size: clamp(38px, 6.4vw, 78px); font-weight: 850;
  line-height: 1.1; letter-spacing: -.02em; margin: 10px 0 22px;
}
.p-hero h1 em { font-style: normal; color: var(--verm-bright); }
.p-hero .lead { color: var(--ink-dim); max-width: 680px; font-size: 17px; }
.sample-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  color: var(--amber); border: 1px dashed rgba(217, 164, 74, .45);
  border-radius: 999px; padding: 6px 14px; margin-bottom: 20px;
}

/* ---------- 指标口径 ---------- */
.metric-legend {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 44px;
}
.metric-legend div {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px;
}
.metric-legend b { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.metric-legend b i { font-style: normal; font-family: var(--font-mono); font-size: 10px; color: var(--ink-faint); letter-spacing: .1em; margin-left: 8px; }
.metric-legend p { font-size: 12.5px; color: var(--ink-faint); line-height: 1.55; }
@media (max-width: 900px) { .metric-legend { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .metric-legend { grid-template-columns: 1fr; } }

/* ---------- 吸顶切换器 ---------- */
.switcher-wrap {
  position: sticky; top: 0; z-index: 95;
  background: rgba(10, 11, 15, .82);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0 0;
}
.switcher { display: flex; align-items: center; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.switcher::-webkit-scrollbar { display: none; }
.switcher .label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em;
  color: var(--ink-faint); flex-shrink: 0; margin-right: 6px;
}
.switcher a {
  flex-shrink: 0; font-size: 13.5px; font-weight: 600; color: var(--ink-dim);
  padding: 9px 18px 11px; border-radius: 10px 10px 0 0;
  border: 1px solid transparent; border-bottom: 0;
  position: relative; transition: color .25s, background-color .25s;
  display: inline-flex; align-items: center; gap: 8px;
}
.switcher a .n {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em;
  color: var(--ink-faint); transition: color .25s;
}
.switcher a:hover { color: var(--ink); background: rgba(241, 238, 229, .04); }
.switcher a.active { color: var(--ink); background: var(--panel); border-color: var(--line); }
.switcher a.active .n { color: var(--verm-bright); }
.switcher a.active::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: linear-gradient(90deg, var(--verm), var(--amber));
  border-radius: 2px 2px 0 0;
}
.progress-bar { height: 2px; background: var(--line); margin-top: -1px; }
.progress-bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--verm), var(--amber));
}

/* ---------- 作品区块 ---------- */
.work { padding: clamp(80px, 10vh, 130px) 0; border-top: 1px solid var(--line); position: relative; }
.work:first-of-type { border-top: 0; }
.work-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 44px; }
.work-index {
  font-family: var(--font-mono); font-size: clamp(52px, 7vw, 96px);
  font-weight: 700; line-height: 1; letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1px rgba(241, 238, 229, .22);
}
.work-title h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; letter-spacing: -.01em; }
.work-title .sub { color: var(--ink-dim); font-size: 14.5px; margin-top: 8px; }
.work-title .sub i { font-style: normal; color: var(--ink-faint); margin: 0 8px; }
.platform-pills { display: flex; gap: 8px; }
.platform-pills span {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.platform-pills svg { width: 13px; height: 13px; }

/* ---------- 面板 ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px;
}
.panel > h3 {
  font-size: 15.5px; font-weight: 750; margin-bottom: 4px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.panel > h3 .en {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em;
  color: var(--ink-faint); font-weight: 500; text-transform: uppercase;
}
.panel .panel-note { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 18px; }

.work-grid-a { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; margin-bottom: 18px; }
.work-grid-b { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 980px) { .work-grid-a, .work-grid-b { grid-template-columns: 1fr; } }

/* ---------- 平台卡 ---------- */
.platform-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .platform-cards { grid-template-columns: 1fr; } }
.platform-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  background: var(--bg-raise);
  transition: transform .35s var(--ease-out), border-color .35s;
}
.platform-card:hover { transform: translateY(-4px); }
.platform-card.pc-dy:hover { border-color: rgba(255, 59, 92, .5); }
.platform-card.pc-bili:hover { border-color: rgba(61, 155, 255, .5); }
.platform-card.pc-xhs:hover { border-color: rgba(255, 122, 69, .5); }
.pc-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.pc-head svg { width: 15px; height: 15px; }
.pc-dy .pc-head svg { fill: var(--dy); } .pc-bili .pc-head svg { fill: var(--bili); } .pc-xhs .pc-head svg { fill: var(--xhs); }
.pc-views { font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.02em; margin: 10px 0 2px; font-variant-numeric: tabular-nums; }
.pc-views small { font-size: 12px; color: var(--ink-faint); font-weight: 500; margin-left: 2px; }
.pc-sub { font-size: 11.5px; color: var(--ink-faint); margin-bottom: 12px; }
.pc-rows { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--ink-dim); }
.pc-rows div { display: flex; justify-content: space-between; }
.pc-rows b { color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.pc-spark { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.pc-spark .cap { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em; color: var(--ink-faint); margin-bottom: 6px; }

/* ---------- 图表通用 ---------- */
.chart-box svg { width: 100%; height: auto; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-dim); }
.chart-legend i { width: 14px; height: 3px; border-radius: 2px; }

/* ---------- 无限画布占位 ---------- */
.canvas-shot { position: relative; overflow: hidden; }
.canvas-frame {
  position: relative; border: 1px solid var(--line-strong); border-radius: 10px;
  aspect-ratio: 16 / 8.6; overflow: hidden;
  background:
    linear-gradient(rgba(241, 238, 229, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 238, 229, .035) 1px, transparent 1px),
    radial-gradient(80% 100% at 70% 20%, rgba(232, 73, 47, .07), transparent 60%),
    var(--bg-raise);
  background-size: 28px 28px, 28px 28px, auto, auto;
}
.cnode {
  position: absolute; border: 1px solid var(--line-strong); border-radius: 7px;
  background: rgba(22, 25, 35, .92); padding: 7px 11px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: var(--ink-dim);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  animation: node-float 6s ease-in-out infinite;
}
.cnode b { color: var(--ink); font-weight: 600; display: block; font-size: 11px; font-family: var(--font-sans); letter-spacing: 0; }
.cnode.tint { border-color: rgba(232, 73, 47, .55); }
.cnode.tint b { color: var(--verm-bright); }
@keyframes node-float { 50% { transform: translateY(-6px); } }
.canvas-frame svg.links { position: absolute; inset: 0; width: 100%; height: 100%; }
.canvas-frame svg.links path { stroke: rgba(241, 238, 229, .18); stroke-dasharray: 4 4; fill: none; }
.canvas-caption {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 12px; font-size: 12px; color: var(--ink-faint);
}
.canvas-caption .mono { font-size: 10px; }

/* ---------- 生产漏斗 ---------- */
.funnel { display: flex; flex-direction: column; }
.funnel-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.funnel-row:last-child { border-bottom: 0; }
.funnel-row .fl { font-size: 13px; color: var(--ink-dim); }
.funnel-row .fl b { display: block; color: var(--ink); font-size: 13.5px; font-weight: 650; }
.funnel-bar { height: 22px; border-radius: 6px; position: relative; background: rgba(241, 238, 229, .04); overflow: hidden; }
.funnel-bar i {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, rgba(232, 73, 47, .75), rgba(217, 164, 74, .75));
  transition: width 1.2s var(--ease-out);
}
.funnel-bar i.plain { background: rgba(241, 238, 229, .28); }
.funnel-row.in .funnel-bar i { width: var(--w); }
.funnel-row .fv { text-align: right; min-width: 92px; }
.funnel-row .fv b { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; }
.funnel-row .fv small { display: block; font-size: 10.5px; color: var(--ink-faint); font-family: var(--font-mono); letter-spacing: .04em; }
.funnel-row .fv .waste { color: var(--verm-bright); }
.funnel-final { border: 1px solid rgba(232, 73, 47, .4); border-radius: 10px; padding: 12px 14px; margin-top: 12px; background: var(--verm-soft); display: flex; justify-content: space-between; align-items: center; }
.funnel-final b { font-size: 15px; font-weight: 750; }
.funnel-final span { font-family: var(--font-mono); font-size: 11px; color: var(--verm-bright); letter-spacing: .1em; }

/* ---------- KPI ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 980px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; position: relative; overflow: hidden;
  transition: border-color .3s, transform .3s var(--ease-out);
}
.kpi:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.kpi .k-label { font-size: 12px; color: var(--ink-faint); display: flex; justify-content: space-between; align-items: center; }
.kpi .k-label i { font-style: normal; font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em; }
.kpi .k-value { font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .k-value small { font-size: 12px; color: var(--ink-dim); font-weight: 550; margin-left: 2px; }
.kpi .k-sub { font-size: 11px; color: var(--ink-faint); margin-top: 4px; }
.kpi.hl { border-color: rgba(232, 73, 47, .45); background: linear-gradient(160deg, rgba(232, 73, 47, .1), var(--panel) 65%); }
.kpi.hl .k-value { color: var(--verm-bright); }
.model-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; font-size: 12.5px; color: var(--ink-faint); }
.model-row .chip {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 13px; background: var(--panel);
}
.model-row .chip i { font-style: normal; color: var(--amber); margin-right: 6px; }

/* ---------- 镜头台账 ---------- */
.ledger-wrap { overflow-x: auto; }
.ledger { min-width: 660px; font-size: 13px; }
.ledger th {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); font-weight: 500; text-align: left;
  padding: 10px 12px; border-bottom: 1px solid var(--line-strong);
}
.ledger td { padding: 11px 12px; border-bottom: 1px solid var(--line); color: var(--ink-dim); vertical-align: middle; }
.ledger tr { transition: background-color .2s; }
.ledger tbody tr:hover { background: rgba(241, 238, 229, .025); }
.ledger td.shot { font-family: var(--font-mono); color: var(--amber); font-size: 12px; white-space: nowrap; }
.ledger td.desc b { color: var(--ink); font-weight: 600; display: block; }
.ledger td.desc span { font-size: 11.5px; color: var(--ink-faint); }
.ledger td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.ledger th.num { text-align: right; }
.ledger td.cost { color: var(--ink); }
.status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 650; border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}
.status.ok { color: var(--green); background: var(--green-soft); }
.status.waste { color: var(--verm-bright); background: var(--verm-soft); }
.status.spare { color: var(--amber); background: rgba(217, 164, 74, .1); }
.ledger tfoot td { border-bottom: 0; padding-top: 14px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-faint); letter-spacing: .04em; }

/* ---------- 复盘 ---------- */
.review { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-raise), var(--bg) 40%); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 50px; }
@media (max-width: 980px) { .review-grid { grid-template-columns: 1fr; } }
.delta-band {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px;
}
@media (max-width: 900px) { .delta-band { grid-template-columns: repeat(2, 1fr); } }
.delta {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  background: var(--panel); position: relative; overflow: hidden;
}
.delta::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--verm), var(--amber));
}
.delta .d-label { font-size: 12.5px; color: var(--ink-dim); }
.delta .d-value {
  font-size: clamp(30px, 3.4vw, 44px); font-weight: 850; letter-spacing: -.02em;
  margin: 8px 0 2px; font-variant-numeric: tabular-nums;
  background: linear-gradient(100deg, var(--verm-bright), var(--amber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.delta .d-note { font-size: 12px; color: var(--ink-faint); }
.insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
@media (max-width: 900px) { .insights { grid-template-columns: 1fr; } }
.insight {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px;
  background: var(--panel);
  transition: transform .35s var(--ease-out), border-color .35s;
}
.insight:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.insight .n { font-family: var(--font-mono); font-size: 11px; color: var(--verm-bright); letter-spacing: .18em; }
.insight h3 { font-size: 17px; font-weight: 750; margin: 12px 0 8px; }
.insight p { font-size: 13.5px; color: var(--ink-dim); }
.insight p b { color: var(--ink); }
.review-quote {
  margin-top: 60px; text-align: center; padding: 50px 24px;
  border-block: 1px solid var(--line);
}
.review-quote p {
  font-size: clamp(20px, 2.6vw, 30px); font-weight: 750; line-height: 1.5;
  max-width: 720px; margin: 0 auto;
}
.review-quote p em { font-style: normal; color: var(--verm-bright); }
.review-quote .mono { margin-top: 18px; display: block; }

.p-footer-cta { text-align: center; padding: 70px 0 90px; }
.p-footer-cta h2 { font-size: clamp(26px, 4vw, 44px); font-weight: 800; margin-bottom: 26px; }

/* ---------- 图表入场动画 ---------- */
.spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .spark-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease-out) .2s; }
.draw-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.in .draw-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s var(--ease-out) .2s; }
.dot { opacity: 0; }
.in .dot { opacity: 1; transition: opacity .4s; }
.area { opacity: 0; }
.in .area { opacity: 1; transition: opacity 1.2s ease 1s; }
.bar-g { transform: scaleY(0); transform-box: fill-box; transform-origin: bottom; }
.in .bar-g { transform: scaleY(1); transition: transform 1s var(--ease-out); }

/* ---------- 锚点偏移（吸顶高度补偿） ---------- */
.work, #review { scroll-margin-top: 66px; }

@media (prefers-reduced-motion: reduce) {
  .spark-line, .draw-line { stroke-dashoffset: 0; }
  .dot, .area { opacity: 1; }
  .bar-g { transform: none; }
  .cnode { animation: none; }
}
