/* === img-cloud public site === */

:root {
  --bg: #ffffff;
  --bg-2: #f7f9fc;
  --bg-3: #eef2f7;
  --ink: #0b1220;
  --ink-2: #303a4a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #4338ca;
  --brand-2: #6366f1;
  --brand-3: #818cf8;
  --accent: #06b6d4;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 32px -8px rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 1px 3px rgba(15, 23, 42, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
section { padding: 80px 24px; }
.container { max-width: 1120px; margin: 0 auto; }

/* === Top nav === */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 32px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--ink) !important;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 14px;
}
.nav-links { display: flex; gap: 28px; flex: 1; }
.nav-links a {
  color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.nav-links a:hover { color: var(--brand); text-decoration: none; }
.nav-cta { display: flex; gap: 10px; align-items: center; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.15s ease;
  font-family: inherit;
}
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: #1a2436; text-decoration: none; }
.btn-brand {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: white; border: 0;
}
.btn-brand:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg-2); text-decoration: none; }
.btn-lg { padding: 14px 24px; font-size: 15px; }

/* === Hero === */
.hero {
  padding: 80px 24px 100px;
  background: radial-gradient(1200px 600px at 50% -100px, rgba(99,102,241,0.18), rgba(99,102,241,0) 60%),
              radial-gradient(800px 400px at 80% 0%, rgba(6,182,212,0.16), rgba(6,182,212,0) 60%),
              var(--bg);
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1120px; margin: 0 auto; text-align: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(99,102,241,0.1); color: var(--brand);
  font-size: 13px; font-weight: 600; margin-bottom: 22px;
  border: 1px solid rgba(99,102,241,0.2);
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 22px;
  font-weight: 800;
  background: linear-gradient(180deg, var(--ink) 0%, #2b3850 100%);
  background-clip: text; -webkit-background-clip: text; color: transparent;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  background-clip: text; -webkit-background-clip: text; color: transparent;
}
.hero p.lead {
  font-size: 19px; color: var(--ink-2); max-width: 720px;
  margin: 0 auto 36px; line-height: 1.55;
}
.hero-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-trust {
  margin-top: 64px; display: flex; gap: 28px; flex-wrap: wrap; justify-content: center;
  color: var(--muted); font-size: 13px;
}
.hero-trust strong { color: var(--ink); }

/* === Features grid === */
.features {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature {
  padding: 28px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--line);
  transition: all 0.15s ease;
}
.feature:hover { border-color: var(--brand-2); box-shadow: var(--shadow); transform: translateY(-2px); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: white; margin-bottom: 16px;
}
.feature h3 { margin: 0 0 8px; font-size: 18px; }
.feature p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* === Section heads === */
.section-head { text-align: center; margin-bottom: 56px; }
.section-eyebrow {
  display: inline-block; padding: 4px 12px; border-radius: 6px;
  background: var(--bg-3); color: var(--brand); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px;
}
.section-head h2 {
  margin: 0 0 14px; font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.02em;
  font-weight: 800; line-height: 1.15;
}
.section-head p { margin: 0 auto; max-width: 640px; color: var(--ink-2); font-size: 16px; }

/* === Code panes === */
.code-block {
  background: #0b1220; color: #e3e8f0;
  border-radius: var(--radius); padding: 20px 24px;
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  overflow-x: auto; white-space: pre;
  border: 1px solid #1a2436;
  box-shadow: var(--shadow);
}
.code-block .key  { color: #c084fc; }
.code-block .str  { color: #86efac; }
.code-block .com  { color: #6b7280; font-style: italic; }
.code-block .fn   { color: #7dd3fc; }
.code-block .num  { color: #fcd34d; }

.tabbed-code { background: #0b1220; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #1a2436; }
.tabbed-code .tabs { display: flex; border-bottom: 1px solid #1a2436; padding: 0 14px; }
.tabbed-code .tabs button {
  background: transparent; border: 0; color: #94a3b8; padding: 14px 18px;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border-bottom: 2px solid transparent;
}
.tabbed-code .tabs button.active { color: white; border-bottom-color: var(--accent); }
.tabbed-code pre { margin: 0; padding: 22px 24px; color: #e3e8f0; font-family: var(--mono); font-size: 13px; line-height: 1.6; overflow-x: auto; }

/* === Two-col === */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; gap: 32px; } }
.two-col h2 { margin: 0 0 16px; font-size: 32px; letter-spacing: -0.02em; line-height: 1.2; }
.two-col p { color: var(--ink-2); margin: 0 0 12px; }
.bullet-list { list-style: none; padding: 0; margin: 20px 0 0; }
.bullet-list li {
  padding: 10px 0 10px 32px; position: relative; color: var(--ink-2);
}
.bullet-list li::before {
  content: ""; position: absolute; left: 0; top: 14px;
  width: 18px; height: 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.4-1.4z'/></svg>") center/contain no-repeat;
}

/* === Dark callout === */
.cta-band {
  background: linear-gradient(135deg, var(--ink) 0%, #1a2540 100%);
  color: white; border-radius: 24px; padding: 56px 48px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
}
.cta-band h2 { margin: 0 0 8px; color: white; font-size: 28px; letter-spacing: -0.02em; }
.cta-band p { margin: 0; color: #b5bcc9; }
@media (max-width: 720px) { .cta-band { grid-template-columns: 1fr; text-align: center; padding: 36px 24px; } }

/* === Pricing-style cards === */
.usecase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.usecase {
  padding: 28px; border-radius: var(--radius);
  background: var(--bg-2); border: 1px solid var(--line);
}
.usecase h4 { margin: 0 0 8px; font-size: 16px; }
.usecase p { margin: 0; font-size: 14px; color: var(--ink-2); }
.usecase-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: white; border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
  color: var(--brand);
}

/* === Footer === */
.footer { background: var(--bg-2); border-top: 1px solid var(--line); padding: 48px 24px 24px; }
.footer-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
.footer h5 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.footer a { color: var(--ink-2); display: block; padding: 6px 0; font-size: 14px; }
.footer a:hover { color: var(--brand); text-decoration: none; }
.footer-bottom {
  max-width: 1120px; margin: 36px auto 0; padding-top: 20px;
  border-top: 1px solid var(--line); display: flex; justify-content: space-between;
  color: var(--muted); font-size: 13px; flex-wrap: wrap; gap: 12px;
}

/* === Login page === */
.auth-shell {
  min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
@media (max-width: 880px) { .auth-shell { grid-template-columns: 1fr; } }
.auth-side {
  padding: 48px; display: flex; flex-direction: column;
  justify-content: space-between; background: var(--bg-2);
  border-right: 1px solid var(--line); position: relative; overflow: hidden;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 400px at 0% 100%, rgba(99,102,241,0.18), transparent 60%),
              radial-gradient(600px 300px at 100% 0%, rgba(6,182,212,0.14), transparent 60%);
}
.auth-side > * { position: relative; z-index: 1; }
.auth-quote { font-size: 22px; line-height: 1.4; max-width: 460px; }
.auth-quote .quote-mark { font-size: 60px; color: var(--brand); line-height: 0.5; }
.auth-form-wrap { padding: 48px; display: flex; align-items: center; justify-content: center; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -0.02em; }
.auth-form .sub { color: var(--muted); margin: 0 0 28px; }
.field { display: block; margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: white; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(67,56,202,0.12); }
.btn-block { width: 100%; justify-content: center; padding: 12px 16px; }
.alert {
  padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px;
  margin-bottom: 16px;
}
.alert-error { background: #fef2f2; color: var(--bad); border: 1px solid #fecaca; }
.alert-info  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.auth-meta { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13px; }

/* === Docs === */
.docs-shell {
  display: grid; grid-template-columns: 250px 1fr; gap: 0;
  max-width: 1280px; margin: 0 auto;
}
@media (max-width: 880px) { .docs-shell { grid-template-columns: 1fr; } }
.docs-sidebar {
  border-right: 1px solid var(--line); padding: 40px 24px; position: sticky; top: 64px;
  height: calc(100vh - 64px); overflow-y: auto;
}
.docs-sidebar h4 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: 0.06em; }
.docs-sidebar a { display: block; padding: 6px 0; color: var(--ink-2); font-size: 14px; }
.docs-sidebar a:hover { color: var(--brand); text-decoration: none; }
.docs-content {
  padding: 40px 56px; max-width: 880px;
}
.docs-content h1 { margin: 0 0 16px; font-size: 36px; letter-spacing: -0.02em; }
.docs-content h2 { margin: 40px 0 16px; font-size: 24px; letter-spacing: -0.01em; }
.docs-content h3 { margin: 28px 0 12px; font-size: 18px; }
.docs-content p { color: var(--ink-2); }
.docs-content code:not(.code-block code) {
  background: var(--bg-3); padding: 2px 6px; border-radius: 4px;
  font-family: var(--mono); font-size: 13px; color: var(--brand);
}
.docs-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.docs-content th, .docs-content td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }
.docs-content th { background: var(--bg-2); font-weight: 600; }
.docs-content .code-block { margin: 16px 0; }
