html, body { margin: 0; min-height: 100%; }
body {
  background: var(--wall-b);
  color: var(--text);
  font-family: var(--font);
  overflow-x: hidden;
}
html body { background-color: var(--wall-b); }
.lp-page { position: relative; overflow-x: clip; }

:root {
  --lp-shell: 1240px;
  --lp-section-gap: clamp(88px, 11vw, 148px);
}

/* ── Grid background ── */
.lp-grid {
  position: fixed; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 84%);
  opacity: .28;
}
.lp-shell {
  width: min(calc(100% - 40px), var(--lp-shell));
  margin: 0 auto;
}

/* ── Header ── */
.lp-header {
  position: sticky; top: 0; z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px; align-items: center;
  width: min(calc(100% - 40px), var(--lp-shell));
  margin: 0 auto;
  padding: 14px 0;
}
.lp-logo, .lp-nav { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.lp-logo {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  color: var(--text); text-decoration: none;
  font-weight: 700; letter-spacing: .02em;
  background: color-mix(in srgb, var(--glass) 85%, transparent);
  border: 1px solid rgba(255,255,255,.08);
}
.lp-logo-mark {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,.04));
  color: var(--accent); flex: none;
}
.lp-logo-mark svg { width: 18px; height: 18px; }
.lp-logo-name { font-size: 14px; }
.lp-nav {
  display: inline-flex; align-items: center; justify-self: center;
  gap: 2px; padding: 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--glass) 85%, transparent);
  border: 1px solid rgba(255,255,255,.08);
}
.lp-nav a {
  color: var(--text-2); text-decoration: none; font-size: 13px;
  padding: 8px 12px; border-radius: 999px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lp-nav a:hover { background: var(--fill); color: var(--text); }
.lp-login {
  display: inline-flex; align-items: center;
  height: 42px; padding: 0 18px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 600 13px/1 var(--font); text-decoration: none; white-space: nowrap;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.lp-login:hover { background: var(--accent-press); }
.lp-login-short { display: none; }

/* ── Kicker / buttons ── */
.lp-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font: 600 12px/1 var(--font);
  letter-spacing: .08em; text-transform: uppercase;
}
.lp-kicker::before { content:''; width:22px; height:1px; background:currentColor; opacity:.7; }
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  font: 600 14px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.lp-btn:hover { transform: translateY(-1px); }
.lp-btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 26%, transparent); }
.lp-btn--primary:hover { background: var(--accent-press); }
.lp-btn--ghost { color: var(--text); background: var(--fill); border: 1px solid var(--separator); }
.lp-btn--ghost:hover { background: var(--fill-hover); }

/* ── HERO ── */
main { padding-bottom: 60px; }
.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(480px, .96fr);
  gap: clamp(28px, 4vw, 58px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: 28px 0 20px;
}
.lp-title {
  margin: 16px 0 14px;
  font-size: clamp(34px, 4.8vw, 60px);
  line-height: .97; letter-spacing: -.05em; max-width: 12ch;
}
.lp-lead {
  margin: 0; max-width: 600px;
  color: var(--text-2); font-size: clamp(15px, 1.7vw, 18px); line-height: 1.65;
}
.lp-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.lp-proof { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.lp-proof span {
  display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--separator);
  background: color-mix(in srgb, var(--glass) 80%, transparent);
  color: var(--text-2); font-size: 12px;
}
.lp-hero-visual { position: relative; }
/* Transparent stage — the pipeline preview floats free (can bleed out;
   body's overflow-x:hidden keeps the page from gaining width). */
.lp-hero-stage {
  position: relative; min-height: 420px;
  overflow: visible; padding: 0;
  background: transparent; border: 0;
}
/* Fixed-size canvas, always centered in the stage regardless of its width */
.lp-hero-canvas {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 640px; height: 360px;
}
.lp-hero-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; overflow: visible; z-index: 1;
}

/* ── Shared node ── */
.hero-node, .pipeline-node {
  position: absolute;
  border-radius: 20px; padding: 14px;
  box-sizing: border-box;
  z-index: 2;
  background: rgba(16,17,22,.92);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 18px 36px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.04);
}
.hero-node { width: 176px; min-height: 116px; }
.pipeline-node { width: 240px; min-height: 140px; }

