/* Sign-in page. Uses the app's tokens; everything else is self-contained so the page loads without the app shell. */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; font-family: var(--font); font-size: var(--fs-14); line-height: 1.5;
  color: #E8EBFF; background: #0A0833; -webkit-font-smoothing: antialiased;
}
svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

/* ---- animated backdrop ------------------------------------------------------ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 90% at 20% 0%, #231C8C 0%, #120F4F 45%, #0A0833 100%); }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.orb--a { width: 46vmax; height: 46vmax; left: -14vmax; top: -16vmax; background: radial-gradient(circle at 30% 30%, #6D5BE8, transparent 65%); animation: float-a 22s var(--ease) infinite alternate; }
.orb--b { width: 40vmax; height: 40vmax; right: -12vmax; bottom: -14vmax; background: radial-gradient(circle at 60% 40%, #3CCBF5, transparent 65%); opacity: .42; animation: float-b 26s var(--ease) infinite alternate; }
.orb--c { width: 26vmax; height: 26vmax; left: 38%; top: 48%; background: radial-gradient(circle, #8B5CF6, transparent 65%); opacity: .3; animation: float-c 30s var(--ease) infinite alternate; }
.grid {
  position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 20%, transparent 100%); mask-image: radial-gradient(70% 70% at 50% 40%, #000 20%, transparent 100%);
}
.grain { position: absolute; inset: 0; opacity: .5; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .05 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
@keyframes float-a { to { transform: translate3d(9vmax, 7vmax, 0) scale(1.12); } }
@keyframes float-b { to { transform: translate3d(-8vmax, -6vmax, 0) scale(1.1); } }
@keyframes float-c { to { transform: translate3d(-12vmax, -8vmax, 0) scale(.85); } }

/* ---- layout ---------------------------------------------------------------- */
.stage { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: var(--s-7); max-width: 1180px; margin: 0 auto; padding: var(--s-6) var(--s-5); }

