:root {
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f5f7ff;
  --panel: #e8ecff;
  --border: #dfe6f4;
  --border-strong: #cfd8ee;
  --text: #050816;
  --muted: #64748b;
  --accent: #2563eb;
  --topbar-background: rgba(255, 255, 255, 0.86);
  --grid-line: #e9eefb;
  --card-background: #ffffff;
}

:root[data-theme="dark"] {
  --background: #070a10;
  --surface: #11151d;
  --surface-soft: #151b25;
  --panel: #111827;
  --border: #253044;
  --border-strong: #344259;
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --topbar-background: rgba(7, 10, 16, 0.88);
  --grid-line: rgba(148, 163, 184, 0.14);
  --card-background: #0f141c;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family:
    "Hanken Grotesk", "Aptos", "SF Pro Display", "Segoe UI", ui-sans-serif,
    sans-serif;
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-background);
  backdrop-filter: blur(10px);
}

.brand,
.nav-actions a {
  text-decoration: none;
}

.brand {
  padding-left: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
}

.nav-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.nav-actions {
  color: var(--muted);
  font-size: 0.72rem;
}

.primary-button,
.ghost-button,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0 0.8rem;
  border-radius: 0.125rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-button {
  border: 1px solid #1d4ed8;
  color: #ffffff;
  background: var(--accent);
}

.ghost-button {
  border: 1px solid #cbd5e1;
  color: #0f172a;
  background: #ffffff;
}

.theme-toggle {
  gap: 0.4rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  line-height: 1;
}

.theme-toggle-icon::before {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.marketing-home {
  display: grid;
  gap: 2.85rem;
  min-height: calc(100vh - 3rem);
  padding: 3.35rem 2rem 3.2rem;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--surface);
  background-size: 24px 24px;
}

.hero {
  display: grid;
  gap: 1rem;
  justify-items: center;
  width: min(100%, 760px);
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(2rem, 3.35vw, 2.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero p {
  max-width: 690px;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.hero > span,
.section-heading span,
.pricing-card > div > span,
.final-cta span,
.article-list span,
.workflow-grid article span,
.flow-node span {
  color: var(--accent);
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero > span {
  color: #7b8498;
}

.actions {
  justify-content: center;
  margin-top: 0.25rem;
}

.flow-visualization {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  width: min(100%, 2368px);
  min-height: 15.5rem;
  margin: 0 auto;
  padding: 1.15rem;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: #596173;
  font-size: 0.82rem;
}

.flow-node {
  display: grid;
  align-content: center;
  gap: 0.45rem;
  min-height: 10.5rem;
  padding: 1rem;
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--card-background) 78%, transparent);
}

.flow-node-active {
  border-color: #9bb5ff;
  background: var(--card-background);
  box-shadow: 0 18px 60px rgba(37, 99, 235, 0.12);
}

.flow-node strong {
  color: var(--text);
  font-size: 1.05rem;
}

.flow-node p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.flow-arrow {
  display: grid;
  align-items: center;
  color: var(--muted);
}

.landing-band,
.final-cta {
  width: min(100%, 2368px);
  margin: 0 auto;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.landing-band {
  display: grid;
  gap: 1.4rem;
  padding: 1.35rem;
}

.section-heading {
  display: grid;
  gap: 0.65rem;
  max-width: 45rem;
}

.section-heading-wide {
  max-width: 62rem;
}

.section-heading h2,
.final-cta h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.55rem, 2.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0;
}

.section-heading p,
.final-cta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.integration-grid,
.workflow-grid,
.pricing-grid,
.faq-grid,
.check-panel,
.article-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--border);
}

.integration-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.integration-grid div {
  display: grid;
  gap: 0.7rem;
  min-height: 6.5rem;
  padding: 0.85rem;
  background: var(--card-background);
}

.integration-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  background: var(--surface-soft);
  font-size: 0.7rem;
  font-weight: 800;
}

.integration-grid strong,
.workflow-grid strong,
.pricing-card strong,
.faq-grid strong,
.check-panel strong,
.article-list strong {
  color: var(--text);
}

.workflow-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-grid article,
.pricing-card,
.faq-grid article,
.article-list a {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--card-background);
}

.workflow-grid article {
  min-height: 12rem;
}

.workflow-grid p,
.pricing-card p,
.faq-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.split-band {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  align-items: start;
}

.check-panel div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-height: 4.25rem;
  padding: 0.9rem;
  background: var(--card-background);
}

.check-panel div > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  color: #ffffff;
  background: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.pricing-grid {
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

.pricing-card {
  align-content: start;
  min-height: 20rem;
}

.pricing-card > div {
  display: grid;
  gap: 0.55rem;
}

.pricing-card strong {
  font-size: 2rem;
  letter-spacing: 0;
}

.pricing-card ul {
  display: grid;
  gap: 0.5rem;
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  color: var(--muted);
  font-size: 0.8rem;
}

:root[data-theme="dark"] .ghost-button {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface);
}

:root[data-theme="dark"] .integration-grid,
:root[data-theme="dark"] .workflow-grid,
:root[data-theme="dark"] .pricing-grid,
:root[data-theme="dark"] .faq-grid,
:root[data-theme="dark"] .check-panel,
:root[data-theme="dark"] .article-list {
  background: var(--border);
}

:root[data-theme="dark"] .flow-node-active {
  box-shadow: 0 18px 60px rgba(96, 165, 250, 0.16);
}

.pricing-card a {
  align-self: end;
  width: fit-content;
  margin-top: auto;
}

.article-list a {
  color: inherit;
  text-decoration: none;
}

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

.final-cta {
  display: grid;
  gap: 1rem;
  justify-items: center;
  padding: 2.4rem 1.35rem;
  text-align: center;
}

.final-cta h2 {
  max-width: 44rem;
}

.footer {
  display: grid;
  grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr));
  gap: 3rem;
  width: 100%;
  padding: 2.75rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}

.footer strong {
  color: var(--text);
  font-size: 0.86rem;
}

.footer p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.footer nav {
  display: grid;
  align-content: start;
  gap: 0.55rem;
}

.footer a {
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: none;
}

@media (max-width: 980px) {
  .flow-visualization,
  .split-band,
  .workflow-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    justify-items: center;
    transform: rotate(90deg);
  }

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

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
  }

  .nav-actions {
    justify-content: flex-start;
    gap: 0.65rem;
  }

  .marketing-home {
    gap: 1.5rem;
    padding: 4rem 1rem 2rem;
  }

  .hero h1 {
    font-size: 2.15rem;
  }

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

  .landing-band,
  .final-cta {
    padding: 1rem;
  }

  .footer {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem;
  }
}
