/* ============================================================================
   SmartAPIHub — design system
   One stylesheet for every page, so it is fetched once and cached across the
   whole site. Everything below is hand-written CSS with no build step: the site
   is static HTML on a 1.9 GB box, and a framework would cost startup time and
   maintenance for nothing a marketing site needs.
   ========================================================================== */

:root {
  /* Base. Near-black rather than pure black — pure #000 makes the accent
     gradients band visibly on OLED panels. */
  --bg: #08090d;
  --bg-soft: #0d0f16;
  --surface: rgba(255, 255, 255, 0.028);
  --surface-2: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.085);
  --border-bright: rgba(255, 255, 255, 0.16);

  /* Text ramp — all pass WCAG AA on --bg. */
  --text: #eef0f6;
  --muted: #a2abc2;
  --dim: #737d96;

  /* Accents. Violet is the brand; cyan and lime differentiate the two products
     so a reader can tell at a glance which API a card belongs to. */
  --violet: #7c5cff;
  --violet-lit: #9b7dff;
  --cyan: #22d3ee;
  --lime: #4ade80;
  --amber: #fbbf24;

  --grad: linear-gradient(115deg, #7c5cff 0%, #a855f7 40%, #22d3ee 100%);
  --grad-voice: linear-gradient(115deg, #7c5cff, #c084fc);
  --grad-serp: linear-gradient(115deg, #06b6d4, #4ade80);

  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --maxw: 1180px;

  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 12px 44px rgba(124, 92, 255, 0.32);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }

/* Visible focus for keyboard users — the default ring disappears against a
   dark background, which makes the site unusable without a mouse. */
:focus-visible { outline: 2px solid var(--violet-lit); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 840px; }
.mono { font-family: var(--mono); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--violet); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- ambient background ---------- */
.aurora { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.42;
  animation: drift 22s ease-in-out infinite;
}
.aurora .a { width: 560px; height: 560px; background: radial-gradient(circle, rgba(124,92,255,.6), transparent 66%); top: -180px; left: -140px; }
.aurora .b { width: 500px; height: 500px; background: radial-gradient(circle, rgba(34,211,238,.42), transparent 66%); top: 180px; right: -180px; animation-delay: -7s; }
.aurora .c { width: 460px; height: 460px; background: radial-gradient(circle, rgba(168,85,247,.36), transparent 66%); bottom: -160px; left: 32%; animation-delay: -13s; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -34px) scale(1.1); }
}
.grid-lines {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 28%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 28%, transparent 76%);
}

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 9, 13, 0.72);
  border-bottom: 1px solid var(--border);
}
header nav { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 17.5px; letter-spacing: -0.02em; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
  display: grid; place-items: center; box-shadow: 0 0 24px rgba(124,92,255,.45); flex: none;
}
.brand .mark svg { width: 19px; height: 19px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 14.5px; font-weight: 500; transition: color .18s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-cta { display: flex; gap: 10px; align-items: center; }

.menu-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text);
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer; place-items: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 600; font-size: 14.5px; font-family: inherit;
  border-radius: 12px; padding: 11px 20px; cursor: pointer; border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .22s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap; text-align: center;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 44px rgba(124,92,255,.5); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-bright); transform: translateY(-2px); }
.btn-lg { padding: 15px 28px; font-size: 15.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- typography ---------- */
h1 { font-size: clamp(38px, 5.6vw, 66px); font-weight: 850; line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; line-height: 1.14; letter-spacing: -0.028em; }
h3 { font-size: clamp(19px, 2vw, 22px); font-weight: 700; letter-spacing: -0.018em; line-height: 1.3; }
h4 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; }
p { color: var(--muted); }
.lede { font-size: clamp(16.5px, 2vw, 20px); color: var(--muted); line-height: 1.6; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase;
  color: var(--violet-lit); margin-bottom: 14px;
}
.section { padding: 92px 0; }
.section-sm { padding: 60px 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: 14px; }

/* ---------- pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--lime); flex: none; }
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.tag-voice { background: rgba(124,92,255,.16); color: #c4b2ff; }
.tag-serp { background: rgba(34,211,238,.14); color: #7de8f7; }
.tag-save { background: rgba(74,222,128,.15); color: #86efac; }

/* ---------- hero ---------- */
.hero { padding: 84px 0 56px; }
.hero h1 { margin: 16px 0 22px; }
.hero .lede { max-width: 640px; }
.hero-cta { display: flex; gap: 13px; flex-wrap: wrap; margin: 32px 0 26px; }
.trust-row { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; color: var(--dim); font-size: 13.5px; }
.trust-row strong { color: var(--text); font-weight: 700; }

