:root {
  --flow-bg: #0a0f1c;
  --flow-bg-2: #0e1626;
  --flow-panel: #121d33;
  --flow-panel-2: #16233e;
  --flow-line: #1d2b48;
  --flow-text: #e6edf7;
  --flow-muted: #8a9bb8;
  --flow-cyan: #36e2ff;
  --flow-cyan-2: #00b4d8;
  --flow-navy: #0b1a3a;
  --flow-accent: #ff5cf3;
  --flow-green: #43e6a0;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background:
    radial-gradient(ellipse 900px 600px at 85% -100px, rgba(54,226,255,0.07), transparent),
    radial-gradient(ellipse 700px 500px at 5% 40%, rgba(255,92,243,0.04), transparent),
    var(--flow-bg);
  color: var(--flow-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.55;
  position: relative;
}
h1, h2, h3, .display { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.02em; line-height: 1.08; }
a { color: var(--flow-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--flow-text); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10,15,28,0.72);
  border-bottom: 1px solid var(--flow-line);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 17px;
  letter-spacing: 0.26em; color: var(--flow-text);
}
.logo .logo-word { transform: translateY(0.5px); margin-right: -0.26em; }
.logo-mark { width: 27px; height: 27px; flex-shrink: 0; overflow: visible; }
.logo-mark .lm-a { fill: none; stroke: rgba(138,155,184,0.8); stroke-width: 2; }
.logo-mark .lm-t { fill: none; stroke: var(--flow-cyan); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0.5 4; }
.logo-mark .lm-b { fill: var(--flow-cyan); filter: drop-shadow(0 0 5px rgba(54,226,255,0.55)); }
a.logo:hover { text-decoration: none; }
a.logo:hover .lm-a { stroke: var(--flow-text); }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { color: var(--flow-muted); font-size: 14px; }
.nav-links a:hover { color: var(--flow-text); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--flow-cyan); }
.nav-links a.btn-primary { color: var(--flow-navy); }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--flow-line); border-radius: 9px;
  width: 42px; height: 38px; cursor: pointer; padding: 0;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--flow-text); margin: 5px auto;
  transition: transform .2s ease;
}
.nav.open .nav-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.open .nav-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 14.5px;
  transition: transform .15s ease, box-shadow .15s ease;
  cursor: pointer; border: 0; font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--flow-cyan), var(--flow-cyan-2));
  color: var(--flow-navy);
  box-shadow: 0 8px 30px -8px rgba(54,226,255,0.5);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 40px -8px rgba(54,226,255,0.7); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--flow-text); border: 1px solid var(--flow-line); }
.btn-ghost:hover { border-color: var(--flow-cyan); color: var(--flow-cyan); text-decoration: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(54,226,255,0.08);
  border: 1px solid rgba(54,226,255,0.25);
  color: var(--flow-cyan);
  font-size: 12px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase;
}

/* ---------- layout ---------- */
main { position: relative; z-index: 2; }
section { padding: 110px 28px 30px; }
.container { max-width: 1200px; margin: 0 auto; }
h2 { font-size: clamp(30px, 3.6vw, 44px); margin: 0; font-weight: 700; }
.sect-body { max-width: 680px; margin: 24px 0 0; color: var(--flow-muted); font-size: 17.5px; line-height: 1.65; }
.sect-body.right { margin-left: auto; }
.cite { color: var(--flow-muted); font-size: 12px; opacity: 0.8; }

/* ---------- the FLOW thread ---------- */
#flow-thread {
  position: absolute; top: 0; left: 0; width: 100%;
  z-index: 1; pointer-events: none; overflow: visible;
}
#flow-thread .t-dim {
  stroke: rgba(54,226,255,0.20); stroke-width: 2; fill: none;
  stroke-dasharray: 1.5 11; stroke-linecap: round;
}
#flow-thread .t-glow {
  stroke: rgba(54,226,255,0.16); stroke-width: 8; fill: none;
  stroke-dasharray: 2.5 10.5; stroke-linecap: round;
  animation: t-march 1.1s linear infinite;
}
#flow-thread .t-lit {
  stroke: var(--flow-cyan); stroke-width: 2.5; fill: none;
  stroke-dasharray: 2.5 10.5; stroke-linecap: round;
  animation: t-march 1.1s linear infinite;
}
@keyframes t-march { to { stroke-dashoffset: -13; } }
#flow-thread .t-fork {
  stroke: rgba(54,226,255,0.14); stroke-width: 2; fill: none;
  stroke-dasharray: 1.5 11; stroke-linecap: round;
  transition: stroke 0.8s ease;
}
#flow-thread .t-fork.on {
  stroke: rgba(54,226,255,0.85);
  animation: t-march 1.1s linear infinite;
}
#flow-thread .t-pulse { fill: #fff; filter: drop-shadow(0 0 9px var(--flow-cyan)); }

