/* libreserv website — no dependencies, system fonts.
   The palette mirrors the product's admin UI (see libreserv ui/static). */

:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #1d2733;
  --muted: #67748a;
  --line: #dde2ea;
  --accent: #14608a;
  --accent-ink: #ffffff;
  --nav-bg: #1d2733;
  --nav-ink: #cfd8e3;
  --nav-hi: #7db4d8;
  --code-bg: #10171f;
  --code-ink: #cde3f5;
  --code-comment: #6f87a0;
  --code-kw: #7db4d8;
  --code-str: #a8d5a2;
  --chip-bg: #e7f0fe;
  --chip-ink: #1e5fb3;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #12161d;
  --panel: #1a2028;
  --ink: #dbe4ee;
  --muted: #8b98ab;
  --line: #2b3441;
  --accent: #6ab1dd;
  --accent-ink: #0d1319;
  --nav-bg: #0d1117;
  --nav-ink: #9fb0c3;
  --nav-hi: #6ab1dd;
  --code-bg: #0b0f14;
  --code-ink: #b9d4ec;
  --chip-bg: #1c2d45;
  --chip-ink: #7db4e8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
}
code {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: .9em;
  background: color-mix(in srgb, var(--line) 55%, transparent);
  padding: .08em .35em;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 1rem 1.2rem;
  border-radius: 10px;
  overflow-x: auto;
  font-size: .82rem;
  line-height: 1.55;
}
pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
pre .c { color: var(--code-comment); }
pre .k { color: var(--code-kw); }
pre .s { color: var(--code-str); }
a { color: var(--accent); }

/* -- nav ---------------------------------------------------------------- */
nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  padding: 0 1.4rem;
  height: 56px;
  background: var(--nav-bg);
  color: var(--nav-ink);
}
nav .brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .04em;
  text-decoration: none;
}
nav .brand span, .brand-footer span { color: var(--nav-hi); }
.nav-links { display: flex; gap: 1.2rem; }
.nav-links a, .nav-github {
  color: var(--nav-ink);
  text-decoration: none;
  font-size: .92rem;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover, .nav-github:hover { color: #fff; border-bottom-color: var(--nav-hi); }
.nav-right { margin-left: auto; display: flex; gap: 1rem; align-items: center; }
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  color: var(--nav-ink);
  border: 1px solid #3a4656;
  border-radius: 6px;
  cursor: pointer;
}
.theme-btn:hover { color: #fff; border-color: var(--nav-hi); }
.theme-btn svg { width: 18px; height: 18px; }
/* show the icon of the theme you would switch TO */
:root[data-theme="dark"] .icon-moon { display: none; }
:root:not([data-theme="dark"]) .icon-sun { display: none; }

/* -- hero --------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 4.5rem 1.4rem 3.5rem;
}
.hero h1 { font-size: 2.1rem; line-height: 1.25; margin: 0 0 1rem; }
.tagline { color: var(--muted); font-size: 1.06rem; margin: 0 0 1.6rem; }
.cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: .55rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  font-size: .95rem;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.1); color: var(--accent-ink); }
.hero-code { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.hero-code pre { margin: 0; }

/* -- sections ----------------------------------------------------------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 1.4rem 3rem; }
section { padding: 2.4rem 0 1.2rem; border-top: 1px solid var(--line); }
h2 { font-size: 1.5rem; margin: 0 0 1.2rem; }
section > p { max-width: 68ch; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.2rem 1.35rem;
}
.card h3 { margin: 0 0 .5rem; font-size: 1.02rem; }
.card p { margin: 0; color: var(--muted); font-size: .93rem; }

.format-strip { display: flex; flex-wrap: wrap; gap: .5rem; }
.format-strip span {
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: .85rem;
  padding: .25rem .7rem;
  border-radius: 99px;
  background: var(--chip-bg);
  color: var(--chip-ink);
}

/* -- diagram ------------------------------------------------------------ */
.diagram-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.2rem;
}
.diagram-wrap svg { width: 100%; height: auto; display: block; }
.dg-box rect { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; }
.dg-box text {
  fill: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.dg-box .dg-sub { font-size: 11px; font-weight: 400; fill: var(--muted); }
.dg-accent rect { stroke: var(--accent); }
.dg-slot { fill: var(--chip-bg); stroke: none; }
.dg-arrow path { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.dg-arrow .dg-dashed { stroke-dasharray: 4 4; }
.dg-label text {
  fill: var(--muted);
  font-size: 11px;
  text-anchor: middle;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.diagram-note { color: var(--muted); font-size: .93rem; max-width: 75ch; }

/* -- api table ---------------------------------------------------------- */
.api-table { border-collapse: collapse; width: 100%; font-size: .93rem; }
.api-table td { padding: .5rem .8rem; border-bottom: 1px solid var(--line); }
.api-table td:first-child { white-space: nowrap; }

/* -- footer ------------------------------------------------------------- */
footer {
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
  padding: 2rem 1.4rem 2.4rem;
}
footer p { margin: .3rem 0; }
.brand-footer { font-weight: 700; letter-spacing: .04em; color: var(--ink); }

/* -- responsive --------------------------------------------------------- */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 3rem; }
  .nav-links { display: none; }
}

/* -- pages -------------------------------------------------------------- */
main > h1 { font-size: 1.8rem; margin: 2.2rem 0 1.4rem; }
.nav-links a.active { color: #fff; border-bottom-color: var(--nav-hi); }
.muted-note { color: var(--muted); font-size: .9rem; margin: .8rem 0 .4rem; }

/* -- copy boxes (homebrew-style one-liners) ------------------------------ */
.copy-box {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--code-bg);
  border-radius: 10px;
  padding: .65rem .6rem .65rem 1.1rem;
  margin: .6rem 0;
}
.copy-box code {
  flex: 1;
  background: none;
  padding: 0;
  color: var(--code-ink);
  font-size: .84rem;
  white-space: nowrap;
  overflow-x: auto;
}
.copy-box button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--code-comment);
  cursor: pointer;
}
.copy-box button:hover { color: var(--code-ink); border-color: var(--code-comment); }
.copy-box button svg { width: 16px; height: 16px; }
.copy-box button.copied { color: #5fc48a; }

/* -- web UI screenshots -------------------------------------------------- */
.shot { margin: 1.6rem 0 2.2rem; }
.shot img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 10px;
}
:root[data-theme="dark"] .shot-light { display: none; }
:root:not([data-theme="dark"]) .shot-dark { display: none; }
.shot figcaption { color: var(--muted); font-size: .88rem; margin-top: .55rem; }
