:root { --m-ease: cubic-bezier(.65,0,.2,1); --m-out: cubic-bezier(.2,.8,.2,1); --m-red: #961e20; }

.m-hit { position: absolute; z-index: 5; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 20px; }
.m-hit:focus-visible { outline: 3px solid var(--m-red); outline-offset: 3px; }
.m-frame { position: absolute; overflow: hidden; pointer-events: none; isolation: isolate; }
.m-frame img { position: absolute; transform-origin: 0 0; will-change: transform; transition: transform .9s cubic-bezier(.22,1,.36,1); }

/* 首屏 */
.m-rise .line, .m-rise-late .line { clip-path: inset(-10% -5% 0 -5%); }
.m-char { display: inline-block; animation: m-char .8s var(--m-out) calc(var(--i) * 45ms + .05s) both; }
.m-rise-late .m-char { animation-delay: calc(var(--i) * 55ms + .75s); }
@keyframes m-char { from { transform: translateY(105%); } to { transform: none; } }

/* 数据镜头 */
.copy { transition: opacity .45s; }
.m-dim { opacity: .28; }
.m-metric-line { position: absolute; z-index: 3; background: var(--m-red); opacity: 0; pointer-events: none; transition: transform .6s var(--m-ease), opacity .3s; }

/* 一天 */
.m-card { transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .45s; }
img.m-card, .m-shade { will-change: transform; }
.m-shade { position: absolute; z-index: 1; border-radius: 29px; background: rgba(40,24,16,.2); opacity: 0; pointer-events: none; }
/* 移动中的毛玻璃每帧都要重新模糊，这里换成半透明底色 */
.m-glass { backdrop-filter: none !important; background: rgba(105,88,76,.5) !important; }
.m-glass::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: rgba(150,30,32,.88); opacity: 0; transition: opacity .35s; }
.m-glass.m-now::after { opacity: 1; }
.m-track { position: absolute; z-index: 3; background: rgba(150,30,32,.2); opacity: 0; pointer-events: none; transition: opacity .4s; }
.m-sun { position: absolute; z-index: 3; border-radius: 50%; background: var(--m-red); box-shadow: 0 0 0 6px rgba(150,30,32,.14); opacity: 0; pointer-events: none; transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .4s; }