/* section header as canvas node */
.trow { display: flex; }
.trow.right { justify-content: flex-end; }
.trow.center { justify-content: center; }
.tnode {
  position: relative;
  background: linear-gradient(180deg, var(--flow-panel-2), #101a30);
  border: 1px solid var(--flow-line);
  border-radius: 16px;
  padding: 24px 30px;
  max-width: 660px;
  box-shadow: 0 16px 48px -16px rgba(0,0,0,0.55);
  transition: border-color .5s ease, box-shadow .5s ease;
}
.tnode::before, .tnode::after {
  content: '';
  position: absolute; top: 50%;
  width: 11px; height: 11px; border-radius: 50%;
  transform: translateY(-50%);
  background: var(--flow-bg);
  border: 2px solid var(--flow-line);
  transition: border-color .5s ease, background .5s ease, box-shadow .5s ease;
}
.tnode::before { left: -6px; }
.tnode::after { right: -6px; }
.tnode.active { border-color: rgba(54,226,255,0.6); box-shadow: 0 0 0 1px rgba(54,226,255,0.3), 0 18px 60px -18px rgba(54,226,255,0.3); }
.tnode.active::before, .tnode.active::after {
  border-color: var(--flow-cyan);
  background: rgba(54,226,255,0.3);
  box-shadow: 0 0 8px rgba(54,226,255,0.6);
}
.tnode-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.tstep { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--flow-muted); font-weight: 600; }
.towner {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: rgba(255,92,243,0.08); border: 1px solid rgba(255,92,243,0.3); color: var(--flow-accent);
}
.tchip {
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--flow-line); color: var(--flow-muted);
  transition: border-color .4s ease, color .4s ease, background .4s ease;
}
.tnode.active .tchip { border-color: rgba(54,226,255,0.5); color: var(--flow-cyan); background: rgba(54,226,255,0.08); }
.tnode.complete .tchip { border-color: rgba(67,230,160,0.5); color: var(--flow-green); background: rgba(67,230,160,0.08); }
.tnode h2 { margin: 0; }

