:root {
  --bg: #07080a;
  --bone: #e9e3d7;
  --wordmark: #7f9aa6;
  --ash: #8f8c84;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { background: var(--bg); }

body {
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(120% 80% at 50% 0%, #0b0d10 0%, var(--bg) 62%),
    var(--bg);
  color: var(--bone);
  font-family: var(--serif);
  display: grid;
  place-items: center;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Der Runenregen liegt hinter allem; die Körnung und die Vignette darüber. */
#rain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: .55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 28%, rgba(0, 0, 0, .45) 72%, rgba(0, 0, 0, .72) 100%);
}

main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8vh 24px;
  transform: translateY(-1.5vh);
}

.rune {
  width: clamp(88px, 12vw, 148px);
  height: auto;
  opacity: .95;
}

h1.wordmark {
  margin: 2.6rem 0 0;
  width: clamp(220px, 42vw, 420px);
  color: var(--wordmark);
}

h1.wordmark svg {
  display: block;
  width: 100%;
  height: auto;
}

.version {
  margin: .95rem 0 0;
  font-family: var(--mono);
  font-size: clamp(.68rem, 1.1vw, .82rem);
  letter-spacing: .24em;
  color: var(--ash);
}

@media (max-width: 560px) {
  main { padding: 10vh 22px; transform: none; }
  .version { letter-spacing: .18em; }
}

@media (prefers-reduced-motion: reduce) {
  #rain { display: none; }
}

/* login.css — the login additions to the shared visitenkarte base (Task 8rtof).
 *
 * The chat surface serves style.css + this file as /login.css, so the login page
 * and the static card read the SAME base bytes. Nothing here introduces a card,
 * a panel or a second background: the form is the only addition.
 */

.login-form {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  width: min(320px, calc(100vw - 48px));
  margin-top: 2.1rem;
  text-align: left;
}

.login-form label {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ash);
}

.login-form input:not([type="hidden"]) {
  width: 100%;
  margin: 0 0 .7rem;
  padding: .55rem .1rem;
  border: 0;
  border-bottom: 1px solid rgba(233, 227, 215, .3);
  border-radius: 0;
  background: transparent;
  color: var(--bone);
  font: inherit;
  font-size: 1.02rem;
}

.login-form input:not([type="hidden"]):focus {
  border-bottom-color: var(--bone);
  /* The lighter underline is the focus cue; the ring is deliberately off.
   * `outline: none` is load-bearing: without an author declaration the UA
   * paints `outline: auto` on a focused text field (Task 8ry0c). */
  outline: none;
}

.login-error {
  margin: 0 0 .9rem;
  color: #e0a69e;
  font-size: .92rem;
  line-height: 1.4;
}

.login-error:empty { display: none; }

.btn {
  display: inline-block;
  padding: .7rem 1rem;
  border: 1px solid rgba(233, 227, 215, .35);
  border-radius: 0;
  background: transparent;
  color: var(--bone);
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  border-color: var(--bone);
  background: rgba(233, 227, 215, .08);
}

.btn-primary {
  width: 100%;
  margin-top: 1.2rem;
}

.btn-secondary {
  margin-top: 1.3rem;
  text-align: center;
}

main { padding: 6vh 24px; }

.version { margin-top: 2.2rem; }

@media (max-height: 720px) {
  main { padding: 3vh 24px; }
  .login-form { margin-top: 1.3rem; }
}

@media (max-width: 560px) {
  main { padding: 6vh 22px; transform: none; }
  .login-form { width: min(320px, calc(100vw - 44px)); }
}

/* The base sheet already stops the rain under prefers-reduced-motion; the
 * button colour change is a state cue, not motion, and stays. */
