/* ==========================================================================
   PRISM — AI Chatbot Development service page (page-specific).
   Signature moment: a real, clickable chat-widget demo in the hero (visitor
   taps a question, sees a typing indicator, gets a real canned reply) plus
   floating omnichannel badges. Shared lead-funnel sections live in
   service-shared.css.
   ========================================================================== */

/* ---------------------------------------------------------------------- */
/* Hero                                                                     */
/* ---------------------------------------------------------------------- */
.chat-hero {
  background: radial-gradient(120% 85% at 50% -5%, var(--bg-alt) 0%, #F4F7FC 55%, #E9ECF0 100%);
  padding-top: clamp(2rem, 4vw, 4rem);
  padding-bottom: var(--space-section);
  position: relative;
  overflow: clip;
}
.chat-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-8);
  align-items: center;
}
.chat-hero__badge { margin-bottom: var(--space-5); }
.chat-hero__title { margin-bottom: var(--space-5); }
.chat-hero__title em {
  font-style: normal;
  font-weight: inherit;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: var(--color-secondary, #3F8DFE);
  color: var(--color-secondary, #3F8DFE);
}
.chat-hero__sub { font-size: var(--fs-lead); color: var(--ink-500); max-width: 46ch; margin-bottom: var(--space-6); }

.chat-hero .bg-mesh__blob--1 { width: 480px; height: 480px; top: -140px; right: -100px; background: var(--brand-aqua); }
.chat-hero .bg-mesh__blob--2 { width: 420px; height: 420px; bottom: -160px; left: -120px; background: var(--brand-violet); animation-delay: 4s; }

/* ---- Signature visual: live clickable chat-widget demo ---- */
.chat-hero__visual { position: relative; height: clamp(460px, 44vw, 580px); display: flex; align-items: center; justify-content: center; }

.chat-widget-badges { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.chat-widget-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ink-700);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--glass-shadow);
  animation: chatBadgeFloat 5s ease-in-out infinite;
}
.chat-widget-badge svg { width: 15px; height: 15px; color: var(--brand-indigo); flex-shrink: 0; }
[data-theme="dark"] .chat-widget-badge svg { color: var(--brand-aqua); }
.chat-widget-badge--1 { top: 1%;  left: -20px;  animation-delay: 0s; }
.chat-widget-badge--2 { top: 8%; right: -32px; animation-delay: 1.1s; }
.chat-widget-badge--3 { top: 48%; bottom: auto; left: -28px; animation-delay: 2.2s; }
.chat-widget-badge--4 { bottom: 2%; right: -24px; animation-delay: 3.3s; }
@keyframes chatBadgeFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .chat-widget-badge { animation: none; } }
@media (max-width: 560px) { .chat-widget-badge { display: none; } }

.chat-widget {
  position: relative;
  z-index: 1;
  width: min(380px, 92%);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chat-widget__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
}
.chat-widget__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-gradient);
  color: #fff;
}
.chat-widget__avatar svg { width: 18px; height: 18px; }
.chat-widget__title { font-size: 0.875rem; font-weight: 700; color: var(--ink-900); }
.chat-widget__status { display: flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; font-weight: 500; color: var(--ink-500); margin-top: 1px; }
.chat-widget__status .dot { width: 7px; height: 7px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 3px rgba(52,211,153,0.25); flex-shrink: 0; }

.chat-widget__log {
  min-height: 210px;
  max-height: 210px;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  scrollbar-width: thin;
}
.chat-bubble {
  max-width: 88%;
  padding: 0.65rem 0.95rem;
  border-radius: 14px;
  font-size: 0.8125rem;
  line-height: 1.45;
  animation: fadeIn var(--dur-slow) var(--ease-out);
}
.chat-bubble--in { background: var(--bg-alt); border: 1px solid var(--border); color: var(--ink-700); border-bottom-left-radius: 4px; }
.chat-bubble--out { background: var(--brand-gradient); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble--typing { display: flex; align-items: center; gap: 4px; padding: 0.8rem 1rem; }
.chat-bubble--typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-300); animation: chatTypingDot 1.2s ease-in-out infinite; }
.chat-bubble--typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble--typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatTypingDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .chat-bubble--typing span { animation: none; opacity: 0.6; } }

