/* RiseUp 官网动效层。
   只有 <html> 带 .motion 类时才生效（由页面头部的一行脚本加上；
   系统开了「减少动态效果」时不加）。删掉本文件和 motion.js，页面照常显示。 */

@keyframes rise { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- 顶部：滚动进度条 + 导航 ---------- */
.scroll-bar { position: fixed; left: 0; top: 0; z-index: 60; width: 100%; height: 3px; background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.motion .site-header { transition: box-shadow .3s, background-color .3s; }
.motion .site-header.scrolled { box-shadow: 0 8px 28px rgba(20, 50, 110, .10); background: rgba(255,255,255,.82); }
@media (min-width: 960px) {
  .nav a.active { background: var(--blue-soft); color: var(--blue); }
}

/* ---------- 首屏 ---------- */
/* 图纸网格底纹 */
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(37,99,235,.075) 1px, transparent 1px), linear-gradient(90deg, rgba(37,99,235,.075) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse 75% 85% at 68% 38%, #000 0%, transparent 75%); mask-image: radial-gradient(ellipse 75% 85% at 68% 38%, #000 0%, transparent 75%); pointer-events: none; }
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; animation: fade 1.6s .2s forwards; }

.motion .hero .wrap:not(.hero-strip) > div:first-child > * { opacity: 0; animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.motion .hero .wrap:not(.hero-strip) > div:first-child > :nth-child(1) { animation-delay: .05s; }
.motion .hero .wrap:not(.hero-strip) > div:first-child > :nth-child(2) { animation-delay: .16s; }
.motion .hero .wrap:not(.hero-strip) > div:first-child > :nth-child(3) { animation-delay: .30s; }
.motion .hero .wrap:not(.hero-strip) > div:first-child > :nth-child(4) { animation-delay: .44s; }
.motion .hero-strip > * { opacity: 0; animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards; }
.motion .hero-strip > :nth-child(1) { animation-delay: .7s; }
.motion .hero-strip > :nth-child(2) { animation-delay: .8s; }
.motion .hero-strip > :nth-child(3) { animation-delay: .9s; }

/* 标签上的「在线」绿点 */
.hero-tag { display: inline-flex; align-items: center; gap: 8px; }
.hero-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #17B26A; flex: none; }
.motion .hero-tag::before, .motion .st-on::before { animation: live 2s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(23,178,106,.55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(23,178,106,0); } }

/* 标题关键词：流光 + 下划线 */
.motion .hero h1 em { position: relative; display: inline-block; background: linear-gradient(100deg, #1D4ED8 0%, #2563EB 38%, #22B8F0 50%, #2563EB 62%, #1D4ED8 100%); background-size: 260% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: shimmer 5.5s linear infinite; }
.motion .hero h1 em::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.04em; height: .09em; border-radius: 99px; background: var(--grad); transform: scaleX(0); transform-origin: 0 50%; animation: grow .8s cubic-bezier(.2,.7,.2,1) 1.1s forwards; }
@keyframes shimmer { from { background-position: 130% 0; } to { background-position: -130% 0; } }
@keyframes grow { to { transform: scaleX(1); } }

/* 主按钮扫光 */
.btn-primary { position: relative; overflow: hidden; }
.motion .btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 46%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: translateX(-140%) skewX(-18deg); pointer-events: none; }
.motion .btn-primary:hover::after { transition: transform .7s ease; transform: translateX(260%) skewX(-18deg); }
.motion .hero-cta .btn-primary::after { animation: shine 5s ease-in-out 2.2s infinite; }
@keyframes shine { 0% { transform: translateX(-140%) skewX(-18deg); } 22%, 100% { transform: translateX(260%) skewX(-18deg); } }

/* ---------- 首屏右侧：审图过程回放 ---------- */
.sheet-view { position: relative; overflow: hidden; }
.scan, .ping { display: none; }
.motion .sheet { opacity: 0; animation: rise 1s cubic-bezier(.2,.7,.2,1) .3s forwards; transition: transform .3s ease-out, box-shadow .3s; transform-style: preserve-3d; will-change: transform; }
.sheet-bar .ok { transition: background-color .3s, color .3s; }
.sheet-bar .ok.busy { color: var(--blue); background: var(--blue-soft); display: inline-flex; align-items: center; gap: 6px; }
.sheet-bar .ok.busy::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(37,99,235,.25); border-top-color: var(--blue); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 520px) { .sheet.live .sheet-bar span:not(.ok) { display: none; } }

.sheet.live .dwg :not(.hid) { vector-effect: none; stroke-dasharray: 1; stroke-dashoffset: 1; }
.sheet.live .dwg .hid, .sheet.live .dim { opacity: 0; }
.sheet.live .rev path { vector-effect: none; stroke-dasharray: 1; stroke-dashoffset: 1; animation: none; }
.sheet.live .rev .lead { opacity: 0; }
.sheet.live .marks li { opacity: 0; }
.sheet.live .scan { display: block; position: absolute; top: 0; bottom: 0; left: 0; width: 24%; translate: -100% 0; opacity: 0; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(37,99,235,.10) 70%, rgba(37,99,235,.30)); border-right: 2px solid var(--blue); box-shadow: 6px 0 18px rgba(37,99,235,.35); }
.sheet.live .ping { display: block; fill: none; stroke: var(--pen); stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; }

