/* Decorative, fixed-size brand scenes. No controls and no layout movement. */
.login-brand-stage[data-login-brand], .login-header-avatar[data-login-brand] {
  position: relative;
  min-width: 0;
  isolation: isolate;
  pointer-events: none;
  user-select: none;
}
.login-brand-stage[data-login-brand] {
  width: 100%;
  max-width: 500px;
  height: var(--login-brand-height, 380px);
  margin-inline: auto;
}
.login-header-avatar[data-login-brand] { width: 94px; height: var(--login-header-avatar-height, 76px); flex: 0 0 auto; }
.login-brand-ui { --lb-drift: -3px; --lb-sway: .45deg; position: absolute; inset: 0; min-width: 0; pointer-events: none; }
.login-brand-ui *, .login-brand-ui *::before, .login-brand-ui *::after { pointer-events: none; }
.lb-scene-frame { position: absolute; inset: 0; }
.lb-scene {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1100ms ease-in-out, visibility 0s linear 1100ms;
}
.lb-scene.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.lb-presence { position: relative; width: min(91%, calc(var(--login-brand-height, 380px) - 12px)); transform-origin: 50% 100%; }
.lb-duo { position: relative; width: 100%; aspect-ratio: 1; isolation: isolate; transform-origin: 50% 88%; animation: lb-character-breathe 5.8s ease-in-out infinite; }
.lb-scene-think .lb-duo { animation-duration: 6.8s; }
.lb-scene.is-active .lb-presence, .lb-scene.is-active .lb-school-presence { animation: lb-materialize 1300ms cubic-bezier(.2, .65, .3, 1) both; }
.lb-duo-pose {
  --lb-pose-position: 0 0;
  display: none;
  position: absolute;
  inset: 0;
  background-image: url('./assets/study-duo-atlas.png');
  background-size: 200% 200%;
  background-repeat: no-repeat;
  background-position: var(--lb-pose-position);
  filter: drop-shadow(0 12px 15px rgba(9, 6, 30, .18));
}
.lb-atlas-ready .lb-duo-pose { display: block; }
.lb-reading-first { animation: lb-reading-first 6s ease-in-out infinite; }
.lb-reading-second { --lb-pose-position: 0 100%; opacity: 0; animation: lb-reading-second 6s ease-in-out infinite; }
.lb-thinking-pose { --lb-pose-position: 100% 0; }
.lb-fallback { position: absolute; top: 3%; width: 61%; height: 94%; background: url('./assets/mascots/mascot-atlas.png') 33.333333% 0 / 400% 200% no-repeat; }
.lb-fallback-xiaoyuan { left: -5%; }
.lb-fallback-marx { right: -5%; background-position: 33.333333% 100%; }
.lb-scene-think .lb-fallback-xiaoyuan { background-position: 66.666667% 0; }
.lb-scene-think .lb-fallback-marx { background-position: 66.666667% 100%; }
.lb-atlas-ready .lb-fallback { display: none; }

