/* ============================================================
   Animated Text Fill — 用背景图填充文字
   一行小字说明，中间那行大字把一张动画贴图裁进笔画里，
   贴图横向平移，字面就一直在流动。全程没有 JS。
   ============================================================ */

@font-face {
  font-family: "Neuton";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/neuton-400.woff2") format("woff2");
}

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/oswald-700.woff2") format("woff2");
}

body {
  font: 400 1em/1.5 "Neuton";
  background: #090d00;
  color: rgba(255, 255, 255, 0.25);
  text-align: center;
  margin: 0;
}

p {
  text-transform: uppercase;
  letter-spacing: 0.5em;
  display: inline-block;
  border: 4px double rgba(255, 255, 255, 0.25);
  border-width: 4px 0;
  padding: 1.5em 0em;
  position: absolute;
  top: 18%;
  left: 50%;
  width: 40em;
  margin: 0 0 0 -20em;
}

p span {
  font: 700 4em/1 "Oswald", sans-serif;
  letter-spacing: 0;
  padding: 0.25em 0 0.325em;
  display: block;
  margin: 0 auto;
  text-shadow: 0 0 80px rgba(255, 255, 255, 0.5);

  /* 把贴图裁进文字里 */
  background: url("../assets/animated-text-fill.png") repeat-y;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  /* 贴图横向平移，字面就流动起来 */
  animation: aitf 80s linear infinite;

  /* 开硬件加速，80 秒的长动画更稳 */
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

@keyframes aitf {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
