/* Basquin site — shared styles. Self-contained: no external fonts/CDNs. */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-code: #f2f3f5;
  --panel: #ffffff;
  --border: #e3e6ea;
  --text: #1a1d21;
  --text-muted: #5b6470;
  --heading: #0d1117;
  --accent: #5b3df5;
  --accent-2: #7c5cff;
  --accent-soft: #efeaff;
  --link: #5b3df5;
  --ok: #1a7f37;
  --warn: #b7791f;
  --term-bg: #0f1117;
  --term-text: #d7dae0;
  --shadow: 0 1px 2px rgba(16, 22, 30, .06), 0 8px 24px rgba(16, 22, 30, .06);
  --radius: 12px;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --bg-alt: #12161d;
    --bg-code: #161b22;
    --panel: #12161d;
    --border: #262c36;
    --text: #d7dae0;
    --text-muted: #9aa4b2;
    --heading: #f0f3f6;
    --accent: #a48bff;
    --accent-2: #c4b3ff;
    --accent-soft: #1c1830;
    --link: #a48bff;
    --ok: #4ac26b;
    --warn: #e3b341;
    --term-bg: #05070b;
    --term-text: #d7dae0;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

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

h1, h2, h3 { color: var(--heading); line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-size: 1.7rem; margin-top: 3rem; }
h3 { font-size: 1.2rem; margin-top: 2rem; }
p { margin: 1rem 0; }
strong { color: var(--heading); }

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 20px; min-height: 58px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--heading); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand .logo { width: 26px; height: 26px; flex: none; }
.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-muted); padding: 6px 12px; border-radius: 8px;
  font-size: .95rem; font-weight: 500;
}
.nav-links a:hover { color: var(--heading); background: var(--bg-alt); text-decoration: none; }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }
.nav-links a.gh { color: var(--heading); }

/* ---------- hero ---------- */
.hero { padding: 72px 0 48px; text-align: center; }
.hero .kicker {
  display: inline-block; font-family: var(--mono); font-size: .8rem;
  color: var(--accent); background: var(--accent-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 22px; letter-spacing: .02em;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin: 0 0 18px; }
.hero .lede { font-size: 1.25rem; color: var(--text-muted); max-width: 720px; margin: 0 auto 32px; }
.hero .lede strong { color: var(--text); }

.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); }
.btn-secondary { background: var(--panel); color: var(--heading); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- generic sections ---------- */
.section { padding: 8px 0 16px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lead { font-size: 1.15rem; color: var(--text-muted); }

.demo-figure { margin: 40px 0 8px; }
.demo-figure img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--term-bg);
  box-shadow: var(--shadow);
}
.demo-figure figcaption { color: var(--text-muted); font-size: .92rem; margin-top: 12px; text-align: center; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; margin: 28px 0; }
.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .98rem; }
.card .ico { font-family: var(--mono); font-size: .78rem; color: var(--accent); display: block; margin-bottom: 10px; letter-spacing: .04em; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }

/* ---------- code blocks ---------- */
pre {
  background: var(--term-bg); color: var(--term-text);
  border-radius: 10px; padding: 16px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: .88rem; line-height: 1.6;
  border: 1px solid var(--border); margin: 18px 0;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
code {
  font-family: var(--mono); font-size: .86em;
  background: var(--bg-code); padding: .15em .4em; border-radius: 5px;
  color: var(--heading); border: 1px solid var(--border);
}
pre .c { color: #6b7686; }           /* comment */
pre .p { color: #7ee0a8; }           /* prompt / ok */
pre .f { color: #a48bff; }           /* flag / key */
pre .s { color: #e3b341; }           /* string / value */

.codewrap { position: relative; }
.codewrap .label {
  font-family: var(--mono); font-size: .72rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .08em; margin: 22px 0 -8px;
}

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; margin: 18px 0; border-radius: 10px; border: 1px solid var(--border); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
th { background: var(--bg-alt); color: var(--heading); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td code { white-space: nowrap; }

/* ---------- callouts ---------- */
.note {
  border: 1px solid var(--border); border-left: 4px solid var(--accent);
  background: var(--bg-alt); border-radius: 8px; padding: 14px 18px; margin: 22px 0;
}
.note.soon { border-left-color: var(--warn); }
.note .tag {
  display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 4px;
}
.note.soon .tag { color: var(--warn); }
.note p { margin: .3rem 0; }

/* ---------- steps ---------- */
.steps { counter-reset: step; padding: 0; margin: 24px 0; list-style: none; }
.steps > li { position: relative; padding-left: 46px; margin-bottom: 28px; }
.steps > li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .95rem;
  display: flex; align-items: center; justify-content: center; font-family: var(--mono);
}
.steps > li h3 { margin-top: 0; }

/* ---------- diagram ---------- */
.pipeline {
  display: flex; align-items: stretch; gap: 0; flex-wrap: wrap;
  margin: 28px 0; font-family: var(--mono); font-size: .82rem;
}
.pipeline .stage {
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 14px; text-align: center; color: var(--heading);
  display: flex; align-items: center; justify-content: center; flex: 1 1 auto; min-width: 90px;
}
.pipeline .stage.accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pipeline .arrow { display: flex; align-items: center; color: var(--text-muted); padding: 0 8px; font-size: 1.1rem; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border); margin-top: 64px; padding: 40px 0;
  color: var(--text-muted); font-size: .92rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent); }
.footer .links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer .ai-note {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: .85rem; color: var(--text-muted); width: 100%;
}

/* ---------- misc ---------- */
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.pill {
  font-family: var(--mono); font-size: .78rem; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; background: var(--panel);
}
.page-head { padding: 48px 0 8px; }
.page-head h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 12px; }
.page-head .breadcrumb { font-family: var(--mono); font-size: .8rem; color: var(--text-muted); margin-bottom: 14px; }

hr.rule { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 6px 8px; font-size: .9rem; }
  .hero { padding: 48px 0 32px; }
}
