/* =========================================================
   Agent.go — Building AI Agents in Go
   Design system based on DESIGN.md (Anthropic / Claude warm-canvas editorial)
   ========================================================= */

:root {
  /* Brand & accent */
  --primary: #cc785c;
  --primary-active: #a9583e;
  --primary-disabled: #e6dfd8;

  /* Text */
  --ink: #141413;
  --body: #3d3d3a;
  --body-strong: #252523;
  --muted: #6c6a64;
  --muted-soft: #8e8b82;

  /* Hairlines */
  --hairline: #e6dfd8;
  --hairline-soft: #ebe6df;

  /* Surfaces */
  --canvas: #faf9f5;
  --surface-soft: #f5f0e8;
  --surface-card: #efe9de;
  --surface-cream-strong: #e8e0d2;
  --surface-dark: #181715;
  --surface-dark-elevated: #252320;
  --surface-dark-soft: #1f1e1b;

  /* On-color text */
  --on-primary: #ffffff;
  --on-dark: #faf9f5;
  --on-dark-soft: #a09d96;

  /* Accents */
  --accent-teal: #5db8a6;
  --accent-amber: #e8a55a;
  --success: #5db872;
  --warning: #d4a017;
  --error: #c64545;

  /* Code syntax (warm dark palette) */
  --syntax-comment: #6a6862;
  --syntax-keyword: #d49a6a;
  --syntax-string: #a8c69a;
  --syntax-func: #e8a55a;
  --syntax-type: #8fb9c9;
  --syntax-const: #d4a8a0;
  --syntax-plain: #d8d4cc;
  --syntax-line-num: #555148;

  /* Radius */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-pill: 9999px;

  /* Spacing */
  --xxs: 4px;
  --xs: 8px;
  --sm: 12px;
  --md: 16px;
  --lg: 24px;
  --xl: 32px;
  --xxl: 48px;
  --section: 96px;

  /* Type stacks */
  --font-display: "Cormorant Garamond", "EB Garamond", "Tiempos Headline", Garamond, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* =========================================================
   Reset
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
p { margin: 0; }

/* =========================================================
   Type scale (Copernicus → Cormorant Garamond fallback)
   ========================================================= */
.display-xl, .display-lg, .display-md, .display-sm,
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;     /* Cormorant 500 ~ Copernicus 400 weight feel */
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
}
.display-xl { font-size: clamp(40px, 6vw, 72px); line-height: 1.04; letter-spacing: -0.025em; }
.display-lg { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.08; letter-spacing: -0.022em; }
.display-md { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.14; letter-spacing: -0.018em; }
.display-sm { font-size: 28px; line-height: 1.2; letter-spacing: -0.012em; }

.title-lg { font-family: var(--font-body); font-size: 22px; font-weight: 500; line-height: 1.3; }
.title-md { font-family: var(--font-body); font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.title-sm { font-family: var(--font-body); font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--ink); }

.body-md { font-size: 16px; line-height: 1.6; color: var(--body); }
.body-sm { font-size: 14px; line-height: 1.55; color: var(--body); }

.caption  { font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--muted); }
.eyebrow  {
  font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--primary);
}

/* =========================================================
   Layout
   ========================================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: var(--section) 0; }
.section-tight { padding: 64px 0; }

.stack > * + * { margin-top: var(--md); }
.stack-lg > * + * { margin-top: var(--lg); }
.stack-xl > * + * { margin-top: var(--xl); }

.row { display: flex; gap: var(--md); flex-wrap: wrap; align-items: center; }

/* =========================================================
   Anthropic-style spike-mark
   ========================================================= */
.spike {
  display: inline-block;
  width: 16px; height: 16px;
  flex-shrink: 0;
  vertical-align: -2px;
}
.spike svg { width: 100%; height: 100%; }

/* =========================================================
   Top navigation
   ========================================================= */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--canvas);
  height: 64px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.top-nav.scrolled { border-bottom-color: var(--hairline); }
.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--lg);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--xs);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand .brand-suffix { color: var(--primary); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--body-strong);
  padding: 8px 14px;
  border-radius: var(--r-md);
  transition: background 150ms ease, color 150ms ease;
}
.nav-link:hover { background: var(--surface-card); color: var(--ink); }
.nav-link.active { color: var(--ink); background: var(--surface-card); }
.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--sm);
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  border-radius: var(--r-md);
  transition: transform 120ms ease, background 150ms ease, color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}
