/* Ascentek motion layer — 獨立動態層。移除頁面中對 motion.css / motion.js 的引用即可還原。
   所有動態都尊重 prefers-reduced-motion。 */

/* ── 捲動進度條 ───────────────────────────── */
.mo-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent-a-light), var(--accent-b-light));
  z-index: 200; pointer-events: none;
}

/* ── 導覽列：捲動後加陰影 ───────────────────── */
nav { transition: box-shadow 0.3s ease, padding 0.3s ease; }
nav.mo-scrolled { box-shadow: 0 6px 24px rgba(14,16,22,0.08); padding: 12px 0; }
html.dark nav.mo-scrolled { box-shadow: 0 6px 24px rgba(0,0,0,0.45); }

/* ── Hero：漂浮光暈 + 逐段進場 ─────────────── */
.hero-v2 { position: relative; overflow: hidden; }
.hero-v2 > .wrap { position: relative; z-index: 1; }
.mo-orb {
  position: absolute; border-radius: 50%; filter: blur(70px);
  opacity: 0.38; pointer-events: none; z-index: 0; will-change: transform;
}
.mo-orb.a { width: 420px; height: 420px; right: -80px; top: -120px; background: var(--accent-a-light); animation: mo-float-a 16s ease-in-out infinite; }
.mo-orb.b { width: 360px; height: 360px; right: 18%; bottom: -160px; background: var(--accent-b-light); animation: mo-float-b 20s ease-in-out infinite; }
html.dark .mo-orb { opacity: 0.22; }
@keyframes mo-float-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-40px, 50px) scale(1.12); } }
@keyframes mo-float-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(50px, -40px) scale(1.08); } }

@keyframes mo-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
.hero-v2-eyebrow { animation: mo-rise 0.7s cubic-bezier(.2,.7,.2,1) 0.05s both; }
.hero-v2-h1      { animation: mo-rise 0.85s cubic-bezier(.2,.7,.2,1) 0.18s both; }
.hero-v2-sub     { animation: mo-rise 0.8s cubic-bezier(.2,.7,.2,1) 0.34s both; }
.hero-v2-ctas    { animation: mo-rise 0.8s cubic-bezier(.2,.7,.2,1) 0.5s both; }

/* ── 捲動浮現（JS 加上 .mo-ready 後才生效，沒有 JS 時內容照常顯示）── */
html.mo-ready .mo-reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--mo-d, 0s);
}
html.mo-ready .mo-reveal.mo-in { opacity: 1; transform: none; }

/* ── 卡片／按鈕：懸停回饋 ──────────────────── */
.svc-card, .trust-card, .mode-card {
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s ease, border-color 0.25s ease;
}
.svc-card:hover, .trust-card:hover, .mode-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(14,16,22,0.10);
}
html.dark .svc-card:hover, html.dark .trust-card:hover, html.dark .mode-card:hover {
  box-shadow: 0 18px 40px rgba(0,0,0,0.5);
}
.btn-prim, .btn-sec { transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.2s, border-color 0.2s; }
.btn-prim:hover, .btn-sec:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(14,16,22,0.14); }
.btn-prim:active, .btn-sec:active { transform: translateY(-1px); }

/* 卡片編號：懸停時微微放大 */
.tc-num, .svc-num { display: inline-block; transition: transform 0.35s cubic-bezier(.2,.7,.2,1); }
.trust-card:hover .tc-num, .svc-card:hover .svc-num { transform: scale(1.15) translateX(4px); }

/* ── 減少動態偏好：全部關閉 ─────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mo-orb, .mo-progress { display: none; }
  .hero-v2-eyebrow, .hero-v2-h1, .hero-v2-sub, .hero-v2-ctas { animation: none; }
  html.mo-ready .mo-reveal { opacity: 1; transform: none; transition: none; }
  .svc-card:hover, .trust-card:hover, .mode-card:hover, .btn-prim:hover, .btn-sec:hover { transform: none; }
}
