/* ══════════════════════════════════════════════════════════
   产品视觉组件 —— 用「产品自己的样子」当图片
   ══════════════════════════════════════════════════════════

   为什么不用图库照片:
   统计工具的客户想知道的是「看板长什么样、我能看到什么数据」。
   一张办公室握手照回答不了这个问题,只会让页面更像模板站。
   所以这里的每一个「图」都是用 HTML + SVG 拼出来的产品界面 ——
   矢量、零外部请求、跟着主题变色、还能动。

   为什么不用真实截图:
   截图会随着产品迭代过期,而且在高分屏上糊、暗色模式下不对、
   移动端裁剪困难。拼出来的组件永远和当前设计系统一致。
*/

/* ══════════ 浏览器外框 ══════════ */
/* 给任何内容套一个浏览器窗口的壳,让人一眼认出「这是产品界面」 */
.mock-win {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 1px 2px rgba(16, 20, 28, .04),
    0 12px 28px -10px rgba(16, 20, 28, .16),
    0 40px 80px -30px rgba(16, 20, 28, .18);
}

.mock-win-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.mock-win-bar i {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}
.mock-win-bar i:nth-child(1) { background: #ff5f57; }
.mock-win-bar i:nth-child(2) { background: #febc2e; }
.mock-win-bar i:nth-child(3) { background: #28c840; }

.mock-win-url {
  margin-left: 8px;
  flex: 1;
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════ 看板缩略界面 ══════════ */
.mock-dash { display: grid; grid-template-columns: 116px minmax(0, 1fr); min-height: 300px; }

.mock-side {
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  padding: 12px 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.mock-side .mock-side-t {
  font-size: 9px; color: var(--text-3);
  letter-spacing: .08em; text-transform: uppercase;
  padding: 0 6px 6px;
}
.mock-side a {
  font-size: 11px; color: var(--text-2);
  padding: 6px 8px; border-radius: 6px;
  display: flex; justify-content: space-between; align-items: center;
  text-decoration: none;
}
.mock-side a.on { background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(16,20,28,.06); }
.mock-side a span { font-size: 10px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.mock-main { padding: 14px; display: flex; flex-direction: column; gap: 12px; }

.mock-head { display: flex; align-items: center; justify-content: space-between; }
.mock-head b { font-size: 14px; }
.mock-tabs { display: flex; gap: 4px; }
.mock-tabs span {
  font-size: 10px; color: var(--text-3);
  padding: 3px 8px; border-radius: 5px; border: 1px solid transparent;
}
.mock-tabs span.on { background: var(--surface-2); border-color: var(--line); color: var(--text); }

/* 指标卡:刻意不等宽 —— 主指标占更大视觉权重 */
.mock-kpis { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.mock-kpi {
  border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; background: var(--surface);
}
.mock-kpi small { font-size: 9px; color: var(--text-3); display: block; }
.mock-kpi b {
  font-size: 17px; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; display: block; margin-top: 1px;
}
.mock-kpi .d { font-size: 9px; font-weight: 600; }
.mock-kpi .d.up { color: var(--up); }
.mock-kpi .d.down { color: var(--down); }

.mock-panel {
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); padding: 10px;
}
.mock-panel-t {
  font-size: 10px; color: var(--text-3);
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 6px;
}

/* 在线指示灯 —— 这是「实时」最直观的表达 */
.mock-live { display: inline-flex; align-items: center; gap: 5px; color: var(--up); font-weight: 600; }
.mock-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: mock-pulse 2s ease-out infinite;
}
@keyframes mock-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in oklab, currentColor 55%, transparent); }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.mock-cols { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }

/* 条形排行 */
.mock-bars { display: flex; flex-direction: column; gap: 5px; }
.mock-bar { display: grid; grid-template-columns: 46px minmax(0,1fr) 26px; gap: 6px; align-items: center;
  font-size: 9px; color: var(--text-2); }
.mock-bar .t { background: var(--surface-3); border-radius: 3px; height: 6px; overflow: hidden; }
.mock-bar .t i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklab, var(--accent) 55%, #7aa8ff));
  width: 0; transition: width 1.1s cubic-bezier(.16,1,.3,1);
}
.mock-bar .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-3); }

