@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;   /* variable */
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #08090b;
  --panel: #0d0f13;
  --panel-2: #0a0b0e;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --ink: #e7e9ec;
  --ink-dim: #9aa0a8;
  --ink-faint: #626973;
  --accent: #c9a45c;         /* restrained gold - reads "members only" */
  --accent-ink: #12130f;
  --danger: #e06a5a;
  --ok: #4bbf73;
  --radius: 9px;
}

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

body {
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

/* Backdrop: faint grid + vignette, painted in CSS - no scripts, no requests. */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 50% -8%, rgba(201,164,92,0.05), transparent 60%),
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px) 0 0 / 34px 100%,
    radial-gradient(120% 120% at 50% 40%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

.gate {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: clamp(28px, 8vh, 96px) 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ---------------------------------------------------------------- card */
.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 30px 26px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 24px 60px -30px rgba(0,0,0,0.9);
}

.brand { text-align: center; margin-bottom: 22px; }

.glyph {
  width: 46px; height: 46px;
  margin: 0 auto 12px;
  display: grid; place-items: center;
  color: var(--accent);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(201,164,92,0.05);
}

.brand h1 {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.brand h1::first-letter { color: var(--accent); }

.tag {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------- form */
.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="password"] {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  background: #08090c;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input::placeholder { color: var(--ink-faint); }
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,164,92,0.14);
}

.caps {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 18px;
  font-size: 12.5px;
}
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-dim); cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 14px; height: 14px; }

a { color: var(--ink-dim); text-decoration: none; }
a:hover { color: var(--ink); }
a.muted { color: var(--ink-faint); }
a.muted:hover { color: var(--ink-dim); }

button#submit {
  width: 100%;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: filter .15s ease, opacity .15s ease;
}
button#submit:hover { filter: brightness(1.07); }
button#submit:active { filter: brightness(0.95); }
button#submit:disabled { opacity: 0.65; cursor: default; }

.msg {
  min-height: 18px;
  margin-top: 12px;
  font-size: 12.5px;
  text-align: center;
  color: var(--danger);
}
.msg.info { color: var(--ink-dim); }

/* -------------------------------------------------------------- notice */
.notice {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-dim);
}
.notice strong { color: var(--ink); font-weight: 600; }

.links {
  margin-top: 14px;
  display: flex;
  gap: 9px;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------- foot */
.foot {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-faint);
}
.status { display: inline-flex; align-items: center; gap: 6px; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px rgba(75,191,115,0.7);
}
.stats { font-variant-numeric: tabular-nums; }
.sep { opacity: 0.5; }

/* shake on failed attempt */
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.card.shake { animation: shake .38s ease; }

@media (prefers-reduced-motion: reduce) {
  .card.shake { animation: none; }
  * { transition: none !important; }
}

@media (max-width: 420px) {
  .card { padding: 26px 20px 22px; }
}
