@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Syne:wght@600;700;800&display=swap');

:root {
  --ink: #08110e;
  --ink-2: #0f1c17;
  --mist: #d7e6dc;
  --mist-dim: #9bb5a6;
  --line: rgba(215, 230, 220, 0.14);
  --accent: #8fd6a8;
  --accent-ink: #c8f0d6;
  --danger: #ff8f8f;
  --field: rgba(8, 17, 14, 0.55);
  --sans: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --display: "Syne", "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Sans", ui-monospace, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--mist);
  font-family: var(--sans);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg {
  position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(143, 214, 168, 0.16), transparent 55%),
    radial-gradient(900px 600px at 90% 110%, rgba(90, 140, 120, 0.18), transparent 50%),
    linear-gradient(160deg, #08110e 0%, #0d1a15 48%, #0a1411 100%);
}
.bg::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(215, 230, 220, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(215, 230, 220, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  animation: grid-drift 28s linear infinite;
}
.bg::after {
  content: "";
  position: absolute; inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-48px, -48px, 0); }
}

.shell {
  position: relative; z-index: 1;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 48px);
}

.stage {
  width: min(440px, 100%);
  animation: rise 0.7s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.brand {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 28px;
}
.brand-mark {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(143, 214, 168, 0.12);
  animation: pulse 2.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.86); opacity: 0.7; }
}
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(28px, 5vw, 36px);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--mist);
}
.brand-sub {
  margin-left: auto;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist-dim);
}

.lede {
  margin: 0 0 28px;
  max-width: 28ch;
  font-size: 15px;
  line-height: 1.55;
  color: var(--mist-dim);
}

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

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist-dim);
}
.field input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--mist);
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.18em;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input::placeholder {
  color: rgba(155, 181, 166, 0.45);
  letter-spacing: 0.12em;
}
.field input:focus {
  border-color: rgba(143, 214, 168, 0.55);
  box-shadow: 0 0 0 4px rgba(143, 214, 168, 0.12);
  background: rgba(8, 17, 14, 0.72);
}

.captcha-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}
.captcha-box {
  position: relative;
  width: 132px; height: 52px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0c1813;
  cursor: pointer;
}
.captcha-box img {
  width: 100%; height: 100%;
  display: block;
  object-fit: cover;
}
.captcha-box .hint {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist-dim);
  background: rgba(8, 17, 14, 0.55);
  opacity: 0;
  transition: opacity .2s ease;
}
.captcha-box:hover .hint { opacity: 1; }

.btn {
  margin-top: 8px;
  height: 54px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #8fd6a8 0%, #5fbf8e 100%);
  color: #08110e;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
  box-shadow: 0 12px 32px -16px rgba(143, 214, 168, 0.65);
}
.btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  filter: none;
}

.msg {
  min-height: 1.4em;
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--mist-dim);
}
.msg.err { color: var(--danger); }
.msg.ok { color: var(--accent-ink); }

.foot {
  margin-top: 28px;
  font-size: 12px;
  color: rgba(155, 181, 166, 0.55);
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  .brand { flex-wrap: wrap; }
  .brand-sub { margin-left: 0; width: 100%; margin-top: 6px; }
  .field input { letter-spacing: 0.12em; font-size: 16px; }
}
