/* ── Reset & base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0f1117;
  --bg-card:    #161b27;
  --bg-code:    #1a2030;
  --border:     #242c3d;
  --text:       #e2e8f0;
  --text-muted: #8897b1;
  --accent:     #4f7ef8;
  --accent-dim: #2a3f7a;
  --green:      #34c983;
  --radius:     10px;
  --shadow:     0 4px 24px rgba(0,0,0,.45);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 66px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
}

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

code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", monospace;
  font-size: .875em;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .1em .4em;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: .65rem 1.4rem;
  border-radius: var(--radius);
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, background .15s;
  white-space: nowrap;
  text-decoration: none !important;
}
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover  { opacity: .85; }
.btn-outline  { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-outline:hover  { border-color: var(--accent); color: var(--accent); }
.btn-ghost    { background: transparent; color: var(--text-muted); border: 2px solid var(--border); padding: .45rem 1rem; font-size: .875rem; }
.btn-ghost:hover    { color: var(--text); border-color: var(--text-muted); }

/* ── Focus styles ────────────────────────────────────────────── */
.btn:focus-visible,
.copy-btn:focus-visible,
.nav-links a:focus-visible,
.version-badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a:not(.btn) {
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
}
.nav-links a:not(.btn):hover { color: var(--text); text-decoration: none; }

/* ── Version badge ───────────────────────────────────────────── */
.version-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: .2rem .8rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 18px;
  text-decoration: none !important;
  transition: background .15s, color .15s;
}
.version-badge:hover { background: var(--accent); color: #fff; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  overflow: hidden;
}
.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 480px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.hero-note {
  font-size: .8rem;
  color: var(--text-muted);
}
.hero-screenshot {
  position: relative;
}
.hero-screenshot img {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
}

/* ── Features ────────────────────────────────────────────────── */
.features {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.features h2,
.screenshots h2,
.install h2,
.stack h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 48px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-icon {
  font-size: 1.6rem;
  margin-bottom: 12px;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Screenshots ─────────────────────────────────────────────── */
.screenshots {
  padding: 80px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}
.screenshot-grid figure {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.screenshot-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
}
.screenshot-mobile {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 28px;
}
.screenshot-mobile img {
  max-width: 280px;
  width: auto !important;
  height: auto;
  border-radius: 18px;
}
.screenshot-mobile figcaption {
  flex: 1;
  font-size: 1.05rem;
  color: var(--text-muted);
}
figcaption {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Install ─────────────────────────────────────────────────── */
.install {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.install-sub {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: .95rem;
}
.code-block {
  position: relative;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  text-align: left;
  max-width: 560px;
  margin: 0 auto 24px;
  box-shadow: var(--shadow);
}
.copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: .75rem;
  font-family: inherit;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.copy-btn:hover { color: var(--text); border-color: var(--text-muted); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }
.code-block pre { margin: 0; }
.code-block code {
  background: none;
  border: none;
  padding: 0;
  font-size: .9rem;
  color: var(--green);
  line-height: 1.8;
}
.install-note {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 28px;
}
.install-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.install-alt {
  margin-top: 36px;
}
.install-alt-label {
  display: block;
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  margin-bottom: 10px;
}
.install-alt .code-block {
  margin-bottom: 0;
}

/* ── Stack ───────────────────────────────────────────────────── */
.stack {
  padding: 80px 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.stack-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stack-item strong {
  font-size: .95rem;
  font-weight: 700;
}
.stack-item span {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  padding: 40px 0 32px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}
.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: .85rem;
  color: var(--text-muted);
}
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-screenshot { order: 0; }
  .hero-screenshot img { max-width: 100%; }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }
  .screenshot-mobile {
    flex-direction: column !important;
    align-items: flex-start;
  }
  .screenshot-mobile img {
    max-width: 220px;
  }

  .nav-links { gap: 14px; }
  .nav-links a:not(.btn) { font-size: .875rem; padding: 10px 4px; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-links { gap: 16px; }
}

@media (max-width: 480px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
