/* dbclaw website — shared styles */
:root {
  --bg: #0b1220;
  --bg-surface: #111827;
  --bg-elev: #161f31;
  --border: #1f2937;
  --text: #e5e7eb;
  --text-strong: #f8fafc;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-strong: #06b6d4;
  --accent-soft: rgba(34, 211, 238, 0.12);
  --radius: 10px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text-strong); font-size: 18px; letter-spacing: -0.02em; }
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #04121a; font-weight: 800; font-size: 13px;
}
.nav-links { margin-left: auto; display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--text); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius);
  font-weight: 600; font-size: 15px; cursor: pointer;
  border: 1px solid transparent; transition: all 0.15s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: #04121a; }
.btn-primary:hover { color: #04121a; filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .sub { font-weight: 400; opacity: 0.8; font-size: 13px; }

/* hero */
.hero { text-align: center; padding: 90px 0 60px; }
.badge {
  display: inline-block; font-size: 13px; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.08; margin: 0 0 18px; color: var(--text-strong); letter-spacing: -0.03em; }
.hero h1 .grad { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(17px, 2.5vw, 21px); color: var(--muted); max-width: 680px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* sections */
section { padding: 56px 0; }
.section-title { font-size: 28px; color: var(--text-strong); margin: 0 0 8px; letter-spacing: -0.02em; }
.section-sub { color: var(--muted); margin: 0 0 36px; font-size: 16px; }
.center { text-align: center; }

/* feature grid */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.card h3 { margin: 0 0 8px; color: var(--text-strong); font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .ico { font-size: 22px; margin-bottom: 12px; display: block; }

/* database / provider pills */
.pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pill {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: 999px; padding: 7px 16px; font-size: 14px; color: var(--text);
}

/* download section */
.downloads { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 8px; }
.dl-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 10px;
}
.dl-card h3 { margin: 0; color: var(--text-strong); font-size: 17px; }
.dl-card .desc { color: var(--muted); font-size: 14px; flex: 1; }
.dl-card .meta { font-size: 13px; color: var(--muted); }
.dl-card.primary { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.warn {
  margin-top: 22px; font-size: 14px; color: var(--muted);
  background: var(--bg-elev); border: 1px solid var(--border); border-left: 3px solid var(--accent);
  padding: 12px 16px; border-radius: 8px;
}

/* docs layout */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; padding-top: 32px; }
.toc { position: sticky; top: 76px; font-size: 14px; }
.toc h4 { color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: 0.05em; margin: 0 0 10px; }
.toc a { display: block; color: var(--muted); padding: 5px 0; }
.toc a:hover { color: var(--text); }
.doc-content { min-width: 0; }
.doc-content h2 { color: var(--text-strong); font-size: 24px; margin: 40px 0 14px; padding-top: 8px; letter-spacing: -0.01em; }
.doc-content h2:first-child { margin-top: 0; }
.doc-content h3 { color: var(--text-strong); font-size: 18px; margin: 26px 0 10px; }
.doc-content p, .doc-content li { color: var(--text); font-size: 15.5px; }
.doc-content ul, .doc-content ol { padding-left: 22px; }
.doc-content code { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 13.5px; color: var(--accent); font-family: ui-monospace, "Cascadia Code", Consolas, monospace; }
.doc-content pre { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; overflow-x: auto; }
.doc-content pre code { background: none; border: none; color: var(--text); padding: 0; }
table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--text-strong); }
td { color: var(--muted); }
td strong, td code { color: var(--text); }
.callout { background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 8px; padding: 12px 16px; margin: 16px 0; font-size: 14.5px; }

/* footer */
footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }
footer a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .docs { grid-template-columns: 1fr; }
  .toc { position: static; margin-bottom: 24px; }
  .nav-links { gap: 14px; }
  .nav-links a.hide-sm { display: none; }
}

/* ---- motion ---- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute; inset: -40% 0 auto 0; height: 600px; z-index: -1;
  background: radial-gradient(60% 60% at 50% 0%, rgba(34, 211, 238, 0.18), transparent 70%);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: drift 16s ease-in-out infinite alternate; }
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .reveal.in { opacity: 1; transform: none; }
  .anim-rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .badge.anim-rise { animation-delay: 0.02s; }
  h1.anim-rise { animation-delay: 0.09s; }
  .lead.anim-rise { animation-delay: 0.17s; }
  .hero-actions.anim-rise { animation-delay: 0.25s; }
  .hero-note.anim-rise { animation-delay: 0.33s; }
  /* staggered card reveals */
  .grid .reveal:nth-child(2) { transition-delay: 0.06s; }
  .grid .reveal:nth-child(3) { transition-delay: 0.12s; }
  .grid .reveal:nth-child(4) { transition-delay: 0.18s; }
  .grid .reveal:nth-child(5) { transition-delay: 0.06s; }
  .grid .reveal:nth-child(6) { transition-delay: 0.12s; }
  .grid .reveal:nth-child(7) { transition-delay: 0.18s; }
  .btn { transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
  .card, .dl-card { transition: transform 0.2s ease, border-color 0.2s ease; }
  .card:hover, .dl-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
}

@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes drift {
  from { transform: translate(-4%, -3%) scale(1); }
  to { transform: translate(4%, 4%) scale(1.15); }
}

/* ---- blog ---- */
.blog-head { text-align: center; padding: 56px 0 8px; }
.blog-head h1 { font-size: clamp(30px, 5vw, 44px); color: var(--text-strong); letter-spacing: -0.02em; margin: 0 0 10px; }
.blog-head p { color: var(--muted); font-size: 17px; margin: 0 auto; max-width: 620px; }

.post-list { display: grid; gap: 16px; max-width: 820px; margin: 28px auto 0; }
.post-card {
  display: block; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.post-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.post-card h2 { margin: 6px 0 8px; color: var(--text-strong); font-size: 20px; letter-spacing: -0.01em; }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; }
.post-card .post-meta { color: var(--muted); font-size: 13px; }
.tag { display: inline-block; background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 999px; padding: 2px 10px; font-size: 12px; }

/* article */
.article { max-width: 768px; margin: 0 auto; padding-top: 36px; }
.article h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; color: var(--text-strong); letter-spacing: -0.02em; margin: 0 0 14px; }
.article-meta { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.article-meta a { color: var(--muted); }
.article-meta a:hover { color: var(--accent); }
.sep { opacity: 0.5; }
.article-lead { font-size: 19px; color: var(--muted); margin: 0 0 30px; line-height: 1.5; }
.article-cta { background: var(--bg-surface); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: var(--radius); padding: 26px; margin: 40px 0 10px; text-align: center; }
.article-cta h3 { margin: 0 0 6px; color: var(--text-strong); font-size: 20px; }
.article-cta p { margin: 0 0 16px; color: var(--muted); }
.article-more { border-top: 1px solid var(--border); margin-top: 36px; padding-top: 22px; }
.article-more h4 { color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: 0.05em; margin: 0 0 12px; }
.article-more a { display: block; padding: 4px 0; }
