/* ============================================================
   Pilos Agents — Landing Page
   Premium SaaS system · light hero + dark sections · humanist sans
   ============================================================ */

:root {
  /* Accent (tweakable) */
  --accent: #6366f1;
  --accent-strong: #4f52e6;
  --accent-ink: #ffffff;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --accent-glow: rgba(99, 102, 241, 0.35);

  /* Radius (tweakable) */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Light surfaces */
  --bg: #ffffff;
  --bg-2: #f7f7f9;
  --bg-3: #f0f0f3;
  --surface: #ffffff;
  --ink: #0b0b0f;
  --ink-2: #34343d;
  --muted: #6a6a76;
  --line: rgba(12, 12, 20, 0.09);
  --line-2: rgba(12, 12, 20, 0.06);

  /* Dark surfaces */
  --d-bg: #0a0a0d;
  --d-bg-2: #0f0f14;
  --d-surface: #14141b;
  --d-surface-2: #1a1a23;
  --d-ink: #f4f4f7;
  --d-ink-2: #c9c9d4;
  --d-muted: #8b8b99;
  --d-line: rgba(255, 255, 255, 0.09);
  --d-line-2: rgba(255, 255, 255, 0.055);

  --maxw: 1200px;
  --pad: 28px;

  --shadow-sm: 0 1px 2px rgba(10, 10, 25, 0.05), 0 1px 1px rgba(10, 10, 25, 0.04);
  --shadow-md: 0 8px 24px -8px rgba(15, 15, 40, 0.12), 0 2px 6px rgba(15, 15, 40, 0.05);
  --shadow-lg: 0 30px 60px -22px rgba(15, 15, 40, 0.30), 0 8px 24px -12px rgba(15, 15, 40, 0.16);
  --shadow-glow: 0 24px 80px -28px var(--accent-glow);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.011em;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Layout primitives ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: 116px 0; position: relative; }
.section.tight { padding: 84px 0; }
.dark { background: var(--d-bg); color: var(--d-ink); }
.dark .section { }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.h-display {
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0;
}
.h-section {
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 18px 0 0;
}
.lede {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  margin: 20px 0 0;
  max-width: 46ch;
}
.dark .lede { color: var(--d-muted); }
.section-head { max-width: 60ch; }
.section-head.center { margin: 0 auto; text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 550; font-size: 15.5px;
  padding: 13px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.25s var(--ease), border-color 0.18s var(--ease);
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 20px -10px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 14px 30px -12px var(--accent-glow); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { transform: translateY(-1px); border-color: rgba(12,12,20,0.18); box-shadow: var(--shadow-md); }
.dark .btn-ghost { background: rgba(255,255,255,0.05); color: var(--d-ink); border-color: var(--d-line); box-shadow: none; }
.dark .btn-ghost:hover { background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.2); }
.btn-lg { padding: 16px 26px; font-size: 16.5px; border-radius: var(--r-md); }
.btn-block { width: 100%; justify-content: center; }

