/* kiqr.cloud. Two words: connect and cloud.
   Connect: lines between an agent and its apps, pulses travelling along them,
   surfaces that light up where the pointer is. Cloud: deep night sky, soft
   drifting light, glass that floats above it. Geist throughout, served here. */

@font-face { font-family: "Geist"; src: url("/assets/Geist-Variable-d064cace.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/GeistMono-Variable-561c3689.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #05070d;
  --bg-2: #0a0e19;
  --glass: rgba(16, 22, 38, .55);
  --glass-2: rgba(24, 32, 54, .6);
  --line: rgba(148, 170, 220, .12);
  --line-2: rgba(148, 170, 220, .22);
  --fg: #eef2fb;
  --muted: #9aa6bf;
  --dim: #66728c;
  --accent: #5eead4;          /* connect: teal */
  --accent-2: #8b9cff;        /* cloud: periwinkle */
  --accent-3: #c4b5fd;
  --accent-ink: #03211c;
  --accent-soft: rgba(94, 234, 212, .12);
  --signal: #d7ff43;          /* the agent's mark */
  --bad: #fb7185;
  --bad-soft: rgba(251, 113, 133, .12);
  --grad: linear-gradient(110deg, var(--accent) 0%, var(--accent-2) 55%, var(--accent-3) 100%);
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--fg); font: 400 15.5px/1.6 var(--sans);
  min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow-x: hidden;
  -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11";
}
::selection { background: rgba(94, 234, 212, .3); }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #9ff5e6; }
h1, h2, h3 { letter-spacing: -.03em; }
h1 { font-size: 28px; line-height: 1.15; font-weight: 650; margin: 0 0 8px; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.sm { font-size: 13.5px; }
.mono { font-family: var(--mono); }
.min0 { min-width: 0; }

/* ---------------------------------------------------------- the sky (cloud) */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(148, 170, 220, .14) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.sky i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 26s var(--ease) infinite alternate; }
.sky i:nth-child(1) { width: 620px; height: 420px; left: -8%; top: -14%; background: rgba(94, 234, 212, .32); }
.sky i:nth-child(2) { width: 700px; height: 480px; right: -12%; top: -6%; background: rgba(139, 156, 255, .34); animation-duration: 32s; animation-delay: -8s; }
.sky i:nth-child(3) { width: 520px; height: 380px; left: 30%; top: 46%; background: rgba(196, 181, 253, .16); animation-duration: 38s; animation-delay: -14s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, 30px, 0) scale(1.08); }
  100% { transform: translate3d(-30px, 50px, 0) scale(.96); }
}

