/* Product Spec Extension landing page.
   Hand-authored, no build step, no external dependencies. Kept in sync with
   the docs/ wiki by the maintain-docs skill. */

:root {
  --bg: #0d1117;
  --bg-alt: #11161d;
  --surface: #161b22;
  --border: #283039;
  --text: #e6edf3;
  --text-muted: #9aa7b4;
  --accent: #4c8dff;
  --accent-strong: #6aa3ff;
  --code-bg: #0a0e14;
  --radius: 12px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --bg-alt: #f6f8fa;
    --surface: #ffffff;
    --border: #d8dee4;
    --text: #1f2328;
    --text-muted: #59636e;
    --accent: #0a5cff;
    --accent-strong: #0a4ed6;
    --code-bg: #f6f8fa;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-weight: 700;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

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

.nav-cta {
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 8px;
  color: var(--text) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.2s;
}

/* Hero */
.hero {
  padding: 88px 0 72px;
  background: radial-gradient(
    1000px 400px at 70% -10%,
    color-mix(in srgb, var(--accent) 18%, transparent),
    transparent
  );
}

.hero-inner {
  max-width: 820px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-strong);
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
}

.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 0 32px;
}

.install {
  margin-bottom: 24px;
}

.install-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.code-copy {
  display: flex;
  align-items: stretch;
  max-width: 460px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--code-bg);
}

.code-copy code {
  flex: 1;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
}

.copy-btn {
  border: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 0 18px;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.copy-btn:hover {
  background: var(--accent);
  color: #fff;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

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

.btn-ghost:hover {
  border-color: var(--accent);
}

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.hero-badges li {
  font-size: 0.82rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.section-lede {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 720px;
  margin: 0 0 36px;
}

.note {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 20px;
}

/* Cards */
.cards {
  display: grid;
  gap: 20px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
}

/* Table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cmd-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.cmd-table th,
.cmd-table td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.cmd-table thead th {
  background: var(--bg-alt);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.cmd-table tbody tr:last-child td {
  border-bottom: 0;
}

.cmd-table td:nth-child(4) {
  color: var(--text-muted);
}

/* Steps */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 60px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
}

.steps h3 {
  margin: 4px 0 10px;
  font-size: 1.2rem;
}

.steps p {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.steps pre {
  margin: 0 0 12px;
}

/* Flow diagram */
.flow {
  font-size: 0.8rem;
  line-height: 1.5;
}

/* FAQ */
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 20px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  margin: 0 0 6px;
}

.footer-tag {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: flex-start;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

/* Responsive */
@media (max-width: 760px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 8px 24px 16px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 6px 0;
  }

  .nav-cta {
    display: inline-block;
    margin-top: 6px;
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .section {
    padding: 56px 0;
  }
}
