:root {
  --bg: #06060b;
  --card: rgba(14, 14, 22, 0.7);
  --card-hover: rgba(20, 20, 32, 0.85);
  --line: rgba(255, 255, 255, 0.07);
  --text: #f0f0f8;
  --muted: #9b9db3;
  --faint: #a7adc0;
  --brand: #7c5cff;
  --brand-end: #00d4ff;
  --brand-deep: #6344e0;
  --glow: rgba(124, 92, 255, 0.15);
  --glow-hover: rgba(124, 92, 255, 0.3);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --radius: 16px;
  --max: 1140px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Outfit, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse 900px 500px at 50% -120px, rgba(124, 92, 255, 0.12), transparent 60%),
    radial-gradient(ellipse 600px 400px at 80% 20%, rgba(0, 212, 255, 0.06), transparent 60%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }

/* ── Animations ── */
@keyframes float-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(124, 92, 255, 0.08); }
  50%      { box-shadow: 0 0 30px rgba(124, 92, 255, 0.18); }
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 6, 11, 0.82);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.nav-wrap,
.wrap,
.footer-grid {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex: none;
}

.mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-end));
  box-shadow: 0 0 16px rgba(124, 92, 255, 0.3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.93rem;
  white-space: nowrap;
  flex: none;
  transition: color 0.2s, background 0.2s;
}

.nav a:hover { color: var(--text); }

