/* Flint site. Colors are tokens; the dark values follow the system appearance. */
:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f3f3f2;
  --border: #e3e3e1;
  --text: #1c1c1e;
  --muted: #6b6b70;
  --accent: #ea580c;
  --accent-ink: #c2410c;
  --accent-text: #1c1c1e;
  --accent-soft: #fff1e6;
  --ok: #166534;
  --warn: #a16207;
  --err: #b91c1c;
  --sel: #fde7d3;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161617;
    --surface: #1e1e20;
    --surface-2: #252528;
    --border: #333336;
    --text: #ececee;
    --muted: #9a9aa0;
    --accent: #fb923c;
    --accent-ink: #fb923c;
    --accent-text: #1c1c1e;
    --accent-soft: #3a2414;
    --ok: #4ade80;
    --warn: #facc15;
    --err: #f87171;
    --sel: #3d2815;
    color-scheme: dark;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

code {
  font: 0.9em var(--mono);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 52px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 650; }
.topnav { display: flex; gap: 20px; font-size: 14px; }
.topnav a { color: var(--muted); text-decoration: none; }
.topnav a:hover { color: var(--text); }

/* Hero */
.hero { padding-top: 72px; padding-bottom: 40px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font: 13px var(--mono);
  color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
h1 {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.lede { max-width: 62ch; margin: 20px 0 0; font-size: 18px; color: var(--muted); }
.lede a { color: var(--text); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { border-color: var(--accent); filter: brightness(0.94); }
.fineprint { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* Window illustration */
.window {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 24px 60px -30px rgb(0 0 0 / 0.35);
  font: 12.5px/1.5 var(--mono);
}
.win-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.lights { display: flex; gap: 6px; }
.lights i { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.win-title { flex: 1; text-align: center; margin-right: 45px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.win-body { display: grid; grid-template-columns: 210px 1fr; min-height: 300px; }
.win-sidebar { border-right: 1px solid var(--border); padding: 10px 0; background: var(--surface-2); }
.win-label { margin: 10px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.win-item { margin: 0; padding: 2px 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-item.active { color: var(--accent-ink); }
.win-item.sel { background: var(--sel); box-shadow: inset 2px 0 var(--accent); }
.win-item b {
  margin-left: 4px;
  padding: 0 4px;
  border: 1px solid var(--accent-ink);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}
.win-main { min-width: 0; overflow-x: auto; }
.win-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
}
.win-filter kbd { margin-left: auto; font: inherit; font-size: 11px; }
.win-table { width: 100%; border-collapse: collapse; }
.win-table th,
.win-table td { padding: 3px 12px; text-align: left; white-space: nowrap; }
.win-table th { font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--border); }
.win-table tr.sel td { background: var(--sel); }
.win-table tr.sel td:first-child { box-shadow: inset 2px 0 var(--accent); }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.err { color: var(--err); }
.caption { margin-top: 10px; text-align: center; font-size: 13px; color: var(--muted); }

/* Sections */
.section { padding-top: 88px; scroll-margin-top: 64px; }
h2 { margin: 0 0 24px; font-size: 28px; letter-spacing: -0.015em; }
h3 { margin: 0 0 6px; font-size: 16px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.card { background: var(--surface); padding: 22px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split p { color: var(--muted); }
.ticks { list-style: none; margin: 16px 0 0; padding: 0; }
.ticks li { position: relative; padding-left: 22px; margin: 8px 0; color: var(--muted); }
.ticks li::before { content: "›"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }
.ticks b { color: var(--text); font-weight: 600; }

.code {
  margin: 0;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  overflow-x: auto;
  font: 13.5px/1.7 var(--mono);
}
.code code { background: none; border: 0; padding: 0; font: inherit; }
.code .c { color: var(--muted); }

.roadmap { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.roadmap li { position: relative; display: flex; gap: 16px; padding: 8px 0 8px 22px; color: var(--muted); }
.roadmap li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
}
.roadmap li.done::before { background: var(--accent); border-color: var(--accent); }
.roadmap li.next::before { border-color: var(--accent); }
.roadmap b { flex: 0 0 48px; font: 600 14px/1.7 var(--mono); color: var(--text); }
.roadmap li.done span::after { content: " · done"; color: var(--accent-ink); font-size: 13px; }
.roadmap li.next span::after { content: " · next"; color: var(--accent-ink); font-size: 13px; }

.footer { margin-top: 96px; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 24px; padding-bottom: 32px; font-size: 14px; color: var(--muted); }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 600px) {
  .topnav a:not(:last-child) { display: none; }
  .hero { padding-top: 48px; }
  .grid { grid-template-columns: 1fr; }
  .win-body { grid-template-columns: 1fr; }
  .win-main { overflow: hidden; }
  .code { font-size: 12px; }
  .win-sidebar { display: none; }
  .section { padding-top: 64px; }
}
