/* Design tokens — light is the default, dark via prefers-color-scheme.
   Philosophy: lots of air, soft rounded surfaces, a single confident accent,
   restrained shadows instead of hard borders. */
:root {
  --bg:          #ffffff;
  --bg-alt:      #f7f8fa;
  --surface:     #ffffff;
  --surface-2:   #f2f4f7;
  --text:        #0f1419;
  --text-dim:    #536471;
  --text-mute:   #8b98a5;
  --border:      #e7e9ec;
  --accent:      #0e9f6e;
  --accent-ink:  #ffffff;
  --warn:        #a15c00;
  --warn-bg:     #fff3e0;
  --danger:      #d5304f;
  --shadow-sm:   0 1px 2px rgba(15, 20, 25, 0.06), 0 1px 1px rgba(15, 20, 25, 0.04);
  --shadow-md:   0 8px 24px rgba(15, 20, 25, 0.08), 0 2px 6px rgba(15, 20, 25, 0.05);
  --shadow-lg:   0 20px 48px rgba(15, 20, 25, 0.12), 0 6px 16px rgba(15, 20, 25, 0.06);
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-pill: 999px;
  --max-w:       1080px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0b0c10;
    --bg-alt:    #111318;
    --surface:   #16181f;
    --surface-2: #1c1f28;
    --text:      #e9edf1;
    --text-dim:  #9aa4b1;
    --text-mute: #6b7480;
    --border:    #262a33;
    --accent:    #3ee08a;
    --accent-ink:#04140c;
    --warn:      #f0b94d;
    --warn-bg:   rgba(240, 185, 77, 0.12);
    --danger:    #ff6b7f;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
    --shadow-lg: 0 24px 60px rgba(0,0,0,0.5);
    color-scheme: dark;
  }
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(560px circle at 12% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    radial-gradient(680px circle at 92% 6%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 55%);
  background-repeat: no-repeat;
}

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

img { max-width: 100%; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

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

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

header.site img.logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

header.site .brand {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

header.site .brand span { color: var(--accent); }

nav.site {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.92rem;
}

nav.site a {
  color: var(--text-dim);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: background 0.15s ease, color 0.15s ease;
}

nav.site a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
nav.site a.active { color: var(--text); background: var(--surface-2); }

nav.site a.cta {
  color: var(--accent-ink);
  background: var(--accent);
  margin-left: 6px;
}
nav.site a.cta:hover { background: var(--accent); filter: brightness(1.06); color: var(--accent-ink); }

/* ---------- Layout ---------- */

main { padding: 8px 0 96px; }

.hero {
  text-align: center;
  padding: 72px 0 8px;
}

.hero img.logo-lg {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-lg);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0 0 18px;
}

.hero h1 span { color: var(--accent); }

.hero p.tagline {
  font-size: 1.2rem;
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 36px;
}

.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}
.btn.primary:hover { filter: brightness(1.05); box-shadow: var(--shadow-md); }

.btn.secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn.secondary:hover { border-color: var(--accent); background: var(--surface-2); }

/* ---------- Callouts / cards ---------- */

.callout {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 40px 0;
  box-shadow: var(--shadow-sm);
}

.callout.warn {
  border-color: color-mix(in srgb, var(--warn) 45%, var(--border));
  background: var(--warn-bg);
}
.callout.warn strong { color: var(--warn); }

section { margin: 72px 0; }

section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

section h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

section h3 { color: var(--text); margin-top: 30px; font-size: 1.1rem; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.shots figure { margin: 0; }
.shots .frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shots .frame:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-md); }
.shots img { display: block; width: 100%; }
.shots figcaption {
  font-size: 0.85rem;
  color: var(--text-mute);
  text-align: center;
  margin-top: 10px;
}

/* ---------- Tables ---------- */

.table-wrap {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

th, td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }

th {
  color: var(--text-mute);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-alt);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
}

.pill.ok  { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.pill.no  { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }

/* ---------- Code ---------- */

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
}

code {
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.9em;
}

pre code { background: none; padding: 0; }

ul.plain { padding-left: 1.3em; }
ul.plain li { margin-bottom: 8px; }

/* ---------- Repo link cards ---------- */

.repo-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.repo-links .card { flex: 1 1 240px; }
.repo-links .card h3 { margin-top: 0; }

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

footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-mute);
  font-size: 0.9rem;
  text-align: center;
}

footer.site a { color: var(--text-dim); font-weight: 600; }
footer.site a:hover { color: var(--accent); }
footer.site .dot { color: var(--border); margin: 0 4px; }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .grid-2, .shots { grid-template-columns: 1fr; }
  nav.site { gap: 0; font-size: 0.85rem; }
  nav.site a { padding: 7px 10px; }
  .hero { padding: 48px 0 8px; }
  section { margin: 52px 0; }
}
