/* =========================================================
   SECTION MONSTERS – HeroAI-Demo (animierter Beispiel-Chat)
   css/heroai-demo.css   ·   gehört zu js/heroai-demo.js

   Einbindung:
     <link rel="stylesheet" href="/css/heroai-demo.css">
     <script src="/js/heroai-demo.js" defer></script>
     <div class="hd-demo" data-hd-set="start"></div>   (oder "heroai")

   Teil 1 (.hd-*):  die Komponente. Nutzt die Landingpage-Tokens aus
                    css/style.css, trägt aber Rückfallwerte, damit sie auf
                    jeder Unterseite gleich aussieht.
   Teil 2 (.hds-*): die Section auf der Startseite (index.html, zwischen
                    #story und #warum).

   ⚠️ Das App-Fenster hat eine FESTE Höhe (560 px mobil, 520 px ab 681 px).
   Der Verlauf darin wächst nie nach außen — lange Antworten schieben den
   Inhalt per transform nach oben wie in einem echten Chat. Damit verschiebt
   die Demo nie die Seite, und die ScrollTrigger-Pins in js/main.js müssen
   nach dem Start der Animation nicht neu vermessen werden.
   ========================================================= */

/* ─────────────────────────────────────────────────────────
   1. KOMPONENTE
   ───────────────────────────────────────────────────────── */

.hd-demo {
  --hd-bg-2: var(--panel-2, #14141d);
  --hd-text: var(--text, #f2f4ef);
  --hd-soft: rgba(242, 244, 239, .86);
  --hd-muted: rgba(242, 244, 239, .64);
  --hd-line: rgba(255, 255, 255, .08);
  --hd-line-2: rgba(255, 255, 255, .15);
  --hd-green: var(--green, #8bd626);
  --hd-green-bright: var(--green-bright, #a6f03a);
  --hd-purple: var(--purple, #7c5cff);
  --hd-purple-bright: var(--purple-bright, #a855f7);
  --hd-blue: var(--blue, #38bdf8);
  --hd-down: #ff8f7e;
  --hd-amber: #ffcf70;
  --hd-ease: var(--ease, cubic-bezier(.22, 1, .36, 1));

  position: relative;
  width: 100%;
  container-type: inline-size;
  container-name: hd;
  color: var(--hd-text);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

/* Textfassung für Screenreader und Suchmaschinen — die Bühne ist aria-hidden. */
.hd-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── App-Fenster ── */
.hd-window {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 560px;
  overflow: hidden;
  border: 1px solid var(--hd-line-2);
  border-radius: var(--radius-lg, 24px);
  background:
    radial-gradient(120% 55% at 100% 0%, rgba(124, 92, 255, .12), transparent 62%),
    radial-gradient(90% 45% at 0% 100%, rgba(139, 214, 38, .07), transparent 62%),
    linear-gradient(180deg, #11111a 0%, #0c0c12 100%);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(0, 0, 0, .4),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-user-select: none;
  user-select: none;
}

@media (min-width: 681px) {
  .hd-window { height: 520px; }
}

.hd-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--hd-line);
  background: rgba(255, 255, 255, .02);
}

.hd-bar-dots,
.hd-bar-end {
  display: flex;
  gap: 6px;
  width: 42px;
}

.hd-bar-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .13);
}

.hd-bar-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 auto;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.hd-bar-title svg { width: 15px; height: 15px; color: var(--hd-green-bright); }

/* ── Verlauf ── */
.hd-log {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
}

.hd-log-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 14px 14px;
  transition: transform .7s var(--hd-ease), opacity .42s ease;
}

.hd-log-inner.is-leaving { opacity: 0; }

/* Fertig gezeigtes Gespräch (Punkt gewählt oder reduzierte Bewegung):
   Der Verlauf darf dann mit Maus/Finger gescrollt werden. */
.hd-demo.is-scrollable .hd-log {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .2) transparent;
}

/* ── Startansicht (wie „Neues Gespräch" in der App) ── */
.hd-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  text-align: center;
  transition: opacity .4s ease, transform .5s var(--hd-ease);
}

.hd-start.is-hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

.hd-start-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  border: 1px solid rgba(139, 214, 38, .32);
  border-radius: 14px;
  color: var(--hd-green-bright);
  background: linear-gradient(145deg, rgba(166, 240, 58, .18), rgba(139, 214, 38, .05));
}

.hd-start-icon svg { width: 22px; height: 22px; }

.hd-start-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.025em;
}