/* ---------- hero (home) ---------- */
.hero {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto;
  padding: 72px 28px 40px;
  display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center;
}
.hero .eyebrow { margin-bottom: 24px; }
.eyebrow .blink { width: 6px; height: 6px; border-radius: 50%; background: var(--flow-cyan); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
h1 { font-size: clamp(42px, 5.2vw, 66px); font-weight: 700; margin: 0 0 22px; }
h1 .grad, .grad {
  background: linear-gradient(90deg, var(--flow-cyan) 0%, #7cc5ff 60%, #a78bfa 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { color: #c9d4e8; font-size: 19px; max-width: 580px; margin: 0 0 34px; line-height: 1.6; font-weight: 400; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- hero resurrection demo ---------- */
.demo-card {
  position: relative;
  background: var(--flow-panel);
  border: 1px solid var(--flow-line);
  border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  padding: 18px;
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 14px;
}
.demo-doc {
  position: relative; overflow: hidden;
  background: #0d1422; border: 1px solid var(--flow-line); border-radius: 12px;
  display: flex; flex-direction: column;
  min-height: 270px;
}
.demo-doc-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-bottom: 1px solid var(--flow-line);
  font-size: 10.5px; color: var(--flow-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo-doc-bar .wdots { display: flex; gap: 4px; flex-shrink: 0; }
.demo-doc-bar .wdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--flow-line); }
.demo-doc-body { padding: 14px; flex: 1; }
.demo-doc-body .dl {
  font-size: 10px; line-height: 1.5; color: #5d6f92; margin: 0 0 10px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .5s ease, transform .5s ease;
}
.demo-card.p0 .dl { opacity: 1; transform: none; }
.demo-card.p0 .dl:nth-child(2) { transition-delay: .15s; }
.demo-card.p0 .dl:nth-child(3) { transition-delay: .3s; }
.demo-card.p0 .dl:nth-child(4) { transition-delay: .45s; }
.demo-card.p0 .dl:nth-child(5) { transition-delay: .6s; }
.demo-scan {
  position: absolute; left: 0; right: 0; top: -40%; height: 38%;
  background: linear-gradient(180deg, transparent, rgba(54,226,255,0.14), rgba(54,226,255,0.35), transparent);
  opacity: 0; pointer-events: none;
}
.demo-card.p1 .demo-scan { animation: scan 1.4s ease-in-out 1 forwards; }
@keyframes scan { 0% { top: -40%; opacity: 1; } 100% { top: 110%; opacity: 0; } }

.demo-canvas {
  position: relative; overflow: hidden;
  background: var(--flow-bg-2); border: 1px solid var(--flow-line); border-radius: 12px;
  min-height: 270px;
}
.demo-canvas::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--flow-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--flow-line) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 95%);
}
.demo-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.demo-svg path {
  stroke: var(--flow-cyan); stroke-width: 1.8; fill: none; opacity: 0.75;
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.demo-card.p2 .demo-svg path { transition: stroke-dashoffset .7s ease; stroke-dashoffset: 0; }
.demo-card.p2 .demo-svg path:nth-of-type(1) { transition-delay: .5s; }
.demo-card.p2 .demo-svg path:nth-of-type(2) { transition-delay: 1.3s; }
.demo-card.p2 .demo-svg path:nth-of-type(3) { transition-delay: 2.1s; }

.dn {
  position: absolute;
  background: linear-gradient(180deg, #1a2a47, #11192c);
  border: 1px solid var(--flow-line);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 11px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.5);
  min-width: 104px;
  opacity: 0; transform: scale(0.7);
  transition: opacity .45s ease, transform .45s cubic-bezier(.2,1.4,.4,1), border-color .4s ease;
}
.demo-card.p2 .dn { opacity: 1; transform: none; }
.demo-card.p2 .dn:nth-of-type(1) { transition-delay: .2s; }
.demo-card.p2 .dn:nth-of-type(2) { transition-delay: 1s; }
.demo-card.p2 .dn:nth-of-type(3) { transition-delay: 1.8s; }
.demo-card.p2 .dn:nth-of-type(4) { transition-delay: 2.6s; }
.dn .role {
  font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--flow-muted); margin-bottom: 3px; font-weight: 600;
  transition: color .4s ease;
}
.dn .ttl { font-weight: 600; color: var(--flow-text); font-size: 11px; }
.demo-card.p3 .dn .role { color: var(--flow-cyan); }
.demo-card.p3 .dn.acc .role { color: var(--flow-accent); }
.demo-card.p3 .dn { border-color: rgba(54,226,255,0.4); }
.dchip {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px; padding: 2px 7px; border-radius: 999px;
  font-size: 8.5px; font-weight: 600;
  background: rgba(54,226,255,0.1); border: 1px solid rgba(54,226,255,0.35); color: var(--flow-cyan);
  opacity: 0; transform: translateY(3px);
  transition: opacity .4s ease .2s, transform .4s ease .2s;
}
.demo-card.p3 .dchip { opacity: 1; transform: none; }
.demo-live {
  position: absolute; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  background: rgba(67,230,160,0.1); border: 1px solid rgba(67,230,160,0.45); color: var(--flow-green);
  opacity: 0; transform: translateY(-4px);
  transition: opacity .5s ease, transform .5s ease;
}
.demo-card.p4 .demo-live { opacity: 1; transform: none; }
.demo-status {
  position: absolute; left: 50%; top: -13px; transform: translateX(-50%);
  padding: 4px 12px; border-radius: 999px;
  background: var(--flow-bg); border: 1px solid var(--flow-line);
  font-size: 11px; color: var(--flow-muted); white-space: nowrap;
  transition: color .4s ease, border-color .4s ease;
}
.demo-card.p1 .demo-status, .demo-card.p2 .demo-status { color: var(--flow-cyan); border-color: rgba(54,226,255,0.4); }

