/* ===========================================================
   SAILOR 势联出海 · 动效层 v1.0
   原则：
   1. 只做「淡入上移」与微交互，不做视差、弹跳、翻转
   2. 内容先可见，动画只做补强；JS 失效时页面完全正常
   3. 尊重系统「减弱动态效果」设置
   =========================================================== */

:root{
  --ease-out: cubic-bezier(.22,.61,.36,1);
  --ease-soft: cubic-bezier(.4,0,.2,1);
}

@keyframes s-fade-up{ from{ opacity:0; transform:translateY(14px) } to{ opacity:1; transform:none } }
@keyframes s-fade-down{ from{ opacity:0; transform:translateY(-8px) } to{ opacity:1; transform:none } }
@keyframes s-fade{ from{ opacity:0 } to{ opacity:1 } }

/* ---------- 页面整体淡入（极轻，避免生硬切换） ---------- */
body{ animation: s-fade .34s var(--ease-soft) both }

/* ---------- 首页首屏序列 ---------- */
.hero .hero-badge{ animation: s-fade-down .55s var(--ease-out) .04s both }
.hero h1{ animation: s-fade-up .74s var(--ease-out) .12s both }
.hero .hero-en{ animation: s-fade-up .6s var(--ease-out) .30s both }
.hero .hero-sub{ animation: s-fade-up .62s var(--ease-out) .38s both }
.hero .hero-search{ animation: s-fade-up .62s var(--ease-out) .46s both }
.hero .hero-chips{ animation: s-fade-up .6s var(--ease-out) .54s both }
.hero-stats{ animation: s-fade-up .72s var(--ease-out) .60s both }

/* ---------- 内页页头序列 ---------- */
.page-head .crumb{ animation: s-fade .5s var(--ease-soft) both }
.page-head h1{ animation: s-fade-up .62s var(--ease-out) .06s both }
.page-head .pdesc{ animation: s-fade-up .62s var(--ease-out) .16s both }
.page-head .acts,
.page-head .stat-row{ animation: s-fade-up .62s var(--ease-out) .26s both }

/* ---------- 滚动进入（由 motion.js 打标记，JS 不跑则完全无感） ---------- */
[data-reveal]{
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .62s var(--ease-out), transform .62s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-in{
  opacity: 1;
  transform: none;
}

/* ---------- 页头滚动态：落下时加一层极淡的投影，强化层级 ---------- */
.site-header{ transition: box-shadow .30s var(--ease-soft) }
.site-header.is-scrolled{ box-shadow: 0 6px 22px rgba(6,43,82,.07) }

/* ---------- 按钮：按下时的轻微回弹（只做位移，不改配色） ---------- */
.btn{ transition: transform .18s var(--ease-out), box-shadow .22s var(--ease-out), background .16s, border-color .16s, color .16s }
.btn:hover{ transform: translateY(-1px) }
.btn:active{ transform: translateY(0) }

/* ---------- 平滑锚点（仅在允许动效时启用） ---------- */
@media (prefers-reduced-motion: no-preference){
  html{ scroll-behavior: smooth }
}

/* ---------- 窄屏：位移减半，时长收紧 ---------- */
@media (max-width: 760px){
  [data-reveal]{ transform: translateY(10px); transition-duration: .5s }
  .hero h1{ animation-duration: .6s }
}

/* ---------- 无障碍：系统要求减弱动态时，全部直出 ---------- */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal]{ opacity: 1 !important; transform: none !important }
}