/* ══════════ 折线图 ══════════ */
.mock-chart { display: block; width: 100%; height: auto; }
.mock-chart .grid-l { stroke: var(--line); stroke-width: 1; }
.mock-chart .area { fill: url(#mockGrad); opacity: 0; transition: opacity .8s ease .5s; }
.mock-chart .line {
  fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  /* 靠 dashoffset 做「一笔画出来」,只动 stroke-dashoffset,不触发重排 */
  stroke-dasharray: var(--len, 1000);
  stroke-dashoffset: var(--len, 1000);
}
.mock-chart .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; opacity: 0; }

.in-view .mock-chart .line { transition: stroke-dashoffset 1.6s cubic-bezier(.16,1,.3,1); stroke-dashoffset: 0; }
.in-view .mock-chart .area { opacity: 1; }
.in-view .mock-chart .dot { opacity: 1; transition: opacity .4s ease 1.4s; }
.in-view .mock-bar .t i { width: var(--w, 50%); }

/* ══════════ 地图光点 ══════════ */
.mock-map { position: relative; }
.mock-map svg { display: block; width: 100%; height: auto; }
.mock-map .land { fill: var(--surface-3); }
.mock-map .ping { fill: var(--accent); opacity: .9; }
.mock-map .ping-ring {
  fill: none; stroke: var(--accent); stroke-width: 1.5;
  transform-box: fill-box; transform-origin: center;
  animation: mock-ping 2.6s ease-out infinite;
}
@keyframes mock-ping {
  0%   { r: 2;  opacity: .8; }
  100% { r: 13; opacity: 0; }
}

/* ══════════ 错误列表(啄木鸟) ══════════ */
.mock-issues { display: flex; flex-direction: column; }
.mock-issue {
  display: grid; grid-template-columns: minmax(0, 1fr) 54px 40px;
  gap: 8px; align-items: center;
  padding: 9px 4px; border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.mock-issue:last-child { border-bottom: 0; }
.mock-issue > div { min-width: 0; }   /* 让里面的省略号真的生效 */
.mock-issue .ttl { font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-issue .loc {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px; color: var(--text-3); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock-issue .tag {
  font-size: 9px; padding: 2px 6px; border-radius: 4px;
  background: var(--surface-3); color: var(--text-2); text-align: center;
}
.mock-issue .tag.fatal { background: color-mix(in oklab, var(--down) 12%, transparent); color: var(--down); }
.mock-issue .n { text-align: right; font-variant-numeric: tabular-nums;
  font-weight: 600; color: var(--text-2); font-size: 11px; }

/* ══════════ 会话录制播放器 ══════════ */
.mock-player { background: var(--surface-2); border-radius: 8px; padding: 10px; }
.mock-stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  height: 118px; position: relative; overflow: hidden;
}
.mock-stage .row { position: absolute; background: var(--surface-3); border-radius: 3px; }
.mock-cursor {
  position: absolute; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); opacity: .85;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 22%, transparent);
  animation: mock-move 7s ease-in-out infinite;
}
@keyframes mock-move {
  0%   { left: 18%; top: 22%; }
  25%  { left: 62%; top: 34%; }
  45%  { left: 40%; top: 62%; }
  70%  { left: 74%; top: 70%; }
  100% { left: 18%; top: 22%; }
}
.mock-track { margin-top: 8px; height: 4px; background: var(--surface-3); border-radius: 2px; overflow: hidden; }
.mock-track i {
  display: block; height: 100%; width: 40%;
  background: var(--accent); border-radius: 2px;
  animation: mock-seek 7s linear infinite;
}
@keyframes mock-seek { from { width: 4%; } to { width: 100%; } }

/* ══════════ 手机外框(小程序 / App) ══════════ */
.mock-phone {
  width: 168px; border-radius: 22px; padding: 8px;
  background: var(--text); box-shadow: 0 18px 40px -16px rgba(16,20,28,.5);
}
.mock-phone-scr {
  background: var(--surface); border-radius: 15px; overflow: hidden;
  padding: 10px; min-height: 250px;
}
.mock-notch {
  width: 46px; height: 4px; border-radius: 3px;
  background: color-mix(in oklab, var(--surface-3) 70%, transparent);
  margin: 0 auto 8px;
}

/* ══════════ 首屏两栏 ══════════ */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}
@media (min-width: 1000px) {
  .hero-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); gap: 56px; }

  /* 标题从「按视口宽」改成「按栏宽」。
     单栏时 54px 刚好一行,挪进两栏后栏宽只剩一半,同样的字号会折成三行,
     最后一行孤零零一个「台」字 —— vw 单位量的是视口,不是这一栏。 */
  .hero-split h1 { font-size: clamp(30px, 3.5vw, 46px); }
  .hero-split .hero-copy p { max-width: 42ch; }
  /* 轻微透视 —— 让产品图有「立在桌面上」的体积感,而不是贴在页面上的平面 */
  .hero-visual {
    perspective: 1600px;
  }
  .hero-visual .mock-win {
    transform: rotateY(-7deg) rotateX(2.5deg) translateZ(0);
    transition: transform .7s cubic-bezier(.16,1,.3,1);
  }
  .hero-visual:hover .mock-win { transform: rotateY(-2deg) rotateX(1deg); }
}

