/* 所有路徑以 pathLength=1 正規化，三字同步開始、等時完成；只寫一次。 */
.title-writing{width:min(780px,100%);aspect-ratio:780/350}
.title-svg{display:block;width:100%;height:100%;overflow:visible}
.draw-shape{fill:none;stroke:#fff;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;stroke-dashoffset:1;animation:draw-together 3.2s linear forwards}
.filled-shape{fill:#fff;fill-opacity:0;animation:draw-together 3.2s linear forwards,fill-in .4s ease-out 3.2s forwards}
@keyframes draw-together{from{stroke-dashoffset:1}to{stroke-dashoffset:0}}
@keyframes fill-in{from{fill-opacity:0;stroke-width:3}to{fill-opacity:1;stroke-width:0}}
/* 完成後文字永久保留，光暈先淡入，再持續於 50%～100% 間循環。 */
.title-glow{opacity:0;animation:glow-on .6s ease-out 3.6s forwards,glow-breathe 2.8s ease-in-out 4.2s infinite}
@keyframes glow-on{from{opacity:0}to{opacity:1}}
@keyframes glow-breathe{0%,100%{opacity:1}50%{opacity:.5}}
@media(prefers-reduced-motion:reduce){.draw-shape,.filled-shape,.title-glow{animation:none}.draw-shape{stroke-dashoffset:0}.filled-shape{fill-opacity:1;stroke-width:0}.title-glow{opacity:1}}

/* 筆畫完成後，使用指定白色 PNG 作為最上層，獨立於光暈動畫。 */
.title-white-top{opacity:0;pointer-events:none;animation:white-top-on .15s linear 3.6s forwards}
@keyframes white-top-on{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.title-white-top{animation:none;opacity:1}}