.linklike {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 550; color: var(--accent);
  transition: gap 0.2s var(--ease);
}
.linklike:hover { gap: 10px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  background: rgba(255,255,255,0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(255,255,255,0.82); }
.nav-inner { height: 66px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 650; font-size: 18px; letter-spacing: -0.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), color-mix(in oklch, var(--accent) 60%, #000));
  display: grid; place-items: center;
  box-shadow: 0 4px 12px -4px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.35);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 7px;
  border: 2px solid rgba(255,255,255,0.92); border-radius: 4px;
  border-bottom-color: transparent; border-right-color: transparent;
  transform: rotate(45deg);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a.nav-link {
  padding: 8px 13px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 15px; font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-links a.nav-link:hover { background: var(--bg-3); color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-star {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 550;
  padding: 8px 13px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface);
}
.nav-star b { color: var(--accent); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 64px 0 40px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 38%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 38%, transparent 78%);
}
.hero-glow {
  position: absolute; top: -180px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 560px;
  background: radial-gradient(closest-side, var(--accent-soft), transparent 72%);
  filter: blur(8px);
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 8px 6px 6px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.pill .tag {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent);
}
.hero h1 { margin-top: 26px; }
.hero h1 .grad {
  background: linear-gradient(120deg, var(--accent), color-mix(in oklch, var(--accent) 55%, #d946ef));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { margin-left: auto; margin-right: auto; max-width: 56ch; font-size: clamp(17px, 1.5vw, 21px); }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 20px; font-family: var(--mono); font-size: 12.5px;
  color: var(--muted); letter-spacing: 0.02em;
  display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center;
}
.hero-meta span { white-space: nowrap; }
.hero-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.5; }

/* App mockup window */
.appembed { position: relative; z-index: 1; margin-top: 58px; width: 100%; overflow: visible; }
.appembed-glow { position: absolute; top: -4%; left: 50%; transform: translateX(-50%); width: 70%; height: 120px; background: radial-gradient(closest-side, var(--accent-glow), transparent 75%); filter: blur(22px); opacity: 0.5; z-index: 0; pointer-events: none; }
.appembed-scaler { position: absolute; top: 0; left: 0; transform-origin: top left; z-index: 1; border-radius: 16px; overflow: hidden; border: 1px solid rgba(18,18,45,0.10); box-shadow: 0 4px 10px -4px rgba(24,22,60,0.14), 0 26px 50px -22px rgba(24,22,60,0.28), 0 60px 110px -60px rgba(24,22,60,0.36); }
.appembed-veil { position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7%; border: none; background: linear-gradient(180deg, transparent 55%, rgba(10,10,16,0.18)); cursor: pointer; transition: background 0.25s var(--ease); }
.appembed-veil:hover { background: linear-gradient(180deg, transparent 45%, rgba(10,10,16,0.28)); }
.appembed-cta { display: inline-flex; align-items: center; gap: 9px; padding: 11px 18px; border-radius: var(--r-pill); background: rgba(20,20,28,0.86); color: #fff; font-size: 14.5px; font-weight: 550; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.14); box-shadow: 0 12px 30px -12px rgba(0,0,0,0.6); transition: transform 0.2s var(--ease); }
.appembed-veil:hover .appembed-cta { transform: translateY(-2px); }
.appembed-cta svg { color: var(--accent); }
.appembed-tag { position: absolute; top: 14px; right: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: var(--r-pill); background: rgba(20,20,28,0.78); color: #fff; font-size: 12px; font-weight: 550; backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.12); pointer-events: none; }
.appembed-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ecf8e; box-shadow: 0 0 0 3px rgba(62,207,142,0.2); }

.appwrap { position: relative; z-index: 1; margin-top: 58px; perspective: 1800px; }
.appwrap .reflect {
  position: absolute; left: 50%; bottom: -8%; transform: translateX(-50%);
  width: 70%; height: 120px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 75%);
  filter: blur(20px); opacity: 0.6; z-index: 0;
}
.window {
  position: relative; z-index: 1;
  max-width: 1040px; margin: 0 auto;
  background: var(--d-bg-2);
  border: 1px solid var(--d-line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.02) inset;
  overflow: hidden;
}
.titlebar {
  height: 42px; display: flex; align-items: center; gap: 8px;
  padding: 0 15px; background: var(--d-surface);
  border-bottom: 1px solid var(--d-line);
}
.tl { width: 11px; height: 11px; border-radius: 50%; }
.tl.r { background: #ff5f57; } .tl.y { background: #febc2e; } .tl.g { background: #28c840; }
.titlebar .title {
  margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--d-muted);
  display: flex; align-items: center; gap: 8px;
}
.titlebar .title .live { width: 7px; height: 7px; border-radius: 50%; background: #28c840; box-shadow: 0 0 0 3px rgba(40,200,64,0.18); }
.app-body { display: grid; grid-template-columns: 188px 1fr; min-height: 430px; }
.app-side { background: var(--d-bg); border-right: 1px solid var(--d-line); padding: 14px 12px; }
.side-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--d-muted); margin: 6px 8px 10px; }
.side-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 9px;
  font-size: 13px; color: var(--d-ink-2); margin-bottom: 2px;
}
.side-item .ico { width: 16px; height: 16px; opacity: 0.7; }
.side-item.active { background: var(--accent-soft); color: #fff; }
.side-item.active .ico { opacity: 1; }
.side-badge { margin-left: auto; font-family: var(--mono); font-size: 10px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,0.07); color: var(--d-muted); }
.app-main { display: flex; flex-direction: column; background: var(--d-bg-2); }
.app-tabs { display: flex; gap: 2px; padding: 10px 14px 0; border-bottom: 1px solid var(--d-line-2); }
.app-tab { font-size: 12.5px; padding: 7px 12px; border-radius: 8px 8px 0 0; color: var(--d-muted); display: flex; align-items: center; gap: 7px; }
.app-tab .s { width: 6px; height: 6px; border-radius: 50%; background: #28c840; }
.app-tab.active { color: var(--d-ink); background: rgba(255,255,255,0.04); }
.chat { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.msg { display: flex; gap: 11px; opacity: 0; transform: translateY(8px); }
.msg.show { opacity: 1; transform: none; transition: all 0.5s var(--ease); }
.av { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; font-weight: 700; color: #fff; }
.msg .body { flex: 1; }
.msg .who { font-size: 12.5px; font-weight: 600; color: var(--d-ink); display: flex; align-items: center; gap: 8px; }
.msg .who .role { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--d-muted); padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,0.06); }
.msg .txt { font-size: 13.5px; line-height: 1.5; color: var(--d-ink-2); margin-top: 3px; }
.msg .txt .hl { color: var(--accent); font-weight: 500; }
.typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--d-muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2){ animation-delay: 0.18s; } .typing span:nth-child(3){ animation-delay: 0.36s; }
@keyframes blink { 0%,60%,100%{opacity:0.25; transform: translateY(0);} 30%{opacity:1; transform: translateY(-2px);} }
.app-input { margin: 0 16px 16px; border: 1px solid var(--d-line); border-radius: var(--r-md); background: var(--d-surface); padding: 11px 13px; display: flex; align-items: center; gap: 10px; }
.app-input .ph { color: var(--d-muted); font-size: 13px; flex: 1; }
.app-input .send { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.app-input .send svg { width: 14px; height: 14px; color: #fff; }

/* ---------- Trust strip ---------- */
.trust { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.trust-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 22px 0; flex-wrap: wrap; }
.trust-item { display: flex; align-items: center; gap: 11px; font-size: 14.5px; color: var(--muted); }
.trust-item b { color: var(--ink); font-weight: 650; }
.trust-stars { color: #f59e0b; letter-spacing: 2px; font-size: 14px; }

/* ---------- Bento features ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 56px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; position: relative; overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(12,12,20,0.14); }
.dark .card { background: var(--d-surface); border-color: var(--d-line); }
.dark .card:hover { border-color: rgba(255,255,255,0.18); box-shadow: 0 24px 50px -24px rgba(0,0,0,0.7); }
.card .ico-tile {
  width: 42px; height: 42px; border-radius: var(--r-sm);
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card .ico-tile svg { width: 21px; height: 21px; }
.card h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 8px; }
.card p { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin: 0; }
.dark .card p { color: var(--d-muted); }
.span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; } .span-6 { grid-column: span 6; }
.card .chiprow { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 16px; }
.chip { font-family: var(--mono); font-size: 11px; padding: 4px 9px; border-radius: var(--r-pill); background: var(--bg-3); color: var(--ink-2); border: 1px solid var(--line-2); }
.dark .chip { background: rgba(255,255,255,0.05); color: var(--d-ink-2); border-color: var(--d-line); }

/* Featured wide card (terminal preview) */
.term {
  background: var(--d-bg); border: 1px solid var(--d-line); border-radius: var(--r-md);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7; color: var(--d-ink-2);
  padding: 14px 16px; margin-top: 18px; overflow: hidden;
}
.term .ln { white-space: pre-wrap; }
.term .cmd { color: var(--d-ink); } .term .ok { color: #3ecf8e; } .term .dim { color: var(--d-muted); } .term .acc { color: var(--accent); }
.term .cursor { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: text-bottom; animation: blink2 1s steps(1) infinite; }
@keyframes blink2 { 50% { opacity: 0; } }

/* ---------- Agents (dark) ---------- */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-top: 14px; }
.agent {
  background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--r-md);
  padding: 18px; transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s;
  position: relative;
}
.agent:hover { transform: translateY(-4px); border-color: var(--ag, var(--accent)); background: var(--d-surface-2); }
.agent .top { display: flex; align-items: center; gap: 11px; }
.agent .emoji { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 13px; color: #fff; background: var(--ag, var(--accent)); }
.agent .nm { font-weight: 600; font-size: 15px; }
.agent .rl { font-size: 12.5px; color: var(--d-muted); }
.agent .skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.agent .skills span { font-family: var(--mono); font-size: 10.5px; padding: 3px 8px; border-radius: var(--r-pill); background: rgba(255,255,255,0.05); color: var(--d-ink-2); }
.agent.add { display: grid; place-items: center; text-align: center; border-style: dashed; color: var(--d-muted); }
.agent.add .plus { width: 40px; height: 40px; border-radius: 11px; border: 1.5px dashed var(--d-line); display: grid; place-items: center; font-size: 22px; margin-bottom: 8px; color: var(--accent); }
.agent-feats { display: flex; flex-direction: column; gap: 13px; }
.agent-feat { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--d-ink-2); }
.check { width: 21px; height: 21px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; margin-top: 1px; }
.check svg { width: 12px; height: 12px; }

/* ---------- Integrations ---------- */
.int-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 52px; }
.int {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 20px; display: flex; gap: 14px; align-items: flex-start;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
  position: relative;
}
.int:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(12,12,20,0.16); }
.int .logo { width: 40px; height: 40px; border-radius: 10px; background: var(--bg-3); display: grid; place-items: center; flex: none; font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--ink); }
.int .logo img { width: 22px; height: 22px; }
.int h4 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.int p { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.int .pro { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.05em; padding: 2px 6px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }
.int.more { align-items: center; justify-content: center; text-align: center; border-style: dashed; color: var(--muted); font-weight: 550; }

/* ---------- Workflow engine (dark, interactive) ---------- */
.wf-shell { margin-top: 52px; display: grid; grid-template-columns: 1.05fr 1.15fr; gap: 44px; align-items: center; }
.wf-list { display: flex; flex-direction: column; gap: 16px; }
.wf-li { display: flex; gap: 13px; align-items: flex-start; font-size: 15.5px; color: var(--d-ink-2); line-height: 1.5; }
.wf-li .n { font-family: var(--mono); font-size: 12px; color: var(--accent); border: 1px solid var(--d-line); border-radius: 7px; padding: 3px 7px; flex: none; }
.wf-canvas {
  background:
    radial-gradient(circle at 1px 1px, var(--d-line) 1px, transparent 0) 0 0 / 22px 22px,
    var(--d-bg-2);
  border: 1px solid var(--d-line); border-radius: var(--r-lg);
  padding: 22px; position: relative; min-height: 440px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}
.wf-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.wf-head .ttl { font-family: var(--mono); font-size: 12.5px; color: var(--d-ink-2); display: flex; align-items: center; gap: 9px; }
.wf-run { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: var(--r-pill); background: var(--accent); color: #fff; border: none; box-shadow: 0 6px 16px -8px var(--accent-glow); }
.wf-run:hover { background: var(--accent-strong); }
.wf-run.running { background: var(--d-surface-2); color: var(--d-muted); }
.wf-nodes { display: flex; flex-direction: column; gap: 0; position: relative; }
.wf-node {
  display: flex; align-items: center; gap: 13px;
  background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--r-md);
  padding: 13px 15px; position: relative; z-index: 2;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s, background 0.3s;
}
.wf-node .nico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,0.05); color: var(--d-ink-2); }
.wf-node .nico svg { width: 17px; height: 17px; }
.wf-node .ntext .nt { font-size: 13.5px; font-weight: 600; color: var(--d-ink); }
.wf-node .ntext .ns { font-family: var(--mono); font-size: 11px; color: var(--d-muted); }
.wf-node .nkind { margin-left: auto; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--d-muted); padding: 3px 8px; border-radius: var(--r-pill); border: 1px solid var(--d-line); }
.wf-node.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 10px 30px -14px var(--accent-glow); transform: translateX(4px); background: var(--d-surface-2); }
.wf-node.active .nico { background: var(--accent-soft); color: var(--accent); }
.wf-node.done .nico { background: rgba(62,207,142,0.14); color: #3ecf8e; }
.wf-edge { height: 22px; width: 2px; margin-left: 31px; background: var(--d-line); position: relative; z-index: 1; }
.wf-edge .flow { position: absolute; inset: 0; width: 2px; background: var(--accent); transform: scaleY(0); transform-origin: top; }
.wf-edge.lit .flow { transform: scaleY(1); transition: transform 0.4s linear; }
.wf-branch { display: flex; gap: 8px; margin: 0 0 0 18px; }
.wf-branch .b { font-family: var(--mono); font-size: 10px; padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--d-line); color: var(--d-muted); }
.wf-branch .b.yes { color: #3ecf8e; border-color: rgba(62,207,142,0.4); }
.wf-palette { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--d-line-2); }
.wf-palette span { font-family: var(--mono); font-size: 10.5px; padding: 4px 9px; border-radius: 7px; background: rgba(255,255,255,0.04); color: var(--d-muted); border: 1px solid var(--d-line-2); }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 56px; }
.step { position: relative; padding-top: 22px; }
.step .num { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: 0.08em; }
.step .bar { height: 3px; background: var(--line); border-radius: 3px; margin: 14px 0 18px; position: relative; overflow: hidden; }
.step .bar::after { content: ""; position: absolute; inset: 0; width: var(--fill, 0%); background: var(--accent); border-radius: 3px; transition: width 0.6s var(--ease); }
.step h3 { font-size: 18px; font-weight: 600; margin: 0 0 7px; letter-spacing: -0.02em; }
.step p { font-size: 14.5px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ---------- Open source (dark) ---------- */
.os-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; margin-top: 50px; align-items: start; }
.os-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 26px; }
.os-stat { background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--r-md); padding: 20px; }
.os-stat .v { font-size: 30px; font-weight: 650; letter-spacing: -0.02em; }
.os-stat .v.accent { color: var(--accent); }
.os-stat .k { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--d-muted); margin-top: 4px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.col { background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--r-lg); padding: 22px; }
.col.pro { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft), 0 20px 50px -28px var(--accent-glow); }
.col .ctitle { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 16px; margin-bottom: 4px; }
.col .badge { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: var(--r-pill); }
.col .badge.mit { background: rgba(255,255,255,0.07); color: var(--d-ink-2); }
.col .badge.pro { background: var(--accent-soft); color: var(--accent); }
.col ul { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.col li { display: flex; gap: 10px; font-size: 14px; color: var(--d-ink-2); align-items: center; }
.col li svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.os-foot { font-family: var(--mono); font-size: 12px; color: var(--d-muted); text-align: center; margin-top: 16px; }

/* ---------- Changelog ---------- */
.changelog { margin-top: 46px; border-top: 1px solid var(--line); }
.clog {
  display: grid; grid-template-columns: 200px 1fr; gap: 30px;
  padding: 26px 0; border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.clog:hover { background: var(--bg-2); }
.clog .meta { display: flex; flex-direction: column; gap: 6px; }
.clog .ver { font-family: var(--mono); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.clog .new { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }
.clog .date { font-size: 13px; color: var(--muted); }
.clog h3 { margin: 0 0 7px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.clog p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.55; max-width: 64ch; }

/* ---------- Testimonials ---------- */
.tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 52px; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.quote .stars { color: #f59e0b; letter-spacing: 2px; font-size: 14px; margin-bottom: 14px; }
.quote p { font-size: 16px; line-height: 1.55; margin: 0 0 20px; letter-spacing: -0.01em; }
.quote .by { display: flex; align-items: center; gap: 11px; margin-top: auto; }
.quote .by .av2 { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 12px; color: #fff; background: var(--accent); }
.quote .by .nm { font-weight: 600; font-size: 14.5px; }
.quote .by .rl { font-size: 13px; color: var(--muted); }

/* ---------- Community (dark) ---------- */
.com-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 50px; }
.com { background: var(--d-surface); border: 1px solid var(--d-line); border-radius: var(--r-lg); padding: 26px; transition: transform 0.25s var(--ease), border-color 0.25s; }
.com:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.18); }
.com .ci { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.05); display: grid; place-items: center; margin-bottom: 16px; color: var(--d-ink); }
.com .ci svg { width: 22px; height: 22px; }
.com h3 { margin: 0 0 7px; font-size: 18px; font-weight: 600; }
.com p { margin: 0 0 16px; font-size: 14.5px; color: var(--d-muted); line-height: 1.5; }

/* ---------- Pricing ---------- */
.toggle-wrap { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 30px; }
.toggle { width: 56px; height: 30px; border-radius: var(--r-pill); background: var(--bg-3); border: 1px solid var(--line); position: relative; padding: 0; transition: background 0.2s; }
.toggle .knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); transition: transform 0.25s var(--ease); box-shadow: var(--shadow-sm); }
.toggle.on .knob { transform: translateX(26px); }
.toggle-lbl { font-size: 15px; font-weight: 550; color: var(--muted); transition: color 0.2s; }
.toggle-lbl.act { color: var(--ink); }
.save-tag { font-family: var(--mono); font-size: 11px; padding: 3px 9px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); }
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; align-items: start; }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 30px; position: relative; box-shadow: var(--shadow-sm); }
.tier.pop { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent-soft), var(--shadow-glow); transform: translateY(-8px); }
.tier .pop-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; padding: 5px 13px; border-radius: var(--r-pill); background: var(--accent); color: #fff; }
.tier .tname { font-size: 17px; font-weight: 600; }
.tier .price { font-size: 40px; font-weight: 650; letter-spacing: -0.03em; margin: 12px 0 2px; display: flex; align-items: baseline; gap: 6px; }
.tier .price .per { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.tier .tdesc { font-size: 14px; color: var(--muted); min-height: 42px; line-height: 1.5; }
.tier .btn { margin: 18px 0 6px; }
.tier ul { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 11px; }
.tier li { display: flex; gap: 10px; font-size: 14px; align-items: flex-start; }
.tier li svg { width: 16px; height: 16px; color: var(--accent); flex: none; margin-top: 2px; }
.tier li.off { color: var(--muted); opacity: 0.55; }
.tier li.off svg { color: var(--muted); }
.tier li b { font-weight: 650; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 46px auto 0; }
.qa { border-bottom: 1px solid var(--line); }
.qa button { width: 100%; background: none; border: none; padding: 22px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; text-align: left; font-size: 18px; font-weight: 550; color: var(--ink); letter-spacing: -0.015em; }
.qa .pm { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: transform 0.3s var(--ease), background 0.2s, color 0.2s; color: var(--muted); }
.qa.open .pm { transform: rotate(45deg); background: var(--accent); color: #fff; border-color: var(--accent); }
.qa .ans { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.qa .ans-inner { padding: 0 0 22px; color: var(--muted); font-size: 15.5px; line-height: 1.6; max-width: 68ch; }
.qa .ans-inner code { font-family: var(--mono); font-size: 13px; background: var(--bg-3); padding: 2px 7px; border-radius: 6px; color: var(--ink); }

/* ---------- Final CTA ---------- */
.finalcta { text-align: center; position: relative; overflow: hidden; }
.finalcta .glow2 { position: absolute; top: -120px; left: 50%; transform: translateX(-50%); width: 760px; height: 420px; background: radial-gradient(closest-side, var(--accent-glow), transparent 72%); opacity: 0.45; pointer-events: none; }
.finalcta h2 { font-size: clamp(36px, 5vw, 62px); font-weight: 600; letter-spacing: -0.035em; margin: 0; line-height: 1.02; position: relative; }
.finalcta p { color: var(--d-muted); font-size: 18px; margin: 18px auto 0; max-width: 50ch; position: relative; }
.dl-row { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; position: relative; }
.dl { display: inline-flex; align-items: center; gap: 11px; padding: 14px 22px; border-radius: var(--r-md); background: rgba(255,255,255,0.05); border: 1px solid var(--d-line); color: var(--d-ink); font-weight: 550; transition: background 0.2s, transform 0.18s, border-color 0.2s; }
.dl:hover { background: rgba(255,255,255,0.1); transform: translateY(-2px); border-color: rgba(255,255,255,0.25); }
.dl svg { width: 22px; height: 22px; }
.dl .small { font-size: 11px; color: var(--d-muted); font-weight: 500; display: block; line-height: 1.1; }
.dl .big { font-size: 15px; line-height: 1.2; }
.finalcta .req { font-family: var(--mono); font-size: 12px; color: var(--d-muted); margin-top: 22px; position: relative; }
.finalcta .req a { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--d-line); padding: 56px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px; }
.foot-brand .brand { color: var(--d-ink); margin-bottom: 14px; }
.foot-brand p { color: var(--d-muted); font-size: 14px; max-width: 30ch; line-height: 1.55; }
.foot-col h4 { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--d-muted); margin: 0 0 14px; }
.foot-col a { display: block; color: var(--d-ink-2); font-size: 14.5px; padding: 6px 0; transition: color 0.15s; }
.foot-col a:hover { color: var(--d-ink); }
.foot-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--d-line-2); flex-wrap: wrap; gap: 14px; }
.foot-bottom span { font-size: 13.5px; color: var(--d-muted); }
.foot-social { display: flex; gap: 8px; }
.foot-social a { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--d-line); display: grid; place-items: center; color: var(--d-ink-2); transition: background 0.2s, color 0.2s; }
.foot-social a:hover { background: rgba(255,255,255,0.06); color: var(--d-ink); }
.foot-social svg { width: 17px; height: 17px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* Motion off: show everything instantly, kill decorative loops */
.no-motion .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
.no-motion .typing span, .no-motion .cursor { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-3, .span-2, .span-6 { grid-column: span 2; }
  .int-grid { grid-template-columns: repeat(2, 1fr); }
  .wf-shell, .os-grid { grid-template-columns: 1fr; gap: 30px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .tgrid, .com-grid, .pricing { grid-template-columns: 1fr; }
  .tier.pop { transform: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .clog { grid-template-columns: 1fr; gap: 10px; }
}
@media (max-width: 720px) {
  :root { --pad: 18px; }
  .section { padding: 76px 0; }
  .nav-links { display: none; }
  .app-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .bento, .int-grid, .steps, .compare, .os-stats { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero-meta { font-size: 11px; }
}

/* ---------- Legal pages (privacy / terms) ---------- */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 28px 96px;
}
.legal-page h1 {
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 10px;
}
.legal-page .legal-updated {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 44px;
}
.legal-page h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 44px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.legal-page h2:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.legal-page h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 26px 0 10px;
}
.legal-page p,
.legal-page li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.legal-page p { margin: 0 0 14px; }
.legal-page ul,
.legal-page ol { margin: 0 0 16px; padding-left: 22px; }
.legal-page li { margin-bottom: 6px; }
.legal-page strong { color: var(--ink); font-weight: 600; }
.legal-page a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.legal-page a:hover { color: var(--accent-strong); }
.legal-page code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--ink);
}

