/* ============================================================
   HR-OS 首页升级专用样式 v20260909
   - Hero 横幅融合（桌面底层+左文字 / 手机文字上+主体下）
   - 组织工作台 6 标签截图切换
   - 导航平滑滚动与当前高亮
   - 轻量首次进入动效、按钮反馈、截图放大
   - JS 失败 & prefers-reduced-motion 仍完整可用
   ============================================================ */

/* ---------- 1. Hero 横幅融合 ---------- */
.hero-upgrade {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}
/* 桌面：横幅作为背景层，文字浮于左侧 */
.hero-upgrade .hu-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  min-height: 470px;
}
.hero-upgrade .hu-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  max-width: 100%;
}
.hero-upgrade .hu-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  max-width: 100%;
}
/* 桌面仅微收场景，围绕右侧主体缩放；边缘淡出至统一底色 */
@media (min-width: 901px) {
  .hero-upgrade .hu-bg img {
    transform: scale(.828);
    transform-origin: 76% 50%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 92%, transparent 100%), linear-gradient(0deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 9%, #000 92%, transparent 100%), linear-gradient(0deg, transparent 0%, #000 9%, #000 91%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
}
/* 左侧文字区 — 无框，直接融合暖白底 */
.hero-upgrade .hu-copy {
  padding: 64px 0 58px;
  max-width: 540px;
}
.hero-upgrade .hu-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: 9999px;
  background: rgba(235,100,24,.07);
  border: 1px solid rgba(235,100,24,.16);
  color: var(--brand-orange-deep);
  font-size: 13px;
  font-weight: 600;
}
.hero-upgrade .hu-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-orange);
  box-shadow: 0 0 0 4px rgba(235,100,24,.16);
}
.hero-upgrade .hu-title {
  margin: 22px 0 18px;
  font-size: clamp(42px, 5.6vw, 66px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--ink);
}
.hero-upgrade .hu-sub {
  max-width: 500px;
  margin: 0;
  font-size: 16.5px;
  line-height: 1.95;
  color: var(--muted);
}
.hero-upgrade .hu-actions {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.hero-upgrade .hu-note {
  margin-top: 26px;
  font-size: 13px;
  color: var(--subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-upgrade .hu-note::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #3faf6d;
  box-shadow: 0 0 0 3px rgba(63,175,109,.15);
}
/* 右侧占位 — 桌面上横幅图已覆盖此区域 */
.hero-upgrade .hu-visual {
  min-height: 400px;
  /* 图片由背景层提供，此处仅占位保持grid布局 */
}

/* 手机：文字上 + 主体图下，堆叠 */
@media (max-width: 900px) {
  .hero-upgrade .hu-inner {
    grid-template-columns: 1fr;
    gap: 0;
    min-height: auto;
  }
  .hero-upgrade .hu-bg {
    position: relative;
    inset: auto;
    order: 2;
    min-height: 220px;
  }
  .hero-upgrade .hu-copy {
    padding: 56px 0 36px;
    max-width: 100%;
    order: 1;
  }
  .hero-upgrade .hu-visual { display: none; }
  .hero-upgrade .hu-actions { justify-content: center; }
}
@media (max-width: 560px) {
  .hero-upgrade .hu-title { font-size: 32px; }
  .hero-upgrade .hu-actions { flex-direction: column; align-items: center; }
  .hero-upgrade .hu-bg { min-height: 180px; }
}


/* ---------- 2. 组织工作台 6 标签截图切换 ---------- */
.wb-tabs-wrap { margin-top: 40px; max-width: 100%; overflow: hidden; }

/* 标签栏 */
.wb-tablist {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}
.wb-tablist::-webkit-scrollbar { display: none; }
.wb-tab {
  flex: 0 0 auto;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s, background .2s;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
  font-family: var(--display);
}
.wb-tab:hover { color: var(--ink); background: rgba(235,100,24,.04); }
.wb-tab[aria-selected="true"] {
  color: var(--brand-orange-deep);
  border-bottom-color: var(--brand-orange);
  background: rgba(235,100,24,.06);
}
.wb-tab:focus-visible {
  outline: 3px solid var(--brand-orange);
  outline-offset: 2px;
}

/* 截图展示区 — 固定比例 1600:1000 = 62.5% */
.wb-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--fog);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
/* 降级：不支持 aspect-ratio 时用 padding-bottom */
@supports not (aspect-ratio: 16/10) {
  .wb-panel { padding-bottom: 62.5%; height: 0; }
}
.wb-panel img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  transition: opacity .2s ease;
  background: #fff;
}
.wb-panel img.wb-active {
  opacity: 1;
}

/* 说明文字 */
.wb-caption {
  margin-top: 14px;
  text-align: center;
  font-size: 13.5px;
  color: var(--subtle);
  line-height: 1.6;
  min-height: 44px;
}

/* 手机标签横滑增强 */
@media (max-width: 640px) {
  .wb-tab { padding: 10px 14px; font-size: 12.5px; }
  .wb-panel { border-radius: 12px; }
}


/* ---------- 3. 导航当前高亮（平滑滚动） ---------- */
.site-nav a.nav-active {
  color: var(--brand-orange-deep) !important;
  background: rgba(235,100,24,.10) !important;
  font-weight: 700 !important;
}
html.scroll-smooth { scroll-behavior: smooth; }


/* ---------- 4. 按钮反馈（轻量按压） ---------- */
.btn:active {
  transform: scale(.97);
}
.btn-primary:active {
  box-shadow: 0 4px 12px rgba(235,100,24,.28);
}


/* ---------- 5. 截图放大 Lightbox 增强 ---------- */
.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 40px;
}
.lb-overlay.lb-open { display: flex; }
.lb-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
  box-shadow: 0 40px 100px rgba(0,0,0,.4);
  cursor: zoom-out;
}
.lb-close-btn {
  position: absolute;
  top: 20px; right: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s;
}
.lb-close-btn:hover { background: rgba(255,255,255,.28); }
.lb-close-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}


/* ---------- 6. 首次进入动效 ---------- */
.entry-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s cubic-bezier(.16,1,.3,1),
              transform .6s cubic-bezier(.16,1,.3,1);
}
.entry-fade.ef-visible {
  opacity: 1;
  transform: none;
}
.entry-fade.ef-d1 { transition-delay: .08s; }
.entry-fade.ef-d2 { transition-delay: .18s; }
.entry-fade.ef-d3 { transition-delay: .30s; }


/* ---------- 7. 降级：JS 关闭 / prefers-reduced-motion ---------- */
.no-js .entry-fade,
.no-js .wb-panel img,
.no-js .wb-tab[aria-selected="true"] {
  opacity: 1;
  transform: none;
  transition: none;
}
/* 默认可见：确保 JS 未执行时首屏内容不隐藏 */
.entry-fade:not(.ef-visible):not(.no-js) {
  /* JS 会添加 ef-visible；若 JS 不运行，下面 noscript 注入 .no-js */
}

@media (prefers-reduced-motion: reduce) {
  .entry-fade,
  .wb-panel img {
    transition: none !important;
  }
  .entry-fade { opacity: 1; transform: none; }
  .wb-panel img.wb-active { opacity: 1; }
  html.scroll-smooth { scroll-behavior: auto; }
}
