/* Gestaltung der Oberfläche nach dem Designsystem "assfinet CI".

   Quelle der Werte: docs/vorhaben/VH-001/designsystem-assfinet-ci-tokens.json. Jedes Token steht
   als Variable --<Tokenname> in beiden Themes. Ohne data-theme am html-Element folgt die Seite der
   Einstellung des Betriebssystems (prefers-color-scheme); mit hell oder dunkel gilt die Wahl der
   angemeldeten Person, die der Server beim Rendern setzt. Die Schrift Lato folgt später als Datei
   aus dem Repository; bis dahin gilt der Schriftstapel der Tokens. Kein Inline-Stil, keine fremde
   Quelle: Die Content Security Policy erlaubt nur style-src 'self'. */

:root {
  /* Markenfarben, in beiden Themes gleich */
  --navy: #0A1930;
  --navy-deep: #071322;
  --brand-blue: #2AA9E0;
  --accent-orange: #E8A33D;
  --royal-blue: #2A6FDB;
  --sky: #6FCFF0;
  --ice: #C9DDEC;
  --steel: #7E93A6;

  /* Abstände und Radien */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 48px;
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  /* Schriftstapel der Tokens */
  --font-sans: Calibri, Carlito, Lato, "Segoe UI", system-ui, sans-serif;

  /* Theme hell (Grundlage, wenn das Betriebssystem nichts anderes verlangt) */
  --bg: #FFFFFF;
  --surface: #EEF4F9;
  --surface-2: #E3EDF5;
  --line: #C9DDEC;
  --ink: #0A1930;
  --text: #1B2F47;
  --muted: #4F6378;
  --link: #166F9C;
  --change: #95600F;
  --change-soft: #FDF1DF;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0A1930;
    --surface: #0C1E38;
    --surface-2: #102642;
    --line: #1B3859;
    --ink: #FFFFFF;
    --text: #C9DDEC;
    --muted: #7E93A6;
    --link: #2AA9E0;
    --change: #E8A33D;
    --change-soft: rgba(232, 163, 61, 0.2);
    color-scheme: dark;
  }
}

:root[data-theme="dunkel"] {
  --bg: #0A1930;
  --surface: #0C1E38;
  --surface-2: #102642;
  --line: #1B3859;
  --ink: #FFFFFF;
  --text: #C9DDEC;
  --muted: #7E93A6;
  --link: #2AA9E0;
  --change: #E8A33D;
  --change-soft: rgba(232, 163, 61, 0.2);
  color-scheme: dark;
}

:root[data-theme="hell"] {
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
}

a {
  color: var(--link);
}

:focus-visible {
  outline: 3px solid var(--brand-blue);
  outline-offset: 2px;
}

/* Kopfbereich: in beiden Themes Navy, damit das weiße Logo steht */
.seitenkopf {
  background: linear-gradient(90deg, var(--navy), var(--navy-deep));
  border-bottom: 3px solid var(--brand-blue);
  color: #FFFFFF;
}

.kopf-inhalt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5);
}

.logo {
  display: block;
  height: 40px;
  width: auto;
}

.produktname {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
  color: #FFFFFF;
}

.kopf-aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
}

.kopf-aktionen form {
  margin: 0;
}

/* Umschalter für das Theme */
.umschalter {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--steel);
  border-radius: var(--radius-pill);
}

.umschalter button {
  padding: var(--space-1) var(--space-3);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ice);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.umschalter button:hover {
  background: var(--navy-deep);
}

.umschalter button[aria-pressed="true"] {
  background: var(--brand-blue);
  color: var(--navy);
  font-weight: 700;
}

.schaltflaeche-schlicht {
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--steel);
  border-radius: var(--radius-md);
  background: transparent;
  color: #FFFFFF;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.schaltflaeche-schlicht:hover {
  background: var(--navy-deep);
}

/* Inhalt */
.inhalt {
  flex: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5);
}

.inhalt h1,
.inhalt h2 {
  margin: 0 0 var(--space-4);
  color: var(--ink);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}

.inhalt h1::after,
.inhalt h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: var(--space-2);
  background: var(--brand-blue);
}

.inhalt p {
  max-width: 80ch;
  margin: 0 0 var(--space-3);
}

.hinweis {
  color: var(--muted);
  font-size: 14px;
}

/* Karte mit Konturen statt Schatten */
.karte {
  max-width: 36rem;
  margin: 0 auto;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.wege {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-5) 0 var(--space-4);
}

.formular {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.formular label {
  color: var(--ink);
  font-weight: 700;
}

.formular select {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

/* Schaltfläche und Link in Schaltflächenform: Text auf brand-blue immer in Navy */
.schaltflaeche {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-5);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--brand-blue);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.schaltflaeche:hover {
  background: var(--sky);
}

.schaltflaeche:disabled {
  border: 1px dashed var(--muted);
  background: transparent;
  color: var(--muted);
  cursor: not-allowed;
}

.seitentitel {
  margin-top: 0;
}

.inhalt ul {
  padding-left: var(--space-5);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
