/* =========================================================
   Services — bento grid
   ========================================================= */

.services-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: end;
  margin-bottom: 4rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.services-head .eyebrow { margin-bottom: 1.2rem; }
.services-head p { color: var(--text-soft); line-height: 1.65; max-width: 48ch; }

/* Bento grid */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 14px;
}

.bento-card {
  position: relative;
  padding: 1.8rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: none;
  transition: transform var(--t-norm), border-color var(--t-norm), background var(--t-norm);
}
.bento-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bright);
}

/* Spotlight */
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx, -100%) var(--my, -100%), var(--glow, rgba(255, 84, 54, 0.15)), transparent 40%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-norm);
  z-index: 0;
}
.bento-card:hover::before { opacity: 1; }

.bento-card > * { position: relative; z-index: 1; }

.bento-card .num {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}
.bento-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.2vw, 2.4rem);
  line-height: 1;
  letter-spacing: 0.005em;
  color: var(--text);
}
.bento-card p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-soft);
}
.bento-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.bento-card .tags span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.03);
}

/* Header row in each card */
.bento-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.bento-head .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.2rem;
}
.bento-card.is-blue .icon  { background: rgba(77, 127, 255, 0.18); color: var(--accent-2); border-color: rgba(77, 127, 255, 0.35); }
.bento-card.is-coral .icon { background: rgba(255, 84, 54, 0.18); color: var(--accent); border-color: rgba(255, 84, 54, 0.35); }
.bento-card.is-cyan .icon  { background: rgba(0, 229, 255, 0.18); color: var(--accent-3); border-color: rgba(0, 229, 255, 0.35); }
.bento-card.is-yellow .icon{ background: rgba(255, 214, 10, 0.18); color: var(--accent-4); border-color: rgba(255, 214, 10, 0.35); }
.bento-card.is-purple .icon{ background: rgba(176, 102, 255, 0.18); color: var(--accent-5); border-color: rgba(176, 102, 255, 0.35); }
.bento-card.is-green .icon { background: rgba(0, 214, 143, 0.18); color: var(--accent-6); border-color: rgba(0, 214, 143, 0.35); }

.bento-card.is-blue   { --glow: rgba(77, 127, 255, 0.22); }
.bento-card.is-coral  { --glow: rgba(255, 84, 54, 0.22); }
.bento-card.is-cyan   { --glow: rgba(0, 229, 255, 0.22); }
.bento-card.is-yellow { --glow: rgba(255, 214, 10, 0.18); }
.bento-card.is-purple { --glow: rgba(176, 102, 255, 0.22); }
.bento-card.is-green  { --glow: rgba(0, 214, 143, 0.22); }

/* Bento spans */
.bento-card.span-4 { grid-column: span 4; }
.bento-card.span-3 { grid-column: span 3; }
.bento-card.span-2 { grid-column: span 2; }
.bento-card.tall   { grid-row: span 2; }

/* Featured big card — chatbots */
.bento-card.feature {
  grid-column: span 4;
  grid-row: span 2;
  background:
    radial-gradient(circle at 90% 0%, rgba(255, 84, 54, 0.18), transparent 40%),
    linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%);
}
.bento-card.feature h3 {
  font-size: clamp(2.4rem, 3.6vw, 3.4rem);
}

/* Mini chart inside cards */
.mini-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 50px;
  margin-top: 1rem;
}
.mini-bars span {
  flex: 1;
  background: linear-gradient(180deg, var(--accent), rgba(255, 84, 54, 0.2));
  border-radius: 3px 3px 0 0;
  animation: bar-rise 1s var(--ease-out) backwards;
}
.mini-bars span:nth-child(1) { height: 30%; animation-delay: 50ms; }
.mini-bars span:nth-child(2) { height: 55%; animation-delay: 100ms; }
.mini-bars span:nth-child(3) { height: 40%; animation-delay: 150ms; }
.mini-bars span:nth-child(4) { height: 75%; animation-delay: 200ms; }
.mini-bars span:nth-child(5) { height: 90%; animation-delay: 250ms; }
.mini-bars span:nth-child(6) { height: 65%; animation-delay: 300ms; }
.mini-bars span:nth-child(7) { height: 100%; animation-delay: 350ms; }

.bento-card.is-blue .mini-bars span { background: linear-gradient(180deg, var(--accent-2), rgba(77, 127, 255, 0.2)); }
.bento-card.is-cyan .mini-bars span { background: linear-gradient(180deg, var(--accent-3), rgba(0, 229, 255, 0.2)); }

/* Flow diagram inside CRM card */
.flow-nodes {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.flow-nodes .node {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.03);
}
.flow-nodes .arr { color: var(--accent); font-size: 0.7rem; }

/* Floating "live" chip in feature card */
.bento-card.feature .float-chip {
  position: absolute;
  top: 1.4rem;
  right: 1.4rem;
}
