:root {
  --ink: #0b1222;
  --ink-soft: #5b6678;
  --paper: #ffffff;
  --alt: #f4f6fb;
  --alt2: #eef1f8;
  --line: #e3e8f0;
  --cta: #4f46e5;        /* indigo primary */
  --cta-dark: #4338ca;
  --cta-soft: #eef0fe;
  --accent: #0ea5e9;
  --night: #070b18;
  --code-bg: #0a0f1f;
  --ok: #16a34a;
  --coming: #b45309;
  --bad: #e03b3b;
  --maxw: 1240px;
  --display: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--paper); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--cta); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
.muted { color: var(--ink-soft); }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }

/* ---- Bands ------------------------------------------------------------- */
.band { width: 100%; padding: 84px 0; }
.band.tight { padding: 58px 0; }
.band.alt { background: var(--alt); }
.band.alt2 { background: var(--alt2); }
.band.dark { background: var(--night); color: #fff; }
.band.dark h2, .band.dark h3 { color: #fff; }
.band.ctaband { background: linear-gradient(120deg, #4338ca 0%, #4f46e5 45%, #0ea5e9 115%); color: #fff; }
.band.ctaband h2 { color: #fff; }
.band.image { position: relative; overflow: hidden; background: #070b18; color: #fff; text-align: center; }
.band.image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(7,11,24,.82), rgba(7,11,24,.9)), url("https://images.unsplash.com/photo-1444703686981-a3abbc4d4fe3?auto=format&fit=crop&w=2000&q=80") center/cover; }
.band.image .wrap { position: relative; z-index: 2; }
.band.image h2 { color: #fff; }
.band.image p { color: #c4cde0; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.sec-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.sec-head .eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .13em; font-size: .73rem; font-weight: 700; color: var(--cta); background: var(--cta-soft); padding: 5px 13px; border-radius: 999px; margin-bottom: 18px; }
.band.dark .sec-head .eyebrow { color: #c7d2fe; background: rgba(99,102,241,.18); }
.sec-head h2 { margin-bottom: 14px; }
.sec-head p { color: var(--ink-soft); font-size: 1.1rem; }
.band.dark .sec-head p { color: #aab6cc; }

/* ---- Header (dark, sticky) + logo -------------------------------------- */
header.site { background: #080c1a; border-bottom: 1px solid rgba(255,255,255,.09); position: sticky; top: 0; z-index: 100; }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 36px; height: 36px; flex: none; }
.brand .bname { font-family: var(--display); font-size: 1.26rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.brand .bname span { color: #818cf8; margin-left: 5px; font-weight: 700; }
nav.main { display: flex; align-items: center; gap: 2px; }
nav.main > a, .has-menu > a { color: #c6cde0; font-size: .94rem; font-weight: 500; padding: 9px 14px; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; }
nav.main > a:hover, .has-menu > a:hover { color: #fff; background: rgba(255,255,255,.07); text-decoration: none; }
.has-menu > a .caret { width: 11px; height: 11px; opacity: .7; transition: transform .18s; }
.has-menu:hover > a .caret { transform: rotate(180deg); }
nav.main a.nav-cta { background: var(--cta); color: #fff; margin-left: 10px; font-weight: 600; }
nav.main a.nav-cta:hover { background: var(--cta-dark); }
.menu-btn { display: none; background: none; border: 0; font-size: 1.5rem; color: #fff; cursor: pointer; }

/* ---- Full-width mega-menu ---------------------------------------------- */
.has-menu { position: static; display: inline-flex; align-items: center; height: 68px; }
.megamenu { position: fixed; left: 0; right: 0; top: 68px; width: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 30px 70px rgba(8,12,26,.3); padding: 32px 0 36px; max-height: calc(100vh - 84px); overflow: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .16s, transform .16s, visibility .16s; z-index: 90; }
.has-menu:hover .megamenu, .has-menu:focus-within .megamenu { opacity: 1; visibility: visible; transform: translateY(0); }
.megamenu .mm-head { font-family: var(--display); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); margin: 0 0 16px; font-weight: 700; }
.mm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 26px; }
.mm-item { display: block; padding: 13px 15px; border-radius: 11px; color: var(--ink); }
.mm-item:hover { background: var(--alt); text-decoration: none; }
.mm-item .mm-top { display: flex; align-items: center; gap: 9px; margin-bottom: 4px; }
.mm-item h5 { margin: 0; font-family: var(--display); font-size: .96rem; font-weight: 700; color: var(--ink); }
.mm-item p { margin: 0; font-size: .83rem; color: var(--ink-soft); line-height: 1.45; }
.tagc { font-family: var(--sans); font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--coming); background: #fdf0dd; padding: 2px 7px; border-radius: 999px; flex: none; }
.taglive { font-family: var(--sans); font-size: .6rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ok); background: #e5f6ec; padding: 2px 7px; border-radius: 999px; flex: none; }

/* ---- Buttons ----------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--cta); color: #fff; border: 0; padding: 13px 26px; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; font-family: var(--sans); }
.btn:hover { background: var(--cta-dark); text-decoration: none; color: #fff; }
.btn.ghost { background: transparent; color: var(--cta); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--cta-soft); color: var(--cta-dark); }
.btn.ghost.on-dark { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(255,255,255,.22); }
.btn.ghost.on-dark:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn.white { background: #fff; color: var(--cta-dark); }
.btn.white:hover { background: #eceafe; color: var(--cta-dark); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }

/* ---- Hero (dark, bold mesh gradient) ----------------------------------- */
.hero { position: relative; overflow: hidden; background: #070b18; color: #fff; text-align: center; padding: 104px 0 92px; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(70% 55% at 50% -8%, rgba(99,102,241,.38), transparent 60%),
    linear-gradient(180deg, rgba(7,11,24,.70) 0%, rgba(7,11,24,.86) 55%, rgba(7,11,24,.97) 100%),
    url("https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?auto=format&fit=crop&w=2200&q=80");
  background-size: cover; background-position: center; }
.starfield { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.hero .wrap { position: relative; z-index: 3; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: #c7d2fe; background: rgba(99,102,241,.16); border: 1px solid rgba(129,140,248,.32); padding: 6px 15px; border-radius: 999px; margin-bottom: 24px; }
.hero .eyebrow .pulse { width: 7px; height: 7px; border-radius: 50%; background: #34d399; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.5); } 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.hero h1 { color: #fff; max-width: 22ch; margin: 0 auto 20px; text-wrap: balance; }
.hero h1 .grad { background: linear-gradient(90deg, #a5b4fc, #38bdf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: #aeb9cf; font-size: clamp(1.05rem, 2vw, 1.2rem); max-width: 60ch; margin: 0 auto; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hero .pulse { animation: none; } }

/* ---- API console ------------------------------------------------------- */
.console { max-width: 1080px; margin: 52px auto 0; text-align: left; border-radius: 15px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 34px 90px rgba(0,0,0,.55); background: var(--code-bg); position: relative; z-index: 3; }
.console-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: #10172b; border-bottom: 1px solid rgba(255,255,255,.08); }
.console-bar .dots { display: flex; gap: 7px; }
.console-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: #39405a; display: block; }
.console-bar .tabs { display: flex; gap: 4px; margin-left: auto; }
.console-bar .tab { background: transparent; border: 0; color: #8793ad; font-family: var(--mono); font-size: .8rem; padding: 5px 11px; border-radius: 6px; cursor: pointer; }
.console-bar .tab:hover { color: #cfd6e6; }
.console-bar .tab.active { background: rgba(99,102,241,.22); color: #c7d2fe; }
.console-body { display: grid; grid-template-columns: 1fr 1fr; }
.console-col { padding: 18px 20px; min-width: 0; }
.console-col.resp { background: #080c19; border-left: 1px solid rgba(255,255,255,.07); }
.console-label { font-family: var(--mono); font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: #6b7691; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.console-label .status { color: #34d399; }
.console pre { margin: 0; background: transparent; border: 0; padding: 0; font-family: var(--mono); font-size: .8rem; line-height: 1.7; color: #d6deee; overflow-x: auto; }
.console pre .k { color: #7dd3fc; }
.console pre .s { color: #86efac; }
.console pre .c { color: #647488; }
.console pre .m { color: #c4b5fd; }
.console .snippet { display: none; }
.console .snippet.active { display: block; }
@media (max-width: 720px) { .console-body { grid-template-columns: 1fr; } .console-col.resp { border-left: 0; border-top: 1px solid rgba(255,255,255,.07); } }

/* ---- Stats ------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 940px; margin: 0 auto; text-align: center; }
.stat .n { font-family: var(--display); font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.band.dark .stat .n { color: #fff; }
.stat .l { color: var(--ink-soft); font-size: .92rem; margin-top: 4px; }
.band.dark .stat .l { color: #97a3bb; }

/* ---- Feature cards (with Live/Coming) ---------------------------------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: 24px; text-align: left; color: var(--ink); position: relative; }
.band.alt .card, .band.alt2 .card { background: #fff; }
a.card { transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--cta); text-decoration: none; box-shadow: 0 14px 34px rgba(79,70,229,.13); transform: translateY(-2px); }
.card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--cta-soft); color: var(--cta); display: inline-flex; align-items: center; justify-content: center; }
.card .ico svg { width: 23px; height: 23px; }
.card h3 { margin-bottom: 6px; font-family: var(--display); }
.card p { color: var(--ink-soft); font-size: .93rem; }

/* ---- Steps ------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 980px; margin: 0 auto; }
.step { text-align: left; }
.step .num { font-family: var(--mono); font-size: .82rem; font-weight: 600; color: #fff; background: var(--cta); width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.step h3 { margin-bottom: 6px; font-family: var(--display); }
.step p { color: var(--ink-soft); font-size: .95rem; }

/* ---- Endpoint reference ------------------------------------------------ */
.endpoints { max-width: 880px; margin: 0 auto; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; background: #fff; }
.endpoints .row { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.endpoints .row:last-child { border-bottom: 0; }
.endpoints .m { font-family: var(--mono); font-size: .72rem; font-weight: 700; color: var(--ok); background: #e5f6ec; padding: 4px 10px; border-radius: 6px; flex: none; }
.endpoints .p { font-family: var(--mono); font-size: .9rem; color: var(--ink); flex: none; min-width: 155px; }
.endpoints .d { color: var(--ink-soft); font-size: .92rem; }

/* ---- Comparison -------------------------------------------------------- */
.compare { max-width: 840px; margin: 0 auto; border: 1px solid var(--line); border-radius: 15px; overflow: hidden; }
.compare table { width: 100%; border-collapse: collapse; background: #fff; }
.compare th, .compare td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
.compare thead th { background: var(--alt); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); font-family: var(--display); }
.compare td.us { font-weight: 700; color: var(--cta); }
.compare td.pk { color: var(--ink-soft); }
.compare tr:last-child td { border-bottom: 0; }

/* ---- FAQ --------------------------------------------------------------- */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 13px; padding: 2px 22px; margin-bottom: 12px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 700; font-family: var(--display); padding: 18px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cta); font-size: 1.4rem; font-weight: 300; flex: none; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { color: var(--ink-soft); padding: 0 0 18px; font-size: .96rem; }

/* ---- Page hero (subpages) ---------------------------------------------- */
.page-hero { position: relative; overflow: hidden; background: var(--night); color: #fff; text-align: center; padding: 74px 0 60px; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(60% 90% at 50% -20%, rgba(79,70,229,.45), transparent 62%), radial-gradient(40% 60% at 85% 10%, rgba(14,165,233,.3), transparent 60%); }
.page-hero .wrap { position: relative; z-index: 3; }
.page-hero .eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .13em; font-size: .73rem; font-weight: 700; color: #c7d2fe; background: rgba(99,102,241,.18); padding: 5px 13px; border-radius: 999px; margin-bottom: 14px; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.7rem); }
.page-hero p.lead { color: #aeb9cf; max-width: 56ch; margin: 14px auto 0; font-size: 1.05rem; }

/* ---- Forms ------------------------------------------------------------- */
.form-wrap { max-width: 720px; margin: -34px auto 0; position: relative; z-index: 5; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 30px; box-shadow: 0 18px 54px rgba(8,12,26,.14); }
.panel h3 { text-align: left; margin: 0 0 14px; font-family: var(--display); }
.field { margin-bottom: 18px; text-align: left; }
.field label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 7px; font-weight: 700; }
.field input, .field select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; font-family: var(--sans); background: #fff; color: var(--ink); }
.field input:focus, .field select:focus { outline: 2px solid var(--cta); outline-offset: 0; border-color: var(--cta); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: .82rem; color: var(--ink-soft); margin-top: 5px; }
.panel .btn { width: 100%; justify-content: center; margin-top: 4px; }

/* ---- Results ----------------------------------------------------------- */
.result { max-width: 720px; margin: 26px auto 0; text-align: left; }
.result.err { color: var(--bad); }
.result h2 { margin-bottom: 10px; }
.kv { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.kv th, .kv td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .96rem; vertical-align: top; }
.kv th { color: var(--ink-soft); font-weight: 600; }
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: .82rem; font-weight: 600; }
.badge.good { background: #e5f6ec; color: var(--ok); }
.badge.bad { background: #fbe9e9; color: var(--bad); }
details.raw { margin-top: 14px; }
details.raw summary { cursor: pointer; color: var(--ink-soft); font-size: .9rem; }
.result pre { background: var(--code-bg); color: #d6deee; padding: 16px; border-radius: 11px; overflow-x: auto; font-size: .84rem; font-family: var(--mono); }

/* ---- Docs -------------------------------------------------------------- */
.docs { max-width: 860px; margin: 0 auto; }
.docs h2 { margin: 1.8em 0 .5em; }
.docs h3 { margin: 1.6em 0 .4em; font-family: var(--display); }
.docs p { color: var(--ink-soft); margin-bottom: 1em; }
.docs pre { background: var(--code-bg); color: #d6deee; padding: 16px 18px; border-radius: 11px; overflow-x: auto; font-size: .85rem; font-family: var(--mono); margin: 0 0 16px; }
code.inline { background: var(--alt); padding: 2px 7px; border-radius: 5px; font-size: .9em; font-family: var(--mono); }

/* ---- Pricing ----------------------------------------------------------- */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; max-width: 1080px; margin: 0 auto; }
.price { background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 28px 24px; display: flex; flex-direction: column; text-align: left; }
.price.feat { border: 2px solid var(--cta); box-shadow: 0 18px 44px rgba(79,70,229,.16); }
.price .tag { display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--cta); background: var(--cta-soft); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; align-self: flex-start; }
.price .amt { font-family: var(--display); font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; }
.price .amt small { font-size: .9rem; color: var(--ink-soft); font-weight: 500; font-family: var(--sans); }
.price .was { color: var(--ink-soft); font-size: .85rem; margin-top: 4px; min-height: 1.2em; }
.price .was s { opacity: .8; }
.price ul { list-style: none; padding: 0; margin: 18px 0; flex: 1; }
.price li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; display: flex; gap: 8px; align-items: flex-start; }
.price li svg { width: 17px; height: 17px; color: var(--ok); flex: none; margin-top: 3px; }

/* ---- Footer ------------------------------------------------------------ */
footer.site { background: var(--night); color: #8e9ab4; padding: 56px 0 40px; }
footer.site h4 { color: #fff; font-family: var(--display); font-size: 1.05rem; margin: 0 0 8px; }
footer.site .cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; }
footer.site a { color: #8e9ab4; }
footer.site a:hover { color: #fff; }
footer.site nav { display: flex; flex-direction: column; gap: 9px; font-size: .93rem; }
footer.site .foot-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding-top: 22px; font-size: .86rem; color: #6c778f; }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 920px) { .grid { grid-template-columns: repeat(2, 1fr); } .price-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 28px; } .steps { grid-template-columns: 1fr; } .mm-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .megamenu { display: none !important; }
  nav.main { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--night); border-bottom: 1px solid rgba(255,255,255,.1); padding: 10px 16px; gap: 2px; }
  nav.main.open { display: flex; }
  nav.main > a, .has-menu > a { padding: 12px; }
  nav.main a.nav-cta { margin: 6px 0 0; text-align: center; justify-content: center; }
  .menu-btn { display: block; }
  .row2 { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; }
  .band { padding: 60px 0; }
  .endpoints .p { min-width: 0; }
}