/* ---------- cards / bento ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s, transform .2s, background .2s;
}
.card:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 14.5px; }
.card .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  margin-bottom: 16px; font-size: 20px; background: var(--surface-2); border: 1px solid var(--border);
}

/* Product cards — the two APIs, colour-coded. */
.product-card { position: relative; overflow: hidden; padding: 32px; border-radius: var(--radius-lg); }
.product-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
}
.product-card.voice::before { background: var(--grad-voice); }
.product-card.serp::before { background: var(--grad-serp); }
.product-card .price-from { font-size: 13.5px; color: var(--dim); margin-top: 4px; }
.product-card ul { list-style: none; margin: 20px 0; display: grid; gap: 10px; }
.product-card li { font-size: 14.5px; color: var(--muted); display: flex; gap: 10px; align-items: flex-start; }
.product-card li svg { width: 16px; height: 16px; flex: none; margin-top: 4px; color: var(--lime); }
.product-card .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

/* ---------- stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--bg-soft); padding: 24px 22px; }
.stat .n { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat .l { font-size: 12.5px; color: var(--dim); margin-top: 5px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--dim); background: rgba(255,255,255,.018); }
td { color: var(--muted); font-variant-numeric: tabular-nums; }
td strong, td b { color: var(--text); font-weight: 700; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,.02); }
.num { text-align: right; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 18px; }
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 24px; display: flex; flex-direction: column; position: relative;
  transition: border-color .2s, transform .2s;
}
.plan:hover { border-color: var(--border-bright); transform: translateY(-3px); }
.plan.featured { border-color: rgba(124,92,255,.45); background: rgba(124,92,255,.055); box-shadow: 0 0 44px rgba(124,92,255,.12); }
.plan .ribbon {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: .09em; text-transform: uppercase; padding: 4px 13px; border-radius: 999px; white-space: nowrap;
}
.plan .name { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.plan .cost { font-size: 38px; font-weight: 850; letter-spacing: -0.035em; margin: 10px 0 2px; line-height: 1; }
.plan .cost span { font-size: 15px; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.plan .per { font-size: 13px; color: var(--violet-lit); font-weight: 600; min-height: 20px; }
.plan ul { list-style: none; margin: 20px 0; display: grid; gap: 11px; flex: 1; }
.plan li { font-size: 14px; color: var(--muted); display: flex; gap: 9px; align-items: flex-start; line-height: 1.5; }
.plan li svg { width: 15px; height: 15px; flex: none; margin-top: 4px; color: var(--violet-lit); }
.plan li b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- comparison table ---------- */
/* Replaced a bar-pair layout that showed only the competitor's price next to a
   percentage — readers took the one visible number to be ours. Every figure now
   sits under a header saying whose it is. */