.btn-primary:hover { background: var(--primary-active); }

.btn-secondary {
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-secondary:hover { border-color: var(--ink); }

.btn-on-dark {
  background: var(--surface-dark-elevated);
  color: var(--on-dark);
  border: 1px solid #2c2a26;
}
.btn-on-dark:hover { background: #2f2c28; }

.btn-cream-on-coral {
  background: var(--canvas);
  color: var(--ink);
}
.btn-cream-on-coral:hover { background: #fff; }

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.btn-text .arrow { transition: transform 200ms ease; }
.btn-text:hover .arrow { transform: translateX(3px); }

.text-link {
  color: var(--primary);
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}
.text-link:hover { border-bottom-color: var(--primary); }

.btn-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-pill);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   Badges
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface-card);
  color: var(--ink);
}
.badge-coral {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 4px 10px;
}
.badge-outline {
  background: transparent;
  border: 1px solid var(--hairline);
  color: var(--body-strong);
}
.badge-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  margin-right: 2px;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding: 80px 0 96px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 6fr 6fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-eyebrow .spike { width: 14px; height: 14px; }
.hero h1 {
  margin-bottom: 24px;
}
.hero-lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--body);
  max-width: 540px;
  margin-bottom: 32px;
}
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* =========================================================
   Cards
   ========================================================= */
.feature-card {
  background: var(--surface-card);
  color: var(--ink);
  border-radius: var(--r-lg);
  padding: var(--xl);
}
.feature-card .icon {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--canvas);
  color: var(--primary);
  border-radius: var(--r-md);
  margin-bottom: 20px;
}
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--body); font-size: 15px; line-height: 1.55; }

.card-cream {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--xl);
}
.card-soft {
  background: var(--surface-soft);
  border-radius: var(--r-lg);
  padding: var(--xl);
}
.card-dark {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: var(--r-lg);
  padding: var(--xl);
}
.card-dark h3 { color: var(--on-dark); }
.card-dark p { color: var(--on-dark-soft); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--lg);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--lg);
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--lg);
}
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

/* Section heading block */
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head .eyebrow { margin-bottom: 14px; display: inline-block; }
.section-head h2 { margin-bottom: 16px; }
.section-head p { font-size: 18px; color: var(--body); line-height: 1.55; }

/* Two-column layout: text + visual */
.two-col {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: center;
}
.two-col.reverse { grid-template-columns: 7fr 5fr; }
@media (max-width: 900px) {
  .two-col, .two-col.reverse { grid-template-columns: 1fr; gap: 40px; }
}

/* =========================================================
   Code window (signature dark mockup)
   ========================================================= */
.code-window {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(20,20,19,0.08);
}
.code-window-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #2a2823;
  background: var(--surface-dark-elevated);
}
.code-window-dots {
  display: flex; gap: 6px;
}
.code-window-dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: #3a372f;
}
.code-window-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-dark-soft);
}
.code-window-tab {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-dark);
  background: var(--surface-dark-soft);
  padding: 4px 12px;
  border-radius: var(--r-sm);
}
.code-window pre {
  margin: 0;
  padding: 24px 28px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  overflow-x: auto;
  color: var(--syntax-plain);
  background: var(--surface-dark);
}
.code-window pre code { font-family: inherit; }

.code-window.with-footer { padding-bottom: 0; }
.code-window-footer {
  border-top: 1px solid #2a2823;
  background: var(--surface-dark-elevated);
  padding: 12px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-dark-soft);
  display: flex; align-items: center; gap: 10px;
}

