/* ═══ Anmeldeseite ═══
   Nur für pages/login.html. Registrierung und Passwort-Neu nutzen
   weiter `.auth` aus layout.css und bleiben unverändert.

   Zweigeteilt: links die Marke auf Schwarz, rechts das Formular.
   Kein Skript für die Gestaltung und nichts, das sich dauernd
   bewegt — die Seite soll still sein und schnell laden. */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--white);
}

/* ─── Links: Marke ─── */
.login-marke {
  position: relative;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  padding: clamp(32px, 5vw, 72px);
  display: flex; flex-direction: column; justify-content: space-between;
}
/* Ruhiges Raster, nach unten ausgeblendet. Rein statisch. */
.login-marke::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 20% 10%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 20% 10%, #000 20%, transparent 75%);
  pointer-events: none;
}
.login-marke > * { position: relative; }

.login-logo { display: flex; align-items: center; gap: 14px; }
.login-logo-mark {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--white); color: var(--black);
  border-radius: 10px;
}
.login-logo-mark svg { width: 22px; height: 22px; }
.login-logo-type { display: block; font-size: 24px; line-height: 1; letter-spacing: -.4px; }
.login-logo-type strong { font-weight: 700; }
.login-logo-type span { font-weight: 200; }
.login-logo-claim {
  display: block; margin-top: 6px;
  font-size: 9px; font-weight: 400; letter-spacing: .26em; text-transform: uppercase;
  color: rgba(255,255,255,.5);
}

.login-aussage h2 {
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 300; line-height: 1.15; letter-spacing: -.8px;
  max-width: 14em;
}
.login-aussage h2 strong { font-weight: 600; }
.login-punkte { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 18px; max-width: 30em; }
.login-punkte li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; align-items: start; }
.login-punkte svg { width: 22px; height: 22px; color: rgba(255,255,255,.9); margin-top: 1px; }
.login-punkte b { display: block; font-size: 16px; font-weight: 500; }
.login-punkte span { display: block; margin-top: 2px; font-size: 15px; font-weight: 300; color: rgba(255,255,255,.62); line-height: 1.5; }

.login-fuss { font-size: 13px; font-weight: 300; color: rgba(255,255,255,.45); }

/* ─── Rechts: Formular ─── */
.login-seite {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: clamp(24px, 4vw, 64px);
  background: var(--white);
}
.login-box { width: 100%; max-width: 400px; }

.login-kopf h1 { font-size: 32px; font-weight: 500; letter-spacing: -.6px; line-height: 1.15; }
.login-kopf p  { margin-top: 10px; font-size: 16px; font-weight: 300; color: var(--g-mid); }

.login-form { margin-top: 36px; }
.login-form .field { margin-bottom: 22px; }
.login-form .label { font-size: 12px; letter-spacing: .12em; }

.login-form .input {
  padding: 14px 16px;
  font-size: 16px;                    /* 16 px: kein Heranzoomen auf dem Telefon */
  border-radius: 10px;
  border: 1px solid #D9D9D9;
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.login-form .input:hover { border-color: #B5B5B5; }
.login-form .input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 4px rgba(10,10,10,.08);
  outline: none;
}

/* Passwort mit Auge */
.login-pw { position: relative; }
.login-pw .input { padding-right: 52px; }
.login-auge {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; background: none; border-radius: 8px;
  color: var(--g-label); cursor: pointer;
}
.login-auge:hover { color: var(--black); background: var(--g-line-lt); }
.login-auge:focus-visible { outline: 2px solid var(--black); outline-offset: 1px; }
.login-auge svg { width: 20px; height: 20px; }
.login-auge .aus { display: none; }
.login-auge[aria-pressed="true"] .an  { display: none; }
.login-auge[aria-pressed="true"] .aus { display: block; }

.login-gross { display: none; margin-top: 6px; font-size: 13px; font-weight: 400; color: #B45309; }
.login-gross.sichtbar { display: block; }

.login-form .field-error {
  margin-top: 0; margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C;
  font-size: 14px; line-height: 1.45;
}
.login-form .field-hint-box {
  margin: 0 0 18px; padding: 12px 14px; border-radius: 10px;
  background: var(--g-bg); border: 1px solid var(--g-line); color: var(--g-text);
  font-size: 14px; line-height: 1.45;
}

.login-form .btn-primary {
  margin-top: 4px;
  padding: 15px 24px;
  font-size: 16px; font-weight: 500;
  border-radius: 10px;
  transition: background .15s, transform .05s;
}
.login-form .btn-primary:active:not(:disabled) { transform: translateY(1px); }
.login-form .btn-primary[aria-busy="true"]::after {
  content: '';
  width: 16px; height: 16px; margin-left: 10px;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%;
  animation: login-dreh .7s linear infinite;
}
@keyframes login-dreh { to { transform: rotate(360deg); } }
.login-form .btn-primary[aria-busy="true"]:disabled { opacity: 1; cursor: progress; }

.login-weiter { margin-top: 22px; text-align: center; font-size: 14px; font-weight: 300; color: var(--g-mid); }
.login-weiter a { color: var(--black); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--g-line); }
.login-weiter a:hover { border-bottom-color: var(--black); }

.login-trenner { height: 1px; background: var(--g-line); margin: 32px 0 22px; border: 0; }
.login-klein { font-size: 14px; font-weight: 300; color: var(--g-mid); line-height: 1.7; text-align: center; }
.login-klein a { color: var(--black); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--g-line); }
.login-klein a:hover { border-bottom-color: var(--black); }

/* Sichtbarer Fokus für Tastatur */
.login a:focus-visible, .login .btn:focus-visible { outline: 2px solid var(--black); outline-offset: 3px; border-radius: 4px; }

/* ─── Schmal: nur das Formular, Marke als Kopfzeile ─── */
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-marke { padding: 20px 24px; flex-direction: row; align-items: center; }
  .login-marke::before, .login-aussage, .login-fuss { display: none; }
  .login-seite { justify-content: flex-start; padding-top: 40px; }
  .login-kopf h1 { font-size: 28px; }
}

/* Dunkles System: Formularfläche dunkel, Markenfläche bleibt */
@media (prefers-color-scheme: dark) {
  .login-seite { background: #111; }
  .login-kopf h1, .login-weiter a, .login-klein a { color: #fff; }
  .login-kopf p, .login-weiter, .login-klein { color: #A8A8A8; }
  .login-form .label { color: #9A9A9A; }
  .login-form .input { background: #181818; border-color: #333; color: #fff; }
  .login-form .input:hover { border-color: #555; }
  .login-form .input:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.12); }
  .login-form .input::placeholder { color: #707070; }
  .login-auge:hover { color: #fff; background: #262626; }
  .login-form .btn-primary { background: #fff; color: #0A0A0A; border-color: #fff; }
  .login-form .btn-primary:hover { background: #E6E6E6; border-color: #E6E6E6; }
  .login-form .btn-primary[aria-busy="true"]::after { border-color: rgba(0,0,0,.25); border-top-color: #000; }
  .login-trenner { background: #2A2A2A; }
  .login-weiter a, .login-klein a { border-bottom-color: #444; }
  .login-form .field-error { background: #2A1414; border-color: #5B2020; color: #FCA5A5; }
  .login-form .field-hint-box { background: #1A1A1A; border-color: #2E2E2E; color: #CFCFCF; }
}

@media (prefers-reduced-motion: reduce) {
  .login-form .input, .login-form .btn-primary { transition: none; }
  .login-form .btn-primary[aria-busy="true"]::after { animation-duration: 2s; }
}
