html { min-height: 100%; background: var(--void); }
.login-page { position: relative; min-height: 100svh; margin: 0; overflow-x: hidden; background: var(--void); color: var(--text); font-family: var(--font-body); }
.login-page a { color: var(--strategy); }
.login-shell { display: grid; grid-template-columns: minmax(0, 60fr) minmax(420px, 40fr); min-height: 100svh; }

.login-art { position: relative; overflow: hidden; min-height: 100svh; }
.login-art > img { position: absolute; left: -3%; top: -7%; width: 119%; height: 114%; object-fit: cover; object-position: 50% 35%; }
.login-art-scan, .login-art-fade { position: absolute; inset: 0; }
.login-art-fade { background: linear-gradient(90deg, rgba(4, 9, 15, 0) 55%, var(--void) 100%); }
.login-tagline { position: absolute; left: 48px; bottom: 48px; display: flex; flex-direction: column; gap: 8px; }
.login-tagline-kicker { color: var(--strategy); font-size: 12px; letter-spacing: .14em; }
.login-tagline-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 3.1vw, 44px); line-height: 1.05; letter-spacing: .02em; }

.login-panel { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 40px 88px 40px 40px; }
.login-claws { position: absolute; right: 30px; top: 40px; opacity: .07; fill: var(--strategy); pointer-events: none; }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand img { width: 52px; height: 52px; object-fit: contain; }
.login-wordmark { font-size: 22px; letter-spacing: .12em; }
.login-terminal { margin-top: 2px; color: var(--text-muted); font-size: 11px; letter-spacing: .2em; }
.login-boot { padding-left: 16px; border-left: 1px solid var(--line); color: var(--text-muted); font-size: 13px; line-height: 1.9; }
.boot-ok { color: var(--strategy); }
.boot-wait { color: var(--ops); }
.login-copy { display: flex; flex-direction: column; gap: 10px; }
.login-copy h1 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 40px; letter-spacing: .04em; }
.login-copy p { max-width: 420px; margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.6; }
.login-spacer { display: none; }
.login-error { display: none; align-items: center; gap: 10px; max-width: 440px; padding: 10px 14px; border: 1px solid var(--warn-edge); background: var(--warn-bg); color: var(--warn-text); font-size: 13px; }
.login-error:target { display: flex; }
.login-error svg { flex: 0 0 auto; color: var(--ops); }
.login-page .login-cta { display: flex; align-items: center; justify-content: space-between; max-width: 440px; height: 60px; padding: 0 24px; background: var(--strategy-fill); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .1em; text-decoration: none; transition: box-shadow .2s, background .2s; }
.login-page .login-cta:hover { background: var(--strategy-fill-hover); box-shadow: 0 0 0 1px var(--strategy-hover), 0 0 32px rgba(60, 200, 255, .45); }
.login-page .login-cta:focus-visible { outline: 2px solid var(--strategy-hover); outline-offset: 4px; }
.login-baseline { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--strategy) 30%, var(--strategy) 70%, transparent); opacity: .5; pointer-events: none; }

@media (max-width: 899px) {
  .login-shell { display: flex; flex-direction: column; }
  .login-art { flex: 0 0 330px; min-height: 330px; }
  .login-art > img { left: -15%; top: -40px; width: 130%; height: auto; aspect-ratio: 1; object-position: 50% 30%; }
  .login-art-fade { background: linear-gradient(180deg, rgba(4, 9, 15, 0) 40%, var(--void) 100%); }
  .login-tagline { left: 20px; bottom: 16px; }
  .login-tagline-kicker { font-size: 11px; }
  .login-tagline-title { display: none; }
  .login-panel { flex: 1 1 auto; justify-content: flex-start; gap: 22px; padding: 18px 20px 28px; }
  .login-claws { display: none; }
  .login-brand { gap: 12px; }
  .login-brand img { width: 40px; height: 40px; }
  .login-wordmark { font-size: 18px; }
  .login-terminal { font-size: 10px; }
  .login-boot { padding-left: 12px; font-size: 12px; line-height: 1.8; }
  .boot-dots { letter-spacing: -.12em; }
  .boot-last { display: none; }
  .login-copy { gap: 8px; }
  .login-copy h1 { font-size: 32px; }
  .login-copy p { font-size: 14px; }
  .login-spacer { display: block; flex-grow: 1; }
  .login-error, .login-page .login-cta { max-width: none; }
  .login-page .login-cta { height: 56px; padding: 0 20px; font-size: 16px; }
  .login-baseline { display: none; }
}

/* Motion (AUFTRAG_LOGIN_MOTION). Final state is the default; html.lm-intro is set by login-motion.js only for the first visit per browser session. */
.login-boot > div { min-height: 1.9em; }
.boot-last .boot-ok { display: inline-block; width: .6em; height: 1.05em; margin-left: 3px; vertical-align: text-bottom; overflow: hidden; background: var(--strategy); color: transparent; animation: lm-blink 1.06s steps(1) infinite; }
.lm-hide { visibility: hidden; }

