/*
 * AI Agents page — scoped styles. Loaded only on /ai-agents/.
 *
 * The theme's main.css already provides :root tokens, .code-bg + .tok-*,
 * .container and .eyebrow, so those are NOT redefined here. This file adds
 * only what the AI Agent Showcase needs: the JetBrains Mono face, the extra
 * CSS variables (scoped to the page wrapper), the grid/filter/modal
 * components, and their keyframes.
 */

/* JetBrains Mono — latin subset, single variable-weight file (400..700). */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* Variables the design uses that the theme's :root lacks. Scoped to the page
   wrapper so global theme tokens are untouched. */
.page-ai-agents {
  --surface-2: #1c222c;
  --section-alt: #161b22;
  --good: #3fb950;
  --blue: #7c9fff;
  --purple: #b78cff;
  --mono: "JetBrains Mono", "SF Mono", "Menlo", monospace;
}

/* ── Grid card ─────────────────────────────────────────── */
.page-ai-agents .ag-card {
  text-align: left;
  cursor: pointer;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 188px;
}

.page-ai-agents .ag-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 22px 50px -34px rgba(0, 0, 0, .8);
}

.page-ai-agents .ag-card:hover .ag-open {
  opacity: 1;
  transform: none;
}

.page-ai-agents .ag-open {
  opacity: 0;
  transform: translateX(-4px);
  transition: all .18s ease;
}

/* ── Filter pill ───────────────────────────────────────── */
.page-ai-agents .fpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 700;
  font-family: "Noto Sans", sans-serif;
  transition: all .18s ease;
}

.page-ai-agents .fpill:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.page-ai-agents .fpill.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 9, 14, .74);
  backdrop-filter: blur(7px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
  overflow-y: auto;
  animation: overlayIn .2s ease;
}

.modal-panel {
  width: 100%;
  max-width: 1080px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 60px 140px -50px rgba(0, 0, 0, .9);
  animation: modalIn .32s cubic-bezier(.2, .7, .3, 1);
}

/* Scrollbars inside mocks */
.mock-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.mock-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 8px;
}

@media (width <= 900px) {
  .modal-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Animations ────────────────────────────────────────── */
@keyframes agentFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes agSpin {
  to { transform: rotate(360deg); }
}

@keyframes agWave {
  from { transform: scaleY(.35); }
  to { transform: scaleY(1); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.7); }
}

@keyframes cardUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes caretBlink {
  50% { opacity: 0; }
}