/* C5A */
.m-slider { position: absolute; z-index: 2; border-radius: 21px; background: linear-gradient(110deg,#9d2526,#6f1716); box-shadow: 0 16px 30px rgba(130,28,28,.32); opacity: 0; pointer-events: none; transition: transform .6s cubic-bezier(.34,1.3,.5,1), opacity .35s; }
.motion .copy.m-on { color: #fff !important; transition: color .35s .08s; }
.m-step { position: absolute; z-index: 3; border-radius: 50%; border: 1.5px solid var(--m-red); pointer-events: none; transition: background-color .35s; }
.m-step.m-passed { background: var(--m-red); }

/* NEX */
.m-ring { position: absolute; z-index: 2; border-radius: 21px; border: 2px solid var(--m-red); background: rgba(150,30,32,.07); opacity: 0; pointer-events: none; transition: transform .6s var(--m-ease), opacity .3s; }

/* 成果 */
.m-ratio { position: absolute; z-index: 3; pointer-events: none; }
.m-ratio i, .m-ratio b { position: absolute; top: 0; height: 100%; transform-origin: left; transform: scaleX(0); }
.m-ratio i { left: 0; background: rgba(255,244,230,.38); transition: transform .8s var(--m-ease); }
.m-ratio b { background: #ffd9a8; transition: transform .7s var(--m-out) .85s; }
.m-ratio.m-in i, .m-ratio.m-in b { transform: scaleX(1); }
.m-number { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--m-ease) .5s; }
.m-number.m-in { clip-path: inset(-10% -5% -10% 0); }

.m-note { position: absolute; z-index: 3; pointer-events: none; font-size: 11px; line-height: 16px; color: rgba(255,244,230,.7); }

/* 媒体标签里升起的屏 */
.m-peek { position: absolute; z-index: 5; overflow: hidden; border-radius: 22px; border: 6px solid #fbf4e9; box-shadow: 0 26px 50px rgba(70,30,18,.34); pointer-events: none; clip-path: inset(100% 30% 0 30% round 22px); opacity: 0; transition: clip-path .55s var(--m-ease), opacity .3s; }
.m-peek.m-open { clip-path: inset(0 round 22px); opacity: 1; }
.m-peek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.18); transition: opacity .35s, transform 1s var(--m-out); }
.m-peek img.m-show { opacity: 1; transform: none; }

/* 更贴近 */
.m-apart .line { letter-spacing: 15px !important; transition: letter-spacing 1.4s var(--m-ease); }
html[data-lang="en"] .m-apart .line,
html[data-lang="vn"] .m-apart .line { letter-spacing: 1px !important; }
.m-apart.m-in .line { letter-spacing: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .m-number { clip-path: none; }
  .m-ratio i, .m-ratio b { transform: none; }
}

/* ===== 小按钮、链接、导航 ===== */
.m-link { position: absolute; z-index: 5; border-radius: 24px; }
.m-link:focus-visible { outline: 3px solid var(--m-red); outline-offset: 3px; }
.m-pill { overflow: hidden; }
.m-fill { position: absolute; inset: 0; border-radius: inherit; background: var(--m-red); transform: translateY(102%); transition: transform .42s cubic-bezier(.22,1,.36,1) var(--chip-wait, 0ms); }
.m-fill-deep { background: #5c1112; }
.m-pill.m-hover .m-fill, .m-chip-on .m-fill { transform: none; }
.motion .copy, .motion span.decoration { transition: color .25s, opacity .4s, transform .5s cubic-bezier(.22,1,.36,1); }
.motion .m-light-text { color: #fff !important; }
.motion .m-red-text { color: var(--m-red) !important; }
.motion span.decoration.m-arrow-go { transform: translate(4px, -3px); }
.motion .m-pill ~ span.decoration.m-arrow-go { color: #fff !important; }
.m-underline { position: absolute; z-index: 3; background: var(--m-red); transform: scaleX(0); transform-origin: right; pointer-events: none; transition: transform .4s cubic-bezier(.22,1,.36,1); }
.m-underline.m-hover { transform: none; transform-origin: left; }
.m-nav-pill { position: absolute; z-index: 5; border-radius: 22px; background: rgba(150,30,32,.1); transform-origin: left center; opacity: 0; pointer-events: none; transition: transform .45s cubic-bezier(.22,1,.36,1), opacity .25s; }
header a.hotspot .copy { transition: color .25s, transform .3s cubic-bezier(.22,1,.36,1); }
header a.m-nav-on .copy { color: var(--m-red) !important; }
header a.hotspot:hover .copy { transform: translateY(-1.5px); }
header a.m-press .copy { transform: translateY(1px) scale(.96); }
.m-logo { transition: transform .4s cubic-bezier(.34,1.5,.5,1); }
.m-logo.m-hover { transform: scale(1.06); }

/* ===== 栏目页 ===== */
.m-card { transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .45s, color .25s; }
.motion .copy.m-card, .motion span.decoration.m-card { transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .45s, color .25s; }
.m-top { z-index: 4 !important; }
.copy.m-top { z-index: 5 !important; }
.m-uncover { clip-path: inset(100% -5% 0 -5%); transition: clip-path .8s cubic-bezier(.22,1,.36,1), opacity .4s !important; }
.m-uncover.m-in { clip-path: inset(-10% -5% -10% -5%); }
.m-spot { position: absolute; z-index: 1; overflow: hidden; pointer-events: none; }
.m-spot i { position: absolute; border-radius: 6px; box-shadow: 0 0 0 1000px rgba(24,12,8,.46), 0 0 0 1.5px rgba(255,226,190,.9); opacity: 0; transition: opacity .4s; }
.m-spot.m-on-spot i { opacity: 1; }
.m-year { position: absolute; z-index: 1; border-radius: 28px; background: linear-gradient(120deg,#9d2526,#6f1716); opacity: 0; pointer-events: none; }
.m-year.m-in { opacity: 1; }
.m-year.m-card { transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .45s; }
.m-logo-in { opacity: 0; translate: 0 14px; }
.m-logo-in.m-card { transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .5s var(--wait), translate .6s cubic-bezier(.22,1,.36,1) var(--wait); }
.m-logo-in.m-in { opacity: 1; translate: 0 0; }
.m-frame.m-card { transition: transform .5s cubic-bezier(.22,1,.36,1); }

@media (prefers-reduced-motion: reduce) {
  .m-logo-in { opacity: 1; transform: none; translate: none; }
}

/* 六步链路 */
.m-flow { overflow: hidden; border-radius: 28px; }
.m-flow i { position: absolute; left: 44px; right: 44px; bottom: 16px; height: 3px; border-radius: 2px; background: rgba(255,238,220,.85); transform: scaleX(0); transform-origin: left; }
.m-flow i.m-run { animation: m-fill 2.2s linear both; }
.m-flow.m-hold i, .m-flow.m-away i { animation-play-state: paused; }
@keyframes m-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* NEX Brain 顶部三张卡的细条 */
.m-stepbar { position: absolute; z-index: 3; background: var(--m-red); border-radius: 0 0 4px 4px; transform: scaleX(0); transform-origin: left; pointer-events: none; transition: transform .5s cubic-bezier(.22,1,.36,1); }
.m-stepbar.m-in { transform: none; }
.m-flow-side i { left: 52px; right: 52px; bottom: 7px; height: 2px; }
.m-flow-side { transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .25s !important; }
.m-flow-side ~ .m-frame img, body[data-page="brain"] main .m-frame img { transition-duration: .45s; }


/* 轻柔：保留动画，幅度小、不回弹 */
.motion .stage *, .motion .stage *::before, .motion .stage *::after, .motion .sitenav * { transition-timing-function: cubic-bezier(.25,.8,.3,1) !important; }
.motion .copy.m-red-on { color: var(--m-red) !important; }
.motion .copy { transition: color .35s, opacity .4s, transform .5s; }
.m-dim { opacity: .45; }
.m-spot i { box-shadow: 0 0 0 1000px rgba(24,12,8,.26), 0 0 0 1px rgba(255,226,190,.8); }
.motion .m-reveal { opacity: 0; translate: 0 14px; transition: opacity .6s var(--wait), translate .7s var(--wait), transform .45s, color .35s !important; transition-delay: var(--wait), var(--wait), 0s, 0s !important; }
.motion .m-reveal.m-in { opacity: 1; translate: 0 0; }
.m-digit { display: inline-block; white-space: pre; opacity: 0; transform: translateY(.18em); transition: opacity .55s, transform .65s; }
.m-in .m-digit { opacity: 1; transform: none; transition-delay: calc(var(--i) * 70ms + .2s) !important; }

/* 不用大红底做反馈：选中项只变字色 */
.m-slider { display: none !important; }
.motion .copy.m-on { color: var(--m-red) !important; }
.m-glass::after { display: none; }
.motion .copy.m-gold-on { color: #ffd9a0 !important; }
.m-fill:not(.m-fill-deep) { background: rgba(150,30,32,.09); }

/* 标题和链接下方不画线，悬停只变字色 */
.m-underline { display: none !important; }
/* 悬停时箭头跟文字一起变红，避免在浅底上变白消失 */
.motion .m-pill ~ span.decoration.m-arrow-go, .motion span.decoration.m-arrow-go { color: var(--m-red) !important; }
