/* ============================================================
   ZEREBRA WEBSITE — component layer
   Built ON TOP of the design system: link ../styles.css first for
   tokens (colors, type, spacing, motion) + base helpers
   (.zb-eyebrow, .zb-cite). This file adds the production CSS
   components the marketing site needs. Tailwind (Play CDN) handles
   layout utilities in the markup; brand components live here.
   ============================================================ */

/* ---------- Layout ---------- */
.container { max-width: var(--container-wide); margin-inline: auto; padding-inline: var(--space-06); }
.section { padding-block: var(--section-y); }
@media (max-width: 640px) { .section { padding-block: var(--space-10); } }

.eyebrow { /* alias of .zb-eyebrow, available everywhere */
  font: var(--type-eyebrow); letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase; color: var(--accent-strong);
  display: inline-flex; align-items: center; gap: var(--space-03);
}
.eyebrow::before { content: ''; width: 1.25rem; height: 2px; background: currentColor; }
.eyebrow--on-dark { color: var(--teal-30); }

/* ---------- Type helpers ---------- */
.display { font-family: var(--font-sans); font-weight: var(--weight-light); letter-spacing: var(--tracking-tight); line-height: 1.08; }
.lead { font-size: var(--size-18); line-height: var(--leading-body); color: var(--text-secondary); text-wrap: pretty; }
.prose { color: var(--text-secondary); font-size: var(--size-16); line-height: var(--leading-loose); text-wrap: pretty; }
.prose p { margin: 0 0 var(--space-05); }
.prose strong { color: var(--text-primary); font-weight: var(--weight-semibold); }

/* ---------- Buttons (match DS Button) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: space-between;
  gap: var(--space-09); min-height: var(--control-lg);
  padding: 0 var(--space-05); font-family: var(--font-sans);
  font-weight: var(--weight-medium); font-size: var(--size-16);
  border: 1px solid transparent; border-radius: var(--radius-none);
  cursor: pointer; text-decoration: none; box-sizing: border-box;
  transition: var(--transition-button); white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn iconify-icon { font-size: 1.1em; flex: 0 0 auto; }
.btn--sm { min-height: var(--control-md); font-size: var(--size-14); gap: var(--space-06); }
.btn--xl { min-height: var(--control-xl); padding-inline: var(--space-06); }
.btn--full { width: 100%; }

.btn--primary { background: var(--button-primary); color: var(--text-on-color); }
.btn--primary:hover { background: var(--button-primary-hover); color: var(--text-on-color); }
.btn--primary:active { background: var(--button-primary-active); }

.btn--secondary { background: var(--button-secondary); color: var(--text-on-color); }
.btn--secondary:hover { background: var(--button-secondary-hover); color: var(--text-on-color); }

.btn--tertiary { background: transparent; color: var(--interactive); border-color: var(--interactive); }
.btn--tertiary:hover { background: var(--interactive); color: var(--text-on-color); }

.btn--ghost { background: transparent; color: var(--interactive); }
.btn--ghost:hover { background: var(--blue-10); }

/* on dark grounds, tertiary turns light */
.on-dark .btn--tertiary { color: #fff; border-color: rgba(255,255,255,.4); }
.on-dark .btn--tertiary:hover { background: #fff; color: var(--gray-100); border-color: #fff; }

/* ---------- Cards / tiles ---------- */
.card {
  background: var(--layer-02); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-none); padding: var(--space-07); box-sizing: border-box;
}
.card--accent { border-top: var(--border-accent) solid var(--accent); }
.card--accent-blue { border-top: var(--border-accent) solid var(--interactive); }
.card--link { transition: var(--transition-base); text-decoration: none; color: inherit; display: block; }
.card--link:hover { outline: 1px solid var(--border-interactive); outline-offset: -1px; box-shadow: var(--shadow-sm); }

.card-icon { color: var(--accent-strong); font-size: 28px; display: block; }

/* ---------- Tags ---------- */
.tag {
  display: inline-flex; align-items: center; gap: var(--space-02);
  height: 24px; padding: 0 var(--space-03);
  font: var(--type-caption); font-weight: var(--weight-medium);
  border-radius: var(--radius-none); white-space: nowrap;
}
.tag--gray { background: var(--gray-20); color: var(--gray-100); }
.tag--blue { background: var(--blue-20); color: var(--blue-90); }
.tag--teal { background: var(--teal-20); color: var(--teal-90); }
.tag--outline { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-strong); }

