/* style.css — shared dark theme for the datalog-dafsa documentation site.
   Styled to match the fixpoint-linux landing page (same palette + mono accents). */

/* ─── Palette (fixpoint-linux) ─────────────────────────────────────── */

:root {
  --bg: #0b0e11;
  --bg2: #10141a;
  --fg: #d8dee6;
  --dim: #7d8794;
  --accent: #6ad6a1;
  --accent2: #8ab4f8;
  --line: #1e2730;
  --mono: "SFMono-Regular", "Cascadia Code", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ─── Reset ────────────────────────────────────────────────────────── */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ────────────────────────────────────────────────────────── */

.wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ─── Sticky top navigation ─────────────────────────────────────────── */

.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 14, 17, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  color: var(--fg);
}

.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 16px;
  row-gap: 6px;
  min-height: 52px;
  padding: 10px 24px;
}

.site .brand {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  font-size: 15px;
  margin-right: 8px;
}
.site .brand .fx { color: var(--accent); }

.site nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }

.site nav a {
  color: var(--dim);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
}

.site nav a:hover { color: var(--fg); text-decoration: none; }

/* External link back to fixpoint-linux, rightmost in the nav. */
.site nav a.ext {
  color: var(--accent);
  font-weight: 600;
  margin-left: 6px;
}
.site nav a.ext:hover { color: var(--accent2); text-decoration: none; }

/* Prominent "Playground" nav item (call to action). */
.site nav a.nav-cta {
  color: var(--bg);
  background: var(--accent);
  border-radius: 14px;
  padding: 2px 12px;
  font-weight: 600;
}
.site nav a.nav-cta:hover { background: var(--accent2); }

/* ─── Hero / headline ───────────────────────────────────────────────── */

h1 { font-size: clamp(26px, 4.5vw, 38px); font-weight: 750; letter-spacing: -0.02em; margin: 0.6em 0 0.3em; }
h1 .fx { color: var(--accent); }
h2 { font-size: 1.35em; font-weight: 650; margin: 1.8em 0 0.4em; letter-spacing: -0.01em; border-bottom: 1px solid var(--line); padding-bottom: 0.25em; }
h3 { font-size: 1.05em; font-weight: 600; margin: 1.3em 0 0.4em; }
p  { margin: 0.6em 0; color: #c3ccd6; }

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

code, .code { font-family: var(--mono); font-size: 0.9em; }

p code, li code, td code, h2 code, h3 code {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--accent);
}

/* ─── Timeline headline (time-travel is the headline feature) ─────── */

.timeline {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 18px;
  margin: 1em 0 1.2em;
  overflow-x: auto;
  white-space: pre;
  line-height: 1.5;
}
.timeline .c { color: var(--accent); }
.timeline .dim { color: var(--dim); }
.timeline .k { color: var(--accent2); }

/* ─── Front-and-center CTA banner ───────────────────────────────────── */

.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg2);
  color: var(--fg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 18px 20px;
  margin: 1.2em 0;
  font-size: 1.02em;
}
.cta-banner strong { color: var(--accent); }
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.cta-btn:hover { background: var(--accent2); color: var(--bg); text-decoration: none; }

/* ─── Code blocks ───────────────────────────────────────────────────── */

pre.code {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0.8em 0;
  line-height: 1.5;
  white-space: pre;
  color: #c3ccd6;
}

pre.code code { background: none; padding: 0; font-size: 0.9em; }
pre.code .c { color: var(--dim); }
pre.code .g { color: var(--accent); }
pre.code .k { color: var(--accent2); }

/* ─── Feature / API tables ──────────────────────────────────────────── */

table.features {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
  font-size: 0.95em;
}

table.features th, table.features td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

table.features th {
  background: var(--bg2);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
}

table.features tr:nth-child(even) td { background: var(--bg2); }
table.features td.name { font-family: var(--mono); white-space: nowrap; }
table.features td.name a { color: var(--accent); }

table.api {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8em 0;
  font-size: 0.92em;
}

table.api th, table.api td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
table.api th { background: var(--bg2); font-weight: 600; }
table.api td:first-child { white-space: nowrap; font-family: var(--mono); }

/* ─── Headline feature cards ────────────────────────────────────────── */

.headline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 1em 0;
}

.headline-card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent2);
  border-radius: 8px;
  padding: 16px 18px;
}

.headline-card h3 { margin-top: 0; font-size: 1.02em; }
.headline-card p { font-size: 0.95em; }
.headline-card p:last-child { margin-bottom: 0; }
.headline-card .n { font-family: var(--mono); font-size: 12px; color: var(--accent); display: block; margin-bottom: 6px; }

/* ─── Notes / callouts ──────────────────────────────────────────────── */

.note {
  background: #1a2e24;
  border-left: 4px solid var(--accent);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 1em 0;
  color: #d8dee6;
}

.warn {
  background: #2e1a1e;
  border-left: 4px solid #ff7b72;
  padding: 10px 14px;
  border-radius: 6px;
  margin: 1em 0;
  color: #ffd7d5;
}

/* ─── Lists ─────────────────────────────────────────────────────────── */

ul { list-style: none; }
ul.checks li { padding-left: 26px; position: relative; margin-bottom: 10px; color: #c3ccd6; }
ul.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }

/* ─── Playground ────────────────────────────────────────────────────── */

#program {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.9em;
  line-height: 1.5;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--fg);
  margin: 0.5em 0;
  resize: vertical;
  tab-size: 4;
}

.playground-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0.6em 0 1.2em;
}

.playground-controls label { font-weight: 600; font-size: 0.95em; }

.playground-controls input[type="text"] {
  font-family: var(--mono);
  font-size: 0.95em;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg2);
  color: var(--fg);
}

.playground-controls button {
  font-size: 0.95em;
  font-weight: 600;
  padding: 7px 18px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
}

.playground-controls button:hover { background: var(--accent2); }

#output { min-height: 4em; white-space: pre-wrap; word-break: break-word; }

/* ─── Footer ────────────────────────────────────────────────────────── */

footer.site-foot {
  margin-top: 3em;
  padding: 1.4em 0 2em;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
}
footer.site-foot a { color: var(--dim); }

/* ─── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 620px) {
  .headline { grid-template-columns: 1fr; }
}
