/*
 * Keystack — shared styles for the public pages (coming-soon landing and sign-in).
 * Owner: NuLevel Management · Keystack
 * Recent changes:
 *   2026-10-27  First version: dark background with grid and glow, brand mark, landing and sign-in layouts.
 */

:root {
  --bg: #07080d;
  --bg-2: #0d0f1a;
  --card: rgba(20, 22, 36, 0.72);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef0f6;
  --muted: #a3a9ba;
  --accent: #6d66ff;
  --accent-2: #8e95ff;
  --accent-ink: #ffffff;
  --ok: #4ade80;
  --error: #fb7185;
  --radius: 18px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Background: a faint blueprint grid that fades out, with two soft light sources behind it. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 78% -10%, rgba(109, 102, 255, 0.28), transparent 60%),
    radial-gradient(45rem 35rem at 5% 110%, rgba(56, 189, 248, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 30%, transparent 75%);
}
.backdrop::after {
  /* A large, faint copy of the mark, low on the page. */
  content: "";
  position: absolute;
  width: min(70vw, 760px);
  aspect-ratio: 1;
  right: -12vw;
  bottom: -22vw;
  background: url("logo.svg") center / contain no-repeat;
  opacity: 0.06;
  filter: blur(1px);
}

a { color: var(--accent-2); }
a:hover { color: #b8bcff; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px clamp(16px, 4vw, 48px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.brand img { width: 36px; height: 36px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:focus-visible, input:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #5d55f5; color: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.04); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px clamp(16px, 4vw, 48px) 48px;
}

/* Landing */
.hero { max-width: 980px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero-mark { width: 104px; height: 104px; filter: drop-shadow(0 18px 40px rgba(109, 102, 255, 0.45)); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(142, 149, 255, 0.35);
  background: rgba(109, 102, 255, 0.12);
  color: #c9ccff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.pill .dot { width: 8px; height: 8px; border-radius: 99px; background: var(--accent-2); box-shadow: 0 0 0 4px rgba(142, 149, 255, 0.18); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(142, 149, 255, 0); } }
@media (prefers-reduced-motion: reduce) { .pill .dot { animation: none; } .btn { transition: none; } }

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 700;
}
h1 .soft { color: var(--muted); }
.lede { margin: 0; max-width: 600px; font-size: clamp(16px, 2.2vw, 19px); line-height: 1.6; color: var(--muted); }

.features {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .features { grid-template-columns: 1fr; } }
.features li {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  font-size: 14px;
  color: var(--muted);
}
.features strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 2px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

footer {
  padding: 18px clamp(16px, 4vw, 48px) 26px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* Sign-in */
.card {
  width: 100%;
  max-width: 420px;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 22px; }
.card-head img { width: 56px; height: 56px; }
.card h1 { font-size: 26px; letter-spacing: -0.02em; }
.card p.sub { margin: 0; color: var(--muted); font-size: 14px; }

form { display: flex; flex-direction: column; gap: 14px; }
form[hidden] { display: none; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #cfd3df; }
input {
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
  font-size: 15px;
}
input::placeholder { color: #737a8c; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-2); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }

.notice { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.notice[hidden] { display: none; }
.notice.info { background: rgba(142, 149, 255, 0.12); color: #d4d7ff; }
.notice.ok { background: rgba(74, 222, 128, 0.12); color: #bdf5d0; }
.notice.error { background: rgba(251, 113, 133, 0.12); color: #ffd0d8; }

.fine { margin-top: 18px; text-align: center; font-size: 12px; color: var(--muted); }

.signed-in { display: flex; flex-direction: column; gap: 14px; text-align: center; }
.signed-in[hidden] { display: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
