/* AgentEnrich. Polar.sh-inspired editorial light theme.
 * Cream page background + dark code blocks (Polar's signature contrast)
 * + warm coral brand accent + secondary violet. */

:root {
  --bg: #fbf8f1;              /* warm cream — page background */
  --bg-elevated: #ffffff;     /* card white */
  --bg-code: #14141c;         /* dark for code blocks (intentional contrast) */
  --bg-code-text: #f4f4f8;    /* light text on dark code */
  --surface: #f5f0e6;         /* subtle cream variant for striped rows */
  --border: #e8e2d3;          /* warm light border */
  --border-strong: #d4cdb8;
  --text: #0a0a0a;            /* near-black */
  --text-muted: #5a5550;      /* warm muted */
  --text-dim: #8a857d;
  --brand: #ff5722;           /* warm coral — primary */
  --brand-glow: rgba(255, 87, 34, 0.14);
  --brand-light: #ff7849;
  --brand-dark: #cc4416;
  --accent: #7c3aed;          /* violet kept as secondary accent */
  --success: #16a34a;
  --radius: 6px;
  --radius-lg: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Geist", "Segoe UI", system-ui, sans-serif;
  --font-serif: "Tiempos Headline", "Source Serif Pro", "Iowan Old Style", Georgia, serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Geist Mono", ui-monospace, Menlo, Monaco, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ─── Layout ─────────────────────────────────────────────────────── */
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* ─── Nav ────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 241, 0.88);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; max-width: 1080px; margin: 0 auto;
}
.brand {
  font-weight: 700; font-size: 17px; letter-spacing: -0.015em;
  color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.brand-dot {
  /* Stylized "A" monogram. Bold letter form with a horizontal crossbar that
     reads both as the letter A AND as a data flow line. Geometric, serious,
     infrastructure-grade. Custom inline SVG. */
  display: inline-block; position: relative;
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--brand-light) 0%, var(--brand-dark) 100%);
  border-radius: 7px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08), 0 2px 10px var(--brand-glow);
}
.brand-dot::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M5.5 18.5 L12 5.5 L18.5 18.5'/><path d='M8.6 13.6 L15.4 13.6'/></svg>");
  background-repeat: no-repeat; background-position: center; background-size: contain;
}
.nav-links { display: flex; gap: 24px; align-items: center; font-size: 14px; }
.nav-links a {
  color: var(--text-muted); text-decoration: none; transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--brand); color: white !important; padding: 8px 14px;
  border-radius: var(--radius); font-weight: 500; transition: all 0.15s;
}
.nav-cta:hover { background: var(--brand-dark); transform: translateY(-1px); }

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero { padding: 112px 0 72px; text-align: center; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(700px 320px at 50% 0%, var(--brand-glow), transparent 75%);
  pointer-events: none; z-index: -1; opacity: 0.8;
}
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: white; border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 999px; font-size: 12px;
  color: var(--text-muted); margin-bottom: 24px; font-family: var(--font-mono);
}
.tag-dot {
  width: 6px; height: 6px; background: var(--success); border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 56px); font-weight: 600;
  letter-spacing: -0.025em; line-height: 1.1; margin-bottom: 24px;
  color: var(--text);
}
.hero h1 .accent { color: var(--brand); font-weight: 600; }
.hero .sub {
  font-size: 19px; color: var(--text-muted); max-width: 620px;
  margin: 0 auto 40px; line-height: 1.6;
}
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 56px; }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 12px 24px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; text-decoration: none;
  border: 1px solid transparent; transition: all 0.15s; cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--brand-glow);
}
.btn-secondary {
  background: white; color: var(--text); border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }

