:root {
  --bg: #07090f;
  --bg-soft: #0d1018;
  --panel: #11151f;
  --panel-2: #161b27;
  --border: #232a3a;
  --text: #e7ecf5;
  --muted: #9aa6bd;
  --brand: #5b8cff;
  --brand-2: #7c5cff;
  --accent: #2dd4bf;
  --radius: 14px;
  --maxw: 1120px;
  --shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, 0.16), transparent
      60%),
    radial-gradient(900px 500px at 0% 0%, rgba(91, 140, 255, 0.14), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

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

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(12px);
  background: rgba(7, 9, 15, 0.7);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-small {
  font-size: 15px;
}

.logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px -8px rgba(124, 92, 255, 0.8);
}

.logo svg {
  width: 18px;
  height: 18px;
}

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

.nav-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(91, 140, 255, 0.8);
}

.btn-primary:hover {
  filter: brightness(1.07);
}

.btn-ghost {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: #36405a;
  background: var(--panel-2);
}

.btn-lg {
  padding: 13px 22px;
  font-size: 15px;
}

.btn svg {
  width: 17px;
  height: 17px;
  transition: transform 0.18s ease;
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.hero {
  padding: 92px 0 64px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy {
  text-align: left;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(45, 212, 191, 0.07);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 26px;
}

.badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.18);
}

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
  max-width: 620px;
  font-weight: 800;
}

.hero h1 .grad {
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--muted);
  max-width: 560px;
  margin: 0 0 32px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.final .hero-cta,
.hero-cta.center {
  justify-content: center;
}

.install {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 12px 12px 18px;
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo,
    Consolas, monospace;
  font-size: 14.5px;
  box-shadow: var(--shadow);
}

.install .prompt {
  color: var(--accent);
  user-select: none;
}

.install code {
  color: var(--text);
}

.copy-btn {
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.copy-btn:hover {
  color: var(--text);
  border-color: #36405a;
}

.copy-btn.copied {
  color: var(--accent);
  border-color: rgba(45, 212, 191, 0.4);
}

.trust-row {
  margin-top: 28px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13.5px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-row svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

section.block {
  padding: 84px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-head .eyebrow {
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.03em;
  margin: 12px 0 14px;
  font-weight: 800;
}

.section-head p {
  color: var(--muted);
  margin: 0;
  font-size: 16.5px;
}

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

.card {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #36405a;
}

.card .ico {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: rgba(91, 140, 255, 0.12);
  color: var(--brand);
}

.card .ico svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

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

.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.step .num {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 15px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.step code {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--accent);
}

.callout {
  background:
    radial-gradient(600px 200px at 100% 0%, rgba(124, 92, 255, 0.18), transparent),
    var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}

.callout h2 {
  font-size: clamp(24px, 3.5vw, 32px);
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-weight: 800;
}

.callout p {
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 15.5px;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
}

.checklist svg {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--accent);
  margin-top: 1px;
}

.final {
  text-align: center;
  padding: 96px 0;
}

.final h2 {
  font-size: clamp(28px, 4.5vw, 42px);
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  font-weight: 800;
}

.final p {
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 32px;
  font-size: 17px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--muted);
  font-size: 13.5px;
}

.foot-links {
  display: flex;
  gap: 22px;
}

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

/* ---------- Animated editor / refactor demo ---------- */
.hero-demo {
  position: relative;
}

.hero-demo::before {
  content: "";
  position: absolute;
  inset: -30px -10px;
  background: radial-gradient(
    420px 300px at 70% 30%,
    rgba(124, 92, 255, 0.22),
    transparent 70%
  );
  filter: blur(8px);
  z-index: -1;
}

.editor {
  background: linear-gradient(180deg, #0f1320, #0a0d15);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.editor-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.editor-bar .dots {
  display: inline-flex;
  gap: 7px;
}

.editor-bar .dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #303a4f;
}

.editor-bar .dots i:nth-child(1) { background: #ff5f57; }
.editor-bar .dots i:nth-child(2) { background: #febc2e; }
.editor-bar .dots i:nth-child(3) { background: #28c840; }

.editor-file {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12.5px;
  color: var(--muted);
}

.editor-tag {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.editor-body {
  padding: 18px 18px 8px;
  min-height: 300px;
}

.code {
  margin: 0;
  font-family: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo,
    Consolas, monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #c4cde0;
  white-space: pre-wrap;
  word-break: break-word;
}

.code .kw { color: #7c9cff; }
.code .fn { color: #5be3c0; }
.code .str { color: #f0a868; }
.code .com { color: #66708a; font-style: italic; }
.code .num { color: #d68cff; }
.code .add { background: rgba(45, 212, 191, 0.12); border-left: 2px solid var(--accent); display: inline-block; width: 100%; }
.code .del { background: rgba(255, 95, 87, 0.1); border-left: 2px solid #ff5f57; display: inline-block; width: 100%; }

.caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-bottom: -2px;
  background: var(--accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.editor-foot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
}

.diff-stat {
  font-weight: 700;
}

.diff-stat.add { color: var(--accent); }
.diff-stat.del { color: #ff7a72; }

.editor-status {
  margin-left: auto;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.editor-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.18);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Stats band ---------- */
.stats-band {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(124, 92, 255, 0.05), transparent);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 44px 24px;
  text-align: center;
}

.stat-num {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ---------- Compliance ---------- */
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 48px;
}

.comp-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  font-weight: 600;
  font-size: 14px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.comp-badge:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 212, 191, 0.4);
}

.comp-badge svg {
  width: 19px;
  height: 19px;
  color: var(--accent);
}

.grid-compliance {
  grid-template-columns: repeat(3, 1fr);
}

.ico-accent {
  background: rgba(45, 212, 191, 0.12);
  color: var(--accent);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.grid .reveal.in:nth-child(2) { transition-delay: 0.06s; }
.grid .reveal.in:nth-child(3) { transition-delay: 0.12s; }
.grid .reveal.in:nth-child(4) { transition-delay: 0.18s; }
.grid .reveal.in:nth-child(5) { transition-delay: 0.24s; }
.grid .reveal.in:nth-child(6) { transition-delay: 0.3s; }
.steps .reveal.in:nth-child(2) { transition-delay: 0.1s; }
.steps .reveal.in:nth-child(3) { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .editor { animation: none; }
  .caret, .editor-status::before { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 64px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }
}

@media (max-width: 860px) {
  .grid,
  .steps,
  .grid-compliance {
    grid-template-columns: 1fr;
  }

  .callout {
    grid-template-columns: 1fr;
    padding: 32px;
  }

  .nav-links {
    display: none;
  }
}
