/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--accent);
  color: var(--accent-text);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: var(--text-sm);
  z-index: 200;
  text-decoration: none;
}
.skip-link:focus { top: var(--space-4); }
body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
code { font-family: var(--font-mono); }

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg-primary) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-primary);
  font-weight: 700;
  font-size: var(--text-lg);
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
  border-radius: var(--radius);
}
.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-6);
  flex: 1;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-actions { display: flex; align-items: center; gap: var(--space-4); }
.nav-github {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-text);
}
.btn-secondary {
  background: color-mix(in srgb, var(--bg-secondary) 94%, transparent);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: var(--space-3) var(--space-6); font-size: var(--text-base); }

/* Sections */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.section {
  padding: var(--space-24) 0;
}
.section-header {
  text-align: center;
  max-width: 48rem;
  margin: 0 auto var(--space-16);
}
.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-4);
}
.section-title {
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-4);
}
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Hero */
.hero {
  padding: var(--space-24) 0 var(--space-20);
  text-align: center;
}
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(20rem, 0.9fr);
  gap: var(--space-10);
  align-items: start;
  text-align: left;
}
.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}
.hero-badge strong { color: var(--accent); }
.hero h1 {
  font-size: var(--text-6xl);
  font-weight: 800;
  line-height: 1.08;
  max-width: 52rem;
  margin: 0 0 var(--space-6);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  max-width: 38rem;
  margin: 0 0 var(--space-8);
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}
.hero-install {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: 0;
  max-width: max-content;
}
.hero-install code { color: var(--text-primary); }
.hero-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) * 1.25);
  padding: var(--space-8);
  box-shadow: 0 1.5rem 3rem color-mix(in srgb, var(--bg-primary) 88%, transparent);
}
.hero-panel-kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-5);
}
.hero-panel-grid {
  display: grid;
  gap: var(--space-4);
}
.hero-panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.hero-panel-card-accent {
  background: color-mix(in srgb, var(--bg-surface) 78%, var(--accent) 22%);
}
.hero-panel-label {
  display: inline-block;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.hero-panel-card h2 {
  font-size: var(--text-2xl);
  line-height: 1.15;
  margin-bottom: var(--space-3);
}
.hero-panel-card p {
  color: var(--text-secondary);
}
.hero-proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.hero-proof-strip div {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.hero-proof-strip strong {
  display: block;
  font-size: var(--text-xl);
  line-height: 1.1;
}
.hero-proof-strip span {
  display: block;
  margin-top: var(--space-2);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* Docs */
.docs-body {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: 1.8;
}
.docs-body > * + * {
  margin-top: var(--space-6);
}
.docs-heading {
  color: var(--text-primary);
  line-height: 1.2;
}
.docs-heading-2 {
  font-size: var(--text-3xl);
}
.docs-heading-3 {
  font-size: var(--text-2xl);
}
.docs-heading-4,
.docs-heading-5 {
  font-size: var(--text-xl);
}
.docs-paragraph code,
.docs-list code {
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 0.1rem 0.35rem;
}
.docs-list,
.docs-list-ordered {
  padding-left: var(--space-6);
}
.docs-list li,
.docs-list-ordered li {
  margin-top: var(--space-2);
}
.docs-code {
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-primary);
}
.docs-table-wrap {
  overflow-x: auto;
}

.product-shot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}

.product-shot-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product-shot-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  text-align: inherit;
}

.product-shot-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--border-subtle);
}

.product-shot-trigger img {
  transition: transform 0.15s ease;
}

.product-shot-trigger:hover img {
  transform: scale(1.015);
}

.screenshot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: color-mix(in srgb, var(--bg-primary) 78%, black 22%);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.screenshot-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.screenshot-lightbox[hidden] {
  display: none;
}

.screenshot-lightbox__dialog {
  position: relative;
  width: min(92vw, 82rem);
  max-height: 90vh;
  padding: var(--space-4);
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--border));
  border-radius: calc(var(--radius-lg) * 1.2);
  background: color-mix(in srgb, var(--bg-secondary) 96%, transparent);
  box-shadow: 0 1.8rem 4rem color-mix(in srgb, var(--bg-primary) 88%, transparent);
}

.screenshot-lightbox__close {
  appearance: none;
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-primary) 82%, transparent);
  color: var(--text-primary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.screenshot-lightbox__figure {
  margin: 0;
  display: grid;
  gap: var(--space-3);
}

.screenshot-lightbox__image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(90vh - 7rem);
  margin: 0 auto;
  border-radius: calc(var(--radius) * 1.15);
  border: 1px solid var(--border-subtle);
}

