/* 26.09.19.13 */
/* ---------- Token ---------- */
:root {
  --weiss: #ffffff;
  --schwarz: #000000;
  --rot: #ff0000;            /* Markenrot, nur für Flächen und große Zeichen */
  --rot-text: #c40000;       /* Rot für Text auf Weiß, Kontrast 5,9:1 */
  --text: #000000;
  --text-leise: #4a4a4a;     /* Kontrast 9,7:1 auf Weiß */
  --linie: #d9d9d9;
  --flaeche: #f3f3f3;
  --hintergrund: #ffffff;
  --link: #000000;
  --fokus: #ff0000;

  --schrift: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;
  --fs-0: 1.0625rem;         /* 17 px Fließtext */
  --fs-1: 1.25rem;
  --fs-2: 1.75rem;
  --fs-3: clamp(2.25rem, 1.2rem + 4.5vw, 4.5rem);
  --lh: 1.55;

  --breite: 72rem;           /* 1152 px */
  --rand: 1rem;              /* 16 px Seitenrand am Telefon */
  --abstand: clamp(3rem, 8vw, 6rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #f2f2f2;
    --text-leise: #b8b8b8;
    --linie: #3a3a3a;
    --flaeche: #161616;
    --hintergrund: #000000;
    --link: #f2f2f2;
    --rot-text: #ff4d4d;     /* Kontrast 6,1:1 auf Schwarz */
  }
}
:root[data-theme="dark"] {
  --text: #f2f2f2;
  --text-leise: #b8b8b8;
  --linie: #3a3a3a;
  --flaeche: #161616;
  --hintergrund: #000000;
  --link: #f2f2f2;
  --rot-text: #ff4d4d;
}

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

html {
  font-family: var(--schrift);
  font-size: 100%;
  line-height: var(--lh);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  color: var(--text);
  background: var(--hintergrund);
  font-size: var(--fs-0);
  overflow-x: hidden;
}

h1, h2, h3 {
  margin: 0 0 0.6em;
  line-height: 1.12;
  letter-spacing: -0.015em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--fs-3); letter-spacing: -0.025em; }
h2 { font-size: var(--fs-2); }
h3 { font-size: var(--fs-1); }
p, ul, ol, dl { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
p, li, dd { max-width: 38em; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }
img, svg { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; }
address { font-style: normal; }
main address { margin-bottom: 1.1em; }
hr { border: 0; border-top: 1px solid var(--linie); margin: 0; }

.nur-vorlesen {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.raum {
  width: min(100% - 2 * var(--rand), var(--breite));
  margin-inline: auto;
}

/* ---------- Sprunglink ---------- */
.sprung {
  position: absolute; left: var(--rand); top: -4rem;
  background: var(--schwarz); color: var(--weiss);
  padding: 0.5rem 0.75rem; z-index: 100;
}
.sprung:focus { top: 0.5rem; }

/* ---------- Kopf ---------- */
/* Der Kopf bleibt beim Rollen oben stehen (Wunsch WS 2026-09-19). Deckender Hintergrund und Linie sind schon da;
   z-index über dem roten Keil (0/1) und unter dem Sprunglink (100). Sprungziele rücken um die Kopfhöhe ab. */
.kopf {
  position: sticky; top: 0; z-index: 60;
  border-bottom: 1px solid var(--linie);
  background: var(--hintergrund);
}
[id] { scroll-margin-top: 5.25rem; }
.kopf .raum {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 4.25rem; gap: 1rem;
}
.marke {
  font-weight: 700; font-size: 1.35rem; letter-spacing: 0.01em;
  text-decoration: none; color: var(--text); white-space: nowrap;
  display: inline-flex; align-items: baseline;
}
.marke em { font-style: italic; }
.marke-strich { color: var(--rot); margin: 0 -0.04em; font-weight: 700; }

.menue-knopf {
  appearance: none; border: 1px solid var(--text); background: transparent; color: var(--text);
  font: inherit; font-weight: 700; padding: 0.45rem 0.8rem; cursor: pointer; border-radius: 0;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; }
.nav a { text-decoration: none; font-weight: 500; padding: 0.4rem 0; display: inline-block;
  border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--text); }
/* aktive Seite ohne Änderung am Kopf-HTML: der Rumpf trägt data-seite */
body[data-seite="start"]        .nav a[href="index.html"],
body[data-seite="leistungen"]   .nav a[href="leistungen.html"],
body[data-seite="unternehmen"]  .nav a[href="unternehmen.html"],
body[data-seite="kontakt"]      .nav a[href="kontakt.html"] { border-bottom-color: var(--rot); }

@media (max-width: 47.99rem) {
  .nav { position: absolute; left: 0; right: 0; top: 4.25rem; background: var(--hintergrund);
    border-bottom: 1px solid var(--linie); display: none; z-index: 50; }
  .nav[data-offen="true"] { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding: 0.5rem var(--rand) 1rem; }
  .nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--linie); font-size: 1.1rem; }
  .nav li:last-child a { border-bottom-color: transparent; }
  body[data-seite] .nav a { border-bottom-color: var(--linie); }
  /* das aufgeklappte Telefon-Menü hängt am Kopf und rollt mit ihm */
}
@media (min-width: 48rem) {
  .menue-knopf { display: none; }
  .nav { display: block !important; }
}

