/* Week 3 — Frontdesk-style product showcase */
.product-motion {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
  background: linear-gradient(180deg, #FAFAFF 0%, #fff 42%, #FDF4FF 100%);
}
.product-motion::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, 115vw);
  height: 480px;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.16) 0%, rgba(99, 102, 241, 0.1) 38%, rgba(240, 171, 252, 0.06) 58%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}
.product-motion::after {
  content: '';
  position: absolute;
  bottom: -80px;
  right: -120px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.12) 0%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}
.product-motion > .container {
  position: relative;
  z-index: 1;
}
.motion-showcase {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

/* Tab bar */
.motion-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #FAFAFB;
  margin-bottom: 36px;
}
.motion-tab {
  position: relative;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s, background 0.25s;
}
.motion-tab:hover { color: var(--text); }
.motion-tab.active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04);
}
.motion-tab.active::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 99px;
  background: #14B8A6;
  transition: width 0.35s ease;
}
.motion-showcase.is-auto-cycling .motion-tab.active::after {
  animation: tabProgress var(--tab-dwell, 3s) linear forwards;
}
@keyframes tabProgress {
  from { width: 28px; opacity: 1; }
  to { width: 100%; max-width: 120px; opacity: 0.85; }
}

.motion-tab-hero { margin-bottom: 40px; }
.motion-tab-hero h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}
.motion-tab-hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Stage container */
.motion-stage {
  position: relative;
  min-height: 420px;
  border-radius: 28px;
}
.motion-stage::before {
  content: '';
  position: absolute;
  inset: -24px -16px;
  background: radial-gradient(ellipse at 50% 40%, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.06) 45%, transparent 72%);
  pointer-events: none;
  z-index: 0;
  border-radius: 32px;
}
.motion-stage > .motion-panel {
  position: relative;
  z-index: 1;
}
.motion-panel {
  display: none;
  animation: motionFadeIn 0.4s ease;
}
.motion-panel.active { display: block; }
@keyframes motionFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.motion-foot {
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-muted);
}
.motion-foot a { color: var(--primary); font-weight: 600; }

/* ── CRM Kanban (Frontdesk-style) ── */
.kanban-shell {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 24px;
  padding: 20px;
  box-shadow:
    0 24px 48px rgba(79, 70, 229, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 0 100px rgba(139, 92, 246, 0.1);
  backdrop-filter: blur(8px);
}
.kanban-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  min-height: 380px;
}
@media (max-width: 768px) {
  .kanban-board { grid-template-columns: 1fr; min-height: auto; }
  .kanban-float { display: none !important; }
}
.kanban-col {
  background: rgba(255,255,255,0.55);
  border-radius: 16px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 340px;
}
.kanban-col-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  padding: 0 4px 8px;
}
.kanban-col-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.kanban-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  transition: opacity 0.35s, transform 0.35s, box-shadow 0.35s;
}
.kanban-card.is-dim { opacity: 0.45; }
.kanban-card.is-hidden { opacity: 0; transform: scale(0.96); pointer-events: none; height: 0; padding: 0; margin: 0; overflow: hidden; border: none; }

.kanban-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.kanban-card-main { flex: 1; min-width: 0; }
.kanban-card-main strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text);
}
.kanban-card-main .kanban-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.35;
}
.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-light);
}
.kanban-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.kanban-source svg { width: 12px; height: 12px; opacity: 0.7; }

/* Floating card animation */
.kanban-float {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(33.333% - 20px);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transform: translate(0, 0) scale(1);
  transition: opacity 0.4s ease, transform 0.7s cubic-bezier(0.34, 1.15, 0.64, 1), left 0.7s cubic-bezier(0.34, 1.15, 0.64, 1), top 0.7s cubic-bezier(0.34, 1.15, 0.64, 1);
}
.kanban-float.is-visible { opacity: 1; }
.kanban-float .kanban-card {
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  transform: scale(1.02);
}

