@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark light;
  --bg: #0b0d10;
  --bg-elev: #14171b;
  --bg-elev-2: #191d22;
  --border: #23272d;
  --border-hover: #333a42;
  --text: #e8eaed;
  --text-dim: #9aa2ad;
  --text-faint: #6b7280;
  --accent: #5fd0a3;
  --accent-strong: #7ee0b8;
  --accent-dim: #2e5c48;
  --accent-glow: rgba(95, 208, 163, 0.16);
  --danger: #e5788a;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #fafaf9;
    --bg-elev: #ffffff;
    --bg-elev-2: #f3f2f0;
    --border: #e5e5e3;
    --border-hover: #d1d0cd;
    --text: #16181c;
    --text-dim: #5a6068;
    --text-faint: #8b9098;
    --accent: #1f8a5f;
    --accent-strong: #157048;
    --accent-dim: #d6f0e3;
    --accent-glow: rgba(31, 138, 95, 0.1);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
section[id] { scroll-margin-top: 84px; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 24px; }
code, .mono { font-family: var(--mono); }
code {
  background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: 5px;
  padding: 0.1em 0.4em; font-size: 0.9em;
}

/* ---------- Header ---------- */

header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px; gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.02em; font-size: 1.02rem; flex: none; }
.brand-mark { width: 24px; height: 24px; color: var(--accent); flex: none; }
.brand-sub { color: var(--text-dim); font-weight: 500; }

header.site nav { display: flex; align-items: center; gap: 22px; font-size: 0.9rem; overflow-x: auto; scrollbar-width: none; }
header.site nav::-webkit-scrollbar { display: none; }
header.site nav a { color: var(--text-dim); white-space: nowrap; transition: color 0.15s var(--ease); }
header.site nav a:hover { color: var(--text); text-decoration: none; }
header.site nav a.gh-stars {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--text);
}
header.site nav a.gh-stars:hover { border-color: var(--border-hover); text-decoration: none; }
header.site nav a.gh-stars svg { width: 14px; height: 14px; flex: none; stroke: currentColor; fill: none; }
@media (max-width: 760px) { header.site nav a:not(.gh-stars) { display: none; } }

/* ---------- Hero ---------- */

.hero { padding: 96px 0 56px; border-top: none; }
.status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--accent); background: var(--accent-dim);
  border-radius: 999px; padding: 5px 12px 5px 10px; margin-bottom: 24px;
}
.status-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.12; margin: 0 0 18px;
  letter-spacing: -0.03em; font-weight: 800;
  max-width: 20ch;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p.lead { font-size: 1.14rem; color: var(--text-dim); max-width: 58ch; margin: 0 0 24px; }
.specs {
  font-family: var(--mono); font-size: 0.82rem; color: var(--text-faint);
  margin-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px 18px;
}
.specs span::before { content: "•"; margin-right: 10px; color: var(--border-hover); }
.specs span:first-child::before { content: none; margin-right: 0; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .hero { text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .specs { justify-content: center; }
  .cta-row { justify-content: center; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm); font-size: 0.94rem; font-weight: 600;
  border: 1px solid var(--border);
  transition: transform 0.15s var(--ease), filter 0.15s var(--ease), border-color 0.15s var(--ease), background 0.15s var(--ease);
  cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #06110c; border-color: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 4px 24px -6px var(--accent-glow); }
.btn.ghost { color: var(--text); background: var(--bg-elev); }
.btn.ghost:hover { border-color: var(--border-hover); background: var(--bg-elev-2); }
.btn svg { width: 16px; height: 16px; flex: none; }

.kofi-badge-wrap { text-align: center; margin-top: 32px; }
.kofi-badge {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: center;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--bg-elev);
  padding: 9px 18px;
  font-size: 0.88rem; color: var(--text-dim);
}
.kofi-badge svg { width: 15px; height: 15px; flex: none; color: var(--accent); }

/* ---------- Generic sections ---------- */

section { padding: 56px 0; border-top: 1px solid var(--border); }
section h2 {
  font-size: 1.6rem; letter-spacing: -0.015em; margin: 0 0 10px; font-weight: 700;
}
section p.section-sub { color: var(--text-dim); margin: 0 0 32px; max-width: 62ch; font-size: 1rem; }
.eyebrow {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 10px; font-weight: 600;
}

/* ---------- How it works / diagram ---------- */

.diagram {
  font-family: var(--mono); font-size: 0.85rem; line-height: 1.7;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-md);
  color: var(--text-dim);
}
.diagram .diagram-bar {
  display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.diagram .diagram-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-hover); }