/* Soft projection light stays behind the original figures, never over the form. */
.lb-stage-glow { position: absolute; inset: 8% 3% 0; border-radius: 50%; background: radial-gradient(ellipse, rgba(169, 147, 232, .16), rgba(125, 102, 187, .045) 50%, transparent 72%); animation: lb-ambient-light 7s ease-in-out infinite; }
.lb-projection-light { position: absolute; inset: 5% 8% 4%; background: linear-gradient(0deg, rgba(191, 174, 255, .085), rgba(163, 175, 255, .02) 55%, transparent 87%); clip-path: polygon(24% 100%, 76% 100%, 100% 0, 0 0); }
.lb-projection { position: absolute; left: 15%; right: 15%; bottom: 2%; height: 7%; }
.lb-projection-ring { position: absolute; inset: 0; border: 1px solid rgba(179, 168, 231, .22); border-top-color: rgba(221, 209, 255, .43); border-radius: 50%; box-shadow: 0 0 15px rgba(158, 141, 226, .12), inset 0 0 10px rgba(169, 158, 235, .06); opacity: .5; animation: lb-projection-ring 5.6s ease-in-out infinite; }
.lb-projection-ring-next { animation-delay: -2.8s; }
@supports (mask-image: url('./assets/study-duo-atlas.png')) or (-webkit-mask-image: url('./assets/study-duo-atlas.png')) {
  .lb-duo-pose::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(220, 225, 255, .09) 47%, rgba(242, 238, 255, .32) 50%, rgba(198, 206, 255, .1) 53%, transparent 58%);
    background-size: 100% 280%;
    background-position: 0 130%;
    -webkit-mask-image: url('./assets/study-duo-atlas.png');
    mask-image: url('./assets/study-duo-atlas.png');
    -webkit-mask-size: 200% 200%;
    mask-size: 200% 200%;
    -webkit-mask-position: var(--lb-pose-position);
    mask-position: var(--lb-pose-position);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    animation: lb-figure-scan 7.8s ease-in-out infinite;
  }
}
/* Each leaf turns around the fold of the illustrated open book. */
.lb-turning-page {
  position: absolute;
  left: 50.8%;
  top: 56.5%;
  width: 21%;
  height: 9.5%;
  border-radius: 1% 80% 10% 0;
  background: linear-gradient(160deg, #fff9e9e8, #ead9bdab);
  box-shadow: inset 0 -1px rgba(196, 169, 134, .22);
  transform-origin: 0 100%;
  opacity: 0;
  animation: lb-turn-page 3.6s cubic-bezier(.35, 0, .3, 1) infinite;
}
.lb-turning-page-next { animation-delay: -1.8s; }
.lb-thought-dots { position: absolute; top: 5%; right: 5%; display: flex; gap: 4px; align-items: center; height: 8px; }
.lb-thought-dots i { width: 4px; height: 4px; border-radius: 50%; background: #e4d8f9; box-shadow: 0 0 6px rgba(216, 200, 244, .4); animation: lb-thought-dot 2.8s ease-in-out infinite; }
.lb-thought-dots i:nth-child(2) { animation-delay: .25s; }
.lb-thought-dots i:nth-child(3) { animation-delay: .5s; }
.lb-thought-star { position: absolute; left: 1%; top: 28%; width: 13px; aspect-ratio: 1; background: #f4e3ba; clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 37%); opacity: .65; animation: lb-thought-light 4.6s ease-in-out infinite; }
.lb-scene:not(.is-active) *, .lb-scene:not(.is-active) *::before, .lb-scene:not(.is-active) *::after { animation-play-state: paused !important; }

/* Keep the supplied white logo intact; only its exact alpha mask receives light. */
.school-mark { position: relative; display: block; width: min(100%, 507px); max-width: 100%; aspect-ratio: 507 / 107; line-height: 0; isolation: isolate; }
.school-mark > img { display: block; width: 100%; height: auto; aspect-ratio: 507 / 107; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.school-mark::after { content: none; pointer-events: none; }
@supports (mask-image: url('./assets/dut-marxism-logo.png')) or (-webkit-mask-image: url('./assets/dut-marxism-logo.png')) {
  .school-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(108deg, transparent 46%, rgba(221, 208, 182, .08) 48%, rgba(229, 205, 159, .5) 49.2%, rgba(255, 250, 230, .96) 49.8%, rgba(255, 255, 255, 1) 50.1%, rgba(204, 222, 246, .48) 50.8%, rgba(207, 217, 246, .06) 52%, transparent 54%);
    background-size: 240% 100%;
    background-position: 135% 0;
    -webkit-mask-image: url('./assets/dut-marxism-logo.png');
    mask-image: url('./assets/dut-marxism-logo.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    opacity: 0;
    animation: lb-logo-light 9.6s cubic-bezier(.25, .4, .4, 1) infinite;
  }
}
.school-mark--header { width: clamp(190px, 23vw, 286px); flex: 0 1 auto; }
.school-mark--header::after { animation-delay: .65s; }
.lb-school-presence { position: relative; display: grid; place-items: center; width: 100%; }
.school-mark--stage { width: min(calc(100% - 36px), 430px); }
.lb-scene-school .lb-projection { left: 18%; right: 18%; bottom: 25%; height: 5%; opacity: .7; }
.lb-scene-school .lb-projection-light { inset: 18% 10% 28%; opacity: .7; }
.lb-school-fallback { color: #f1e9fa; text-align: center; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: clamp(16px, 2vw, 24px); font-weight: 600; line-height: 1.85; letter-spacing: .08em; }
.lb-school-fallback[hidden] { display: none !important; }
.lb-logo-unavailable .school-mark--stage { display: none; }

/* The compact brand uses the same two people, without a badge or letter tile. */
.lb-variant-header { --lb-drift: -1px; --lb-sway: .4deg; }
.lb-variant-header .lb-presence { width: min(100%, var(--login-header-avatar-height, 76px)); }
.lb-variant-header .lb-duo-pose { filter: drop-shadow(0 3px 4px rgba(12, 8, 31, .2)); }
.lb-variant-header .lb-stage-glow { inset: 7% 0 0; opacity: .65; }
.lb-variant-header .lb-projection { left: 13%; right: 13%; height: 6%; }
.lb-variant-header .lb-projection-ring { border-color: rgba(201, 187, 244, .22); box-shadow: 0 0 6px rgba(158, 141, 226, .12); }
.lb-variant-header .lb-projection-light { opacity: .6; }
.lb-variant-header .lb-thought-dots { right: 0; top: 1%; gap: 2px; height: 5px; }
.lb-variant-header .lb-thought-dots i { width: 2px; height: 2px; }
.lb-variant-header .lb-thought-star { width: 5px; left: 0; }
.lb-variant-header .lb-duo-pose::after { opacity: .75; }
.lb-is-paused *, .lb-is-paused *::before, .lb-is-paused *::after { animation-play-state: paused !important; }
.lb-is-paused .lb-presence, .lb-is-paused .lb-school-presence { animation: none !important; }
.lb-is-paused .lb-reading-first { animation: none !important; opacity: 1; }
.lb-is-paused .lb-reading-second { animation: none !important; opacity: 0; }
.login-brand-motion-paused .school-mark::after { animation-play-state: paused !important; }
.lb-is-reduced .lb-scene { transition: none; }
.lb-is-reduced *, .lb-is-reduced *::before, .lb-is-reduced *::after { animation: none !important; }
.lb-is-reduced .lb-reading-first { opacity: 1; }
.lb-is-reduced .lb-reading-second, .lb-is-reduced .lb-turning-page, .lb-is-reduced .lb-duo-pose::after { opacity: 0; }
html[data-motion="off"] .school-mark::after { animation: none; opacity: 0; }

@keyframes lb-materialize { 0% { opacity: .3; transform: translateY(6px) scale(.985); filter: brightness(1.18) blur(1.5px); } 60% { opacity: .95; filter: brightness(1.04) blur(0); } 100% { opacity: 1; transform: translateY(0) scale(1); filter: brightness(1) blur(0); } }
@keyframes lb-character-breathe { 0%,100% { transform: translateY(0) rotate(0deg); } 48% { transform: translateY(var(--lb-drift)) rotate(var(--lb-sway)); } 76% { transform: translateY(-1px) rotate(calc(0deg - var(--lb-sway))); } }
@keyframes lb-reading-first { 0%,24%,100% { opacity: 1; } 44%,80% { opacity: 0; } }
@keyframes lb-reading-second { 0%,24%,100% { opacity: 0; } 44%,80% { opacity: 1; } }
@keyframes lb-turn-page { 0%,10%,100% { opacity: 0; transform: perspective(300px) rotateY(0deg) rotateZ(-9deg); } 20% { opacity: .67; } 52% { opacity: .55; transform: perspective(300px) rotateY(-130deg) rotateZ(-7deg); } 70%,82% { opacity: 0; transform: perspective(300px) rotateY(-180deg) rotateZ(-6deg); } }
@keyframes lb-thought-dot { 0%,72%,100% { opacity: .25; transform: translateY(0); } 32% { opacity: .9; transform: translateY(-2px); } }
@keyframes lb-thought-light { 0%,100% { opacity: .25; transform: scale(.83) rotate(-8deg); } 50% { opacity: .8; transform: scale(1) rotate(8deg); } }
@keyframes lb-ambient-light { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes lb-projection-ring { 0%,100% { opacity: .08; transform: scale(.82); } 38% { opacity: .56; } 82% { opacity: .06; transform: scale(1.14); } }
@keyframes lb-figure-scan { 0%,17% { background-position: 0 130%; } 76%,100% { background-position: 0 -130%; } }
@keyframes lb-logo-light {
  0%, 8% { background-position: 135% 0; opacity: 0; }
  10% { opacity: .92; }
  28% { background-position: -35% 0; opacity: .92; }
  32%, 100% { background-position: -35% 0; opacity: 0; }
}
@media (max-width: 600px) {
  .login-brand-stage[data-login-brand] { height: var(--login-brand-height, 240px); }
  .lb-variant-hero .lb-presence { width: min(89%, calc(var(--login-brand-height, 240px) - 12px)); }
  .school-mark--stage { width: min(calc(100% - 22px), 350px); }
  .school-mark--header { width: min(47vw, 238px); }
}
@media (prefers-reduced-motion: reduce) {
  .login-brand-ui *, .login-brand-ui *::before, .login-brand-ui *::after, .school-mark::after { animation: none !important; }
  .login-brand-ui .lb-scene { transition: none; }
  .login-brand-ui .lb-reading-first { opacity: 1; }
  .login-brand-ui .lb-reading-second, .login-brand-ui .lb-turning-page, .login-brand-ui .lb-duo-pose::after, .school-mark::after { opacity: 0; }
}
