/* ═══════════════════════════════════════════════════════════
   FastLane Solutions – Interaktive Branchen-Demo
   Nutzt die CSS-Variablen der Hauptseite (--green, --paper, …)
   ═══════════════════════════════════════════════════════════ */

.demo-section { padding: 6rem 4rem; background: var(--white); overflow: hidden; }
.demo-inner { max-width: 1200px; margin: 0 auto; }
.demo-head { margin-bottom: 3rem; }
.demo-head .s-sub { max-width: 620px; }

#fls-demo { position: relative; }

/* ── Branchen-Auswahl ── */
.fd-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.fd-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem;
  background: var(--paper); border: 1.5px solid var(--gray-lt); border-radius: 14px;
  padding: 1.5rem 1.4rem 1.35rem; cursor: pointer; text-align: left;
  font-family: var(--body);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.fd-card:hover, .fd-card:focus-visible {
  border-color: var(--green); background: var(--white);
  transform: translateY(-3px); box-shadow: 0 10px 32px rgba(26,122,74,0.10);
  outline: none;
}
.fd-card:focus-visible { box-shadow: 0 0 0 3px var(--green-light), 0 10px 32px rgba(26,122,74,0.10); }
.fd-card-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--green-light); color: var(--green);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.fd-card:hover .fd-card-icon { background: var(--green); color: var(--white); }
.fd-card-icon svg { width: 24px; height: 24px; }
.fd-card-name { font-family: var(--head); font-size: 1rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.fd-card-teaser { font-size: 0.8rem; color: var(--gray); line-height: 1.45; }
.fd-card-go { font-size: 0.8rem; font-weight: 600; color: var(--green); margin-top: auto; opacity: 0; transform: translateX(-4px); transition: opacity 0.2s, transform 0.2s; }
.fd-card:hover .fd-card-go, .fd-card:focus-visible .fd-card-go { opacity: 1; transform: translateX(0); }

/* ── Bühne ── */
.fd-stage { animation: fdFadeUp 0.45s ease both; }
@keyframes fdFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.fd-stage-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.fd-back {
  background: none; border: 1.5px solid var(--gray-lt); border-radius: 100px;
  padding: 0.5rem 1.1rem; font-family: var(--body); font-size: 0.85rem; font-weight: 600;
  color: var(--gray); cursor: pointer; transition: border-color 0.2s, color 0.2s;
}
.fd-back:hover { border-color: var(--ink); color: var(--ink); }
.fd-stage-title { font-family: var(--head); font-size: 1.15rem; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 0.6rem; }
.fd-stage-title svg { width: 20px; height: 20px; color: var(--green); }

.fd-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.25rem; align-items: stretch; }

/* Chat-Panel */
.fd-panel {
  background: var(--paper); border: 1.5px solid var(--gray-lt); border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column; min-height: 430px;
}
.fd-panel-head {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.9rem 1.25rem; background: var(--white);
  border-bottom: 1.5px solid var(--gray-lt);
}
.fd-ch-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; animation: fdPulse 2s infinite; }
@keyframes fdPulse { 0%,100% { box-shadow: 0 0 0 3px rgba(34,160,96,0.18); } 50% { box-shadow: 0 0 0 7px rgba(34,160,96,0.05); } }
.fd-ch-label { font-size: 0.85rem; font-weight: 700; color: var(--ink); }
.fd-ch-time { margin-left: auto; font-size: 0.78rem; font-weight: 600; color: var(--gray-md); display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.fd-ch-time strong { color: var(--red); font-weight: 700; }

.fd-progress { height: 3px; background: var(--gray-lt); }
.fd-progress-bar { height: 100%; width: 0; background: var(--green); transition: width 0.6s ease; }

.fd-chat { flex: 1; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.7rem; overflow-y: auto; max-height: 480px; scroll-behavior: smooth; }

.fd-msg { max-width: 82%; animation: fdMsgIn 0.35s ease both; }
@keyframes fdMsgIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.fd-msg-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-md); margin: 0 0.25rem 0.3rem; }
.fd-bubble { padding: 0.75rem 1rem; border-radius: 14px; font-size: 0.92rem; line-height: 1.55; }
.fd-msg.cust { align-self: flex-start; }
.fd-msg.cust .fd-bubble { background: var(--white); border: 1.5px solid var(--gray-lt); color: var(--ink); border-bottom-left-radius: 4px; }
.fd-msg.ai { align-self: flex-end; }
.fd-msg.ai .fd-msg-label { text-align: right; color: var(--green); }
.fd-msg.ai .fd-bubble { background: var(--green); color: var(--white); border-bottom-right-radius: 4px; }

/* E-Mail-Karten */
.fd-mail { max-width: 100%; align-self: stretch; }
.fd-mail .fd-bubble { border-radius: 12px; padding: 0; overflow: hidden; }
.fd-mail-head { padding: 0.6rem 1rem; font-size: 0.75rem; line-height: 1.5; border-bottom: 1px solid rgba(0,0,0,0.07); }
.fd-msg.ai .fd-mail-head { border-bottom-color: rgba(255,255,255,0.2); }
.fd-mail-head strong { font-weight: 700; }
.fd-mail-body { padding: 0.75rem 1rem; white-space: pre-line; }

