:root {
  --paper: #f4f1ea;
  --ink: #121212;
  --muted: #4f4f4f;
  --line: rgba(18, 18, 18, 0.15);
  --accent: #d72b1f;
  --ok: #177245;
  --error: #a91d14;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: var(--paper);
  background-image: linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  overflow: hidden;
}

.ambient {
  position: fixed;
  top: -5vh;
  right: min(7vw, 70px);
  width: clamp(90px, 17vw, 220px);
  aspect-ratio: 1;
  border: 2px solid var(--accent);
  transform: rotate(18deg);
  opacity: 0.85;
  pointer-events: none;
  animation: drift 8s ease-in-out infinite alternate;
}

.auth-shell {
  position: relative;
  min-height: 100vh;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 56px);
  display: grid;
  align-content: center;
  gap: 16px;
}

.kicker {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 0.95;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.intro {
  margin: 0;
  max-width: 46ch;
  line-height: 1.5;
  color: var(--muted);
}

.login-card {
  margin-top: 14px;
  padding: clamp(16px, 3vw, 24px);
  display: grid;
  gap: 10px;
  border: 2px solid var(--ink);
  background: rgba(244, 241, 234, 0.88);
  box-shadow: 9px 9px 0 var(--ink);
}

label {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.input-row {
  display: flex;
  gap: 10px;
}

input {
  flex: 1;
  min-width: 0;
  border: 2px solid var(--ink);
  background: #fff;
  border-radius: 0;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
}

input::placeholder {
  color: #8c8c8c;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}

button:hover {
  background: var(--accent);
  transform: translate(-2px, -2px);
}

#status {
  margin: 2px 0 0;
  min-height: 1.3em;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  color: var(--muted);
}

#status.error {
  color: var(--error);
}

#status.success {
  color: var(--ok);
}

@keyframes drift {
  from {
    transform: rotate(16deg) translateY(0);
  }
  to {
    transform: rotate(22deg) translateY(10px);
  }
}

@media (max-width: 650px) {
  .input-row {
    flex-direction: column;
  }

  .ambient {
    right: 5vw;
  }

  .login-card {
    box-shadow: 6px 6px 0 var(--ink);
  }
}
