/* Chartstone — shared site styles
   Loaded after Bootstrap so utility/grid classes still work; we override the
   Bootstrap primary color and tokenize the brand into CSS variables. */

:root {
  --cs-bg: #fbfbfd;
  --cs-card: #ffffff;
  --cs-border: #e6e8eb;
  --cs-ink: #1a1d21;
  --cs-muted: #5a6271;
  --cs-navy: #1b2838;       /* primary brand — matches in-app brand mark */
  --cs-accent: #c74634;     /* secondary accent — matches in-app brand mark */
  --cs-action: #0a66c2;     /* CTA blue — matches in-app primary buttons */
  --cs-action-hover: #084f99;
  --cs-soft: rgba(10, 102, 194, 0.08);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  background: var(--cs-bg);
  color: var(--cs-ink);
}

/* ---------- nav ---------- */

.cs-nav {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--cs-border);
}
.cs-nav .navbar-brand {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--cs-ink);
  display: inline-flex;
  align-items: center;
}
.cs-nav .nav-link {
  color: var(--cs-muted);
  font-weight: 500;
}
.cs-nav .nav-link.active,
.cs-nav .nav-link:hover {
  color: var(--cs-ink);
}

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

.btn-cs {
  background: var(--cs-action);
  border: 1px solid var(--cs-action);
  color: #fff;
  font-weight: 500;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
}
.btn-cs:hover,
.btn-cs:focus {
  background: var(--cs-action-hover);
  border-color: var(--cs-action-hover);
  color: #fff;
}
.btn-cs-lg {
  padding: 0.85rem 1.6rem;
  font-size: 1.05rem;
}
.btn-cs-outline {
  background: #fff;
  border: 1px solid #ccd6e0;
  color: var(--cs-action);
  font-weight: 500;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
}
.btn-cs-outline:hover {
  border-color: var(--cs-action);
  color: var(--cs-action);
}

/* ---------- hero ---------- */

.hero {
  padding: 7rem 0 5rem;
  text-align: center;
  background: radial-gradient(
      1100px 580px at 50% -10%,
      rgba(27, 40, 56, 0.06) 0%,
      transparent 60%
    ),
    var(--cs-bg);
}
.hero h1 {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.1rem;
  color: var(--cs-ink);
}
.hero .tagline {
  color: var(--cs-muted);
  font-size: 1.2rem;
  max-width: 720px;
  margin: 0 auto 2.25rem;
  line-height: 1.5;
}
.hero .eyebrow {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--cs-soft);
  color: var(--cs-action);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}

/* ---------- generic section ---------- */

.section {
  padding: 5rem 0;
}
.section-alt {
  background: #ffffff;
  border-top: 1px solid var(--cs-border);
  border-bottom: 1px solid var(--cs-border);
}
.section h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.6rem;
  color: var(--cs-ink);
}
.section .lead {
  color: var(--cs-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

/* ---------- cards / chips ---------- */

.feature-card {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px rgba(10, 20, 50, 0.12);
  border-color: #d6dbe1;
}
.feature-card .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--cs-soft);
  color: var(--cs-action);
  font-size: 1.1rem;
  margin-bottom: 0.9rem;
}
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--cs-ink);
}
.feature-card p {
  font-size: 0.92rem;
  color: var(--cs-muted);
  margin: 0;
  line-height: 1.55;
}
.feature-card code,
.endpoint-chip,
.body-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.feature-card code,
.body-content code {
  background: #f3f5f8;
  color: #334155;
  padding: 0.08em 0.35em;
  border-radius: 4px;
  font-size: 0.82em;
}

.endpoint-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}
.endpoint-chip {
  background: #f3f5f8;
  border: 1px solid var(--cs-border);
  color: #334155;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.how-step {
  text-align: center;
  padding: 1.5rem;
}
.how-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cs-navy);
  color: #fff;
  font-weight: 700;
  margin-bottom: 1rem;
}
.how-step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.how-step p {
  color: var(--cs-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* ---------- pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 880px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 16px;
  padding: 2.25rem 1.75rem;
  display: flex;
  flex-direction: column;
}
.pricing-card.featured {
  border-color: var(--cs-action);
  box-shadow: 0 8px 24px -10px rgba(10, 102, 194, 0.18);
}
.pricing-card .tier-name {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-action);
  margin-bottom: 0.75rem;
}
.pricing-card .tier-name.muted {
  color: var(--cs-muted);
}
.pricing-card .price {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
  color: var(--cs-ink);
}
.pricing-card .price small {
  font-size: 1rem;
  color: var(--cs-muted);
  font-weight: 500;
  margin-left: 0.25rem;
}
.pricing-card .price-blurb {
  color: var(--cs-muted);
  margin: 0.6rem 0 1.5rem;
  font-size: 0.95rem;
}
.pricing-card .feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}
.pricing-card .feature-list li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--cs-ink);
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.pricing-card .feature-list li:last-child {
  border-bottom: none;
}
.pricing-card .feature-list .check {
  color: #1f6b3a;
  flex-shrink: 0;
  margin-top: 2px;
}
.pricing-card .cta {
  margin-top: auto;
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}
.faq-item {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
}
.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--cs-ink);
}
.faq-item p,
.faq-item li {
  color: var(--cs-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 0.5rem;
}
.faq-item p:last-child {
  margin-bottom: 0;
}
.faq-item ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

/* ---------- AI / agents content ---------- */

.prompt-card {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}
.prompt-card .prompt-label,
.prompt-card .response-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.25rem;
}
.prompt-card .prompt-label {
  color: var(--cs-muted);
}
.prompt-card .response-label {
  color: var(--cs-action);
  margin-top: 0.5rem;
}
.prompt-card .prompt-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--cs-ink);
  margin: 0 0 0.75rem;
  font-style: italic;
}
.prompt-card .response-text {
  font-size: 0.95rem;
  color: var(--cs-muted);
  margin: 0;
  line-height: 1.6;
}
.prompt-card .response-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: #f3f5f8;
  color: #334155;
  padding: 0.08em 0.35em;
  border-radius: 4px;
  font-size: 0.82em;
}

