/* =============================================================================
 * site.css — shared styles for the o-flow marketing site, blog and docs.
 * (The diagram app itself uses css/styles.css.)
 * =========================================================================== */
:root {
  --brand: #2f6bff;
  --brand-dark: #1e4fd0;
  --ink: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --bg-tint: #eef3ff;
  --radius: 12px;
  --max: 1140px;
  --shadow: 0 1px 3px rgba(15,23,42,.08), 0 8px 24px rgba(15,23,42,.06);
}
* { box-sizing: border-box; }
/* Reserve the scrollbar gutter on every page so the centred header (and logo)
 * sits at the exact same x whether a page scrolls or not. */
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0; color: var(--body); background: var(--bg);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2.6rem; letter-spacing: -.02em; }
h2 { font-size: 1.9rem; letter-spacing: -.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ── Header / nav ───────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: flex; align-items: center; flex: 1 1 0; }
.logo svg, .logo img { height: 27px; width: auto; display: block; }
.nav { display: flex; gap: 26px; flex: 0 0 auto; justify-content: center; }
.nav a { color: var(--ink); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--brand); text-decoration: none; }
.header-cta { display: flex; gap: 10px; align-items: center; flex: 1 1 0; justify-content: flex-end; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 15px; border-radius: 10px;
  padding: 11px 20px; border: 1px solid transparent; transition: .15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero { background: radial-gradient(1200px 500px at 50% -10%, var(--bg-tint), #fff 70%); padding: 80px 0 64px; }
.hero h1 { font-size: 3.1rem; max-width: 16ch; margin-inline: auto; }
.hero p.lead { font-size: 1.2rem; max-width: 60ch; margin: 0 auto 28px; color: var(--body); }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  background: var(--bg-tint); color: var(--brand-dark); font-weight: 600;
  font-size: 13px; padding: 8px 14px; border-radius: 999px; margin-bottom: 18px;
  animation: pillGlow 2.6s ease-in-out infinite; }
@keyframes pillGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47,107,255,0), 0 0 8px rgba(47,107,255,.12); }
  50%      { box-shadow: 0 0 0 3px rgba(47,107,255,.12), 0 0 20px rgba(47,107,255,.40); }
}
@media (prefers-reduced-motion: reduce) { .pill { animation: none; } }

/* ── Sections ───────────────────────────────────────────────────── */
section { padding: 64px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 44px; }
.section-head p { font-size: 1.08rem; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } .nav { display: none; } .hero h1 { font-size: 2.2rem; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 6px; }
.card .ico { width: 46px; height: 46px; border-radius: 10px; background: var(--bg-tint);
  display: grid; place-items: center; margin-bottom: 14px; }

/* feature illustration block (alternating) */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin: 48px 0; }
.feature-row.reverse .illus { order: -1; }
.feature-row .illus { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; } .feature-row.reverse .illus { order: 0; } }

/* ── Pricing ────────────────────────────────────────────────────── */
.price-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; max-width: 760px; margin: 0 auto; }
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }
.price-card { background:#fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 3px var(--bg-tint); }
.price { font-size: 2.6rem; font-weight: 800; color: var(--ink); }
.price span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 18px 0 24px; }
.price-card li { padding: 7px 0 7px 28px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* ── Blog ───────────────────────────────────────────────────────── */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 860px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; background:#fff; border:1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.post-card:hover { transform: translateY(-3px); text-decoration: none; }
.post-card .thumb { background: var(--bg-tint); aspect-ratio: 16/9; display:grid; place-items:center; }
.post-card .thumb svg { width: 78%; height: 78%; }
.post-card .pc-body { padding: 18px 20px 22px; }
.post-card .tag { font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .06em; }
.post-card h3 { margin: 8px 0; color: var(--ink); }
.post-card p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* article (single post / doc) */
.article { max-width: 760px; margin: 0 auto; padding: 56px 0; }
.article .kicker { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.article h1 { margin: 8px 0 12px; font-size: 2.5rem; }
.article .byline { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.article figure { margin: 28px 0; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.article figure figcaption { text-align: center; color: var(--muted); font-size: 13px; margin-top: 10px; }
.article h2 { margin-top: 36px; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 6px 0; }
.article blockquote { border-left: 3px solid var(--brand); margin: 24px 0; padding: 4px 0 4px 20px; color: var(--ink); font-size: 1.15rem; }
.article code { background: var(--bg-tint); color: var(--brand-dark); padding: 2px 6px; border-radius: 5px; font-size: .9em; }
.article pre { background: #0f172a; color: #e2e8f0; padding: 18px 20px; border-radius: 10px; overflow:auto; }
.article pre code { background: none; color: inherit; padding: 0; }

/* comparison table */
.cmp { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 15px; }
.cmp th, .cmp td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.cmp th { background: var(--bg-soft); color: var(--ink); }
.cmp td.yes { color: #16a34a; font-weight: 700; }
.cmp td.no { color: #dc2626; }

/* ── Docs layout ────────────────────────────────────────────────── */
.docs { display: grid; grid-template-columns: 260px 1fr; gap: 40px; max-width: var(--max); margin: 0 auto; padding: 40px 24px; }
.docs-side { position: sticky; top: 88px; align-self: start; }
.docs-side h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 18px 0 8px; }
.docs-side a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--body); font-size: 14.5px; }
.docs-side a:hover, .docs-side a.active { background: var(--bg-tint); color: var(--brand-dark); text-decoration: none; }
.docs-main { min-width: 0; }
.docs-main table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
.docs-main th, .docs-main td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.docs-main th { background: var(--bg-soft); }
.docs-main pre { background:#0f172a; color:#e2e8f0; padding:16px 18px; border-radius:10px; overflow:auto; font-size: 13.5px; }
.docs-main code { background: var(--bg-tint); color: var(--brand-dark); padding: 2px 6px; border-radius: 5px; }
.docs-main pre code { background:none; color:inherit; padding:0; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .docs-side { position: static; } }

/* ── Footer ─────────────────────────────────────────────────────── */
.site-footer { background: #0f172a; color: #cbd5e1; padding: 56px 0 32px; margin-top: 40px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 8px 0; font-size: 14px; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 36px; padding-top: 20px; font-size: 13px; color: #94a3b8; }

/* badges */
.kbd { background:#fff; border:1px solid var(--line); border-bottom-width:2px; border-radius:6px; padding:1px 7px; font-size:13px; font-family: ui-monospace, monospace; color: var(--ink); }
