/* boxpdf docs — single-file CSS, modern-but-quiet aesthetic. */
:root {
  --ink: #0f1419;
  --ink-soft: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --surface: #ffffff;
  --surface-muted: #f6f8fa;
  --accent: #2563eb;
  --code-bg: #0f172a;
  --code-fg: #e2e8f0;
  --code-muted: #94a3b8;
  --shadow-sm: 0 1px 2px rgba(15, 20, 25, 0.06);
  --shadow-md: 0 4px 18px rgba(15, 20, 25, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --content-w: 1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

code, pre {
  font: 13.5px/1.55 ui-monospace, SFMono-Regular, "JetBrains Mono", "Fira Code", Consolas, monospace;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

/* Site header */
.site {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(24px, calc((100% - var(--content-w)) / 2));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.site nav { display: flex; gap: 22px; }
.site nav a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
}
.site nav a:hover { color: var(--accent); text-decoration: none; }

main {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  text-align: left;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  font-weight: 800;
}
.hero h1 .muted {
  color: var(--muted);
  font-weight: 600;
}
.hero .lede {
  font-size: 18px;
  max-width: 700px;
  color: var(--ink-soft);
  margin: 0 0 28px;
}
.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.06s ease, background 0.12s, border-color 0.12s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--ink); color: white; }
.btn-primary:hover { background: #1f2937; }
.btn-secondary { background: var(--surface-muted); color: var(--ink); border: 1px solid var(--line); }
.btn-secondary:hover { background: white; border-color: var(--line-strong); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { color: var(--accent); }

/* Code blocks */
.hero-code, pre {
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 22px 24px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  box-shadow: var(--shadow-md);
  font-size: 13px;
}
pre code { color: inherit; }
:not(pre) > code {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12.5px;
  color: var(--ink);
}

/* Section blocks */
.block {
  padding: 64px 0 24px;
  border-top: 1px solid var(--line);
}
.block:first-of-type { border-top: none; }
.block h2 {
  font-size: 28px;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.block-lede {
  color: var(--muted);
  max-width: 720px;
  margin: 0 0 32px;
}
.block h3 {
  font-size: 16px;
  margin: 24px 0 8px;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 22px;
}
.feature h3 {
  font-size: 15px;
  margin: 0 0 6px;
  letter-spacing: -0.005em;
}
.feature p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 14.5px;
}

/* Theme grid */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}
.theme-card {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.theme-card img {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--line);
}
.theme-card figcaption {
  padding: 12px 16px;
  font-size: 14px;
}

/* Template grid */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.template-card {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.template-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.template-card img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--line);
}
.template-card figcaption {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.template-card figcaption strong { font-size: 15px; }
.template-card .source {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 12px;
  color: var(--muted);
}
.template-card .source:hover { color: var(--accent); }

/* Comparison table */
.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.compare th, .compare td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.compare thead th {
  background: var(--surface-muted);
  font-weight: 600;
}
.compare tbody th {
  font-weight: 500;
  color: var(--ink-soft);
}
.compare td:nth-child(2) { color: var(--accent); font-weight: 600; }
.footnote {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 14px;
}

/* Roadmap list */
.roadmap {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 22px;
  font-size: 14.5px;
}
.roadmap li {
  padding: 4px 0;
  color: var(--ink-soft);
}
.roadmap li.done { color: var(--ink); }

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .site nav { gap: 12px; }
  .site nav a { font-size: 13px; }
  .hero { padding: 48px 0 32px; }
}