/* Syntax highlight tokens */
.kw  { color: var(--syntax-keyword); }
.str { color: var(--syntax-string); }
.fn  { color: var(--syntax-func); }
.ty  { color: var(--syntax-type); }
.cm  { color: var(--syntax-comment); font-style: italic; }
.cn  { color: var(--syntax-const); }
.nm  { color: #c9c4ba; }
.pn  { color: #87827a; }

/* =========================================================
   Bands & full-bleed surfaces
   ========================================================= */
.band-cream-strong {
  background: var(--surface-cream-strong);
}
.band-soft {
  background: var(--surface-soft);
}
.band-dark {
  background: var(--surface-dark);
  color: var(--on-dark);
}
.band-dark h2, .band-dark h3 { color: var(--on-dark); }
.band-dark p { color: var(--on-dark-soft); }
.band-dark .eyebrow { color: var(--accent-amber); }

/* Coral callout */
.callout-coral {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--r-lg);
  padding: 64px;
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: center;
  gap: 48px;
}
.callout-coral h2 { color: var(--on-primary); margin-bottom: 12px; }
.callout-coral p { color: rgba(255,255,255,0.85); font-size: 17px; line-height: 1.55; }
@media (max-width: 800px) {
  .callout-coral { grid-template-columns: 1fr; padding: 48px 32px; }
}

.callout-dark {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: var(--r-lg);
  padding: 64px;
}
.callout-dark h2 { color: var(--on-dark); margin-bottom: 12px; }
.callout-dark p { color: var(--on-dark-soft); }

/* =========================================================
   Lists
   ========================================================= */
.check-list { display: grid; gap: 14px; }
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--body-strong);
  line-height: 1.55;
}
.check-list .check {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}
.check-list.dark li { color: var(--on-dark); }

.dot-list { display: grid; gap: 12px; }
.dot-list li {
  display: flex;
  gap: 14px;
  font-size: 15px;
  color: var(--body);
  line-height: 1.55;
}
.dot-list li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 9px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary);
}

/* =========================================================
   Tables
   ========================================================= */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  font-size: 14px;
}
.compare-table th, .compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}
.compare-table th {
  background: var(--surface-soft);
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.compare-table tr:last-child td { border-bottom: 0; }
.compare-table td .badge { font-size: 12px; padding: 2px 8px; }

/* =========================================================
   Pricing-style tier cards (used for "agent tiers")
   ========================================================= */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--lg);
}
@media (max-width: 800px) { .tier-grid { grid-template-columns: 1fr; } }
.tier-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: var(--xl);
  display: flex;
  flex-direction: column;
}
.tier-card.featured {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-color: transparent;
}
.tier-card.featured h3, .tier-card.featured .price { color: var(--on-dark); }
.tier-card.featured p, .tier-card.featured .check-list li { color: var(--on-dark-soft); }
.tier-card .tier-name { font-family: var(--font-body); font-weight: 600; font-size: 15px; color: var(--primary); margin-bottom: 8px; }
.tier-card.featured .tier-name { color: var(--accent-amber); }
.tier-card .price {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 6px 0 4px;
  color: var(--ink);
  font-weight: 500;
}
.tier-card .price-suffix { font-family: var(--font-body); font-size: 14px; color: var(--muted); font-weight: 400; }
.tier-card .tier-summary { font-size: 14px; color: var(--body); margin-bottom: 24px; line-height: 1.55; }
.tier-card.featured .tier-summary { color: var(--on-dark-soft); }
.tier-card .check-list { margin-bottom: 28px; }
.tier-card .btn { margin-top: auto; }

/* =========================================================
   Footer
   ========================================================= */
.footer {
  background: var(--surface-dark);
  color: var(--on-dark-soft);
  padding: 64px 0 40px;
  margin-top: 96px;
}
.footer .container { display: grid; gap: 48px; }
.footer-top {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: 48px;
}
@media (max-width: 900px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-top { grid-template-columns: 1fr; } }
.footer .brand { color: var(--on-dark); }
.footer-blurb { color: var(--on-dark-soft); font-size: 14px; line-height: 1.55; max-width: 320px; margin-top: 12px; }
.footer h4 { color: var(--on-dark); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; font-family: var(--font-body); }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--on-dark-soft); font-size: 14px; transition: color 150ms ease; }
.footer ul a:hover { color: var(--on-dark); }
.footer-bottom {
  border-top: 1px solid #2a2823;
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--on-dark-soft);
}

/* =========================================================
   Misc decorative
   ========================================================= */
