/* The sign-in page (/login) in Lantern, the look of the client area's /zona/ (sudievu.lt D292): dark on navy and blue, Poppins with JetBrains Mono for labels,
   18-22 px cards, round pills, a glow from the top. Blue is the ordinary button, green is the one click that is wanted next, red is a fault.
   Dark only: the page wears Lantern whatever theme the other pages remember. Loaded by ui/login.html, signup.html and connect.html (the last two add lantern-gate.css); base.css still supplies the header, .seg, .mk and [hidden]. */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("/assets/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("/assets/fonts/jetbrains-mono-400.woff2") format("woff2"); }

html:has(body.lantern) { background: #0b1230; color-scheme: dark; }

body.lantern {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
  --bg: #0b1230;
  --surface: #141d44;
  --surface-3: #1d2858;
  --field: #0b1233;
  --card-bg: linear-gradient(180deg, #172250, #121b42);
  --line: #26327a;
  --line-strong: #3a4a9a;
  --line-input: #6c7dd0;
  --ink: #eef1ff;
  --ink-dim: #b9c1e6;
  --ink-faint: #97a2d0;
  --blue: #3b64e8;
  --blue-lit: #9db5ff;
  --blue-hover: #2f55d6;
  --on-blue: #ffffff;
  --go: #3ddc97;
  --go-lit: #6aedb4;
  --on-go: #031a10;
  --stop: #ff6f86;
  --warn: #ffc15e;
  --focus: #ffe08a;
  --shadow-card: 0 16px 44px rgba(2, 5, 24, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);

  /* base.css's names, answered in Lantern, so the header, the segment and the marks follow */
  --font: var(--sans);
  --ground: var(--bg);
  --sheet: var(--surface);
  --sheet-2: var(--field);
  --sheet-hi: var(--surface-3);
  --ink-2: var(--ink-dim);
  --ink-3: var(--ink-faint);
  --line-2: var(--line-input);
  --lamp: var(--go);
  --amber: var(--warn);
  --ember: var(--stop);
  --state: var(--go);
  --on-state: var(--on-go);

  background: radial-gradient(70rem 32rem at 50% -8rem, rgba(59, 100, 232, 0.3), transparent 70%) no-repeat var(--bg);
  -webkit-tap-highlight-color: transparent;
}

/* ---- the header ------------------------------------------------------------------ */

.lantern .top { position: absolute; inset: 0 0 auto 0; max-width: 76rem; margin-inline: auto; padding-inline: max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-right)) max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-left)); }
.lantern .brand { min-height: 2.75rem; font-weight: 600; letter-spacing: -0.01em; }
.lantern .brand .mk { --mk: var(--go); filter: drop-shadow(0 0 0.4em rgba(61, 220, 151, 0.55)); }
.lantern .seg { padding: 0; border-color: var(--line-input); }
.lantern .seg button { min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.7rem; font: 500 0.8rem var(--mono); letter-spacing: 0.04em; color: var(--ink-dim); }
.lantern .seg button[aria-pressed="true"] { background: var(--blue); color: var(--on-blue); }
.lantern .top .seg button:not([aria-pressed="true"]) { color: var(--ink-dim); }
@media (hover: hover) and (pointer: fine) {
  .lantern .seg button:not([aria-pressed="true"]):hover, .lantern .top .seg button:not([aria-pressed="true"]):hover { background: var(--surface-3); color: var(--ink); }
}

/* ---- focus: one ring everywhere, and every shape keeps its own corners ------------ */

.lantern :focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.lantern .go:focus-visible, .lantern .pill:focus-visible, .lantern input[type="email"]:focus-visible, .lantern .seg button:focus-visible { border-radius: 999px; }
.lantern .code i.on { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }

/* ---- the page: the promise and the ways onward on the left, the gate on the right -- */

.lantern .stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
  grid-template-areas: "scene gate" "explore gate";
  grid-template-rows: auto 1fr;
  align-content: start;
  column-gap: clamp(2rem, 6vw, 6rem);
  max-width: 76rem;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(5rem, 13vh, 9.5rem) max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-right)) 3rem max(clamp(1.25rem, 4vw, 2.5rem), env(safe-area-inset-left));
}
.lantern .scene { grid-area: scene; }
.lantern .gate { grid-area: gate; }
.lantern .explore { grid-area: explore; }

