/* ============================================================
   HYSPERIX · 视觉品质增强层 (Visual Upgrade Layer)
   ------------------------------------------------------------
   日期：2026-11-22
   说明：本文件为「叠加式」增强，不改动 style.css 的任何原始规则。
         所有选择器都限定在 html.vu-on 作用域下，由 enhance.js 添加。
         回退方式：删除页面中对本文件的 <link> 引入即可完全恢复原版。
   原则：克制、精致、现代。保留品牌主色与原有布局结构。
   ============================================================ */

html.vu-on {
  /* 扩展设计 token —— 与原有品牌色保持一致 */
  --ease-out:  cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ease-em:   cubic-bezier(.16, 1, .3, 1);
  --shadow-e1: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .035);
  --shadow-e2: 0 2px 6px rgba(15, 23, 42, .05), 0 10px 28px rgba(15, 23, 42, .07);
  --shadow-e3: 0 10px 24px rgba(15, 23, 42, .09), 0 28px 60px rgba(15, 23, 42, .11);
  --glow-brand: rgba(34, 113, 177, .085);
  --ink-soft: #334155;
}


/* ------------------------------------------------------------
   1. 全局背景层次 —— 极淡的光晕，不抢主体
   ------------------------------------------------------------ */
html.vu-on body {
  background-color: #fff;
  background-image:
    radial-gradient(900px 620px at 88% -8%, var(--glow-brand), transparent 68%),
    radial-gradient(700px 520px at -10% 22%, rgba(255, 120, 0, .035), transparent 70%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

html.vu-on .section--alt {
  background-image:
    radial-gradient(1100px 520px at 8% 0%, rgba(34, 113, 177, .045), transparent 62%),
    linear-gradient(180deg, #f8fafc 0%, #f5f7fa 100%);
  border-top: 1px solid rgba(15, 23, 42, .035);
  border-bottom: 1px solid rgba(15, 23, 42, .035);
}

/* 页头：顶部一道极细的品牌光带 + 柔和落光 */
html.vu-on .pagehead {
  position: relative;
  background-image:
    radial-gradient(760px 300px at 82% 0%, rgba(34, 113, 177, .075), transparent 70%),
    linear-gradient(180deg, #fbfcfe 0%, #f6f8fa 100%);
}
html.vu-on .pagehead::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand) 22%, rgba(255, 120, 0, .65) 55%, transparent);
  opacity: .55;
  pointer-events: none;
}


/* ------------------------------------------------------------
   2. 排版精修 —— 层级、字距、节奏
   ------------------------------------------------------------ */
html.vu-on h1, html.vu-on h2, html.vu-on h3, html.vu-on h4 {
  letter-spacing: -.018em;
}
html.vu-on .h1, html.vu-on .pagehead .h1 {
  letter-spacing: -.03em;
  font-weight: 800;
}
html.vu-on .eyebrow {
  position: relative;
  padding-left: 26px;
}
html.vu-on .eyebrow::before {
  content: "";
  position: absolute; left: 0; top: 50%;
  width: 18px; height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, var(--brand), var(--warm));
  border-radius: 2px;
}
html.vu-on .lead { line-height: 1.75; }
/* 仅浅底区域的 lead 用柔和墨色；Hero 等深色区块保留原白色文案 */
html.vu-on .section .lead,
html.vu-on .pagehead .lead { color: var(--ink-soft); }
html.vu-on p { color: var(--text); }


/* ------------------------------------------------------------
   3. 顶部条 / 导航 —— 滚动时毛玻璃与层次变化
   ------------------------------------------------------------ */
