/* ══════════════════════════════════════════════════════════════════
   lınq · Sign in — dark split-screen login

   Built to the "Login page redesign with Cloudflare" handoff
   (Login.dc.html). Every colour, size, radius, shadow and gradient
   below is copied verbatim from that file; the handoff carried them
   as inline style="" attributes, which are moved here as classes so
   the template stays readable and the payload caches.

   Scoped to `body.lqx` throughout. The same template also renders the
   Therapy Sound and white-label skins, which keep their own inline
   <style nonce> block and never load this file.

   Interactions live in static/js/auth-login.js (nonce'd, no inline
   handlers — app pages run a nonce CSP with no 'unsafe-inline').
   ══════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body.lqx {
  background: #05060C;
  font-family: 'Public Sans', system-ui, sans-serif;
  color: #F4F0E8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.lqx input::placeholder { color: #A1A1AA; }
body.lqx a { color: #18181B; text-decoration: none; }
body.lqx a:hover { color: #EA6A2C; }

@keyframes lqx-spin { to { transform: rotate(360deg); } }
/* The handoff's `lq-rise` is not ported: its only consumer was the green
   "Signed in" button, which a real form POST never reaches. */

/* ── Shell ──────────────────────────────────────────────────────── */
.lqx-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  background: #05060C;
}

/* ── Background layers (4 stacked, z-index 0/0/1/1) ─────────────── */
.lqx-bg,
.lqx-vignette,
.lqx-scan,
.lqx-stars { position: absolute; inset: 0; }

.lqx-bg {
  z-index: 0;
  background:
    radial-gradient(34% 74% at 50% 60%, rgba(150,200,255,.5) 0%, rgba(72,128,240,.26) 42%, transparent 74%),
    radial-gradient(118% 66% at 50% 94%, rgba(255,250,244,.9) 0%, rgba(255,232,208,.62) 7%, rgba(255,196,148,.52) 16%, rgba(234,106,44,.46) 27%, rgba(234,106,44,.22) 38%, rgba(234,106,44,.06) 48%, transparent 64%),
    radial-gradient(95% 55% at 50% 4%, rgba(22,34,96,.8), transparent 72%),
    linear-gradient(180deg, #03040A 0%, #05081A 24%, #07102F 46%, #0A1440 64%, #0E1445 100%);
}
.lqx-vignette {
  z-index: 0;
  background: radial-gradient(66% 96% at 50% 58%, transparent 38%, rgba(3,4,10,.72) 100%);
}
.lqx-scan {
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.085) 0 1px, transparent 1px 8px);
  -webkit-mask-image: radial-gradient(40% 74% at 50% 66%, #000 0%, rgba(0,0,0,.62) 46%, transparent 82%);
  mask-image: radial-gradient(40% 74% at 50% 66%, #000 0%, rgba(0,0,0,.62) 46%, transparent 82%);
}
.lqx-stars {
  z-index: 1;
  pointer-events: none;
  opacity: .55;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 14%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 78% 9%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 33% 26%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 63% 21%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 88% 31%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 22% 38%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 52% 7%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 95% 17%, #fff, transparent),
    radial-gradient(1.1px 1.1px at 6% 29%, #fff, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 34%, transparent 52%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.5) 34%, transparent 52%);
}

/* ── Left panel ─────────────────────────────────────────────────── */
.lqx-left {
  position: relative;
  z-index: 3;
  padding: 46px clamp(32px, 4.6vw, 68px) 46px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-width: 0;
}
.lqx-logo { display: block; width: fit-content; }
.lqx-logo img {
  display: block;
  height: 42px;
  width: auto;
  opacity: .78;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 22px rgba(150,200,255,.22));
  transition: opacity .25s ease;
}
.lqx-logo:hover img { opacity: 1; }

.lqx-pitch { max-width: 560px; }

/* Eyebrow: orange tick + tracked mono label + fading rule */
.lqx-eyebrow { display: flex; align-items: center; gap: 15px; margin-bottom: 24px; }
.lqx-tick { flex: 0 0 auto; width: 3px; height: 16px; background: #EA6A2C; }
.lqx-eyebrow-t {
  flex: 0 0 auto;
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: #F4F0E8;
}
.lqx-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(244,240,232,.34) 0%, rgba(244,240,232,.04) 100%);
}