/* ── Voice AI panel ── */
.voice-shell {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 24px;
  padding: 24px;
  text-align: left;
  box-shadow:
    0 24px 48px rgba(79, 70, 229, 0.08),
    0 0 100px rgba(139, 92, 246, 0.1);
  backdrop-filter: blur(8px);
}
.demo-side-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-muted);
}
.motion-demo-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .motion-demo-layout { grid-template-columns: 1fr; }
}
.industry-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
@media (max-width: 900px) {
  .industry-picker-grid { grid-template-columns: repeat(2, 1fr); max-height: none; }
}
.industry-pick {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.industry-pick.is-auto-highlight {
  border-color: #14B8A6;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}
.industry-pick:hover { border-color: var(--primary); }
.industry-pick.active {
  background: #EEF2FF;
  border-color: var(--primary);
  color: var(--primary-dark);
}
.call-demo-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: #FAFAFB;
}
.call-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}
.call-demo-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}
.call-demo-wave span {
  width: 3px;
  border-radius: 2px;
  background: var(--primary);
  animation: demoEq 0.9s ease-in-out infinite alternate;
}
.call-demo-wave span:nth-child(2) { animation-delay: 0.1s; height: 14px; }
.call-demo-wave span:nth-child(3) { animation-delay: 0.2s; height: 8px; }
.call-demo-wave span:nth-child(4) { animation-delay: 0.15s; height: 16px; }
.call-demo-wave span:nth-child(5) { animation-delay: 0.25s; height: 10px; }
.call-demo-wave.paused span { animation: none; height: 4px !important; opacity: 0.35; }
@keyframes demoEq {
  from { height: 6px; opacity: 0.5; }
  to { height: 18px; opacity: 1; }
}
.call-demo-steps { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.call-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  opacity: 0.45;
  transition: opacity 0.35s, border-color 0.35s, background 0.35s;
}
.call-step.active {
  opacity: 1;
  background: #fff;
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.call-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #EEF2FF;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.call-step.active .call-step-num {
  background: var(--primary);
  color: #fff;
}
.call-step-body strong { display: block; font-size: 13px; margin-bottom: 2px; }
.call-step-body p { font-size: 12px; color: var(--text-muted); line-height: 1.45; margin: 0; }
.call-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.call-demo-actions .btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
}

/* ── Automations workflow ── */
.workflow-shell {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 24px;
  padding: 24px 28px 32px;
  text-align: left;
  box-shadow:
    0 24px 48px rgba(79, 70, 229, 0.08),
    0 0 100px rgba(139, 92, 246, 0.1);
  backdrop-filter: blur(8px);
}
.workflow-breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.workflow-breadcrumb strong { color: var(--text); font-weight: 600; }
.workflow-canvas {
  position: relative;
  background-color: #FAFAFB;
  background-image: radial-gradient(circle, #D1D5DB 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-height: 360px;
}
.wf-node {
  position: relative;
  width: min(100%, 280px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  opacity: 0.55;
  transform: translateY(4px);
  transition: opacity 0.45s, transform 0.45s, box-shadow 0.45s, border-color 0.45s;
}
.wf-node.active {
  opacity: 1;
  transform: none;
  border-color: #C7D2FE;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}
.wf-node-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  margin-bottom: 8px;
}
.wf-node-icon.trigger { background: #ECFDF5; color: #059669; }
.wf-node-icon.ai { background: #EDE9FE; color: #7C3AED; }
.wf-node-icon.branch { background: #EEF2FF; color: #4F46E5; }
.wf-node-icon.book { background: #DBEAFE; color: #2563EB; }
.wf-node-icon.sms { background: #FCE7F3; color: #DB2777; }
.wf-node strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.wf-node > span:not(.wf-status) {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.wf-status {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}
.wf-status.ok { background: #ECFDF5; color: #059669; }
.wf-status.sent { background: #EDE9FE; color: #7C3AED; }
.wf-connector {
  width: 2px;
  height: 28px;
  background: linear-gradient(180deg, #D1D5DB, #E5E7EB);
  flex-shrink: 0;
}
.wf-connector.short { height: 20px; }
.wf-branches {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  width: 100%;
  max-width: 620px;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .wf-branches { grid-template-columns: 1fr; }
}
.wf-branch-path {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wf-branch-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 6px;
}
.wf-outcome { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .kanban-card, .kanban-float, .call-step, .wf-node, .motion-panel {
    transition: none !important;
    animation: none !important;
  }
  .kanban-float { display: none !important; }
  .wf-node { opacity: 1; transform: none; }
}