.hero-node__head, .pipeline-node__head {
  display: flex; align-items: center; gap: 9px;
  color: var(--text); font: 600 13px/1.2 var(--font);
}
.hero-node__icon svg,
.pipeline-node__head span svg,
.lp-card-icon svg { width: 60%; height: 60%; display: block; }
.hero-node__icon, .pipeline-node__head span {
  width: 26px; height: 26px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent) 16%, rgba(255,255,255,.04));
  color: var(--accent); font-size: 13px; flex: none;
}
.pipeline-node__head span { width: 30px; height: 30px; border-radius: 11px; font-size: 15px; }
.hero-node__body, .pipeline-node__body {
  display: grid; gap: 7px; margin-top: 12px;
}
.hero-row, .pipeline-node__body i {
  display: block; height: 9px; border-radius: 999px;
  background: rgba(255,255,255,.07);
}
.hero-row--strong { background: rgba(255,255,255,.11); }
.hero-row--short, .pipeline-node__body i.s { width: 55%; }
.hero-pill {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px;
  border-radius: 999px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06); color: var(--text-2); font: 500 11px/1 var(--font);
}
.hero-node__body .hero-pill + .hero-pill { margin-left: 5px; }
.pipeline-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pipeline-tags b {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px;
  border-radius: 999px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06); color: var(--text-2); font: 500 11px/1 var(--font);
}

/* ── Sockets ── */
.hero-socket, .pipeline-dot {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: var(--node-ring);
  border: 2px solid color-mix(in srgb, var(--accent) 65%, white);
  box-shadow: 0 0 0 4px rgba(0,122,255,.09); z-index: 3;
}
/* Hero: all sockets vertically centered at 50% */
.hero-socket--in  { left: -6px;  top: 50%; transform: translateY(-50%); }
.hero-socket--out { right: -6px; top: 50%; transform: translateY(-50%); }
/* Pipeline sockets */
.pd-in   { left: -6px;  top: 50%; transform: translateY(-50%); }
.pd-out  { right: -6px; top: 50%; transform: translateY(-50%); }
.pd-out-t { right: -6px; top: 32%; transform: translateY(-50%); }
.pd-out-b { right: -6px; top: 68%; transform: translateY(-50%); }

/* ── Hero node positions (simple left-right layout, no crossing) ── */
/*  Row 1: Trigger → Normalize → Deliver
    Row 2:            Data → Agent (branch from Normalize)
    Normalize has single out connecting to both via JS  */
.hero-node--trigger   { left: 8px;   top: 30px; }
.hero-node--normalize { left: 232px; top: 30px; }
.hero-node--deliver   { left: 456px; top: 30px; }
.hero-node--data      { left: 232px; top: 214px; }
.hero-node--agent     { left: 456px; top: 214px; }

/* ── SECTION shared ── */
.lp-section { padding-top: var(--lp-section-gap); }
.lp-section-head { max-width: 820px; margin-bottom: 28px; }
.lp-section-head h2, .lp-core-copy h2, .lp-cta-card h2 {
  margin: 14px 0 10px;
  font-size: clamp(26px, 3.8vw, 44px);
  line-height: 1.04; letter-spacing: -.044em;
}
.lp-section-head p, .lp-core-copy p, .lp-cta-card p {
  margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.75; max-width: 740px;
}

/* ── About cards ── */
.lp-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.lp-card {
  padding: 20px; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.07);
  background: color-mix(in srgb, var(--glass) 84%, transparent);
}
.lp-card-icon {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px;
  background: color-mix(in srgb, var(--accent) 14%, rgba(255,255,255,.04));
  color: var(--accent); font-size: 16px;
}
.lp-card h3 { margin: 14px 0 7px; font-size: 17px; letter-spacing: -.03em; }
.lp-card p  { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.72; }

/* ════════════════════════════════════════════
   PIPELINE SECTION
   Layout:
   - Full-width section, no shell constraint
   - Left 38%: steps (shifted from edge ~8%)
   - Right 62%: sticky pipeline canvas
   ════════════════════════════════════════════ */
.lp-pipeline-section { padding-top: var(--lp-section-gap); }
.lp-pipeline-section .lp-shell { margin-bottom: 40px; }

.lp-pipeline-wrap {
      position: relative;
      min-height: 280vh;
    }

/* Left column: steps */
.lp-steps-col {
      position: sticky;
      top: 0;
      /* left column: float left inside the wrap */
      float: left;
      width: 42%;
      height: 100vh;
      z-index: 6;
      pointer-events: none;
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 0 6% 0 8%;
      box-sizing: border-box;
    }