/* ---------- stat cards ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.stat-card {
  padding: 26px 24px; border-radius: var(--r);
  background: var(--flow-panel); border: 1px solid var(--flow-line);
}
.stat-card .num { font-family: 'Space Grotesk', sans-serif; font-size: 40px; font-weight: 700; color: var(--flow-text); line-height: 1; margin-bottom: 10px; }
.stat-card .num.cy { color: var(--flow-cyan); }
.stat-card .num.sm { font-size: 26px; line-height: 1.2; min-height: 40px; display: flex; align-items: flex-end; word-break: break-all; }
.stat-card p { color: var(--flow-muted); font-size: 14px; margin: 0 0 8px; line-height: 1.55; }
.cost-note {
  margin: 22px 0 0; padding: 20px 26px; border-radius: var(--r);
  border: 1px dashed rgba(54,226,255,0.35);
  background: rgba(54,226,255,0.04);
  color: var(--flow-muted); font-size: 15px; line-height: 1.65;
}
.cost-note strong { color: var(--flow-cyan); }

/* ---------- pillars ---------- */
.pillar { margin-top: 72px; }
.pillar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: center; margin-top: 28px; }
.pillar-copy p { color: var(--flow-muted); font-size: 16.5px; line-height: 1.65; margin: 0 0 16px; }

/* pillar 1 visual: graveyard in, node out */
.grave {
  position: relative;
  background: var(--flow-panel); border: 1px solid var(--flow-line); border-radius: 16px;
  padding: 28px; display: flex; align-items: center; gap: 18px; justify-content: space-between;
}
.grave-files { display: flex; flex-direction: column; gap: 10px; }
.gfile {
  display: flex; align-items: center; gap: 9px;
  background: #0d1422; border: 1px solid var(--flow-line); border-radius: 9px;
  padding: 9px 13px; font-size: 12px; color: #5d6f92;
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gfile .ext { flex-shrink: 0; }
.gfile .ext { font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--flow-line); color: var(--flow-muted); }
.grave-arrow { color: var(--flow-cyan); font-size: 22px; flex-shrink: 0; }
.gnode {
  background: linear-gradient(180deg, #1a2a47, #11192c);
  border: 1px solid rgba(54,226,255,0.5); border-radius: 12px;
  padding: 14px 18px; box-shadow: 0 0 0 1px rgba(54,226,255,0.2), 0 14px 40px -10px rgba(54,226,255,0.35);
  font-size: 13px; min-width: 150px;
}
.gnode .role { font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--flow-cyan); font-weight: 700; margin-bottom: 4px; }
.gnode .gsub { color: var(--flow-muted); font-size: 11px; margin-top: 5px; }

