html.has-name-motion #intro-title {
  visibility: hidden;
}

html.has-name-motion.is-name-motion-ready #intro-title {
  visibility: visible;
}

html.has-name-motion .intro {
  animation: none;
}

html.has-name-motion #intro-title {
  position: relative;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(17, 17, 17, 0.42);
  animation: name-outline-settle 2500ms 120ms ease both;
}

html.has-name-motion #intro-title::after {
  position: absolute;
  inset: 0;
  color: var(--text);
  -webkit-text-stroke: 0;
  clip-path: inset(0 100% 0 0);
  content: attr(data-text);
  animation: name-trace-fill 2150ms 260ms cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

html.has-name-motion #intro-title::before {
  position: absolute;
  right: 0;
  bottom: -14px;
  left: 0;
  height: 2px;
  background: var(--text);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  animation: name-trace-line 2350ms 180ms cubic-bezier(0.65, 0, 0.35, 1) both;
}

@keyframes name-trace-fill {
  to {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes name-trace-line {
  0% {
    opacity: 0;
    transform: scaleX(0);
  }

  12%,
  78% {
    opacity: 1;
  }

  78% {
    transform: scaleX(1);
    transform-origin: left;
  }

  100% {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: right;
  }
}

@keyframes name-outline-settle {
  0% {
    letter-spacing: 0.035em;
    opacity: 0;
  }

  28%,
  100% {
    letter-spacing: normal;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.has-name-motion #intro-title {
    animation: none;
    color: var(--text);
    opacity: 1;
    -webkit-text-stroke: 0;
  }

  html.has-name-motion #intro-title::before,
  html.has-name-motion #intro-title::after {
    display: none;
  }
}