.hd-start-sub {
  color: var(--hd-muted);
  font-size: 12.5px;
}

.hd-start-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 440px;
  margin-top: 12px;
}

.hd-start-chip {
  padding: 6px 11px;
  border: 1px solid var(--hd-line-2);
  border-radius: 999px;
  color: var(--hd-muted);
  background: rgba(255, 255, 255, .03);
  font-size: 12px;
  transition: border-color .3s ease, color .3s ease, background .3s ease;
}

.hd-start-chip.is-active {
  border-color: rgba(166, 240, 58, .5);
  color: var(--hd-text);
  background: rgba(139, 214, 38, .08);
}

/* ── Einblendungen ── */
.hd-msg,
.hd-fade {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .45s ease, transform .6s var(--hd-ease);
}

.hd-msg.is-in,
.hd-fade.is-in,
.is-in .hd-fade {
  opacity: 1;
  transform: none;
}

.hd-w {
  opacity: 0;
  transition: opacity .32s ease;
}

.is-in .hd-w { opacity: 1; }

/* ── Nutzerblase ── */
.hd-user {
  align-self: flex-end;
  max-width: 86%;
  padding: 9px 14px;
  border: 1px solid rgba(168, 85, 247, .4);
  border-radius: 16px 16px 4px 16px;
  background: linear-gradient(135deg, rgba(124, 92, 255, .36), rgba(168, 85, 247, .22));
  font-weight: 500;
}

.hd-user-text { display: block; }

.hd-user .hd-shot { margin: 1px 0 8px auto; }

/* ── Werkzeug-Statuszeile (wie .hai-werkzeug in der App) ── */
.hd-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hd-green-bright);
  font-size: 12px;
  font-weight: 600;
  transform: none;
}

.hd-tool + .hd-tool { margin-top: -6px; }

.hd-tool-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: hdPuls 1.1s ease-in-out infinite;
}

.hd-tool.is-done { color: var(--hd-muted); }

.hd-tool.is-done .hd-tool-dot {
  background: rgba(255, 255, 255, .26);
  animation: none;
}

@keyframes hdPuls {
  0%, 100% { opacity: 1;  transform: scale(1); }
  50%      { opacity: .35; transform: scale(.7); }
}

/* ── Antworttext ── */
.hd-text { color: var(--hd-soft); }

.hd-text strong,
.hd-list-text strong {
  color: var(--hd-text);
  font-weight: 750;
}

/* ── Kennzahl-Chips ── */
.hd-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hd-kpi {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--hd-line-2);
  border-radius: 10px;
  background: var(--hd-bg-2);
  font-size: 12px;
}

.hd-kpi-label { color: var(--hd-muted); }

.hd-kpi-wert {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hd-kpi--runter .hd-kpi-wert { color: var(--hd-down); }
.hd-kpi--hoch   .hd-kpi-wert { color: var(--hd-green-bright); }

/* ── Flächen (Diagramm, Tabelle, Karte) ── */
.hd-panel {
  padding: 11px 12px;
  border: 1px solid var(--hd-line);
  border-radius: 14px;
  background: var(--hd-bg-2);
}

.hd-chart-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 12px;
  margin-bottom: 6px;
  font-size: 11.5px;
}

.hd-chart-title {
  font-size: 11.5px;
  font-weight: 700;
}

.hd-legend {
  display: flex;
  gap: 10px;
  color: var(--hd-muted);
}

.hd-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.hd-legend i {
  width: 12px;
  height: 3px;
  border-radius: 2px;
}

.hd-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hd-grid line { stroke: rgba(255, 255, 255, .07); stroke-width: 1; }

