/* 大标题入场动效：模糊聚焦 focus / 色块擦过 wipe / 中线展开 rule。
   只有 title-fx.js 接管后的标题（.tfx）才生效；脚本没跑时标题照旧用 data-reveal 淡入。 */
.tfx{--tfx-o:#ec7436;--tfx-expo:cubic-bezier(.16,1,.3,1)}
.tfx:not(.tfx-play){visibility:hidden}
.tfx-box{display:inline-block;position:relative;max-width:100%;vertical-align:top}
.tfx-l{display:block}
.tfx-t{display:inline-block;position:relative}
.tfx-in{display:inline-block}
.tfx-w{display:inline-block;white-space:nowrap}
.tfx-c{display:inline-block}
.tfx-u{display:block}

/* 模糊聚焦：字从两边虚焦散开，往中间收拢对上焦 */
.tfx-play[data-tfx=focus] .tfx-c{animation:tfxFocus 1.5s var(--tfx-expo) calc(var(--l)*320ms + var(--a)*38ms) both}
.tfx-play[data-tfx=focus] .tfx-u{animation:tfxFocus 1.6s var(--tfx-expo) calc(var(--l)*140ms) both}
@keyframes tfxFocus{from{opacity:0;filter:blur(18px);transform:translateX(calc(var(--s)*.55em)) scale(1.15)}35%{opacity:1}to{opacity:1;filter:none;transform:none}}

/* 色块擦过：一块橙色从左扫过去，扫完字留在原地 */
[data-tfx=wipe] .tfx-t::after{content:"";position:absolute;inset:.04em -.12em;background:var(--tfx-o);transform:scaleX(0);pointer-events:none}
[data-tfx=wipe] .tfx-l~.tfx-l .tfx-t::after{background:var(--text,#1d1d1f)}
.tfx-play[data-tfx=wipe] .tfx-t::after{animation:tfxBar 1.05s cubic-bezier(.77,0,.18,1) calc(var(--l)*200ms) both}
.tfx-play[data-tfx=wipe] .tfx-in{animation:tfxShow 1.05s linear calc(var(--l)*200ms) both}
@keyframes tfxBar{0%{transform:scaleX(0);transform-origin:0 50%}50%{transform:scaleX(1);transform-origin:0 50%}50.01%{transform:scaleX(1);transform-origin:100% 50%}100%{transform:scaleX(0);transform-origin:100% 50%}}
@keyframes tfxShow{0%,49.9%{opacity:0}50%,100%{opacity:1}}

/* 中线展开：中间划出一条橙线，上一行从线里升起，下一行从线里落下，线再收走 */
[data-tfx=rule] .tfx-l{overflow:hidden}
.tfx-r{display:block;position:relative;height:0}
.tfx-r::after{content:"";position:absolute;left:-4%;right:-4%;top:-1px;height:2px;background:var(--tfx-o);transform:scaleX(0)}
.tfx-play[data-tfx=rule] .tfx-r::after{animation:tfxRule 1.9s cubic-bezier(.65,0,.2,1) both}
.tfx-play[data-tfx=rule] .tfx-in{animation:tfxRuleA 1s var(--tfx-expo) .4s both}
.tfx-play[data-tfx=rule] .tfx-r~.tfx-l .tfx-in{animation-name:tfxRuleB;animation-delay:.52s}
@keyframes tfxRule{0%{transform:scaleX(0)}28%,68%{transform:scaleX(1)}100%{transform:scaleX(0)}}
@keyframes tfxRuleA{from{transform:translateY(105%)}to{transform:none}}
@keyframes tfxRuleB{from{transform:translateY(-105%)}to{transform:none}}

@media (max-width:600px){.tfx-r::after{left:0;right:0}}
