/* IASM – Institut Automotive Service & Management
   CI „Graphit & Grün" (ci/CI_IASM_Graphit-Gruen_2026-10-10.md)
   Mobil zuerst. Schriften lokal (SIL OFL, Lizenzen in /assets/fonts/). */

/* ---------- Schriften ---------- */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/sora-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
}

/* ---------- Farben und Maße ---------- */
:root {
  --graphit: #23292e;
  --gruen: #3fa06a;
  --grund: #f7f7f5;
  --text: #1d2125;
  --hell: #e8e9e7;
  --weiss: #ffffff;
  --text-leise: #4a5157;     /* 7,9 : 1 auf --grund */
  --linie: #d3d5d2;
  --radius: 6px;
  --breite: 1100px;
  --spalte: 640px;
  --schrift-text: "Inter", "Segoe UI", Arial, sans-serif;
  --schrift-titel: "Sora", "Segoe UI", Arial, sans-serif;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--schrift-titel);
  font-weight: 700;
  color: var(--graphit);
  line-height: 1.2;
  margin: 0 0 16px;
  hyphens: auto;
}
h1 { font-size: clamp(2rem, 7vw, 3.2rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p, ul, ol, dl { margin: 0 0 16px; }
ul, ol { padding-left: 1.25em; }
li { margin-bottom: 6px; }

a {
  color: var(--graphit);
  text-decoration-color: var(--gruen);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 3px; }

:focus-visible {
  outline: 3px solid var(--gruen);
  outline-offset: 3px;
  border-radius: 2px;
}

strong { font-weight: 600; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--graphit); color: var(--grund);
  padding: 8px 16px; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 8px; }

.innen {
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Kopfzeile ---------- */
.kopf {
  background: var(--grund);
  border-bottom: 1px solid var(--linie);
}
.kopf .innen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Wortmarke: IASM mit grüner Linie, darunter Langname in Versalien */
.marke {
  display: inline-flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--graphit);
  line-height: 1;
}
.marke-kurz {
  font-family: var(--schrift-titel);
  font-weight: 700;
  font-size: 1.75rem;
  letter-spacing: 0.02em;
  padding-bottom: 4px;
  border-bottom: 3px solid var(--gruen);
  align-self: flex-start;
}
.marke-lang {
  margin-top: 6px;
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.35;
}

.menue-knopf {
  font: 600 0.95rem var(--schrift-text);
  color: var(--graphit);
  background: transparent;
  border: 1px solid var(--graphit);
  border-radius: var(--radius);
  padding: 8px 14px;
  min-height: 44px;
  cursor: pointer;
}

.nav { width: 100%; display: none; }
.nav.offen { display: block; }
.nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 0 4px;
  display: flex;
  flex-direction: column;
}
.nav li { margin: 0; border-top: 1px solid var(--linie); }
.nav a {
  display: block;
  padding: 12px 4px;
  text-decoration: none;
  font-weight: 600;
  color: var(--graphit);
}
.nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--gruen); padding-left: 14px; }

@media (min-width: 960px) {
  .menue-knopf { display: none; }
  .nav, .nav.offen { display: block; width: auto; }
  .nav ul { flex-direction: row; gap: 4px 20px; padding: 0; flex-wrap: wrap; }
  .nav li { border: 0; }
  .nav a { padding: 6px 0; font-size: 0.95rem; }
  .nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gruen); padding-left: 0; }
  .nav a:hover { box-shadow: inset 0 -3px 0 var(--hell); }
  .nav a[aria-current="page"]:hover { box-shadow: inset 0 -3px 0 var(--gruen); }
}

/* ---------- Abschnitte ---------- */
.abschnitt { padding: 48px 0; }
.abschnitt + .abschnitt { border-top: 1px solid var(--linie); }
.abschnitt.hell { background: var(--hell); border-top: 0; }
.abschnitt.dunkel {
  background: var(--graphit);
  color: var(--grund);
  border-top: 0;
}
.abschnitt.dunkel h2, .abschnitt.dunkel h3 { color: var(--grund); }
.abschnitt.dunkel a { color: var(--grund); }
.abschnitt.dunkel .etikett { color: var(--gruen); }   /* 4,51 : 1 auf Graphit */

@media (min-width: 768px) {
  .abschnitt { padding: 80px 0; }
}

.etikett {
  display: block;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphit);
  margin-bottom: 12px;
}
.etikett::before {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: var(--gruen);
  margin-bottom: 12px;
}

