:root {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e5e9f0;
  --line-strong: #cbd5e1;
  --accent: #1d4ed8;
  --accent-deep: #1e3a8a;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --maxw: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------------- Header ---------------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 52px);
}
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  letter-spacing: -.01em;
}
.wordmark-logo { border-radius: 7px; display: block; box-shadow: 0 1px 3px rgba(15,23,42,.18); }
.nav-github {
  font-size: .9rem; color: var(--ink-soft); font-weight: 500;
  border: 1px solid var(--line-strong); padding: 8px 16px; border-radius: 999px;
  transition: border-color .2s, color .2s, background .2s;
}
.nav-github:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------- Hero ---------------- */
main { flex: 1 0 auto; display: flex; }
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(8px, 2vw, 24px) clamp(20px, 5vw, 52px) clamp(24px, 4vw, 40px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(14px, 2.2vw, 22px);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.03;
  letter-spacing: -.025em; margin: 0; color: var(--ink);
}
.lede {
  font-size: clamp(1rem, 1.6vw, 1.12rem); color: var(--ink-soft);
  margin: 0; max-width: 62ch;
}
.hero-figure { margin: clamp(4px, 1vw, 10px) 0 0; width: 100%; display: flex; justify-content: center; }
.hero-figure img {
  width: auto; max-width: min(1000px, 96vw); max-height: 56vh;
  height: auto; border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .14);
}

/* ---------------- Download block ---------------- */
.download { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 6px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 1rem;
  padding: 15px 26px; border-radius: 999px;
  box-shadow: 0 10px 26px rgba(29, 78, 216, .28);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary:hover {
  transform: translateY(-2px); background: var(--accent-deep);
  box-shadow: 0 16px 34px rgba(29, 78, 216, .34);
}
.btn-primary:active { transform: translateY(0); }

.download-stats { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; justify-content: center; }
.counter { display: inline-flex; flex-direction: column; align-items: center; line-height: 1; }
.counter-num {
  font-family: var(--font-mono); font-weight: 600; font-size: 1.55rem;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.counter-num.ticking { color: var(--accent); }
.counter-label {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin-top: 7px;
}
.download-meta {
  font-family: var(--font-mono); font-size: .78rem; color: var(--muted);
  padding-left: 22px; border-left: 1px solid var(--line-strong);
}
.smartscreen-note {
  display: inline-flex; align-items: center; gap: 9px; margin: 4px 0 0;
  font-size: .82rem; color: var(--muted);
  background: #f8fafc; border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 12px; max-width: 90vw;
}
.smartscreen-note svg { color: var(--accent); flex-shrink: 0; }
.smartscreen-note strong { color: var(--ink); font-weight: 600; }

/* ---------------- Footer ---------------- */
.site-footer {
  flex-shrink: 0; text-align: center;
  padding: clamp(20px, 3vw, 30px) 20px clamp(24px, 3vw, 34px);
  border-top: 1px solid var(--line);
}
.footer-prompt { font-size: .9rem; color: var(--muted); margin: 0 0 8px; }
.footer-contact {
  display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center;
  font-size: .95rem;
}
.footer-contact a { color: var(--accent); font-weight: 500; }
.footer-contact a:hover { text-decoration: underline; }
.footer-loc { color: var(--ink-soft); }
.footer-contact a + .footer-loc::before { content: "·"; margin-right: 14px; color: var(--line-strong); }

/* ---------------- Reveal animation ---------------- */
/* Content is visible by default; only hidden when JS is active so a script
   error can never leave the page blank. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); transition-delay: var(--delay, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------------- Responsive ---------------- */
@media (max-width: 620px) {
  .hero-figure img { max-height: none; }
  .download-meta { padding-left: 0; border-left: none; }
}
