/* ==========================================================================
   Sign in page: Dexel core look (same base as css/pages/home.css and contact.css).
   Black, white and green. Press Start 2P for headings and labels, Inter for reading.
   The form card sits on the left, the club door scene (js/pages/login-scene.js) on the right.
   auth.js owns the flow: keep #auth-opt-tos, #auth-opt-support, #auth-opt-email, #login-discord-btn,
   #login-spinner, .btn-text and .custom-checkbox-row. Every new class is prefixed `lg-`.
   ========================================================================== */

.lg-body {
  --lg-bg: #FFFFFF;
  --lg-ink: #0B0B0B;
  --lg-text: #3D3D3D;
  --lg-mute: #5C5C5C;
  --lg-card: #F6F6F4;
  --lg-edge: #0B0B0B;
  --lg-shadow: #0B0B0B;
  --lg-focus: var(--dx-green-text, #1F7A34);
  --lg-pixel: var(--font-pixel, 'Press Start 2P', ui-monospace, monospace);
  --lg-step: steps(3, end);
  background: var(--lg-bg);
  color: var(--lg-text);
  font-family: var(--font-sans);
  overflow-x: hidden;
}
[data-theme="dark"] .lg-body {
  --lg-bg: #0A0A0A;
  --lg-ink: #FFFFFF;
  --lg-text: #CFCFCF;
  --lg-mute: #A8A8A8;
  --lg-card: #121212;
  --lg-edge: #4A4A4A;
  --lg-shadow: #2A2A2A;
  --lg-focus: var(--dx-green, #3FAE4F);
}
.lg-body .nav-bar { background-color: var(--lg-bg); }
.lg-body .brand-logo, .lg-body .polar-footer-brand-logo { image-rendering: pixelated; border-radius: 4px; }

.lg { display: block; flex: 1; padding: 64px 0 96px; }
.lg img { image-rendering: pixelated; }
.lg-wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.lg a:focus-visible, .lg button:focus-visible { outline: 3px solid var(--lg-focus); outline-offset: 3px; }

.lg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

/* --- the form card ------------------------------------------------------------------------------ */
.lg-card {
  background: var(--lg-card);
  border: 2px solid var(--lg-edge);
  border-radius: 6px;
  box-shadow: 6px 6px 0 var(--dx-green);
  padding: 32px;
}
.lg-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--lg-pixel);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  color: var(--dx-green-text);
}
.lg-label img { width: 24px; height: 24px; }
.lg-title {
  font-family: var(--lg-pixel);
  font-weight: 400;
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--lg-ink);
  margin: 0 0 16px;
  text-wrap: balance;
}
.lg-lede { font-size: 16px; line-height: 1.6; margin: 0 0 24px; color: var(--lg-text); max-width: 46ch; }

/* --- pixel checkboxes: a 3px box that fills green with a pixel tick ------------------------------ */
.lg-options { display: flex; flex-direction: column; gap: 14px; margin: 0 0 24px; }
.lg-check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  color: var(--lg-text);
}
.lg-check-input {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
}
.lg-box {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 3px solid var(--lg-ink);
  border-radius: 2px;
  background: var(--lg-bg);
  color: transparent;
  box-shadow: 2px 2px 0 var(--lg-shadow);
  transition: transform 120ms var(--lg-step);
}
.lg-check:hover .lg-box { transform: translate(-1px, -1px); }
.lg-check-input:checked + .lg-box { background: var(--dx-green); border-color: #0B0B0B; color: #0B0B0B; animation: lg-pop 240ms steps(2, end); }
.lg-check-input:focus-visible + .lg-box { outline: 3px solid var(--lg-focus); outline-offset: 3px; }
.lg-check-text { font-size: 15px; line-height: 1.45; padding-top: 1px; }
.lg-check-text a, .lg-fine a { color: var(--lg-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; text-decoration-color: var(--dx-green); }
.lg-check-text a:hover, .lg-fine a:hover { color: var(--dx-green-text); }
.lg-req { color: var(--lg-mute); font-size: 14px; }

/* --- the Discord button: green, hard pixel shadow, presses in ------------------------------------- */
.lg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  background: var(--dx-green);
  color: var(--dx-on-green);
  border: 2px solid #0B0B0B;
  box-shadow: 0 4px 0 #23803A;
  cursor: pointer;
  transition: transform 120ms var(--lg-step), box-shadow 120ms var(--lg-step);
}
.lg-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 6px 0 #23803A; }
.lg-btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #23803A; }
.lg-btn:disabled {
  cursor: not-allowed;
  background: var(--lg-bg);
  color: var(--lg-mute);
  border-color: var(--lg-mute);
  border-style: dashed;
  box-shadow: none;
}
.lg-btn-icon { flex: 0 0 auto; }
.lg-spinner {
  width: 14px;
  height: 14px;
  background: currentColor;
  animation: lg-spin 600ms steps(4, end) infinite;
}
.lg-hint { margin: 12px 0 0; font-size: 14px; line-height: 1.4; color: var(--lg-mute); min-height: 1.4em; }
.lg-fine { margin: 20px 0 0; padding-top: 18px; border-top: 2px dashed var(--lg-edge); font-size: 14px; line-height: 1.55; color: var(--lg-mute); }

/* --- the scene ---------------------------------------------------------------------------------- */
.lg-art { min-width: 0; }
.lg-stage { position: relative; }
.lg-scene {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 160 / 120;
  image-rendering: pixelated;
  background: #140F1E;
  border: 3px solid #0B0B0B;
  border-radius: 6px;
  box-shadow: 8px 8px 0 var(--dx-green);
  cursor: pointer;
}
[data-theme="light"] .lg-scene { background: #7CC8FF; }
.lg-caption { margin: 20px 0 0; font-size: 14px; line-height: 1.5; color: var(--lg-mute); }

/* the bouncer's speech bubble (the easter egg): white card with ink text in both themes */
.lg-bubble {
  position: absolute;
  top: 12px;
  right: 12px;
  max-width: min(260px, 70%);
  margin: 0;
  padding: 10px 12px;
  font-family: var(--lg-pixel);
  font-size: 10px;
  line-height: 1.7;
  color: #0B0B0B;
  background: #FFFFFF;
  border: 3px solid #0B0B0B;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #0B0B0B;
  pointer-events: none;
  visibility: hidden;
}
.lg-bubble.is-on { visibility: visible; animation: lg-pop 240ms steps(2, end); }

/* --- motion ---------------------------------------------------------------------------------------- */
@keyframes lg-pop { 0% { transform: scale(0.8); } 100% { transform: scale(1); } }
@keyframes lg-spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

/* --- small screens --------------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .lg { padding: 32px 0 64px; }
  .lg-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .lg-art { max-width: 520px; }
  .lg-caption { margin-top: 14px; }
}
@media (max-width: 520px) {
  .lg-wrap { padding: 0 16px; }
  .lg-card { padding: 22px 18px; box-shadow: 4px 4px 0 var(--dx-green); }
  .lg-scene { box-shadow: 5px 5px 0 var(--dx-green); }
  .lg-check-text { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-btn, .lg-box { transition: none; }
  .lg-btn:hover:not(:disabled), .lg-btn:active:not(:disabled), .lg-check:hover .lg-box { transform: none; }
  .lg-check-input:checked + .lg-box, .lg-bubble.is-on, .lg-spinner { animation: none; }
}
