/* Boot-layer composition for the orangray.top home page.
   Page-level composition only; component authority stays in components/. */

/* ---------- Loading curtain (a-rotate) ---------- */
.rt-boot-curtain {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--rt-space-5);
  background: var(--rt-color-paper);
}

.rt-boot-curtain__icon {
  width: clamp(96px, 18vmin, 160px);
}

.rt-boot-curtain__icon video {
  display: block;
  width: 100%;
  height: auto;
}

.rt-boot-curtain__text {
  color: var(--rt-color-muted);
  font-size: var(--rt-text-small);
  letter-spacing: 0.32em;
  text-indent: 0.32em;
}

/* ---------- Bar boot-in (c-typewriter pinned over the wayfinding brand) ----------
   视频不进 grid 文档流：absolute 覆盖在 brand 图标正上方。
   章位校准（ffmpeg 末帧实测）：视频 838x116 中图形章 bbox y 11-104（章高/视频高=0.810）、
   x 11-103（左缘偏移 1.31%）。桌面图标 2.5rem=40px → 视频高 40/0.810≈49px、
   left 左移 5px 补偿章内边距；移动端图标 2rem=32px → 视频高 40px、左移 4px。
   播放期间 JS 内联 visibility/opacity 双保险藏静态元素，播完揭开——衔接零位移。 */
.rt-bar-boot-video {
  position: absolute;
  left: calc(var(--rt-space-4) - 5px);
  top: 50%;
  transform: translateY(-50%);
  display: block;
  height: 49px;
  width: auto;
  max-width: min(60vw, 34rem);
  z-index: calc(var(--rt-z-nav) + 1);
  pointer-events: none;
}

/* 播放期间：静态图标隐藏、链接让位；顶栏元素带淡入过渡，播完揭示
   （JS 同时内联 visibility/opacity 兜底，不依赖本类加载时序） */
.rt-wayfinding__brand-icon,
.rt-wayfinding__links {
  transition: opacity var(--rt-duration-base) var(--rt-ease-sign), visibility var(--rt-duration-base) var(--rt-ease-sign);
}

.rt-bar-booting .rt-wayfinding__brand {
  position: relative;
}

.rt-bar-booting .rt-wayfinding__brand-icon,
.rt-bar-booting .rt-wayfinding__links {
  opacity: 0;
  visibility: hidden;
}

@media (max-width: 720px) {
  .rt-bar-boot-video {
    left: calc(var(--rt-space-3) - 4px); /* 移动端图标 2rem 对应校准 */
    height: 40px;
  }
}

/* Status badge rests on the right rail; driven by JS with the V3 erase curve. */
[data-rt-status-slot] {
  will-change: transform, opacity;
}

/* reduced motion: boot layer never intervenes (JS also skips) */
@media (prefers-reduced-motion: reduce) {
  .rt-boot-curtain,
  .rt-bar-boot-video {
    display: none !important;
  }
}