/* ---------- Citation chip (alias of .zb-cite) ---------- */
.citation {
  font: var(--type-eyebrow); letter-spacing: var(--tracking-mono); text-transform: none;
  color: var(--text-secondary); background: var(--layer-01);
  border: 1px solid var(--border-subtle); border-left: var(--border-accent) solid var(--accent);
  padding: 2px var(--space-03) 2px var(--space-04);
  display: inline-flex; align-items: center; gap: var(--space-02); white-space: nowrap; text-decoration: none;
}
.citation .src { color: var(--text-primary); }
.citation .loc { color: var(--text-helper); }

/* ---------- Notification (inline) ---------- */
.note { display: flex; gap: var(--space-04); padding: var(--space-05); border-left: 3px solid var(--support-info); background: #edf5ff; }
.note__dot { width: 8px; height: 8px; margin-top: 6px; flex: 0 0 auto; border-radius: var(--radius-pill); background: var(--support-info); }
.note--success { border-color: var(--support-success); background: #defbe6; }
.note--success .note__dot { background: var(--support-success); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 40; background: var(--white);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__inner {
  max-width: var(--container-wide); margin-inline: auto; padding-inline: var(--space-06);
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-06);
}
.nav__brand { display: flex; align-items: center; gap: var(--space-03); text-decoration: none; }
.nav__brand:hover { text-decoration: none; }

/* The Zerebra wordmark — square-set IBM Plex SemiBold with the teal full-stop. */
.brand-word { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--size-20); line-height: 1; letter-spacing: -0.03em; color: var(--text-primary); white-space: nowrap; }
.brand-word .dot { color: var(--accent); }
.nav__brand .brand-word { color: var(--text-primary); }
.nav__links { display: flex; align-items: center; gap: var(--space-07); }
.nav__link { font-family: var(--font-sans); font-size: var(--size-14); color: var(--text-secondary); text-decoration: none; white-space: nowrap; transition: color var(--duration-fast-02) var(--ease-productive-standard); }
.nav__link:hover { color: var(--text-primary); text-decoration: none; }
.nav__link[aria-current="page"] { color: var(--text-primary); font-weight: var(--weight-medium); }
.nav__actions { display: flex; align-items: center; gap: var(--space-03); }
.nav__signin { font-family: var(--font-sans); font-size: var(--size-14); color: var(--text-secondary); text-decoration: none; padding-inline: var(--space-03); }
.nav__signin:hover { color: var(--text-primary); }
.nav__burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; background: transparent; border: none; cursor: pointer; color: var(--text-primary); font-size: 22px; }

.nav__mobile { display: none; border-top: 1px solid var(--border-subtle); background: var(--white); }
.nav__mobile a { display: block; padding: var(--space-04) var(--space-06); font-size: var(--size-16); color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--border-subtle); }
.nav__mobile.open { display: block; }

@media (max-width: 900px) {
  .nav__links, .nav__signin { display: none; }
  .nav__burger { display: inline-flex; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--white); border-top: 1px solid var(--border-subtle); }
.footer__top { max-width: var(--container-wide); margin-inline: auto; padding: var(--space-10) var(--space-06); display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-08); }
.footer h4 { font: var(--type-eyebrow); text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--gray-50); margin: 0 0 var(--space-05); }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-03); }
.footer a { font-family: var(--font-sans); font-size: var(--size-14); color: var(--text-secondary); text-decoration: none; }
.footer a:hover { color: var(--text-primary); }
.footer__tagline { font-size: var(--size-14); color: var(--text-helper); max-width: 20rem; line-height: var(--leading-body); margin-top: var(--space-04); }
.footer__bottom { border-top: 1px solid var(--border-subtle); }
.footer__bottom-inner { max-width: var(--container-wide); margin-inline: auto; padding: var(--space-05) var(--space-06); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-03); }
.footer__legal { font-size: 13px; color: var(--gray-50); }
.footer__strip { font-family: var(--font-mono); font-size: var(--size-12); color: var(--gray-40); }
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr 1fr; gap: var(--space-07); } }