.lqx-head {
  margin: 0;
  font-size: clamp(40px, 4.6vw, 62px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -.042em;
  color: #FFFFFF;
  text-wrap: balance;
}
.lqx-dot { color: #EA6A2C; }
.lqx-sub {
  margin: 22px 0 0;
  max-width: 42ch;
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 14.6px;
  font-weight: 500;
  line-height: 1.72;
  letter-spacing: .055em;
  color: rgba(255,255,255,.76);
  text-wrap: pretty;
}

/* Glass proof card */
.lqx-proof {
  max-width: 478px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  padding: 20px 22px 10px;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 28px 56px -26px rgba(0,0,0,.72);
}
.lqx-proof-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.lqx-proof-t {
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .17em;
  text-transform: uppercase; color: rgba(255,255,255,.86);
}
.lqx-proof-n {
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; color: #EA6A2C;
}
.lqx-proof-rows { display: flex; flex-direction: column; }
.lqx-proof-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.lqx-proof-row:last-child { border-bottom: 0; }
.lqx-proof-a { font-size: 15px; font-weight: 700; letter-spacing: -.015em; color: #FFFFFF; }
.lqx-proof-b {
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 10.5px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: rgba(255,255,255,.52); white-space: nowrap;
}

/* ── Right panel ────────────────────────────────────────────────── */
.lqx-right {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 46px 40px;
  min-width: 0;
  background: linear-gradient(100deg, rgba(244,240,232,.82) 0%, rgba(244,240,232,.96) 40%, rgba(238,238,240,.99) 100%);
}
.lqx-help {
  position: absolute;
  top: 34px; right: 40px;
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: #6E7076;
}
.lqx-help a { color: #18181B; border-bottom: 1px solid rgba(24,24,27,.24); }

.lqx-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 470px;
  margin-left: clamp(-118px, -7vw, 0px);
  background: rgba(251,251,252,.74);
  border: 1px solid rgba(255,255,255,.85);
  border-radius: 26px;
  padding: 40px 42px 32px;
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  box-shadow: -34px 44px 90px -30px rgba(3,4,10,.6), 0 2px 10px rgba(3,4,10,.08), inset 0 1px 0 rgba(255,255,255,.95);
  color: #18181B;
}

/* Card eyebrow — same anatomy as the left one, ink instead of cream */
.lqx-card .lqx-eyebrow { gap: 13px; margin-bottom: 14px; }
.lqx-card .lqx-tick { height: 14px; }
.lqx-card .lqx-eyebrow-t { font-size: 11px; color: #18181B; }
.lqx-card .lqx-rule { background: linear-gradient(90deg, rgba(24,24,27,.16) 0%, rgba(24,24,27,.02) 100%); }

.lqx-title { margin: 0 0 26px; font-size: 40px; font-weight: 800; letter-spacing: -.042em; line-height: 1; }

/* ── Form ───────────────────────────────────────────────────────── */
.lqx-form { display: block; }
.lqx-label {
  display: block;
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: #6E7076; margin-bottom: 8px;
}
.lqx-label-pw { margin: 18px 0 8px; }

.lqx-input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-family: 'Public Sans', sans-serif;
  font-size: 15.5px;
  font-weight: 500;
  color: #18181B;
  background: rgba(255,255,255,.9);
  border: 1.5px solid rgba(24,24,27,.14);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lqx-input:hover { border-color: rgba(24,24,27,.3); }
.lqx-input:focus { border-color: #18181B; box-shadow: 0 0 0 3px rgba(234,106,44,.2); }

.lqx-pw { position: relative; }
.lqx-pw .lqx-input { padding: 0 84px 0 16px; }
.lqx-pw-toggle {
  position: absolute;
  top: 9px; right: 9px;
  height: 34px;
  padding: 0 13px;
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: #6E7076;
  background: rgba(24,24,27,.05);
  border: 1px solid rgba(24,24,27,.1);
  border-radius: 999px;
  cursor: pointer;
}
.lqx-pw-toggle:hover { color: #18181B; background: rgba(24,24,27,.1); }

/* Caps-lock warning — also the visual language reused for errors below */
.lqx-caps {
  display: flex; align-items: center; gap: 8px; margin-top: 9px;
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: #EA6A2C;
}
.lqx-caps[hidden] { display: none; }
.lqx-caps::before { content: ''; width: 3px; height: 11px; background: #EA6A2C; flex: 0 0 auto; }

/* Flashes + field errors. The handoff has no error state, so these borrow
   the caps-lock treatment (orange tick + tracked mono) to stay in language. */
.lqx-flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.lqx-flash,
.lqx-field-error {
  display: flex; align-items: flex-start; gap: 8px;
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11.5px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; line-height: 1.5; color: #C0431F;
}
.lqx-flash::before,
.lqx-field-error::before {
  content: ''; width: 3px; height: 12px; background: #EA6A2C;
  flex: 0 0 auto; margin-top: 2px;
}
.lqx-flash--success { color: #17643F; }
.lqx-flash--success::before { background: #1F8A5B; }
.lqx-flash--info { color: #6E7076; }
.lqx-flash--info::before { background: #6E7076; }
.lqx-field-error { margin-top: 8px; }

/* Remember row */
.lqx-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: 20px 0 18px;
}
.lqx-check { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.lqx-check-input { position: absolute; opacity: 0; width: 0; height: 0; }
.lqx-check-box {
  width: 20px; height: 20px; border-radius: 6px; flex: 0 0 auto;
  background: rgba(255,255,255,.9);
  border: 1.5px solid rgba(24,24,27,.22);
  display: flex; align-items: center; justify-content: center;
}
.lqx-check-box svg { opacity: 0; }
.lqx-check-input:checked + .lqx-check-box { background: #18181B; border-color: #18181B; }
.lqx-check-input:checked + .lqx-check-box svg { opacity: 1; }
.lqx-check-t {
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11.5px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: #6E7076;
}
.lqx-check-input:checked ~ .lqx-check-t { color: #18181B; }
.lqx-check-input:focus-visible + .lqx-check-box { box-shadow: 0 0 0 3px rgba(234,106,44,.2); }

.lqx-forgot {
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: #18181B; border-bottom: 1px solid rgba(24,24,27,.24); white-space: nowrap;
}

/* ── Cloudflare verify slot ─────────────────────────────────────── */
/* The handoff hand-draws the widget: a full-width 62px box, 14px radius,
   holding a checkbox, "Verify you are human", the Cloudflare mark and
   Privacy · Terms — which is precisely what Turnstile's own flexible
   light-theme widget renders. It's a cross-origin iframe, so it can't be
   restyled; wrapping it in the handoff's border would just double-box it.
   The real widget IS the box, and this slot only reserves the room. */
.lqx-verify {
  display: flex;
  align-items: center;
  min-height: 65px;
}
.lqx-verify .cf-turnstile { width: 100%; }
.lqx-verify iframe { display: block; }
/* Fallback copy shown only when Turnstile can't load at all (see auth-login.js) */
.lqx-verify-fallback {
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: #6E7076;
}

/* ── Submit ─────────────────────────────────────────────────────── */
.lqx-submit-wrap { margin-top: 18px; }
.lqx-submit {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  width: 100%; height: 56px;
  border-radius: 999px;
  font-family: 'Public Sans', sans-serif;
  font-size: 16px; font-weight: 700; letter-spacing: -.012em;
  transition: transform .16s, background .16s, box-shadow .16s;
}
/* Locked — until the Cloudflare check passes */
.lqx-submit.is-locked {
  background: rgba(24,24,27,.06);
  border: 1.5px solid rgba(24,24,27,.1);
  color: #A1A1AA;
  cursor: not-allowed;
}
.lqx-submit-lock {
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 10.5px; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; padding: 3px 9px;
  border: 1px solid rgba(24,24,27,.14); border-radius: 999px;
}
/* Armed */
.lqx-submit.is-armed {
  background: #18181B;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 12px 30px -12px rgba(24,24,27,.6);
}
.lqx-submit.is-armed:hover {
  background: #EA6A2C;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -14px rgba(234,106,44,.66);
}
/* Sending — the handoff bumps the gap to 12px and drops the tracking here */
.lqx-submit.is-sending {
  background: #18181B; border: none; color: #FFFFFF;
  gap: 12px;
  letter-spacing: normal;
}
.lqx-spinner {
  width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.26);
  border-top-color: #EA6A2C;
  animation: lqx-spin .7s linear infinite;
}
/* Which children each state shows */
.lqx-submit .lqx-submit-lock,
.lqx-submit .lqx-submit-arrow,
.lqx-submit .lqx-spinner,
.lqx-submit .lqx-submit-sending { display: none; }
.lqx-submit.is-locked .lqx-submit-lock { display: inline-block; }
.lqx-submit.is-armed .lqx-submit-arrow { display: block; }
.lqx-submit.is-sending .lqx-spinner { display: block; }
.lqx-submit.is-sending .lqx-submit-sending { display: inline; }
.lqx-submit.is-sending .lqx-submit-label { display: none; }

/* ── Google + footer ────────────────────────────────────────────── */
.lqx-or { display: flex; align-items: center; gap: 14px; margin: 22px 0; }
.lqx-or span:first-child,
.lqx-or span:last-child { flex: 1; height: 1px; background: rgba(24,24,27,.12); }
.lqx-or-t {
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 11px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: #A1A1AA;
}
.lqx-google {
  display: flex; align-items: center; justify-content: center; gap: 11px;
  width: 100%; height: 54px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  border: 1.5px solid rgba(24,24,27,.14);
  color: #18181B;
  font-family: 'Public Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.lqx-google:hover { border-color: #18181B; background: #FFFFFF; transform: translateY(-1px); color: #18181B; }

.lqx-foot {
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid rgba(24,24,27,.1);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.lqx-foot-t {
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 12px; font-weight: 500; letter-spacing: .04em; color: #6E7076;
}
.lqx-foot-a {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Archivo Narrow', ui-monospace, sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: #18181B;
  border-bottom: 1px solid #EA6A2C; padding-bottom: 2px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
/* The handoff is a single 1440×900 frame with no narrow spec. Below
   1080px the card's negative overlap runs out of room, so the split
   unstacks: the pitch panel becomes a header and the proof card (a
   nice-to-have, not part of signing in) drops out on small screens. */
@media (max-width: 1080px) {
  .lqx-card { margin-left: 0; }
  .lqx-right { padding: 46px clamp(24px, 4vw, 40px); justify-content: center; }
}

@media (max-width: 900px) {
  .lqx-shell { grid-template-columns: 1fr; min-height: 100vh; }
  .lqx-left {
    padding: 34px clamp(22px, 6vw, 44px) 30px;
    gap: 24px;
    justify-content: flex-start;
  }
  .lqx-logo img { height: 34px; }
  .lqx-head { font-size: clamp(32px, 8vw, 44px); }
  .lqx-sub { margin-top: 16px; font-size: 13.6px; }
  .lqx-proof { display: none; }
  /* Stacked: the panel is a flex ROW at desktop, so the help link would sit
     beside the card and shove it off-screen. The cream panel background is
     deliberately kept — the card is translucent and needs it to stay legible. */
  .lqx-right {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 26px clamp(18px, 5vw, 40px) 44px;
  }
  .lqx-help { position: static; align-self: flex-end; margin-bottom: 16px; }
  .lqx-card { width: 100%; max-width: 520px; margin: 0 auto; padding: 30px 26px 26px; }
  .lqx-title { font-size: 34px; }
}

@media (max-width: 420px) {
  .lqx-card { padding: 26px 20px 22px; border-radius: 20px; }
  .lqx-row { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* Respect reduced-motion for the two keyframe animations */
@media (prefers-reduced-motion: reduce) {
  .lqx-spinner { animation: none; }
  .lqx-submit, .lqx-google, .lqx-logo img { transition: none; }
}
