/* Allveltro — AI section: feature list, process graph and chat demos. */

/* ---------- AI ---------- */

.ai {
  overflow: hidden;
  overflow: clip; /* clip, unlike hidden, keeps .ai-demos sticky to the viewport */
}
.ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.ai-features {
  display: grid;
  counter-reset: feature;
}
.ai-feature {
  display: grid;
  align-content: start;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 4px 16px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
}
.ai-feature:last-child {
  border-bottom: 1px solid var(--line);
}
.ai-feature::before {
  counter-increment: feature;
  content: counter(feature, decimal-leading-zero);
  grid-row: span 3;
  padding-top: 3px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent);
}
.ai-feature p {
  max-width: 68ch;
  font-size: 0.9688rem;
  color: var(--muted);
}
.ai-feature .ai-example {
  margin-top: 6px;
  font-size: 0.875rem;
  color: var(--muted);
  padding-left: 12px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
}
.ai-demos {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}
.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-l);
  border: 1px solid var(--line);
  background: var(--surface);
}
.demo-note {
  font-size: 0.8438rem;
  line-height: 1.5;
  color: var(--muted);
}
.demo figcaption {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
/* Process graph: nodes joined by a line top to bottom; the LLM step is the lit one */
.flow {
  display: grid;
  justify-items: start;
}
.flow li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.flow li + li::before {
  content: "";
  width: 1px;
  height: 14px;
  margin-left: 21px;
  background: var(--line-strong);
}
.node {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--raised);
  max-width: 100%;
  font-size: 0.8438rem;
  font-weight: 500;
}
.node .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}
.node-edge {
  border-radius: 999px;
  color: var(--muted);
}
.node-llm {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--raised));
  color: var(--fg);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent);
}
.node-llm .icon {
  color: var(--accent);
}
/* Chat demo */
.chat {
  display: grid;
  gap: 12px;
}
.bubble {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9062rem;
  line-height: 1.55;
}
.bubble-user {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: var(--raised);
  border: 1px solid var(--line);
}
.bubble-bot {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  max-width: 100%;
  padding: 0;
}
.bot-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}
.bot-mark {
  width: 16px;
  height: 16px;
  color: var(--fg);
}
.bubble-bot p {
  padding-top: 3px;
}
@media (max-width: 1080px) {
  .ai-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .ai-demos {
    position: static;
  }
}
