/* ==========================================================================
   LipoDoc Website – Stylesheet
   Designsprache identisch zur Android-App (Farbverläufe, weiche Karten).
   ========================================================================== */

/* --- Farb-Token: Hell ---------------------------------------------------- */
:root {
  --brand-deep: #1B5FA8;
  --brand: #2F80D3;
  --teal: #3FB5B0;
  --mint: #63D4C1;
  --violet: #7B61FF;
  --coral: #FF7A59;
  --amber: #FFB84D;

  --ok: #2ECC71;
  --warn: #F4B942;
  --bad: #FF5C5C;

  --bg: #EEF3F9;
  --surface: #FFFFFF;
  --surface-2: #EDF2F8;
  --ink: #14202E;
  --ink-2: #4B5866;
  --ink-3: #6B7888;
  --line: #E1E8F0;

  /* Diagrammfarben, validiert gegen weiße Fläche */
  --c1: #2F80D3;
  --c2: #FF7A59;
  --c3: #3FB5B0;
  --c4: #7B61FF;
  --chart-grid: #E1E8F0;
  --chart-ink: #4B5866;

  --grad-brand: linear-gradient(135deg, #1B5FA8 0%, #2F80D3 55%, #3FB5B0 100%);
  --grad-teal: linear-gradient(135deg, #3FB5B0, #63D4C1);
  --grad-violet: linear-gradient(135deg, #5B4BFF, #7B61FF);
  --grad-coral: linear-gradient(135deg, #FF7A59, #FF9F7A);
  --grad-amber: linear-gradient(135deg, #F59E0B, #FFB84D);

  --shadow-sm: 0 2px 8px rgba(20, 32, 46, .06);
  --shadow: 0 8px 24px rgba(20, 32, 46, .09);
  --shadow-lg: 0 18px 44px rgba(27, 95, 168, .22);

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --r-xl: 30px;

  --maxw: 1140px;
  --nav-h: 68px;
}

/* --- Farb-Token: Dunkel -------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1220;
    --surface: #141C2B;
    --surface-2: #1D2637;
    --ink: #E6EBF2;
    --ink-2: #B7C2D0;
    --ink-3: #93A1B2;
    --line: #283345;

    --c1: #3C8CE0;
    --c2: #DC5A3A;
    --c3: #00A39D;
    --c4: #8269FF;
    --chart-grid: #283345;
    --chart-ink: #B7C2D0;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35);
    --shadow: 0 8px 24px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, .55);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--brand); }
@media (prefers-color-scheme: dark) { a { color: #7FB8F0; } }

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.35rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

section { padding: 84px 0; }
section:nth-of-type(even) { background: color-mix(in srgb, var(--surface) 55%, transparent); }
@media (prefers-color-scheme: dark) {
  section:nth-of-type(even) { background: color-mix(in srgb, var(--surface) 40%, transparent); }
}

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  padding: 5px 12px;
  border-radius: 99px;
  margin-bottom: 14px;
}

/* --- Navigation ---------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 100%; }
.nav__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.12rem; text-decoration: none; color: var(--ink); }
.nav__brand img { width: 34px; height: 34px; border-radius: 50%; }
.nav__links { display: flex; gap: 22px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav__links a { color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav__links a:hover, .nav__links a:focus-visible { color: var(--brand); }
.nav__toggle { display: none; margin-left: auto; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink); }
.nav__toggle svg { width: 26px; height: 26px; }

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { display: block; padding: 15px 22px; border-top: 1px solid var(--line); }
  .nav__links li:first-child a { border-top: 0; }
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px;
  border-radius: 15px;
  font-weight: 600; font-size: 1rem;
  text-decoration: none;
  border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: var(--shadow-lg); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn--on-grad { background: #fff; color: var(--brand-deep); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.btn--outline-light { background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn svg { width: 19px; height: 19px; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding: 72px 0 96px;
  background: var(--grad-brand);
  color: #fff;
  border-radius: 0 0 38px 38px;
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,.09);
}
.hero::before { width: 520px; height: 520px; top: -230px; right: -140px; }
.hero::after { width: 320px; height: 320px; bottom: -170px; left: -110px; }
.hero .wrap { position: relative; z-index: 1; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 52px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: .35em; }
.hero p { color: rgba(255,255,255,.92); font-size: 1.15rem; max-width: 54ch; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.18); color: #fff;
  padding: 7px 15px; border-radius: 99px;
  font-size: .86rem; font-weight: 600; margin-bottom: 20px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }
.hero__note { margin-top: 18px; font-size: .86rem; color: rgba(255,255,255,.78); }
.hero__art { display: flex; justify-content: center; align-items: flex-end; }
.hero__stage { position: relative; width: min(274px, 60vw); }
.hero__phone {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 32px 62px rgba(0, 0, 0, .48));
}

/* --- Schwebende Hinweiskarten um das Gerät ------------------------------- */
/* Immer helle Karten: Sie liegen in beiden Farbschemata auf dem blauen Verlauf. */
.fcard {
  position: absolute;
  display: flex; align-items: center; gap: 11px;
  width: 240px;
  padding: 11px 14px;
  background: #FFFFFF;
  border-radius: 15px;
  box-shadow: 0 16px 38px rgba(8, 24, 45, .32);
  animation: fcardFloat 6s ease-in-out infinite;
}
.fcard__ic {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: grid; place-items: center; color: #fff;
}
.fcard__ic svg { width: 18px; height: 18px; }
.fcard__ic--teal { background: var(--grad-teal); }
.fcard__ic--blue { background: var(--grad-brand); }
.fcard__ic--violet { background: var(--grad-violet); }
.fcard__ic--coral { background: var(--grad-coral); }
.fcard__tx {
  display: block; min-width: 0;
  font-size: .75rem; line-height: 1.35; color: #5B6A7B;
}
.fcard__tx strong {
  display: block; font-size: .85rem; line-height: 1.3;
  color: #14202E; margin-bottom: 1px; white-space: nowrap;
}

.fcard--1 { top: 10%; left: -170px;  animation-delay: 0s; }
.fcard--2 { top: 30%; right: -165px; animation-delay: 1.5s; }
.fcard--3 { top: 58%; left: -176px;  animation-delay: .8s; }
.fcard--4 { top: 78%; right: -158px; animation-delay: 2.3s; }

@keyframes fcardFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) { .fcard { animation: none; } }

/* Enger werdendes Fenster: Karten ruecken naeher an das Geraet heran. */
@media (max-width: 1340px) {
  .fcard { width: 210px; padding: 10px 12px; }
  .fcard__ic { width: 31px; height: 31px; border-radius: 10px; }
  .fcard--1 { left: -120px; }
  .fcard--2 { right: -118px; }
  .fcard--3 { left: -124px; }
  .fcard--4 { right: -112px; }
}
/* Darunter fehlt der Platz, ohne dass Karten abgeschnitten wuerden. */
@media (max-width: 1240px) { .fcard { display: none; } }

@media (max-width: 900px) {
  .hero { padding-bottom: 0; }
  .hero__grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
  .hero p, .hero .lead { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  /* Das Gerät steht unter dem Text und läuft am unteren Rand aus dem Bild. */
  .hero__stage { width: min(230px, 58vw); }
  .hero__phone { margin-bottom: -70px; }
}

/* --- Karten -------------------------------------------------------------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.icon-badge {
  width: 50px; height: 50px; border-radius: 15px;
  display: grid; place-items: center; margin-bottom: 15px;
  background: var(--grad-brand); color: #fff;
}
.icon-badge svg { width: 25px; height: 25px; }
.icon-badge--teal { background: var(--grad-teal); }
.icon-badge--violet { background: var(--grad-violet); }
.icon-badge--coral { background: var(--grad-coral); }
.icon-badge--amber { background: var(--grad-amber); }

.feature h3 { margin-bottom: .35em; }
.feature p { color: var(--ink-2); font-size: .97rem; margin: 0; }

/* --- Kennzahlen ---------------------------------------------------------- */
.stat {
  background: var(--surface);
  border-radius: var(--r);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.stat__bar { width: 34px; height: 4px; border-radius: 2px; margin: 0 auto 13px; background: var(--grad-brand); }
.stat__value { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; line-height: 1.1; color: var(--brand); letter-spacing: -.03em; }
.stat__label { font-size: .92rem; color: var(--ink-2); margin-top: 6px; }
.stat__sub { font-size: .8rem; color: var(--ink-3); margin-top: 4px; }
.stat--teal .stat__value { color: var(--teal); } .stat--teal .stat__bar { background: var(--grad-teal); }
.stat--violet .stat__value { color: var(--violet); } .stat--violet .stat__bar { background: var(--grad-violet); }
.stat--coral .stat__value { color: var(--coral); } .stat--coral .stat__bar { background: var(--grad-coral); }

/* --- Diagramme ----------------------------------------------------------- */
.chart-card { background: var(--surface); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.chart-card h3 { margin-bottom: 4px; }
.chart-card__sub { font-size: .9rem; color: var(--ink-2); margin-bottom: 20px; }
.chart-holder { width: 100%; overflow-x: auto; }
.chart-holder svg { display: block; width: 100%; height: auto; }
.chart-source { font-size: .78rem; color: var(--ink-3); margin-top: 14px; }
.chart-source a { color: inherit; }

.table-toggle {
  margin-top: 12px; background: none; border: 0; padding: 4px 0;
  color: var(--brand); font: inherit; font-size: .86rem; font-weight: 600;
  cursor: pointer; text-decoration: underline;
}
.data-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .9rem; }
.data-table caption { text-align: left; font-size: .82rem; color: var(--ink-3); padding-bottom: 8px; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.data-table th { font-weight: 600; color: var(--ink-2); }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* --- Ampel / Kriterien --------------------------------------------------- */
.criteria { display: grid; gap: 14px; }
.criterion {
  display: grid; grid-template-columns: 14px 1fr; gap: 16px; align-items: start;
  background: var(--surface); border-radius: var(--r);
  padding: 20px 22px; box-shadow: var(--shadow-sm);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.criterion__flag { width: 6px; height: 100%; min-height: 42px; border-radius: 3px; }
.criterion--ok .criterion__flag { background: var(--ok); }
.criterion--warn .criterion__flag { background: var(--warn); }
.criterion--bad .criterion__flag { background: var(--bad); }
.criterion h3 { font-size: 1.05rem; margin-bottom: .2em; }
.criterion p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.criterion__tag { display: inline-block; font-size: .76rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; margin-left: 8px; vertical-align: 2px; }
.criterion--ok .criterion__tag { background: color-mix(in srgb, var(--ok) 16%, transparent); color: #1E8449; }
.criterion--warn .criterion__tag { background: color-mix(in srgb, var(--warn) 20%, transparent); color: #9A6B00; }
.criterion--bad .criterion__tag { background: color-mix(in srgb, var(--bad) 16%, transparent); color: #C0392B; }
@media (prefers-color-scheme: dark) {
  .criterion--ok .criterion__tag { color: #7BE3A8; }
  .criterion--warn .criterion__tag { color: #FFD27A; }
  .criterion--bad .criterion__tag { color: #FF9E9E; }
}

/* --- Zeitstrahl ---------------------------------------------------------- */
.timeline { position: relative; display: grid; gap: 4px; padding-left: 36px; }
.timeline::before {
  content: ""; position: absolute; left: 11px; top: 14px; bottom: 14px;
  width: 3px; border-radius: 2px; background: var(--grad-brand);
}
.tl-step { position: relative; padding: 16px 0 22px; }
.tl-step::before {
  content: ""; position: absolute; left: -31px; top: 22px;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--surface); border: 3.5px solid var(--brand);
}
.tl-step h3 { margin-bottom: .25em; font-size: 1.08rem; }
.tl-step p { margin: 0; color: var(--ink-2); font-size: .96rem; }
.tl-step__when { font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--teal); }

/* --- App-Vorschau -------------------------------------------------------- */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
@media (max-width: 900px) { .showcase { grid-template-columns: 1fr; gap: 32px; } }
.checklist { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 13px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 13px; align-items: start; color: var(--ink-2); }
.checklist svg { width: 22px; height: 22px; color: var(--teal); margin-top: 1px; }

.phone {
  background: var(--grad-brand);
  border-radius: var(--r-xl);
  padding: 30px;
  box-shadow: var(--shadow-lg);
  color: #fff;
}
.phone__row { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.2); }
.phone__row:last-child { border-bottom: 0; }
.phone__dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.phone__label { font-size: .95rem; }
.phone__val { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.phone__ring { display: grid; place-items: center; margin-bottom: 8px; }

/* --- FAQ ----------------------------------------------------------------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow-sm); border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 19px 54px 19px 22px; position: relative;
  font-weight: 600; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 24px; top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2.5px solid var(--ink-3); border-bottom: 2.5px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .faq__body { padding: 0 22px 20px; color: var(--ink-2); font-size: .97rem; }

/* --- Download / CTA ------------------------------------------------------ */
.cta-band {
  background: var(--grad-brand);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 52px 42px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: rgba(255,255,255,.08); top: -190px; right: -110px;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 58ch; margin-inline: auto; }
.cta-band .hero__cta { justify-content: center; }

.notice {
  background: color-mix(in srgb, var(--amber) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--amber) 45%, transparent);
  border-radius: var(--r);
  padding: 18px 22px;
  font-size: .93rem;
  color: var(--ink-2);
}
.notice strong { color: var(--ink); }

/* --- Fußbereich ---------------------------------------------------------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 30px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 34px; }
@media (max-width: 780px) { .footer__grid { grid-template-columns: 1fr; gap: 26px; } }
.footer h4 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer a { color: var(--ink-2); text-decoration: none; font-size: .94rem; }
.footer a:hover { color: var(--brand); }
.footer__bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.footer__brand { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; font-weight: 700; }
.footer__brand img { width: 36px; height: 36px; border-radius: 50%; }

/* --- Rechtliche Seiten --------------------------------------------------- */
.doc { padding: 56px 0 80px; }
.doc .wrap { max-width: 800px; }
.doc h2 { margin-top: 1.8em; }
.doc h2:first-of-type { margin-top: 1em; }
.doc ul { padding-left: 1.2em; color: var(--ink-2); }
.doc li { margin-bottom: .45em; }

/* --- Einblenden beim Scrollen ------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

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

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 18px; border-radius: 10px;
  box-shadow: var(--shadow);
}
.skip-link:focus { left: 16px; }

/* ==========================================================================
   KI-Chat-Widget
   ========================================================================== */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 70;
  width: 62px; height: 62px; border-radius: 50%; border: 0;
  background: var(--grad-violet); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 12px 30px rgba(91, 75, 255, .45);
  transition: transform .18s ease, box-shadow .18s ease;
}
.chat-fab:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 18px 38px rgba(91, 75, 255, .55); }
.chat-fab svg { width: 28px; height: 28px; }
.chat-fab__close { display: none; }
.chat-fab.is-open .chat-fab__open { display: none; }
.chat-fab.is-open .chat-fab__close { display: block; }
.chat-fab__ping {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(123, 97, 255, .6);
  animation: chatPing 2.6s ease-out infinite;
}
@keyframes chatPing {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(1.45); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .chat-fab__ping { animation: none; opacity: 0; } }

.chat-panel {
  position: fixed; right: 22px; bottom: 96px; z-index: 69;
  width: min(392px, calc(100vw - 32px));
  height: min(600px, calc(100vh - 140px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 26px 60px rgba(0, 0, 0, .3);
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right;
  transition: opacity .2s ease, transform .2s ease;
}
.chat-panel[hidden] { display: none; }
.chat-panel.is-closed { opacity: 0; transform: scale(.94) translateY(10px); pointer-events: none; }

.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; background: var(--grad-violet); color: #fff; flex: none;
}
.chat-head__icon { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.22); display: grid; place-items: center; flex: none; }
.chat-head__icon svg { width: 20px; height: 20px; }
.chat-head__t { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.chat-head__s { font-size: .78rem; opacity: .88; }
.chat-head__x { margin-left: auto; background: none; border: 0; color: #fff; cursor: pointer; padding: 6px; border-radius: 8px; }
.chat-head__x:hover { background: rgba(255,255,255,.18); }
.chat-head__x svg { width: 20px; height: 20px; display: block; }

.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.chat-intro { text-align: center; padding: 6px 4px 2px; }
.chat-intro h4 { margin: 0 0 6px; font-size: 1.05rem; }
.chat-intro p { margin: 0 0 14px; font-size: .88rem; color: var(--ink-2); }
.chat-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chat-chip {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 12px; padding: 8px 13px; font: inherit; font-size: .85rem; cursor: pointer;
  text-align: left; transition: border-color .15s ease, transform .15s ease;
}
.chat-chip:hover { border-color: var(--violet); transform: translateY(-1px); }

.chat-msg { display: flex; gap: 9px; align-items: flex-start; max-width: 100%; }
.chat-msg__av { width: 27px; height: 27px; border-radius: 50%; background: var(--grad-violet); display: grid; place-items: center; flex: none; margin-top: 3px; }
.chat-msg__av svg { width: 15px; height: 15px; color: #fff; }
.chat-bubble {
  padding: 11px 14px; border-radius: 16px; font-size: .92rem; line-height: 1.55;
  max-width: 84%; white-space: pre-wrap; overflow-wrap: anywhere;
}
.chat-msg--bot .chat-bubble { background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 5px; }
.chat-msg--me { justify-content: flex-end; }
.chat-msg--me .chat-bubble { background: var(--grad-brand); color: #fff; border-bottom-right-radius: 5px; }

.chat-typing { display: flex; gap: 4px; padding: 13px 15px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: chatDot 1.3s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .18s; }
.chat-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes chatDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

.chat-foot { flex: none; border-top: 1px solid var(--line); padding: 11px 12px 12px; background: var(--surface); }
.chat-form { display: flex; gap: 9px; align-items: flex-end; }
.chat-input {
  flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px;
  padding: 11px 13px; font: inherit; font-size: .92rem; line-height: 1.45;
  background: var(--bg); color: var(--ink); max-height: 110px; min-height: 44px;
}
.chat-input:focus { outline: none; border-color: var(--violet); }
.chat-send {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 13px;
  background: var(--grad-violet); color: #fff; cursor: pointer; display: grid; place-items: center;
}
.chat-send:disabled { background: var(--surface-2); color: var(--ink-3); cursor: default; }
.chat-send svg { width: 19px; height: 19px; }
.chat-note { font-size: .72rem; color: var(--ink-3); text-align: center; margin: 9px 2px 0; line-height: 1.4; }

@media (max-width: 520px) {
  .chat-fab { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .chat-panel {
    right: 10px; left: 10px; bottom: 82px; width: auto;
    height: min(560px, calc(100vh - 110px));
  }
}

/* ==========================================================================
   Blog und Unterseiten
   ========================================================================== */
.page-head {
  background: var(--grad-brand); color: #fff;
  border-radius: 0 0 38px 38px;
  padding: 58px 0 66px;
  position: relative; overflow: hidden;
}
.page-head::before {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: rgba(255,255,255,.09); top: -220px; right: -120px;
}
.page-head .wrap { position: relative; z-index: 1; }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head p { color: rgba(255,255,255,.92); max-width: 60ch; font-size: 1.1rem; }
.page-head .eyebrow { background: rgba(255,255,255,.2); color: #fff; }

.post-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  box-shadow: var(--shadow); overflow: hidden;
  text-decoration: none; color: inherit;
  transition: transform .16s ease, box-shadow .16s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card__top { height: 7px; background: var(--grad-brand); }
.post-card--teal .post-card__top { background: var(--grad-teal); }
.post-card--violet .post-card__top { background: var(--grad-violet); }
.post-card--coral .post-card__top { background: var(--grad-coral); }
.post-card__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.post-card h2 { font-size: 1.18rem; margin-bottom: .45em; }
.post-card p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.post-card__more { margin-top: 16px; font-weight: 600; font-size: .92rem; color: var(--brand); display: inline-flex; align-items: center; gap: 7px; }
.post-card__more svg { width: 16px; height: 16px; }

.article { padding: 46px 0 72px; }
.article .wrap { max-width: 760px; }
.article__meta { font-size: .84rem; color: var(--ink-3); margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.article h2 { margin-top: 1.7em; font-size: 1.5rem; }
.article h3 { margin-top: 1.4em; font-size: 1.15rem; }
.article ul, .article ol { padding-left: 1.25em; color: var(--ink-2); }
.article li { margin-bottom: .5em; }
.article blockquote {
  margin: 1.6em 0; padding: 16px 22px;
  border-left: 4px solid var(--brand);
  background: var(--surface); border-radius: 0 var(--r) var(--r) 0;
  color: var(--ink-2); box-shadow: var(--shadow-sm);
}
.article blockquote p:last-child { margin-bottom: 0; }
.article__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 40px; font-weight: 600; text-decoration: none; }
.article__back svg { width: 17px; height: 17px; }

/* Über uns */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .story { grid-template-columns: 1fr; gap: 30px; } }
.story__quote {
  background: var(--grad-brand); color: #fff;
  border-radius: var(--r-xl); padding: 34px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.story__quote::before {
  content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,.09); top: -150px; right: -90px;
}
.story__quote p { position: relative; z-index: 1; font-size: 1.12rem; line-height: 1.6; }
.story__quote cite { position: relative; z-index: 1; display: block; margin-top: 18px; font-style: normal; font-size: .9rem; opacity: .85; }

.value-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
