:root {
  --bg: #f6f7f5;
  --surface: #ffffff;
  --alt: #eef1ee;
  --ink: #0b1724;
  --ink-2: #3b4856;
  --muted: #6a7682;
  --line: #dde2e0;
  --accent: #1a63d6;
  --accent-ink: #ffffff;
  --accent-soft: #e4edfb;
  --sun: #f2b705;
  --ok: #138a4b;
  --bad: #c2410c;
  --code-bg: #0b1724;
  --code-ink: #d7e0ea;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(11 23 36 / .06), 0 12px 32px -12px rgb(11 23 36 / .18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a121b;
    --surface: #111c27;
    --alt: #0e1822;
    --ink: #eaf0f5;
    --ink-2: #b6c2cd;
    --muted: #8593a0;
    --line: #213040;
    --accent: #4d8ff0;
    --accent-ink: #06101b;
    --accent-soft: #14253b;
    --ok: #3cc47c;
    --bad: #f08a5d;
    --code-bg: #060d14;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .9em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

.muted { color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink);
  font: 600 .95rem/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { background: var(--surface); box-shadow: none; }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: .875rem; }
.btn--block { width: 100%; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.nav__links { display: none; gap: 24px; margin-left: auto; }
.nav__links a { color: var(--ink-2); font-size: .925rem; font-weight: 500; }
.nav__links a:hover { color: var(--ink); text-decoration: none; }
.nav .btn { margin-left: auto; }
@media (min-width: 820px) {
  .nav__links { display: flex; }
  .nav .btn { margin-left: 0; }
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand__mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--ink); color: var(--bg); font: 800 .8rem/1 var(--font); letter-spacing: -.02em;
  position: relative;
}
.brand__mark::after {
  content: ""; position: absolute; right: -3px; top: -3px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--sun); border: 2px solid var(--bg);
}
.brand__name { font-weight: 750; letter-spacing: -.02em; font-size: 1.02rem; }
.brand__name span { color: var(--muted); font-weight: 500; }
@media (max-width: 400px) { .brand__name span { display: none; } }

/* Hero */
.hero { padding: 56px 0 64px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 300px at 85% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(500px 260px at 10% 90%, color-mix(in srgb, var(--sun) 10%, transparent), transparent 70%);
}
.hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) { .hero__grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } .hero { padding: 88px 0 96px; } }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; letter-spacing: -.035em; margin: 16px 0 20px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 36em; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; padding: 0; margin: 32px 0 0; color: var(--muted); font-size: .925rem; }
.hero__facts strong { color: var(--ink); font-size: 1.15rem; margin-right: 4px; }

/* Code card */
.code {
  background: var(--code-bg); color: var(--code-ink); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; min-width: 0;
  border: 1px solid color-mix(in srgb, #fff 8%, transparent);
}
.code__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid rgb(255 255 255 / .07); }
.code__bar span { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / .16); }
.code__bar p { margin-left: 10px; font: 500 .78rem var(--mono); color: rgb(255 255 255 / .55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font: 400 .8rem/1.7 var(--mono); }
@media (min-width: 640px) { .code pre { font-size: .84rem; } }
.code__note { padding: 0 20px 14px; font-size: .75rem; color: rgb(255 255 255 / .4); }
.c-key { color: #8fc1ff; }
.c-str { color: #a6e3a1; }
.c-num { color: #f9c86b; }
.c-mute { color: rgb(255 255 255 / .38); }

/* Sections */
.section { padding: 72px 0; }
.section--tight { padding: 8px 0 72px; }
.section--alt { background: var(--alt); border-block: 1px solid var(--line); }
@media (min-width: 980px) { .section { padding: 104px 0; } }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section__head:last-child { margin-bottom: 0; }
.section__head h2 { margin: 10px 0 14px; }
.section__head p:not(.eyebrow) { color: var(--ink-2); }
.section__head--left { text-align: left; margin: 0; }
.h-sm { font-size: 1.05rem; font-weight: 700; margin-bottom: 14px; letter-spacing: -.01em; }

/* Lists */
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--ink-2); }
.list li { position: relative; padding-left: 28px; }
.list li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%;
  background-repeat: no-repeat; background-position: center; background-size: 12px;
}
.list--check li::before {
  background-color: color-mix(in srgb, var(--ok) 15%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23138a4b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.list--x li::before {
  background-color: color-mix(in srgb, var(--bad) 14%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c2410c' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E");
}

/* Pain */
.pain {
  display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
.pain > div { padding: 28px; }
.pain > div + div { border-top: 1px solid var(--line); }
@media (min-width: 820px) {
  .pain { grid-template-columns: 1fr 1fr; }
  .pain > div { padding: 36px 40px; }
  .pain > div + div { border-top: 0; border-left: 1px solid var(--line); }
}

/* Features */
.features { display: grid; gap: 16px; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature h3 { margin: 16px 0 8px; }
.feature p { color: var(--ink-2); font-size: .95rem; }
.feature__icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); }
.feature__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* API */
.api { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .api { grid-template-columns: .9fr 1.1fr; gap: 64px; } }
.api .section__head p + p { margin-top: 12px; }
.endpoints { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.ep { display: grid; grid-template-columns: 56px 1fr; gap: 4px 14px; padding: 16px 20px; align-items: center; }
.ep + .ep { border-top: 1px solid var(--line); }
.ep code { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.ep > span:last-child { grid-column: 2; color: var(--muted); font-size: .9rem; }
@media (min-width: 640px) { .ep { grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1.2fr); } .ep > span:last-child { grid-column: auto; } }
.ep__m { font: 700 .7rem var(--mono); letter-spacing: .04em; padding: 5px 0; border-radius: 6px; text-align: center; }
.ep__m--get { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.ep__m--post { background: var(--accent-soft); color: var(--accent); }

/* Plans */
.plans { display: grid; gap: 16px; }
@media (min-width: 700px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.plan h3 { font-size: 1.3rem; }
.plan__for { color: var(--muted); font-size: .9rem; margin: 4px 0 20px; }
.plan .list { font-size: .93rem; }
.plan--featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan__tag {
  position: absolute; top: -12px; left: 24px; padding: 3px 10px; border-radius: 99px;
  background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 650;
}

/* Signup */
.signup { display: grid; gap: 40px; align-items: start; }
@media (min-width: 980px) { .signup { grid-template-columns: .85fr 1.15fr; gap: 64px; } }
.signup__copy h2 { margin: 10px 0 14px; }
.signup__copy > p:not(.eyebrow) { color: var(--ink-2); margin-bottom: 24px; }
.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px; display: grid; gap: 16px;
}
@media (min-width: 640px) { .form { padding: 32px; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label, .label { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select {
  width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink);
  font: 400 1rem var(--font);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--bad); }
.form__msg { font-size: .92rem; min-height: 1.4em; text-align: center; }
.form__msg.is-ok { color: var(--ok); font-weight: 600; }
.form__msg.is-error { color: var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* FAQ */
.faq { display: grid; gap: 32px; }
@media (min-width: 980px) { .faq { grid-template-columns: .7fr 1.3fr; gap: 64px; } }
.faq__list { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; font-weight: 600; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; font-weight: 400; color: var(--muted); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--ink-2); }

/* Footer */
.footer { padding: 40px 0; border-top: 1px solid var(--line); }
.footer__inner { display: grid; gap: 14px; font-size: .875rem; }
@media (min-width: 820px) { .footer__inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 32px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