.dotline {
  height: 1px;
  background-image: linear-gradient(to right, var(--hairline) 50%, transparent 50%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
}

/* Diagram (agent loop) */
.loop-diagram {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: 40px;
  display: grid;
  gap: 24px;
}
.loop-step {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: flex-start;
}
.loop-step .num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.loop-step h4 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--ink);
}
.loop-step p { font-size: 14px; color: var(--body); line-height: 1.55; }
.loop-arrow {
  margin-left: 18px;
  color: var(--muted-soft);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
}

/* Side-step pill */
.step-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--surface-card);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Inline pre (small code) */
.inline-code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--surface-soft);
  color: var(--body-strong);
  padding: 2px 6px;
  border-radius: var(--r-xs);
  border: 1px solid var(--hairline-soft);
}

/* Page header (sub pages) */
.page-header {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--hairline);
}
.page-header .eyebrow { margin-bottom: 16px; display: inline-block; }
.page-header h1 { max-width: 800px; margin-bottom: 20px; }
.page-header p { max-width: 720px; font-size: 19px; line-height: 1.55; color: var(--body); }

/* Anchored TOC */
.toc {
  position: sticky;
  top: 96px;
  font-size: 14px;
  color: var(--muted);
}
.toc h5 {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 12px;
}
.toc a {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid var(--hairline);
  color: var(--muted);
  transition: color 150ms ease, border-color 150ms ease;
}
.toc a:hover { color: var(--ink); border-left-color: var(--primary); }
.toc a.active { color: var(--ink); border-left-color: var(--primary); }

.with-toc {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
}
@media (max-width: 900px) {
  .with-toc { grid-template-columns: 1fr; }
  .toc { position: static; }
}

/* =========================================================
   Block quotes / pull quotes
   ========================================================= */
.pull-quote {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.012em;
  color: var(--ink);
  border-left: 3px solid var(--primary);
  padding: 4px 0 4px 28px;
  margin: 32px 0;
  font-weight: 500;
}
.pull-quote cite { display: block; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--muted); font-style: normal; margin-top: 12px; }

/* Connector / library tile */
.lib-tile {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 150ms ease, transform 150ms ease;
}
.lib-tile:hover { border-color: var(--ink); transform: translateY(-2px); }
.lib-tile .lib-head {
  display: flex; align-items: center; gap: 12px;
}
.lib-tile .lib-glyph {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--surface-card);
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--primary);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}
.lib-tile h4 { font-family: var(--font-body); font-size: 16px; font-weight: 600; margin: 0; color: var(--ink); }
.lib-tile p { font-size: 14px; color: var(--body); line-height: 1.5; }
.lib-tile .lib-meta {
  display: flex; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
  font-family: var(--font-mono);
  margin-top: auto;
}

/* Case study card */
.case-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 32px;
  display: grid;
  gap: 20px;
}
.case-card .case-label {
  display: flex; align-items: center; gap: 12px;
}
.case-card .case-glyph {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: var(--primary);
  color: var(--on-primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600; font-size: 18px;
}
.case-card h3 { font-family: var(--font-display); font-size: 26px; line-height: 1.2; letter-spacing: -0.015em; }
.case-card .case-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--muted);
  font-family: var(--font-mono);
  border-top: 1px solid var(--hairline-soft);
  padding-top: 16px;
}

/* CTA sub band */
.cta-band {
  text-align: center;
  padding: 80px 0;
}
.cta-band h2 { margin-bottom: 16px; }
.cta-band p { color: var(--body); font-size: 18px; max-width: 600px; margin: 0 auto 28px; }

/* Numbered grid (Foundations) */
.num-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px 64px;
}
@media (max-width: 800px) { .num-grid { grid-template-columns: 1fr; gap: 32px; } }
.num-item .num-prefix {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--primary);
  letter-spacing: 0.05em;
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}
.num-item h3 {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
  font-weight: 500;
}
.num-item p { color: var(--body); font-size: 15px; line-height: 1.6; }

/* Logo strip */
.logo-strip {
  display: flex; flex-wrap: wrap; gap: 32px 56px;
  align-items: center; justify-content: center;
  padding: 32px 0;
  opacity: 0.85;
}
.logo-strip .logo-item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  color: var(--muted);
  letter-spacing: -0.01em;
}

/* Mobile nav */
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta .btn-secondary { display: none; }
  .nav-toggle {
    display: inline-flex;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border-radius: var(--r-md);
    border: 1px solid var(--hairline);
  }
}

