:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #5b6575;
  --line: #d7dee8;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --blue: #2463eb;
  --blue-dark: #1f4fc0;
  --green: #14785f;
  --amber: #b45309;
  --rose: #be123c;
  --shadow: 0 20px 55px rgba(17, 24, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

code {
  border: 1px solid #dbe3ef;
  border-radius: 6px;
  padding: 0.08rem 0.34rem;
  background: #f8fafc;
  color: #102039;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

pre {
  margin: 0;
  overflow-x: auto;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 1rem;
  background: #0b1220;
  color: #dbeafe;
  font-size: 0.92rem;
}

pre code {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(215, 222, 232, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #fff;
  background: #2563eb;
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-nav a {
  border-radius: 6px;
  padding: 0.55rem 0.68rem;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 750;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--blue);
  background: #eff6ff;
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 1.25rem;
}

.hero {
  min-height: 78vh;
  display: grid;
  align-items: end;
  color: #fff;
  background-image:
    linear-gradient(90deg, rgba(5, 15, 32, 0.9), rgba(5, 15, 32, 0.68) 50%, rgba(5, 15, 32, 0.28)),
    url("screenshots/flow-editor.png");
  background-position: center;
  background-size: cover;
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 7.5rem 0 4rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #bfdbfe;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(3rem, 8vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 720px;
  margin: 1.2rem 0 0;
  color: #dbeafe;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
}

.hero-actions,
.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.68rem 0.9rem;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.button.primary:hover {
  border-color: var(--blue-dark);
  background: var(--blue-dark);
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.command-strip {
  max-width: 820px;
  margin-top: 1.25rem;
  border: 1px solid rgba(191, 219, 254, 0.42);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.36);
}

.command-strip pre {
  border: 0;
  background: transparent;
}

.install-options {
  display: grid;
  gap: 0.8rem;
}

.command-strip .install-options {
  padding: 0.9rem;
}

.install-option {
  display: grid;
  gap: 0.65rem;
  border: 1px solid #24395a;
  border-radius: 8px;
  padding: 0.85rem;
  background: #0b1220;
}

.command-strip .install-option {
  border-color: rgba(191, 219, 254, 0.32);
  background: rgba(2, 6, 23, 0.36);
}

.install-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.install-option-header strong {
  color: #bfdbfe;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.install-option-header .copy-button {
  min-height: 30px;
  padding: 0.32rem 0.58rem;
  background: #f8fafc;
}

.install-option pre {
  border: 0;
  padding: 0;
  background: transparent;
}

.install-option code {
  display: block;
  overflow-x: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: #f8fafc;
  white-space: pre;
}

.section {
  padding: 4.5rem 0;
}

.section.alt {
  background: var(--soft);
}

.section.dark {
  background: #111827;
  color: #f8fafc;
}

.section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 2rem;
}

.section-heading h2,
.article h1,
.page-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading p,
.page-title p,
.article-lead {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.dark .section-heading p {
  color: #cbd5e1;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.feature-card,
.blog-card,
.doc-card,
.metric-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.1rem;
  background: var(--surface);
}

.feature-card strong,
.blog-card strong,
.doc-card strong,
.metric-card strong {
  display: block;
  color: var(--ink);
  font-size: 1.08rem;
}

.feature-card p,
.blog-card p,
.doc-card p,
.metric-card p {
  margin: 0.55rem 0 0;
  color: var(--muted);
}

.feature-card[data-tone="green"] {
  border-color: #a7f3d0;
  background: #f0fdfa;
}

.feature-card[data-tone="amber"] {
  border-color: #fed7aa;
  background: #fff7ed;
}

.feature-card[data-tone="rose"] {
  border-color: #fecdd3;
  background: #fff1f2;
}

.screenshot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.screenshot-frame {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.screenshot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 2rem;
  align-items: start;
}

.callout {
  border-left: 4px solid var(--green);
  padding: 1rem 1rem 1rem 1.2rem;
  background: #ecfdf5;
}

.callout p {
  margin: 0;
  color: #164e3f;
}

.steps {
  display: grid;
  gap: 0.85rem;
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 900;
}

.step h3 {
  margin: 0;
  font-size: 1.05rem;
}

.step p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.page-hero {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.page-title {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 4.4rem 0 3rem;
}

.content-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
  gap: 2.25rem;
  padding: 3rem 0 4.5rem;
  align-items: start;
}

.content-main {
  display: grid;
  gap: 2rem;
}

.doc-section {
  scroll-margin-top: 86px;
}

.doc-section h2,
.article h2 {
  margin: 0 0 0.8rem;
  font-size: 1.8rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.doc-section p,
.article p,
.article li {
  color: #334155;
}

.doc-section ul,
.article ul {
  margin: 0.85rem 0 0;
  padding-left: 1.25rem;
}

.side-nav {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 0.9rem;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem;
  background: #fff;
}

.side-nav strong {
  padding: 0 0.15rem;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.side-nav-group {
  display: grid;
  gap: 0.25rem;
  border-top: 1px solid #edf2f7;
  padding-top: 0.7rem;
}

.side-nav-group:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.side-nav-label {
  padding: 0 0.15rem 0.25rem;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.side-nav a {
  display: block;
  border-radius: 6px;
  padding: 0.45rem 0.55rem;
  color: #475569;
  font-size: 0.94rem;
  text-decoration: none;
}

.side-nav a:hover {
  color: var(--blue);
  background: #eff6ff;
}

.side-nav a[aria-current="page"] {
  color: var(--blue);
  background: #eff6ff;
  font-weight: 850;
}

.code-block {
  display: grid;
  gap: 0.7rem;
}

.copy-button {
  justify-self: end;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.48rem 0.7rem;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.blog-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.blog-card {
  display: grid;
  gap: 0.8rem;
  text-decoration: none;
}

.blog-card span,
.article-meta {
  color: var(--amber);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.blog-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.article {
  max-width: 850px;
}

.article h1 {
  margin-top: 0.35rem;
}

.article img {
  margin: 1.2rem 0;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #0f172a;
  color: #e2e8f0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 0;
}

.footer-inner a {
  color: #bfdbfe;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 880px) {
  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.5rem;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .site-nav[data-open="true"] {
    display: grid;
  }

  .hero {
    min-height: 82vh;
    background-position: 58% center;
  }

  .screenshot-grid,
  .split,
  .content-grid,
  .blog-list {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    order: -1;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 1080px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    order: -1;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 700px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero-inner {
    padding-top: 6rem;
  }

  .section {
    padding: 3.2rem 0;
  }

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

  .hero-actions,
  .actions-row {
    display: grid;
  }

  .button {
    width: 100%;
  }
}