.login-art-sweep { --lm-sweep-end: 100svh; position: absolute; left: 0; right: 0; top: 0; height: 90px; opacity: 0; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(120, 220, 255, .08) 46%, rgba(170, 235, 255, .3) 50%, rgba(120, 220, 255, .08) 54%, transparent); animation: lm-sweep 25s linear 3s infinite; }
.login-live { position: absolute; right: 24px; bottom: 48px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; letter-spacing: .14em; }
.login-live[hidden] { display: none; }
.login-live-row { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.live-label { color: #5f7287; }
.live-val { color: var(--strategy); }
.login-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--strategy); animation: lm-blink 2s steps(1) infinite; }

.login-brand img { animation: lm-breathe 4s ease-in-out infinite; }
.boot-wait { animation: lm-pulse 2.4s ease-in-out infinite; }
.login-claws { animation: lm-claws 6s ease-in-out infinite; }

.login-page .login-cta { position: relative; overflow: hidden; }
.login-page .login-cta > * { position: relative; z-index: 1; }
.login-page .login-cta svg { transition: transform .2s ease; }
.login-page .login-cta:hover svg { transform: translateX(6px); }
.login-page .login-cta::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 38%; transform: translateX(-130%) skewX(-18deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent); pointer-events: none; animation: lm-shine 9s ease-in-out 4s infinite; }
.login-page .login-cta:hover::after { animation: lm-shine-once .7s ease-out 1; }

@keyframes lm-blink { 50% { opacity: 0; } }
@keyframes lm-sweep {
  0% { transform: translateY(-90px); opacity: 1; animation-timing-function: ease-in-out; }
  12% { transform: translateY(var(--lm-sweep-end)); opacity: 1; }
  12.01%, 100% { transform: translateY(var(--lm-sweep-end)); opacity: 0; }
}
@keyframes lm-breathe { 0%, 100% { filter: drop-shadow(0 0 2px rgba(60, 200, 255, .15)); } 50% { filter: drop-shadow(0 0 12px rgba(60, 200, 255, .65)); } }
@keyframes lm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .75; } }
@keyframes lm-claws { 0%, 100% { opacity: .07; } 50% { opacity: .11; } }
@keyframes lm-shine { 0% { transform: translateX(-130%) skewX(-18deg); } 8%, 100% { transform: translateX(340%) skewX(-18deg); } }
@keyframes lm-shine-once { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(340%) skewX(-18deg); } }

/* Intro, first visit per browser session only. Timeline: art 0-1.6s, typing 0.2-1.5s, rise 1.6-2.3s. */
html.lm-intro .login-art > img { animation: lm-art 1.6s ease-out both; }
html.lm-intro .login-boot, html.lm-intro .login-tagline-kicker, html.lm-intro .login-tagline-title { visibility: hidden; animation: lm-unhide 0s 3.2s forwards; }
html.lm-intro.lm-run .login-boot, html.lm-intro.lm-run .login-tagline-kicker, html.lm-intro.lm-run .login-tagline-title { visibility: visible; animation: none; }
html.lm-intro .login-copy h1 { animation: lm-rise .5s ease-out 1.6s both; white-space: nowrap; }
html.lm-intro .login-copy p { animation: lm-rise .5s ease-out 1.75s both; }
html.lm-intro .login-page .login-cta, html.lm-intro .login-cta { animation: lm-rise .5s ease-out 1.9s both; }
html.lm-intro .login-live { animation: lm-rise .5s ease-out 1.9s both; }
@keyframes lm-art { from { opacity: 0; filter: blur(8px); transform: scale(1.05); } to { opacity: .999; filter: blur(0); transform: scale(1); } }
@keyframes lm-rise { from { visibility: visible; opacity: 0; transform: translateY(10px); } to { visibility: visible; opacity: 1; transform: none; } }
@keyframes lm-unhide { to { visibility: visible; } }

@media (max-width: 899px) {
  .login-boot > div { min-height: 1.8em; }
  .login-art-sweep { --lm-sweep-end: 330px; }
  .login-live { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .login-art > img, .login-brand img, .boot-wait, .login-claws, .boot-last .boot-ok, .login-live-dot,
  .login-copy h1, .login-copy p, .login-cta, .login-cta::after, .login-live { animation: none !important; }
  .login-art-sweep { display: none; }
  .login-page .login-cta::after { display: none; }
  .login-page .login-cta svg { transition: none; }
  html.lm-intro .login-boot, html.lm-intro .login-tagline-kicker, html.lm-intro .login-tagline-title { visibility: visible; }
}
