/* ForgeSaaS — Attio-style system. Light, hairline grids, Inter.
   Layout: white / off-white bands separated by 1px strokes, 1200px column, bordered cell grids,
   product UI "windows" with soft blue wash. Type: Inter (opsz axis for display sizes). */
:root {
  --bg: #ffffff;
  --bg-2: #f7f7f8;
  --bg-3: #f1f2f4;
  --fg: #141519;
  --fg-2: #2b2d33;
  --muted: #6b7079;
  --muted-2: #9a9ea6;
  --border: #ebecef;
  --border-2: #d9dbe0;
  --accent: #2f5fd9;
  --accent-bg: #e9eefb;
  --accent-2: #4f7df0;
  --green: #1f9d55;
  --green-bg: #e6f6ec;
  --amber: #c77d11;
  --amber-bg: #fdf1dd;
  --dark: #0b0b0c;
  --dark-2: #151517;
  --dark-border: rgba(255,255,255,0.1);
  --dark-muted: #9a9ea6;
  --font: "Inter", "Figtree", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1200px;
  --gutter-l: max(24px, env(safe-area-inset-left, 0px));
  --gutter-r: max(24px, env(safe-area-inset-right, 0px));
  --r: 10px;
  --r-lg: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; font-feature-settings: "cv11", "ss01"; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; }