.lantern .promise {
  max-width: 16ch;
  margin-bottom: 2.4rem;
  font-size: clamp(2.1rem, 3.5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* the ways onward for someone with no account: a lighter card than the gate's */
.lantern .explore {
  align-self: start;
  max-width: 34rem;
  padding: 1.5rem;
  background: rgba(20, 29, 68, 0.55);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.lantern .explore h2 { margin-bottom: 0.7rem; font: 500 0.78rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-lit); }
.lantern .explore-hint { margin-bottom: 1.1rem; max-width: 40ch; color: var(--ink-dim); font-size: 0.95rem; line-height: 1.55; text-wrap: pretty; }
.lantern .explore-links { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.lantern .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.5rem 1.35rem;
  background: var(--surface-3);
  color: var(--ink);
  border: 1px solid var(--line-input);
  border-radius: 999px;
  font: 600 0.92rem/1.25 var(--sans);
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 120ms var(--ease);
}
.lantern .pill--blue { flex: 1 0 100%; background: var(--blue); border-color: var(--blue); color: var(--on-blue); box-shadow: 0 6px 18px rgba(59, 100, 232, 0.35); }
.lantern .pill:not(.pill--blue) { flex: 1 1 0; }
.lantern .pill:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .lantern .pill:hover { border-color: var(--blue-lit); background: #26336f; }
  .lantern .pill--blue:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
}

/* the one-press steps and the authenticator step are not the place to look around */
.lantern[data-step="confirm"] .explore, .lantern[data-step="signup"] .explore, .lantern[data-step="totp"] .explore { display: none; }

/* ---- the gate: one card, every step in it ----------------------------------------- */

.lantern .gate-in {
  width: 100%;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--card-bg);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: var(--shadow-card), 0 0 70px rgba(59, 100, 232, 0.14);
}

.lantern h1 { font-size: clamp(1.6rem, 1.2rem + 1.1vw, 2rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
.lantern .lead { margin-top: 0.8rem; max-width: 40ch; color: var(--ink-dim); font-size: 0.97rem; line-height: 1.6; text-wrap: pretty; }
.lantern .lead b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }

/* the mark of a step that has come out well or needs a look: a shape as well as a colour (disc with a tick, diamond with a bar) */
.lantern .badge { position: relative; display: block; width: 3.5rem; height: 3.5rem; margin: 0 0 1.3rem; }
.lantern .badge::before { content: ""; position: absolute; inset: 0; }
.lantern .badge[data-kind="ok"]::before { background: rgba(61, 220, 151, 0.14); border: 2px solid var(--go); border-radius: 50%; box-shadow: 0 0 28px rgba(61, 220, 151, 0.3); }
.lantern .badge[data-kind="ok"]::after { content: ""; position: absolute; left: 1.2rem; top: 0.82rem; width: 0.72rem; height: 1.3rem; border: solid var(--go); border-width: 0 3px 3px 0; rotate: 45deg; }
.lantern .badge[data-kind="warn"] { width: 2.9rem; height: 2.9rem; margin: 0.3rem 0 1.6rem 0.3rem; }
.lantern .badge[data-kind="warn"]::before { background: rgba(255, 193, 94, 0.12); border: 2px solid var(--warn); border-radius: 12px; rotate: 45deg; box-shadow: 0 0 26px rgba(255, 193, 94, 0.25); }
.lantern .badge[data-kind="warn"]::after { content: "!"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--warn); font: 700 1.5rem var(--sans); }
.lantern .badge.arrive { animation: arrive 220ms var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

.lantern form { margin-top: 1.6rem; }
.lantern label { display: block; margin-bottom: 0.55rem; font: 500 0.78rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); }

.lantern input[type="email"] {
  width: 100%;
  height: 3.5rem;
  padding: 0 1.4rem;
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line-input);
  border-radius: 999px;
  font: 400 1rem var(--sans);
}
.lantern input[type="email"]::placeholder { color: transparent; }
.lantern input[type="email"][aria-invalid="true"] { border-color: var(--stop); }

/* buttons: blue is ordinary, green is the click that is wanted next */
.lantern .go {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3.5rem;
  margin-top: 1.1rem;
  padding: 0.6rem 1.4rem;
  background: var(--blue);
  color: var(--on-blue);
  border: 1px solid var(--blue);
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(59, 100, 232, 0.35);
  font: 600 1rem/1.25 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  transition: transform 120ms var(--ease);
}
.lantern .go:active { transform: scale(0.97); }
.lantern .go-solo { margin-top: 1.6rem; }
.lantern .go[disabled] { cursor: default; }
.lantern .go[aria-busy="true"] { opacity: 0.7; cursor: progress; }
@media (hover: hover) and (pointer: fine) {
  .lantern .go:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
}

