/* kigebaut.ch — Anzeigen-Landingpage und Vollbild-Chat (/chat).
   Nur Tokens aus /styles.css (Papier, Tinte, ein rotes Signal). Diese Datei
   ergänzt, sie überschreibt nichts Globales: alles hängt an .lp-*, .cs-* oder
   .chat-*. Muster wie Anwaltsportal und Fokus-Berater-Chat: die Landingpage hat
   genau einen Knopf, der Chat ist eine eigene Seite über die volle Höhe. */

/* ---------- Landingpage: Kopf, bewusst ohne Navigation ---------- */
.lp-kopf { border-bottom: 1px solid var(--hairline); background: var(--paper); }
.lp-kopf-zeile { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.lp-kopf-hinweis { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grau); }

/* ---------- Held: Botschaft + Knopf links, Chat-Vorschau rechts ---------- */
.lp-held {
  padding: 64px 0 80px;
  border-bottom: 1px solid var(--hairline);
  background-image:
    linear-gradient(var(--raster) 1px, transparent 1px),
    linear-gradient(90deg, var(--raster) 1px, transparent 1px);
  background-size: 24px 24px;
}
.lp-held-raster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 64px; align-items: center; }
.lp-held h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.3rem, 4.6vw, 3.9rem); line-height: 1.02; letter-spacing: -0.03em;
  margin: 22px 0 24px; max-width: 15ch;
}
.lp-punkt { display: inline-block; width: 0.15em; height: 0.15em; background: var(--rot); margin-left: 0.07em; }
.lp-unterzeile { font-size: 1.15rem; color: var(--grau); max-width: 46ch; margin-bottom: 32px; }
.lp-unterzeile strong { color: var(--ink); }
.lp-aktion { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 28px; }
.lp-aktion-hinweis { font-size: 0.9rem; color: var(--grau); }
.lp-zusagen { list-style: none; display: grid; gap: 10px; }
.lp-zusagen li { display: flex; align-items: center; gap: 12px; font-size: 0.98rem; }
.lp-zusagen .baustein { width: 8px; height: 8px; }

/* Die Vorschau zeigt, was hinter dem Knopf kommt: ein kurzes Gespräch. Sie ist
   selbst ein Link in den Chat, aber kein Eingabefeld — getippt wird drüben. */
.lp-vorschau {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 2px solid var(--ink); border-radius: 2px;
  box-shadow: 8px 8px 0 var(--ink); padding: 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lp-vorschau:hover { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--ink); }
.lp-vorschau-kopf { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--grau); padding-bottom: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--hairline); }
.lp-vorschau-verlauf { display: flex; flex-direction: column; gap: 10px; }
.lp-vorschau .chat-blase { font-size: 0.94rem; animation: none; }
.lp-vorschau-optionen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.lp-vorschau-optionen span { font-size: 0.82rem; font-weight: 500; padding: 5px 11px; border: 1.5px solid var(--ink); border-radius: 999px; }
.lp-vorschau-fuss { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hairline); font-size: 0.9rem; color: var(--grau-hell); }
.lp-vorschau-fuss .pfeil { display: grid; place-items: center; width: 36px; height: 36px; background: var(--rot); color: #fff; font-family: var(--font-mono); }

/* ---------- Sektionen ---------- */
.lp-sektion { padding: 72px 0; border-bottom: 1px solid var(--hairline); }
.lp-sektion h2, .lp-schluss h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.1; letter-spacing: -0.02em;
  margin: 14px 0 28px; max-width: 24ch;
}
.lp-leise { color: var(--grau); max-width: 52ch; }
.lp-leise a { color: var(--ink); }

.lp-schritte { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.lp-schritte li { border-top: 2px solid var(--ink); padding-top: 18px; }
.lp-schritt-nr { font-family: var(--font-mono); font-size: 0.82rem; color: var(--rot); }
.lp-schritte h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin: 6px 0 8px; }
.lp-schritte p { color: var(--grau); }