/* Tipp-Indikator */
.fd-typing { display: flex; align-items: center; gap: 5px; padding: 0.8rem 1rem; }
.fd-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--gray-md); animation: fdTyp 1.1s infinite; }
.fd-msg.ai .fd-typing span { background: rgba(255,255,255,0.75); }
.fd-typing span:nth-child(2) { animation-delay: 0.15s; }
.fd-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes fdTyp { 0%,60%,100% { transform: none; opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Telefon-Wellenform */
.fd-wave { display: flex; align-items: center; gap: 3px; height: 18px; margin-left: 0.5rem; }
.fd-wave span { width: 3px; border-radius: 2px; background: var(--green-bright); animation: fdWave 1.2s ease-in-out infinite; }
.fd-wave span:nth-child(1) { height: 7px; } .fd-wave span:nth-child(2) { height: 14px; animation-delay: 0.12s; }
.fd-wave span:nth-child(3) { height: 10px; animation-delay: 0.24s; } .fd-wave span:nth-child(4) { height: 16px; animation-delay: 0.06s; }
.fd-wave span:nth-child(5) { height: 8px; animation-delay: 0.18s; }
@keyframes fdWave { 0%,100% { transform: scaleY(0.5); } 50% { transform: scaleY(1.15); } }

/* ── Automatisierungs-Panel ── */
.fd-side { background: #1c2b3a; border-radius: 16px; padding: 1.75rem 1.5rem; display: flex; flex-direction: column; min-height: 430px; }
.fd-side-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 0.4rem; }
.fd-side-title { font-family: var(--head); font-size: 1.15rem; font-weight: 800; color: var(--white); margin-bottom: 1.5rem; }
.fd-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.fd-step {
  display: flex; align-items: flex-start; gap: 0.85rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px; padding: 0.75rem 0.9rem;
  opacity: 0.32; transform: translateX(8px);
  transition: opacity 0.4s ease, transform 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}
.fd-step.done { opacity: 1; transform: none; background: rgba(93,223,154,0.08); border-color: rgba(93,223,154,0.25); }
.fd-step-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.6); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background 0.4s, color 0.4s; }
.fd-step.done .fd-step-icon { background: rgba(93,223,154,0.16); color: #5ddf9a; }
.fd-step-icon svg { width: 17px; height: 17px; }
.fd-step-txt { flex: 1; min-width: 0; }
.fd-step-title { display: block; font-size: 0.87rem; font-weight: 600; color: var(--white); line-height: 1.35; }
.fd-step-detail { display: block; font-size: 0.76rem; color: rgba(255,255,255,0.55); line-height: 1.45; margin-top: 0.1rem; }
.fd-step-check { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; color: #5ddf9a; opacity: 0; transform: scale(0.4); transition: opacity 0.3s ease 0.1s, transform 0.3s cubic-bezier(0.34,1.56,0.64,1) 0.1s; }
.fd-step.done .fd-step-check { opacity: 1; transform: none; }
.fd-side-foot { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.8rem; color: rgba(255,255,255,0.55); display: flex; align-items: center; gap: 0.5rem; opacity: 0; transition: opacity 0.5s ease; }
.fd-side-foot.show { opacity: 1; }
.fd-side-foot strong { color: #5ddf9a; font-weight: 700; }

/* ── Abschluss / CTA ── */
.fd-finale { margin-top: 1.25rem; background: var(--green); border-radius: 16px; padding: 2.25rem 2rem; animation: fdFadeUp 0.5s ease both; }
.fd-finale-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: center; }
.fd-finale h3 { font-family: var(--head); font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 800; color: var(--white); line-height: 1.15; letter-spacing: -0.02em; }
.fd-finale-sub { font-size: 0.95rem; color: rgba(255,255,255,0.85); line-height: 1.65; margin-top: 0.75rem; }
.fd-finale-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.fd-btn-light {
  background: var(--white); color: var(--green); border: none; cursor: pointer;
  padding: 0.9rem 1.6rem; border-radius: 8px; text-decoration: none;
  font-family: var(--body); font-size: 0.95rem; font-weight: 700; display: inline-block;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.fd-btn-light:hover { background: var(--ink); color: var(--white); transform: translateY(-2px); }
.fd-btn-ghost {
  background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.5); cursor: pointer;
  padding: 0.9rem 1.6rem; border-radius: 8px; font-family: var(--body); font-size: 0.95rem; font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
}
.fd-btn-ghost:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }
.fd-finale-stats { display: grid; gap: 0.75rem; }
.fd-fstat { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18); border-radius: 10px; padding: 0.9rem 1.1rem; display: flex; align-items: baseline; gap: 0.75rem; }
.fd-fstat strong { font-family: var(--head); font-size: 1.45rem; font-weight: 800; color: var(--white); letter-spacing: -0.03em; white-space: nowrap; }
.fd-fstat span { font-size: 0.82rem; color: rgba(255,255,255,0.8); line-height: 1.4; }
.fd-again { background: none; border: none; color: rgba(255,255,255,0.7); font-family: var(--body); font-size: 0.83rem; font-weight: 600; cursor: pointer; margin-top: 1rem; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.fd-again:hover { color: var(--white); }

/* ── Sofortanalyse ── */
.fd-quiz { background: var(--paper); border: 1.5px solid var(--gray-lt); border-radius: 16px; padding: 2.5rem 2rem; max-width: 720px; margin: 0 auto; animation: fdFadeUp 0.45s ease both; }
.fd-quiz-eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--green); margin-bottom: 0.75rem; }
.fd-quiz h3 { font-family: var(--head); font-size: 1.5rem; font-weight: 800; color: var(--ink); line-height: 1.2; margin-bottom: 0.5rem; }
.fd-quiz-q { font-size: 1.05rem; font-weight: 600; color: var(--ink); margin: 1.75rem 0 1rem; }
.fd-quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.fd-opt {
  background: var(--white); border: 1.5px solid var(--gray-lt); border-radius: 10px;
  padding: 0.9rem 1.1rem; font-family: var(--body); font-size: 0.92rem; font-weight: 500;
  color: var(--ink); cursor: pointer; text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.fd-opt:hover, .fd-opt:focus-visible { border-color: var(--green); background: var(--green-light); transform: translateY(-1px); outline: none; }
.fd-quiz-dots { display: flex; gap: 0.45rem; margin-top: 1.75rem; }
.fd-qdot { width: 26px; height: 4px; border-radius: 2px; background: var(--gray-lt); transition: background 0.3s; }
.fd-qdot.on { background: var(--green); }
.fd-quiz-skip { background: none; border: none; color: var(--gray-md); font-family: var(--body); font-size: 0.8rem; cursor: pointer; margin-top: 1.25rem; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.fd-quiz-skip:hover { color: var(--gray); }

/* Empfehlung */
.fd-reco { max-width: 760px; margin: 0 auto; animation: fdFadeUp 0.45s ease both; }
.fd-reco-card { background: var(--white); border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; }
.fd-reco-head { background: var(--ink); padding: 1.5rem 2rem; }
.fd-reco-head .fd-quiz-eyebrow { color: #5ddf9a; margin-bottom: 0.35rem; }
.fd-reco-head h3 { font-family: var(--head); font-size: 1.4rem; font-weight: 800; color: var(--white); line-height: 1.2; }
.fd-reco-body { padding: 1.75rem 2rem 2rem; }
.fd-reco-item { display: flex; gap: 1rem; padding: 1rem 0; border-bottom: 1.5px solid var(--gray-lt); align-items: flex-start; }
.fd-reco-item:last-of-type { border-bottom: none; }
.fd-reco-icon { width: 38px; height: 38px; border-radius: 9px; background: var(--green-light); color: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fd-reco-icon svg { width: 19px; height: 19px; }
.fd-reco-item h4 { font-family: var(--head); font-size: 1rem; font-weight: 700; color: var(--ink); margin: 0 0 0.2rem; }
.fd-reco-item p { font-size: 0.86rem; color: var(--gray); line-height: 1.55; margin: 0; }
.fd-reco-save { background: var(--green-light); border-radius: 12px; padding: 1.25rem 1.5rem; margin-top: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.fd-reco-save strong { font-family: var(--head); font-size: 1.9rem; font-weight: 800; color: var(--green); letter-spacing: -0.03em; white-space: nowrap; }
.fd-reco-save span { font-size: 0.88rem; color: var(--ink); line-height: 1.5; flex: 1; min-width: 200px; }
.fd-reco-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; align-items: center; }
.fd-reco-note { font-size: 0.76rem; color: var(--gray-md); margin-top: 0.9rem; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .demo-section { padding: 6rem 2.5rem; }
  .fd-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .fd-cols { grid-template-columns: 1fr; }
  .fd-side { min-height: 0; }
  .fd-finale-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 680px) {
  .demo-section { padding: 4rem 1.25rem; }
  .fd-grid { grid-template-columns: 1fr 1fr; gap: 0.7rem; }
  .fd-card { padding: 1.1rem 1rem 1rem; gap: 0.65rem; }
  .fd-card-teaser { display: none; }
  .fd-card-go { display: none; }
  .fd-card-name { font-size: 0.92rem; }
  .fd-chat { max-height: 400px; }
  .fd-msg { max-width: 92%; }
  .fd-panel { min-height: 0; }
  .fd-finale { padding: 1.75rem 1.25rem; }
  .fd-quiz { padding: 1.75rem 1.25rem; }
  .fd-quiz-opts { grid-template-columns: 1fr; }
  .fd-reco-head, .fd-reco-body { padding-left: 1.25rem; padding-right: 1.25rem; }
  .fd-stage-top { margin-bottom: 1rem; }
  .fd-ch-time em { display: none; }
}

/* Reduzierte Bewegung */
@media (prefers-reduced-motion: reduce) {
  .fd-stage, .fd-msg, .fd-finale, .fd-quiz, .fd-reco { animation: none; }
  .fd-step, .fd-step-check, .fd-card, .fd-opt { transition: none; }
  .fd-ch-dot, .fd-wave span, .fd-typing span { animation: none; }
}