/* ------------------------------------------------------------- navigation */
.top { position: sticky; top: 14px; z-index: 50; display: flex; justify-content: center; padding: 0 16px; margin-top: 14px; }
.nav {
  width: 100%; max-width: 1120px; display: flex; align-items: center; gap: 16px;
  padding: 10px 10px 10px 18px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .04);
  transition: max-width .4s var(--ease), background .3s, box-shadow .3s;
}
.scrolled .nav { max-width: 980px; background: rgba(10, 14, 25, .78); box-shadow: 0 14px 50px rgba(0, 0, 0, .5); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 650; letter-spacing: -.02em; font-size: 16px; }
.brand:hover { color: var(--fg); }
.brand .mark { width: 26px; height: 26px; flex: none; }
.brand .mark .ln { stroke: url(#brand-grad); }
.brand small { color: var(--muted); font-weight: 500; font-size: 16px; }
.nav .end { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav .end form { margin: 0; }
.nav .end > a:not(.btn) { color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 12px; }
.nav .end > a:not(.btn):hover { color: var(--fg); }

/* ---------------------------------------------------------------- buttons */
.btn, button, input[type=submit] {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03); color: var(--fg); font: 600 14px var(--sans); letter-spacing: -.01em;
  cursor: pointer; transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .3s;
}
.btn:hover, button:hover { color: var(--fg); border-color: rgba(148, 170, 220, .45); background: rgba(255, 255, 255, .06); transform: translateY(-1px); }
.btn:active, button:active { transform: translateY(0); }
.btn.primary, input[type=submit].primary, button.primary {
  color: var(--accent-ink); border-color: transparent; background: var(--grad); background-size: 200% 100%;
  box-shadow: 0 0 0 1px rgba(94, 234, 212, .3), 0 8px 30px rgba(94, 234, 212, .25);
  animation: sheen 6s linear infinite;
}
.btn.primary:hover, input[type=submit].primary:hover { color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(94, 234, 212, .5), 0 12px 40px rgba(94, 234, 212, .4); }
@keyframes sheen { 0% { background-position: 0% 0; } 50% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
.btn.danger, button.danger { background: var(--bad-soft); color: var(--bad); border-color: rgba(251, 113, 133, .35); }
.btn.full, input[type=submit].full { width: 100%; }
.btn.lg { padding: 13px 24px; font-size: 15px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------- surfaces that light up */
.glow { position: relative; isolation: isolate; }
.glow::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(94, 234, 212, .12), transparent 45%);
}
.glow:hover::before { opacity: 1; }
.card {
  background: var(--glass); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; margin-bottom: 18px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.card > :last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------- forms */
form .field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
label { font-size: 13px; font-weight: 600; color: var(--fg); }
.hint { font-size: 12.5px; color: var(--dim); font-weight: 400; }
input[type=email], input[type=password], input[type=text], input[type=search] {
  width: 100%; padding: 11px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: rgba(5, 7, 13, .6); color: var(--fg); font: 15px var(--sans); transition: border-color .2s, box-shadow .2s;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(94, 234, 212, .14); }
input.code { font: 600 22px var(--mono); letter-spacing: .25em; text-transform: uppercase; text-align: center; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; color: var(--muted); }
.check input { accent-color: var(--accent); }
.links { display: flex; flex-direction: column; gap: 7px; margin-top: 18px; font-size: 13.5px; }

/* ----------------------------------------------------------- page frame */
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 48px 16px 72px; }
main.narrow { max-width: 460px; }
footer.site { padding: 36px 24px; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; text-align: center; }
.foot-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 10px; }
.foot-links a { color: var(--muted); }

.flash { max-width: 560px; margin: 18px auto 0; padding: 11px 16px; border-radius: var(--r); font-size: 14px; backdrop-filter: blur(10px); animation: rise .5s var(--ease) both; }
.flash.notice { background: rgba(94, 234, 212, .1); color: var(--accent); border: 1px solid rgba(94, 234, 212, .25); }
.flash.alert, .errors { background: var(--bad-soft); color: var(--bad); border: 1px solid rgba(251, 113, 133, .25); }
.errors { padding: 11px 16px; border-radius: var(--r); font-size: 14px; margin-bottom: 16px; }
.errors ul { margin: 4px 0 0; padding-left: 18px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.list .what b { font-weight: 600; overflow-wrap: anywhere; }


/* ------------------------------------------- sign in, sign up, getting back */
.social { display: grid; gap: 10px; margin: 20px 0 6px; }
.social form { margin: 0; }
.social .btn { width: 100%; background: rgba(5, 7, 13, .5); padding: 11px 16px; }
.social .btn .mark { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font: 700 11px var(--sans); background: rgba(255, 255, 255, .06); border: 1px solid var(--line-2); }
.or { display: flex; align-items: center; gap: 12px; color: var(--dim); font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; margin: 18px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-method { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

/* consent */
.consent .who { font-size: 19px; font-weight: 650; margin: 10px 0 4px; overflow-wrap: anywhere; }
.consent .where { font: 13px var(--mono); color: var(--muted); overflow-wrap: anywhere; }

/* --------------------------------------------------------- motion on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.d1 { --d: .08s; } .d2 { --d: .16s; } .d3 { --d: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* A sign-in an agent started: one centred card, nothing else. */
main.focus { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; max-width: 480px; min-height: 100vh; min-height: 100dvh; padding: 32px 16px; }
.focus-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.focus-head .brand { font-size: 20px; }
.focus-head .brand .mark { width: 32px; height: 32px; }
.focus-head p { margin: 0; }
main.focus .flash { width: 100%; margin: 0; }
main.focus .form { width: 100%; }
main.focus .form > .card { margin: 0; padding: 32px; border-radius: var(--r-xl); }
main.focus h1 { font-size: 24px; text-align: center; }
main.focus .form > .card > .muted:first-of-type { text-align: center; }
main.focus .links { align-items: center; }
.focus-foot { margin: 0; font-size: 13px; }
/* Comes in on its own, without waiting for any script. */
.enter { animation: rise .7s var(--ease) both; animation-delay: var(--d, 0s); }
.focus-foot a { color: var(--dim); }
.focus-foot a:hover { color: var(--muted); }

@media (max-width: 900px) {
  }
@media (max-width: 560px) {
  .top { top: 8px; margin-top: 8px; padding: 0 10px; }
  .nav { padding: 8px 8px 8px 14px; gap: 8px; }
  .nav .end > a:not(.btn) { display: none; }
  .card { padding: 20px; }
  main.focus { justify-content: flex-start; padding-top: 28px; }
  main.focus .form > .card { padding: 22px; }
}
.notice-card { border-color: rgba(94, 234, 212, .35); background: radial-gradient(500px 160px at 0% 0%, rgba(94, 234, 212, .1), transparent 70%), var(--glass); }