/* ─── Code blocks (kept dark for Polar-style contrast) ─────────────── */
.code {
  background: var(--bg-code); border: 1px solid var(--bg-code);
  border-radius: var(--radius-lg); padding: 20px 24px;
  font-family: var(--font-mono); font-size: 13px; line-height: 1.6;
  text-align: left; overflow-x: auto; color: #c7c7d0;
}
.code .kw { color: #a78bfa; }
.code .str { color: #6ee7b7; }
.code .num { color: #fbbf24; }
.code .comment { color: #6b6b75; }
.code .punct { color: #8a8a95; }
.code-window {
  background: var(--bg-code); border-radius: var(--radius-lg); overflow: hidden;
  max-width: 720px; margin: 0 auto; text-align: left;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}
.code-window-bar {
  display: flex; gap: 6px; padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06); align-items: center;
}
.code-window-bar .dot {
  width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.12);
}
.code-window-bar .label {
  margin-left: auto; font-family: var(--font-mono); font-size: 11px;
  color: rgba(255,255,255,0.4);
}
.code-window pre {
  padding: 20px 24px; margin: 0; font-family: var(--font-mono);
  font-size: 13px; line-height: 1.7; color: #c7c7d0; overflow-x: auto;
  background: var(--bg-code);
}
.code-window pre .kw { color: #a78bfa; }
.code-window pre .str { color: #6ee7b7; }
.code-window pre .num { color: #fbbf24; }
.code-window pre .comment { color: #6b6b75; }

/* Inline code on light pages */
code:not(pre code) {
  background: var(--surface); border: 1px solid var(--border);
  padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono);
  font-size: 0.9em; color: var(--brand-dark);
}

/* ─── Stats row ──────────────────────────────────────────────────── */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px; padding: 48px 0; border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); margin-top: 64px;
}
.stat-num {
  font-size: 36px; font-weight: 700; color: var(--brand);
  letter-spacing: -0.02em; margin-bottom: 4px; font-family: var(--font-mono);
}
.stat-label { font-size: 13px; color: var(--text-muted); }

/* ─── Sections ───────────────────────────────────────────────────── */
section { padding: 80px 0; }
.section-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 12px;
  color: var(--brand); text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(26px, 3.5vw, 36px); font-weight: 600;
  letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 16px;
  color: var(--text);
}
.section-title .accent { color: var(--brand); font-weight: 600; }
.section-sub {
  font-size: 17px; color: var(--text-muted);
  max-width: 640px; margin-bottom: 48px; line-height: 1.6;
}

/* ─── Cards ──────────────────────────────────────────────────────── */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px;
  transition: all 0.15s;
}
.card:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; background: var(--brand-glow);
  border-radius: var(--radius); font-size: 18px; margin-bottom: 16px;
}
.card h3 {
  font-size: 17px; font-weight: 600; margin-bottom: 8px;
  letter-spacing: -0.01em; color: var(--text);
}
.card p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }
.card .price-badge {
  display: inline-block; font-family: var(--font-mono); font-size: 11px;
  background: var(--surface); border: 1px solid var(--border); padding: 2px 8px;
  border-radius: 999px; color: var(--brand); margin-top: 12px;
}

/* ─── Endpoint / docs tables ─────────────────────────────────────── */
.endpoint-table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 24px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
/* Round the corner cells so the table's rounded border isn't visually
   covered by square-cornered <th>/<td> rectangles. */
.endpoint-table tr:first-child th:first-child { border-top-left-radius: var(--radius-lg); }
.endpoint-table tr:first-child th:last-child { border-top-right-radius: var(--radius-lg); }
.endpoint-table tr:last-child td:first-child { border-bottom-left-radius: var(--radius-lg); }
.endpoint-table tr:last-child td:last-child { border-bottom-right-radius: var(--radius-lg); }
.endpoint-table th, .endpoint-table td {
  padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--text);
}
.endpoint-table th {
  background: var(--surface); color: var(--text-muted);
  font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
}
.endpoint-table tr:last-child td { border-bottom: none; }
.endpoint-table td.path {
  font-family: var(--font-mono); font-size: 13px; color: var(--brand);
}
.endpoint-table td.price {
  font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);
  white-space: nowrap;
}
.endpoint-table tr:hover td { background: var(--surface); }
.endpoint-table td a { color: var(--brand); }

/* ─── Pricing plans ──────────────────────────────────────────────── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.plan {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px 24px;
  display: flex; flex-direction: column;
}
.plan.featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 12px 32px var(--brand-glow);
}
.plan-name {
  font-size: 13px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 8px; font-family: var(--font-mono);
}
.plan-price {
  font-size: 36px; font-weight: 700; letter-spacing: -0.02em;
  margin-bottom: 4px; color: var(--text);
}
.plan-price .per { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.plan-credits { color: var(--brand); font-size: 14px; margin-bottom: 20px; }
.plan ul { list-style: none; margin-bottom: 24px; flex: 1; }
.plan li {
  padding: 6px 0; color: var(--text-muted); font-size: 14px;
  display: flex; align-items: start; gap: 8px;
}
.plan li::before { content: "→"; color: var(--brand); flex-shrink: 0; }
.plan-cta {
  display: block; text-align: center; padding: 10px;
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: all 0.15s;
}
.plan.featured .plan-cta {
  background: var(--brand); border-color: var(--brand); color: white;
}
.plan.featured .plan-cta:hover { background: var(--brand-dark); }
.plan-cta:hover { border-color: var(--brand); color: var(--brand); }

/* ─── Footer ─────────────────────────────────────────────────────── */
footer {
  margin-top: 96px; padding: 48px 0 32px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
  margin-bottom: 48px;
}
.footer-col h4 {
  font-size: 12px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.05em; margin-bottom: 16px; font-weight: 500;
}
.footer-col a {
  display: block; color: var(--text-muted); text-decoration: none;
  font-size: 14px; padding: 4px 0; transition: color 0.15s;
}
.footer-col a:hover { color: var(--brand); }
.footer-bottom {
  display: flex; justify-content: space-between;
  color: var(--text-dim); font-size: 12px; font-family: var(--font-mono);
  padding-top: 24px; border-top: 1px solid var(--border);
}