.sheet.run .dwg :not(.hid) { animation: draw .9s ease-out forwards; animation-delay: calc(var(--i, 0) * 42ms); }
.sheet.run .dwg .hid { animation: fade .5s 1s forwards; }
.sheet.run .dim { animation: fade .6s 1.2s forwards; }
.sheet.run .scan { animation: scan 1.8s cubic-bezier(.45,0,.55,1) 1.6s forwards; }
.sheet.run .m1 path { animation: draw .8s ease-out 3.4s forwards; }
.sheet.run .m1 .lead { animation: fade .3s 4.1s forwards; }
.sheet.run .m1 .ping { animation: ping 2s ease-out 4.2s infinite; }
.sheet.run .m2 path { animation: draw .8s ease-out 4.2s forwards; }
.sheet.run .m2 .lead { animation: fade .3s 4.9s forwards; }
.sheet.run .m2 .ping { animation: ping 2s ease-out 5s infinite; }
.sheet.run .marks li:nth-child(1) { animation: rise .5s 4.2s forwards; }
.sheet.run .marks li:nth-child(2) { animation: rise .5s 5s forwards; }
@keyframes scan { 0% { left: 0; translate: -100% 0; opacity: 1; } 92% { opacity: 1; } 100% { left: 100%; translate: 0 0; opacity: 0; } }
@keyframes ping { 0% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.6); } }

/* ---------- 运行记录滚动条 ---------- */
.ticker { background: var(--navy); color: #C8D6F2; overflow: hidden; position: relative; font-family: var(--font-mono); font-size: 13px; }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 64px; z-index: 1; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(90deg, var(--navy), transparent); }
.ticker::after { right: 0; background: linear-gradient(270deg, var(--navy), transparent); }
.ticker-track { display: flex; width: max-content; }
.ticker-track span { display: inline-flex; align-items: center; gap: 10px; padding: 13px 26px; white-space: nowrap; }
.ticker-track span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #2ED58A; flex: none; }
.ticker-track b { color: #fff; font-weight: 600; }
.motion .ticker-track.loop { animation: ticker 42s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- 滚动出现 ---------- */
.motion [data-rv] { opacity: 0; translate: 0 30px; transition: opacity .8s cubic-bezier(.2,.7,.2,1), translate .8s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0ms); }
.motion [data-rv].in { opacity: 1; translate: 0 0; }
.motion .section-head .en::after { transition: width .7s cubic-bezier(.2,.7,.2,1) .35s; }
.motion .section-head[data-rv]:not(.in) .en::after { width: 0; }

/* ---------- 卡片：跟随鼠标的光斑 ---------- */
.service, .post, .badge, .faq details, .before, .find, .miss, .fact, .headline-result > div { position: relative; }
.step { overflow: hidden; }
@media (hover: hover) and (pointer: fine) {
  .motion :is(.service, .step, .post, .badge, .faq details, .before, .find, .miss, .headline-result > div)::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 50%), rgba(37,99,235,.13), transparent 62%); box-shadow: inset 0 0 0 1px rgba(37,99,235,.35); }
  .motion :is(.service, .step, .post, .badge, .faq details, .before, .find, .miss, .headline-result > div):hover::after { opacity: 1; }
  .motion .post, .motion .tile { transition: transform .25s, box-shadow .25s; }
  .motion .post:hover, .motion .tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
}
.motion .shot img, .motion .post img { transition: scale .6s cubic-bezier(.2,.7,.2,1); }
.motion .service:hover .shot img, .motion .tile:hover .shot img, .motion .post:hover img { scale: 1.06; }
.post { overflow: hidden; }