/* ---------- scenario engine ---------- */
.scenario { margin-top: 30px; }
.scenario-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.scn-btn {
  padding: 9px 17px; border-radius: 999px; cursor: pointer;
  background: var(--flow-panel); border: 1px solid var(--flow-line);
  color: var(--flow-muted); font-size: 13.5px; font-weight: 600; font-family: inherit;
  transition: all .2s ease;
}
.scn-btn:hover { border-color: rgba(54,226,255,0.5); color: var(--flow-text); }
.scn-btn.on {
  background: linear-gradient(135deg, rgba(54,226,255,0.16), rgba(54,226,255,0.06));
  border-color: var(--flow-cyan); color: var(--flow-cyan);
}
.scenario-canvas {
  position: relative;
  background: var(--flow-bg-2); border: 1px solid var(--flow-line); border-radius: 18px;
  aspect-ratio: 800 / 440;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.scenario-canvas::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--flow-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--flow-line) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse at center, black 45%, transparent 95%);
}
.scn-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sedge { stroke: rgba(138,155,184,0.3); stroke-width: 1.6; fill: none; stroke-dasharray: 2 8; stroke-linecap: round; }
.sroute {
  stroke: var(--flow-cyan); stroke-width: 2.6; fill: none;
  stroke-dasharray: 3 9; stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(54,226,255,0.6));
  animation: t-march 0.9s linear infinite;
}
.sdot { fill: #fff; filter: drop-shadow(0 0 8px var(--flow-cyan)); }
.snode {
  position: absolute; transform: translate(-50%, -50%);
  background: linear-gradient(180deg, #1a2a47, #11192c);
  border: 1px solid var(--flow-line);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 12px;
  min-width: 112px;
  box-shadow: 0 8px 24px -8px rgba(0,0,0,0.5);
  transition: opacity .4s ease, border-color .4s ease, box-shadow .4s ease;
  opacity: 0.38;
}
.snode .role { font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--flow-muted); margin-bottom: 3px; font-weight: 600; }
.snode .ttl { font-weight: 600; color: var(--flow-text); font-size: 12px; }
.snode.on { opacity: 1; border-color: rgba(54,226,255,0.6); box-shadow: 0 0 0 1px rgba(54,226,255,0.25), 0 12px 32px -8px rgba(54,226,255,0.3); }
.snode.on .role { color: var(--flow-cyan); }
.snode.acc.on { border-color: rgba(255,92,243,0.6); box-shadow: 0 0 0 1px rgba(255,92,243,0.25), 0 12px 32px -8px rgba(255,92,243,0.3); }
.snode.acc.on .role { color: var(--flow-accent); }
.scenario-readout {
  margin-top: 16px; display: flex; align-items: center; gap: 10px;
  color: var(--flow-muted); font-size: 14.5px;
}
.scenario-readout .dotg { width: 8px; height: 8px; border-radius: 50%; background: var(--flow-cyan); box-shadow: 0 0 8px var(--flow-cyan); flex-shrink: 0; }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.bento-card {
  background: var(--flow-panel); border: 1px solid var(--flow-line); border-radius: var(--r);
  padding: 20px; overflow: hidden;
  transition: transform .2s ease, border-color .2s ease;
}
.bento-card:hover { transform: translateY(-3px); border-color: rgba(54,226,255,0.4); }
.bento-mock { background: #0d1422; border: 1px solid var(--flow-line); border-radius: 10px; padding: 14px; min-height: 150px; margin-bottom: 14px; }
.bento-card h3 { font-size: 16px; margin: 0 0 6px; }
.bento-card p { color: var(--flow-muted); font-size: 13.5px; margin: 0; line-height: 1.55; }
.brow {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; border-radius: 8px; margin-bottom: 7px;
  background: var(--flow-panel); border: 1px solid var(--flow-line);
  font-size: 11.5px; color: var(--flow-muted);
}
.brow.hl { border-color: rgba(54,226,255,0.45); color: var(--flow-text); background: rgba(54,226,255,0.05); }
.bchip { font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.bchip.live { background: rgba(67,230,160,0.1); border: 1px solid rgba(67,230,160,0.4); color: var(--flow-green); }
.bchip.draft { background: rgba(138,155,184,0.1); border: 1px solid var(--flow-line); color: var(--flow-muted); }
.bchip.due { background: rgba(255,92,243,0.1); border: 1px solid rgba(255,92,243,0.4); color: var(--flow-accent); }
.bchip.mine { background: rgba(54,226,255,0.1); border: 1px solid rgba(54,226,255,0.4); color: var(--flow-cyan); }

/* ---------- agent chat ---------- */
.agent-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 52px; align-items: center; margin-top: 30px; }
.chat-mock {
  background: var(--flow-panel); border: 1px solid var(--flow-line); border-radius: 16px;
  padding: 22px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
}
.chat-msg { margin-bottom: 16px; }
.chat-msg .who { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--flow-muted); margin-bottom: 6px; }
.chat-bubble {
  border-radius: 12px; padding: 13px 16px; font-size: 14px; line-height: 1.6;
}
.chat-msg.user .chat-bubble { background: var(--flow-panel-2); border: 1px solid var(--flow-line); }
.chat-msg.ai .chat-bubble { background: #0d1422; border: 1px solid rgba(54,226,255,0.25); }
.chat-bubble ul { margin: 8px 0 0; padding-left: 18px; color: var(--flow-muted); }
.chat-bubble li { margin-bottom: 5px; font-size: 13.5px; }
.chat-bubble li strong { color: var(--flow-text); }
.mcp-tag {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600;
  background: rgba(54,226,255,0.08); border: 1px solid rgba(54,226,255,0.35); color: var(--flow-cyan);
}
.api-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.api-chip {
  padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  background: #0d1422; border: 1px solid var(--flow-line); color: var(--flow-cyan);
}
.orb-row { text-align: center; margin-top: 48px; transform: translateX(170px); }
@media (max-width: 980px) { .orb-row { transform: none; } }
.agent-orb {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: var(--flow-panel-2); border: 1px solid rgba(54,226,255,0.4);
  font-size: 12px; font-weight: 600; color: var(--flow-cyan);
  box-shadow: 0 0 24px -6px rgba(54,226,255,0.4);
}

/* ---------- wedge strip ---------- */
.wedge {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 90px auto 0; padding: 0 28px;
}
.wedge-inner {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: space-between;
  border: 1px solid var(--flow-line); border-radius: 16px;
  background: linear-gradient(90deg, rgba(54,226,255,0.06), transparent 60%), var(--flow-panel);
  padding: 28px 32px;
}
.wedge-inner p { margin: 0; color: var(--flow-muted); font-size: 16px; max-width: 720px; }
.wedge-inner .wedge-kicker { font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--flow-text); font-size: 18px; display: block; margin-bottom: 6px; }

/* ---------- forms / cta ---------- */
.contact-wrap { max-width: 640px; margin: 0 auto; text-align: center; }
.contact-form { display: grid; gap: 16px; margin-top: 36px; text-align: left; }
.contact-form label { display: block; font-size: 13px; color: var(--flow-muted); margin-bottom: 6px; font-weight: 500; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%;
  background: var(--flow-panel);
  border: 1px solid var(--flow-line);
  color: var(--flow-text);
  padding: 12px 14px;
  border-radius: 10px;
  font-family: inherit; font-size: 15px;
  transition: border-color .15s ease;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  outline: none; border-color: var(--flow-cyan);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form button { justify-self: center; margin-top: 8px; }

/* ---------- footer ---------- */
footer {
  position: relative; z-index: 2;
  margin-top: 110px;
  padding: 48px 28px;
  border-top: 1px solid var(--flow-line);
  color: var(--flow-muted);
  font-size: 14px;
  background: var(--flow-bg-2);
}
.foot-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 28px;
}
.foot-brand p { margin: 10px 0 0; max-width: 320px; font-size: 13.5px; }
.foot-links { display: flex; gap: 48px; flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-col .fh { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--flow-text); margin-bottom: 4px; }
.foot-col a { color: var(--flow-muted); font-size: 13.5px; }
.foot-col a:hover { color: var(--flow-cyan); text-decoration: none; }
.foot-base { max-width: 1200px; margin: 36px auto 0; padding-top: 20px; border-top: 1px solid var(--flow-line); font-size: 12.5px; opacity: 0.8; }

/* ---------- subpage components ---------- */
.page-hero { max-width: 1200px; margin: 0 auto; padding: 84px 28px 10px; position: relative; z-index: 2; }
.page-hero .eyebrow { margin-bottom: 22px; }
.page-hero h1 { font-size: clamp(34px, 4.4vw, 56px); max-width: 880px; }
.page-hero .lede { max-width: 700px; }

.card {
  background: var(--flow-panel); border: 1px solid var(--flow-line); border-radius: var(--r);
  padding: 32px;
}
.card h3 { font-size: 20px; margin: 0 0 10px; }
.card p { color: var(--flow-muted); font-size: 15px; line-height: 1.65; margin: 0 0 12px; }
.card ul { list-style: none; padding: 0; margin: 0; }
.card ul li { padding: 7px 0; color: var(--flow-muted); font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.card ul li::before { content: '→'; color: var(--flow-cyan); flex-shrink: 0; }
.card.neg ul li::before { content: '✕'; color: var(--flow-accent); font-size: 12px; margin-top: 3px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.vs-wrap { overflow-x: auto; margin-top: 36px; border: 1px solid var(--flow-line); border-radius: var(--r); }
.vs-table { width: 100%; border-collapse: collapse; min-width: 720px; background: var(--flow-panel); }
.vs-table th, .vs-table td { padding: 15px 18px; border-bottom: 1px solid var(--flow-line); font-size: 14px; text-align: center; }
.vs-table tr:last-child td { border-bottom: 0; }
.vs-table th { font-family: 'Space Grotesk', sans-serif; font-size: 14px; color: var(--flow-muted); font-weight: 700; }
.vs-table th:first-child, .vs-table td:first-child { text-align: left; color: var(--flow-text); font-weight: 500; }
.vs-table .flowcol { background: rgba(54,226,255,0.06); }
.vs-table th.flowcol { color: var(--flow-cyan); }
.vs-yes { color: var(--flow-green); font-weight: 700; }
.vs-no { color: #54637f; }
.vs-part { color: var(--flow-muted); font-size: 12.5px; }

.maturity { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: end; margin-top: 40px; }
.stage { display: flex; flex-direction: column; gap: 0; }
.stage .bar {
  border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, rgba(138,155,184,0.25), rgba(138,155,184,0.05));
  border: 1px solid var(--flow-line); border-bottom: 0;
}
.stage:nth-child(1) .bar { height: 34px; }
.stage:nth-child(2) .bar { height: 72px; }
.stage:nth-child(3) .bar { height: 112px; }
.stage:nth-child(4) .bar { height: 156px; background: linear-gradient(180deg, rgba(54,226,255,0.35), rgba(54,226,255,0.05)); border-color: rgba(54,226,255,0.5); }
.stage .stage-card {
  background: var(--flow-panel); border: 1px solid var(--flow-line); border-radius: 0 0 12px 12px;
  padding: 18px;
}
.stage:nth-child(4) .stage-card { border-color: rgba(54,226,255,0.5); }
.stage h3 { font-size: 15px; margin: 0 0 7px; }
.stage p { color: var(--flow-muted); font-size: 12.5px; margin: 0; line-height: 1.55; }
.stage .lvl { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--flow-muted); margin-bottom: 5px; }
.stage:nth-child(4) .lvl, .stage:nth-child(4) h3 { color: var(--flow-cyan); }

.obj { border-left: 2px solid var(--flow-cyan); padding: 4px 0 4px 24px; margin-top: 34px; }
.obj .q { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 19px; margin: 0 0 8px; color: var(--flow-text); }
.obj .a { color: var(--flow-muted); font-size: 15.5px; line-height: 1.65; margin: 0; max-width: 760px; }

.status-pill { font-size: 10.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: 0.04em; text-transform: uppercase; }
.status-pill.now { background: rgba(67,230,160,0.1); border: 1px solid rgba(67,230,160,0.4); color: var(--flow-green); }
.status-pill.soon { background: rgba(167,139,250,0.1); border: 1px solid rgba(167,139,250,0.4); color: #a78bfa; }

/* ---------- pricing tiers ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; }
.tier-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--flow-panel); border: 1px solid var(--flow-line);
  border-radius: var(--r); padding: 28px 26px;
}
.tier-card.featured {
  border-color: var(--flow-cyan);
  box-shadow: 0 0 0 1px rgba(54,226,255,0.3), 0 20px 60px -20px rgba(54,226,255,0.25);
}
.tier-card.lite { background: rgba(18,29,51,0.45); border-style: dashed; }
.tier-tag {
  position: absolute; top: -12px; left: 22px;
  padding: 4px 12px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--flow-cyan), var(--flow-cyan-2));
  color: var(--flow-navy);
}
.tier-card h3 { font-size: 21px; margin: 0 0 4px; }
.tier-kicker { color: var(--flow-muted); font-size: 13px; margin: 0 0 20px; }
.tier-price {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: 27px; line-height: 1.1; color: var(--flow-text);
}
.tier-price .to { color: var(--flow-muted); font-size: 16px; font-weight: 500; padding: 0 2px; }
.tier-per { color: var(--flow-muted); font-size: 12.5px; line-height: 1.5; margin: 8px 0 20px; }
.tier-card ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.tier-card ul li { padding: 6px 0; color: var(--flow-muted); font-size: 13.5px; line-height: 1.5; display: flex; gap: 9px; align-items: flex-start; }
.tier-card ul li::before { content: '→'; color: var(--flow-cyan); flex-shrink: 0; }
.tier-card .btn { justify-content: center; width: 100%; }
.tier-fine { color: var(--flow-muted); font-size: 12px; opacity: 0.85; margin: 12px 0 0; line-height: 1.5; }
@media (max-width: 1100px) { .tier-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tier-grid { grid-template-columns: 1fr; } }

/* ---------- faq ---------- */
.faq { max-width: 820px; margin-top: 36px; }
.faq details { border: 1px solid var(--flow-line); border-radius: 12px; background: var(--flow-panel); margin-bottom: 12px; }
.faq summary {
  cursor: pointer; padding: 18px 22px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 16px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--flow-cyan); font-size: 22px; font-weight: 400; flex-shrink: 0; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { margin: 0; padding: 0 22px 18px; color: var(--flow-muted); font-size: 15px; line-height: 1.65; }

/* ---------- learn / articles ---------- */
.crumb { font-size: 13px; color: var(--flow-muted); margin: 0 0 20px; }
.crumb a { color: var(--flow-muted); }
.crumb a:hover { color: var(--flow-cyan); text-decoration: none; }
.learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 36px; }
.learn-card {
  display: flex; flex-direction: column;
  background: var(--flow-panel); border: 1px solid var(--flow-line); border-radius: var(--r);
  padding: 28px; color: var(--flow-text);
  transition: transform .2s ease, border-color .2s ease;
}
.learn-card:hover { transform: translateY(-3px); border-color: rgba(54,226,255,0.4); text-decoration: none; }
.learn-card .ltag { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--flow-cyan); margin-bottom: 12px; }
.learn-card h3 { font-size: 19px; margin: 0 0 10px; line-height: 1.3; }
.learn-card p { color: var(--flow-muted); font-size: 14px; line-height: 1.6; margin: 0; flex: 1; }
.learn-card .lmeta { color: var(--flow-muted); font-size: 12.5px; margin-top: 16px; }
.article { max-width: 780px; }
.article-head h1 { font-size: clamp(30px, 4.2vw, 46px); max-width: none; }
.prose { color: #c2cde0; font-size: 17px; line-height: 1.75; margin-top: 36px; }
.prose p { margin: 0 0 20px; }
.prose h2 { font-size: 26px; margin: 46px 0 16px; }
.prose h3 { font-size: 19px; margin: 32px 0 12px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 24px; }
.prose li { margin-bottom: 10px; }
.prose strong { color: var(--flow-text); }
.prose .callout {
  border-left: 2px solid var(--flow-cyan);
  padding: 16px 22px; margin: 30px 0;
  background: rgba(54,226,255,0.05);
  border-radius: 0 10px 10px 0;
  color: var(--flow-muted); font-size: 15.5px;
}
@media (max-width: 980px) { .learn-grid { grid-template-columns: 1fr; } }

.cta-band {
  position: relative; z-index: 2;
  text-align: center;
  padding: 110px 28px;
}
.cta-band h2 { max-width: 720px; margin: 0 auto 18px; }
.cta-band p { color: var(--flow-muted); font-size: 18px; max-width: 560px; margin: 0 auto 32px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #flow-thread .t-lit, #flow-thread .t-pulse { display: none; }
  #flow-thread .t-fork.on { animation: none; }
  .sroute { animation: none; }
  .sdot { display: none; }
  .eyebrow .blink { animation: none; }
  .demo-card .dl, .demo-card .dn, .demo-card .dchip, .demo-card .demo-live,
  .demo-card .demo-svg path { transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; gap: 40px; }
  .agent-grid, .pillar-grid { grid-template-columns: 1fr; gap: 32px; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .bento, .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .maturity { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .stage .bar { display: none; }
  .stage .stage-card { border-radius: 12px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 28px 22px;
    background: #0b101d;
    border-bottom: 1px solid var(--flow-line);
    box-shadow: 0 24px 48px -16px rgba(0,0,0,0.7);
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { display: block; padding: 12px 4px; font-size: 16.5px; font-weight: 500; border-bottom: 1px solid rgba(29,43,72,0.6); }
  .nav-links a.btn { border-bottom: 0; margin-top: 14px; justify-content: center; padding: 14px 22px; font-size: 15.5px; }
  .contact-row { grid-template-columns: 1fr; }
  .contact-form button { width: 100%; justify-content: center; }
  section { padding: 80px 28px 20px; }
  .tnode { padding: 20px 22px; }
  .tnode::after { display: none; }
  .trow.right { justify-content: flex-start; }
  .sect-body.right { margin-left: 0; }
  .demo-card { grid-template-columns: 1fr; }
  .demo-doc { min-height: 170px; }
  .grave { flex-direction: column; align-items: stretch; }
  .grave-files { min-width: 0; }
  .grave-arrow { transform: rotate(90deg); align-self: center; }
  .gnode { min-width: 0; }
  .scenario-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 18px; }
  .scenario-canvas { min-width: 720px; }
  .snode { min-width: 96px; font-size: 11px; padding: 7px 10px; }
}
@media (max-width: 560px) {
  .stat-cards, .maturity { grid-template-columns: 1fr; }
  .hero { padding-top: 36px; gap: 32px; }
  h1 { font-size: clamp(38px, 11vw, 46px); letter-spacing: -0.03em; }
  .lede { font-size: 17px; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; justify-content: center; padding: 15px 22px; }
  h2 { font-size: clamp(26px, 7.4vw, 32px); }
  .sect-body { font-size: 16px; }
  .tnode { width: 100%; }
  .wedge-inner .btn { width: 100%; justify-content: center; }
}

/* swipe hint for the scenario canvas on small screens */
.scn-hint { display: none; }
@media (max-width: 980px) {
  .scn-hint {
    display: flex; align-items: center; gap: 8px;
    margin: 10px 0 0; color: var(--flow-muted); font-size: 12.5px;
    letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600;
  }
  .scn-hint::after { content: '⟶'; color: var(--flow-cyan); }
}