.text { max-width: var(--spalte); }
.einleitung { font-size: 1.1rem; color: var(--text); }
.leise { color: var(--text-leise); }
.klein { font-size: 0.9rem; }

/* ---------- Kopfbereich (Hero) ---------- */
.held { padding: 48px 0 40px; }
.held h1 { max-width: 18ch; }
.held .leitsatz {
  font-size: 1.15rem;
  max-width: 36ch;
  margin-bottom: 24px;
}
@media (min-width: 768px) {
  .held { padding: 88px 0 72px; }
  .held .leitsatz { font-size: 1.3rem; }
}

.held-marke {
  display: inline-flex;
  flex-direction: column;
  color: var(--graphit);
  margin-bottom: 32px;
}
.held-marke .marke-kurz { font-size: clamp(3rem, 14vw, 5.5rem); border-bottom-width: 5px; padding-bottom: 6px; }
.held-marke .marke-lang { font-size: clamp(0.7rem, 2.6vw, 0.95rem); margin-top: 10px; }

/* ---------- Knöpfe ---------- */
.knoepfe { display: flex; flex-wrap: wrap; gap: 12px; }
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font: 600 1rem var(--schrift-text);
  text-decoration: none;
  background: var(--graphit);
  color: var(--grund);
  border: 2px solid var(--graphit);
  cursor: pointer;
}
.knopf:hover { background: #343c43; border-color: #343c43; }
.knopf.zweit { background: transparent; color: var(--graphit); }
.knopf.zweit:hover { background: var(--hell); }
.abschnitt.dunkel .knopf { background: var(--grund); color: var(--graphit); border-color: var(--grund); }
.abschnitt.dunkel .knopf.zweit { background: transparent; color: var(--grund); }
.abschnitt.dunkel .knopf.zweit:hover { background: #343c43; }

/* ---------- Raster und Karten ---------- */
.raster { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .raster.zwei, .raster.drei, .raster.vier { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) {
  .raster.drei { grid-template-columns: repeat(3, 1fr); }
  .raster.vier { grid-template-columns: repeat(4, 1fr); }
  .raster { gap: 24px; }
}

.karte {
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 24px;
}
.karte h3 { margin-bottom: 8px; }
.karte p:last-child, .karte ul:last-child { margin-bottom: 0; }
.abschnitt.hell .karte { border-color: #cfd1ce; }

.sparte {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  position: relative;
}
.nr {
  display: block;
  font-family: var(--schrift-titel);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--graphit);
  margin-bottom: 12px;
}
.nr::after {
  content: "";
  display: block;
  width: 24px;
  height: 3px;
  background: var(--gruen);
  margin-top: 8px;
}
.sparte h3 { font-size: 1.1rem; }
.sparte .mehr {
  margin-top: auto;
  padding-top: 12px;
  font-weight: 600;
  color: var(--graphit);
  text-decoration: underline;
  text-decoration-color: var(--gruen);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.sparte:hover { border-color: var(--graphit); }

.abstand-oben { margin-top: 20px; }
.karten-titel { font-size: 1.15rem; }
.abschnitt.dunkel .karte { color: var(--text); }
.abschnitt.dunkel .karte h3, .abschnitt.dunkel .karte a { color: var(--graphit); }

/* Liste mit grünen Punkten */
.punkte { list-style: none; padding: 0; }
.punkte li { position: relative; padding-left: 20px; }
.punkte li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gruen);
}

/* Hinweis-Kasten */
.hinweis {
  border-left: 4px solid var(--gruen);
  background: var(--weiss);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  max-width: var(--spalte);
}
.hinweis p:last-child { margin-bottom: 0; }
.abschnitt.dunkel .hinweis { background: #2e353b; }

/* Zitat-Block (freigegebener Wortlaut) */
.wortlaut {
  margin: 0 0 16px;
  padding: 0 0 0 20px;
  border-left: 3px solid var(--gruen);
  max-width: var(--spalte);
}

/* Zwei Spalten: Text + Seite */
.zweispaltig { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .zweispaltig { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; align-items: start; }
}

/* Profil mit vorbereitetem Fotoplatz: leer = unsichtbar */
.profil { display: grid; gap: 24px; align-items: start; }
.profil-foto:empty { display: none; }
.profil-foto img { border-radius: var(--radius); width: 100%; max-width: 280px; }
@media (min-width: 768px) {
  .profil:has(.profil-foto:not(:empty)) { grid-template-columns: 240px minmax(0, 1fr); }
}

/* Fakten-Zeile */
.fakten {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fakten li {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--weiss);
}
.abschnitt.dunkel .fakten li { background: transparent; border-color: #4a5359; }

/* Werdegang */
.werdegang { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.werdegang li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--linie);
  margin: 0;
}
.werdegang .zeit { font-weight: 600; color: var(--graphit); }
@media (min-width: 640px) { .werdegang li { grid-template-columns: 130px minmax(0, 1fr); } }

/* Kennzahlen (früher erreicht) */
.kennzahlen dt { font-weight: 600; margin-top: 12px; }
.kennzahlen dd { margin: 0; }

/* Kundenstimmen */
.stimme { margin: 0; display: flex; flex-direction: column; }
.stimme blockquote { margin: 0 0 12px; font-size: 1.05rem; }
.stimme figcaption { margin-top: auto; font-weight: 600; color: var(--text-leise); }
.sterne { color: var(--graphit); letter-spacing: 0.15em; margin-bottom: 8px; font-size: 1.05rem; }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-top: 1px solid var(--linie); }
.faq details:last-child { border-bottom: 1px solid var(--linie); }
.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 32px 16px 0;
  list-style: none;
  position: relative;
  color: var(--graphit);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-family: var(--schrift-titel);
  font-size: 1.3rem;
  color: var(--graphit);
}
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 0 16px; }