.lp-kunde { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.lp-kunde-text p:not(.vorzeile) { color: var(--grau); margin-bottom: 18px; max-width: 46ch; }
.lp-kunde-bild { display: block; border: 1px solid var(--hairline); border-radius: 2px; overflow: hidden; background: #fff; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.lp-kunde-bild:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(19, 20, 23, 0.1); }
.lp-kunde-bild img { display: block; width: 100%; height: auto; }

.lp-preis { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: end; }
.lp-pakete { border-top: 2px solid var(--ink); }
.lp-pakete > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.lp-pakete dt { font-weight: 600; }
.lp-pakete dt span { font-weight: 400; color: var(--grau); margin-left: 6px; }
.lp-pakete dd { font-family: var(--font-mono); font-weight: 500; white-space: nowrap; }

.lp-fragen-raster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; }

.lp-schluss { padding: 72px 0 80px; }
.lp-schluss h2 { margin-top: 0; }

/* ---------- Vollbild-Chat (/chat) ---------- */
/* Die Einwilligungs-Leiste gehört auf die Landingpage. Hier läge sie über dem
   Eingabefeld. consent.js läuft trotzdem mit: Hat der Besucher dort zugestimmt,
   zählt die Conversion nach dem Absenden; sonst passiert nichts. */
.chatseite .kg-consent, .chatseite .kg-widerruf-zeile { display: none !important; }
body.chatseite, body.chatseite:has(.kg-consent) { padding-bottom: 0; background: var(--paper); overflow: hidden; }

.cs { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.cs-spalte { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 20px; }
.cs-kopf { flex: none; border-bottom: 1px solid var(--hairline); background: var(--paper); }
.cs-kopf-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.cs-kopf .wortmarke { font-size: 1.1rem; }
.cs-kopf-text { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.72rem; color: var(--grau); text-align: right; }
.chat-status-punkt { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #1F8A4C; }

.cs-verlauf { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.cs-verlauf .chat-verlauf { padding-top: 24px; padding-bottom: 24px; }
.cs-unten { flex: none; border-top: 1px solid var(--hairline); background: #fff; padding-bottom: env(safe-area-inset-bottom, 0px); }
.cs-unten .chat-optionen { padding: 12px 0 0; }
.cs-unten .chat-eingabe { padding: 10px 0; }
.cs-unten .chat-fuss { padding: 0 0 10px; }
.cs.formular-offen .chat-eingabe, .cs.formular-offen .chat-optionen { display: none; }
.cs.formular-offen .chat-fuss { padding-top: 10px; }

/* ---------- Chat-Bausteine ---------- */
.chat-verlauf { display: flex; flex-direction: column; gap: 12px; }
.chat-ohne-js { color: var(--grau); }

.chat-blase { max-width: 85%; padding: 11px 14px; font-size: 1.02rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-blase.ki { align-self: flex-start; background: var(--flaeche); border-radius: 2px 12px 12px 12px; }
.chat-blase.du { align-self: flex-end; background: var(--ink); color: var(--paper); border-radius: 12px 2px 12px 12px; }
@media (prefers-reduced-motion: no-preference) {
  .chat-verlauf .chat-blase { animation: blase-rein 0.22s ease-out; }
}
@keyframes blase-rein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Ein Zug der KI: Kennzeichen links, Blasen untereinander (Reaktion, dann
   allein die Frage). Fett nur für das eine Stichwort, das man überfliegt. */
.ki-zug { align-self: stretch; display: flex; align-items: flex-start; gap: 10px; }
.ki-marke { flex: none; width: 28px; height: 28px; display: grid; place-items: center; background: var(--ink); border-radius: 2px; }
.ki-marke .baustein { width: 9px; height: 9px; }
.ki-blasen { min-width: 0; max-width: 85%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.ki-blasen .chat-blase { max-width: 100%; }
.ki-blasen .chat-status { padding: 6px 0; }
.chat-blase strong { font-weight: 600; }

.chat-tippt { align-self: flex-start; display: inline-flex; gap: 5px; padding: 14px 16px; background: var(--flaeche); border-radius: 2px 12px 12px 12px; }
.chat-tippt span { width: 6px; height: 6px; border-radius: 50%; background: var(--grau-hell); }
@media (prefers-reduced-motion: no-preference) {
  .chat-tippt span { animation: tippen 1s infinite ease-in-out; }
  .chat-tippt span:nth-child(2) { animation-delay: 0.15s; }
  .chat-tippt span:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes tippen { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

.chat-hinweis { align-self: stretch; font-size: 0.9rem; color: var(--grau); border-left: 2px solid var(--rot); padding: 4px 0 4px 12px; }
.chat-hinweis a { color: var(--ink); font-weight: 600; }

/* Tipp-Antworten: sekundär, Rahmen statt Fläche — das Rot bleibt dem Absenden. */
.chat-optionen { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-optionen[hidden] { display: none; }
.chat-option {
  font: inherit; font-size: 0.92rem; font-weight: 500; cursor: pointer;
  min-height: 40px; padding: 8px 14px; border-radius: 999px;
  background: #fff; color: var(--ink); border: 1.5px solid var(--ink);
  transition: background 0.15s ease, color 0.15s ease;
}
.chat-option:hover { background: var(--ink); color: var(--paper); }

.chat-eingabe { display: flex; align-items: flex-end; gap: 10px; }
.chat-eingabe textarea {
  flex: 1; resize: none; outline: none;
  font: inherit; font-size: 1rem; line-height: 1.5; color: var(--ink);
  max-height: 140px; padding: 10px 12px;
  background: var(--paper); border: 1.5px solid var(--hairline); border-radius: 2px;
}
.chat-eingabe textarea:focus { border-color: var(--ink); }
.chat-eingabe textarea::placeholder { color: var(--grau-hell); }
.chat-senden {
  flex: none; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--rot); color: #fff; border: none; border-radius: 2px; cursor: pointer;
  transition: background 0.15s ease;
}
.chat-senden svg { width: 20px; height: 20px; }
.chat-senden:hover { background: var(--rot-dunkel); }
.chat-senden:disabled { background: var(--hairline); color: var(--grau-hell); cursor: default; }
.chat-fuss { font-size: 0.82rem; color: var(--grau-hell); }
.chat-fuss a { color: var(--grau); }

/* ---------- Zusammenfassung + Kontakt im Chat ---------- */
.chat-karte { align-self: stretch; border: 1.5px solid var(--ink); border-radius: 2px; background: #fff; padding: 18px; }
.chat-karte h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; }
.chat-karte dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 0.94rem; margin-bottom: 14px; }
.chat-karte dt { color: var(--grau); }
.chat-karte dd { overflow-wrap: anywhere; }
.chat-karte-aktionen { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.chat-karte .knopf { padding: 12px 20px; }
.chat-link-knopf { font: inherit; font-weight: 600; background: none; border: none; padding: 10px 2px; cursor: pointer; color: var(--ink); border-bottom: 2px solid var(--ink); }
.chat-link-knopf:hover { color: var(--rot); border-color: var(--rot); }

.chat-kontakt { display: grid; gap: 12px; margin-top: 4px; }
.chat-kontakt .chat-link-knopf { justify-self: start; font-size: 0.9rem; }
.chat-kontakt label { display: grid; gap: 4px; font-size: 0.9rem; font-weight: 600; }
.chat-kontakt label span.leise { font-weight: 400; color: var(--grau); }
.chat-kontakt input[type="text"], .chat-kontakt input[type="email"], .chat-kontakt input[type="tel"] {
  font: inherit; font-size: 1rem; padding: 11px 12px; border: 1.5px solid var(--hairline); border-radius: 2px; background: #fff; color: var(--ink);
}
.chat-kontakt input:focus { outline: none; border-color: var(--ink); }
.chat-kontakt input[aria-invalid="true"] { border-color: var(--rot); }
.chat-kontakt .feld-fehler { font-size: 0.84rem; font-weight: 500; color: var(--rot-dunkel); }
.chat-kontakt .einwilligung { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.86rem; color: var(--grau); line-height: 1.45; }
.chat-kontakt .einwilligung input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--rot); flex: none; }
.chat-kontakt .einwilligung a { color: var(--ink); }
.chat-kontakt .honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.chat-kontakt .knopf { width: 100%; }
.chat-kontakt .knopf[disabled] { opacity: 0.7; cursor: progress; }
.chat-kontakt-status { font-size: 0.9rem; color: var(--rot-dunkel); }

.chat-erfolg h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 8px; }
.chat-erfolg p { color: var(--grau); margin-bottom: 8px; }
.chat-erfolg p strong { color: var(--ink); }

/* ---------- Handy ---------- */
@media (max-width: 900px) {
  .lp-held { padding: 24px 0 48px; }
  .lp-held-raster { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .lp-held h1 { margin: 14px 0 16px; max-width: 18ch; font-size: clamp(2rem, 8.6vw, 2.8rem); }
  .lp-unterzeile { font-size: 1.04rem; margin-bottom: 24px; }
  .lp-aktion .knopf { width: 100%; }
  .lp-vorschau { box-shadow: 5px 5px 0 var(--ink); }
  .lp-schritte, .lp-kunde, .lp-preis, .lp-fragen-raster { grid-template-columns: 1fr; gap: 28px; }
  .lp-sektion { padding: 52px 0; }
}
@media (max-width: 640px) {
  .lp-kopf-hinweis { display: none; }
  .lp-zusagen { display: none; }
  .cs-spalte { padding: 0 14px; }
  .cs-kopf-text .lang { display: none; }
  .chat-blase { max-width: 90%; }
  .ki-zug { gap: 8px; }
  .ki-marke { width: 24px; height: 24px; }
  .ki-blasen { max-width: calc(100% - 32px); }
}
