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

:root {
  --bg: #f7f5f2;
  --bg-card: #efede8;
  --bg-white: #ffffff;
  --bg-elevated: var(--bg-white);
  --bg-muted: var(--bg-card);
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --text-light: #999;
  --border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-nav: 0 2px 12px rgba(0, 0, 0, 0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --display: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 245, 242, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  margin-right: auto;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--text);
  color: white;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 6px 12px;
  font-size: 14px;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.nav-cta {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: var(--text);
  border-radius: var(--radius-pill);
  transition: opacity 0.15s;
}

.nav-cta:hover {
  opacity: 0.85;
}

/* Hero */

.hero {
  padding: 72px 24px 64px;
}

.hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 460px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 500;
  color: white;
  background: var(--text);
  border-radius: var(--radius-pill);
  transition: opacity 0.15s, transform 0.15s;
}

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

.btn-large {
  padding: 15px 28px;
  font-size: 16px;
}

.hero-note {
  font-size: 13px;
  color: var(--text-light);
}

/* Hero preview */

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

.preview-shell {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.12);
}

.preview-body {
  display: grid;
  grid-template-columns: 130px 1fr;
  min-height: 220px;
}

.preview-sidebar {
  padding: 12px 10px;
  border-right: 1px solid var(--border);
  background: #fafafa;
}

.preview-sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  font-size: 11px;
  color: var(--text-muted);
  border-radius: 6px;
  margin-bottom: 4px;
}

.preview-sidebar-item.active {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  font-weight: 500;
}

.preview-sidebar-item img {
  flex-shrink: 0;
}

.preview-main {
  display: flex;
  flex-direction: column;
}

.preview-code {
  flex: 1;
  padding: 14px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 11px;
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
}

.preview-code .kw { color: #7c3aed; }
.preview-code .str { color: #059669; }

.preview-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 10.5px;
  color: var(--text-muted);
  background: #fafafa;
}

/* Compatibility */

.compat {
  padding: 0 24px 72px;
}

.compat-inner {
  max-width: 860px;
  margin: 0 auto;
}

.compat-header {
  text-align: center;
  margin-bottom: 32px;
}

.compat-header h2 {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.compat-header p {
  color: var(--text-muted);
  font-size: 15px;
}

.compat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.compat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.15s, transform 0.15s;
}

.compat-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.compat-icon {
  width: 40px;
  height: 40px;
}

.compat-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.compat-note {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}

.compat-note a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.compat-note a:hover {
  color: var(--text);
}

/* Features */

.features {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.features-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 48px;
}

.features-header h2 {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.features-header p {
  color: var(--text-muted);
}

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

.feature-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.feature-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 12px;
}

.feature-card h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.feature-card > p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

.feature-visual {
  margin-top: auto;
  display: flex;
  justify-content: center;
}

/* Mock UI components */

.mock-window {
  width: 100%;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}

.mock-editor .mock-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 8px 0;
  background: #f0f0f0;
  border-bottom: 1px solid var(--border);
}

.mock-tab {
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-muted);
  background: #e8e8e8;
  border-radius: 6px 6px 0 0;
}

.mock-tab.active {
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 500;
}

.mock-code {
  padding: 14px;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  font-size: 10.5px;
  line-height: 1.7;
  overflow-x: auto;
}

.mock-code .kw { color: #7c3aed; }
.mock-code .str { color: #059669; }

.mock-run-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-light);
}

.mock-run-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--sans);
  color: white;
  background: var(--text);
  border: none;
  border-radius: 6px;
  cursor: default;
}

.mock-run-btn kbd {
  font-size: 10px;
  opacity: 0.7;
}

.mock-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
}

.row-count {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-light);
}

.mock-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}

.filter-chip {
  padding: 3px 8px;
  font-size: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
}

.filter-chip em {
  font-style: normal;
  color: var(--text-light);
}

.mock-data {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.mock-data th,
.mock-data td {
  padding: 7px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.mock-data th {
  font-weight: 500;
  color: var(--text-muted);
  background: #fafafa;
}

.mock-data td {
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 9.5px;
}

.mock-export-bar {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}

.mock-export-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: default;
}

.mock-export-menu {
  position: absolute;
  top: calc(100% - 4px);
  right: 14px;
  display: flex;
  flex-direction: column;
  min-width: 90px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  z-index: 1;
}

.mock-export-menu span {
  padding: 7px 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.mock-export-menu span:first-child {
  background: var(--bg);
  color: var(--text);
}

/* FAQ */

.faq {
  padding: 0 24px 80px;
}

.faq-inner {
  max-width: 640px;
  margin: 0 auto;
}

.faq h2 {
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 36px;
}

.faq-item {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item dt {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.faq-item dd {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

.faq-item a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-item a:hover {
  color: var(--text);
}

/* Download */

.download {
  padding: 0 24px 100px;
}

.download-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 32px;
  text-align: center;
  background: var(--text);
  color: white;
  border-radius: var(--radius-lg);
}

.download-card h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.download-card > p {
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 28px;
}

.download-card .btn-primary {
  background: white;
  color: var(--text);
}

.download-card .btn-primary:hover {
  background: var(--bg-card);
  opacity: 1;
}

.download-alt {
  margin-top: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.download-alt a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Footer */

.footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-light);
  border-top: 1px solid var(--border);
}

/* Responsive */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    align-items: center;
  }

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

  .compat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 48px;
  }

  .compat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .compat-card {
    padding: 18px 12px;
  }

  .download-card {
    padding: 36px 24px;
  }
}
