/* agentic-first — shared styles for www.agentic-first.co
 * Single stylesheet for the whole marketing site. No build step.
 * Variables drive both colour and spacing so we can re-skin without
 * touching markup.
 */

:root {
  --bg: #0a0a0a;
  --bg-soft: #111;
  --bg-code: #050505;
  --fg: #f5f5f5;
  --fg-muted: #a3a3a3;
  --fg-dim: #6b6b6b;
  --accent: #f5f5f5;
  --green: #34d399;
  --amber: #fbbf24;
  --border: #1f1f1f;
  --border-soft: #161616;
  --border-strong: #2a2a2a;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
  --max-w: 880px;
  --max-w-wide: 1080px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-dim);
  transition: border-color .15s ease;
}
a:hover { border-bottom-color: var(--fg); }
a.plain, a.plain:hover { border-bottom: 0; }

/* ---- header / footer ----------------------------------------------------- */

header.site {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border: 0;
}
.brand-mark {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--fg);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}
nav.site {
  display: flex;
  gap: 24px;
  font-size: 14px;
  align-items: center;
}
nav.site a {
  color: var(--fg-muted);
  border-bottom: 0;
}
nav.site a:hover, nav.site a[aria-current="page"] {
  color: var(--fg);
}
.status {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.0); }
  50% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.18); }
}

footer.site {
  padding: 24px 32px;
  border-top: 1px solid var(--border-soft);
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
footer.site a {
  color: var(--fg-muted);
  border-bottom-color: transparent;
}
footer.site a:hover { color: var(--fg); border-bottom-color: var(--fg-muted); }

/* Version pill — small, monospace, sits in the header or footer to
   make the running directory + schema versions visible at a glance. */
.version-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  border-bottom: 1px solid var(--border) !important;
}
.version-pill:hover {
  color: var(--fg);
  border-color: var(--border-strong);
}
.version-pill .sep {
  color: var(--fg-dim);
  font-size: 10px;
}

/* ---- main / typography --------------------------------------------------- */

main {
  flex: 1;
  width: 100%;
  margin: 0 auto;
  padding: 64px 32px;
}
main.narrow { max-width: var(--max-w); }
main.wide { max-width: var(--max-w-wide); }

h1 {
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 24px;
}
h1 .accent { color: var(--fg-muted); font-weight: 400; }

h2 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 64px 0 16px;
  scroll-margin-top: 32px;
}
h2:first-of-type { margin-top: 0; }

h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 32px 0 12px;
  letter-spacing: -0.01em;
}

p { margin: 0 0 16px; color: var(--fg-muted); }
p strong, li strong { color: var(--fg); font-weight: 600; }
p.lede {
  font-size: 19px;
  max-width: 640px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin: 0 0 20px;
}

ul, ol { color: var(--fg-muted); padding-left: 22px; }
ul li, ol li { margin: 4px 0; }

code, .panel code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--fg);
}

pre {
  margin: 12px 0 24px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--fg);
}
pre code { background: transparent; border: 0; padding: 0; font-size: inherit; }

/* ---- panels / cards ------------------------------------------------------ */

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
  background: var(--bg-soft);
}
.panel h2,
.panel h3 {
  margin-top: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}
.panel p { margin: 0; }
.panel.warn { border-color: rgba(251, 191, 36, 0.3); }
.panel.warn h3 { color: var(--amber); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 32px 0;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
}
.card p { margin: 0; font-size: 14px; }
.num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  display: block;
  margin-bottom: 8px;
}

/* ---- buttons ------------------------------------------------------------- */

.cta { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--fg); background: #161616; }
.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.btn-primary:hover { background: #e5e5e5; border-color: #e5e5e5; }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(2px); }

/* ---- spec page chrome ---------------------------------------------------- */

.toc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0 40px;
  background: var(--bg-soft);
}
.toc strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.toc ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; }
.toc li { margin: 6px 0; font-size: 14px; }
.toc a { color: var(--fg-muted); border-bottom: 0; }
.toc a:hover { color: var(--fg); }
@media (max-width: 720px) { .toc ol { columns: 1; } }

.tier-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tier-public {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.tier-protected {
  background: rgba(251, 191, 36, 0.10);
  color: var(--amber);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

table.fields {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 13.5px;
}
table.fields th, table.fields td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
table.fields th {
  font-weight: 600;
  color: var(--fg);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-soft);
}
table.fields td { color: var(--fg-muted); }
table.fields td code { font-size: 12px; }
table.fields tr:last-child td { border-bottom: 0; }

.standards-table { font-size: 13.5px; }
.standards-table td:first-child code { white-space: nowrap; }

/* "deep-dive →" link inside a landscape table cell — small, monospace,
   pill-ish so it reads as a navigation chip, not as inline prose. */
.diff-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  border-bottom: 1px solid var(--border) !important;
  white-space: nowrap;
}
.diff-link:hover {
  color: var(--fg);
  border-color: var(--border-strong);
}

@media (max-width: 600px) {
  header.site { padding: 18px 20px; }
  main { padding: 40px 20px; }
  footer.site { padding: 18px 20px; }
  pre { padding: 14px 16px; font-size: 12px; }
  table.fields th, table.fields td { padding: 8px 10px; }
}
