/* StateFlow product page. Builds on style.css: same fonts, brand green and cards,
   with a dark "editor" band so the screenshots sit on a surface that matches them. */

:root {
  --sf-canvas: #1b1c1f;
  --sf-panel: #232428;
  --sf-line: rgba(255, 255, 255, 0.08);
  --sf-ink: #e9eaee;
  --sf-ink-soft: #a3a7b1;
  --sf-teal: #2fb98a;
  --sf-screen: #5c8fe6;
  --sf-popup: #f28c47;
  --sf-dialog: #38bdd9;
  --sf-alert: #e64d5c;
  --sf-script: #9985db;
  --sf-toast: #e373b8;
  --sf-global: #94cc5c;
  --sf-linked: #edc74d;
  --sf-sub: #4dbfa6;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- Hero ---------- */
.sf-hero {
  padding: 72px 0 0;
  text-align: center;
  background:
    radial-gradient(760px 380px at 12% 0%, rgba(47, 158, 110, 0.14), transparent 65%),
    radial-gradient(760px 380px at 88% 8%, rgba(92, 143, 230, 0.14), transparent 65%);
}

.sf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-dark);
  background: var(--ring);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.sf-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

.sf-hero h1 span { color: var(--brand); }

.sf-hero .lede {
  max-width: 640px;
  margin: 18px auto 30px;
  color: var(--ink-soft);
  font-size: 1.18rem;
}

.sf-hero .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1.5px solid rgba(28, 36, 51, 0.16);
  background: var(--surface);
  transition: border-color 0.2s, transform 0.15s;
}

.btn-ghost:hover { border-color: var(--brand); transform: translateY(-2px); }

.sf-meta {
  margin-top: 18px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-soft);
}

/* The hero screenshot rises out of the light hero into the dark band below it. */
.sf-stage {
  position: relative;
  margin-top: 56px;
  padding-bottom: 72px;
}

.sf-stage::before {
  content: "";
  position: absolute;
  inset: 34% 0 0;
  background: var(--sf-canvas);
}

.sf-stage .wrap { position: relative; max-width: 1180px; }

/* ---------- Screenshot frame ---------- */
.shot {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--sf-panel);
  border: 1px solid var(--sf-line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.2);
}

.shot .chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  background: #2c2d31;
  border-bottom: 1px solid var(--sf-line);
}

.shot .chrome i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a4c52;
}

.shot .chrome i:nth-child(1) { background: #ff5f57; }
.shot .chrome i:nth-child(2) { background: #febc2e; }
.shot .chrome i:nth-child(3) { background: #28c840; }

.shot .chrome span {
  margin-left: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sf-ink-soft);
}

.shot img { width: 100%; height: auto; }

.shot figcaption {
  padding: 12px 16px;
  font-size: 0.86rem;
  color: var(--sf-ink-soft);
  border-top: 1px solid var(--sf-line);
}

/* ---------- Dark feature band ---------- */
.sf-dark {
  background: var(--sf-canvas);
  color: var(--sf-ink);
  padding: 24px 0 96px;
}

.sf-dark .section-head p { color: var(--sf-ink-soft); }

.feature { padding: 64px 0; }

.feature + .feature { border-top: 1px solid var(--sf-line); }

/* Copy runs as two columns above a full-width screenshot: the editor shots are dense, so they get
   the whole content width rather than sharing a row with the text. */
.feature-copy {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 0 56px;
  margin-bottom: 32px;
}

.shot a { display: block; cursor: zoom-in; }

.feature-copy .kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sf-teal);
}

.feature-copy h3 {
  margin-top: 8px;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 8px 0 14px;
}

.feature-copy p { color: var(--sf-ink-soft); margin-bottom: 14px; }

.feature-copy ul { list-style: none; margin-top: 6px; }

.feature-copy li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 9px;
  color: var(--sf-ink-soft);
}

.feature-copy li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--sf-teal);
}

.feature-copy li strong { color: var(--sf-ink); font-weight: 800; }

.feature-copy code,
.sf-light code {
  font-family: var(--mono);
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: #c9f2e2;
}

/* Layer and node colour chips, matching the editor's own colour legend. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sf-line);
  color: var(--sf-ink);
}

.chip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
}

/* ---------- Code card ---------- */
.code {
  margin: 0;
  border-radius: 14px;
  background: #16171a;
  border: 1px solid var(--sf-line);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.code .chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--sf-ink-soft);
  border-bottom: 1px solid var(--sf-line);
  background: #1e1f23;
}

.code pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
  color: #d7dae0;
}

.code .k { color: #c792ea; }
.code .t { color: #82cfff; }
.code .n { color: #8bdfb8; }
.code .c { color: #6b7180; font-style: italic; }
.code .a { color: #f2c46d; }

/* ---------- Light sections ---------- */
.sf-light { padding: 88px 0; }

.sf-light code { background: rgba(28, 36, 51, 0.07); color: var(--brand-dark); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--ring);
  color: var(--brand-dark);
  font-weight: 900;
  margin-bottom: 14px;
}

.step h3 { font-size: 1.12rem; font-weight: 800; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: 0.95rem; }

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

.mini {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow);
}

.mini .icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--ring);
  color: var(--brand-dark);
  margin-bottom: 12px;
}

.mini .icon svg { width: 20px; height: 20px; }
.mini h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 4px; }
.mini p { color: var(--ink-soft); font-size: 0.93rem; }

/* ---------- CTA ---------- */
.sf-cta {
  text-align: center;
  padding: 84px 0 96px;
  background:
    radial-gradient(700px 320px at 50% 0%, rgba(47, 158, 110, 0.14), transparent 70%);
}

.sf-cta h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 900; letter-spacing: -0.015em; }
.sf-cta p { max-width: 560px; margin: 12px auto 28px; color: var(--ink-soft); font-size: 1.08rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature { padding: 44px 0; }
  .feature-copy { grid-template-columns: 1fr; margin-bottom: 24px; }
  .steps,
  .grid-cards { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .sf-hero { padding-top: 48px; }
  .sf-stage { margin-top: 36px; padding-bottom: 48px; }
  .wrap { padding: 0 16px; }
  .shot .chrome { height: 24px; }
  .shot .chrome span { display: none; }
  .code pre { font-size: 0.74rem; padding: 14px 16px; }
}