html.vu-on .topbar {
  background: rgba(246, 247, 248, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html.vu-on .header {
  transition:
    background .4s var(--ease-soft),
    box-shadow .4s var(--ease-soft),
    border-color .4s var(--ease-soft),
    backdrop-filter .4s var(--ease-soft);
}
html.vu-on .header.is-stuck {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: rgba(15, 23, 42, .06);
  box-shadow: 0 6px 28px rgba(15, 23, 42, .07);
}
html.vu-on .header .wrap { min-height: 78px; }

/* 导航项：从中心展开的细下划线（不干扰 active 的粗线） */
html.vu-on .nav__item {
  transition: color .25s var(--ease-soft);
}
html.vu-on .nav__item:not(.is-active)::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 10px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s var(--ease-out);
}
html.vu-on .nav__item:not(.is-active):hover::after { transform: scaleX(1); }

html.vu-on .header__search {
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
html.vu-on .header__search:focus-within {
  border-color: rgba(34, 113, 177, .5);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, .09);
}
html.vu-on .brand__logo { transition: transform .4s var(--ease-out); }
html.vu-on .brand:hover .brand__logo { transform: rotate(-6deg) scale(1.06); }

html.vu-on .lang-toggle {
  transition: background .22s ease, color .22s ease, transform .22s var(--ease-out);
}
html.vu-on .lang-toggle:hover { transform: translateY(-1px); }


/* ------------------------------------------------------------
   4. Hero —— 电影感渐变、光晕与装饰线
   ------------------------------------------------------------ */
html.vu-on .hero--img {
  background-position: center 62%;
}
html.vu-on .hero--img::before {
  background:
    radial-gradient(760px 420px at 72% 28%, rgba(56, 140, 210, .22), transparent 68%),
    linear-gradient(90deg, rgba(9, 17, 31, .86) 0%, rgba(11, 24, 42, .68) 44%, rgba(13, 28, 48, .30) 100%),
    linear-gradient(180deg, rgba(9, 17, 31, .32) 0%, transparent 26%, transparent 66%, rgba(9, 17, 31, .52) 100%);
}
/* 低透明度装饰光带 + 细线，仅作层次，不遮挡内容 */
html.vu-on .hero--img::after {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 60%, rgba(255, 255, 255, .045) 74%, transparent 88%),
    linear-gradient(180deg, rgba(255, 255, 255, .08) 0, transparent 1px);
  background-size: 100% 100%, 100% 100%;
}
html.vu-on .hero--img .h1 {
  font-weight: 800;
  letter-spacing: -.035em;
  text-shadow: 0 3px 20px rgba(0, 0, 0, .42);
}
html.vu-on .hero--img .h1 em {
  text-shadow: 0 2px 18px rgba(255, 201, 60, .25);
}
html.vu-on .hero__chip {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}
html.vu-on .hero__text > * {
  animation: vu-hero-rise .9s var(--ease-em) both;
}
html.vu-on .hero__text > *:nth-child(1) { animation-delay: .05s; }
html.vu-on .hero__text > *:nth-child(2) { animation-delay: .14s; }
html.vu-on .hero__text > *:nth-child(3) { animation-delay: .24s; }
html.vu-on .hero__text > *:nth-child(4) { animation-delay: .34s; }
@keyframes vu-hero-rise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to   { opacity: 1; transform: none; }
}

/* KPI 玻璃卡片 */
html.vu-on .h_kpi {
  background: rgba(13, 22, 38, .48);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  transition: background .3s ease, border-color .3s ease, transform .3s var(--ease-out);
}
html.vu-on .h_kpi:hover {
  background: rgba(20, 40, 68, .68);
  border-color: rgba(255, 255, 255, .3);
  transform: translateY(-3px);
}
html.vu-on .hero__media-tag {
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .22);
}


/* ------------------------------------------------------------
   5. 按钮 —— 细腻的 hover 抬升与光泽
   ------------------------------------------------------------ */
html.vu-on .btn {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition:
    transform .28s var(--ease-out),
    box-shadow .28s var(--ease-out),
    background .25s ease, color .25s ease, border-color .25s ease;
}
html.vu-on .btn:hover { transform: translateY(-2px); }
html.vu-on .btn:active { transform: translateY(0); }
html.vu-on .btn--primary:hover,
html.vu-on .btn--warm:hover {
  box-shadow: 0 8px 20px rgba(34, 113, 177, .24);
}
html.vu-on .btn--warm:hover { box-shadow: 0 8px 22px rgba(255, 120, 0, .28); }
html.vu-on .btn--lg { border-radius: 9px; }

/* 主按钮的斜向微光（只用一次，不循环） */
html.vu-on .btn--primary::after,
html.vu-on .btn--warm::after {
  content: "";
  position: absolute; top: 0; bottom: 0; left: -70%; width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: skewX(-22deg);
  transition: left .6s var(--ease-out);
  pointer-events: none;
}
html.vu-on .btn--primary:hover::after,
html.vu-on .btn--warm:hover::after { left: 130%; }

html.vu-on .btn:focus-visible,
html.vu-on .nav__item:focus-visible,
html.vu-on a:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ------------------------------------------------------------
   6. 卡片 / 网格 —— 柔和阴影、上浮、图片反馈
   ------------------------------------------------------------ */
html.vu-on .card {
  position: relative;
  border-color: rgba(15, 23, 42, .075);
  border-radius: 12px;
  box-shadow: var(--shadow-e1);
  transition:
    transform .38s var(--ease-out),
    box-shadow .38s var(--ease-out),
    border-color .3s ease;
}
html.vu-on .card::before {
  content: "";
  position: absolute; left: 12%; right: 12%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
  z-index: 1;
}
html.vu-on .card--hover:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 113, 177, .28);
  box-shadow: var(--shadow-e3);
}
html.vu-on .card--hover:hover::before { opacity: 1; }
html.vu-on .card__media img { transition: transform .6s var(--ease-out); }
html.vu-on .card--hover:hover .card__media img { transform: scale(1.06); }
html.vu-on .card__body { padding: 22px 24px; }

/* 证书卡片沿用同一质感 */
html.vu-on .certdoc {
  border-radius: 12px;
  box-shadow: var(--shadow-e1);
  transition: transform .38s var(--ease-out), box-shadow .38s var(--ease-out), border-color .3s ease;
}
html.vu-on .certdoc:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 113, 177, .28);
  box-shadow: var(--shadow-e3);
}
html.vu-on .certdoc:hover .certdoc__preview img { transform: scale(1.045) translateY(-2px); }

html.vu-on .cert {
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out), border-color .28s ease;
}
html.vu-on .cert:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 113, 177, .32);
  box-shadow: var(--shadow-e2);
}


