.login {
  --color-field: rgb(255 255 255 / 0.55);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: #e6cfbd url('../assets/bg-login.jpg') center / cover no-repeat;
}

.login__stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  padding: 40px 16px;
}

.login__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login__mark { display: block; }

.login__wordmark {
  margin: 38px 0 0;
  line-height: 0;
}

.login__wordmark img { display: block; }

.login__claim {
  margin: 25px 0 0;
  font-size: 18px;
  line-height: 20px;
  color: var(--color-brand);
}

.login__form {
  width: 100%;
  max-width: 300px;
}

.login__field {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-brand);
  background: var(--color-field);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background-color .2s;
}

.login__field:focus-within {
  background: rgb(255 255 255 / 0.8);
  box-shadow: inset 0 -1px 0 var(--color-brand);
}

.login__input {
  flex: 1;
  min-width: 0;
  padding: 14px 0 14px 48px; /* links = Buttonbreite, damit der Text mittig sitzt */
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  letter-spacing: .04em;
  color: var(--color-ink);
  text-align: center;
}

.login__input::placeholder { color: var(--color-brand); opacity: .7; }
.login__input:focus { outline: none; }

.login__submit {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-brand);
  cursor: pointer;
  transition: transform .2s;
}

.login__submit:hover { transform: translateX(3px); }

.login__submit:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: -4px;
}

.login__error {
  margin: 12px 0 0;
  font-size: 14px;
  text-align: center;
  color: var(--color-brand);
}

.login__legal {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 16px 32px;
  font-size: 14px;
  line-height: 20px;
}

.login__legal a {
  color: var(--color-ink);
  text-decoration: none;
}

.login__legal a:hover { text-decoration: underline; }

.login__legal a:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
}

.login.is-entering .login__legal {
  opacity: 0;
  transition: opacity .35s ease-out;
}

/* ---------- Übergang zur Startseite (per Skript in login.php) ---------- */

.login::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 10;
  background: var(--color-sand);
  opacity: 0;
  pointer-events: none;
}

.login.is-entering::after { animation: login-cover .5s ease-in 1s forwards; }

.login.is-entering .login__wordmark,
.login.is-entering .login__claim,
.login.is-entering .login__form {
  opacity: 0;
  transition: opacity .35s ease-out;
}

/* Beschleunigt größer werden wirkt wie Heranfliegen */
.login.is-entering .login__mark {
  position: relative;
  z-index: 11;
  animation: login-fly 1.2s cubic-bezier(.55, 0, .9, .4) .1s forwards;
}

@keyframes login-fly {
  60% { opacity: 1; }
  to {
    translate: var(--dx, 0) var(--dy, 0);
    scale: 16;
    opacity: 0;
  }
}

@keyframes login-cover {
  to { opacity: 1; }
}