/* ============================================================
   MODAL (Book a demo)
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: var(--space-06); background: rgba(22,22,22,.7); }
.modal.open { display: flex; }
.modal__panel { background: var(--white); width: 100%; max-width: 30rem; border-top: 3px solid var(--interactive); box-shadow: var(--shadow-lg); }
.modal__head { display: flex; align-items: flex-start; justify-content: space-between; padding: var(--space-07) var(--space-07) 0; }
.modal__close { background: transparent; border: none; cursor: pointer; color: var(--text-secondary); font-size: 22px; line-height: 1; padding: 4px; }
.modal__close:hover { color: var(--text-primary); }
.modal form { padding: var(--space-05) var(--space-07) var(--space-07); display: flex; flex-direction: column; gap: var(--space-05); }
.modal__success { padding: var(--space-09) var(--space-07); text-align: center; }

/* ---------- Fields (match DS Input/Select) ---------- */
.field { display: flex; flex-direction: column; gap: var(--space-03); }
.field label { font: var(--type-label); color: var(--text-secondary); }
.field input, .field select {
  height: var(--control-lg); padding: 0 var(--space-05); font: var(--type-body); color: var(--text-primary);
  background: var(--field); border: none; border-bottom: 1px solid var(--border-strong);
  border-radius: var(--radius-none); box-sizing: border-box; width: 100%; appearance: none;
}
.field select { padding-right: var(--space-08); background-image: linear-gradient(45deg, transparent 50%, var(--gray-100) 50%), linear-gradient(135deg, var(--gray-100) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.field input:focus, .field select:focus { outline: 2px solid var(--focus); outline-offset: -2px; border-bottom-color: var(--border-interactive); }
.checkbox { display: inline-flex; align-items: flex-start; gap: var(--space-04); font: var(--type-body-compact); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--blue-60); }

/* ============================================================
   TABS (use-case filtering)
   ============================================================ */
.tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--border-subtle); }
.tab {
  appearance: none; background: transparent; border: none; cursor: pointer; white-space: nowrap;
  padding: var(--space-04) var(--space-05); font-family: var(--font-sans); font-size: var(--size-14);
  font-weight: var(--weight-medium); color: var(--text-secondary);
  border-bottom: 2px solid transparent; margin-bottom: -1px; transition: var(--transition-button);
}
.tab:hover { color: var(--text-primary); background: var(--gray-10); }
.tab[aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--interactive); }
.tabpanel[hidden] { display: none; }

/* ============================================================
   GROUNDED-ANSWER MOCK (reused hero device)
   ============================================================ */
.answer-mock { background: var(--gray-10); border: 1px solid var(--border-subtle); border-top: 3px solid var(--interactive); padding: var(--space-05); }
.answer-mock__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-04); }
.answer-mock__body { background: var(--white); border: 1px solid var(--border-subtle); padding: var(--space-04); margin-bottom: var(--space-03); }
.mono { font-family: var(--font-mono); }
.text-mono-12 { font-family: var(--font-mono); font-size: var(--size-12); }

/* ============================================================
   COMPANY-BRAIN PANEL  (hero device)
   Shows the knowledge infrastructure: many curated knowledge
   bases (the "minds") that combine to power many agents.
   ============================================================ */
.brain { background: var(--white); border: 1px solid var(--border-subtle); border-top: 3px solid var(--accent); }
.brain__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-04); padding: var(--space-04) var(--space-05); border-bottom: 1px solid var(--border-subtle); }
.brain__title { display: flex; align-items: center; gap: var(--space-03); }
.brain__title .name { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--size-16); color: var(--text-primary); line-height: 1; }
.brain__title .name .dot { color: var(--accent); }
.brain__count { font-family: var(--font-mono); font-size: 11px; color: var(--text-helper); white-space: nowrap; }