/* ------------------------------------------------------------
   7. 分区标题 / 图文行 —— 节奏与呼吸感
   ------------------------------------------------------------ */
html.vu-on .section { padding: 84px 0; }
html.vu-on .section--tight { padding: 30px 0 44px; }
html.vu-on .section-head { margin-bottom: 44px; }
html.vu-on .rowhead { margin-bottom: 24px; }
html.vu-on .rowhead h2 { letter-spacing: -.025em; }

/* 细分隔线：更轻、更有层次 */
html.vu-on hr {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  border: 0;
}


/* ------------------------------------------------------------
   8. 页脚 —— 更沉稳的收尾
   ------------------------------------------------------------ */
html.vu-on .footer {
  background: linear-gradient(180deg, #f8fafc 0%, #f3f6f9 100%);
  border-top: 1px solid rgba(15, 23, 42, .06);
  position: relative;
}
html.vu-on .footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34, 113, 177, .35), transparent);
}
html.vu-on .footer h4 { letter-spacing: -.01em; }
html.vu-on .footer__social a {
  transition: transform .25s var(--ease-out), background .25s ease, border-color .25s ease, color .25s ease;
}
html.vu-on .footer__social a:hover { transform: translateY(-3px); box-shadow: var(--shadow-e1); }


/* ------------------------------------------------------------
   9. 表单 / FAQ / 其他组件反馈
   ------------------------------------------------------------ */
html.vu-on input, html.vu-on textarea, html.vu-on select {
  transition: border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
html.vu-on input:focus, html.vu-on textarea:focus, html.vu-on select:focus {
  border-color: rgba(34, 113, 177, .55) !important;
  box-shadow: 0 0 0 3px rgba(34, 113, 177, .09) !important;
  outline: none;
}
html.vu-on .faq__item {
  transition: border-color .28s ease, box-shadow .28s ease;
}
html.vu-on .faq__item:hover { border-color: rgba(34, 113, 177, .25); }
html.vu-on .faq__a { transition: max-height .42s var(--ease-soft), opacity .3s ease; }


/* ------------------------------------------------------------
   10. 通用入场动画类 —— 由 enhance.js 添加
   注意：跳过已有 [data-reveal] 元素（由 main.js 控制）
   ------------------------------------------------------------ */
html.vu-on.vu-ready .vu-reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity .75s var(--ease-out),
    transform .75s var(--ease-out);
  transition-delay: var(--vu-delay, 0ms);
}
html.vu-on.vu-ready .vu-reveal.is-in {
  opacity: 1;
  transform: none;
}
/* 变体：轻微左移 */
html.vu-on.vu-ready .vu-reveal--left { transform: translate3d(-22px, 0, 0); }
/* 变体：轻微缩放 */
html.vu-on.vu-ready .vu-reveal--scale { transform: scale(.97); }
/* 变体：仅淡入 */
html.vu-on.vu-ready .vu-reveal--fade { transform: none; }


/* ------------------------------------------------------------
   11. Hero 视差 —— JS 写入 --vu-py 变量
   仅作用于 .hero__text 容器，避免与子元素入场动画冲突
   ------------------------------------------------------------ */
html.vu-on .vu-parallax {
  transform: translate3d(0, var(--vu-py, 0px), 0);
  transition: transform .12s linear;
}
/* 背景图层随滚动极轻微下移，营造纵深（不使用 background-attachment） */
html.vu-on .hero--img {
  background-position: center calc(62% + var(--vu-bg, 0px));
}


/* ------------------------------------------------------------
   12. 页面切换过渡 —— 已按用户反馈移除
   原因：入场淡入 + 离场淡出会产生「卡一下才加载过去」的顿挫感。
   现恢复浏览器原生直接跳转，保持切换丝滑。
   ------------------------------------------------------------ */


/* ------------------------------------------------------------
   13. 图片通用细节 —— 更自然的裁切与圆角
   ------------------------------------------------------------ */
html.vu-on img { border-radius: inherit; }
html.vu-on .diagram-wrap img {
  border-radius: 14px;
  box-shadow: var(--shadow-e2);
  border-color: rgba(15, 23, 42, .07);
}


/* ------------------------------------------------------------
   14. 移动端微调 —— 减小位移，保证可读性
   ------------------------------------------------------------ */
@media (max-width: 720px) {
  html.vu-on .section { padding: 60px 0; }
  html.vu-on .hero--img::after { display: none; }
  html.vu-on .card--hover:hover,
  html.vu-on .certdoc:hover { transform: none; }
  html.vu-on.vu-ready .vu-reveal { transform: translate3d(0, 14px, 0); }
  html.vu-on.vu-ready .vu-reveal--left { transform: translate3d(-12px, 0, 0); }
}


/* ------------------------------------------------------------
   15. 尊重「减少动态效果」系统设置
   JS 会检测到后跳过所有动画初始化，这里做双保险
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html.vu-on *,
  html.vu-on *::before,
  html.vu-on *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html.vu-on.vu-ready .vu-reveal,
  html.vu-on .hero__text > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