/* 视频播放键的波纹 */
.motion .play::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.9); animation: ping-box 2.2s ease-out infinite; }
@keyframes ping-box { 0% { transform: scale(1); opacity: .9; } 80%, 100% { transform: scale(1.9); opacity: 0; } }

/* ---------- 深色区块：流动网格 + 光束 ---------- */
.stats-band, .book-band, .cta-band, .quote { position: relative; overflow: hidden; isolation: isolate; }
.stats-band > *, .book-band > *, .cta-band > *, .quote > * { position: relative; z-index: 1; }
.motion :is(.stats-band, .book-band, .cta-band, .quote)::before, .motion .case-tile .shot::after { content: ""; position: absolute; inset: -48px; z-index: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 48px 48px; animation: grid-move 9s linear infinite; pointer-events: none; }
.motion :is(.stats-band, .book-band, .cta-band)::after { content: ""; position: absolute; top: -20%; bottom: -20%; left: 0; width: 34%; z-index: 0; background: linear-gradient(100deg, transparent, rgba(255,255,255,.13), transparent); transform: translateX(-160%) skewX(-20deg); animation: beam 8s ease-in-out 1s infinite; pointer-events: none; }
@keyframes grid-move { to { transform: translate(48px, 48px); } }
@keyframes beam { 0% { transform: translateX(-160%) skewX(-20deg); } 45%, 100% { transform: translateX(420%) skewX(-20deg); } }

/* 数字带：逐个亮起 */
.motion .stats-band[data-rv] .stat, .motion .stats-band.in .stat { transition: opacity .7s, translate .7s cubic-bezier(.2,.7,.2,1); }
.motion .stats-band[data-rv]:not(.in) .stat { opacity: 0; translate: 0 18px; }
.motion .stats-band .stat:nth-child(2) { transition-delay: .12s; }
.motion .stats-band .stat:nth-child(3) { transition-delay: .24s; }
.motion .stats-band .stat:nth-child(4) { transition-delay: .36s; }

/* ---------- 流程：顶部进度条依次走完 ---------- */
.motion .step::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--blue), #22B8F0); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s cubic-bezier(.3,.6,.2,1); }
.motion .step.in::before { transform: scaleX(1); }
.motion .step:nth-child(1)::before { transition-delay: .2s; }
.motion .step:nth-child(2)::before { transition-delay: .9s; }
.motion .step:nth-child(3)::before { transition-delay: 1.6s; }
.motion .step-no { transition: background-color .4s, color .4s; }
.motion .step:hover .step-no { background: var(--blue); color: #fff; }

/* ---------- 案例页 ---------- */
.motion .case-hero .wrap > :is(.crumb, h1, .lede, .case-meta) { opacity: 0; animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
.motion .case-hero h1 { animation-delay: .1s; }
.motion .case-hero .lede { animation-delay: .22s; }
.motion .case-hero .case-meta { animation-delay: .34s; }
.timeline { position: relative; }
.motion .timeline::before { content: ""; position: absolute; left: -2px; top: 0; width: 2px; height: calc(var(--p, 0) * 100%); background: linear-gradient(180deg, var(--blue), var(--orange-b)); }
.motion .tl::before { transition: scale .4s cubic-bezier(.3,1.6,.5,1) .15s; }
.motion .tl[data-rv]:not(.in)::before { scale: 0; }

/* 节点网络在文字后面调淡，保证标题和正文好读 */
.hero-net { -webkit-mask-image: linear-gradient(#000, #000); mask-image: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)); -webkit-mask-image: linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45)); }
@media (min-width: 960px) {
  .hero-net { -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.3) 38%, #000 62%); mask-image: linear-gradient(90deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.3) 38%, #000 62%); }
}

/* 反馈闭环：序号依次点亮 */
.motion .loop-step[data-rv]:not(.in) .loop-no { scale: .4; }
.motion .loop-no { transition: scale .5s cubic-bezier(.3,1.6,.5,1) .25s; animation: live-blue 2.4s ease-out infinite; }
.motion .loop-step:nth-child(2) .loop-no { animation-delay: .6s; } .motion .loop-step:nth-child(3) .loop-no { animation-delay: 1.2s; } .motion .loop-step:nth-child(4) .loop-no { animation-delay: 1.8s; }
@keyframes live-blue { 0% { box-shadow: 0 0 0 0 rgba(37,99,235,.5); } 70%, 100% { box-shadow: 0 0 0 12px rgba(37,99,235,0); } }
