/* Login gate — same monochrome language as style.css */
:root {
  --bg: #000000;
  --card: #0b0b0b;
  --elev: #111111;
  --line: #232323;
  --line-strong: #3a3a3a;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --faint: #5a5a5a;
  --danger: #ff5c5c;
  --font: 'Prompt', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 30%, transparent 100%);
  pointer-events: none;
}

.gate {
  position: relative;
  width: 100%;
  max-width: 396px;
  z-index: 1;
}

.gate-card {
  background: linear-gradient(180deg, #0d0d0d 0%, #080808 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px 28px 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85);
}

.gate-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.gate-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #161616;
  border: 1px solid var(--line-strong);
  color: #fff;
  flex-shrink: 0;
}

.gate-brand-text h1 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.gate-brand-text span {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 3px;
}

.gate-divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0 18px;
}

.gate-lead {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.field { display: block; margin-bottom: 14px; }

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 7px;
}

.field-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 12px;
  height: 46px;
  transition: border-color 0.15s ease, background 0.15s ease;
  color: var(--faint);
}

.field-box:focus-within {
  border-color: var(--line-strong);
  background: #151515;
  color: var(--text);
}

.field-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  height: 100%;
}

.field-box input::placeholder { color: #4a4a4a; }

.peek {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--faint);
  display: grid;
  place-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}

.peek:hover { color: var(--text); background: #1c1c1c; }

.gate-error {
  background: rgba(255, 92, 92, 0.08);
  border: 1px solid rgba(255, 92, 92, 0.32);
  color: #ffb3b3;
  font-size: 12.5px;
  line-height: 1.5;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
  word-break: break-word;
}

/* Turnstile widget: the iframe draws its own checkbox, so the wrapper only owns
   spacing and the caption. */
.gate-captcha {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#captchaMount {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#captchaMount iframe { border-radius: 8px; }

/* Built-in "Verify you are human" row. Same footprint as the Turnstile widget
   (300x65) so the card does not jump when real keys are added. */
.captcha-box {
  width: 100%;
  max-width: 300px;
  height: 65px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: #141414;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.captcha-box:hover { border-color: #4d4d4d; background: #171717; }
.captcha-box:focus-visible { outline: 2px solid #3d3d3d; outline-offset: 2px; }

.captcha-mark {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 2px solid #5a5a5a;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.captcha-box[aria-checked="true"] .captcha-mark {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
}

.captcha-box[data-busy="true"] .captcha-mark {
  border-color: #8a8a8a;
  animation: captcha-pulse 1s ease-in-out infinite;
}

@keyframes captcha-pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.captcha-text {
  flex: 1;
  font-size: 13.5px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.captcha-brand { color: #6b6b6b; display: flex; }

.gate-captcha-hint {
  font-size: 11.5px;
  color: var(--faint);
  text-align: center;
  line-height: 1.4;
}

.gate-submit {
  position: relative;
  width: 100%;
  height: 47px;
  border-radius: 11px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #000000;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease;
}

.gate-submit:hover:not(:disabled) { background: #e9e9e9; }
.gate-submit:active:not(:disabled) { transform: scale(0.988); }
.gate-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

.gate-submit.loading .btn-label { display: none; }
.gate-submit.loading .btn-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.gate-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 10.5px;
  color: var(--faint);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6ee7a8;
  box-shadow: 0 0 8px rgba(110, 231, 168, 0.7);
  flex-shrink: 0;
}

.gate-copy {
  text-align: center;
  font-size: 10.5px;
  color: #3a3a3a;
  margin-top: 18px;
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

@media (max-width: 420px) {
  .gate-card { padding: 24px 19px 19px; border-radius: 15px; }
  .gate-brand-text h1 { font-size: 14px; }
}