.lp-step {
      display: grid;
      grid-template-columns: 80px 1fr;
      gap: 16px;
      align-items: start;
      padding: 28px 0;
      opacity: .14;
      transition: opacity .45s ease;
      pointer-events: auto;
    }
.lp-step.is-active { opacity: 1; }
.lp-step-num {
  color: color-mix(in srgb, var(--accent) 90%, white);
  font: 700 clamp(40px, 5.5vw, 64px)/.88 var(--font);
  letter-spacing: -.07em;
}
.lp-step h3 { margin: 4px 0 9px; font-size: 22px; letter-spacing: -.03em; }
.lp-step p  { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.72; }

/* Right column: sticky pipeline stage */
.lp-pipeline-stage {
      position: sticky;
      top: 0;
      height: 100vh;
      /* overflows from right side of steps column */
      margin-left: 42%;
      overflow: hidden;
      z-index: 5;
      /* fade only left edge */
      mask-image: linear-gradient(to right, transparent 0%, black 6%, black 100%);
      -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 100%);
    }

/* The inner canvas that pans horizontally */
.pipeline-inner {
  position: absolute;
  inset: 0;
  /* wider canvas: 5 columns × ~280px + padding */
  width: 2200px;
  will-change: transform;
}
.pipeline-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; overflow: visible; z-index: 1;
}

/* ── Pipeline node layout (no crossing):
   Linear chain with one side-branch
   Row 1 (y=50vh-130): n1 → n2 → n3 → n5 → n7
   Row 2 (y=50vh+30):               n4 → n6
   Branch: n3 out-t→n5, n3 out-b→n4 ── */
.pn-1 { left: 60px;   top: calc(50vh - 160px); }
.pn-2 { left: 360px;  top: calc(50vh - 160px); }
.pn-3 { left: 660px;  top: calc(50vh - 160px); }
.pn-4 { left: 960px;  top: calc(50vh + 80px); }
.pn-5 { left: 960px;  top: calc(50vh - 160px); }
.pn-6 { left: 1260px; top: calc(50vh + 80px); }
.pn-7 { left: 1560px; top: calc(50vh - 40px); }

/* ── Capabilities ── */
.lp-cap-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.lp-cap {
  padding: 20px; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.07);
  background: color-mix(in srgb, var(--glass) 84%, transparent);
}
.lp-cap-top { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.lp-cap-top h3, .lp-cap h3 { margin: 0 0 10px; font-size: 17px; letter-spacing: -.03em; }
.lp-cap p { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.72; }
.lp-badge {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px;
  border-radius: 999px; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent); font: 700 10px/1 var(--font); letter-spacing: .06em; text-transform: uppercase;
}
.lp-badge--future { background: rgba(255,255,255,.07); color: var(--text-2); }

/* ── Arch strip ── */
.lp-core-strip { display: grid; grid-template-columns: minmax(0,1.06fr) minmax(300px,.94fr); gap: 18px; align-items: start; }
.lp-core-metrics { display: grid; gap: 12px; }
.lp-metric {
  padding: 18px 20px; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.07);
  background: color-mix(in srgb, var(--glass) 84%, transparent);
}
.lp-metric strong { display: block; margin-bottom: 7px; font-size: 17px; letter-spacing: -.03em; }
.lp-metric span   { color: var(--text-2); font-size: 13px; line-height: 1.68; }

