/* ─── Juice Home — matches docs design system ─────────────────── */
:root {
  --bg: #09090b;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --code-bg: #111113;
  --border: #27272a;
  --border-h: #3f3f46;
  --text: #fafafa;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --link: #60a5fa;
  --link-h: #93bbfd;
  --green: #4ade80;
  --font: "Avenir Next", "Segoe UI Variable Text", "IBM Plex Sans",
    "Source Sans 3", "Helvetica Neue", sans-serif;
  --mono: "Berkeley Mono", "CommitMono", "JetBrains Mono", "Cascadia Code",
    ui-monospace, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #fafafa;
    --surface-2: #f4f4f5;
    --code-bg: #f4f4f5;
    --border: #e4e4e7;
    --border-h: #d4d4d8;
    --text: #09090b;
    --text-2: #27272a;
    --muted: #52525b;
    --link: #2563eb;
    --link-h: #1d4ed8;
    --green: #16a34a;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  background-image:
    radial-gradient(1100px 500px at 8% -10%, rgba(96, 165, 250, 0.11), transparent 60%),
    radial-gradient(900px 450px at 95% 0%, rgba(74, 222, 128, 0.07), transparent 62%);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── Topbar ─────────────────────────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}

.topbar .logo {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.topbar .spacer { flex: 1; }

.topbar a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  transition: color 0.12s, background 0.12s;
}
.topbar a:hover {
  color: var(--text);
  background: var(--surface);
}

/* ─── Hero ────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}

.hero .tagline {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero .stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero .stat {
  text-align: center;
}
.hero .stat .number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}
.hero .stat .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.hero pre {
  display: inline-block;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.hero .cta {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  padding: 0.65rem 1.75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: opacity 0.15s;
}
.hero .cta:hover {
  opacity: 0.85;
}

/* ─── Features ────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.15s, background 0.15s;
}
.feature:hover {
  border-color: var(--border-h);
  background: var(--surface-2);
}

.feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.feature p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
}

.feature code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
}

/* ─── Footer ──────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 1rem 2rem;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero .stats {
    gap: 1rem;
  }
  .features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero pre {
    font-size: 0.78rem;
    padding: 0.6rem 1rem;
  }
  .hero .stat .number {
    font-size: 1.25rem;
  }
}
