/* ===== Login screen ===== */
.stage { background: #0B0B0E; }
.stage-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 40%, transparent 100%);
}
.stage-spot {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 70%) var(--my, 40%), rgba(111, 139, 240, .13), transparent 65%);
  transition: background .1s linear;
}
.brand-mark--inv { background: #FAFAFA; color: #0B0B0E; }

/* Entrance */
.reveal { animation: lgRise .8s cubic-bezier(.22, 1, .36, 1) both; animation-delay: var(--d, 0s); }
.word { display: inline-block; animation: lgWord .9s cubic-bezier(.22, 1, .36, 1) both; animation-delay: var(--d, 0s); }
@keyframes lgRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lgWord { from { opacity: 0; transform: translateY(40%) rotate(2deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* Flow labels */
.flow-label {
  position: absolute; transform: translate(-50%, -50%) translateY(-30px);
  display: flex; flex-direction: column; align-items: center; gap: 1px; pointer-events: none;
  animation: lgFade .8s .7s ease both;
}
@keyframes lgFade { from { opacity: 0; } to { opacity: 1; } }
.flow-label span { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .42); font-family: "Geist Mono", monospace; }
.flow-label b { font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .9); font-variant-numeric: tabular-nums; }
.flow-label--hub { transform: translate(-50%, -50%) translateY(-44px); }
.flow-label--sink { transform: translate(-50%, -50%) translateY(-46px); }
.flow-label--sink b { font-size: 17px; color: #AFC0FF; }

/* Ticker */
.ticker { height: 22px; overflow: hidden; position: relative; flex: 1; mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); }
.ticker ul { transition: transform .6s cubic-bezier(.22, 1, .36, 1); }
.ticker li { height: 22px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: rgba(255, 255, 255, .6); }
.ticker li b { color: #6EE7B7; font-weight: 600; font-variant-numeric: tabular-nums; }
.ticker li em { font-style: normal; color: rgba(255, 255, 255, .3); font-family: "Geist Mono", monospace; font-size: 11px; }

/* Lock badge */
.lock-badge {
  width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  box-shadow: 0 1px 2px rgba(9, 9, 11, .04), 0 8px 24px -12px rgba(9, 9, 11, .15);
  transition: color .3s ease, border-color .3s ease, background-color .3s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1);
}
.lock-badge .shackle { transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); transform-origin: 16px 11px; }
.lock-badge.is-open { color: #12915F; border-color: rgba(18, 145, 95, .35); background: rgba(18, 145, 95, .06); transform: scale(1.06); }
.lock-badge.is-open .shackle { transform: translateY(-2.5px) rotate(28deg); }
.lock-badge.is-busy { animation: lockBreath 1.2s ease-in-out infinite; }
@keyframes lockBreath { 50% { transform: scale(.94); } }

/* Floating-label fields */
.field { position: relative; }
.field input {
  width: 100%; height: 56px; padding: 22px 44px 6px 0; background: transparent;
  border: 0; border-bottom: 1px solid var(--line); outline: none; border-radius: 0;
  font-size: 15px; font-weight: 450; color: var(--ink);
  transition: border-color .2s ease;
}
.dark .field input { border-bottom-color: rgba(255, 255, 255, .12); }
.field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--card) inset; -webkit-text-fill-color: var(--ink); }
.field label {
  position: absolute; left: 0; top: 18px; font-size: 14px; color: var(--muted); pointer-events: none;
  transform-origin: left top; transition: transform .25s cubic-bezier(.22, 1, .36, 1), color .2s ease;
}
.field input:focus + label, .field input:not(:placeholder-shown) + label { transform: translateY(-13px) scale(.8); }
.field input:focus + label { color: var(--accent); }
.field-line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.22, 1, .36, 1); }
.field input:focus ~ .field-line { transform: scaleX(1); }
.field-icon { position: absolute; right: 2px; top: 22px; font-size: 18px; color: var(--muted); transition: color .2s ease; }
.field-icon--btn { top: 16px; width: 32px; height: 32px; right: -6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.field-icon--btn:hover { color: var(--ink); background: var(--hover); }
.field input:focus ~ .field-icon { color: var(--ink); }
.field.has-error .field-line { background: #D9475B; transform: scaleX(1); }
.field.has-error label { color: #D9475B; }

.check { width: 16px; height: 16px; border-radius: 4px; }

/* Submit */
.submit-btn {
  position: relative; width: 100%; height: 50px; border-radius: 12px; overflow: hidden;
  background: var(--ink); color: var(--canvas); font-size: 14px; font-weight: 550; cursor: pointer;
  transition: transform .2s ease, box-shadow .3s ease, background-color .3s ease;
  box-shadow: 0 10px 30px -12px rgba(9, 9, 11, .55);
}
.dark .submit-btn { box-shadow: 0 10px 30px -12px rgba(111, 139, 240, .35); }
.submit-btn::before {
  content: ''; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .22) 50%, transparent 80%);
  transition: transform .8s ease;
}
.dark .submit-btn::before { background: linear-gradient(100deg, transparent 20%, rgba(62, 99, 221, .25) 50%, transparent 80%); }
.submit-btn:hover::before { transform: translateX(120%); }
.submit-btn:hover { transform: translateY(-1px); }
.submit-btn:active { transform: translateY(1px) scale(.995); }
.submit-btn:disabled { cursor: wait; transform: none; }
.submit-label { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 100%; }
.submit-label.hidden { display: none; }
.submit-arrow { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 99px; background: rgba(255, 255, 255, .14); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.dark .submit-arrow { background: rgba(9, 9, 11, .08); }
.submit-btn:hover .submit-arrow { transform: translateX(4px); }
.submit-progress { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); z-index: 1; transition: width 1.4s cubic-bezier(.22, 1, .36, 1), background-color .3s ease; }
.submit-btn.is-busy .submit-progress { width: 72%; }
.submit-btn.is-done .submit-progress { width: 100%; background: #12915F; transition-duration: .35s; }
.submit-btn.is-busy, .submit-btn.is-done { color: #fff; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 99px; background: currentColor; animation: dot 1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; }
.dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.shake { animation: shake .45s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(3px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

/* Demo chips */
.demo-chip {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); text-align: left;
  transition: border-color .2s ease, transform .2s ease;
}
.demo-chip:hover { border-color: rgba(62, 99, 221, .4); transform: translateY(-1px); }
.demo-chip.is-picked { border-color: var(--accent); background: rgba(62, 99, 221, .05); }
.demo-dot { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(0, 0, 0, .04); }

/* Exit curtain */
.curtain { position: absolute; inset: 0; z-index: 50; background: var(--canvas); transform: translateY(100%); pointer-events: none; transition: transform .6s cubic-bezier(.76, 0, .24, 1); }
.curtain.is-up { transform: translateY(0); }
