:root {
  --purple: #7C3AED;
  --purple-dark: #6D28D9;
  --purple-light: #F5F3FF;
  --purple-50: #EDE9FE;
  --text: #111827;
  --muted: #6B7280;
  --border: #E5E7EB;
  --bg: #FFFFFF;
  --code-bg: #1E1E2E;
  --footer-bg: #1A1225;
  --green: #059669;
  --green-bg: #ECFDF5;
  --radius: 12px;
  --max-w: 1120px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--purple);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--purple-dark);
}

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

/* ── Navbar ── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.navbar-logo img {
  height: 36px;
  width: auto;
}

.navbar-links {
  display: none;
  list-style: none;
  gap: 8px;
}

.navbar-links a {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.navbar-links a:hover {
  background: var(--purple-light);
  color: var(--purple);
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  transition: background 0.2s;
}

.nav-toggle:hover {
  background: var(--purple-light);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
  color: var(--text);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: var(--purple);
}

/* ── Hero ── */

.hero {
  padding: 120px 0 80px;
  background: linear-gradient(180deg, var(--purple-light) 0%, var(--bg) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.hero-image {
  display: flex;
  justify-content: center;
}

.hero-image img {
  max-height: 400px;
  width: auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 680px;
}

.hero h1 .gradient {
  background: linear-gradient(135deg, var(--purple) 0%, #A855F7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 560px;
  margin-top: 20px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  color: #fff;
}

.btn-outline {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple);
}

/* ── Section defaults ── */

section {
  padding: 80px 0;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--muted);
  margin-top: 12px;
  max-width: 560px;
  line-height: 1.7;
}

.section-center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Social Proof ── */

.social-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.social-proof a {
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px dashed var(--border);
  transition: color 0.2s, border-color 0.2s;
}

.social-proof a:hover {
  color: var(--purple);
  border-color: var(--purple);
}

/* ── MCP Section ── */

.mcp-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 48px;
}

.mcp-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.mcp-card:hover {
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.08);
  border-color: var(--purple-50);
}

.mcp-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.mcp-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--purple-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mcp-card-icon svg {
  width: 24px;
  height: 24px;
  color: var(--purple);
}

.mcp-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  padding: 2px 10px;
  border-radius: 100px;
  margin-top: 4px;
}

.mcp-card p {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.mcp-card-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.875rem;
}

.mcp-card-links a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
}

.mcp-card-links a svg {
  width: 16px;
  height: 16px;
}

.mcp-card-links code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  background: #F3F4F6;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--text);
  word-break: break-all;
}

.mcp-card-links .sep {
  color: var(--border);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  cursor: pointer;
  color: var(--muted);
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--purple-light);
}

.copy-btn.copied {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-bg);
}

/* Config + Demo grid */
.config-demo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-top: 56px;
  align-items: start;
}

.config-demo h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.config-demo .hint {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.config-demo .hint code {
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  background: #F3F4F6;
  padding: 2px 8px;
  border-radius: 4px;
}

.code-block {
  background: var(--code-bg);
  color: #CDD6F4;
  font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
  font-size: 0.875rem;
  line-height: 1.65;
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.code-block .key { color: #89B4FA; }
.code-block .str { color: #A6E3A1; }

.config-note {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 12px;
}

.screencast-wrap {
  margin-left: -24px;
  margin-right: -24px;
}

.screencast-wrap img {
  width: 100%;
}

.screencast-caption {
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

.mcp-more {
  text-align: center;
  margin-top: 48px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.mcp-more a {
  font-weight: 600;
}

/* ── App Section ── */

.app-section {
  background: var(--purple-light);
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

.app-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

.app-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.app-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-feature-icon svg {
  width: 18px;
  height: 18px;
  color: var(--purple);
}

.app-feature h4 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.app-feature p {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
  padding: 12px 24px;
  background: var(--text);
  color: #fff;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background 0.2s;
}

.app-store-btn:hover {
  background: #000;
  color: #fff;
}

.app-store-btn svg {
  width: 22px;
  height: 22px;
}

.app-screenshot {
  display: flex;
  justify-content: center;
}

.app-screenshot img {
  max-height: 520px;
  width: auto;
}

/* ── FAQ ── */

.faq-list {
  max-width: 720px;
  margin: 40px auto 0;
}

.faq-list details {
  border-bottom: 1px solid var(--border);
}

.faq-list details:first-child {
  border-top: 1px solid var(--border);
}

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

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

.faq-list summary::after {
  content: "";
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-left: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.2s;
}

.faq-list details[open] summary::after {
  transform: rotate(180deg);
}

.faq-list .faq-answer {
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ── Contact ── */

.contact-section {
  text-align: center;
}

.contact-email {
  margin-top: 24px;
}

.contact-email a {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--purple);
  padding: 8px 20px;
  border: 2px solid var(--purple);
  border-radius: 10px;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}

.contact-email a:hover {
  background: var(--purple);
  color: #fff;
}

/* ── Footer ── */

.footer {
  background: var(--footer-bg);
  padding: 56px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
}

.footer-heading {
  font-size: 0.8125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8125rem;
}

/* ── Back to top ── */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--purple);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
  transition: background 0.2s, transform 0.2s;
  z-index: 50;
}

.back-to-top:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
}

.back-to-top.visible {
  display: flex;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

/* ── Responsive ── */

@media (min-width: 640px) {
  .app-features {
    grid-template-columns: 1fr 1fr;
  }

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

@media (min-width: 768px) {
  .mcp-cards {
    grid-template-columns: 1fr 1fr;
  }

  .config-demo {
    grid-template-columns: 1fr 1fr;
  }

  .screencast-wrap {
    margin-left: 0;
    margin-right: 0;
  }

  .screencast-wrap img {
    border-radius: var(--radius);
  }
}

@media (min-width: 1024px) {
  .navbar-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .hero {
    padding: 160px 0 100px;
  }

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

  .hero-image img {
    max-height: 500px;
  }

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

  .app-screenshot {
    margin-top: 0;
  }
}