/* ---------- Activate page chrome ---------- */
.activate-shell {
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 24px 96px;
  position: relative;
  overflow: hidden;
}
.activate-shell .hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.activate-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 40px 36px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.activate-logo {
  width: 56px; height: 56px;
  border-radius: 14px;
  margin: 0 auto 18px;
  display: block;
}
.activate-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 8px;
}
.activate-sub {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin: 0 0 20px;
}
.activate-card .spinner {
  width: 26px; height: 26px;
  border: 2.5px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 20px auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.key-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin: 16px 0 22px;
  text-align: left;
}
.key-label {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 6px;
}
.key-value {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
  word-break: break-all;
}
.activate-card .btn-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.activate-card .note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 18px;
  line-height: 1.55;
}
.error-state, .fallback-state { display: none; }
.error-state.show, .fallback-state.show { display: block; }
.loading-state.hidden { display: none; }

/* ---------- Hero screenshot placeholder ---------- */
.hero-shot {
  position: relative;
  z-index: 1;
  margin: 58px auto 0;
  max-width: 1040px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(18,18,45,0.10);
  box-shadow:
    0 4px 10px -4px rgba(24,22,60,0.14),
    0 26px 50px -22px rgba(24,22,60,0.28),
    0 60px 110px -60px rgba(24,22,60,0.36);
  background: var(--d-bg-2);
  aspect-ratio: 1320 / 824;
}
.hero-shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-shot .placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--d-muted);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Mobile nav (vanilla) ---------- */
.nav-toggle-btn {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle-btn svg { width: 18px; height: 18px; }
@media (max-width: 980px) {
  .nav-cta .nav-star { display: none; }
}
@media (max-width: 720px) {
  .nav-toggle-btn { display: inline-flex; }
  .nav-cta .btn-primary { padding: 10px 14px; font-size: 14px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 14px var(--pad);
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav-links a.nav-link { padding: 12px; font-size: 16px; }
}

/* ---------- Pricing billing-label active (kept hook for pricing.js) ---------- */
.billing-label-active { color: var(--ink); }
.toggle-on { background: var(--accent-soft); }

/* Tweaks panel mount */
#tweaks-root { position: fixed; z-index: 90; }
