/* =====================================================================
   Ansicht: anmelden — Vollbild, geteilter Bildschirm
   Links (Desktop ca. 55 %) Titelbild mit Logos und Botschaft,
   rechts die Anmeldekarte. Mobil (< 900 px): Bild als Banner oben, Karte darunter.
   Farben nur über die Variablen aus app.css; die Texte auf dem Foto nutzen die
   festen Dunkel-Töne (--ink-deep, --on-dark …), weil das Foto in beiden Farbschemata dunkel ist.
   ===================================================================== */

/* Vollbild: Kopf/Fuß sind ausgeblendet, <main> ohne Innenabstand */
body[data-layout='voll'] .haupt { padding: 0; }
/* app.js fokussiert <main> nach jedem Seitenwechsel — hier keinen Rahmen um den ganzen Bildschirm */
body[data-layout='voll'] .haupt:focus,
body[data-layout='voll'] .haupt:focus-visible { outline: none; box-shadow: none; }

.anm {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
}

/* ---------------------------------------------------------------------
   Titelbild (mobil: Banner)
   --------------------------------------------------------------------- */
.anm__bild {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 240px;
  min-height: max(38vh, 240px);
  min-height: max(38svh, 240px);
  padding: 16px 16px 30px;
  background: var(--ink-deep); /* solange das Foto lädt */
  color: var(--on-dark);
}
.anm__foto {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 35% 62%;
}
/* Dunkler Verlauf: oben für die Logos, unten kräftig für die Schrift */
.anm__bild::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--ink-deep) 62%, transparent) 0%,
      color-mix(in srgb, var(--ink-deep) 12%, transparent) 30%,
      color-mix(in srgb, var(--ink-deep) 42%, transparent) 58%,
      color-mix(in srgb, var(--ink-deep) 92%, transparent) 100%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--ink-deep) 50%, transparent) 0%,
      transparent 75%);
}

/* Logos auf dunklem, leicht gläsernem Grund */
.anm__marken {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--ink-deep) 64%, transparent);
  border: 1px solid color-mix(in srgb, var(--on-dark) 12%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.anm__marken img { height: 44px; width: auto; }
.anm__trenner {
  align-self: stretch;
  width: 1px;
  margin: 4px 0;
  background: color-mix(in srgb, var(--on-dark) 28%, transparent);
}

.anm__botschaft {
  max-width: 36rem;
  text-shadow: 0 1px 14px color-mix(in srgb, var(--ink-deep) 55%, transparent);
}
.anm__dachzeile {
  display: none;
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--orange-2);
}
.anm__bild h1 {
  color: var(--on-dark);
  font-size: 25px;
  line-height: 1.1;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.anm__unterzeile {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: color-mix(in srgb, var(--on-dark) 88%, transparent);
  text-wrap: pretty;
}
.anm__nur-breit { display: none; }

/* Vorteile im Bild (nur Desktop; mobil stehen sie unter der Karte) */
.anm__vorteile {
  display: none;
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  gap: 13px;
}
.anm__vorteile li,
.anm__mehr li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.anm__vorteile li {
  font-size: 15.5px;
  font-weight: 560;
  line-height: 1.45;
  color: var(--on-dark);
}
.anm__haken {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: -1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--orange) 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--orange) 50%, transparent);
  color: var(--orange-2);
  text-shadow: none;
}

.anm__symbolbild {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--on-dark-muted);
  opacity: .85;
}

/* ---------------------------------------------------------------------
   Rechte Seite mit der Karte
   --------------------------------------------------------------------- */
.anm__seite {
  padding: 16px 16px 32px;
  background:
    radial-gradient(90% 60% at 100% 0%, color-mix(in srgb, var(--sand) 70%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}
.anm__spalte {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.anm__karte {
  padding: 22px 20px 20px;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1), 0 28px 60px -30px color-mix(in srgb, var(--ink) 35%, transparent);
}
.anm__karte h2 {
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -.022em;
}

/* Schrittanzeige über dem Titel */
.anm__fortschritt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.anm__balken { display: inline-flex; gap: 4px; }
.anm__balken i {
  display: block;
  width: 20px;
  height: 4px;
  border-radius: 99px;
  background: var(--line-2);
  transition: background .2s;
}
.anm__balken i[data-aktiv='true'] { background: linear-gradient(90deg, var(--orange), var(--orange-2)); }

.anm__schritt { margin-top: 12px; }
.anm__einblenden { animation: anm-ein .28s ease-out; }
@keyframes anm-ein { from { opacity: 0; transform: translateY(6px); } }

.anm__lead {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}
.anm__lead strong { color: var(--text); font-weight: 680; }

/* Leerer Fehlerplatz soll keinen Abstand erzeugen */
.anm__fehlerort:empty { display: none; }
.anm .meldung > div { min-width: 0; }
.anm__adresse { overflow-wrap: anywhere; word-break: break-word; }

.anm__formular { display: grid; gap: 16px; }
/* Fehlerhaftes Feld bleibt auch mit Fokus als fehlerhaft erkennbar (roter statt oranger Ring) */
.anm .eingabe[aria-invalid='true'],
.anm .eingabe[aria-invalid='true']:focus { border-color: var(--err); }
.anm .eingabe[aria-invalid='true']:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--err) 24%, transparent); }
.anm__formular .btn--gross { margin-top: 2px; }

