/* 加载动画：以网站 LOGO 的线条逐笔绘出，随后光圈缓慢转动 */
.boot {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--ink);
  transition: opacity .45s ease, visibility .45s;
  --speed: 1; /* 快速模式下会变为 0.5 */
}
/* 首次加载：兜底 8 秒后自动消失 */
.boot.first-load { animation: boot-failsafe .01s linear 8s forwards; }
@keyframes boot-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot.quick { --speed: 0.55; }

.boot-logo { width: 120px; height: 120px; overflow: visible; }
.boot.run .boot-logo .d {
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: boot-draw calc(.8s * var(--speed)) cubic-bezier(.4, 0, .2, 1) forwards;
  animation-delay: calc(var(--d, 0s) * var(--speed));
}
@keyframes boot-draw { to { stroke-dashoffset: 0; } }
.boot.run .boot-logo .spin {
  transform-origin: 80px 40px;
  animation: boot-spin 6s linear calc(1.7s * var(--speed)) infinite;
}
@keyframes boot-spin { to { transform: rotate(360deg); } }

.boot-text { text-align: center; opacity: 0; }
.boot.run .boot-text { animation: boot-fade calc(.6s * var(--speed)) ease calc(1.1s * var(--speed)) forwards; }
.boot-name { font-size: 18px; font-weight: 700; letter-spacing: .12em; }
.boot-sub { margin-top: 2px; font-size: 10px; letter-spacing: .26em; color: var(--ink-3); text-transform: uppercase; }
@keyframes boot-fade { to { opacity: 1; } }

.boot-line { width: 120px; height: 2px; background: var(--line); overflow: hidden; }
.boot-line i { display: block; height: 100%; width: 40%; background: var(--ink); animation: boot-slide 1.1s ease-in-out infinite; }
@keyframes boot-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

@media (prefers-reduced-motion: reduce) {
  .boot.run .boot-logo .d { animation: none; stroke-dashoffset: 0; }
  .boot-logo .spin, .boot-line i { animation: none; }
  .boot-text { animation: none; opacity: 1; }
}