/* ── Developers ── */
.lp-dev-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,.82fr); gap: 16px; align-items: start; }
.lp-dev-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.lp-dev {
  padding: 20px; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.07);
  background: color-mix(in srgb, var(--glass) 84%, transparent);
}
.lp-dev h3 { margin: 0 0 8px; font-size: 17px; letter-spacing: -.03em; }
.lp-dev p  { margin: 0; color: var(--text-2); font-size: 13px; line-height: 1.72; }
.lp-dev-code {
  border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(10,11,14,.72);
}
.lp-code-dots { display: flex; gap: 6px; padding: 12px 14px 8px; }
.lp-code-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.12); }
.lp-code-dots span:nth-child(1) { background: rgba(255,96,88,.55); }
.lp-code-dots span:nth-child(2) { background: rgba(255,189,46,.45); }
.lp-code-dots span:nth-child(3) { background: rgba(40,200,64,.38); }
.lp-code {
  margin: 0; padding: 0 16px 18px;
  font: 400 12px/1.72 "SF Mono","Fira Code","Consolas",monospace;
  white-space: pre; overflow: hidden;
  color: rgba(255,255,255,.55);
}
.c-com { color: rgba(255,255,255,.28); }
.c-kw  { color: #79b8ff; }
.c-str { color: #9ecbff; }
.c-fn  { color: #b392f0; }
.c-var { color: #e1e4e8; }
.c-op  { color: rgba(255,255,255,.4); }

/* ── CTA ── */
.lp-cta { padding-bottom: 80px; }
.lp-cta-card {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  gap: 24px; align-items: center; padding: 28px; border-radius: 28px;
  border: 1px solid rgba(255,255,255,.07);
  background: color-mix(in srgb, var(--glass) 84%, transparent);
}
.lp-cta-card h2 { font-size: clamp(22px, 3vw, 34px) !important; letter-spacing: -.04em; }
.lp-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ── Responsive ── */
@media (max-width: 1180px) {
  .lp-hero, .lp-core-strip, .lp-dev-layout { grid-template-columns: 1fr; }
  .lp-feature-grid, .lp-cap-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
  /* Pipeline keeps its desktop split-layout down to the mobile breakpoint. */
}

@media (max-width: 820px) {
  /* ── Header: compact single row (logo · login), nav hidden ── */
  .lp-header {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 0 10px;
  }
  .lp-nav { display: none; }
  .lp-login {
    justify-self: end;
    height: 40px; padding: 0 15px;
    font-size: 12px;
  }
  .lp-login-full { display: none; }
  .lp-login-short { display: inline; }

  .lp-title { max-width: none; }
  .lp-feature-grid, .lp-cap-list, .lp-dev-grid, .lp-cta-card { grid-template-columns: 1fr; }
  .lp-cta-actions { justify-content: flex-start; }
  .lp-hero-stage { min-height: 360px; }

  /* ════════════════════════════════════════════════════════════
     PIPELINE — mobile
     JS wraps the canvas + steps into a single sticky pin layer
     (.lp-pin-m). A single sticky child pins reliably; both inner
     layers are absolutely positioned and overlap. The canvas is
     centered; steps ride a bottom "carousel" — one slides in from
     the right, dwells, then leaves left as the next arrives.
     ════════════════════════════════════════════════════════════ */
  .lp-pipeline-section .lp-shell { margin-bottom: 24px; }

  .lp-pipeline-wrap { min-height: 300vh; }

  .lp-steps-col {
    float: none;
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 6; pointer-events: none;
    display: block;
    padding: 0;
  }

  .lp-pipeline-stage {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    margin: 0;
    z-index: 5;
    /* symmetric edge fade so the centered node stays crisp */
    mask-image: linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 13%, #000 87%, transparent 100%);
  }
  .pipeline-inner { width: 1900px; }

  /* Smaller nodes + tighter vertical clustering (upper-center) */
  .pipeline-node { width: 210px; min-height: 112px; padding: 12px; border-radius: 18px; }
  .pn-1, .pn-2, .pn-3, .pn-5 { top: calc(43vh - 150px); }
  .pn-4, .pn-6            { top: calc(43vh + 10px); }
  .pn-7                   { top: calc(43vh - 70px); }

  /* Steps: same look as desktop (number + text, no box),
     but pinned to the bottom and sliding one at a time */
  .lp-step {
    position: absolute; left: 0; right: 0; bottom: 40px;
    width: min(100% - 40px, 520px);
    margin-inline: auto;
    grid-template-columns: 64px 1fr;
    gap: 14px; align-items: center;
    padding: 0;
    opacity: 0;
    transform: translateX(60%);
    transition: transform .55s cubic-bezier(.22,.61,.36,1), opacity .4s ease;
    pointer-events: none;
  }
  .lp-step.is-active { opacity: 1; transform: translateX(0); }
  .lp-step.is-past   { opacity: 0; transform: translateX(-60%); }
  .lp-step-num { font-size: clamp(40px, 13vw, 56px); }
  .lp-step h3  { margin: 0 0 7px; font-size: 20px; }
  .lp-step p   { font-size: 13.5px; line-height: 1.62; }
}

/* Mobile pipeline pin layer (created by landing.js on mobile) */
.lp-pin-m {
  position: sticky; top: 0;
  width: 100%; height: 100vh;
  overflow: hidden;
  z-index: 5;
}


/* ============================================================
   Metis Landing — animations & interactions
   ============================================================ */