/* Draw the existing name lines, then the four existing frame sides. */
.line-frame-stroke { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .line-reveal-enabled .line-top-time { clip-path: inset(0 100% 0 0); }
  .line-reveal-enabled .line-bottom-time { clip-path: inset(0 0 0 100%); }

  .line-reveal-enabled .borders-left,
  .line-reveal-enabled .borders-right { border-color: transparent; }

  .line-reveal-enabled .line-frame-stroke {
    display: block;
    position: absolute;
    background: #fff;
    pointer-events: none;
  }
  .line-frame-top,
  .line-frame-bottom { height: 1px; width: calc(100% + 1px); transform: scaleX(0); }
  .line-frame-left,
  .line-frame-right { width: 1px; height: calc(100% + 1px); transform: scaleY(0); }

  .line-frame-top { top: -1px; left: 0; transform-origin: left; }
  .line-frame-right { top: -1px; right: -1px; transform-origin: top; }
  .line-frame-bottom { bottom: -1px; left: -1px; transform-origin: right; }
  .line-frame-left { top: 0; left: -1px; transform-origin: bottom; }

  .line-reveal-running .line-top-time {
    animation: name-line-forward .65s cubic-bezier(.25,.46,.45,.94) both;
  }
  .line-reveal-running .line-bottom-time {
    animation: name-line-backward .65s cubic-bezier(.25,.46,.45,.94) .65s both;
  }
  .line-reveal-running .line-frame-top {
    animation: frame-side-horizontal .35s ease-out 1.3s both;
  }
  .line-reveal-running .line-frame-right {
    animation: frame-side-vertical .35s ease-out 1.65s both;
  }
  .line-reveal-running .line-frame-bottom {
    animation: frame-side-horizontal .35s ease-out 2s both;
  }
  .line-reveal-running .line-frame-left {
    animation: frame-side-vertical .35s ease-out 2.35s both;
  }

  @keyframes name-line-forward {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
  @keyframes name-line-backward {
    from { clip-path: inset(0 0 0 100%); }
    to { clip-path: inset(0 0 0 0); }
  }
  @keyframes frame-side-horizontal {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
  @keyframes frame-side-vertical {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
  }
}
