/* Optional arrival polish. styles.css owns static visibility and error access;
   bootstrap owns state. This stylesheet never hides a login or workspace. */
.login-entry-splash {
  --entry-handoff-duration: 360ms;
  --entry-handoff-ease: var(--arrival-ease, cubic-bezier(.22, 1, .36, 1));
  --entry-sheen-duration: 3400ms;
  --entry-mark-size: clamp(68px, 7.5vw, 104px);
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
  pointer-events: none !important;
  user-select: none;
  -webkit-user-select: none;
}
.login-entry-splash * { pointer-events: none !important; }
.login-entry-mark {
  display: block;
  position: relative;
  width: var(--entry-mark-size);
  line-height: 0;
}
.login-entry-mark img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  transform: none;
  filter: none;
}

/* The narrow highlight uses the existing N as its exact mask. When masking is
   unavailable the original white image remains the complete static treatment. */
@supports (mask-image: url('/wl/assets/nero-emblem.png')) or (-webkit-mask-image: url('/wl/assets/nero-emblem.png')) {
  #app:is([data-entry-state="restoring"], [data-entry-state="signing-in"], [data-entry-state="workspace-loading"])
    .entry-splash-active .login-entry-mark img { opacity: .94; }
  #app:is([data-entry-state="restoring"], [data-entry-state="signing-in"], [data-entry-state="workspace-loading"])
    .entry-splash-active .login-entry-mark::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 38%, var(--arrival-text, #fff) 49%, transparent 61%);
    background-size: 260% 100%;
    -webkit-mask: url('/wl/assets/nero-emblem.png') center / contain no-repeat;
    mask: url('/wl/assets/nero-emblem.png') center / contain no-repeat;
    opacity: .7;
    animation: entry-mark-sheen var(--entry-sheen-duration) linear infinite;
  }
}
@keyframes entry-mark-sheen {
  from { background-position: 160% 0; }
  to { background-position: -60% 0; }
}

/* The ready home is already usable. Only the white mark briefly remains above
   it; there is no opaque panel, input capture, or animation-dependent gate. */
#app[data-entry-state="home-ready"] .login-entry-splash.entry-splash-leaving:not(.entry-splash-suppressed) {
  display: grid;
  background: transparent;
  opacity: 0;
  will-change: opacity;
}
#app .login-entry-splash.entry-splash-suppressed { display: none !important; }
.entry-home-revealing { will-change: transform, opacity; }

#app:not([data-entry-reduced-motion="false"]) .login-entry-mark::after {
  display: none;
  animation: none;
}
#app:not([data-entry-reduced-motion="false"]) .login-entry-mark img { opacity: 1; }
#app:not([data-entry-reduced-motion="false"]) .entry-splash-leaving { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .login-entry-mark::after { display: none !important; animation: none !important; }
  .login-entry-mark img { opacity: 1 !important; }
  .entry-splash-leaving { display: none !important; }
  .entry-home-revealing { will-change: auto; }
}

/* Visible loading = the N mark; step-by-step progress text stays for assistive tech only. */
#state.status-progress {
  position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important;
  overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
}
@media (prefers-reduced-motion: no-preference) {
  #app:is([data-entry-state="restoring"], [data-entry-state="signing-in"], [data-entry-state="workspace-loading"]) .entry-splash-active .login-entry-mark {
    animation: entry-mark-breathe 2400ms var(--entry-handoff-ease) infinite alternate;
    will-change: transform, filter;
  }
}
@keyframes entry-mark-breathe {
  from { transform: scale(.97); filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
  to { transform: scale(1.03); filter: drop-shadow(0 0 18px rgba(170, 150, 255, .55)); }
}
@media (prefers-reduced-motion: reduce) {
  .entry-splash-active .login-entry-mark { animation: entry-mark-fade 900ms ease-out both; }
}
@keyframes entry-mark-fade { from { opacity: 0; } to { opacity: 1; } }
