/* =========================================================
   Login — the front door. Same cockpit tokens as the rest of the
   app (career/static/cockpit.css), scoped to body.cockpit.login-page
   so nothing here can leak onto other pages.
   ========================================================= */

body.cockpit.login-page {
  padding-bottom: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

.login-shell {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 42px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr);
  align-items: center;
  gap: 70px;
}

.login-story { min-width: 0; }

.login-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 68px;
}

.login-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.login-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim);
}

.login-story-copy h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.35rem);
  line-height: .98;
  letter-spacing: -0.055em;
  font-weight: 600;
}

.login-story-copy > p:last-child {
  max-width: 45ch;
  margin: 20px 0 0;
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.65;
}

.login-art {
  width: 100%;
  margin: 18px 0 0;
}

.login-art img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-card);
  mix-blend-mode: multiply;
}

body.cockpit[data-theme="dark"] .login-art img {
  mix-blend-mode: normal;
  opacity: .9;
  filter: brightness(.88) saturate(.9) contrast(1.03);
  border: 1px solid var(--border);
}

.login-art figcaption {
  max-width: 56ch;
  margin: 8px 0 0;
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1.55;
}

.login-access {
  width: 100%;
  max-width: 390px;
  justify-self: end;
}

.login-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-md);
  padding: 34px 32px;
}

.login-card-kicker {
  margin: 0 0 7px;
  color: var(--green);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.login-card-title {
  margin: 0 0 12px;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.65rem;
  letter-spacing: -.03em;
}

.login-copy {
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 20px;
}

.login-form { display: flex; flex-direction: column; gap: 10px; }

.login-label {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  text-transform: uppercase;
}

.login-form input[type="email"] {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-btn);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.login-form input[type="email"]::placeholder { color: var(--text-faint); }
.login-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.login-submit {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  border: 1px solid var(--accent);
  border-radius: var(--r-btn);
  background: var(--accent);
  color: var(--btn-ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.06s var(--ease);
}
.login-submit:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.login-submit:active { transform: translateY(1px); }

.login-error {
  margin: 14px 0 0;
  font-size: 0.85rem;
  color: var(--red);
}

/* "Magic link sent" — a distinct, quieter state. No form, just confirmation. */
.login-sent { text-align: left; }
.login-sent-dot {
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid rgba(78, 200, 128, 0.35);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.login-sent-dot svg { width: 16px; height: 16px; stroke: var(--green); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.login-sent-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  margin: 0 0 6px;
}
.login-sent-body {
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0;
}
.login-sent-body strong { color: var(--text); font-weight: 600; }

.login-fineprint {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.01em;
  text-align: center;
  margin-top: 16px;
}

.login-theme-toggle {
  position: fixed;
  top: max(14px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  width: 44px;
  height: 44px;
  z-index: 5;
}

@media (max-width: 820px) {
  body.cockpit.login-page { align-items: flex-start; }
  .login-shell {
    max-width: 560px;
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 30px 22px 44px;
  }
  .login-brand { margin-bottom: 38px; }
  .login-story-copy h1 { font-size: clamp(2.25rem, 11vw, 3.5rem); }
  .login-art { margin-top: 18px; }
  .login-access { max-width: none; justify-self: stretch; }
}

@media (max-width: 480px) {
  .login-shell {
    padding:
      max(18px, env(safe-area-inset-top, 0px))
      max(14px, env(safe-area-inset-right, 0px))
      max(26px, env(safe-area-inset-bottom, 0px))
      max(14px, env(safe-area-inset-left, 0px));
    gap: 18px;
  }
  .login-brand { min-height: 44px; margin-bottom: 20px; }
  .login-story-copy h1 {
    max-width: 12ch;
    font-size: clamp(2.2rem, 10.4vw, 2.8rem);
    line-height: 1.02;
  }
  .login-story-copy > p:last-child { font-size: .92rem; margin-top: 14px; }
  .login-art {
    aspect-ratio: 16 / 9;
    margin: 10px 0 0;
    overflow: hidden;
    border-radius: var(--r-card);
    background: var(--surface-2);
  }
  .login-art img { height: 100%; object-fit: cover; }
  .login-art figcaption { display: none; }
  .login-card { padding: 22px 20px; }
  .login-card-title { font-size: 1.5rem; margin-bottom: 9px; }
  .login-copy { margin-bottom: 16px; }
  .login-form input[type="email"],
  .login-submit { min-height: 48px; }
  .login-fineprint { margin-top: 12px; }
}