/* ---------- Held (Startseite) ---------- */
.held {
  position: relative; overflow: hidden;
  padding-block: var(--abstand);
}
.held .raum { position: relative; z-index: 1; }
.held h1 { max-width: 16ch; margin-bottom: 1.2rem; }
.held p { font-size: var(--fs-1); color: var(--text-leise); max-width: 34em; }
.held-keil {
  position: absolute; right: -6vw; top: -10%; height: 120%; width: clamp(5rem, 12vw, 11rem);
  background: var(--rot); transform: skewX(-18deg); z-index: 0;
}
@media (max-width: 47.99rem) {
  /* am Telefon ohne Keil: Überschrift und Absatz bekommen die volle Breite, der Einstieg wird kürzer
     (Durchsicht 2026-09-19; davor lief der Keil durch den Absatz, dann blieb rechts eine schmale Spalte frei) */
  .held-keil { display: none; }
  .held h1, .held p { max-width: 100%; }
}
/* Abschnittskopf über der vollen Breite (statt linker Titelspalte), wenn der Inhalt die Breite braucht */
.abschnitt-kopf { max-width: 40em; margin-bottom: 1.75rem; }
.abschnitt-kopf h2 { margin-bottom: 0.4em; }
.abschnitt-kopf p { color: var(--text-leise); }
/* Leistungsfelder der Startseite: ab 48rem zwei Spalten mit je drei Feldern (Wunsch WS 2026-09-19) */
@media (min-width: 48rem) {
  .zeilen-zwei { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .zeilen-zwei > li:last-child { border-bottom: 0; }
  .zeilen-zwei > li:nth-last-child(-n+2) { border-bottom: 1px solid var(--linie); }
}
.nowrap { white-space: nowrap; } /* Produktnamen wie IBM-i-Systeme bleiben auf einer Zeile */
.seitenkopf .unterzeile { font-size: var(--fs-2); font-weight: 700; color: var(--text); margin: -0.5rem 0 1rem; max-width: none; }
.held-aktionen { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; margin-top: 2rem; align-items: center; }
/* Einstieg: die sieben Länder als eigener kompakter Block unter den Knöpfen (Entscheidung WS 2026-09-19) */
.held .held-laender { font-size: var(--fs-0); max-width: 40em; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--linie); }
.held .held-laender strong { color: var(--text); }

/* Praxisbeispiel der Startseite: Text, Schaubild mit drei Kästen, Knopf (Entscheidung WS 2026-09-19) */
.praxis > p { max-width: 44em; }
.schaubild { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 0.5rem; grid-template-columns: 1fr; }
.schaubild li { border: 1px solid var(--linie); background: var(--hintergrund); padding: 1rem 1.25rem; }
.schaubild li strong { display: block; margin-bottom: 0.3rem; }
.schaubild li span { display: block; color: var(--text-leise); font-size: var(--fs-0); }
.schaubild .schaubild-kern { border-color: var(--rot); border-width: 2px; }
.schaubild .schaubild-pfeil { border: 0; background: none; padding: 0; display: flex; justify-content: center; }
.schaubild .schaubild-pfeil svg { width: 2.5rem; height: 1.25rem; transform: rotate(90deg); }
.schaubild .schaubild-pfeil path { fill: none; stroke: var(--rot); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 48rem) {
  .schaubild { grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 0.75rem; }
  .schaubild .schaubild-pfeil svg { transform: none; }
}
.praxis .held-aktionen { margin-top: 2rem; }