.chat-widget__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5) var(--space-5);
  border-top: 1px solid var(--border);
}
.chat-chip {
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-indigo);
  background: var(--brand-gradient-soft);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
[data-theme="dark"] .chat-chip { color: var(--brand-aqua); }
.chat-chip:hover { transform: translateY(-2px); }
.chat-chip:disabled { opacity: 0.5; cursor: default; transform: none; }
.chat-chip--reset { color: #fff; background: var(--brand-gradient); }
[data-theme="dark"] .chat-chip--reset { color: #fff; }

@media (max-width: 1024px) {
  .chat-hero__grid { grid-template-columns: 1fr; }
  .chat-hero__visual { height: clamp(420px, 78vw, 500px); margin-top: var(--space-6); }
}

/* ---------------------------------------------------------------------- */
/* Omnichannel proof band — same dark-glass family as the demo-band, but   */
/* shows channel tiles instead of a single external-link CTA (this page's  */
/* "try it" moment already lives in the hero, so this section proves reach */
/* instead of repeating the demo).                                         */
/* ---------------------------------------------------------------------- */
.channel-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.75rem, 4vw, 3rem);
  text-align: center;
  background: #06101E; border: 1px solid rgba(161, 200, 243, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 20px 40px -15px rgba(0,0,0,0.5);
}
.channel-band__inner { position: relative; z-index: 1; max-width: 640px; margin-inline: auto; margin-bottom: var(--space-8); }
.channel-band__eyebrow { justify-content: center; color: rgba(255,255,255,0.7); margin-bottom: var(--space-4); }
.channel-band__eyebrow::before { background: var(--brand-gradient); }
.channel-band__title { color: #fff; margin-bottom: var(--space-4); }
.channel-band__sub { color: rgba(255,255,255,0.65); }

.channel-band__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  max-width: 760px;
  margin-inline: auto;
}
.channel-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-3);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform var(--dur-base) var(--ease-spring), background var(--dur-base) var(--ease-out);
}
.channel-tile:hover { transform: translateY(-4px); background: rgba(255,255,255,0.07); }
.channel-tile__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-gradient);
  color: #fff;
}
.channel-tile__icon svg { width: 22px; height: 22px; }
.channel-tile__name { font-size: 0.875rem; font-weight: 600; color: #fff; }

@media (max-width: 640px) { .channel-band__grid { grid-template-columns: repeat(2, 1fr); } }
.channel-band__note { position: relative; z-index: 1; max-width: 640px; margin: var(--space-6) auto 0; font-size: 0.875rem; line-height: 1.6; color: rgba(255,255,255,0.65); }

[data-theme="dark"] .chat-hero {
  background: radial-gradient(120% 80% at 50% -10%, #0c1524 0%, #06101E 50%, #030812 100%);
}

.chat-hero .bg-mesh__blob--1 {
  background: radial-gradient(circle, rgba(63, 141, 254, 0.24) 0%, rgba(161, 200, 243, 0.1) 60%, transparent 80%);
}
.chat-hero .bg-mesh__blob--2 {
  background: radial-gradient(circle, rgba(161, 200, 243, 0.3) 0%, rgba(233, 236, 240, 0.15) 60%, transparent 80%);
}
[data-theme="dark"] .chat-hero .bg-mesh__blob--1 {
  background: radial-gradient(circle, rgba(63, 141, 254, 0.22) 0%, transparent 75%);
}
[data-theme="dark"] .chat-hero .bg-mesh__blob--2 {
  background: radial-gradient(circle, rgba(161, 200, 243, 0.15) 0%, transparent 75%);
}

/* Capabilities Section Head - 1-Line Heading & 2-Line Subtext */
.svc-capabilities .section__head,
.section:has(.capability-grid) .section__head {
  max-width: 1120px;
}
.svc-capabilities .section__lead,
.section:has(.capability-grid) .section__lead {
  max-width: 66ch;
}
