/* ===== 智审云平台 · 首页专属样式 ===== */
/* 仅包含首页特有的类，通用组件已在 design-system.css 中定义 */

/* ===== 英雄区（商业化改版 2026-09 · 二稿去油）=====
 * 设计语言：蓝图网格纹理面板，无光效扫掠、无辉光、无 canvas。
 * 亮色 = 浅蓝图纸纸面（融入浅色页面的同族蓝，主色锚点交给眉标与侧边栏）；
 * 暗色 = 沉稳墨色面板（原版）。
 * 动效只有一种：级进入场（eyebrow→标题→副标→信息面板，fadeUp 错峰 70ms），
 * 响应 prefers-reduced-motion 直接呈现终态 */
.ws-hero {
  background: linear-gradient(180deg, #EDF2FC 0%, #E2EAF8 100%);
  border: 1px solid #C9D6ED;
  border-radius: 14px;
  padding: 24px 28px;
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: 0 1px 2px rgba(23, 33, 58, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  animation: fadeUp .5s var(--ease-out, cubic-bezier(.16,1,.3,1)) both;
}
/* 蓝图网格：左上密、向右下淡出（遮罩渐隐，不抢内容）——亮色用藏青细线 */
.ws-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(29,78,216,.06) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(29,78,216,.06) 0 1px, transparent 1px 30px);
  -webkit-mask: radial-gradient(900px 380px at 10% 0%, #000 0%, transparent 74%);
  mask: radial-gradient(900px 380px at 10% 0%, #000 0%, transparent 74%);
  pointer-events: none;
}
/* 品牌眉标：小 logo + 平台名，商业版式的信任锚点 */
.ws-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  font-size: 12px; font-weight: 600; letter-spacing: 1.5px;
  color: var(--primary);
  animation: fadeUp .55s cubic-bezier(.16,1,.3,1) both;
}
.ws-hero__eyebrow-mark { width: 15px; height: 15px; display: block; opacity: .9; }
.ws-hero__left { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ws-hero__title {
  font-size: 24px; font-weight: 700; margin-bottom: 8px; letter-spacing: .3px;
  color: var(--text-primary);
  animation: fadeUp .55s cubic-bezier(.16,1,.3,1) .07s both;
}
.ws-hero__sub {
  font-size: 13px; color: var(--text-secondary); max-width: 480px; line-height: 1.65;
  animation: fadeUp .55s cubic-bezier(.16,1,.3,1) .14s both;
}
/* 项目信息面板：亮色下白底浮层 + 细边框，与纸面形成一层浅浅的层级 */
.ws-hero__right {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(201, 214, 237, 0.9);
  border-radius: 10px;
  padding: 13px 18px;
  position: relative; z-index: 1;
  flex-shrink: 0;
  animation: fadeUp .55s cubic-bezier(.16,1,.3,1) .21s both;
}
.ws-hero__proj-item { display: flex; align-items: baseline; gap: 7px; }
.ws-hero__proj-label { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.ws-hero__proj-value { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.ws-hero__proj-value--mono { font-family: var(--font-mono); letter-spacing: .3px; }
.ws-hero__edit {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--primary);
  text-decoration: none; padding: 4px 10px;
  border-radius: 6px; border: 1px solid rgba(29, 78, 216, 0.32);
  transition: background .18s, border-color .18s, color .18s; white-space: nowrap;
}
.ws-hero__edit:hover { background: rgba(29, 78, 216, 0.08); border-color: rgba(29, 78, 216, 0.55); color: #1A3FAE; }
.ws-hero__edit svg { width: 12px; height: 12px; }

/* ---- 暗色主题：沉稳墨色面板（原版式样） ---- */
[data-theme="dark"] .ws-hero {
  background: linear-gradient(180deg, #121B30 0%, #0E1526 100%);
  border-color: rgba(148, 163, 184, 0.16);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
[data-theme="dark"] .ws-hero::before {
  background:
    repeating-linear-gradient(0deg, rgba(148,163,184,.055) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(148,163,184,.055) 0 1px, transparent 1px 30px);
}
[data-theme="dark"] .ws-hero__eyebrow { color: rgba(203, 213, 225, 0.78); font-weight: 500; }
[data-theme="dark"] .ws-hero__title { color: #fff; }
[data-theme="dark"] .ws-hero__sub { color: rgba(203, 213, 225, 0.72); }
[data-theme="dark"] .ws-hero__right {
  background: rgba(11, 17, 32, 0.42);
  border-color: rgba(148, 163, 184, 0.14);
}
[data-theme="dark"] .ws-hero__proj-label { color: rgba(203, 213, 225, 0.55); }
[data-theme="dark"] .ws-hero__proj-value { color: #fff; }
[data-theme="dark"] .ws-hero__edit {
  color: rgba(226, 232, 240, 0.85);
  border-color: rgba(148, 163, 184, 0.25);
}
[data-theme="dark"] .ws-hero__edit:hover { background: rgba(148, 163, 184, 0.14); border-color: rgba(148, 163, 184, 0.4); color: #fff; }

/* 级进入场的减弱动效兜底 */
@media (prefers-reduced-motion: reduce) {
  .ws-hero__eyebrow, .ws-hero__title, .ws-hero__sub, .ws-hero__right { animation: none; }
}

/* 快捷导航条 */
.ws-quick-nav {
  display: flex; gap: 0; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
  margin-bottom: 16px;
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1) .15s both;
}
.ws-quick-nav__item {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 10px; text-decoration: none;
  border-right: 1px solid var(--border); transition: all .18s;
}
.ws-quick-nav__item:last-child { border-right: none; }
.ws-quick-nav__item svg {
  width: 16px; height: 16px; color: var(--primary); flex-shrink: 0;
  transition: transform .25s var(--ease-out);
}
.ws-quick-nav__label {
  font-size: 12px; font-weight: 500; color: var(--text-primary); white-space: nowrap;
  transition: color .18s;
}
/* 悬停：主色渲染底 + 图标轻弹，与功能卡区同一动感语言 */
.ws-quick-nav__item:hover { background: var(--primary-soft); }
.ws-quick-nav__item:hover svg { transform: translateY(-1px) scale(1.15); }
.ws-quick-nav__item:hover .ws-quick-nav__label { color: var(--primary); }

/* 数据源状态药丸 */
.ws-src-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.ws-src-pill {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer; transition: all .2s;
  min-width: 180px; flex: 1;
}
.ws-src-pill:hover { border-color: var(--primary); background: var(--bg); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.08); }
.ws-src-pill__icon {
  width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ws-src-pill__icon svg { width: 16px; height: 16px; }
.ws-src-pill__icon--imported { background: #ecfdf5; color: #059669; }
.ws-src-pill__icon--pending { background: var(--bg); color: #94a3b8; }
.ws-src-pill__info { flex: 1; min-width: 0; }
.ws-src-pill__name { font-size: 13px; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-src-pill__meta { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 1px; }
.ws-src-pill__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ws-src-pill__dot--ok { background: #10b981; box-shadow: 0 0 6px rgba(16,185,129,.4); }
.ws-src-pill__dot--wait { background: #cbd5e1; }

/* 系统状态条 */
.ws-sys-bar {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  padding: 14px 22px;
  background: var(--surface); border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15,23,42,.04);
  margin-bottom: 20px;
  animation: fadeUp .5s cubic-bezier(.16,1,.3,1) .30s both;
}
.ws-sys-bar__title {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  margin-right: 4px; white-space: nowrap;
}
.ws-sys-bar__item { display: flex; align-items: center; gap: 6px; }
.ws-sys-bar__dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ws-sys-bar__dot--ok { background: #10b981; box-shadow: 0 0 5px rgba(16,185,129,.35); }
.ws-sys-bar__dot--warn { background: #f59e0b; box-shadow: 0 0 5px rgba(245,158,11,.35); }
.ws-sys-bar__dot--info { background: #3b82f6; box-shadow: 0 0 5px rgba(59,130,246,.35); }
.ws-sys-bar__label { font-size: 12px; color: var(--text-muted); }
.ws-sys-bar__val { font-size: 12px; font-weight: 600; color: var(--text-primary); font-family: var(--font-mono); }
.ws-sys-bar__sep { width: 1px; height: 16px; background: var(--border); }

/* 动画 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeUp .45s cubic-bezier(.16,1,.3,1) both; }
tbody tr.row-enter { animation: rowIn .3s ease both; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: translateX(0); } }

/* 动效1: 数据源状态脉冲扩散 */
@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 currentColor; opacity: 1; }
  70% { box-shadow: 0 0 0 10px transparent; opacity: 0.7; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}
.ws-src-pill__dot--pulse {
  animation: statusPulse 1s ease-out;
}

/* 动效2: 热力图月份渐显 */
@keyframes hmCellIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}
.hm-cell { animation: hmCellIn 0.3s ease both; }

/* 动效3: （已移除表格扫描线——去AI化，数据进场用行级 stagger 即可） */

/* 动效4: 页面过渡 */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.page-enter { animation: pageEnter 0.4s cubic-bezier(.16,1,.3,1) both; }

/* 动效5: 滚动渐入（Scroll Reveal）——app.js initScrollReveal 全站自动接管 */
.scroll-reveal {
  opacity: 0;
  transform: translateY(var(--reveal-shift, 14px));
  transition: opacity .55s var(--ease-out, cubic-bezier(.16,1,.3,1)), transform .55s var(--ease-out, cubic-bezier(.16,1,.3,1));
}
.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .scroll-reveal { opacity: 1; transform: none; transition: none; }
}
/* 滚动渐入延迟（交错效果） */
.scroll-reveal[data-delay="1"] { transition-delay: 0.1s; }
.scroll-reveal[data-delay="2"] { transition-delay: 0.2s; }
.scroll-reveal[data-delay="3"] { transition-delay: 0.3s; }
.scroll-reveal[data-delay="4"] { transition-delay: 0.4s; }

/* ===== 分析工具 · 商业化功能卡区 =====
 * 版式：Bento 式左对齐卡片，每卡专属强调色（accent 变量驱动 描边/光晕/聚光灯/标题色）
 * 动效：级进入场（fade+scale 错峰）；悬停 抬升 + 顶缘光线展开 + 聚光灯跟随鼠标 + CTA 箭头浮入
 * 兜底：无悬停设备卡面即完整信息；prefers-reduced-motion 关闭全部动效 */
.ws-tools-grid {
  /* auto-fit：卡片数不足时收缩空轨道铺满整行（auto-fill 会留白轨道） */
  display: grid; grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
  gap: 14px;
}
.ws-tool-card {
  --accent: #2563EB;
  --accent-soft: rgba(37, 99, 235, 0.10);
  --accent-border: rgba(37, 99, 235, 0.42);
  --accent-glow: rgba(37, 99, 235, 0.16);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 18px 18px 16px; border-radius: 14px; text-decoration: none;
  border: 1px solid var(--border); background: var(--surface);
  cursor: pointer;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .25s;
  /* backwards：仅填充入场等待期；若用 both，最终关键帧会永久覆盖 :hover 的 transform */
  animation: toolCardIn .6s var(--ease-out) backwards;
}
.ws-tool-card:nth-child(1) { animation-delay: .05s; }
.ws-tool-card:nth-child(2) { animation-delay: .12s; }
.ws-tool-card:nth-child(3) { animation-delay: .19s; }
.ws-tool-card:nth-child(4) { animation-delay: .26s; }
.ws-tool-card:nth-child(n+5) { animation-delay: .33s; }
@keyframes toolCardIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* 每卡专属强调色 */
.ws-tool-card--dashboard { --accent: #2563EB; --accent-soft: rgba(37,99,235,.10); --accent-border: rgba(37,99,235,.45); --accent-glow: rgba(37,99,235,.18); }
.ws-tool-card--aging { --accent: #7C3AED; --accent-soft: rgba(124,58,237,.10); --accent-border: rgba(124,58,237,.45); --accent-glow: rgba(124,58,237,.18); }
.ws-tool-card--analytical { --accent: #0891B2; --accent-soft: rgba(8,145,178,.10); --accent-border: rgba(8,145,178,.45); --accent-glow: rgba(8,145,178,.18); }
.ws-tool-card--semantic { --accent: #D97706; --accent-soft: rgba(217,119,6,.10); --accent-border: rgba(217,119,6,.48); --accent-glow: rgba(217,119,6,.20); }

/* 悬停：抬升 + 强调色描边 + 品牌色光晕投影 */
.ws-tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 14px 30px -10px var(--accent-glow), 0 2px 8px rgba(15, 23, 42, .06);
}
/* 顶缘光线：hover 时从中心向两侧展开 */
.ws-tool-card::before {
  content: ''; position: absolute; top: 0; left: 16%; right: 16%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 0 0 3px 3px;
  opacity: 0; transform: scaleX(.35);
  transition: opacity .3s var(--ease-out), transform .4s var(--ease-out);
}
.ws-tool-card:hover::before { opacity: .9; transform: scaleX(1); }
/* 聚光灯：径向渐变跟随鼠标（--mx/--my 由首页脚本写入） */
.ws-tool-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(170px circle at var(--mx, 50%) var(--my, 30%), var(--accent-soft), transparent 72%);
  opacity: 0; transition: opacity .3s;
}
.ws-tool-card:hover::after { opacity: 1; }
.ws-tool-card > * { position: relative; z-index: 1; }

.ws-tool-card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 13px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .05);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
}
.ws-tool-card:hover .ws-tool-card__icon {
  transform: translateY(-2px) scale(1.07);
  box-shadow: 0 10px 20px -8px var(--accent-glow), inset 0 0 0 1px rgba(15, 23, 42, .05);
}
.ws-tool-card__icon svg { width: 22px; height: 22px; }
.ws-tool-card__name {
  font-size: 14px; font-weight: 650; letter-spacing: .2px; color: var(--text-primary);
  transition: color .2s;
}
.ws-tool-card:hover .ws-tool-card__name { color: var(--accent); }
.ws-tool-card__desc { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.ws-tool-card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.ws-tool-card__tag {
  font-size: 11px; line-height: 1; padding: 4px 9px; border-radius: 999px;
  color: var(--text-secondary); background: var(--bg); border: 1px solid var(--border);
  transition: color .2s, border-color .2s, background .2s;
}
.ws-tool-card:hover .ws-tool-card__tag {
  color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border);
}
/* CTA 箭头：hover 时从左下浮入右上角 */
.ws-tool-card__cta {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  opacity: 0; transform: translate(-8px, 8px) scale(.75);
  transition: opacity .28s var(--ease-out), transform .32s var(--ease-out);
}
.ws-tool-card__cta svg { width: 13px; height: 13px; }
.ws-tool-card:hover .ws-tool-card__cta { opacity: 1; transform: translate(0, 0) scale(1); }

/* 工具卡片图标渐变背景（与各卡 accent 同色系） */
.ws-tool-card__icon--dashboard { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); color: var(--primary); }
.ws-tool-card__icon--aging { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); color: #7c3aed; }
.ws-tool-card__icon--analytical { background: linear-gradient(135deg, #cffafe 0%, #a5f3fc 100%); color: var(--info); }
.ws-tool-card__icon--semantic { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: var(--warning); }

@media (prefers-reduced-motion: reduce) {
  .ws-tool-card, .ws-tool-card__icon, .ws-tool-card__cta,
  .ws-tool-card::before, .ws-tool-card::after { animation: none !important; transition: none !important; }
  .ws-tool-card__cta, .ws-tool-card::before { opacity: 0; }
}

/* 区块头商业化：eyebrow 小标签 + 标题强调条 + 右侧计数徽章 */
.ws-section__eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 2.2px;
  color: var(--primary); opacity: .8; margin-bottom: 4px;
}
.ws-section__title--bar { display: flex; align-items: center; gap: 9px; }
.ws-section__title--bar::before {
  content: ''; width: 4px; height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, #3B82F6, #1D4ED8);
}
.ws-section__badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--primary);
  background: var(--primary-soft);
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.ws-section__badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
  animation: badgePulse 2.4s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .35); }
  50% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ws-section__badge-dot { animation: none; }
}

/* 超宽屏（≥1920px）：英雄区与下方区块同宽（不再单独限宽），仅加宽留白 */
@media (min-width: 1920px) {
  .ws-hero { padding: 30px 36px; }
}

/* 大屏（1440-1920px）：英雄区更宽敞 */
@media (min-width: 1440px) and (max-width: 1919px) {
  .ws-hero { padding: 28px 32px; }
  .ws-hero__title { font-size: 25px; }
  .ws-hero__sub { font-size: 14px; }
}

/* 平板/小屏（≤900px）：英雄区纵向堆叠 */
@media (max-width: 900px) {
  .ws-hero { flex-direction: column; padding: 24px 20px; }
  .ws-hero__title { font-size: 20px; }
  .ws-hero__right { width: 100%; justify-content: space-between; }
  .ws-quick-nav { flex-wrap: wrap; }
  .ws-quick-nav__item { min-width: 140px; }
}

/* 手机（≤640px）：极致紧凑 */
@media (max-width: 640px) {
  .ws-hero { padding: 20px 16px; border-radius: 10px; }
  .ws-hero__title { font-size: 18px; }
  .ws-hero__sub { font-size: 12px; }
  .ws-hero__right { flex-direction: column; align-items: stretch; gap: 8px; }
  .ws-hero__proj-item { justify-content: space-between; }
  .ws-quick-nav__item { padding: 10px 8px; }
  .ws-quick-nav__label { font-size: 12px; }
  .ws-src-pill { min-width: 100%; }
  .ws-sys-bar { flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
}