/* 浮在产品图边上的小卡片 —— 制造层次,不然还是一块平板 */
.float-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  box-shadow: 0 10px 26px -10px rgba(16,20,28,.24);
  font-size: 11px;
  display: flex; align-items: center; gap: 8px;
  animation: mock-float 6s ease-in-out infinite;
}
.float-card b { font-size: 14px; font-variant-numeric: tabular-nums; }
.float-card small { color: var(--text-3); font-size: 9px; display: block; }
@keyframes mock-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
.hero-visual { position: relative; }
.float-card.fc-1 { left: -14px;  bottom: 16%; animation-delay: -1s; }
.float-card.fc-2 { right: -10px; top: 10%; animation-delay: -3.4s; }
@media (max-width: 760px) { .float-card { display: none; } }

/* ══════════ 图文交错区块 ══════════ */
/* 打破「一排三张等宽卡」的模板感:图与文左右交替 */
/* minmax(0, 1fr) 不能省。grid 项默认 min-width:auto —— 它拒绝缩到
   自身内容的最小宽度以下,于是长文本会把整条轨道顶宽,在窄屏上撑出横向滚动条。
   1fr 单独用挡不住这件事,必须显式给下界 0。 */
.showcase { display: grid; gap: 28px; align-items: center;
  grid-template-columns: minmax(0, 1fr); }
.showcase > * { min-width: 0; }
@media (min-width: 900px) {
  .showcase { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .showcase.flip .showcase-text { order: 2; }
}
.showcase + .showcase { margin-top: clamp(56px, 7vw, 104px); }
.showcase-text h3 {
  font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem);
  letter-spacing: -.02em; margin: 10px 0 12px;
}
.showcase-text > p { color: var(--text-2); line-height: 1.75; }
.showcase-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  color: var(--accent); text-transform: uppercase;
}
.showcase-list { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.showcase-list li {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: 14px; color: var(--text-2); line-height: 1.6;
}
/* 对勾用 SVG mask 画,不用横杠拼 ——
   两条线拼出来的「-」在小尺寸下读着像折叠/减号按钮,语义正好相反 */
.showcase-list li::before {
  content: '';
  flex: none; width: 17px; height: 17px; margin-top: 2px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--accent) 13%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6.4' fill='none' stroke='%231f6feb' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
}

/* 有人把动效关掉了就别动 —— 这不是可选项 */
@media (prefers-reduced-motion: reduce) {
  .mock-live::before, .mock-map .ping-ring,
  .mock-cursor, .mock-track i, .float-card { animation: none !important; }
  .mock-chart .line { stroke-dashoffset: 0 !important; }
  .mock-chart .area, .mock-chart .dot { opacity: 1 !important; }
  .hero-visual .mock-win { transform: none !important; }
}

/* ══════════ 登录 / 注册:左产品右表单 ══════════ */
/* 原来是一张孤零零居中的卡片。注册页是转化的最后一步,
   在这里再说一次「你将得到什么」比留一片空白有用。 */
.auth-split { display: grid; gap: 40px; align-items: center;
  grid-template-columns: minmax(0, 1fr); }
.auth-split > * { min-width: 0; }
@media (min-width: 940px) {
  .auth-split { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 64px; }
}
.auth-pitch h2 {
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
  letter-spacing: -.02em; margin: 0 0 10px;
}
.auth-pitch > p { color: var(--text-2); line-height: 1.7; margin: 0 0 22px; }
.auth-pitch .showcase-list { margin-top: 20px; }
@media (max-width: 939px) { .auth-pitch .mock-win { display: none; } }

/* ══════════ 文档 / 定价页里的小尺寸产品图 ══════════ */
.visual-inline {
  margin: 28px 0;
  max-width: 560px;
}
.visual-caption {
  margin-top: 10px; font-size: 12.5px; color: var(--text-3); text-align: center;
}