.hd-axis text {
  fill: rgba(242, 244, 239, .55);
  font-family: inherit;
  font-size: 10.5px;
}

.hd-line {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: stroke-dashoffset 1.3s var(--hd-ease) .15s, opacity .2s ease .15s;
}

.is-in .hd-line {
  stroke-dashoffset: 0;
  opacity: 1;
}

.hd-area {
  opacity: 0;
  transition: opacity .8s ease .8s;
}

.is-in .hd-area { opacity: 1; }

.hd-end {
  opacity: 0;
  transition: opacity .3s ease 1.3s;
}

.is-in .hd-end { opacity: 1; }

/* Farben der Reihen — dieselben Namen wie in den Szenario-Daten */
.hd-line--gruen { stroke: var(--hd-green-bright); }
.hd-line--lila  { stroke: var(--hd-purple-bright); stroke-opacity: .75; }
.hd-fill--gruen { fill: var(--hd-green-bright); }
.hd-fill--lila  { fill: var(--hd-purple-bright); }
.hd-farbe--gruen { background: var(--hd-green-bright); }
.hd-farbe--lila  { background: var(--hd-purple-bright); }
.hd-farbe--blau  { background: var(--hd-blue); }
.hd-stroke--gruen { stroke: var(--hd-green-bright); }
.hd-stroke--lila  { stroke: var(--hd-purple-bright); }
.hd-stroke--blau  { stroke: var(--hd-blue); }

/* ── Tabelle ── */
.hd-table-box { padding: 4px 4px 2px; }

.hd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.hd-table th {
  padding: 7px 6px 6px;
  border-bottom: 1px solid var(--hd-line-2);
  color: var(--hd-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.hd-table td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--hd-line);
  vertical-align: middle;
}

.hd-table tbody tr:last-child td { border-bottom: 0; }
.hd-table td:first-child { font-weight: 700; line-height: 1.3; }
.hd-table .hd-num { text-align: right; white-space: nowrap; }

.hd-table tbody tr {
  opacity: 0;
  transition: opacity .45s ease;
}

.is-in .hd-table tbody tr { opacity: 1; }

.hd-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(139, 214, 38, .13);
  color: var(--hd-green-bright);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.hd-tag--lila {
  background: rgba(124, 92, 255, .2);
  color: #cbbcff;
}

/* ── Kampagnenkarte ── */
.hd-camp { padding: 0; overflow: hidden; }

.hd-camp-head {
  padding: 11px 12px 10px;
  border-bottom: 1px solid var(--hd-line);
}

.hd-camp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
}

.hd-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, .14);
  color: #8fdcfb;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hd-badge--entwurf {
  background: rgba(255, 255, 255, .07);
  color: var(--hd-muted);
}

.hd-camp-name {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.hd-camp-meta {
  margin-top: 2px;
  color: var(--hd-muted);
  font-size: 11.5px;
}

.hd-camp-meta strong { color: var(--hd-text); }

.hd-camp-body {
  display: grid;
  gap: 10px;
  padding: 10px 12px 12px;
}

.hd-camp-label {
  margin-bottom: 6px;
  color: var(--hd-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hd-groups {
  display: grid;
  gap: 6px;
}

.hd-group {
  padding: 8px 9px;
  border: 1px solid var(--hd-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .025);
}

.hd-group-name {
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
}

.hd-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.hd-key {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(124, 92, 255, .18);
  color: #d9d0ff;
  font-size: 11px;
  white-space: nowrap;
}

.hd-ad {
  padding: 9px 11px 10px;
  border: 1px solid var(--hd-line);
  border-radius: 10px;
  background: #0a0a10;
}

.hd-ad-top {
  color: var(--hd-muted);
  font-size: 10.5px;
}

.hd-ad-title {
  margin-top: 3px;
  color: #9cc0ff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.hd-ad-desc {
  margin-top: 3px;
  color: var(--hd-soft);
  font-size: 11.5px;
  line-height: 1.45;
}

.hd-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.hd-count {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(139, 214, 38, .1);
  color: var(--hd-green-bright);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.hd-camp-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--hd-line);
  background: rgba(255, 255, 255, .02);
  font-size: 11px;
  transform: none;
}

.hd-camp-warn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hd-amber);
  font-weight: 700;
}

