﻿/* ─────────────────────────────────────────────────────────────────────
   Pre-Login-Layout (ADR-0021).

   Eine zentrierte Karte über einem ruhigen, vollflächigen Hintergrund
   mit sehr dezenten Brand-Akzenten. Verwendet Design-System-Tokens;
   --color-primary wird hart auf Brand-Blau gepinnt, damit
   persönliche Akzentfarben hier nicht greifen (Pre-Login = Marken-
   Bühne).
   ───────────────────────────────────────────────────────────────────── */

.itn-pre {
  /* Pre-Login pinnt Primary auf Brand — überschreibt evtl. persönliche
     Theme-Akzente (ADR-0021). Brand-Hex selbst kommt aus tokens.css. */
  --color-primary: var(--color-brand);
  --color-primary-strong: var(--color-brand-strong);
  --color-primary-soft: var(--color-brand-soft);
  --color-primary-fg: var(--color-brand-fg);
  --color-link: var(--color-brand);
  /* stylelint-disable-next-line color-no-hex -- DRK corporate red, not in general token set */
  --itn-drk-red: #E30613;

  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--color-surface-2);
  color: var(--color-text);
  font-family: var(--font-sans);
  position: relative;
  overflow: hidden;
}

/* ── Dekor: drei sehr weiche Blobs als ruhige Atmosphäre ─────────── */
.itn-pre__bg-blob {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
  filter: blur(60px);
}

.itn-pre__bg-blob--1 {
  top: -200px; right: -180px;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgb(59 130 246 / 16%) 0%, rgb(59 130 246 / 4%) 40%, transparent 70%);
}

.itn-pre__bg-blob--2 {
  bottom: -240px; left: -200px;
  width: 720px; height: 720px;
  background: radial-gradient(circle, rgb(227 6 19 / 10%) 0%, rgb(227 6 19 / 3%) 40%, transparent 70%);
}

.itn-pre__bg-blob--3 {
  top: 40%; left: 60%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgb(14 165 233 / 10%) 0%, rgb(14 165 233 / 3%) 40%, transparent 70%);
}

/* ── Brand-Leiste oben: Logo + Wortmarke ─────────────────────────── */
.itn-pre__brand {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
}

.itn-pre__logo {
  height: 40px;
  width: auto;
  display: block;
}

/* ── Main: zentrierte Karte ─────────────────────────────────────── */
.itn-pre__main {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4) var(--space-8);
}

.itn-pre__card-wrap {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-4);
}

/* TCard auf den Pre-Login-Pages — etwas weicheres Profil und ein
   deutlicher Schatten, damit die Karte schwebt. */
.itn-pre__card-wrap .t-card {
  box-shadow:
    0 1px 2px rgb(15 23 42 / 4%),
    0 12px 32px rgb(15 23 42 / 10%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

/* Leiser Marken-Untertitel unter der Karte */
.itn-pre__legal {
  margin: 0;
  text-align: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ── Form-Inhalte ───────────────────────────────────────────────── */
.itn-pre__title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: -0.01em;
}

.itn-pre__hint {
  margin: var(--space-1) 0 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.itn-pre__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.itn-pre__cta {
  width: 100%;
  justify-content: center;
  margin-top: var(--space-2);
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.itn-pre__back {
  text-align: center;
  margin: var(--space-2) 0 0 0;
  font-size: var(--text-sm);
}

.itn-pre__back a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--weight-bold);
}
.itn-pre__back a:hover { text-decoration: underline; }

.itn-pre__alert {
  background: var(--color-danger-soft);
  color: var(--color-danger-strong);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

/* ── Mobile ─────────────────────────────────────────────────────── */
@media (width <= 640px) {
  .itn-pre__brand {
    padding: var(--space-4) var(--space-4);

    /* Logo bleibt links oben — gleicher Marken-Anker wie auf Desktop. */
  }

  .itn-pre__main {
    /* Karte rutscht nach oben unter das Logo — auf hohen Phone-
       Screens würde vertikale Zentrierung sonst eine große leere
       Fläche zwischen Logo und Karte erzeugen. Etwas Atemraum zum
       Logo bleibt erhalten. */
    align-items: flex-start;
    padding: var(--space-8) var(--space-4) var(--space-6);
  }
}