.agent-bullets {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.agent-bullets li {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.agent-bullets strong {
  display: block;
  font-size: 0.95rem;
  color: var(--cs-ink);
  margin-bottom: 0.3rem;
}
.agent-bullets span {
  font-size: 0.88rem;
  color: var(--cs-muted);
  line-height: 1.55;
}

/* ---------- API docs ---------- */

.api-toc {
  background: var(--cs-card);
  border: 1px solid var(--cs-border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.api-toc h3 {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cs-muted);
}
.api-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.35rem 1rem;
}
.api-toc a {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  color: var(--cs-action);
  text-decoration: none;
}
.api-toc a:hover {
  text-decoration: underline;
}

.endpoint {
  border-top: 1px solid var(--cs-border);
  padding: 2.25rem 0 0.5rem;
}
.endpoint:first-of-type {
  border-top: none;
  padding-top: 0;
}
.endpoint h2 {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.3rem;
  color: var(--cs-ink);
  scroll-margin-top: 80px;
}
.endpoint .method {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--cs-soft);
  color: var(--cs-action);
  margin-right: 0.5rem;
  vertical-align: middle;
  text-transform: uppercase;
}
.endpoint .method.post {
  background: #FCEEEA;
  color: #C74634;
}
.endpoint .summary {
  color: var(--cs-muted);
  margin: 0.4rem 0 1rem;
  line-height: 1.6;
}

/* Note: scoped under `.body-content` so that `.body-content p`'s default
   bottom margin (1.1rem) doesn't win on specificity and add an awkward
   gap between the label and its code block. */
.body-content .codeblock-label,
.codeblock-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cs-muted);
  margin: 1.1rem 0 0.4rem;
  line-height: 1.4;
}
pre.codeblock {
  background: #1e2733;
  color: #e7e9ec;
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.55;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  margin: 0;
  white-space: pre;
}
pre.codeblock .tok-comment {
  color: #8a96a8;
}
pre.codeblock .tok-key {
  color: #82c4ff;
}
pre.codeblock .tok-str {
  color: #b9e8a3;
}

/* ---------- legal / long-form copy ---------- */

.body-content {
  max-width: 760px;
  margin: 0 auto;
  color: var(--cs-ink);
}
.body-content p {
  font-size: 1rem;
  color: var(--cs-ink);
  line-height: 1.7;
  margin: 0 0 1.1rem;
}
.body-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 2.4rem 0 0.6rem;
  color: var(--cs-ink);
}
.body-content h2:first-of-type {
  margin-top: 0;
}
.body-content ul {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
  color: var(--cs-ink);
  line-height: 1.7;
}
.body-content .meta {
  color: var(--cs-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

/* ---------- screenshots ---------- */

.cs-screenshot {
  display: block;
  margin: 2rem auto 0;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--cs-border);
  box-shadow:
    0 1px 2px rgba(20, 28, 40, 0.04),
    0 8px 24px rgba(20, 28, 40, 0.08),
    0 24px 64px rgba(20, 28, 40, 0.06);
}
.cs-screenshot.cs-screenshot-tight {
  margin-top: 1.25rem;
  border-radius: 10px;
}
.cs-screenshot-frame {
  margin: 2.5rem auto 0;
  max-width: 720px;
}
.cs-screenshot-frame.cs-screenshot-frame-wide {
  max-width: 960px;
}
.cs-screenshot-caption {
  display: block;
  margin: 0.85rem auto 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--cs-muted);
  max-width: 560px;
}

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

.cs-footer {
  padding: 3rem 0 2.5rem;
  border-top: 1px solid var(--cs-border);
  background: #ffffff;
  color: var(--cs-muted);
  font-size: 0.9rem;
}
.cs-footer a {
  color: var(--cs-muted);
  text-decoration: none;
}
.cs-footer a:hover {
  color: var(--cs-ink);
}
.cs-footer .footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}
.cs-footer .legal-line {
  text-align: center;
  font-size: 0.82rem;
  color: var(--cs-muted);
  line-height: 1.55;
  max-width: 720px;
  margin: 0 auto;
}