.brain__layer { padding: var(--space-04) var(--space-05) var(--space-03); }
.brain__layer + .brain__layer { border-top: 1px solid var(--border-subtle); }
.brain__label { display: flex; align-items: center; justify-content: space-between; gap: var(--space-04); font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--text-helper); margin-bottom: var(--space-03); }
.brain__label > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brain__label > span:last-child { flex: 0 0 auto; white-space: nowrap; }

/* the "minds" — a grid of curated knowledge bases */
.minds { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-02); }
.mind { display: flex; flex-direction: column; gap: 6px; background: var(--gray-10); border: 1px solid var(--border-subtle); padding: var(--space-03) var(--space-04); }
.mind--shared { border-left: var(--border-accent) solid var(--accent); background: var(--teal-10); }
.mind__top { display: flex; align-items: center; gap: var(--space-02); }
.mind__node { width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--interactive); flex: 0 0 auto; }
.mind--shared .mind__node { background: var(--accent-strong); }
.mind__name { font-family: var(--font-sans); font-weight: var(--weight-medium); font-size: 13px; color: var(--text-primary); line-height: 1.1; }
.mind__meta { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: var(--text-helper); }
.mind__owner { display: inline-flex; align-items: center; gap: 4px; }
.mind__owner .av { width: 13px; height: 13px; border-radius: var(--radius-pill); background: var(--gray-50); color: var(--white); font-size: 7px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; flex: 0 0 auto; }

/* connector + agents the brain powers */
.brain__agents { display: flex; flex-wrap: wrap; gap: var(--space-02); }
.agent-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-subtle); background: var(--white); padding: 5px var(--space-03); font-family: var(--font-sans); font-size: 12px; color: var(--text-secondary); }
.agent-pill iconify-icon { color: var(--gray-50); font-size: 14px; }
.agent-pill--add { color: var(--text-helper); border-style: dashed; }
.brain__foot { display: flex; align-items: center; gap: var(--space-04); padding: var(--space-03) var(--space-05); border-top: 1px solid var(--border-subtle); background: var(--gray-10); font-family: var(--font-mono); font-size: 10px; color: var(--text-helper); }
.brain__foot span { display: inline-flex; align-items: center; gap: 5px; }
.brain__foot iconify-icon { color: var(--accent-strong); font-size: 13px; }

/* ---------- Misc ---------- */
[id] { scroll-margin-top: 84px; }
.divider { height: 1px; background: var(--border-subtle); border: 0; }

/* ============================================================
   COMPANY-BRAIN FLOW  (homepage "How it works")
   ============================================================ */
.flow-chip { display: flex; align-items: center; gap: var(--space-03); font-size: var(--size-14); color: var(--text-secondary); background: var(--layer-01); border: 1px solid var(--border-subtle); padding: var(--space-03) var(--space-04); }
.flow-chip iconify-icon { color: var(--gray-50); font-size: 16px; flex: 0 0 auto; }

.kb-card { display: flex; align-items: center; justify-content: space-between; gap: var(--space-03); border: 1px solid var(--border-subtle); padding: var(--space-04); background: var(--white); }
.kb-card--hot { border-left: var(--border-accent) solid var(--accent); }
.kb-card .owner { display: flex; align-items: center; gap: var(--space-02); font-family: var(--font-mono); font-size: 11px; color: var(--text-helper); white-space: nowrap; }

.flow-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-02); color: var(--gray-40); font-size: 22px; padding: var(--space-02); }
.flow-arrow iconify-icon { transform: rotate(90deg); }
.flow-arrow--mcp .mcp-badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: var(--tracking-eyebrow); color: var(--accent-strong); border: 1px solid var(--teal-30); padding: 1px 6px; background: var(--teal-10); }
@media (min-width: 1024px) { .flow-arrow iconify-icon { transform: none; } }

/* Works-with-your-stack rows */
.stack-row { display: flex; gap: var(--space-04); padding: var(--space-04) 0; border-top: 1px solid var(--border-subtle); align-items: flex-start; }
.stack-row:first-of-type { border-top: 0; }
.stack-row iconify-icon { color: var(--gray-50); font-size: 20px; margin-top: 2px; flex: 0 0 auto; }