.hd-camp-warn svg { width: 13px; height: 13px; }

.hd-camp-ok { color: var(--hd-green-bright); font-weight: 600; }

/* ── Liste (Beobachtungen) ── */
.hd-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hd-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--hd-line);
  border-radius: 12px;
  background: var(--hd-bg-2);
}

.hd-list-nr {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(139, 214, 38, .14);
  color: var(--hd-green-bright);
  font-size: 11px;
  font-weight: 800;
}

.hd-list-text { color: var(--hd-soft); font-size: 12.5px; line-height: 1.5; }

/* ── Tortendiagramm ── */
.hd-pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 8px;
}

.hd-pie svg {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  transform: rotate(-90deg);
}

.hd-pie-bg {
  fill: none;
  stroke: rgba(255, 255, 255, .06);
  stroke-width: 6.5;
}

.hd-pie-seg {
  fill: none;
  stroke-width: 6.5;
  transition: stroke-dasharray 1s var(--hd-ease);
}

.hd-pie-legend {
  display: grid;
  flex: 1 1 170px;
  gap: 7px;
  font-size: 12px;
}

.hd-pie-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
}

.hd-pie-row i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.hd-pie-row b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.hd-pie-row small {
  grid-column: 2 / -1;
  color: var(--hd-muted);
  font-size: 11px;
}

/* ── Screenshot-Kachel ── */
.hd-shot {
  display: block;
  width: 78px;
  height: 98px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 9px;
  background: #f4f5f7;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
}

.hd-shot svg { display: block; width: 100%; height: 100%; }

/* ── Eingabezeile (keine echte Eingabe) ── */
.hd-inputbar {
  flex: 0 0 auto;
  padding: 8px 12px 12px;
}

.hd-attach {
  display: flex;
  gap: 8px;
  margin: 0 0 8px 2px;
}

.hd-attach[hidden] { display: none; }

.hd-attach .hd-shot {
  width: 56px;
  height: 70px;
}

.hd-input {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 5px 5px 5px 3px;
  border: 1px solid var(--hd-line-2);
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.hd-input.is-focus {
  border-color: rgba(166, 240, 58, .55);
  box-shadow: 0 0 0 3px rgba(139, 214, 38, .12);
}

.hd-clip,
.hd-send {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.hd-clip {
  color: var(--hd-muted);
  transition: background .2s ease, color .2s ease;
}

.hd-clip svg { width: 17px; height: 17px; }

.hd-clip.is-active {
  background: rgba(255, 255, 255, .1);
  color: var(--hd-text);
}

.hd-send {
  background: linear-gradient(135deg, var(--hd-green-bright), var(--hd-green));
  color: #0a1403;
  opacity: .32;
  transition: opacity .2s ease, transform .15s ease;
}

.hd-send svg { width: 15px; height: 15px; }
.hd-send.is-ready { opacity: 1; }
.hd-send.is-pressed { transform: scale(.86); }

.hd-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 32px;
  padding: 6px 2px;
  font-size: 13.5px;
  line-height: 20px;
  overflow-wrap: anywhere;
}

.hd-ph {
  position: absolute;
  top: 6px;
  right: 0;
  left: 5px;
  overflow: hidden;
  color: rgba(242, 244, 239, .5);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hd-field.has-text .hd-ph { display: none; }

.hd-caret {
  display: inline-block;
  width: 2px;
  height: 17px;
  margin-left: 1px;
  vertical-align: -3px;
  border-radius: 1px;
  background: var(--hd-green-bright);
  animation: hdBlinken 1.05s steps(1) infinite;
}

.hd-field.is-typing .hd-caret { animation: none; }

.hd-demo.is-scrollable .hd-caret,
.hd-demo.is-static .hd-caret { visibility: hidden; }

@keyframes hdBlinken {
  0%, 55%  { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* Außerhalb des Viewports / verborgener Tab: auch die CSS-Schleifen ruhen. */
.hd-demo.is-paused .hd-caret,
.hd-demo.is-paused .hd-tool-dot { animation-play-state: paused; }

/* ── Fuß: Punkt-Navigation + Hinweis ── */
.hd-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  min-height: 36px;
  margin-top: 12px;
}

.hd-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: -6px;
}

.hd-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
}

.hd-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .3);
  transition: width .35s var(--hd-ease), background-color .25s ease;
}

