/* ==========================================================================
   Ki.Ste. – Webseiten mit System
   Stylesheet für alle Seiten. Farben und Abstände zentral unter :root ändern.
   ========================================================================== */

:root {
  --rot: #d7141a;            /* Akzentfarbe aus dem Logo */
  --rot-dunkel: #a80f14;
  --text: #1f2328;
  --text-hell: #5b6470;
  --hell: #f4f5f7;           /* Hintergrund heller Abschnitte */
  --dunkel: #16191d;         /* Fußbereich */
  --rand: #e3e6ea;
  --radius: 10px;
  --breite: 1140px;          /* maximale Inhaltsbreite */
  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rot); }
a:hover { color: var(--rot-dunkel); }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 1.15rem; font-weight: 700; }
p  { margin: 0 0 1em; }

.container { width: min(100% - 2.5rem, var(--breite)); margin-inline: auto; }

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--hell { background: var(--hell); }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rot);
  margin-bottom: .8rem;
}

.lead { font-size: 1.15rem; color: var(--text-hell); max-width: 46rem; }

/* ---------- Kopfbereich & Navigation ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rand);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.header__logo img { height: 46px; width: auto; }

.nav ul { list-style: none; display: flex; gap: .3rem; margin: 0; padding: 0; }

.nav a {
  display: block;
  padding: .55rem .95rem;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
}

.nav a:hover { background: var(--hell); }
.nav a[aria-current="page"] { background: var(--rot); color: #fff; }

/* Menü-Schalter für Mobilgeräte (funktioniert ohne JavaScript) */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: .5rem; }
.nav-toggle-label span,
.nav-toggle-label span::before,
.nav-toggle-label span::after {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  position: relative;
}
.nav-toggle-label span::before,
.nav-toggle-label span::after { content: ""; position: absolute; }
.nav-toggle-label span::before { top: -8px; }
.nav-toggle-label span::after { top: 8px; }

@media (max-width: 760px) {
  .nav-toggle-label { display: block; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--rand);
    display: none;
  }
  .nav ul { flex-direction: column; padding: .8rem 1.25rem 1.2rem; }
  .nav-toggle:checked ~ .nav { display: block; }
}

/* ---------- Großes Titelbild ---------- */

.hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(10, 12, 15, .88) 0%, rgba(10, 12, 15, .6) 55%, rgba(10, 12, 15, .35) 100%),
    url("../images/_mg_8702kopieentzerrt2schnittbestes60-original_189285_by-juergen_laufer_piqs_de-u131-fr.png") center / cover no-repeat;
  padding: clamp(5rem, 14vw, 9rem) 0 clamp(4rem, 10vw, 7rem);
}

.hero--klein { padding: clamp(3.5rem, 9vw, 5.5rem) 0; }

.hero .eyebrow { color: #ff8a8e; }
.hero h1 { max-width: 15em; }
.hero p { font-size: 1.2rem; max-width: 38rem; color: rgba(255, 255, 255, .85); }

.buttons { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.btn {
  display: inline-block;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  background: var(--rot);
  color: #fff;
  border: 2px solid var(--rot);
}
.btn:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); color: #fff; }
.btn--hell { background: transparent; border-color: rgba(255, 255, 255, .7); }
.btn--hell:hover { background: #fff; color: var(--text); border-color: #fff; }

/* ---------- Karten ---------- */

.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__bild { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card__inhalt { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.card__inhalt p { color: var(--text-hell); }
.card__inhalt p:last-child { margin-bottom: 0; }
.card__link { margin-top: auto; font-weight: 700; text-decoration: none; }

.cards-oben { margin-top: -4rem; position: relative; }

/* Kleine Karte mit Symbol (CMS-Übersicht) */
.cms { display: flex; gap: 1rem; align-items: flex-start; padding: 1.3rem; }
.cms img { width: 48px; height: 48px; flex: none; }
.cms h3 { margin-bottom: .3rem; }
.cms p { margin: 0; color: var(--text-hell); font-size: .95rem; }

/* KI-Karten mit Nummer */
.ki { border-top: 4px solid var(--rot); }
.ki__nr { font-size: 2rem; font-weight: 800; color: var(--rot); line-height: 1; margin-bottom: .6rem; }

/* Referenzen */
.referenz { padding: 1.5rem; border-left: 4px solid var(--rot); }
.referenz h3 { margin-bottom: .4rem; }
.referenz p { margin: 0; color: var(--text-hell); }

/* ---------- Zahlen ---------- */

.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; text-align: center; }
.zahl strong { display: block; font-size: 2.8rem; font-weight: 800; color: var(--rot); line-height: 1.1; }
.zahl span { color: var(--text-hell); font-weight: 600; }

/* ---------- Text mit Bild ---------- */

.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: 0 20px 40px rgba(0, 0, 0, .12); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split--oben { align-items: start; grid-template-columns: .9fr 1.1fr; }

.cms-liste { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 560px) { .cms-liste { grid-template-columns: 1fr; } }

/* ---------- Hervorhebung (Sternenhimmel-Foto mit dunkler Ebene) ---------- */

.band {
  background:
    linear-gradient(rgba(10, 12, 15, .55), rgba(10, 12, 15, .75)),
    url("../images/pexels-photo-14676-large.jpg") center / cover no-repeat;
  color: #fff;
  text-align: center;
}
.band h2 { max-width: 40rem; margin-inline: auto; }
.band p { max-width: 38rem; margin-inline: auto; color: rgba(255, 255, 255, .9); }
.band .btn:hover { background: #fff; color: var(--rot); border-color: #fff; }

/* ---------- Rechtstexte ---------- */

.text { max-width: 48rem; }
.text h2 { font-size: 1.5rem; margin-top: 2.2rem; }
.text h3 { margin-top: 1.6rem; }
.text ul { padding-left: 1.2rem; }

/* ---------- Fußbereich ---------- */

.footer { background: var(--dunkel); color: rgba(255, 255, 255, .75); padding: 4rem 0 2rem; font-size: .95rem; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: #ff8a8e; }
.footer h3 { color: #fff; font-size: 1rem; margin-bottom: .5rem; }
.footer__unten {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: .85rem;
}
.footer__unten ul { list-style: none; display: flex; gap: 1.2rem; margin: 0; padding: 0; }

/* ---------- Sprachauswahl ---------- */

.nav .lang a {
  border: 2px solid var(--rand);
  font-size: .85rem;
  letter-spacing: .05em;
}
.nav .lang a:hover { border-color: var(--rot); background: transparent; color: var(--rot); }

/* Hinweis für Besucher mit nicht-deutscher Browsersprache */
.lang-hint {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(100% - 2rem, 560px);
  padding: .8rem 1rem .8rem 1.3rem;
  background: var(--dunkel);
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
  font-size: .95rem;
}
.lang-hint[hidden] { display: none; }
.lang-hint span { flex: 1; }
.lang-hint .btn { padding: .5rem 1rem; font-size: .9rem; }
.lang-hint__close {
  background: none;
  border: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 .3rem;
}
@media (max-width: 560px) { .lang-hint { border-radius: var(--radius); flex-wrap: wrap; } }