/* Utility */
.text-muted { color: var(--muted); }
.text-body  { color: var(--body); }
.text-primary { color: var(--primary); }
.mt-0 { margin-top: 0 !important; }
.mt-md { margin-top: var(--md); }
.mt-lg { margin-top: var(--lg); }
.mt-xl { margin-top: var(--xl); }
.mt-xxl { margin-top: var(--xxl); }
.mb-md { margin-bottom: var(--md); }
.mb-lg { margin-bottom: var(--lg); }
.mb-xl { margin-bottom: var(--xl); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }

/* Stat callout */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 800px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat .stat-num {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-weight: 500;
}
.stat .stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 8px;
}
.band-dark .stat .stat-num { color: var(--on-dark); }
.band-dark .stat .stat-label { color: var(--on-dark-soft); }

/* Inline KBD */
kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--body-strong);
}

/* Pre wrapper for static doc snippets (cream) */
pre.code-cream {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  background: var(--surface-soft);
  border: 1px solid var(--hairline);
  color: var(--body-strong);
  padding: 20px;
  border-radius: var(--r-md);
  overflow-x: auto;
}

/* Section divider line */
hr.divider {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 0;
}

/* =========================================================
   Download card — the runnable example bundle
   ========================================================= */
.download-card {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 0;
}
@media (max-width: 900px) {
  .download-card { grid-template-columns: 1fr; }
}
.download-card .dl-left {
  padding: 40px 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.download-card .dl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-amber);
}
.download-card h3 {
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.018em;
  font-weight: 500;
  color: var(--on-dark);
  margin: 0;
}
.download-card .dl-lead {
  font-size: 15px;
  line-height: 1.55;
  color: var(--on-dark-soft);
}
.download-card .dl-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 20px;
  padding: 18px 0 6px;
  border-top: 1px solid #2a2823;
}
.download-card .dl-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.download-card .dl-stat strong {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.012em;
  color: var(--on-dark);
  font-weight: 500;
}
.download-card .dl-stat span {
  font-size: 12px;
  color: var(--on-dark-soft);
}
.download-card .dl-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}
.download-card .btn-download {
  background: var(--primary);
  color: var(--on-primary);
  height: 44px;
  padding: 0 20px;
  font-weight: 600;
}
.download-card .btn-download:hover { background: var(--primary-active); }
.download-card .btn-download .arrow { font-size: 16px; line-height: 1; }
.download-card .btn-download-secondary {
  background: var(--surface-dark-elevated);
  color: var(--on-dark);
  height: 44px;
  padding: 0 18px;
  border: 1px solid #2c2a26;
}
.download-card .btn-download-secondary:hover { background: #2f2c28; }

.download-card .dl-right {
  background: var(--surface-dark-soft);
  border-left: 1px solid #2a2823;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 900px) {
  .download-card .dl-right { border-left: 0; border-top: 1px solid #2a2823; }
}
.download-card .dl-tree, .download-card .dl-shell {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
}
.download-card .dl-tree { color: var(--syntax-plain); }
.download-card .dl-tree .tree-comment { color: var(--syntax-comment); }
.download-card .dl-tree .tree-dir     { color: var(--syntax-type); }
.download-card .dl-tree .tree-file    { color: var(--on-dark); }
.download-card .dl-tree .tree-key     { color: var(--syntax-keyword); }

.download-card .dl-shell {
  background: var(--surface-dark);
  border: 1px solid #2a2823;
  border-radius: var(--r-md);
  padding: 14px 16px;
  color: var(--on-dark);
}
.download-card .dl-shell .sh-prompt { color: var(--accent-teal); }
.download-card .dl-shell .sh-comment { color: var(--syntax-comment); }
.download-card .dl-shell .sh-flag { color: var(--accent-amber); }

/* =========================================================
   Team page — founder portraits & engagement cards
   ========================================================= */
.founder-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--lg);
}
@media (max-width: 900px) { .founder-grid { grid-template-columns: 1fr; } }

