/* public/css/login.css - /login, /forgot, /reset (task 13). These pages load
   only tokens.css + this file, no base.css/components.css, so the page-level
   resets that base.css normally provides for the app shell are repeated here. */

html, body { height: 100%; margin: 0; }
body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.login {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: min(400px, 90vw);
}

/* Both layers stack in the same square box (the PNG is 768x768 and the
   renderer draws square), so swapping .is-fallback never reflows the card
   below. Absolute, not display-toggled, because the canvas has to keep a
   measurable width for /js/login-lion.js to size the renderer from. */
.login__lion {
  width: 280px;
  aspect-ratio: 1;
  margin: 0;
  position: relative;
}
.login__lion canvas,
.login__lion img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
/* The halo is the hologram, not the mark: --lion-glow is white in both themes.
   cc-cleanup task 15 deleted the home hero's own WebGL lion entirely; this
   login cinematic (task 14) is the only surviving user of the device now. */
/* Two steps: a tight core glow plus a wide, weaker bloom. At hero size the
   particles are sparse enough that without this the silhouette does not hold
   together once the cloud settles. */
.login__lion canvas {
  filter: drop-shadow(0 0 10px var(--lion-glow))
          drop-shadow(0 0 28px color-mix(in srgb, var(--lion-glow) 60%, transparent));
}
/* The asset is the orange hologram render; the login lion is monochrome ink,
   so the static twin is desaturated to match the particle cloud's --text /
   --text-muted ramp rather than reading as a second, warmer brand colour. */
.login__lion img {
  opacity: 0;
  object-fit: contain;
  filter: grayscale(1) contrast(1.1) drop-shadow(0 0 8px var(--lion-glow));
}
.is-fallback .login__lion canvas { display: none; }
.is-fallback .login__lion img { opacity: 1; }

.login__card {
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  background: var(--surface);
  border: 2px solid var(--text);
  border-radius: var(--radius-xs);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
}
.is-ready .login__card {
  opacity: 1;
  transform: none;
  transition: opacity 420ms var(--ease-out), transform 420ms var(--ease-out);
}

.login__mark { width: 48px; margin: 0 auto; }
.login__wordmark {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.login__notice { margin: 0; font-size: 11px; color: var(--text-muted); line-height: 1.5; }

.login__card form { display: flex; flex-direction: column; gap: 12px; }

.login__card input {
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.login__card input:focus-visible { outline: none; box-shadow: var(--ring); }

.login__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--bg);
  border-radius: var(--radius-pill);
  padding: 12px;
  font-family: var(--font-condensed);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: var(--shadow-poster);
  transition: transform 120ms var(--ease-standard), box-shadow 120ms var(--ease-standard);
}
/* No token matches the old 6px hover offset (--shadow-poster-md is 3px, a
   different step) - dropped rather than guessed at (review item 4). Hover
   still reads via the transform alone. */
.login__cta:hover { transform: translate(-2px, -2px); }
.login__cta:active { transform: translate(0, 0); box-shadow: var(--shadow-poster-sm); }
.login__ms-mark { flex: none; width: 16px; height: 16px; }

.login__local, .login__forgot {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: none;
}
.login__local:hover, .login__forgot:hover { color: var(--text); text-decoration: underline; }

.login__error { margin: 0; color: var(--no); font-size: 12px; min-height: 16px; }

@media (prefers-reduced-motion: reduce) {
  .login__card { transition: none; }
  .login__cta { transition: none; }
}