::selection { background: #d6e0fb; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }

h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; line-height: 1.15; }
h1 { font-size: clamp(2.6rem, 5.2vw, 4rem); font-weight: 600; letter-spacing: -0.02em; line-height: 0.98; font-optical-sizing: auto; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.12; }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
.lead { color: var(--muted); font-size: 1.05rem; line-height: 1.55; max-width: 62ch; }
.muted { color: var(--muted); }
.two-tone .alt { color: var(--muted); }
.caption { font-size: 0.875rem; color: var(--muted); font-weight: 500; }
.eyebrow { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 8px; background: var(--accent-bg); color: var(--accent); font-size: 0.875rem; font-weight: 500; line-height: 1.5; }
.eyebrow.neutral { background: var(--bg-3); color: var(--fg-2); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r); font-size: 0.875rem; font-weight: 500; line-height: 1; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, transform .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: #1c1d21; color: #f5f5f6; border-color: #3a3c44; }
.btn-primary:hover { background: #000; }
.btn-ghost { background: var(--bg); color: var(--fg-2); border-color: var(--border-2); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-lg { height: 40px; padding: 0 16px; font-size: 0.95rem; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 0.8rem; }
.dark .btn-primary { background: #fff; color: #111; border-color: #fff; }
.dark .btn-primary:hover { background: #e9e9ec; }
.dark .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.25); }
.dark .btn-ghost:hover { background: rgba(255,255,255,0.08); }

/* Top banner + nav */
.banner { background: #0b0b0c; color: #fff; font-size: 0.8rem; text-align: center; height: 30px; display: flex; align-items: center; justify-content: center; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.banner a { color: #fff; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.banner a span { flex: none; }
.banner a:hover { text-decoration: underline; }
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); height: 64px; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand svg { width: 26px; height: 26px; }
.brand svg.wordmark { height: 20px; width: auto; display: block; color: var(--fg, #141519); }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: 7px 10px; border-radius: 8px; font-size: 0.9rem; font-weight: 500; color: var(--fg-2); transition: background .15s; }
.nav-links a:hover, .nav-links a.active { background: var(--bg-3); }
.nav-cta { display: flex; gap: 8px; align-items: center; }
.nav-toggle { display: none; width: 40px; height: 40px; border-radius: 8px; flex-direction: column; align-items: center; justify-content: center; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--fg); margin: 3px 0; }
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 49; background: #fff; padding: calc(100px + env(safe-area-inset-top, 0px)) var(--gutter-r) 40px var(--gutter-l); flex-direction: column; gap: 4px; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 1.4rem; padding: 14px 0; border-bottom: 1px solid var(--border); font-weight: 500; letter-spacing: -0.02em; }
.mobile-menu .btn { margin-top: 18px; height: 44px; font-size: 1rem; }

/* Sections */
.section { padding-top: clamp(64px, 8vw, 112px); padding-bottom: clamp(64px, 8vw, 112px); position: relative; }
.section.alt { background: var(--bg-2); }
.section.lined { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; max-width: 880px; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head.center { align-items: center; text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { max-width: 32ch; }
.section-head.center h2 { max-width: 24ch; }
.section-head .lead { max-width: 58ch; }

/* ───── Hero ───── */
.hero { position: relative; padding-top: clamp(56px, 7vw, 96px); overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-inner { position: relative; z-index: 2; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.hero h1 { max-width: 18ch; }
.hero .lead { text-align: center; margin: 0 auto; max-width: 52ch; font-size: 1.1rem; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hero-note { font-size: 0.8rem; color: var(--muted-2); }
.rotator { display: inline-grid; text-align: center; color: var(--fg); }
.rotator .rot-word { grid-area: 1 / 1; opacity: 0; transform: translateY(0.4em); transition: opacity .45s cubic-bezier(.2,.8,.2,1), transform .45s cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.rotator .rot-word.on { opacity: 1; transform: none; }
.rotator .rot-word.out { opacity: 0; transform: translateY(-0.4em); }
.pill-link { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; border: 1px solid var(--border-2); background: #fff; font-size: 0.8rem; font-weight: 500; color: var(--fg-2); }
.pill-link i { font-style: normal; color: var(--muted); }

/* Hero product stage */
.stage { position: relative; margin-top: 48px; height: clamp(360px, 46vw, 640px); }
.stage::before { content: ""; position: absolute; left: 50%; top: 0; width: 160vw; height: 100%; transform: translateX(-50%); background: linear-gradient(180deg, #fff 0%, #e4ebfb 50%, #d6e0f9 100%); z-index: 0; }
.stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; z-index: 3; }
.stage .wrap { position: relative; height: 100%; }
.shot { position: absolute; border-radius: 12px; background: #fff; border: 1px solid var(--border-2); box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 24px 60px rgba(30,50,110,0.12); overflow: hidden; font-size: 0.78rem; color: var(--fg-2); }
.shot-main { left: 50%; top: 0; transform: translateX(-50%); width: min(1000px, 100%); height: 100%; z-index: 2; border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }
.shot-side { top: 56px; width: 300px; height: calc(100% - 56px); z-index: 1; opacity: .9; border-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.shot-left { left: 0; transform: translateX(-28%) perspective(1200px) rotateY(10deg); transform-origin: right center; }
.shot-right { right: 0; transform: translateX(28%) perspective(1200px) rotateY(-10deg); transform-origin: left center; }
.shot-side .ui-pad { padding: 14px; }
.ui-top { height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.ui-top .crumb { flex: none; }
.ui-top .dots { display: flex; gap: 5px; }
.ui-top .dots i { width: 9px; height: 9px; border-radius: 50%; background: #e4e5e9; }
.ui-top .crumb { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.ui-top .crumb i { width: 16px; height: 16px; border-radius: 4px; background: #1c1d21; display: inline-block; }
.ui-top .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.ui-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--border-2); background: #fff; font-size: 0.72rem; font-weight: 500; color: var(--fg-2); white-space: nowrap; }
.ui-chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.ui-chip.dark { background: #1c1d21; color: #fff; border-color: #1c1d21; }
.ui-body { display: grid; grid-template-columns: 168px 1fr 270px; height: calc(100% - 44px); }
.ui-side { border-right: 1px solid var(--border); padding: 12px 10px; background: var(--bg-2); display: flex; flex-direction: column; gap: 2px; }
.ui-side a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--fg-2); font-weight: 500; font-size: 0.78rem; }
.ui-side a.on { background: #fff; box-shadow: 0 0 0 1px var(--border); color: var(--fg); }
.ui-side .grp { font-size: 0.68rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin: 10px 8px 4px; font-weight: 500; }
.ui-main { padding: 16px; overflow: hidden; min-width: 0; }
.ui-main .ttl { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ui-main .ttl b { font-size: 1rem; font-weight: 500; letter-spacing: -0.01em; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.kpi { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-width: 0; white-space: nowrap; overflow: hidden; }
.kpi small { display: block; color: var(--muted); font-size: 0.7rem; font-weight: 500; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi b { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi i { font-style: normal; font-size: 0.7rem; color: var(--green); margin-left: 6px; font-weight: 500; }
.kpi i.down { color: var(--amber); }
.ui-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.ui-tabs span { padding: 6px 10px; font-size: 0.78rem; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ui-tabs span.on { color: var(--fg); border-color: var(--fg); }
.feed { width: 100%; border-collapse: collapse; table-layout: fixed; }
.feed td { padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.feed td.task { color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
.feed td.id { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); width: 70px; }
.feed td.agent { color: var(--muted); width: 104px; overflow: hidden; text-overflow: ellipsis; }
.feed td.st { width: 128px; }
.feed td.when { color: var(--muted-2); text-align: right; width: 52px; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; font-size: 0.72rem; font-weight: 500; background: var(--bg-3); color: var(--fg-2); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.status.done { background: var(--green-bg); color: var(--green); } .status.done::before { background: var(--green); }
.status.run { background: var(--accent-bg); color: var(--accent); } .status.run::before { background: var(--accent); animation: blink 1.2s infinite; }
.status.wait { background: var(--amber-bg); color: var(--amber); } .status.wait::before { background: var(--amber); }
@keyframes blink { 50% { opacity: .3; } }
.ui-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.box { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.box small { display: block; color: var(--muted); font-size: 0.7rem; font-weight: 500; margin-bottom: 8px; }
.box .r { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 0.74rem; padding: 3px 0; min-width: 0; }
.box .r > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.box .r .mini-bar { width: 70px; }
.box .r b { font-weight: 500; font-variant-numeric: tabular-nums; width: 20px; text-align: right; }
.box .r:has(.mini-bar) { grid-template-columns: 1fr 70px 20px; }
.ui-panel { border-left: 1px solid var(--border); padding: 14px; background: #fff; overflow: hidden; min-width: 0; }
.ui-panel .ph { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ui-panel .pt { font-weight: 500; font-size: 0.9rem; line-height: 1.3; margin-bottom: 12px; letter-spacing: -0.01em; }
.steps { display: flex; flex-direction: column; gap: 6px; }
.step { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--border); opacity: .55; transition: opacity .4s, border-color .4s, background .4s; }
.step.on { opacity: 1; border-color: #b9c9f4; background: var(--accent-bg); }
.step.ok { opacity: 1; }
.step .ico { width: 20px; height: 20px; border-radius: 6px; background: var(--bg-3); display: grid; place-items: center; font-size: 0.65rem; color: var(--fg-2); font-weight: 600; }
.step.ok .ico { background: var(--green-bg); color: var(--green); }
.step b { display: block; font-weight: 500; font-size: 0.76rem; }
.step small { display: block; color: var(--muted); font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step .pct { font-variant-numeric: tabular-nums; color: var(--green); font-size: 0.7rem; font-weight: 500; }
.step .pct.pending { color: var(--muted-2); }
.run-foot { margin-top: 10px; display: flex; justify-content: space-between; color: var(--muted); font-size: 0.7rem; }
.wa { border-radius: 10px; background: #f3f4f6; padding: 10px; font-size: 0.78rem; line-height: 1.4; }
.wa .from { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.68rem; margin-bottom: 6px; }
.wa .amt { color: var(--accent); font-weight: 500; }
.wa .acts { display: flex; gap: 6px; margin-top: 8px; }
.wa .acts span { flex: 1; text-align: center; padding: 5px; border-radius: 6px; font-size: 0.72rem; font-weight: 500; border: 1px solid var(--border-2); }
.wa .acts span:first-child { background: #1c1d21; color: #fff; border-color: #1c1d21; }
.brief-line { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.76rem; }
.brief-line b { font-weight: 500; font-variant-numeric: tabular-nums; }

/* ───── Integrations grid (logo cells) ───── */
.logo-grid { display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--border); gap: 1px; }
.logo-grid span { background: var(--bg); display: flex; align-items: center; justify-content: center; gap: 8px; height: 72px; font-weight: 500; color: var(--fg-2); font-size: 0.9rem; min-width: 0; padding: 0 8px; text-align: center; }
.logo-grid span i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); opacity: .7; flex: none; }
.logo-label { text-align: center; color: var(--muted); font-size: 0.875rem; margin-bottom: 20px; font-weight: 500; }

/* ───── Platform tabs showcase ───── */
.showcase { border: 1px solid var(--border); border-radius: 12px; background: var(--bg); overflow: hidden; display: grid; grid-template-columns: 300px 1fr; }
.show-tabs { border-right: 1px solid var(--border); padding: 24px 16px; display: flex; flex-direction: column; gap: 2px; background: var(--bg); }
.show-tab { text-align: left; padding: 10px 12px; border-radius: 8px; color: var(--muted-2); font-weight: 500; font-size: 0.95rem; position: relative; transition: color .2s, background .2s; display: flex; flex-direction: column; gap: 2px; }
.show-tab small { font-size: 0.78rem; color: var(--muted-2); font-weight: 400; display: none; }
.show-tab:hover { color: var(--fg-2); }
.show-tab.on { color: var(--fg); background: var(--bg-2); }
.show-tab.on small { display: block; color: var(--muted); }
.show-tab .bar { position: absolute; left: 0; top: 10px; bottom: 10px; width: 2px; background: var(--border-2); border-radius: 2px; overflow: hidden; }
.show-tab .bar i { display: block; width: 100%; height: 0; background: var(--fg); }
.show-tab.on .bar i { animation: tabfill var(--tab-ms, 6000ms) linear forwards; }
@keyframes tabfill { to { height: 100%; } }
.show-panels { position: relative; min-height: 520px; background: var(--bg-2); }
.show-panel { position: absolute; inset: 0; padding: 32px 32px 0; display: flex; flex-direction: column; gap: 20px; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s; pointer-events: none; }
.show-panel.on { opacity: 1; transform: none; pointer-events: auto; }
.show-panel h3 { max-width: 44ch; font-size: 1.25rem; }
.show-panel .ui { margin-top: auto; border: 1px solid var(--border-2); border-bottom: 0; border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 -1px 0 #fff, 0 12px 40px rgba(30,50,110,0.08); padding: 18px; min-height: 300px; font-size: 0.8rem; }
.ui-table { width: 100%; border-collapse: collapse; }
.ui-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 0.72rem; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.ui-table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.ui-table td.amt { text-align: right; font-variant-numeric: tabular-nums; }
.ui-table th:first-child, .ui-table td:first-child { width: 44px; color: var(--muted); }
.ui-table tr.hl td { background: var(--accent-bg); }
.mini-bar { height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.on .mini-bar i { width: var(--w, 50%); }
.record { display: grid; grid-template-columns: 140px 1fr; gap: 8px 16px; font-size: 0.8rem; }
.record dt { color: var(--muted); }
.record dd { margin: 0; font-weight: 500; }
.msg { background: #f3f4f6; border-radius: 10px; padding: 12px 14px; max-width: 420px; line-height: 1.45; }
.msg + .msg { margin-top: 8px; }
.msg .meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.72rem; margin-bottom: 6px; }
.msg.me { background: var(--accent-bg); margin-left: auto; }

/* ───── Flow (system map) ───── */
.flow { position: relative; display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 40px; padding: 28px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.flow-lines path { fill: none; stroke: var(--border-2); stroke-width: 1.5; }
.flow-lines .pkt { fill: var(--accent); }
.flow-col { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.flow-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.node { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--border-2); transition: border-color .3s, background .3s, box-shadow .3s; min-width: 0; }
.node b { display: block; font-weight: 500; font-size: 0.875rem; line-height: 1.2; }
.node small { display: block; color: var(--muted); font-size: 0.74rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node > span:nth-child(2) { min-width: 0; }
.n-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-3); color: var(--fg-2); font-size: 0.78rem; font-weight: 600; }
.node.agent .n-ico { background: #1c1d21; color: #fff; }
.node.human .n-ico { background: var(--amber-bg); color: var(--amber); }
.n-stat { font-size: 0.7rem; color: var(--muted); padding: 2px 7px; border-radius: 6px; background: var(--bg-3); white-space: nowrap; font-weight: 500; }
.node.lit { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.node.lit .n-stat { background: var(--accent-bg); color: var(--accent); }
.node.human.lit { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-bg); }
.node.human.lit .n-stat { background: var(--amber-bg); color: var(--amber); }
.node.ok { border-color: #bfe3cc; }
.node.ok .n-stat { background: var(--green-bg); color: var(--green); }
.flow-ticker { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; position: relative; z-index: 2; min-width: 0; }
.flow-ticker .status { flex: none; }
#tickerText { transition: opacity .3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }

/* ───── Dark feature block ───── */
.dark { background: var(--dark); color: #fff; }
.dark .lead, .dark .muted, .dark .two-tone .alt { color: var(--dark-muted); }
.dark .eyebrow { background: rgba(255,255,255,0.1); color: #fff; }
.dark-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--dark-border); border: 1px solid var(--dark-border); border-radius: 12px; overflow: hidden; margin-top: 48px; }
.dark-cell { background: var(--dark); padding: 28px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dark-cell h3 { font-size: 1.1rem; }
.dark-cell p { color: var(--dark-muted); font-size: 0.95rem; }
.approval { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.chat-card { border-radius: 14px; background: var(--dark-2); border: 1px solid var(--dark-border); padding: 18px; max-width: 440px; margin: 0 auto; transition: transform .4s, opacity .4s; }
.chat-card.swap { transform: translateY(12px) scale(.98); opacity: 0; }
.chat-card .from { display: flex; justify-content: space-between; align-items: center; color: var(--dark-muted); font-size: 0.78rem; margin-bottom: 10px; }
.chat-card .from b { color: #fff; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.chat-card .from b i { width: 20px; height: 20px; border-radius: 6px; background: #fff; display: inline-block; }
.bubble { border-radius: 10px; background: rgba(255,255,255,0.06); padding: 12px; font-size: 0.95rem; line-height: 1.45; min-height: 64px; }
.bubble .typing { display: inline-block; width: 1ch; animation: blink 1s infinite; color: var(--accent-2); }
.chat-actions { display: flex; gap: 8px; margin-top: 10px; }
.chat-actions .btn { flex: 1; }
.chat-done { margin-top: 12px; display: flex; align-items: center; gap: 8px; color: #6ee7a0; font-size: 0.85rem; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.chat-done.show { opacity: 1; transform: none; }
.chat-done::before { content: "✓"; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(110,231,160,0.15); font-size: 0.7rem; }
.btn.auto { box-shadow: 0 0 0 4px rgba(255,255,255,0.2); transform: scale(.97); }

/* ───── Learn (graph) ───── */
.band { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.band-text { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.band-text h2 { max-width: 26ch; }
.card { position: relative; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); padding: 24px; overflow: hidden; min-width: 0; }
.graph-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.graph-head .big { font-size: 2.2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.graph-head .big small { font-size: 0.9rem; color: var(--muted); letter-spacing: 0; margin-left: 6px; font-weight: 500; }
.graph-head .delta { color: var(--muted); font-size: 0.85rem; font-weight: 500; }
.graph svg { width: 100%; height: auto; }
.graph-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; margin-top: 6px; }
.feedback-note { position: absolute; left: 16px; top: 72px; max-width: 250px; border-radius: 10px; background: #fff; border: 1px solid var(--border-2); padding: 10px 12px; font-size: 0.78rem; box-shadow: 0 8px 30px rgba(30,50,110,0.1); }
.feedback-note .who { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.7rem; margin-bottom: 4px; }
.feedback-note .who i { width: 18px; height: 18px; border-radius: 50%; background: #1c1d21; display: inline-grid; place-items: center; font-style: normal; font-size: 0.58rem; color: #fff; }
.g-line { stroke-dasharray: 700; stroke-dashoffset: 700; }
.g-area, .g-end { opacity: 0; }
.in .g-line { animation: drawline 2s cubic-bezier(.4,0,.2,1) forwards .2s; }
.in .g-area { animation: fadein 1s forwards 1.6s; }
.in .g-end { animation: fadein .4s forwards 2.1s; }
.in .g-ring { animation: fadein .4s forwards 2.1s, ring 2s ease-out infinite 2.5s; }
@keyframes drawline { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes ring { 0% { r: 8; opacity: .4 } 100% { r: 18; opacity: 0 } }

/* ───── Industries ───── */
.cell-grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cell-grid.three { grid-template-columns: repeat(3, 1fr); }
.cell-grid.four { grid-template-columns: repeat(4, 1fr); }
.cell { background: var(--bg); padding: 28px; display: flex; flex-direction: column; gap: 12px; min-width: 0; transition: background .2s; }
a.cell:hover { background: var(--bg-2); }
.cell .ac-cat { font-size: 0.78rem; color: var(--accent); font-weight: 500; }
.cell h3 { font-size: 1.1rem; color: var(--fg); }
.cell p { color: var(--muted); font-size: 0.92rem; }
.cell .num-big { font-size: clamp(1.8rem, 2.6vw, 2.4rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ind-agents { border-top: 1px solid var(--border); padding-top: 12px; margin-top: auto; }
.ind-agents b { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.ind-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--border-2); background: #fff; color: var(--fg-2); font-size: 0.78rem; font-weight: 500; transition: background .15s, border-color .15s, color .15s; }
.chip:hover { background: var(--bg-2); }
.chip.on { background: #1c1d21; border-color: #1c1d21; color: #fff; }
.chip.pop { opacity: 0; transform: scale(.85); }
.in .chip.pop { animation: popin .4s cubic-bezier(.2,.9,.3,1.2) forwards; }
.in .chip.pop:nth-child(2) { animation-delay: .1s } .in .chip.pop:nth-child(3) { animation-delay: .2s } .in .chip.pop:nth-child(4) { animation-delay: .3s } .in .chip.pop:nth-child(5) { animation-delay: .4s } .in .chip.pop:nth-child(6) { animation-delay: .5s } .in .chip.pop:nth-child(7) { animation-delay: .6s }
@keyframes popin { to { opacity: 1; transform: none; } }
.ind-link { color: var(--accent); font-size: 0.875rem; font-weight: 500; }
.ind-foot { text-align: center; color: var(--muted); margin-top: 24px; font-size: 0.9rem; }

/* ───── Timeline ───── */
.timeline { position: relative; }
.tl-track { position: absolute; left: 0; right: 0; top: 9px; height: 2px; background: var(--border); border-radius: 2px; overflow: hidden; }
.tl-track i { display: block; height: 100%; width: 0; background: var(--fg); transition: width 2.4s cubic-bezier(.2,.8,.2,1); }
.tl-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.tl-step { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tl-dot { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--border-2); display: grid; place-items: center; position: relative; transition: border-color .4s; }
.tl-dot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--border-2); transition: background .4s; }
.tl-step.on .tl-dot { border-color: var(--fg); }
.tl-step.on .tl-dot::after { background: var(--fg); }
.tl-wk { font-size: 0.78rem; color: var(--accent); margin-top: 10px; font-weight: 500; }
.tl-step h3 { font-size: 1.15rem; }
.tl-step p { color: var(--muted); font-size: 0.92rem; }

/* ───── FAQ ───── */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 500; font-size: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; transition: transform .25s; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { color: var(--muted); padding: 0 0 20px; max-width: 68ch; }

/* ───── CTA band (dark) ───── */
.cta { background: var(--dark); color: #fff; text-align: center; padding-top: clamp(64px, 8vw, 112px); padding-bottom: clamp(64px, 8vw, 112px); position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; left: 50%; bottom: -40%; width: 900px; height: 500px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(79,125,240,0.35), transparent); pointer-events: none; }
.cta h2 { max-width: 22ch; margin: 0 auto 14px; position: relative; }
.cta .lead { margin: 0 auto 24px; color: var(--dark-muted); position: relative; }
.cta .actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; position: relative; }

/* ───── Footer ───── */
.footer { border-top: 1px solid var(--border); padding-top: 48px; padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 0.875rem; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { color: var(--fg); font-weight: 500; font-size: 0.875rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-grid a:hover { color: var(--fg); }
.footer-brand p { max-width: 36ch; margin-top: 12px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--border); font-size: 0.8rem; color: var(--muted-2); }
.email-copy { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 10px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--border); color: var(--fg-2); font-size: 0.85rem; }
.email-copy button { color: var(--accent); font-size: 0.8rem; font-weight: 500; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .07s; } .js .reveal.d2 { transition-delay: .14s; } .js .reveal.d3 { transition-delay: .21s; }

/* ───── Agents page ───── */
.page-head { padding-top: clamp(48px, 6vw, 80px); padding-bottom: 40px; border-bottom: 1px solid var(--border); }
.page-head .chips { margin-top: 8px; }
.toolbar { position: sticky; top: calc(64px + env(safe-area-inset-top, 0px)); z-index: 20; background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-top: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.toolbar-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.search { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: var(--r); background: #fff; border: 1px solid var(--border-2); }
.search input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--fg); outline: none; font-size: 0.9rem; }
.search svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.count { color: var(--muted); font-size: 0.85rem; margin-left: auto; white-space: nowrap; }
.catalogue { padding-top: 32px; padding-bottom: 160px; background: var(--bg-2); }
.cat-group { margin-bottom: 48px; }
.cat-group h2 { font-size: 1.4rem; margin-bottom: 6px; }
.cat-group .lead { font-size: 0.95rem; margin-bottom: 20px; }
.agents-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.agent-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 12px; background: #fff; border: 1px solid var(--border); min-width: 0; transition: border-color .2s, box-shadow .2s; }
.agent-card:hover { border-color: var(--border-2); box-shadow: 0 4px 20px rgba(30,50,110,0.06); }
.agent-card .ac-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.agent-card .ac-cat { font-size: 0.75rem; color: var(--accent); font-weight: 500; }
.agent-card .ac-tier { font-size: 0.72rem; color: var(--muted); padding: 2px 7px; border: 1px solid var(--border); border-radius: 6px; }
.agent-card h3 { font-size: 1.05rem; }
.agent-card p { color: var(--muted); font-size: 0.9rem; }
.agent-card .ac-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.agent-card .ac-meta span { font-size: 0.72rem; color: var(--fg-2); padding: 3px 7px; border-radius: 6px; background: var(--bg-3); }
.agent-card .ac-io { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 0.78rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; }
.agent-card .ac-io b { display: block; color: var(--fg-2); font-weight: 500; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.ac-icon { width: 32px; height: 32px; border-radius: 8px; background: #1c1d21; display: grid; place-items: center; color: #fff; font-size: 0.75rem; font-weight: 600; flex: none; }
.agent-card.selectable { cursor: pointer; user-select: none; }
.agent-card.selectable.sel { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg) inset; }
.agent-card .ac-add { margin-left: auto; width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border-2); display: grid; place-items: center; color: var(--muted); font-size: 1rem; line-height: 1; }
.agent-card.sel .ac-add { background: #1c1d21; border-color: #1c1d21; color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; }
.tray { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%); z-index: 40; width: min(720px, calc(100% - var(--gutter-l) - var(--gutter-r))); border-radius: 12px; background: #1c1d21; color: #fff; box-shadow: 0 20px 60px rgba(0,0,0,0.25); padding: 10px 10px 10px 16px; display: flex; align-items: center; gap: 14px; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.tray.show { transform: translate(-50%, 0); }
.tray .tray-info { flex: 1; min-width: 0; }
.tray .tray-info b { font-weight: 500; display: block; font-size: 0.9rem; }
.tray .tray-info span { color: var(--dark-muted); font-size: 0.78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray .tray-actions { display: flex; gap: 6px; }
.tray .btn-primary { background: #fff; color: #111; border-color: #fff; }
.tray .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.25); }
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(20,21,25,0.5); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: var(--gutter-l); }
.modal-bg.open { display: flex; }
.modal { width: min(600px, 100%); max-height: 90vh; overflow: auto; border-radius: 14px; background: #fff; border: 1px solid var(--border); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.modal h3 { font-size: 1.3rem; }
.modal .sys-list { display: flex; flex-direction: column; gap: 4px; }
.modal .sys-list div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; background: var(--bg-2); font-size: 0.875rem; }
.modal .sys-list div span { color: var(--muted); font-size: 0.78rem; white-space: nowrap; }
.modal label { display: flex; flex-direction: column; gap: 5px; font-size: 0.8rem; color: var(--fg-2); font-weight: 500; }
.modal input, .modal textarea { background: #fff; border: 1px solid var(--border-2); border-radius: 8px; padding: 8px 10px; color: var(--fg); outline: none; font-weight: 400; }
.modal input:focus, .modal textarea:focus { border-color: var(--fg); }
.modal .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modal .modal-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.modal .ok { color: var(--green); font-size: 0.875rem; }
.brief { white-space: pre-wrap; font-size: 0.78rem; color: var(--fg-2); background: var(--bg-2); border: 1px solid var(--border); border-radius: 8px; padding: 10px; max-height: 180px; overflow: auto; font-family: var(--mono); }

/* ───── Responsive ───── */
@media (max-width: 1024px) {
  .logo-grid { grid-template-columns: repeat(4, 1fr); }
  .ui-body { grid-template-columns: 160px 1fr; }
  .ui-panel { display: none; }
  .shot-side { display: none; }
  .cell-grid.three, .cell-grid.four, .agents-grid, .dark-grid { grid-template-columns: repeat(2, 1fr); }
  .tl-steps { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .tl-track { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .showcase { grid-template-columns: 1fr; }
  .show-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 12px; gap: 4px; }
  .show-tab { white-space: nowrap; padding: 8px 12px 8px 14px; }
  .show-tab small { display: none !important; }
  .show-panels { min-height: 560px; }
  .show-panel { padding: 24px 20px 0; }
  .flow { grid-template-columns: 1fr 1fr; gap: 24px; }
  .flow-out { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .flow-out .flow-label { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-flex; }
  .band, .approval { grid-template-columns: 1fr; }
  .ui-body { grid-template-columns: 1fr; }
  .ui-side { display: none; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .feed td.agent, .feed td.when { display: none; }
  .flow { grid-template-columns: 1fr; padding: 16px; gap: 20px; }
  .flow-out { grid-template-columns: 1fr; }
  .flow-in { display: grid; grid-template-columns: 1fr 1fr; }
  .flow-in .flow-label { grid-column: 1 / -1; }
  .stage { height: 420px; }
}
@media (max-width: 600px) {
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .cell-grid.three, .cell-grid.four, .agents-grid, .dark-grid, .tl-steps, .footer-grid { grid-template-columns: 1fr; }
  .flow-in { grid-template-columns: 1fr; }
  .feed td.id { display: none; }
  .feedback-note { position: static; max-width: none; margin-top: 12px; }
  .tray { flex-direction: column; align-items: stretch; padding: 12px; }
  .tray .tray-actions .btn { flex: 1; }
  .modal .row { grid-template-columns: 1fr; }
  .rotator .rot-word { white-space: normal; }
  .hero-actions .btn, .cta .actions .btn { white-space: normal; height: auto; padding: 10px 14px; text-align: center; }
  .stage { height: 360px; margin-top: 32px; }
  .banner { font-size: 0.72rem; }
  .pill-link { white-space: normal; text-align: center; border-radius: 14px; }
  .ui-top .muted, .ui-top .right .ui-chip:not(.live) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ═══════════ Scroll-driven motion (Attio behaviour) ═══════════ */
/* Hero. Default: finished composition (works in any frame). With .pin-hero on <html>: pinned scroll sequence. */
.hero-pin { position: relative; --p: 1; --nav: 64px; }
.hero-sticky { position: relative; overflow: hidden; padding-bottom: 0; }
.hero-wash { position: absolute; inset: 0; background: linear-gradient(180deg, #fff 0%, #fff 38%, #e4ebfb 70%, #cfdbf8 100%); opacity: 1; z-index: 0; }
.hero-pin .hero-inner { position: relative; z-index: 2; padding-top: clamp(40px, 6vh, 80px); }
.scene { position: relative; width: min(1560px, 100%); height: 560px; margin: 40px auto 0; z-index: 1; }
.scene .shot-main { position: absolute; left: 50%; top: 0; width: min(1000px, calc(100% - 2 * var(--gutter-l))); height: 100%; transform: translateX(-50%); transform-origin: top center; z-index: 3; }
.sat { position: absolute; width: 290px; z-index: 2; opacity: 1; }
.sat .ui-pad { padding: 12px; }
.sat-a { left: 1.5%; top: 8%; z-index: 4; }
.sat-b { left: 3%; top: 54%; width: 320px; z-index: 5; }
.sat-c { right: 1.5%; top: 4%; z-index: 4; }
.sat-d { right: 3%; top: 56%; z-index: 5; }
.pin-hero .hero-pin { height: 210vh; }
.pin-hero .hero-sticky { position: sticky; top: var(--nav); height: calc(100vh - var(--nav)); }
.pin-hero .hero-wash { opacity: calc(0.35 + var(--p) * 0.65); }
.pin-hero .hero-pin .hero-inner { opacity: calc(1 - min(1, var(--p) * 3.2)); transform: translateY(calc(var(--p) * -50px)); }
.pin-hero .scene { position: absolute; left: 50%; top: calc(64% - max(0, var(--p) - 0.08) * 56%); height: 72vh; margin: 0; transform: translateX(-50%); }
.pin-hero .scene .shot-main { transform: translateX(-50%) scale(calc(1 + var(--p) * 0.06)); }
.pin-hero .sat { opacity: var(--p); }
.pin-hero .sat-a { transform: translate(calc((1 - var(--p)) * -70vw), 0); }
.pin-hero .sat-b { transform: translate(calc((1 - var(--p)) * -50vw), calc((1 - var(--p)) * 40vh)); }
.pin-hero .sat-c { transform: translate(calc((1 - var(--p)) * 70vw), 0); }
.pin-hero .sat-d { transform: translate(calc((1 - var(--p)) * 50vw), calc((1 - var(--p)) * 40vh)); }
.term { background: #141517; color: #d6d7db; border-color: #2a2b30; font-family: var(--mono); font-size: 0.7rem; }
.term .ui-top { border-bottom-color: #2a2b30; color: #d6d7db; font-family: var(--font); }
.term .ui-top .dots i { background: #3a3b41; }
.term .ln { padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.term .ln b { color: #7aa2ff; font-weight: 500; margin-right: 4px; }
.term .ln.dim { color: #7c7e86; padding-left: 14px; }
.term .ln.ok { color: #6ee7a0; padding-left: 14px; }
.term .ln.warn { color: #f5b14c; padding-left: 14px; }
.record.small { grid-template-columns: 80px 1fr; gap: 6px 10px; font-size: 0.74rem; }
.record.small dd { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .sat { display: none; } .scene { height: 480px; } .scene .shot-main { width: 100%; left: 0; transform: none; } }
@media (max-width: 600px) { .scene { height: 400px; margin-top: 28px; } }

/* Logo grid cells: corner arrow */
.logo-grid span { position: relative; }
.logo-grid span::after { content: "↗"; position: absolute; top: 6px; right: 8px; font-size: 0.7rem; color: var(--muted-2); opacity: 0; transition: opacity .2s; }
.logo-grid span:hover { background: var(--bg-2); }
.logo-grid span:hover::after { opacity: 1; }

/* Platform: sticky nav + stacked blocks */
.plat { border-top: 1px solid var(--border); background: var(--bg-2); }
.plat-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); padding-left: 0; padding-right: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.plat-nav { position: sticky; top: calc(64px + 24px); align-self: start; display: flex; flex-direction: column; gap: 2px; padding: 40px 24px; }
.plat-tab { text-align: left; padding: 8px 14px; border-left: 2px solid transparent; color: var(--muted-2); font-weight: 500; font-size: 0.95rem; transition: color .25s, border-color .25s; display: flex; flex-direction: column; gap: 2px; }
.plat-tab small { font-size: 0.78rem; font-weight: 400; color: var(--muted); display: none; }
.plat-tab.on { color: var(--fg); border-left-color: var(--fg); }
.plat-tab.on small { display: block; }
.plat-blocks { border-left: 1px solid var(--border); }
.plat-block { padding: 56px 40px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.plat-block:first-child { border-top: 0; }
.plat-head h3 { max-width: 46ch; font-size: 1.3rem; }
.plat-ui .ui { border: 1px solid var(--border-2); border-radius: 12px; background: #fff; box-shadow: 0 12px 40px rgba(30,50,110,0.08); padding: 18px; font-size: 0.8rem; overflow-x: auto; min-width: 0; }
.plat-ui .ui-table { min-width: 560px; }
.plat-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border-top: 1px solid var(--border); margin: 0 -40px; }
.plat-sub-cell { background: var(--bg-2); padding: 28px 40px 36px; display: flex; flex-direction: column; gap: 6px; }
.plat-sub-cell b { font-weight: 500; font-size: 1rem; }
.plat-sub-cell p { color: var(--muted); font-size: 0.92rem; }
/* per-block entrance when the mock scrolls into view */
.plat-ui .ui-table tbody tr, .plat-ui .msg, .plat-ui .record dt, .plat-ui .record dd { opacity: 0; transform: translateY(8px); }
.plat-ui.in .ui-table tbody tr, .plat-ui.in .msg, .plat-ui.in .record dt, .plat-ui.in .record dd { animation: rowin .5s cubic-bezier(.2,.8,.2,1) forwards; }
.plat-ui.in .ui-table tbody tr:nth-child(2), .plat-ui.in .msg:nth-child(2), .plat-ui.in .record :nth-child(3), .plat-ui.in .record :nth-child(4) { animation-delay: .12s; }
.plat-ui.in .ui-table tbody tr:nth-child(3), .plat-ui.in .msg:nth-child(3), .plat-ui.in .record :nth-child(5), .plat-ui.in .record :nth-child(6) { animation-delay: .24s; }
.plat-ui.in .ui-table tbody tr:nth-child(4), .plat-ui.in .record :nth-child(7), .plat-ui.in .record :nth-child(8) { animation-delay: .36s; }
.plat-ui.in .ui-table tbody tr:nth-child(5), .plat-ui.in .record :nth-child(9), .plat-ui.in .record :nth-child(10) { animation-delay: .48s; }
.plat-ui.in .record :nth-child(11), .plat-ui.in .record :nth-child(12) { animation-delay: .6s; }
.plat-ui.in .mini-bar i { width: var(--w, 50%); transition-delay: .6s; }
@keyframes rowin { to { opacity: 1; transform: none; } }

/* Dark: horizon arc + huge title + tile marquee */
.horizon { position: relative; height: 300px; overflow: hidden; margin-bottom: -60px; }
.horizon-arc { position: absolute; left: 50%; top: 110px; width: 260vw; height: 260vw; max-width: 4200px; max-height: 4200px; transform: translateX(-50%); border-radius: 50%; background: var(--dark); box-shadow: 0 -2px 0 0 rgba(255,255,255,0.18), 0 -40px 120px -20px rgba(79,125,240,0.55), 0 -8px 40px -4px rgba(255,140,80,0.35); }
.horizon::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 100%, rgba(79,125,240,0.18), transparent 70%); }
.dark-title { text-align: center; margin: 0 auto 64px; display: flex; flex-direction: column; gap: 14px; align-items: center; position: relative; z-index: 1; }
.dark-title .caption { color: var(--dark-muted); }
.huge { font-size: clamp(2.6rem, 7vw, 6rem); font-weight: 600; letter-spacing: -0.03em; line-height: 0.98; }
.connect { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 96px; }
.connect .eyebrow { align-self: center; }
.connect h2 { max-width: 30ch; }
.tile-marquee { margin-top: 40px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.tile-track { display: flex; gap: 12px; width: max-content; animation: marquee 50s linear infinite; }
.tile-track span { width: 128px; height: 88px; border-radius: 16px; background: #17181b; border: 1px solid var(--dark-border); display: grid; place-items: center; font-weight: 500; font-size: 0.85rem; color: #e6e7ea; text-align: center; padding: 0 10px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Statement: serif word reveal */
.statement { padding-top: clamp(80px, 10vw, 140px); padding-bottom: clamp(80px, 10vw, 140px); background: var(--bg); background-image: linear-gradient(#f1f2f4 1px, transparent 1px), linear-gradient(90deg, #f1f2f4 1px, transparent 1px); background-size: 48px 48px; background-position: center; border-bottom: 1px solid var(--border); }
.serif-statement { font-family: "Newsreader", Georgia, "Times New Roman", serif; font-size: clamp(1.6rem, 3.4vw, 2.7rem); line-height: 1.25; letter-spacing: -0.01em; max-width: 26ch; margin: 0 auto; text-align: center; font-weight: 400; }
.serif-statement .w { color: var(--muted-2); transition: color .25s; }
.serif-statement .w.on { color: var(--fg); }

/* Proof: stats + curve */
.proof { position: relative; overflow: hidden; }
.proof .curve { position: absolute; right: 0; bottom: 0; width: 62%; height: 100%; z-index: 0; }
.proof .wrap { position: relative; z-index: 1; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); gap: 28px 40px; }
.stat-cell { border-left: 2px solid var(--accent); padding-left: 14px; display: flex; flex-direction: column; gap: 4px; }
.stat-cell b { font-size: clamp(1.8rem, 2.6vw, 2.3rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-cell > span { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 1024px) {
  .plat-grid { grid-template-columns: minmax(0, 1fr); border-left: 0; border-right: 0; }
  .plat-nav, .plat-blocks { min-width: 0; }
  .plat-nav { position: sticky; top: 64px; z-index: 5; flex-direction: row; overflow-x: auto; gap: 6px; padding: 12px var(--gutter-l); background: rgba(247,247,248,0.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
  .plat-tab { white-space: nowrap; border-left: 0; border-bottom: 2px solid transparent; padding: 8px 10px; }
  .plat-tab.on { border-bottom-color: var(--fg); }
  .plat-tab small { display: none !important; }
  .plat-blocks { border-left: 0; }
  .plat-block { padding: 40px var(--gutter-l) 0 var(--gutter-r); }
  .plat-sub { margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); }
  .plat-sub-cell { padding: 24px var(--gutter-l) 32px; }
  .proof .curve { width: 100%; opacity: .5; }
  .sat { width: 240px; }
}
@media (max-width: 860px) {
  .plat-sub { grid-template-columns: 1fr; }
  .horizon { height: 160px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: 1fr; }
  .serif-statement { max-width: none; }
}

/* ═══════════ Smoothing (kept) ═══════════ */
.js .reveal { transition-duration: .9s; }
.scene, .scene .shot-main, .sat, .hero-pin .hero-inner, .hero-wash { will-change: transform, opacity; }
.rotator .rot-word { transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.node { transition: border-color .5s, background .5s, box-shadow .5s; }
.chat-card { transition: transform .6s cubic-bezier(.2,.8,.2,1), opacity .6s; }
.tl-track i { transition-duration: 3s; }
.serif-statement .w { transition: color .5s; }

/* ═══════════ Platform switcher. Default: fixed-height box, panels crossfade (timer + click). With .pin-plat: pinned to scroll. ═══════════ */
.plat-pin { position: relative; --pp: 0; }
.plat-sticky { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.plat-sticky .plat-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); padding-left: 0; padding-right: 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
.plat-sticky .plat-nav { position: static; padding: 44px 24px; display: flex; flex-direction: column; gap: 2px; justify-content: flex-start; }
.plat-tab { position: relative; text-align: left; padding: 9px 14px; border-left: 0; color: var(--muted-2); font-weight: 500; font-size: 0.95rem; transition: color .35s; display: flex; flex-direction: column; gap: 2px; }
.plat-tab .bar { position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--border-2); border-radius: 2px; overflow: hidden; }
.plat-tab .bar i { display: block; width: 100%; height: 0; background: var(--fg); }
.plat-tab small { font-size: 0.78rem; font-weight: 400; color: var(--muted); display: none; }
.plat-tab.on { color: var(--fg); }
.plat-tab.on small { display: block; }
.plat-panels { position: relative; min-height: 640px; border-left: 1px solid var(--border); }
.plat-panel { position: absolute; inset: 0; padding: 40px 40px 0; display: flex; flex-direction: column; gap: 22px; opacity: 0; transform: translateY(36px); transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .6s cubic-bezier(.2,.8,.2,1); pointer-events: none; will-change: transform, opacity; }
.plat-panel.on { opacity: 1; transform: none; pointer-events: auto; }
.plat-panel.before { transform: translateY(-36px); }
.plat-panel .plat-ui { flex: 1; min-height: 0; display: flex; align-items: center; }
.plat-panel .plat-ui .ui { width: 100%; max-height: 100%; overflow: auto; }
.plat-panel .plat-sub { margin: 0 -40px; }
.pin-plat .plat-pin { height: calc(6 * 80vh + 100vh); }
.pin-plat .plat-sticky { position: sticky; top: 64px; height: calc(100vh - 64px); overflow: hidden; }
.pin-plat .plat-sticky .plat-grid { height: 100%; }
.pin-plat .plat-sticky .plat-nav { height: 100%; }
.pin-plat .plat-panels { height: 100%; min-height: 0; }
@media (max-width: 1024px) {
  .plat-sticky .plat-grid { grid-template-columns: minmax(0, 1fr); border-left: 0; border-right: 0; }
  .plat-sticky .plat-nav { display: none; }
  .plat-panels { min-height: 0; border-left: 0; }
  .plat-panel { position: relative; opacity: 1; transform: none; pointer-events: auto; padding: 40px var(--gutter-r) 0 var(--gutter-l); border-top: 1px solid var(--border); }
  .plat-panel.before { transform: none; }
  .plat-panel .plat-ui .ui { max-height: none; }
  .plat-panel .plat-sub { margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); }
}
@media (max-height: 760px) and (min-width: 1025px) { .plat-panel { padding-top: 24px; gap: 14px; } .plat-head h3 { font-size: 1.1rem; } .plat-sub-cell { padding: 16px 40px 20px; } }

/* ═══════════ Live dashboard + micro-interactions ═══════════ */
.feed tr.row-in { animation: rowdrop .6s cubic-bezier(.2,.8,.2,1); }
.feed tr.row-in td { animation: rowflash 3s ease-out forwards; }
.feed tr.row-out { animation: rowout .4s ease-in forwards; }
@keyframes rowdrop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes rowflash { from { background: var(--accent-bg); } to { background: transparent; } }
@keyframes rowout { to { opacity: 0; height: 0; } }
.status { transition: background .35s, color .35s; }
.status.swap { animation: statpop .5s cubic-bezier(.2,.9,.3,1.3); }
@keyframes statpop { 0% { transform: scale(.85); } 100% { transform: none; } }
.kpi b.tick, .brief-line b.tick { animation: kpitick 1.6s cubic-bezier(.2,.8,.2,1); }
@keyframes kpitick { 0% { transform: translateY(6px); opacity: 0; color: var(--accent); } 30% { transform: none; opacity: 1; color: var(--accent); } 100% { color: inherit; } }
.ui-chip.live::before { animation: blink 1.6s infinite; }
.wa { animation: none; }
.wa.wa-in { animation: rowdrop .6s cubic-bezier(.2,.8,.2,1); }
.wa.typing { color: var(--muted); }
.wa .dots3 { display: inline-flex; gap: 3px; }
.wa .dots3 i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-2); animation: bounce 1s infinite; }
.wa .dots3 i:nth-child(2) { animation-delay: .15s } .wa .dots3 i:nth-child(3) { animation-delay: .3s }
@keyframes bounce { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-3px); opacity: 1; } }
#waFeed .wa + .wa { margin-top: 8px; }
.sat-b .ui-pad { min-height: 236px; }
.term .ln.typing::after { content: "▍"; color: #7aa2ff; animation: blink 1s infinite; }
/* buttons + cards */
/* flow packets with a trail */
.flow-lines .pkt { filter: drop-shadow(0 0 4px rgba(47,95,217,0.6)); }
.flow-lines .trail { fill: var(--accent); opacity: .35; }
/* rotator: softer */
/* reveal: gentler lift */


/* ── Catalogue on phones: one-row scrolling filters, full-width search ── */
@media (max-width: 640px) {
  .toolbar { padding-top: 10px; padding-bottom: 10px; }
  .toolbar-row { flex-wrap: wrap; gap: 8px; }
  .toolbar-row .chips { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
  .toolbar-row .chips::-webkit-scrollbar { display: none; }
  .toolbar-row .chip { flex: none; white-space: nowrap; }
  .search { flex: 1 1 auto; min-width: 0; height: 40px; }
  .search input { font-size: 16px; } /* prevents iOS zoom-on-focus */
  .count { display: none; }
  .agent-card { padding: 16px; }
}
@media (max-width: 640px) { .page-head .section-head h2 { font-size: clamp(1.6rem, 7vw, 2rem); } }
