/* ============================================================
   动效层 v2 · 2026-10-29
   放在 theme.css 之后加载，统一接管三类动效：
   1) 加载编排：首屏元素按节奏依次入场
   2) 滚动进入：重写 reveal，动画结束后释放 hover
   3) 常驻微交互：滚动进度条、深色卡片聚光、hover 反馈
   全部在 prefers-reduced-motion 下降级。
   ============================================================ */

/* ---------- 常驻：滚动进度条 ---------- */
.mv-progress{
  position:fixed;top:0;left:0;width:100%;height:2px;z-index:60;
  background:linear-gradient(90deg,#2D6A3F,#7FB98A);
  transform-origin:0 50%;transform:scaleX(0);
  pointer-events:none;border-radius:0 2px 2px 0;
  box-shadow:0 0 10px #2D6A3F40;
}

/* ---------- 关键帧 ---------- */
@keyframes mv-up{
  from{opacity:0;transform:translateY(18px)}
  to{opacity:1;transform:none}
}
@keyframes mv-wipe{
  from{opacity:0;-webkit-clip-path:inset(0 100% 0 0);clip-path:inset(0 100% 0 0);transform:translateY(10px)}
  to{opacity:1;-webkit-clip-path:inset(0 -2% 0 0);clip-path:inset(0 -2% 0 0);transform:none}
}
@keyframes mv-right{
  from{opacity:0;transform:translateX(28px)}
  to{opacity:1;transform:none}
}
@keyframes mv-head{
  from{transform:translateY(-100%)}
  to{transform:none}
}
@keyframes mv-reveal{
  from{opacity:0;transform:translateY(26px)}
  to{opacity:1;transform:none}
}
@keyframes mv-drift{
  from{transform:translate3d(0,0,0)}
  to{transform:translate3d(-36px,30px,0) scale(1.1)}
}
@keyframes mv-underline{
  from{background-size:0% 2px}
  to{background-size:100% 2px}
}

/* ---------- 加载编排：页头下滑 ---------- */
.website .site-header{animation:mv-head .55s cubic-bezier(.22,.61,.36,1) both}

/* ---------- 加载编排：首页首屏 ---------- */
.enterprise-hero .section-label{animation:mv-up .65s .18s cubic-bezier(.22,.61,.36,1) both}
.enterprise-hero h1{animation:mv-wipe 1s .3s cubic-bezier(.22,.61,.36,1) backwards}
.enterprise-hero .hero-summary{animation:mv-up .65s .58s cubic-bezier(.22,.61,.36,1) both}
.enterprise-hero .btn{animation:mv-up .65s .7s cubic-bezier(.22,.61,.36,1) both}
.hero-flow{animation:mv-right .9s .42s cubic-bezier(.22,.61,.36,1) both}
.hero-flow .hf-cap{animation:mv-up .5s .58s cubic-bezier(.22,.61,.36,1) both}
.hero-flow .hf-row{animation:mv-up .55s cubic-bezier(.22,.61,.36,1) both}
.hero-flow .hf-row:nth-child(2){animation-delay:.95s}
.hero-flow .hf-row:nth-child(3){animation-delay:1.12s}
.hero-flow .hf-row:nth-child(4){animation-delay:1.29s}
.hero-flow .hf-foot{animation:mv-up .55s 1.56s cubic-bezier(.22,.61,.36,1) both}

/* 首屏背景：一团缓慢漂浮的浅绿光斑 */
.enterprise-hero::after{
  content:'';position:absolute;right:5%;top:-24%;width:560px;height:560px;
  border-radius:50%;background:radial-gradient(closest-side,#2D6A3F14,transparent);
  animation:mv-drift 18s ease-in-out infinite alternate;
  pointer-events:none;z-index:0;
}
.enterprise-hero .enterprise-hero-grid{position:relative;z-index:1}

/* 首屏标题重点词：擦出下划线 */
.website .enterprise-hero h1 em{
  background-image:linear-gradient(90deg,#2D6A3F,#2D6A3F);
  background-repeat:no-repeat;background-size:0% 2px;background-position:0 100%;
  padding-bottom:5px;
  animation:mv-underline 1.3s 1.15s cubic-bezier(.22,.61,.36,1) forwards;
}

/* ---------- 加载编排：内页首屏 ---------- */
.corp-intro .section-label{animation:mv-up .6s .15s cubic-bezier(.22,.61,.36,1) both}
.corp-intro h1{animation:mv-wipe 1s .27s cubic-bezier(.22,.61,.36,1) backwards}
.corp-intro>p{animation:mv-up .65s .56s cubic-bezier(.22,.61,.36,1) both}
.website .corp-intro h1 em{
  background-image:linear-gradient(90deg,#2D6A3F,#2D6A3F);
  background-repeat:no-repeat;background-size:0% 2px;background-position:0 100%;
  padding-bottom:5px;
  animation:mv-underline 1.3s 1.05s cubic-bezier(.22,.61,.36,1) forwards;
}
.solution-route{animation:mv-up .6s .72s cubic-bezier(.22,.61,.36,1) both}

/* 联系页 */
.contact-copy .section-label{animation:mv-up .6s .18s cubic-bezier(.22,.61,.36,1) both}
.contact-copy h1{animation:mv-wipe 1.05s .3s cubic-bezier(.22,.61,.36,1) backwards}
.contact-copy>p{animation:mv-up .65s .68s cubic-bezier(.22,.61,.36,1) both}
.contact-copy dl[data-contact-details]{animation:mv-up .6s .8s cubic-bezier(.22,.61,.36,1) both}
.website .contact-copy h1 em{
  background-image:linear-gradient(90deg,#7FB98A,#7FB98A);
  background-repeat:no-repeat;background-size:0% 2px;background-position:0 100%;
  padding-bottom:5px;
  animation:mv-underline 1.3s 1.15s cubic-bezier(.22,.61,.36,1) forwards;
}

/* 自评页 */
.diagnosis-intro .eyebrow{animation:mv-up .6s .18s cubic-bezier(.22,.61,.36,1) both}
.diagnosis-intro h1{animation:mv-wipe 1s .3s cubic-bezier(.22,.61,.36,1) backwards}
.diagnosis-trust{animation:mv-up .6s .66s cubic-bezier(.22,.61,.36,1) both}
.diagnosis-side-note{animation:mv-right .8s .6s cubic-bezier(.22,.61,.36,1) both}

/* 隐私页 */
.page-intro .section-label{animation:mv-up .6s .18s cubic-bezier(.22,.61,.36,1) both}
.page-intro h1{animation:mv-wipe 1s .3s cubic-bezier(.22,.61,.36,1) backwards}
.page-intro>p{animation:mv-up .65s .6s cubic-bezier(.22,.61,.36,1) both}

/* ---------- 滚动进入：重写 reveal ----------
   动画用 backwards 填充：入场完成后恢复自然状态，
   hover 的 transform 不再被动画末帧钉死。 */
.reveal:not(.in-view){opacity:0;animation:none}
.reveal.in-view{animation:mv-reveal .8s cubic-bezier(.22,.61,.36,1) var(--delay,0ms) backwards}

/* 区块标题：自身不位移，内部按 标签→标题→注释 依次入场，
   标题用幕布从左向右展开 */
.corp-heading.reveal,
.corp-heading.reveal.in-view,
.company-introduction.reveal,
.company-introduction.reveal.in-view{opacity:1;transform:none;animation:none}
.corp-heading.reveal .section-label,
.corp-heading.reveal h2,
.corp-heading.reveal>p,
.company-introduction.reveal .section-label,
.company-introduction.reveal h2,
.company-introduction.reveal p{opacity:0}
.corp-heading.in-view .section-label,
.company-introduction.in-view .section-label{animation:mv-up .55s .04s cubic-bezier(.22,.61,.36,1) both}
.corp-heading.in-view h2,
.company-introduction.in-view h2{animation:mv-wipe .85s .12s cubic-bezier(.22,.61,.36,1) both}
.corp-heading.in-view>p,
.company-introduction.in-view p{animation:mv-up .55s .34s cubic-bezier(.22,.61,.36,1) both}
.corp-heading.in-view .section-label i,
.company-introduction.in-view .section-label i{display:inline-block;animation:mv-up .45s .3s cubic-bezier(.22,.61,.36,1) both}

/* 流程一行：五个步骤依次落位 */
.flow-line.reveal,
.flow-line.reveal.in-view{opacity:1;transform:none;animation:none}
.flow-line.reveal:not(.in-view) b,
.flow-line.reveal:not(.in-view) i{opacity:0}
.flow-line.in-view b,
.flow-line.in-view i{animation:mv-up .5s cubic-bezier(.22,.61,.36,1) both}
.flow-line.in-view>*:nth-child(1){animation-delay:.04s}
.flow-line.in-view>*:nth-child(2){animation-delay:.12s}
.flow-line.in-view>*:nth-child(3){animation-delay:.2s}
.flow-line.in-view>*:nth-child(4){animation-delay:.28s}
.flow-line.in-view>*:nth-child(5){animation-delay:.36s}
.flow-line.in-view>*:nth-child(6){animation-delay:.44s}
.flow-line.in-view>*:nth-child(7){animation-delay:.52s}
.flow-line.in-view>*:nth-child(8){animation-delay:.6s}
.flow-line.in-view>*:nth-child(9){animation-delay:.68s}

/* 方案页大号序号 */
.website-solutions .catalog-row.in-view .catalog-name>span{display:inline-block;animation:mv-up .55s .14s cubic-bezier(.22,.61,.36,1) both}

/* ---------- 常驻：深色卡片鼠标聚光 ---------- */
.website .hero-flow::before,
.website-cases .demo-lab::before{
  content:'';position:absolute;inset:0;z-index:1;
  background:radial-gradient(320px circle at var(--mx,50%) var(--my,50%),#ffffff14,transparent 65%);
  opacity:0;transition:opacity .45s ease;pointer-events:none;
}
.website .hero-flow:hover::before,
.website-cases .demo-lab:hover::before{opacity:1}
.website-cases .demo-lab{transition:border-color .35s ease,box-shadow .35s ease}
.website-cases .demo-lab:hover{border-color:#3E6B5B;box-shadow:0 26px 55px #17304122}

/* ---------- hover 微交互 ---------- */
/* 主按钮：光泽扫过 + 抬升 */
.website .btn-primary{position:relative;overflow:hidden}
.website .btn-primary::after{
  content:'';position:absolute;top:0;bottom:0;left:-90%;width:55%;
  background:linear-gradient(100deg,transparent,#ffffff2e 45%,#ffffff5c 50%,#ffffff2e 55%,transparent);
  transform:skewX(-18deg);transition:left .55s cubic-bezier(.22,.61,.36,1);
  pointer-events:none;
}
.website .btn-primary:hover::after{left:135%}
.website .btn-primary:hover,
.website .enterprise-hero .btn-primary:hover{transform:translateY(-2px);box-shadow:0 12px 26px #2D6A3F2E}
.website .btn-primary:active{transform:translateY(0);box-shadow:none}
.website .btn-primary span{display:inline-block;transition:transform .3s cubic-bezier(.22,.61,.36,1)}
.website .btn-primary:hover span{transform:translateX(3px)}

/* 文字链：下划线铺开 + 箭头位移 */
.website .simple-link{position:relative}
.website .simple-link::after{
  content:'';position:absolute;left:0;bottom:-2px;width:100%;height:1px;
  background:currentColor;transform:scaleX(0);transform-origin:right;
  transition:transform .35s cubic-bezier(.22,.61,.36,1);
}
.website .simple-link:hover::after{transform:scaleX(1);transform-origin:left}
.website .simple-link span{transition:transform .3s cubic-bezier(.22,.61,.36,1)}
.website .simple-link:hover span{transform:translate(3px,-3px)}

/* 场景入口：底线展开 + 箭头滑动 */
.scene-row a{position:relative;transition:background .35s ease,color .3s ease}
.scene-row a::after{
  content:'';position:absolute;left:0;right:0;bottom:0;height:2px;
  background:#2D6A3F;transform:scaleX(0);transform-origin:right;
  transition:transform .4s cubic-bezier(.22,.61,.36,1);
}
.scene-row a:hover::after{transform:scaleX(1);transform-origin:left}
.scene-row a:hover{color:#1E4F2C}
.scene-row a i{transition:transform .3s cubic-bezier(.22,.61,.36,1),color .3s ease}
.scene-row a:hover i{transform:translate(3px,-3px);color:#2D6A3F}

/* 服务卡：顶线展开 + 序号提亮 */
.website-index .service-overview a{position:relative}
.website-index .service-overview a::before{
  content:'';position:absolute;top:0;left:0;right:0;height:2px;
  background:#2D6A3F;transform:scaleX(0);
  transition:transform .45s cubic-bezier(.22,.61,.36,1);
}
.website-index .service-overview a:hover::before{transform:scaleX(1)}
.website-index .service-overview h3,
.website-index .service-overview .service-no{transition:color .3s ease}
.website-index .service-overview a:hover .service-no{color:#2D6A3F}

/* 方案行：左侧节点脉冲 */
.website-solutions .catalog-row:before{transition:box-shadow .35s ease,transform .35s ease}
.website-solutions .catalog-row:hover:before{transform:scale(1.2);box-shadow:0 0 0 6px #edf3e8,0 0 0 11px #568b5233}

/* 页脚链接：下划线铺开；返回页首轻抬 */
.company-footer .footer-shortcuts a:not(.footer-back-top){position:relative}
.company-footer .footer-shortcuts a:not(.footer-back-top)::after{
  content:'';position:absolute;left:0;bottom:-3px;width:100%;height:1px;
  background:currentColor;transform:scaleX(0);transform-origin:right;
  transition:transform .35s cubic-bezier(.22,.61,.36,1);
}
.company-footer .footer-shortcuts a:not(.footer-back-top):hover::after{transform:scaleX(1);transform-origin:left}
.company-footer .footer-back-top{transition:transform .3s cubic-bezier(.22,.61,.36,1)}
.company-footer .footer-back-top:hover{transform:translateY(-3px)}

/* 文本选择与焦点 */
::selection{background:#2D6A3F;color:#fff}

/* ---------- 手机端 ---------- */
@media (max-width:860px){
  .enterprise-hero::after{width:340px;height:340px;right:-8%;top:-16%}
  .hero-flow{animation-delay:.5s}
  .hero-flow .hf-row:nth-child(2){animation-delay:1s}
  .hero-flow .hf-row:nth-child(3){animation-delay:1.15s}
  .hero-flow .hf-row:nth-child(4){animation-delay:1.3s}
  .hero-flow .hf-foot{animation-delay:1.55s}
  .diagnosis-side-note{animation-delay:.75s}
}

/* ---------- 降级：减少动态效果 ---------- */
@media (prefers-reduced-motion:reduce){
  .mv-progress{display:none!important}
  *,*::before,*::after{animation:none!important;transition:none!important}
  .reveal,.reveal:not(.in-view){opacity:1!important;transform:none!important}
  .corp-heading .section-label,.corp-heading h2,.corp-heading>p,
  .company-introduction .section-label,.company-introduction h2,.company-introduction p,
  .flow-line b,.flow-line i{opacity:1!important;transform:none!important}
}