.hd-dot:hover::before { background: rgba(255, 255, 255, .6); }

.hd-dot[aria-pressed="true"]::before {
  width: 22px;
  background: var(--hd-green-bright);
}

.hd-toggle {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-left: 8px;
  padding: 0;
  border: 1px solid var(--hd-line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--hd-text);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}

.hd-toggle[hidden] { display: none; }
.hd-toggle:hover { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08); }
.hd-toggle svg { width: 12px; height: 12px; }

.hd-dot:focus-visible,
.hd-toggle:focus-visible {
  outline: 2px solid var(--hd-green-bright);
  outline-offset: 2px;
}

.hd-note {
  color: var(--hd-muted);
  font-size: 12px;
}

/* ── Breitere Bühne (Container, nicht Viewport: die Komponente kann
      auf Unterseiten in anderen Spalten stehen) ── */
@container hd (min-width: 520px) {
  .hd-window     { font-size: 14px; }
  .hd-log-inner  { gap: 13px; padding: 20px 22px 16px; }
  .hd-inputbar   { padding: 8px 16px 16px; }
  .hd-field      { font-size: 14px; }
  .hd-user       { max-width: 78%; }
  .hd-panel      { padding: 12px 14px; }
  .hd-table-box  { padding: 4px 8px 2px; }
  .hd-table      { font-size: 12.5px; }
  .hd-table th,
  .hd-table td   { padding-inline: 8px; }
  .hd-groups     { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hd-camp-head,
  .hd-camp-body,
  .hd-camp-foot  { padding-inline: 14px; }
  .hd-list-text  { font-size: 13px; }
  .hd-pie svg    { width: 104px; height: 104px; }
}

/* Sehr schmal: Hinweis-Spalte der Tabelle ausblenden, sonst quetscht sie
   die Produktnamen auf drei Zeilen. Die Textfassung enthält sie weiter. */
@container hd (max-width: 360px) {
  .hd-table .hd-opt { display: none; }
}

/* Reduzierte Bewegung: keine Übergänge, keine Schleifen. Das Skript zeigt
   dann fertige Gespräche (js/heroai-demo.js, Modus „statisch"). */
@media (prefers-reduced-motion: reduce) {
  .hd-demo *,
  .hd-demo *::before,
  .hd-demo *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ─────────────────────────────────────────────────────────
   2. SECTION AUF DER STARTSEITE
   Bewusst OHNE .section-pin / .section-overlap: js/main.js pinnt nur
   Elemente mit diesen Klassen bzw. festen Selektoren. Diese Section
   läuft normal im Fluss und hat eine von JS unabhängige Höhe.
   ───────────────────────────────────────────────────────── */

.hds {
  position: relative;
  overflow: hidden;           /* nur für die Lichtflächen */
  padding: 150px max(32px, calc((100vw - 1220px) / 2)) 40px;
  background:
    radial-gradient(46vw 40vw at 84% 64%, rgba(124, 92, 255, .13), transparent 70%),
    radial-gradient(36vw 30vw at 62% 92%, rgba(139, 214, 38, .07), transparent 70%),
    #08080d;
}

.hds-inner {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-areas:
    "head head"
    "copy demo";
  align-items: center;
  column-gap: clamp(40px, 5.5vw, 96px);
  row-gap: 64px;
  max-width: 1220px;
  margin: 0 auto;
}

.hds-head { grid-area: head; min-width: 0; }
.hds-copy { grid-area: copy; min-width: 0; }
.hds-demo { grid-area: demo; min-width: 0; }

.hds-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hds-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-bright, #a6f03a);
  box-shadow: 0 0 0 0 rgba(166, 240, 58, .55);
  animation: hdsSignal 2.2s ease-out infinite;
}

@keyframes hdsSignal {
  0%   { box-shadow: 0 0 0 0 rgba(166, 240, 58, .55); }
  70%  { box-shadow: 0 0 0 10px rgba(166, 240, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(166, 240, 58, 0); }
}

.hds-title {
  margin-top: 22px;
  color: var(--white, #fff);
  font-size: clamp(38px, 8.6vw, 136px);
  font-weight: 900;
  line-height: .84;
  letter-spacing: -.075em;
}

.hds-title span { display: block; }

/* Grünverlauf wie .hero-title. padding/margin unten gleichen sich aus:
   Sie geben der Unterlänge von „p" Fläche, auf die der Verlauf gemalt
   wird — bei line-height .84 würde sie sonst abgeschnitten. */
.hds-title span:last-child {
  padding-bottom: .14em;
  margin-bottom: -.14em;
  background: linear-gradient(90deg, var(--green-bright, #a6f03a), var(--green, #8bd626) 60%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hds-lead {
  max-width: 540px;
  color: rgba(242, 244, 239, .78);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.58;
}

.hds-points {
  display: grid;
  gap: 18px;
  margin-top: 34px;
  list-style: none;
}

.hds-point {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  column-gap: 16px;
}

.hds-point-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(139, 214, 38, .32);
  border-radius: 13px;
  color: var(--green-bright, #a6f03a);
  background: linear-gradient(145deg, rgba(166, 240, 58, .18), rgba(139, 214, 38, .06));
}

.hds-point-icon svg { width: 20px; height: 20px; }

.hds-point-title {
  display: block;
  padding-top: 1px;
  color: var(--text, #f2f4ef);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.015em;
}

.hds-point-text {
  display: block;
  margin-top: 3px;
  color: var(--muted, rgba(242, 244, 239, .62));
  font-size: 14px;
  line-height: 1.5;
}

.hds-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.hds-buttons .btn:focus-visible {
  outline: 2px solid var(--green-bright, #a6f03a);
  outline-offset: 3px;
}

.hds-plan {
  margin-top: 16px;
  color: var(--muted, rgba(242, 244, 239, .62));
  font-size: 13px;
}

@media (max-width: 1100px) {
  .hds {
    padding: 110px max(24px, calc((100vw - 1220px) / 2)) 30px;
  }

  .hds-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "copy"
      "demo";
    row-gap: 36px;
  }

  .hds-copy,
  .hds-demo { max-width: 720px; }

  .hds-demo { margin-top: 8px; }
}

@media (max-width: 680px) {
  .hds { padding: 92px 20px 20px; }
  /* 10vw hält „deinen Shop kennt." auf einer Zeile (gemessen: 320 px
     Textbreite bei 375 px Viewport, 335 px Spalte). */
  .hds-title { font-size: 10vw; letter-spacing: -.065em; }
  .hds-lead { font-size: 15px; }
  .hds-points { gap: 16px; margin-top: 28px; }
  .hds-point { grid-template-columns: 38px minmax(0, 1fr); column-gap: 14px; }
  .hds-point-icon { width: 38px; height: 38px; border-radius: 12px; }
  .hds-point-title { font-size: 15px; }
  .hds-point-text { font-size: 13.5px; }
  .hds-buttons { flex-direction: column; align-items: stretch; margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .hds-eyebrow::before { animation: none; }
}

/* Platz vor dem Aufbau durch js/heroai-demo.js reservieren (14.09.2026):
   Bühne 520 px + Fuß 48 px, mobil 560 + 48 px — sonst springt das Layout,
   sobald das Skript die Demo einsetzt. */
.hd-demo:not([data-hd-init]) { min-height: 568px; }
@media (max-width: 680px) { .hd-demo:not([data-hd-init]) { min-height: 608px; } }