/* ─── Compare table ──────────────────────────────────────────────── */
.compare {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-top: 24px;
  overflow: hidden;
}
.compare-row {
  display: grid; grid-template-columns: 2fr 1.2fr 1.2fr;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  align-items: center; gap: 16px;
}
.compare-row:last-child { border-bottom: none; }
.compare-row:nth-child(odd):not(:first-child) { background: rgba(255, 87, 34, 0.025); }
.compare-row > div { font-size: 14px; color: var(--text); }
/* Highlight column: per-cell, no negative margins (which used to make
   rows visually escape the table). */
.compare-row > div:nth-child(2) {
  text-align: center;
  background: rgba(255, 87, 34, 0.08);
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--brand-dark);
  font-weight: 600;
}
.compare-row > div:nth-child(3) {
  text-align: center; color: var(--text-dim); font-style: italic; font-size: 13px;
}
.compare-row .check { color: var(--brand-dark); font-weight: 600; font-size: 14px; }
.compare-row .x { color: var(--text-dim); font-style: italic; font-size: 13px; }
.compare-row.compare-header { background: var(--surface); padding: 18px 24px; }
.compare-row.compare-header > div:nth-child(2) {
  background: var(--brand); color: white;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
}
.compare-row.compare-header > div:nth-child(3) {
  color: var(--text-muted); font-weight: 500; font-style: normal;
}
.compare-head {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
.compare-feature { color: var(--text); font-weight: 500; }

/* ─── Misc ───────────────────────────────────────────────────────── */
.muted { color: var(--text-muted); }
.center { text-align: center; }
.divider { border: none; border-top: 1px solid var(--border); margin: 64px 0; }
a { color: var(--brand); transition: color 0.15s; }
a:hover { color: var(--brand-dark); }

/* Make hero subhead inside containers readable on cream */
.hero .sub strong { color: var(--text); }

/* details/summary FAQ on light theme */
details summary { color: var(--text); }
details p { color: var(--text-muted); }

/* ─── Mobile (≤ 720px) ──────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav-inner { padding: 12px 16px; gap: 8px; }
  .nav-links { gap: 12px; font-size: 13px; }
  .nav-links a:not(.nav-cta):not([href="/pricing"]) { display: none; }
  .nav-cta { padding: 7px 12px; font-size: 13px; }
  .brand { font-size: 15px; }
  .brand-dot { width: 22px; height: 22px; }

  .container, .container-narrow { padding: 0 16px; }

  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: clamp(28px, 8vw, 40px); line-height: 1.12; }
  .hero .sub { font-size: 16px; margin-bottom: 28px; }
  .cta-row { gap: 8px; margin-bottom: 36px; }
  .btn { padding: 11px 18px; font-size: 13px; }

  section { padding: 48px 0; }
  .section-title { font-size: clamp(22px, 6vw, 28px); }
  .section-sub { font-size: 15px; }

  .code-window { border-radius: 8px; }
  .code-window pre { padding: 14px 16px; font-size: 11.5px; line-height: 1.55; }
  .code-window-bar { padding: 10px 12px; }

  .card-grid { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 20px; }
  .pricing-grid { grid-template-columns: 1fr; gap: 12px; }
  .plan { padding: 22px 20px; }
  .plan-price { font-size: 30px; }

  .endpoint-table { display: block; overflow-x: auto; white-space: nowrap; }
  .endpoint-table th, .endpoint-table td { padding: 12px 14px; font-size: 13px; }

  .compare-row { grid-template-columns: 1.5fr 1.1fr 1.1fr; padding: 12px 14px; gap: 8px; }
  .compare-row.compare-header { padding: 14px 14px; }
  .compare-row > div { font-size: 12.5px; }

  .stats { gap: 16px; padding: 32px 0; margin-top: 40px; }
  .stat-num { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 28px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .code-window pre { font-size: 10.5px; }
  .plan-price { font-size: 26px; }
}