/* the needed click is green: a lone step button, the code's confirm, the sign-up offer, and the email form's own once an address is typed */
.lantern .go-solo, .lantern #f-totp .go, .lantern .signup-offer .go,
.lantern:has(#email:not(:placeholder-shown):valid) #f-email .go {
  background: var(--go);
  border-color: var(--go);
  color: var(--on-go);
  box-shadow: 0 0 0 3px rgba(61, 220, 151, 0.2), 0 8px 24px rgba(61, 220, 151, 0.3);
}
@media (hover: hover) and (pointer: fine) {
  .lantern .go-solo:hover, .lantern #f-totp .go:hover, .lantern .signup-offer .go:hover,
  .lantern:has(#email:not(:placeholder-shown):valid) #f-email .go:hover { background: var(--go-lit); border-color: var(--go-lit); }
}
/* someone typing an address is signing in: the sign-up offer steps back to an outline, so one button at a time is green */
.lantern:has(#email:not(:placeholder-shown)) .signup-offer .go {
  background: transparent;
  border-color: var(--line-input);
  color: var(--ink);
  box-shadow: none;
}

.lantern .signup-offer { margin-top: 1.7rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.lantern .signup-offer p { color: var(--ink-dim); font-size: 0.95rem; }
.lantern .signup-offer .go { margin-top: 0.8rem; }

.lantern .err { display: flex; align-items: flex-start; gap: 0.55rem; margin-top: 0.8rem; color: var(--stop); font-size: 0.9375rem; line-height: 1.4; }
.lantern .err .mk { margin-top: 0.35em; }
.lantern .fine { margin-top: 1rem; max-width: 40ch; color: var(--ink-faint); font-size: 0.9rem; line-height: 1.55; }
.lantern .link {
  padding: 0;
  background: none;
  border: 0;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  cursor: pointer;
}
.lantern #restart { display: inline-flex; align-items: center; min-height: 2.75rem; }
.lantern .legal { margin-top: 0.6rem; font-size: 0.9rem; text-align: center; }
.lantern .legal a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink-faint); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.lantern .help { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 0.9rem; line-height: 1.55; }
.lantern .help a { color: var(--ink-dim); }

/* the six cells of the authenticator code: one real input laid over them */
.lantern .code { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }
.lantern .code input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  color: transparent;
  caret-color: transparent;
  font-size: 1rem;
  cursor: text;
}
.lantern .code input::selection { background: transparent; }
.lantern .code input:focus-visible { outline: 0; }
.lantern .remember-l input:focus-visible { border-radius: 7px; }
.lantern .code i {
  display: grid;
  place-items: center;
  height: 3.8rem;
  background: var(--field);
  border: 1px solid var(--line-input);
  border-radius: 14px;
  font: 400 1.6rem var(--mono);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.lantern .code.bad i { border-color: var(--stop); }
.lantern .code.shake { animation: shake 0.28s var(--ease); }
@keyframes shake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }

/* "remember this computer": unticked, with its one line of caution beside it */
.lantern .remember { margin-top: 1.2rem; }
.lantern .remember-l { display: flex; align-items: center; gap: 0.8rem; min-height: 2.75rem; margin: 0; font: 500 1rem var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); cursor: pointer; }
.lantern .remember-l input {
  flex: none;
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  appearance: none;
  background: var(--field);
  border: 1px solid var(--line-input);
  border-radius: 7px;
  cursor: pointer;
}
.lantern .remember-l input:checked { background: var(--blue); border-color: var(--blue-lit); }
.lantern .remember-l input:checked::after { content: ""; position: absolute; left: 0.45rem; top: 0.17rem; width: 0.4rem; height: 0.8rem; border: solid var(--on-blue); border-width: 0 2.5px 2.5px 0; rotate: 45deg; }
.lantern .remember-h { margin: 0.1rem 0 0 2.2rem; max-width: 36ch; color: var(--ink-faint); font-size: 0.9rem; line-height: 1.5; text-wrap: pretty; }

/* ---- a phone: the gate first, the promise short above it, the ways onward below ---- */

@media (max-width: 56rem) {
  .lantern .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "scene" "gate" "explore";
    grid-template-rows: none;
    max-width: 34rem;
    padding-top: 4.4rem;
  }
  .lantern .promise { max-width: 22ch; margin-bottom: 1.3rem; font-size: 1.45rem; line-height: 1.2; }
  .lantern .explore { margin-top: 1.2rem; max-width: none; padding: 1.25rem; }
  .lantern .explore-links .pill { flex: 1 0 100%; }
}
@media (max-width: 56rem) and (max-height: 700px) {
  .lantern .promise { margin-bottom: 0.9rem; font-size: 1.25rem; }
}
@media (max-width: 24rem) {
  .lantern .gate-in { padding: 1.25rem; }
  .lantern .code { gap: 0.35rem; }
}
