/* ─── Login page — standalone, no Bootstrap ──────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --night:    #0c0c0c;
  --dark-bg:  #111111;
  --card:     #1c1c1c;
  --border:   rgba(255, 255, 255, 0.09);
  --gold:     #d4a843;
  --gold-light: #f0c86a;
  --text:     #f0f0f0;
  --muted:    #888888;
  --r-lg:     10px;
  --r-xl:     16px;
  --r-pill:   999px;
  /* Fonts: defined in templates/partials/_fonts.html (single source of truth) */
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--night);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ─── Background — transparent so starfield canvas shows through ──────── */
.login-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

/* ─── Standalone starfield canvas (registration-flow pages) ──────────────
   starfield.js sizes the canvas drawing buffer to innerWidth*devicePixelRatio,
   which also becomes its intrinsic layout size. Without this rule the canvas
   renders in normal flow at ~1600px tall and pushes the content card far
   below the viewport. Pin it as a fixed, behind-content background. */
.starfield-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* ─── Shell ───────────────────────────────────────────────────────────────── */
.login-shell {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ─── Card ────────────────────────────────────────────────────────────────── */
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

/* ─── Brand ───────────────────────────────────────────────────────────────── */
.login-brand {
  display: block;
  margin-bottom: 1.25rem;
}
.login-logo {
  width: clamp(44px, 8vw, 56px);
  height: auto;
}

/* ─── Signup shell ────────────────────────────────────────────────────────── */
.signup-shell {
  position: relative;
  z-index: 1;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

/* ─── Signup card ─────────────────────────────────────────────────────────── */
.signup-card {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
}

.signup-heading {
  text-align: center;
  margin-bottom: 1.75rem;
}

/* ─── Signup brandmark ────────────────────────────────────────────────────── */
.signup-brandmark {
  text-align: center;
  margin-bottom: 1.25rem;
}
.signup-brandmark-logo {
  width: clamp(44px, 8vw, 56px);
  height: auto;
}

/* ─── Heading ─────────────────────────────────────────────────────────────── */
.login-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 0.4rem;
}
.login-sub {
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 2rem;
}

/* ─── Form ────────────────────────────────────────────────────────────────── */
.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.login-errors {
  background: rgba(220, 80, 60, 0.10);
  border: 1px solid rgba(220, 80, 60, 0.30);
  border-radius: var(--r-lg);
  padding: 0.75rem 1rem;
  font-size: 0.825rem;
  color: #e88;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.login-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.login-field input {
  width: 100%;
  background: var(--night);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.18s;
}
.login-field input:focus {
  border-color: var(--gold);
}
.login-field input::placeholder { color: rgba(136, 136, 136, 0.5); }
.login-field-error {
  font-size: 0.75rem;
  color: #e88;
}

/* ─── Actions row ─────────────────────────────────────────────────────────── */
.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
}
.login-forgot {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s;
}
.login-forgot:hover { color: var(--text); }

.login-submit {
  padding: 0.6rem 1.6rem;
  border: none;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--night);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.18s;
}
.login-submit:hover { opacity: 0.88; transform: translateY(-1px); }
.login-submit:active { transform: translateY(0); }

/* ─── Footer note ─────────────────────────────────────────────────────────── */
.login-footer-note {
  margin-top: 1.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.login-footer-note a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.login-footer-note a:hover { text-decoration: underline; }

.terms-link {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}
.terms-link:hover { text-decoration: underline; color: var(--gold-light); }

/* ─── Gold CTA button ─────────────────────────────────────────────────────── */
.btn-gold {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  border: none;
  border-radius: var(--r-pill);
  background: var(--gold);
  color: var(--night);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s, transform 0.18s;
}
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
.btn-gold:active { transform: translateY(0); }

/* ─── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 420px) {
  .login-card { padding: 2rem 1.25rem; }
  .login-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .login-submit { width: 100%; text-align: center; }
  .login-forgot { text-align: center; }
}