.founder-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.founder-portrait {
  aspect-ratio: 5 / 6;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  background: var(--surface-soft);
}
.founder-portrait svg {
  display: block;
  width: 100%;
  height: 100%;
}
.founder-portrait::after {
  /* a faint film-grain / vignette so the AI-generated feel reads */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 22% 28%, rgba(255,255,255,0.18), transparent 45%),
    radial-gradient(circle at 78% 76%, rgba(0,0,0,0.18), transparent 50%);
  mix-blend-mode: overlay;
}

.founder-card h3 {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.014em;
  font-weight: 500;
  margin: 0;
}
.founder-card .founder-role {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.founder-card p {
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.6;
}
.founder-card .founder-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-soft);
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--muted);
}
.founder-card .founder-meta span::after {
  content: "·";
  margin-left: 8px;
  color: var(--muted-soft);
}
.founder-card .founder-meta span:last-child::after { content: ""; margin-left: 0; }

/* Engagement / services list */
.engagement-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--lg);
}
@media (max-width: 800px) { .engagement-grid { grid-template-columns: 1fr; } }
.engagement-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 28px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.engagement-card .engagement-label {
  display: flex;
  align-items: center;
  gap: 12px;
}
.engagement-card .engagement-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--primary);
  letter-spacing: -0.014em;
}
.engagement-card h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.014em;
  margin: 0;
}
.engagement-card p { color: var(--body); font-size: 15px; line-height: 1.55; }
.engagement-card .engagement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 12.5px;
  font-family: var(--font-mono);
  color: var(--muted);
  padding-top: 8px;
}

/* Lab / location section */
.lab-card {
  background: var(--surface-dark);
  color: var(--on-dark);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 6fr 6fr;
  gap: 0;
}
@media (max-width: 900px) { .lab-card { grid-template-columns: 1fr; } }
.lab-card .lab-text { padding: 48px; }
.lab-card .lab-text h3 {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: -0.018em;
  font-weight: 500;
  color: var(--on-dark);
  margin: 0 0 14px;
  line-height: 1.12;
}
.lab-card .lab-text p { color: var(--on-dark-soft); font-size: 16px; line-height: 1.6; max-width: 460px; }
.lab-card .lab-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
  margin-top: 28px;
}
.lab-card .lab-stat strong {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.012em;
  color: var(--on-dark);
  font-weight: 500;
  display: block;
}
.lab-card .lab-stat span { color: var(--on-dark-soft); font-size: 13px; }

.lab-card .lab-map {
  background:
    radial-gradient(circle at 30% 40%, rgba(204,120,92,0.18), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(93,184,166,0.12), transparent 45%),
    var(--surface-dark-soft);
  border-left: 1px solid #2a2823;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 360px;
}
@media (max-width: 900px) { .lab-card .lab-map { border-left: 0; border-top: 1px solid #2a2823; } }
.lab-card .lab-map svg { width: 80%; max-width: 380px; }
.lab-card .lab-pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--canvas);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 6px 22px rgba(0,0,0,0.35);
}
.lab-card .lab-pin .lab-pin-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(204,120,92,0.25);
}

/* Team intro stats row (on cream) */
.team-intro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
@media (max-width: 800px) { .team-intro-stats { grid-template-columns: 1fr; gap: 24px; } }
.team-intro-stats .ti {
  display: flex; flex-direction: column; gap: 6px;
}
.team-intro-stats .ti strong {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.018em;
  color: var(--ink);
  line-height: 1;
}
.team-intro-stats .ti span { color: var(--muted); font-size: 14px; }

/* Contact strip (on dark) */
.contact-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  padding: 28px;
  background: var(--surface-dark-elevated);
  border-radius: var(--r-md);
  margin-top: 24px;
}
@media (max-width: 800px) { .contact-strip { grid-template-columns: 1fr; } }
.contact-strip .contact-item h5 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-amber);
  margin: 0 0 8px;
}
.contact-strip .contact-item a, .contact-strip .contact-item span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--on-dark);
}
.contact-strip .contact-item a { border-bottom: 1px solid rgba(250,249,245,0.25); transition: border-color 150ms ease; }
.contact-strip .contact-item a:hover { border-bottom-color: var(--on-dark); }

/* small inline download chip used in hero */
.download-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 16px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--body-strong);
  transition: border-color 150ms ease, transform 150ms ease;
}
.download-chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.download-chip .chip-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.download-chip .chip-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