.pitch { max-width: 520px; animation: rise .8s var(--ease) both; }
.pitch-logo { display: block; height: 32px; width: auto; margin-bottom: var(--s-7); }
.pitch-title { margin: 0 0 var(--s-4); font-size: clamp(34px, 4.6vw, 52px); line-height: 1.07; letter-spacing: -.03em; font-weight: 750; color: #fff; }
.grad { background: linear-gradient(100deg, #8F82FF 0%, #3CCBF5 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pitch-lead { margin: 0 0 var(--s-6); font-size: var(--fs-16); color: rgba(232,235,255,.74); max-width: 46ch; }
.pitch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); }
.pitch-list li { display: flex; gap: var(--s-3); align-items: flex-start; color: rgba(232,235,255,.78); animation: rise .8s var(--ease) both; }
.pitch-list li:nth-child(1) { animation-delay: .15s; } .pitch-list li:nth-child(2) { animation-delay: .25s; } .pitch-list li:nth-child(3) { animation-delay: .35s; }
.pitch-list svg { flex: none; width: 36px; height: 36px; padding: 8px; border-radius: 11px; color: #7FDBFA; background: rgba(60,203,245,.1); border: 1px solid rgba(60,203,245,.22); }
.pitch-list b { color: #fff; font-weight: 600; }

.panel { display: flex; justify-content: center; animation: rise .8s .1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- glass card ------------------------------------------------------------ */
.card {
  --mx: 50%; --my: 0%;
  position: relative; width: 100%; max-width: 420px; padding: var(--s-6) var(--s-6) var(--s-5); border-radius: 24px; overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.11), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 30px 80px -20px rgba(3,2,30,.7), inset 0 1px 0 rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
}
.card-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(380px circle at var(--mx) var(--my), rgba(143,130,255,.22), transparent 60%); transition: opacity var(--t-med); }
.card > *:not(.card-glow) { position: relative; }
.card-mark { display: block; height: 30px; width: auto; margin-bottom: var(--s-4); }
.card h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; font-weight: 700; color: #fff; }
.card-sub { margin: 4px 0 var(--s-5); color: rgba(232,235,255,.66); }
.card.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 15%, 85% { transform: translateX(-3px); } 30%, 70% { transform: translateX(6px); } 45%, 55% { transform: translateX(-8px); } }

.alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: var(--s-4); padding: 11px 13px; border-radius: 12px; font-size: var(--fs-13); color: #FFD3DC; background: rgba(244,63,94,.14); border: 1px solid rgba(251,113,133,.4); animation: rise .3s var(--ease) both; }
.alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: #FB7185; }

/* ---- fields ---------------------------------------------------------------- */
.field { margin-bottom: var(--s-4); }
.field label { display: block; margin-bottom: 6px; font-size: var(--fs-13); font-weight: 600; color: rgba(232,235,255,.86); }
.control { position: relative; display: flex; align-items: center; }
.control > svg { position: absolute; left: 14px; width: 18px; height: 18px; color: rgba(232,235,255,.5); pointer-events: none; transition: color var(--t-fast); }
.control input {
  width: 100%; height: 46px; padding: 0 44px 0 42px; font: inherit; color: #fff; border-radius: 12px; outline: none;
  background: rgba(8,6,48,.45); border: 1px solid rgba(255,255,255,.16); transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.control input::placeholder { color: rgba(232,235,255,.36); }
.control input:hover { border-color: rgba(255,255,255,.28); }
.control input:focus { border-color: #8F82FF; background: rgba(8,6,48,.62); box-shadow: 0 0 0 4px rgba(109,91,232,.28); }
.control:focus-within > svg { color: #A79EFF; }
.control input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: 0 0 0 100px #1B1668 inset; caret-color: #fff; }
.field.bad input { border-color: #FB7185; }

.peek { position: absolute; right: 6px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 9px; background: transparent; color: rgba(232,235,255,.6); cursor: pointer; transition: color var(--t-fast), background var(--t-fast); }
.peek:hover { color: #fff; background: rgba(255,255,255,.09); }
.peek:focus-visible { outline: 2px solid #8F82FF; outline-offset: 1px; }
.peek svg { position: static; width: 19px; height: 19px; color: inherit; }
.peek .eye-off { display: none; }
.peek[aria-pressed="true"] .eye { display: none; }
.peek[aria-pressed="true"] .eye-off { display: block; }
.caps { margin: 6px 0 0; font-size: var(--fs-12); color: #FCD34D; }

.remember { display: flex; align-items: center; gap: 10px; margin: var(--s-1) 0 var(--s-5); cursor: pointer; color: rgba(232,235,255,.78); user-select: none; }
.remember input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.remember .box { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; border: 1px solid rgba(255,255,255,.3); background: rgba(8,6,48,.45); transition: all var(--t-fast); }
.remember .box svg { width: 14px; height: 14px; stroke-width: 3; color: #fff; opacity: 0; transform: scale(.5); transition: all var(--t-fast) var(--ease); }
.remember input:checked + .box { background: linear-gradient(135deg, #6366F1, #8B5CF6); border-color: transparent; }
.remember input:checked + .box svg { opacity: 1; transform: none; }
.remember input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(143,130,255,.5); }

/* ---- button ---------------------------------------------------------------- */
.submit {
  position: relative; width: 100%; height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 13px; cursor: pointer;
  font: inherit; font-weight: 650; font-size: var(--fs-14); color: #fff; overflow: hidden;
  background: linear-gradient(135deg, #6366F1, #8B5CF6 55%, #22D3EE); background-size: 140% 100%; background-position: 0 0;
  box-shadow: 0 10px 28px -10px rgba(99,102,241,.8), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med), background-position var(--t-slow) var(--ease);
}
.submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.28) 50%, transparent 65%); transform: translateX(-120%); }
.submit:hover:not(:disabled) { transform: translateY(-1px); background-position: 100% 0; box-shadow: 0 16px 34px -10px rgba(99,102,241,.9), inset 0 1px 0 rgba(255,255,255,.35); }
.submit:hover:not(:disabled)::after { transform: translateX(120%); transition: transform .8s var(--ease); }
.submit:active:not(:disabled) { transform: translateY(0); }
.submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.submit:disabled { cursor: progress; opacity: .92; }
.arrow { width: 18px; height: 18px; transition: transform var(--t-fast) var(--ease); }
.submit:hover:not(:disabled) .arrow { transform: translateX(3px); }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite; }
.submit.busy .spinner { display: block; }
.submit.busy .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.card-foot { display: flex; align-items: center; justify-content: center; gap: 7px; margin: var(--s-5) 0 0; font-size: var(--fs-12); color: rgba(232,235,255,.5); text-align: center; }
.card-foot svg { flex: none; width: 14px; height: 14px; }
.noscript { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 12px; text-align: center; background: #BE123C; color: #fff; }

/* ---- small screens --------------------------------------------------------- */
@media (max-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); padding: var(--s-5) var(--s-4); align-content: center; }
  .pitch { max-width: none; text-align: center; margin: 0 auto; }
  .pitch-logo { margin: 0 auto var(--s-5); }
  .pitch-lead, .pitch-list { display: none; }
  .pitch-title { font-size: 30px; margin-bottom: 0; }
}
@media (max-width: 480px) { .card { padding: var(--s-5) var(--s-4) var(--s-4); border-radius: 20px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media (forced-colors: active) {
  .card, .control input, .submit { border: 1px solid CanvasText; }
}