.nav a.active {
  color: white;
  background: linear-gradient(135deg, var(--brand), #5a7cff);
  box-shadow: 0 2px 12px rgba(124, 92, 255, 0.25);
}

main { flex: 1; }

/* ── Hero ── */
.hero {
  padding: 100px 0 40px;
  text-align: center;
  animation: float-in 0.7s ease-out;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border: 1px solid rgba(124, 92, 255, 0.2);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(124, 92, 255, 0.06);
  backdrop-filter: blur(8px);
  font-size: 0.82rem;
}

.pill svg {
  color: var(--brand);
  filter: drop-shadow(0 0 4px rgba(124, 92, 255, 0.4));
}

h1 {
  margin: 36px auto 0;
  max-width: none;
  font-size: clamp(3.2rem, 9vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-weight: 900;
  text-transform: uppercase;
}

.brand-gradient-text {
  background: linear-gradient(
    135deg,
    var(--brand) 0%,
    #a78bfa 30%,
    var(--brand-end) 60%,
    var(--brand) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lede {
  max-width: 36rem;
  margin: 32px auto 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.94rem;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #5a7cff);
  color: white;
  box-shadow: 0 4px 20px rgba(124, 92, 255, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 6px 28px rgba(124, 92, 255, 0.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(124, 92, 255, 0.3);
}

/* ── Feature cards ── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 80px 0;
}

.card,
.step,
.plugin {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}

.card, .step { padding: 28px; }

.card {
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.3);
  box-shadow: 0 12px 40px rgba(124, 92, 255, 0.12);
}

.icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #c4b5fd;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(0, 212, 255, 0.08));
  border: 1px solid rgba(124, 92, 255, 0.1);
}

.card h2, .step h2, .page-intro h1 {
  letter-spacing: -0.03em;
}

.card h2 {
  margin: 18px 0 8px;
  font-size: 1.12rem;
}

.card p, .step p, .prose p, .prose li {
  color: var(--muted);
  line-height: 1.6;
}

.card p { margin: 0; font-size: 0.94rem; }

/* ── Page layouts ── */
.page {
  padding: 72px 0 88px;
}

.page-intro {
  text-align: center;
  animation: float-in 0.5s ease-out;
}

.page-intro h1 {
  margin: 0 auto;
  max-width: none;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  text-transform: none;
}

.page-intro p {
  max-width: 38rem;
  margin: 14px auto 0;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Search ── */
.search-row {
  max-width: 640px;
  margin: 36px auto 0;
  position: relative;
}

.search-row svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  transition: color 0.2s;
}

.search-row:focus-within svg { color: var(--brand); }

.search-row input {
  width: 100%;
  padding: 14px 18px 14px 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(14, 14, 22, 0.6);
  backdrop-filter: blur(8px);
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.search-row input:focus {
  border-color: rgba(124, 92, 255, 0.5);
  box-shadow: 0 0 20px rgba(124, 92, 255, 0.1);
}

/* ── Chips ── */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.chips button {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.chips button.active,
.chips button:hover {
  color: white;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), #5a7cff);
  box-shadow: 0 2px 10px rgba(124, 92, 255, 0.2);
}

/* ── Count ── */
.count {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 0;
  color: var(--faint);
  font-size: 0.92rem;
}

.count svg { color: var(--faint); }

/* ── Plugin grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.plugin {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  transition: all 0.28s ease;
  position: relative;
  overflow: hidden;
}

.plugin::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--brand-end), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.plugin:hover {
  transform: translateY(-4px);
  background: var(--card-hover);
  border-color: rgba(124, 92, 255, 0.35);
  box-shadow: 0 16px 40px rgba(124, 92, 255, 0.08);
}

.plugin:hover::before { opacity: 1; }

.plugin h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.plugin .summary {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.9rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.plugin-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 22px;
}

.tag {
  max-width: 52%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.1);
  color: #c4b5fd;
  font-size: 0.75rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.download-btn:hover {
  background: rgba(124, 92, 255, 0.1);
  color: #c4b5fd;
}

.download-btn:disabled {
  opacity: 1;
  cursor: default;
  color: var(--faint);
}

.download-btn:disabled:hover {
  background: transparent;
  color: var(--faint);
}

.download-btn svg {
  width: 14px;
  height: 14px;
}

.empty {
  margin: 40px auto;
  text-align: center;
  color: var(--muted);
}

/* ── Steps ── */
.stack {
  display: grid;
  gap: 14px;
  margin-top: 36px;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  transition: all 0.25s ease;
}

.step:hover {
  border-color: rgba(124, 92, 255, 0.2);
  transform: translateX(4px);
}

.num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.15), rgba(0, 212, 255, 0.1));
  color: #c4b5fd;
  font-weight: 700;
  border: 1px solid rgba(124, 92, 255, 0.15);
}

.step h2 { margin: 4px 0 6px; font-size: 1.15rem; }
.step p { margin: 0; }

/* ── Prose ── */
.prose {
  max-width: 760px;
  margin: 36px auto 0;
}

.prose h2 {
  margin: 32px 0 8px;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}

.prose ul { padding-left: 1.2rem; }
.prose a { color: #c4b5fd; transition: color 0.2s; }
.prose a:hover { color: white; }
.prose code {
  font-family: Consolas, "Segoe UI Mono", monospace;
  font-size: 0.92em;
  color: #d5c8ff;
  background: rgba(124, 92, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.note {
  margin-top: 28px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(124, 92, 255, 0.15);
  background: rgba(124, 92, 255, 0.04);
  color: var(--muted);
}

.callout {
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 36px;
  color: var(--muted);
  background: rgba(6, 6, 11, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 24px;
}

.site-footer h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.95rem;
}

.site-footer h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.site-footer p, .site-footer li { font-size: 0.92rem; line-height: 1.55; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 6px; }
.site-footer a { transition: color 0.2s; }
.site-footer a:hover { color: #c4b5fd; }

.legal {
  width: min(var(--max), calc(100% - 40px));
  margin: 22px auto 0;
  color: var(--faint);
  font-size: 0.82rem;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .features, .grid, .footer-grid { grid-template-columns: 1fr 1fr; }
}

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.sort-note {
  margin: 8px 0 0;
  text-align: center;
  color: var(--faint);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .nav-wrap { flex-wrap: wrap; padding: 12px 0; }
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding-bottom: 8px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .hero, .page-intro { text-align: center; }
  .features, .grid, .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