/* Weitere Möglichkeiten in Schritt 2 */
.anm__weitere {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.anm__frage {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 6px;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.anm__link {
  min-height: 44px; /* ausreichend große Tippfläche */
  padding: 8px 6px;
  font-size: 14px;
  gap: 6px;
}
.anm__link[aria-disabled='true']:not([aria-busy='true']) {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}
.anm__link[aria-disabled='true']:active { transform: none; }
.anm__zaehler {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--subtle);
}

/* Vorteile unter der Karte (nur mobil) */
.anm__mehr {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--card-2);
  border: 1px solid var(--line);
}
.anm__mehr h2 {
  margin-bottom: 12px;
  font-size: 14.5px;
  font-weight: 720;
}
.anm__mehr ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.anm__mehr li {
  font-size: 14px;
  line-height: 1.45;
  gap: 10px;
}
.anm__mehr .anm__haken {
  width: 22px;
  height: 22px;
  margin-top: 0;
  background: var(--orange-tint);
  border-color: color-mix(in srgb, var(--orange) 30%, transparent);
  color: var(--orange-dark);
}
:root[data-theme='dark'] .anm__mehr .anm__haken { color: var(--orange-2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .anm__mehr .anm__haken { color: var(--orange-2); }
}

/* Kleingedrucktes */
.anm__fuss {
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.anm__fuss p { margin: 0; }
.anm__fuss a {
  display: inline-block;
  padding: 6px 4px;
  color: var(--muted);
}
.anm__fuss a:hover { color: var(--text); }
.anm__punkt { margin: 0 2px; color: var(--subtle); }

/* Sehr schmale Handys */
@media (max-width: 380px) {
  .anm__bild h1 { font-size: 23px; }
  .anm__marken { gap: 12px; padding: 7px 12px; }
  .anm__marken img { height: 44px; } /* Vorgabe: Logos ca. 44–52 px, auch auf schmalen Handys */
  .anm__karte { padding: 20px 16px 18px; }
  .anm .eingabe--code { font-size: 23px; letter-spacing: .32em; padding-left: .32em; }
}

/* ---------------------------------------------------------------------
   Desktop: geteilter Bildschirm
   --------------------------------------------------------------------- */
@media (min-width: 900px) {
  .anm { grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); }

  /* Bild bleibt stehen, falls die rechte Seite einmal höher als der Bildschirm ist */
  .anm__bild {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    min-height: 560px;
    padding: clamp(28px, 3.4vw, 52px) clamp(28px, 3.8vw, 60px) clamp(44px, 5vw, 76px);
  }
  .anm__bild::after {
    background:
      linear-gradient(180deg,
        color-mix(in srgb, var(--ink-deep) 58%, transparent) 0%,
        color-mix(in srgb, var(--ink-deep) 8%, transparent) 26%,
        color-mix(in srgb, var(--ink-deep) 30%, transparent) 50%,
        color-mix(in srgb, var(--ink-deep) 90%, transparent) 100%),
      linear-gradient(90deg,
        color-mix(in srgb, var(--ink-deep) 55%, transparent) 0%,
        transparent 70%);
  }
  .anm__marken { gap: 16px; padding: 10px 16px; border-radius: 16px; }
  .anm__marken img { height: 52px; }

  .anm__dachzeile { display: block; }
  .anm__bild h1 { font-size: clamp(34px, 3.4vw, 50px); line-height: 1.06; letter-spacing: -.032em; }
  .anm__unterzeile { margin-top: 14px; font-size: clamp(16px, 1.25vw, 18px); line-height: 1.5; max-width: 40ch; }
  .anm__nur-breit { display: inline; }
  .anm__vorteile { display: grid; }

  .anm__symbolbild { right: 18px; bottom: 14px; }

  .anm__seite {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(32px, 5vh, 64px) clamp(24px, 4vw, 64px);
  }
  .anm__karte { padding: 34px 34px 28px; }
  .anm__karte h2 { font-size: 24px; }
  .anm__schritt { margin-top: 14px; }

  .anm__mehr { display: none; }
}

/* Flache Desktop-Fenster (z. B. Laptop mit Browserleisten): Bildtext etwas kompakter */
@media (min-width: 900px) and (max-height: 720px) {
  .anm__dachzeile { margin-bottom: 10px; }
  .anm__bild h1 { font-size: clamp(30px, 2.8vw, 40px); }
  .anm__vorteile { margin-top: 20px; gap: 10px; }
  .anm__vorteile li { font-size: 14.5px; }
}
