/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:        #0d0f14;
  --color-bg-2:      #13161d;
  --color-bg-3:      #1a1d26;
  --color-border:    #252834;
  --color-text:      #e2e4ed;
  --color-muted:     #7c8096;
  --color-accent:    #4f8ef7;
  --color-accent-2:  #7c5ef7;
  --color-green:     #3fcf8e;
  --color-red:       #f7564f;
  --color-code-bg:   #1e2130;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --font-sans:  -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif;
  --font-mono:  "SF Mono", "JetBrains Mono", "Fira Code", monospace;

  --max-w: 1120px;
  --section-gap: 100px;
}

html { scroll-behavior: smooth; }

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

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--color-code-bg);
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  color: #a9c2ff;
}

img { display: block; max-width: 100%; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: var(--section-gap) 0; }

.section__title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.section__sub {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 560px;
  margin-bottom: 56px;
}

/* ── Gradient text ────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: opacity .15s, transform .15s;
  border: none;
  text-decoration: none;
}
.btn:hover { opacity: .85; transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-2));
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn--ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }

.btn--sm { padding: 8px 16px; font-size: 0.875rem; }

/* ── Nav ──────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 15, 20, 0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  display: flex;
  align-items: center;
  height: 60px;
  gap: 32px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo img { border-radius: 8px; }

.nav__links {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
  margin-left: auto;
}
.nav__links a {
  color: var(--color-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color .15s;
}
.nav__links a:hover { color: var(--color-text); text-decoration: none; }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  padding: 100px 0 80px;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(79,142,247,.12) 0%, transparent 70%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.hero__eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--color-muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.75;
}

.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hero__note {
  font-size: 0.78rem;
  color: var(--color-muted);
}

.hero__icon {
  width: clamp(120px, 14vw, 180px);
  height: auto;
  border-radius: 28%;
  box-shadow: 0 32px 80px rgba(79,142,247,.2), 0 8px 24px rgba(0,0,0,.4);
}

/* ── Strip ────────────────────────────────────────── */
.strip {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-2);
  padding: 18px 0;
}
.strip__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
  justify-content: center;
}
.strip__dot { opacity: .3; }

/* ── Features ─────────────────────────────────────── */
.features { background: var(--color-bg); }

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card--wide {
  grid-column: span 3;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0 24px;
  align-items: start;
}

.feature-card {
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover {
  border-color: rgba(79,142,247,.4);
  transform: translateY(-2px);
}

.feature-card--wide .feature-card__icon {
  grid-row: 1 / 3;
  font-size: 2rem;
  line-height: 1;
  padding-top: 2px;
}
.feature-card--wide h3 { grid-column: 2; }
.feature-card--wide p  { grid-column: 2; }
.feature-card--wide .feature-card__link {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
}

.feature-card__icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
  display: block;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
}

.feature-card__link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* ── Compare table ────────────────────────────────── */
.why { background: var(--color-bg-2); }

.compare { overflow-x: auto; }

.compare__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.compare__table th,
.compare__table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.compare__table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  background: var(--color-bg-3);
}
.compare__table td:first-child { color: var(--color-muted); }
.compare__table td:nth-child(2) { color: var(--color-muted); font-style: italic; }
.compare__ours {
  color: var(--color-green) !important;
  font-weight: 600;
  font-style: normal !important;
}
.compare__table thead .compare__ours {
  color: var(--color-green) !important;
  font-style: normal !important;
}
.compare__table tbody tr:hover td { background: rgba(255,255,255,.02); }

/* ── Pricing ──────────────────────────────────────── */
.pricing { background: var(--color-bg); }

.pricing__cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 760px;
}

.pricing__card {
  background: var(--color-bg-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.pricing__card--featured {
  border-color: var(--color-accent);
  background: linear-gradient(160deg, rgba(79,142,247,.06) 0%, var(--color-bg-2) 60%);
  box-shadow: 0 0 40px rgba(79,142,247,.1);
}

.pricing__badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  background: var(--color-bg-3);
  padding: 4px 10px;
  border-radius: 100px;
  align-self: flex-start;
}
.pricing__badge--pro {
  color: var(--color-accent);
  background: rgba(79,142,247,.12);
}

.pricing__card h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.pricing__price {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--color-text);
}
.pricing__price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-muted);
}