/* Schritte */
.schritte { counter-reset: schritt; list-style: none; padding: 0; }
.schritte li { counter-increment: schritt; position: relative; padding-left: 56px; margin-bottom: 24px; }
.schritte li::before {
  content: "0" counter(schritt);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--schrift-titel);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--graphit);
  border-bottom: 3px solid var(--gruen);
  line-height: 1.3;
}
.schritte h3 { margin-bottom: 4px; }

/* Orte */
.orte { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.orte li { margin: 0; padding: 4px 12px; border-radius: var(--radius); background: var(--weiss); border: 1px solid var(--linie); font-size: 0.9rem; }

/* ---------- Formular ---------- */
.formular { max-width: 720px; }
.formular fieldset { border: 0; padding: 0; margin: 0 0 24px; }
.formular legend { font-family: var(--schrift-titel); font-weight: 700; font-size: 1.05rem; color: var(--graphit); margin-bottom: 12px; padding: 0; }
.feldreihe { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .feldreihe { grid-template-columns: 1fr 1fr; } }
.feld { margin-bottom: 16px; display: flex; flex-direction: column; }
.feld label { font-weight: 600; margin-bottom: 6px; }
.feld .pflicht { color: var(--text-leise); font-weight: 400; }
.feld input, .feld select, .feld textarea {
  font: 1rem var(--schrift-text);
  color: var(--text);
  background: var(--weiss);
  border: 1px solid #8a9095;      /* 3,3 : 1 – Rahmen von Bedienelementen */
  border-radius: var(--radius);
  padding: 12px;
  min-height: 48px;
  width: 100%;
}
.feld textarea { min-height: 160px; resize: vertical; }
.feld input:focus-visible, .feld select:focus-visible, .feld textarea:focus-visible { outline-offset: 1px; }
.einwilligung { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 20px; }
.einwilligung input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--graphit); }
.honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Kontaktblock */
.kontaktliste { list-style: none; padding: 0; margin: 0; }
.kontaktliste li { margin-bottom: 10px; }
.kontaktliste .art { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-leise); }
.abschnitt.dunkel .kontaktliste .art { color: #c9cdd0; }

/* Rechtstexte */
.rechtstext { max-width: 760px; }
.rechtstext h2 { font-size: 1.35rem; margin-top: 40px; }
.rechtstext h3 { margin-top: 24px; }
.rechtstext address { font-style: normal; margin-bottom: 16px; }

/* ---------- Fußzeile ---------- */
.fuss {
  background: var(--graphit);
  color: var(--grund);
  padding: 48px 0 32px;
  font-size: 0.95rem;
}
.fuss a { color: var(--grund); }
.fuss .marke { color: var(--grund); }
.fuss-raster { display: grid; gap: 32px; }
@media (min-width: 768px) { .fuss-raster { grid-template-columns: 1.3fr 1fr 1fr; } }
.fuss h2 {
  color: var(--grund);
  font-family: var(--schrift-text);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.fuss ul { list-style: none; padding: 0; margin: 0; }
.fuss li { margin-bottom: 6px; }
.fuss address { font-style: normal; }
.fuss-unten {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid #4a5359;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #c9cdd0;
}
.fuss-unten a { color: #c9cdd0; }

/* ---------- Druck ---------- */
@media print {
  .kopf .nav, .menue-knopf, .skip-link, .fuss-raster nav, .formular { display: none !important; }
  body { background: #fff; }
  .abschnitt.dunkel, .fuss { background: #fff; color: #000; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- KI-Chat (assets/js/chat.js) ---------- */
.chat-knopf {
  position: fixed; right: 16px; bottom: 16px; z-index: 900;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--graphit); color: var(--grund);
  border: 2px solid var(--grund);
  box-shadow: 0 4px 16px rgba(35, 41, 46, 0.3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.chat-knopf:hover { background: #343c43; }
.chat-punkt {
  position: absolute; top: 2px; right: 2px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--gruen); border: 2px solid var(--grund);
}
.chat-punkt[hidden] { display: none; }

.chat-fenster {
  position: fixed; right: 16px; bottom: 84px; z-index: 901;
  width: 380px; max-width: calc(100vw - 32px);
  height: 540px; max-height: calc(100vh - 110px);
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(35, 41, 46, 0.2);
  display: flex; flex-direction: column; overflow: hidden;
  font-family: var(--schrift-text); font-size: 0.9rem; line-height: 1.5;
}
.chat-fenster[hidden] { display: none; }

.chat-kopf {
  background: var(--graphit); color: var(--grund);
  padding: 12px 14px; display: flex; align-items: center; gap: 10px; flex-shrink: 0;
  border-bottom: 3px solid var(--gruen);
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--grund); color: var(--graphit);
  font-family: var(--schrift-titel); font-weight: 700; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}
.chat-kopf-text { flex: 1; min-width: 0; }
.chat-name { margin: 0; font-weight: 600; font-size: 0.9rem; }
.chat-unter { margin: 0; font-size: 0.75rem; color: #c9cdd0; }
.chat-schliessen {
  background: none; border: 0; color: var(--grund); cursor: pointer;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius);
}
.chat-schliessen:hover { background: #343c43; }

.chat-verlauf {
  flex: 1; overflow-y: auto; padding: 14px; background: var(--grund);
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { max-width: 88%; padding: 9px 12px; border-radius: var(--radius); white-space: pre-line; overflow-wrap: anywhere; }
.chat-msg.bot { background: var(--weiss); color: var(--text); border: 1px solid var(--linie); align-self: flex-start; border-bottom-left-radius: 2px; }
.chat-msg.user { background: var(--graphit); color: var(--grund); align-self: flex-end; border-bottom-right-radius: 2px; }
.chat-msg.tippt { background: var(--weiss); border: 1px solid var(--linie); color: var(--text-leise); font-style: italic; align-self: flex-start; }
.chat-msg.chat-fehler { border-left: 3px solid var(--gruen); }
.chat-box {
  background: var(--hell); border: 1px solid var(--linie); border-left: 3px solid var(--gruen);
  border-radius: var(--radius); padding: 10px 12px; font-size: 0.85rem; display: flex; flex-direction: column; gap: 2px;
}
.chat-box strong { color: var(--graphit); }

.chat-schnell { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 4px; background: var(--grund); flex-shrink: 0; }
.chat-schnell:empty { display: none; }
.chat-chip {
  font: 600 0.8rem var(--schrift-text); color: var(--graphit);
  background: var(--weiss); border: 1px solid var(--graphit); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; min-height: 32px;
}
.chat-chip:hover { background: var(--hell); }

.chat-hinweis { margin: 0; padding: 6px 14px; font-size: 0.72rem; color: var(--text-leise); background: var(--grund); border-top: 1px solid var(--linie); flex-shrink: 0; }

.chat-eingabe { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--linie); background: var(--weiss); flex-shrink: 0; margin: 0; }
.chat-eingabe input {
  flex: 1; min-width: 0; font: 1rem var(--schrift-text); color: var(--text);
  border: 1px solid #8a9095; border-radius: 999px; padding: 8px 14px; background: var(--grund); min-height: 40px;
}
.chat-senden {
  width: 40px; height: 40px; border-radius: 50%; border: 0; flex-shrink: 0; cursor: pointer;
  background: var(--graphit); color: var(--grund); display: flex; align-items: center; justify-content: center;
}
.chat-senden:hover { background: #343c43; }

@media (max-width: 480px) {
  .chat-fenster { right: 8px; left: 8px; width: auto; max-width: none; bottom: 80px; height: calc(100vh - 100px); height: calc(100dvh - 100px); }
}
@media print { .chat-knopf, .chat-fenster { display: none !important; } }

/* Platz unten, damit der Chat-Knopf keinen Inhalt der Fußzeile verdeckt */
.fuss { padding-bottom: 96px; }
