/* ========================================
   CANTUM — Solution Cards Animations
   ======================================== */

/* === 1. Stagger Fade-up: initial hidden state === */
.card--hidden {
  opacity: 0;
  transform: translateY(20px);
}

/* === 2. Hover-Lift === */
.grid-solutions-5 .product-card {
  cursor: pointer;
  will-change: transform;
  transition: transform 300ms ease-out, box-shadow 300ms ease-out;
}

.grid-solutions-5 .product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
}

.grid-solutions-5 .product-card .product-card-visual {
  transition: filter 300ms ease-out;
}

.grid-solutions-5 .product-card:hover .product-card-visual {
  filter: brightness(1.15);
}

.grid-solutions-5 .product-card .card-link svg {
  transition: transform 300ms ease-out;
}

.grid-solutions-5 .product-card:hover .card-link svg {
  transform: translateX(4px);
}

/* === 3. Animated Gradient Sweep keyframe === */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === Reduced Motion: disable all three animations === */
@media (prefers-reduced-motion: reduce) {
  .card--hidden {
    opacity: 1 !important;
    transform: none !important;
  }
  .grid-solutions-5 .product-card,
  .grid-solutions-5 .product-card .product-card-visual,
  .grid-solutions-5 .product-card .card-link svg {
    transition: none !important;
    animation: none !important;
  }
  .grid-solutions-5 .product-card:hover {
    transform: none !important;
  }
  .ki-lang-track {
    animation: none !important;
  }
}

/* ========================================
   KI DEMO SECTION — Dark Theme
   ======================================== */

#ki-demo { background: #0A0A0A; }

/* Überschriften in der dark section */
#ki-demo .section-label,
#ki-demo h2 { color: #F7F7F5; }

.ki-demo-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.ki-demo-study-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(74,127,193,0.12);
  border: 1px solid rgba(74,127,193,0.3);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4A7FC1;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Stats Row — 4-spaltig */
.ki-stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 28px;
  background: rgba(255,255,255,0.06);
}

.ki-stat-card {
  background: #141414;
  padding: 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ki-stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: #F7F7F5;
  letter-spacing: -0.03em;
  line-height: 1;
}

.ki-stat-unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: rgba(247,247,245,0.45);
  margin-left: 3px;
}

.ki-stat-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ki-stat-label {
  font-size: 0.78rem;
  color: rgba(247,247,245,0.5);
  font-weight: 500;
}

.ki-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

.ki-badge-green { background: rgba(34,197,94,0.12); color: #22c55e; }
.ki-badge-blue  { background: rgba(74,127,193,0.15); color: #4A7FC1; }

/* Main Layout — Chat links, Sidebar rechts */
.ki-demo-main {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

/* Chat Card */
.ki-chat-card {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 40px rgba(0,0,0,0.4);
}

.ki-chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: #111111;
}

.ki-chat-label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(247,247,245,0.4);
  text-transform: uppercase;
}

.ki-live-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.28);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ef4444;
  letter-spacing: 0.06em;
}

.ki-live-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.75); }
}

/* Caller Row */
.ki-caller-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #111111;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ki-caller-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(74,127,193,0.15);
  border: 1px solid rgba(74,127,193,0.3);
  color: #4A7FC1;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ki-caller-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ki-caller-info strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: #F7F7F5;
}

.ki-caller-info small {
  font-size: 0.75rem;
  color: rgba(247,247,245,0.4);
}

.ki-timer {
  font-size: 1rem;
  font-weight: 800;
  color: #4A7FC1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

/* Messages */
.ki-messages {
  padding: 20px;
  min-height: 280px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #141414;
}

.ki-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: kiMsgIn 0.3s cubic-bezier(0.16,1,0.3,1) forwards;
  opacity: 0;
}

@keyframes kiMsgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.ki-msg-role {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(247,247,245,0.35);
}

.ki-msg.ki .ki-msg-role { color: #4A7FC1; opacity: 1; }
.ki-msg.sie { align-items: flex-end; }
.ki-msg.sie .ki-msg-role { color: rgba(247,247,245,0.4); }

.ki-msg-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #F7F7F5;
  max-width: 82%;
}

.ki-msg.ki .ki-msg-bubble {
  background: rgba(74,127,193,0.14);
  border: 1px solid rgba(74,127,193,0.28);
  border-bottom-left-radius: 4px;
}

.ki-msg.sie .ki-msg-bubble {
  background: #1C1C1E;
  border: 1px solid rgba(255,255,255,0.09);
  border-bottom-right-radius: 4px;
}

/* Footer */
.ki-chat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: #111111;
}

.ki-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: rgba(247,247,245,0.45);
}

.ki-typing-dot {
  width: 5px;
  height: 5px;
  background: rgba(247,247,245,0.5);
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
  opacity: 0.4;
}
.ki-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.ki-typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30%            { transform: translateY(-4px); opacity: 0.8; }
}

.ki-voice { font-size: 0.72rem; color: #22c55e; font-weight: 500; }

/* Sidebar */
.ki-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ki-sidebar-card {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.3);
}

.ki-sidebar-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(247,247,245,0.4);
  text-transform: uppercase;
  margin-bottom: 16px !important;
}

.ki-status-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ki-status-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.83rem;
}

.ki-status-list li span:nth-child(2) { flex: 1; color: rgba(247,247,245,0.55); }
.ki-status-list li strong { color: #F7F7F5; font-weight: 600; }

.ki-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ki-status-dot.green { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }

.ki-result-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ki-result-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.83rem;
}

.ki-result-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: #4A7FC1;
  letter-spacing: -0.02em;
  min-width: 64px;
}

.ki-result-list li > span:last-child { color: rgba(247,247,245,0.55); }

/* Sprachenleiste Slider */
.ki-languages {
  margin-top: 0;
  padding: 32px 0 36px;
  background: #111111;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.ki-languages-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(247,247,245,0.3);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 24px;
}

.ki-lang-slider {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.ki-lang-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: langScroll 35s linear infinite;
  will-change: transform;
}

.ki-lang-slider:hover .ki-lang-track {
  animation-play-state: paused;
}

@keyframes langScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(calc(-100% / 3)); }
}

.ki-lang-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.ki-lang-flag {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}

.ki-lang-item:hover .ki-lang-flag {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.6);
}

.ki-lang-item span {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .ki-demo-main { grid-template-columns: 1fr; }
  .ki-stat-row  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .ki-demo-header { flex-direction: column; align-items: flex-start; }
  .ki-stat-row  { grid-template-columns: 1fr 1fr; }
  .ki-lang-flag { width: 52px; height: 52px; font-size: 1.6rem; }
}
