/* Stage placement and the steel crest geometry from the supplied demo. */
.auth-backdrop {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-crest {
  --slab-scale: .39;
  position: absolute;
  inset: 56px 0 auto;
  height: clamp(144px, 43vw, 252px);
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}

.auth-crest::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 48%, var(--bg-raised), transparent 68%);
}

.slab-scale-wrap {
  transform: scale(var(--slab-scale));
  transform-origin: center;
  grid-area: 1 / 1;
}

.auth-page.is-guest .auth-main { pointer-events: none; }
.auth-page.is-guest .auth-pane { pointer-events: auto; }

@media (max-width: 899px) {
  .auth-page.is-guest main.auth-main { padding-top: clamp(148px, 43vw, 252px); }
}

@media (min-width: 900px) {
  .auth-crest {
    --slab-scale: 1.2;
    inset: 0 0 0 auto;
    width: 63%;
    height: auto;
  }
}

@media (min-width: 680px) and (max-width: 899px) and (max-height: 520px) {
  .auth-page.is-guest main.auth-main { padding-top: 16px; }
  .auth-page.is-guest .auth-pane { margin-inline: 0; }
  .auth-crest { inset: 0 0 0 auto; width: 40%; height: auto; }
}

.slab-scene {
  position: relative;
  width: 400px;
  height: 400px;
  perspective: 1200px;
  cursor: grab;
  touch-action: none;
  pointer-events: auto;
  user-select: none;
}

.slab-scene:active {
  cursor: grabbing;
}

/* 地面动态投影 */
.ground-shadow {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.52) 48%, transparent 74%);
  filter: blur(28px);
  transform: translate3d(0px, 42px, -110px) scale(0.95);
  pointer-events: none;
  will-change: transform, opacity;
}

/* 3D 实心钢板主体 */
.slab-3d {
  position: relative;
  width: 400px;
  height: 400px;
  transform-style: preserve-3d;
  will-change: transform;
}

/* 72面无缝圆柱 CNC 车削钢板侧壁容器 */
.edge-wall {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

.edge-facet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
  backface-visibility: visible;
  /* CNC 车床横向精细车削纹 + 上下倒角高光条 */
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.72) 0%,
      rgba(255, 255, 255, 0.14) 8%,
      rgba(0, 0, 0, 0.22) 15%,
      rgba(255, 255, 255, 0.04) 24%,
      rgba(0, 0, 0, 0.12) 34%,
      rgba(255, 255, 255, 0.10) 50%,
      rgba(0, 0, 0, 0.14) 66%,
      rgba(255, 255, 255, 0.05) 78%,
      rgba(0, 0, 0, 0.26) 87%,
      rgba(255, 255, 255, 0.18) 93%,
      rgba(255, 255, 255, 0.65) 100%
    );
  will-change: background-color;
}

/* 正面基底钢板 */
.slab-front-base {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  pointer-events: none;
}

/* 正面立体冲压/精雕浮雕层（物理 Z 轴凸起 +3.5px） */
.slab-front-relief {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
  filter: drop-shadow(0 3px 3.5px rgba(0, 0, 0, 0.55));
}

/* 正面表层动态扫光 */
.slab-front-sheen {
  position: absolute;
  inset: 2.4px;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: .78;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.sheen-beam {
  position: absolute;
  inset: -45%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.42) 0%,
    rgba(225, 238, 255, 0.16) 24%,
    rgba(255, 255, 255, 0.03) 48%,
    transparent 68%
  );
  will-change: transform;
}

.idle-glint {
  position: absolute;
  top: -20%;
  left: -130%;
  width: 52%;
  height: 140%;
  background: linear-gradient(
    106deg,
    transparent 0%,
    rgba(255, 255, 255, 0.04) 32%,
    rgba(255, 255, 255, 0.34) 50%,
    rgba(255, 255, 255, 0.04) 68%,
    transparent 100%
  );
  transform: skewX(-22deg);
  animation: glintSweep 7s ease-in-out infinite;
}

@keyframes glintSweep {
  0%, 64% { left: -130%; opacity: 0; }
  70% { opacity: 1; }
  90% { left: 165%; opacity: 0.85; }
  100% { left: 165%; opacity: 0; }
}

/* 背面 CNC 精加工钢板与激光蚀刻铭文 */
.slab-back {
  position: absolute;
  inset: 2.5px;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.25),
    inset 0 0 28px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.crest-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.slab-3d { transform: rotateX(14deg) rotateY(-22deg); }
.slab-front-base { transform: translateZ(15px); }
.slab-front-relief { transform: translateZ(18.5px); }
.slab-front-sheen { transform: translateZ(19.2px); }
.slab-back { transform: translateZ(-15px) rotateY(180deg); }
.edge-facet { height: 30px; margin-top: -15px; }

/* Bake the filtered SVG faces on small screens so orbiting only updates the 3D transform. */
.is-lite .slab-front-base {
  background: url("brand/crest-mobile-front.webp") center / 100% 100% no-repeat;
}
.is-lite .slab-back {
  background: url("brand/crest-mobile-back.webp") center / 100% 100% no-repeat;
}
.is-lite .slab-front-base svg,
.is-lite .slab-back svg,
.is-lite .slab-front-relief,
.is-lite .slab-front-sheen { display: none; }
.is-lite .ground-shadow { filter: none; will-change: auto; }
.is-lite .edge-facet { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  .idle-glint { animation: none; }
}