.pricing__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.pricing__list li {
  font-size: 0.9rem;
  color: var(--color-muted);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.pricing__list li::before {
  content: "✓";
  color: var(--color-green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ── Footer ───────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-2);
  padding: 40px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}
.footer__brand img { border-radius: 6px; }

.footer__nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__nav a {
  font-size: 0.875rem;
  color: var(--color-muted);
}
.footer__nav a:hover { color: var(--color-text); }

.footer__copy {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* ── Docs layout ──────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  min-height: calc(100vh - 60px);
}

.docs-layout--prose {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.docs-sidebar {
  border-right: 1px solid var(--color-border);
  padding: 32px 20px;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--color-bg-2);
}

.docs-sidebar__title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 10px;
  padding: 0 8px;
}

.docs-sidebar__nav { list-style: none; }
.docs-sidebar__nav li { margin-bottom: 2px; }
.docs-sidebar__nav a {
  display: block;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--color-muted);
  transition: background .15s, color .15s;
}
.docs-sidebar__nav a:hover,
.docs-sidebar__nav a.active {
  background: rgba(79,142,247,.12);
  color: var(--color-accent);
  text-decoration: none;
}

.docs-sidebar__section { margin-top: 28px; }

.docs-content {
  padding: 48px 56px;
  max-width: 820px;
}

.docs-content h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.docs-content .lead {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 40px;
  line-height: 1.75;
}
.docs-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 44px 0 16px;
  padding-top: 44px;
  border-top: 1px solid var(--color-border);
}
.docs-content h2:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.docs-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 28px 0 12px;
}
.docs-content p { color: var(--color-muted); margin-bottom: 16px; line-height: 1.8; }
.docs-content p a { font-weight: 500; }
.docs-content ul, .docs-content ol {
  color: var(--color-muted);
  padding-left: 22px;
  margin-bottom: 16px;
  line-height: 1.8;
}
.docs-content li { margin-bottom: 4px; }

.docs-content pre {
  background: var(--color-code-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 24px;
}
.docs-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  color: #c9d1d9;
  border-radius: 0;
}

.docs-content .callout {
  border-left: 3px solid var(--color-accent);
  background: rgba(79,142,247,.07);
  padding: 14px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
}
.docs-content .callout p { margin: 0; color: var(--color-text); font-size: 0.9rem; }

.docs-content .callout--warn {
  border-left-color: #f7a84f;
  background: rgba(247,168,79,.07);
}

.docs-nav-footer {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--color-border);
  gap: 16px;
}
.docs-nav-footer a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .features__grid { grid-template-columns: 1fr 1fr; }
  .feature-card--wide {
    grid-column: span 2;
    grid-template-columns: auto 1fr;
  }
  .feature-card--wide .feature-card__link { grid-column: 2; grid-row: auto; }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }

  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }
  .docs-content { padding: 32px 20px; }

  .pricing__cards { grid-template-columns: 1fr; max-width: 420px; }
  .footer__copy { margin-left: 0; }
}

@media (max-width: 640px) {
  .features__grid { grid-template-columns: 1fr; }
  .feature-card--wide { grid-column: span 1; grid-template-columns: 1fr; }
  .feature-card--wide .feature-card__icon { grid-row: auto; font-size: 1.6rem; margin-bottom: 12px; }
  .feature-card--wide h3, .feature-card--wide p, .feature-card--wide .feature-card__link { grid-column: 1; }

  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0; right: 0;
    background: var(--color-bg-2);
    border-bottom: 1px solid var(--color-border);
    padding: 16px 24px 24px;
    gap: 16px;
  }
  .nav__burger { display: flex; }

  .hero { padding: 60px 0 48px; }
  .section { padding: 64px 0; }
}