.vs-table { min-width: 720px; }
.vs-table th { white-space: nowrap; }
.vs-table td { vertical-align: middle; padding: 15px 18px; }
.vs-table td b { display: block; color: var(--text); font-weight: 700; }
.vs-table .unit { display: block; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.vs-table .them { color: var(--muted); }

/* Their price is de-emphasised and struck through; ours is the brand colour.
   Colour alone would fail for colour-blind readers, so the strike carries the
   same meaning independently. */
.vs-table .them-price { color: var(--dim); }
.vs-table .them-price > span { text-decoration: line-through; text-decoration-thickness: 1px; }
.vs-table .ours-price { color: var(--text); font-weight: 800; font-size: 15.5px; }
.vs-table .ours-price .unit { text-transform: uppercase; letter-spacing: .07em; font-size: 10.5px; color: var(--violet-lit); }

.vs-table .barcell { width: 150px; min-width: 120px; }
.minibar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.minibar span { display: block; height: 100%; border-radius: 999px; background: var(--grad); }

.save {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: rgba(74, 222, 128, .15); color: #86efac;
  font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* Below ~860px a six-column table cannot fit, and scrolling it sideways hides
   the two columns that carry the argument — relative cost and the saving. So the
   table reflows into one card per row, with each cell labelled from data-label.
   Nothing is hidden and nothing scrolls. */
@media (max-width: 860px) {
  .vs-table { min-width: 0; }
  .table-wrap { border: none; background: none; overflow: visible; }
  .vs-table, .vs-table tbody, .vs-table tr, .vs-table td { display: block; width: 100%; }
  .vs-table thead { display: none; }
  .vs-table tr {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-soft); padding: 16px 18px; margin-bottom: 12px;
  }
  .vs-table tr:hover td { background: none; }
  .vs-table td {
    border: none; padding: 7px 0;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    text-align: right;
  }
  .vs-table td::before {
    content: attr(data-label);
    color: var(--dim); font-size: 11.5px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; text-align: left; flex: none;
  }
  /* First cell is the row's own heading, so it keeps the full width. */
  .vs-table td:first-child {
    display: block; text-align: left; padding: 0 0 10px;
    border-bottom: 1px solid var(--border); margin-bottom: 8px;
  }
  .vs-table td:first-child::before { display: none; }
  .vs-table .barcell { width: auto; }
  .vs-table .minibar { width: 55%; }
  .vs-table .ours-price { font-size: 17px; }
  .vs-table .ours-price .unit { display: inline; margin-left: 6px; }
}

/* ---------- code ---------- */
.code {
  background: #05060a; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; font-family: var(--mono); font-size: 13px;
}
.code-head { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.code-head .dots { display: flex; gap: 6px; }
.code-head .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-bright); }
.code-head .file { font-size: 12px; color: var(--dim); margin-left: 6px; }
.code pre { padding: 18px; overflow-x: auto; line-height: 1.65; color: #c9d1e4; }
.code .k { color: #c084fc; }
.code .s { color: #86efac; }
.code .c { color: #64748b; }
.code .f { color: #7dd3fc; }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: none; }
.faq summary {
  padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
  transition: background .18s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: rgba(255,255,255,.025); }
.faq summary::after { content: '+'; font-size: 21px; color: var(--dim); font-weight: 400; flex: none; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq .answer { padding: 0 22px 20px; color: var(--muted); font-size: 14.5px; max-width: 76ch; }
.faq .answer p + p { margin-top: 12px; }

/* ---------- CTA band ---------- */
.cta-band {
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 52px 40px;
  text-align: center; background:
    radial-gradient(ellipse at 50% 0%, rgba(124,92,255,.16), transparent 62%), var(--bg-soft);
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band .actions { display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 56px 0 34px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; margin-bottom: 40px; }
.foot-col h4 { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 15px; }
.foot-col a { display: block; color: var(--muted); font-size: 14px; padding: 5px 0; transition: color .18s; }
.foot-col a:hover { color: var(--text); }
.foot-about p { font-size: 14px; margin: 14px 0 0; max-width: 300px; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid var(--border); color: var(--dim); font-size: 13.5px; }

/* ---------- breadcrumb ---------- */
.crumbs { font-size: 13.5px; color: var(--dim); padding: 22px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin: 0 7px; opacity: .5; }

/* ---------- cookie / consent ---------- */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 560px;
  background: rgba(13, 15, 22, .97); border: 1px solid var(--border-bright); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--shadow); backdrop-filter: blur(12px);
}
.consent[hidden] { display: none; }
.consent p { font-size: 13.5px; margin-bottom: 15px; }
.consent .actions { display: flex; gap: 9px; flex-wrap: wrap; }
.consent .btn { padding: 9px 16px; font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .vs-row { grid-template-columns: 130px 1fr 88px; gap: 11px; }
}
@media (max-width: 760px) {
  .menu-toggle { display: grid; }
  .nav-links {
    position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(8,9,13,.985); border-bottom: 1px solid var(--border); padding: 10px 24px 20px;
    backdrop-filter: blur(16px);
  }
  .nav-links[hidden] { display: none; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--border); font-size: 15.5px; }
  .nav-cta .btn-ghost { display: none; }
  .section { padding: 64px 0; }
  .hero { padding: 52px 0 40px; }
  .cta-band { padding: 40px 22px; }
  .vs-row { grid-template-columns: 1fr; gap: 6px; }
  .vs-price { text-align: left; }
  .foot-grid { grid-template-columns: 1fr; }
  .card, .plan { padding: 22px; }
}