.diagram-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 22px 24px; }
@media (max-width: 640px) { .diagram-grid { grid-template-columns: 1fr; gap: 22px; } }
.diagram-col ol { list-style: none; margin: 0; padding: 0; }
.diagram-col li:not(:last-child) { margin-bottom: 4px; }
.diagram-heading { margin: 0 0 10px; color: var(--text); font-weight: 600; }
.diagram-heading span { color: var(--text-faint); font-weight: 400; }
.diagram .dim { color: var(--text-faint); }
.diagram .hl { color: var(--accent); }
.diagram .arrow { color: var(--text-faint); }

/* ---------- Install steps ---------- */

.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px;
  transition: border-color 0.2s var(--ease);
}
.step:hover { border-color: var(--border-hover); }
.step .tag {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--accent);
  margin-bottom: 10px; display: block; font-weight: 600;
}
.step h3 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; }
.step p { color: var(--text-dim); margin: 0 0 18px; font-size: 0.93rem; }
.step .btn { width: 100%; justify-content: center; }
.step .step-note { margin-top: 16px; font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Features ---------- */

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }
.feature {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-elev);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), background 0.2s var(--ease);
}
.feature:hover { border-color: var(--border-hover); background: var(--bg-elev-2); transform: translateY(-1px); }
.feature .icon {
  flex: none; width: 34px; height: 34px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-dim); color: var(--accent);
}
.feature .icon svg { width: 17px; height: 17px; }
.feature h4 { margin: 0 0 4px; font-size: 0.96rem; font-weight: 700; }
.feature p { margin: 0; color: var(--text-dim); font-size: 0.86rem; line-height: 1.5; }

/* ---------- Screenshots ---------- */

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { margin: 0; }
.gallery img {
  display: block; width: 100%; border-radius: var(--radius-md); border: 1px solid var(--border);
  transition: border-color 0.2s var(--ease);
}
.gallery figure:hover img { border-color: var(--border-hover); }
.gallery figcaption { color: var(--text-dim); font-size: 0.85rem; margin-top: 10px; }

/* ---------- Compare table ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); }
table.compare { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.compare th, table.compare td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
table.compare thead th { color: var(--text-dim); font-weight: 600; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--bg-elev); }
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare td.yes { color: var(--accent); font-weight: 600; }
table.compare td.no { color: var(--text-faint); }
table.compare tr.self { background: var(--accent-glow); }
table.compare td svg, table.compare th svg { width: 13px; height: 13px; margin-right: 5px; vertical-align: -2px; }

/* ---------- FAQ ---------- */

details.faq { border-bottom: 1px solid var(--border); }
details.faq:last-child { border-bottom: none; }
details.faq summary {
  cursor: pointer; font-weight: 600; font-size: 0.98rem; list-style: none;
  padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .chevron { flex: none; width: 18px; height: 18px; color: var(--text-faint); transition: transform 0.2s var(--ease); }
details.faq[open] summary .chevron { transform: rotate(180deg); color: var(--accent); }
details.faq p { color: var(--text-dim); margin: 0 0 18px; font-size: 0.92rem; max-width: 68ch; }

/* ---------- Acknowledgments ---------- */

.credits { display: flex; flex-direction: column; gap: 14px; }
.credit {
  display: flex; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--bg-elev);
}
.credit img { width: 36px; height: 36px; border-radius: 50%; flex: none; }
.credit p { margin: 0; font-size: 0.9rem; color: var(--text-dim); line-height: 1.55; }
.credit p strong { color: var(--text); }
.credit p a { color: var(--accent); }

/* ---------- Support ---------- */

#support { text-align: center; }
.support-eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px;
}
.support-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 1.3rem; font-weight: 800; margin-bottom: 22px; }
.support-logo svg { width: 22px; height: 22px; color: #ff5f5f; }
.support-title {
  font-size: clamp(1.4rem, 3.4vw, 1.9rem); max-width: 34ch;
  margin: 0 auto 26px; letter-spacing: -0.015em; font-weight: 700;
}
.support-copy { max-width: 60ch; margin: 0 auto; color: var(--text-dim); text-align: left; }
.support-copy p { margin: 0 0 16px; }
.support-copy a { color: var(--accent); }
#support .kofi-badge-wrap { margin-top: 32px; }

/* ---------- Footer ---------- */

footer { padding: 44px 0 64px; color: var(--text-faint); font-size: 0.85rem; }
footer .links { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
footer .links a { color: var(--text-dim); }
footer .links a:hover { color: var(--accent); }
footer .disclaimer { max-width: 70ch; }
