:root {
  color-scheme: dark;
  --bg: #09090b;
  --bg-soft: #0f0f14;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.07);
  --border-light: rgba(255, 255, 255, 0.04);
  --text: #f4f4f5;
  --text-secondary: #a1a1aa;
  --muted: #63637a;
  --accent: #818cf8;
  --accent-dim: rgba(129, 140, 248, 0.1);
  --accent-glow: rgba(129, 140, 248, 0.25);
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --max-width: 1080px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", "Cascadia Code", monospace;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  z-index: 100;
}

.skip-link:focus-visible {
  top: 1rem;
}

code,
pre {
  font-family: var(--font-mono);
}

/* ─── Shell ─── */

.shell {
  position: relative;
  width: min(calc(100% - 3rem), var(--max-width));
  margin: 0 auto;
  z-index: 1;
}

/* ─── Header ─── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.brand-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav a {
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-xs);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 150ms, background 150ms;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--text);
  background: var(--surface);
}

/* ─── Hero ─── */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
  padding: 6rem 0 5rem;
}

.hero-glow {
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 650px;
  background: radial-gradient(ellipse, rgba(129, 140, 248, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  max-width: 44ch;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: transform 120ms, box-shadow 120ms, background 120ms;
}

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

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 36px rgba(129, 140, 248, 0.35);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}

/* Install action buttons */

.hero-install-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-install {
  padding: 0.55rem 1.15rem;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  gap: 0.4rem;
}

.btn-install:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-install svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.btn-install:hover svg {
  opacity: 1;
}

/* Terminal */

.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.terminal-title {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
}

.terminal pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.8;
  color: #b8b8c8;
}

.terminal pre .comment { color: #4a4a5a; }
.terminal pre .cmd { color: var(--accent); }
.terminal pre .str { color: #86efac; }
.terminal pre .flag { color: #93c5fd; }

/* ─── Sections ─── */

.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border-light);
}

.section-label {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.section-desc {
  max-width: 56ch;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ─── Feature cards (capabilities) ─── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--border);
}

.feature-card {
  padding: 2rem;
  background: var(--bg-soft);
  transition: background 200ms;
}

.feature-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
}

.feature-meta {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ─── Tool rows (list layout) ─── */

.tool-table {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tool-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  transition: background 150ms;
}

.tool-row:last-child {
  border-bottom: none;
}

.tool-row:hover {
  background: var(--surface);
}

.tool-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  font-family: var(--font-mono);
  margin-top: 0.1rem;
}

.tool-info h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.tool-info p {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  font-family: var(--font-mono);
}

/* ─── Client pills ─── */

.section-full {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.section-full .shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.marquee-wrap {
  width: 100%;
  overflow: hidden;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.marquee-track {
  display: flex;
}

.marquee-content {
  display: flex;
  gap: 0.8rem;
  padding-right: 0.8rem;
  flex-shrink: 0;
  will-change: transform;
}

.marquee-row-1 .marquee-content {
  animation: marquee-left 50s linear infinite;
}

.marquee-row-2 .marquee-content {
  animation: marquee-right 55s linear infinite;
}

.marquee-row-3 .marquee-content {
  animation: marquee-left 45s linear infinite;
}

@keyframes marquee-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes marquee-right {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.client-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 200px;
  transition: background 180ms, border-color 180ms;
}

.client-pill:hover {
  background: var(--surface-hover);
  border-color: rgba(255, 255, 255, 0.1);
}

.client-pill-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: contain;
}

.client-pill-icon-text {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(129, 140, 248, 0.08);
  letter-spacing: 0.02em;
}

.client-pill-name {
  font-weight: 600;
  font-size: 0.88rem;
}

.client-pill-desc {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ─── Install steps ─── */

.steps {
  display: grid;
  gap: 0;
  counter-reset: step;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  counter-increment: step;
}

.step:last-child {
  border-bottom: none;
}

.step-num {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.15rem;
}

.step-num::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.step-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.step-body p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}

.step-body pre {
  margin-top: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow-x: auto;
  font-size: 0.8rem;
  line-height: 1.7;
  color: #b8b8c8;
}

/* ─── FAQ ─── */

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item {
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
}

.faq-item:nth-child(2n) {
  border-right: none;
}

.faq-item:nth-last-child(-n+2) {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.faq-item p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

/* ─── Footer ─── */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 0;
  margin-top: 1rem;
  border-top: 1px solid var(--border-light);
}

.footer p {
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 500;
  transition: color 150ms;
}

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

/* ─── Animations ─── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.section {
  animation: fadeUp 550ms ease both;
}

/* ─── Responsive ─── */

@media (max-width: 1024px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3.5rem 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .shell {
    width: min(calc(100% - 2rem), var(--max-width));
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav {
    flex-wrap: wrap;
  }

  h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 2.5rem 0;
  }

  .section {
    padding: 3rem 0;
  }

  .feature-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .faq-item {
    border-right: none;
  }

  .faq-item:nth-last-child(2) {
    border-bottom: 1px solid var(--border-light);
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .step {
    grid-template-columns: 40px 1fr;
    gap: 0.75rem;
  }

  .tool-row {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero,
  .section,
  .btn {
    animation: none;
    transition: none;
  }

  .marquee-content {
    animation: none !important;
  }
}
