/* Lumen sign-in. Tokens mirror src/index.css so this page matches the app (light + dark). */
:root {
  color-scheme: light;
  --canvas: 244 246 250; --surface: 255 255 255; --raised: 247 249 252; --line: 225 230 238;
  --ink: 27 35 51; --muted: 82 94 118; --faint: 132 143 163;
  --accent: 19 106 242; --accent-ink: 255 255 255; --accent-strong: 15 91 214; --accent-soft: 232 241 254;
  --amber: 245 165 36;
  --danger: 196 40 40; --danger-soft: 253 233 233;
  --nav-bg: 14 26 51;
  --shadow: 0 12px 32px -12px rgb(15 23 42 / .28);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --canvas: 10 16 29; --surface: 17 25 42; --raised: 23 33 54; --line: 38 51 76;
    --ink: 232 237 245; --muted: 160 172 194; --faint: 116 128 152;
    --accent: 91 155 255; --accent-ink: 7 17 36; --accent-strong: 125 176 255; --accent-soft: 21 38 72;
    --amber: 247 178 62;
    --danger: 248 120 120; --danger-soft: 58 22 24;
    --nav-bg: 7 12 24;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: rgb(var(--canvas)); color: rgb(var(--ink));
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; border-radius: 6px; }

.page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; }

/* ---- brand / hero panel (always navy, like the app's sign-in hero) ---- */
.hero { position: relative; overflow: hidden; background: rgb(var(--nav-bg)); color: #fff; }
.glow { position: absolute; border-radius: 9999px; filter: blur(64px); pointer-events: none; }
.glow-blue { width: 24rem; height: 24rem; right: -6rem; top: -6rem; background: rgb(19 106 242 / .25); }
.glow-amber { width: 18rem; height: 18rem; left: 33%; bottom: -8rem; background: rgb(245 165 36 / .15); }
.hero-inner { position: relative; padding: max(1.5rem, env(safe-area-inset-top)) 1.25rem 1.75rem; }
.logo { display: block; align-self: flex-start; height: 2.25rem; width: auto; }
.hero h1 { margin: 1.5rem 0 0; font-size: 1.5rem; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; max-width: 34rem; }
.lede, .pillars { display: none; }

/* ---- form panel ---- */
.panel { display: flex; align-items: flex-start; justify-content: center; padding: 1.5rem 1.25rem 2.5rem; }
.card {
  width: 100%; max-width: 26rem; background: rgb(var(--surface)); border: 1px solid rgb(var(--line));
  border-radius: 12px; padding: 1.75rem 1.5rem; box-shadow: var(--shadow);
  animation: cardIn .22s ease-out;
}
.card h2 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.sub { margin: .5rem 0 1.5rem; font-size: .875rem; line-height: 1.5; color: rgb(var(--muted)); }

.alert {
  display: flex; gap: .625rem; align-items: flex-start; margin: 0 0 1.25rem; padding: .75rem .875rem;
  border: 1px solid rgb(var(--danger) / .4); background: rgb(var(--danger-soft)); color: rgb(var(--danger));
  border-radius: 10px; font-size: .8125rem; font-weight: 600; line-height: 1.45;
}
.alert svg { flex: none; width: 1.125rem; height: 1.125rem; margin-top: 1px; }

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .375rem; font-size: .8125rem; font-weight: 600; }
.field input {
  width: 100%; height: 2.75rem; padding: 0 .875rem; font: inherit; font-size: 16px; /* 16px stops iOS zoom */
  color: rgb(var(--ink)); background: rgb(var(--raised)); border: 1px solid rgb(var(--line)); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field input::placeholder { color: rgb(var(--faint)); }
.field input:hover { border-color: rgb(var(--accent) / .45); }
.field input:focus { outline: none; background: rgb(var(--surface)); border-color: rgb(var(--accent)); box-shadow: 0 0 0 3px rgb(var(--accent) / .22); }
.field input[aria-invalid="true"] { border-color: rgb(var(--danger)); }
.pw { position: relative; }
.pw input { padding-right: 3rem; }
.toggle {
  position: absolute; top: 50%; right: .375rem; transform: translateY(-50%); width: 2.25rem; height: 2.25rem;
  display: grid; place-items: center; border: 0; background: transparent; color: rgb(var(--faint)); border-radius: 8px; cursor: pointer;
}
.toggle:hover { color: rgb(var(--ink)); background: rgb(var(--accent-soft)); }
.toggle svg { width: 1.125rem; height: 1.125rem; }
.toggle .i-eye-off { display: none; }
.toggle[aria-pressed="true"] .i-eye { display: none; }
.toggle[aria-pressed="true"] .i-eye-off { display: block; }

.submit {
  position: relative; width: 100%; height: 2.75rem; margin-top: .5rem; border: 0; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: .9375rem; font-weight: 700; color: rgb(var(--accent-ink)); background: rgb(var(--accent));
  transition: background .15s, transform .05s;
}
.submit:hover { background: rgb(var(--accent-strong)); }
.submit:active { transform: translateY(1px); }
.submit .spinner { display: none; position: absolute; inset: 0; margin: auto; width: 1.125rem; height: 1.125rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.submit.busy { cursor: progress; }
.submit.busy .label { visibility: hidden; }
.submit.busy .spinner { display: block; }

.secure { display: flex; gap: .5rem; align-items: flex-start; margin: 1.5rem 0 0; padding-top: 1.25rem; border-top: 1px solid rgb(var(--line)); font-size: .75rem; line-height: 1.5; color: rgb(var(--muted)); }
.secure svg { flex: none; width: .875rem; height: .875rem; margin-top: 2px; color: rgb(var(--faint)); }

@keyframes cardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } .submit .spinner { animation-duration: 1.6s; } }

/* ---- tablet+ ---- */
@media (min-width: 640px) {
  .hero-inner { padding: max(2rem, env(safe-area-inset-top)) 2rem 2.25rem; }
  .hero h1 { font-size: 1.875rem; }
  .card { padding: 2.25rem 2rem; }
}

/* ---- desktop: two-column split ---- */
@media (min-width: 960px) {
  .page { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .hero { display: flex; }
  .hero-inner { display: flex; flex-direction: column; justify-content: center; width: 100%; max-width: 40rem; margin: 0 auto; padding: 4rem 3.5rem; }
  .hero h1 { margin-top: 3rem; font-size: 2.625rem; }
  .lede { display: block; margin: 1rem 0 0; max-width: 32rem; font-size: 1rem; line-height: 1.65; color: rgb(255 255 255 / .75); }
  .pillars { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.75rem 0 0; padding: 0; list-style: none; }
  .pillars li { display: inline-flex; align-items: center; gap: .375rem; padding: .25rem .75rem; font-size: .8125rem; font-weight: 500; color: rgb(255 255 255 / .85); border: 1px solid rgb(255 255 255 / .15); background: rgb(255 255 255 / .05); border-radius: 9999px; }
  .pillars svg { width: .875rem; height: .875rem; color: rgb(245 165 36); }
  .panel { align-items: center; padding: 2rem; }
}
