/* Research-editorial auth pages - shared by every Weke public site.
   Self-contained: layout, form styles, and the animated backdrop live here.
   See docs/research-editorial-site-playbook.md ("Auth pages"). */
:root { --ink: #071423; --surface: #0b1c30; --divider: #203a58; --signal: #31a6ff; --signal-deep: #1f7bd8; --paper: #eaf4ff; --muted: #93acc8; --gold: #f0b429; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; color: var(--paper); background: var(--ink); font-family: "IBM Plex Sans", "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

.auth-scene { position: relative; min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; isolation: isolate; }
/* Backdrop: a faint blueprint grid plus three slow aurora blobs and a giant
   serif glyph. Pure CSS, GPU-cheap (transform/opacity only). */
.auth-scene::before { content: ""; position: absolute; inset: 0; z-index: -3; background-image: linear-gradient(var(--divider) 1px, transparent 1px), linear-gradient(90deg, var(--divider) 1px, transparent 1px); background-size: 56px 56px; opacity: .14; mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 30%, transparent 100%); }
.auth-aurora { position: absolute; z-index: -2; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.auth-aurora-1 { width: 56vmax; height: 56vmax; top: -24vmax; left: -18vmax; background: radial-gradient(circle, rgba(31, 123, 216, .5) 0%, transparent 62%); animation: auth-drift-1 26s ease-in-out infinite alternate; }
.auth-aurora-2 { width: 46vmax; height: 46vmax; bottom: -22vmax; right: -16vmax; background: radial-gradient(circle, rgba(240, 180, 41, .22) 0%, transparent 62%); animation: auth-drift-2 32s ease-in-out infinite alternate; }
.auth-aurora-3 { width: 30vmax; height: 30vmax; top: 40%; left: 58%; background: radial-gradient(circle, rgba(49, 166, 255, .28) 0%, transparent 62%); animation: auth-drift-3 22s ease-in-out infinite alternate; }
@keyframes auth-drift-1 { to { transform: translate3d(9vmax, 6vmax, 0) scale(1.12); } }
@keyframes auth-drift-2 { to { transform: translate3d(-8vmax, -5vmax, 0) scale(1.18); } }
@keyframes auth-drift-3 { to { transform: translate3d(-6vmax, -8vmax, 0) scale(.9); } }
.auth-glyph { position: absolute; z-index: -1; right: -4vw; bottom: -14vh; margin: 0; font-family: "Bodoni Moda", "Bodoni MT", Didot, serif; font-weight: 700; font-size: 56vh; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(147, 172, 200, .16); pointer-events: none; user-select: none; animation: auth-glyph-float 28s ease-in-out infinite alternate; }
@keyframes auth-glyph-float { to { transform: translate3d(0, -3vh, 0) rotate(-2deg); } }

.auth-nav { display: flex; align-items: center; justify-content: space-between; padding: 20px clamp(20px, 4vw, 56px); }
.auth-brand { display: inline-flex; min-height: 44px; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.auth-brand svg { width: 34px; height: auto; }
.auth-back { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-size: 13px; transition: color 140ms ease-out; }
.auth-back:hover { color: var(--paper); }

.auth-main { display: grid; place-items: center; padding: 24px clamp(20px, 4vw, 56px) 48px; }
.auth-card { width: min(100%, 420px); padding: 34px 34px 30px; border: 1px solid var(--divider); border-radius: 18px; background: rgba(11, 28, 48, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 40px 90px rgba(0, 0, 0, .5); animation: auth-card-rise 480ms cubic-bezier(.16, 1, .3, 1) both; }
@keyframes auth-card-rise { from { opacity: 0; transform: translateY(14px); } }
.auth-kicker { margin: 0; color: var(--signal); font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.auth-card h1 { margin: 10px 0 8px; font-family: "Bodoni Moda", "Bodoni MT", Didot, serif; font-weight: 600; font-size: 32px; line-height: 1.08; color: var(--paper); }
.auth-lede { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.auth-field { display: block; margin-bottom: 16px; }
.auth-field > span { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.auth-field input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--divider); border-radius: 10px; color: var(--paper); background: rgba(7, 20, 35, .85); font: inherit; transition: border-color 140ms ease-out, box-shadow 140ms ease-out; }
.auth-field input:focus { border-color: var(--signal); box-shadow: 0 0 0 4px rgba(49, 166, 255, .18); outline: none; }
.auth-toggle { border: 0; padding: 0; background: none; color: var(--signal); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.auth-submit { width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; padding: 0 20px; border: 1px solid rgba(49, 166, 255, .55); border-radius: 999px; color: var(--paper); background: var(--signal-deep); font-size: 14px; font-weight: 600; cursor: pointer; transition: background-color 140ms ease-out, transform 140ms ease-out, box-shadow 140ms ease-out; }
.auth-submit:hover { background: #2f8ee6; transform: translateY(-1px); box-shadow: 0 10px 30px rgba(31, 123, 216, .35); }
.auth-submit[disabled] { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.auth-error { display: none; margin: 0 0 16px; padding: 11px 14px; border: 1px solid rgba(240, 180, 41, .45); border-radius: 10px; color: var(--gold); background: rgba(240, 180, 41, .08); font-size: 13px; }
.auth-error.is-visible { display: block; animation: auth-shake 320ms ease-out; }
@keyframes auth-shake { 20% { transform: translateX(-5px); } 45% { transform: translateX(4px); } 70% { transform: translateX(-3px); } 90% { transform: translateX(2px); } }
.auth-success { display: none; margin: 0 0 16px; padding: 12px 14px; border: 1px solid rgba(42, 209, 126, .4); border-radius: 10px; color: #7ce3b1; background: rgba(42, 209, 126, .08); font-size: 13px; }
.auth-success.is-visible { display: block; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--divider); font-size: 13px; }
.auth-links a { color: var(--muted); transition: color 140ms ease-out; }
.auth-links a:hover { color: var(--signal); }
.auth-hidden { display: none; }
.auth-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px clamp(20px, 4vw, 56px); color: var(--muted); font-size: 12px; }

@media (max-width: 560px) { .auth-card { padding: 26px 22px 24px; } .auth-glyph { font-size: 34vh; } }
@media (prefers-reduced-motion: reduce) {
  .auth-aurora, .auth-glyph, .auth-card { animation: none !important; }
  .auth-error.is-visible { animation: none; }
}