.knopf {
  display: inline-block; background: var(--schwarz); color: var(--weiss);
  padding: 0.85rem 1.4rem; text-decoration: none; font-weight: 700; border: 1px solid var(--schwarz);
}
.knopf:hover { background: var(--rot); border-color: var(--rot); }
:root[data-theme="dark"] .knopf { background: var(--weiss); color: var(--schwarz); border-color: var(--weiss); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .knopf { background: var(--weiss); color: var(--schwarz); border-color: var(--weiss); }
  :root:not([data-theme="light"]) .knopf:hover { background: var(--rot); color: var(--weiss); border-color: var(--rot); }
}
.knopf-leise { display: inline-block; font-weight: 700; padding: 0.85rem 0; }

/* ---------- Abschnitte im Datenblatt-Raster ---------- */
.abschnitt { padding-block: var(--abstand); border-top: 1px solid var(--linie); }
.abschnitt-grau { background: var(--flaeche); }
.raster {
  display: grid; gap: 1.5rem 3rem;
}
@media (min-width: 60rem) {
  .raster { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .raster > .spalte-titel { position: sticky; top: 1.5rem; align-self: start; }
}
.spalte-titel h2 { margin-bottom: 0.4em; }
.spalte-titel p { color: var(--text-leise); }

/* Leistungsliste: Zeilen mit Linie, der Schrägstrich als Zeichen, keine Karten */
.zeilen { list-style: none; margin: 0; padding: 0; }
.zeilen > li {
  display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.6rem 0.9rem;
  padding: 1.25rem 0; border-top: 1px solid var(--linie);
}
.zeilen > li:last-child { border-bottom: 1px solid var(--linie); }
.zeilen > li::before {
  content: "/"; color: var(--rot); font-weight: 700; font-size: 1.6rem; line-height: 1;
  transform: translateY(-0.05em);
}
.zeilen h3 { margin-bottom: 0.3em; }
.zeilen h3 a { text-decoration: none; }
.zeilen h3 a:hover { text-decoration: underline; }
.zeilen p { color: var(--text-leise); margin: 0; }
.zeilen .stichworte { margin: 0.5rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; color: var(--text-leise); font-size: 0.95rem; }
.zeilen .stichworte li::before { content: ""; }

/* Merkmale: zwei Spalten ab Tablet, Text ohne Kästen */
.merkmale { display: grid; gap: 1.5rem 3rem; margin: 0; }
@media (min-width: 40rem) { .merkmale { grid-template-columns: 1fr 1fr; } }
.merkmale dt { font-weight: 700; font-size: var(--fs-1); margin-bottom: 0.25em; }
.merkmale dd { margin: 0; color: var(--text-leise); }

/* Fakten in einer Zeile: Zahl groß, Bedeutung darunter */
.fakten { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 0; }
.fakten dt { font-size: 2.25rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.fakten dd { margin: 0.35rem 0 0; color: var(--text-leise); }

/* Kontakt-Aufruf am Seitenende */
.aufruf { padding-block: var(--abstand); background: var(--schwarz); color: var(--weiss); }
.aufruf h2 { max-width: 20ch; }
.aufruf p { color: #cfcfcf; }
.aufruf a { color: var(--weiss); }
.aufruf .knopf { background: var(--weiss); color: var(--schwarz); border-color: var(--weiss); }
.aufruf .knopf:hover { background: var(--rot); color: var(--weiss); border-color: var(--rot); }
.aufruf .held-aktionen { margin-top: 1.5rem; }

/* ---------- Unterseiten ---------- */
.seitenkopf { padding-block: var(--abstand) 2rem; }
.seitenkopf h1 { max-width: 18ch; }
.seitenkopf p { font-size: var(--fs-1); color: var(--text-leise); max-width: 34em; }
.einleitung { font-size: var(--fs-0); } /* Leistungen: alle Absätze in Fließtextgröße (Wunsch WS 2026-09-19) */

.leistung { padding-block: clamp(2.5rem, 6vw, 4.5rem); border-top: 1px solid var(--linie); scroll-margin-top: 5.25rem; }
.leistung h2::before { content: "/ "; color: var(--rot); }
.leistung .zwei { display: grid; gap: 1.25rem 3rem; }
/* Ab 60rem zwei Spalten mit gemeinsamer Überschriftenzeile: die Feldüberschrift links und „Was wir konkret tun"
   rechts stehen in derselben Zeile, Text und Liste beginnen darunter auf gleicher Höhe (Wunsch WS 2026-09-19).
   Die beiden Spalten-Hüllen geben ihre Kinder mit display: contents an das Raster des Abschnitts ab. */
@media (min-width: 60rem) {
  .leistung .raum { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; row-gap: 0; align-items: start; }
  .leistung .raum > h2 { grid-column: 1; grid-row: 1; }
  .leistung .zwei, .leistung .zwei > div:last-child { display: contents; }
  .leistung .zwei > div:first-child { grid-column: 1; grid-row: 2 / span 8; }
  .leistung .zwei > div:last-child > * { grid-column: 2; }
  .leistung .zwei > div:last-child > h3:first-child { grid-row: 1; align-self: end; }
}
.leistung ul { padding-left: 1.2rem; }
.leistung li { margin-bottom: 0.35em; }
.leistung .fussnote { color: var(--text-leise); }

.sprungleiste { padding: 1rem 0 2rem; }
.sprungleiste ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem 2rem; }
.sprungleiste li { display: grid; grid-template-columns: 1rem 1fr; gap: 0.5rem; align-items: baseline; }
.sprungleiste li::before { content: "/"; color: var(--rot); font-weight: 700; }
.sprungleiste a { text-decoration: none; border-bottom: 2px solid var(--linie); }
.sprungleiste a:hover { border-bottom-color: var(--rot); }
@media (min-width: 40rem) { .sprungleiste ul { grid-template-columns: repeat(2, max-content); } }
@media (min-width: 48rem) { .sprungleiste ul { grid-template-columns: repeat(3, max-content); } }

/* Rechtstexte */
.rechtstext h2 { font-size: var(--fs-1); margin-top: 2.2em; }
.rechtstext h2:first-of-type { margin-top: 0; }
.rechtstext dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.5rem; }
.rechtstext dt { font-weight: 700; }
.rechtstext dd { margin: 0; }
@media (max-width: 40rem) { .rechtstext dl { grid-template-columns: 1fr; gap: 0.1rem; } .rechtstext dd { margin-bottom: 0.7rem; } }
.hinweis-pruefen { border-left: 4px solid var(--rot); padding: 0.6rem 1rem; background: var(--flaeche); color: var(--text-leise); margin: 1.5rem 0; }

/* Kontakt */
.kontaktraster { display: grid; gap: 2rem 3rem; }
@media (min-width: 48rem) { .kontaktraster { grid-template-columns: 1fr 1fr; } }
.kontaktraster h2 { font-size: var(--fs-1); }
.kontaktraster h2 + address + h2 { margin-top: 1.6em; }
.kontaktraster a[href^="mailto"], .kontaktraster a[href^="tel"] { font-size: var(--fs-1); font-weight: 700; text-decoration: none; }
.kontaktraster a[href^="mailto"]:hover, .kontaktraster a[href^="tel"]:hover { text-decoration: underline; }

/* Kontaktformular: Felder untereinander, volle Breite, klare Linien */
.formular { display: grid; gap: 1.1rem; max-width: 36rem; }
.formular .feld { display: grid; gap: 0.35rem; }
.formular label { font-weight: 700; }
.formular input, .formular textarea {
  font: inherit; color: var(--text); background: var(--hintergrund);
  border: 1px solid var(--text-leise); border-radius: 0; padding: 0.65rem 0.75rem; width: 100%;
}
.formular input:focus-visible, .formular textarea:focus-visible { outline: 3px solid var(--fokus); outline-offset: 1px; border-color: var(--text); }
.formular textarea { resize: vertical; min-height: 8rem; }
.formular .knopf { cursor: pointer; border-radius: 0; font: inherit; font-weight: 700; }
/* Honigtopf: für Menschen unsichtbar, für Massen-Versender ein Feld wie jedes andere */
.feld-versteckt { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Fuß ---------- */
.fuss { border-top: 1px solid var(--linie); padding-block: 2.5rem; color: var(--text-leise); font-size: 0.95rem; }
.fuss .raum { display: grid; gap: 1.5rem 3rem; }
@media (min-width: 48rem) { .fuss .raum { grid-template-columns: 2fr 1fr 1fr; } }
.fuss h2 { font-size: 1rem; color: var(--text); margin-bottom: 0.5em; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: 0.3em; }
.fuss a { color: var(--text-leise); }
.fuss .marke { font-size: 1.1rem; margin-bottom: 0.5rem; }
.fuss .rechtlich { grid-column: 1 / -1; border-top: 1px solid var(--linie); padding-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.fuss .rechtlich:first-child { border-top: 0; padding-top: 0; }
/* Revision der Seite, von main.js aus der Versionszeile gefüllt; klein, rechts, ohne Skript unsichtbar. */
.fuss .revision { margin-left: auto; font-size: 0.8rem; color: var(--text-leise); }
.fuss .revision:empty { display: none; }