.screenshot-lightbox__caption {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  text-align: center;
}

body.lightbox-open {
  overflow: hidden;
}

.product-shot-copy {
  padding: var(--space-4);
}

.product-shot-copy h3 {
  color: var(--text-primary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.product-shot-copy p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: var(--space-6);
}
.feature-card {
  padding: var(--space-8);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}
.feature-card h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.feature-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* Code block */
.code-window {
  background: var(--neutral-950);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.code-titlebar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--neutral-900);
  border-bottom: 1px solid var(--border);
}
.code-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--neutral-700);
}
.code-copy-button {
  appearance: none;
  margin-left: auto;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--forest-500) 70%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--gold-100);
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.code-copy-button svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.code-copy-button:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: color-mix(in srgb, var(--accent) 48%, var(--forest-500) 52%);
}
.code-copy-button.is-copied {
  background: color-mix(in srgb, var(--forest-300) 22%, transparent);
  border-color: color-mix(in srgb, var(--forest-200) 38%, var(--forest-500) 62%);
  color: var(--forest-100);
}
.code-window pre {
  padding: var(--space-6);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-secondary);
}
.code-comment { color: var(--text-muted); }
.code-command { color: var(--text-primary); }
.code-flag { color: var(--accent); }
.code-string { color: var(--forest-200); }
.code-operator { color: var(--gold-200); }

.inline-command {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.16rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 0.9);
  background: var(--neutral-950);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.4;
  vertical-align: baseline;
  white-space: nowrap;
}

/* Social proof */
.social-proof {
  text-align: center;
  padding: var(--space-16) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.logo-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-12);
  flex-wrap: wrap;
  opacity: 0.5;
}

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.comparison-table th,
.comparison-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}
.comparison-table th { color: var(--text-muted); font-weight: 600; }
.comparison-table td:first-child { font-weight: 600; }

/* CTA */
.cta-section {
  text-align: center;
  padding: var(--space-24) 0;
}
.cta-section h2 {
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-bottom: var(--space-4);
}
.cta-section p {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-16) 0 var(--space-8);
}
.footer-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 1.5fr 3fr;
  gap: var(--space-12);
}
.footer-brand .logo-text { font-weight: 700; font-size: var(--text-lg); }
.footer-tagline {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-top: var(--space-3);
  max-width: 20rem;
}
.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
.footer-heading {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--space-2); }
.footer-col a {
  color: var(--text-muted);
  font-size: var(--text-sm);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  max-width: var(--container);
  margin: var(--space-12) auto 0;
  padding: var(--space-6) var(--space-6) 0;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.page-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.72rem 0.9rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(219, 176, 48, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.page-meta-label {
  font-weight: 700;
  color: var(--text-primary);
}

.page-meta-value {
  color: var(--text-secondary);
}

.page-meta-item a.page-meta-value {
  color: var(--gold-300);
}

/* Responsive */
/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  flex-direction: column;
  gap: 4px;
}
.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.2s;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
    gap: var(--space-4);
  }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    width: 100%;
    order: 3;
  }
  .nav-links.open {
    display: grid;
    grid-template-columns: 1fr;
    position: static;
    margin-top: var(--space-2);
    padding: var(--space-4) 0 0;
    border-top: 1px solid var(--border-subtle);
    gap: var(--space-3);
  }
  .nav-links.open > li {
    width: 100%;
  }
  .nav-links.open a {
    display: block;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--bg-secondary) 94%, transparent);
    color: var(--text-primary);
    font-size: var(--text-base);
    line-height: 1.4;
  }
  .nav-links.open a:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--bg-secondary) 82%, transparent);
  }
  .nav-actions { margin-left: auto; }
  .nav-actions .nav-github { display: none; }
  .hero-split { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { align-items: center; }
  .hero h1 { font-size: var(--text-4xl); }
  .section-title { font-size: var(--text-3xl); }
  .footer-container { grid-template-columns: 1fr; }
  .footer-columns { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-install { margin: 0 auto; }
  .hero-proof-strip { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr !important; }
  .product-shot-grid { grid-template-columns: 1fr; }
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 440px) {
  .code-window pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .inline-command {
    white-space: normal;
  }

  .comparison-table {
    font-size: var(--text-xs);
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--space-2) var(--space-3);
  }
}
