/* ============================================================
   KI-Maus — Styling (Demo-Prototyp)
   Cursor-Ebene, Bereichs-Highlight, Start-Button, Panel.
   CI: Warm Ivory #F6F1EA, Anthrazit #2E2B29, Terracotta #A85831.
   ============================================================ */

/* ---------------- Screenreader-only ---------------- */
.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;
}

/* ---------------- KI-Cursor ---------------- */
.ai-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9999;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #A85831;
  background: rgba(246, 241, 234, 0.82);
  box-shadow: 0 10px 28px rgba(46, 43, 41, 0.18);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: top 0.35s ease, left 0.35s ease, opacity 0.25s ease;
  opacity: 0;
}
.ai-cursor::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #A85831;
  transform: translate(-50%, -50%);
}
.ai-cursor.is-visible { opacity: 1; }
.ai-cursor-label {
  position: absolute;
  left: 26px;
  top: -4px;
  background: #2E2B29;
  color: #F6F1EA;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  font-family: Optima, 'Optima Nova', Candara, Marcellus, serif;
}
@media (prefers-reduced-motion: reduce) {
  .ai-cursor { transition: opacity 0.25s ease; } /* springt statt zu gleiten */
}

/* ---------------- Bereichs-Highlight ---------------- */
/* Nie nur Farbe: Rahmen + leichte Fläche + Text-Label */
.ai-section-highlight {
  outline: 2px solid rgba(168, 88, 49, 0.75);
  outline-offset: 8px;
  border-radius: 24px;
  background: rgba(200, 111, 68, 0.06);
}
.ai-section-highlight::before {
  content: 'Aktueller Bereich';
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 60;
  background: #A85831;
  color: #F6F1EA;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: Optima, 'Optima Nova', Candara, Marcellus, serif;
}
/* Der Hero wird über sein Sticky-Inneres markiert (Rahmen nach innen) */
#hero-sticky.ai-section-highlight { outline-offset: -10px; }

/* ---------------- Start-Button ---------------- */
.ai-start-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid #A85831;
  background: #A85831;
  color: #F6F1EA;
  font-family: Optima, 'Optima Nova', Candara, Marcellus, serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(46, 43, 41, 0.22);
  transition: background 0.2s ease;
}
.ai-start-btn:hover { background: #8F4A26; }
.ai-start-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 90, 54, 0.7), 0 12px 30px rgba(46, 43, 41, 0.22);
}
.ai-start-btn .ai-btn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #F6F1EA;
  background: transparent;
  flex: 0 0 auto;
}
.ai-start-btn[aria-pressed="true"] { background: #2E2B29; border-color: #2E2B29; }

/* ---------------- Panel ---------------- */
.ai-panel {
  box-sizing: border-box;
  position: fixed;
  right: 24px;
  bottom: 84px;
  z-index: 9500;
  width: min(340px, calc(100vw - 48px));
  background: #FBF8F3;
  color: #2E2B29;
  border: 1px solid #D8CBBB;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(46, 43, 41, 0.24);
  padding: 18px;
  font-family: Optima, 'Optima Nova', Candara, Marcellus, serif;
  display: none;
}
.ai-panel.is-open { display: block; }
.ai-panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #A85831;
  margin-bottom: 10px;
}
.ai-panel-section {
  font-size: 17px;
  color: #2E2B29;
  margin: 0 0 6px;
}
.ai-panel-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #4A4642;
}
.ai-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ai-panel-btn {
  font-family: inherit;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  padding: 9px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid #A85831;
  background: #A85831;
  color: #F6F1EA;
  transition: background 0.2s ease, color 0.2s ease;
}
.ai-panel-btn:hover { background: #8F4A26; border-color: #8F4A26; }
.ai-panel-btn--secondary {
  background: transparent;
  color: #2E2B29;
  border-color: #2E2B29;
}
.ai-panel-btn--secondary:hover { background: #2E2B29; color: #F6F1EA; }
.ai-panel-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 90, 54, 0.7);
}
.ai-panel-hint {
  margin: 12px 0 0;
  font-size: 12px;
  color: #6E675F;
}

/* Schmale Viewports: Panel bleibt über dem Start-Button */
@media (max-width: 480px) {
  .ai-panel { bottom: 78px; }
}
