/* Network: landing page */
:root { --container: 1120px; --rails: 1320px; --band: #e9e9ec; scroll-padding-top: 84px; }
:root[data-theme="dark"] { --band: #111114; }

.page { position: relative; overflow-x: clip; }
/* thin vertical guide rails, like the reference */
.page::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  margin: 0 auto; max-width: var(--rails);
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
}
.container { position: relative; z-index: 1; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; height: 68px; gap: 40px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 21px; letter-spacing: -0.035em; }
.brand .logo { color: var(--text); }
/* left-aligned text links next to the logo, full-width mega menu below */
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: 5px; height: 68px; padding: 0; border: 0;
  background: none; color: var(--text); font-size: 15.5px; font-weight: 500; cursor: pointer;
}
.nav-link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 18px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-link:hover::after, .dd.open > .nav-link::after { transform: scaleX(1); }
.nav-link .icon { transition: transform .25s var(--ease); }
.dd.open > .nav-link .icon { transform: rotate(180deg); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-burger { display: none; }

.mega {
  position: fixed; left: 0; right: 0; top: 68px; z-index: 49;
  background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .18);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.dd.open .mega { opacity: 1; visibility: visible; transform: none; }
.mega-inner { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding: 30px 24px 36px; }
.mega-col h5 { margin: 0 0 14px; font-size: 14px; font-weight: 500; color: var(--muted); }
.mega-col a { display: flex; align-items: center; gap: 6px; width: fit-content; padding: 6px 0; font-size: 17px; font-weight: 500; color: var(--text); }
.mega-col a .icon { color: var(--muted); }
.mega-col a span.tag { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.mega-col a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.dd.open .mega-col { animation: rise .35s var(--ease) both; }
.dd.open .mega-col:nth-child(2) { animation-delay: .04s; }
.dd.open .mega-col:nth-child(3) { animation-delay: .08s; }
/* the page behind an open menu gets blurred */
.nav-scrim { position: fixed; inset: 68px 0 0; z-index: 48; background: color-mix(in srgb, var(--bg) 35%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; visibility: hidden; transition: opacity .22s var(--ease), visibility .22s; }
.nav-scrim.on { opacity: 1; visibility: visible; }

/* mobile sheet */
.sheet { display: none; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 84px 0 150px; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--bg-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 75px 75px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 72% 40%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 55% 70% at 72% 40%, #000 25%, transparent 75%);
}
.hero-row { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 48px; align-items: center; }
.eyebrow-caps { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); }
.hero h1 { margin-top: 22px; font-size: clamp(40px, 5vw, 62px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.02; min-height: 2.04em; }
.hero .lead { max-width: 520px; margin-top: 26px; font-size: clamp(16px, 1.5vw, 18.5px); line-height: 1.6; color: var(--muted); }
.hero-cta { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.hero .hero-cta { justify-content: flex-start; gap: 26px; margin-top: 36px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 15.5px; font-weight: 600; color: var(--text); }
.text-link .icon { transition: transform .2s var(--ease); }
.text-link:hover .icon { transform: translate(2px, -2px); }
/* gradient word + typing caret */
.accent-word { background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.caret { display: inline-block; width: .055em; height: .86em; margin-left: .05em; vertical-align: -.06em; border-radius: 2px; background: var(--accent-b); animation: blink 1.05s steps(1) infinite; }
.caret.typing { animation: none; }
@keyframes blink { 50% { opacity: 0; } }
/* "works with" strip */
.works { margin-top: 44px; }
.works-label { font-size: 13px; font-weight: 500; color: var(--muted); }
.works-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ob-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 13.5px; font-weight: 500; color: var(--text-2); }
.ob-chip.hot { border-color: transparent; background: linear-gradient(90deg, color-mix(in srgb, var(--accent-a) 14%, var(--surface)), color-mix(in srgb, var(--accent-b) 14%, var(--surface))); color: var(--text); }
.ob-chip.hot .icon { color: var(--accent-b); }
/* page-load entrance */
.hero .eyebrow-caps { animation: rise .7s var(--ease) both; }
.hero .lead { animation: rise .8s .15s var(--ease) both; }
.hero .hero-cta { animation: rise .8s .25s var(--ease) both; }
.hero .works { animation: rise .8s .35s var(--ease) both; }
.pipe { animation: rise 1s .2s var(--ease) both; }
.showcase { animation: rise 1s .45s var(--ease) both; }

/* ---------- pipeline trace (hero side) ---------- */
.pipe { overflow: hidden; }
.pipe-head { display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.pipe-head b { font-weight: 600; }
.pipe-head .file-chip { height: 28px; font-size: 13px; }
.pipe-head .run-status { margin-left: auto; font-size: 13px; }
.pipe-stage { position: relative; aspect-ratio: 1 / 1; background-image: radial-gradient(var(--bg-grid) 1.2px, transparent 1.2px); background-size: 20px 20px; transition: opacity .45s var(--ease); }
.plabel em { font-style: normal; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.pipe-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pipe-base { fill: none; stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.pipe-line { fill: none; stroke: url(#pipe-grad); stroke-width: 3; stroke-linecap: round; }
.pipe-dot { fill: var(--accent-b); }
.pipe-glow { fill: var(--accent-b); opacity: .22; }
.pnode, .pchip { position: absolute; transform: translate(-50%, -50%); }
.pnode { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--muted); box-shadow: var(--shadow-sm); transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease); }
.pnode::after { content: ''; position: absolute; inset: -6px; border-radius: 16px; border: 2px solid var(--accent-b); opacity: 0; }
.pnode.on { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.pnode.hit { transform: translate(-50%, -50%) scale(1.12); }
.pnode.hit::after { animation: ping .7s var(--ease); }
@keyframes ping { from { opacity: .9; inset: -2px; } to { opacity: 0; inset: -14px; } }
.plabel { position: absolute; width: 30%; font-size: 12px; line-height: 1.35; opacity: .35; transition: opacity .4s var(--ease); }
.plabel.on { opacity: 1; }
.plabel.r { text-align: right; }
.plabel b { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.plabel span { display: block; margin-top: 2px; color: var(--muted); }
.plabel code { font-size: 11.5px; color: var(--accent-b); font-weight: 500; }
.pchip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font: 500 12.5px var(--mono); color: var(--text-2); white-space: nowrap; transition: border-color .35s, color .35s, box-shadow .35s; }
.pchip.on { border-color: var(--green); color: var(--green); box-shadow: 0 0 0 4px var(--green-bg); }

/* ---------- showcase band + app mockup ---------- */
.showcase { position: relative; background: var(--band); padding: 26px 0 0; }
.show-tabs-wrap {
  position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%);
  width: min(780px, 100%); height: 80px; background: var(--band); border-radius: 56px 56px 0 0;
}
.show-tabs-wrap::before, .show-tabs-wrap::after { content: ''; position: absolute; bottom: 0; width: 56px; height: 56px; }
.show-tabs-wrap::before { right: 100%; background: radial-gradient(circle at 0 0, transparent 55.5px, var(--band) 56px); }
.show-tabs-wrap::after { left: 100%; background: radial-gradient(circle at 100% 0, transparent 55.5px, var(--band) 56px); }
.show-tabs { position: absolute; left: 0; right: 0; bottom: -10px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 0 16px; }
.show-tab {
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 10px;
  border: 1px solid transparent; border-radius: 10px; background: color-mix(in srgb, var(--surface) 45%, transparent);
  color: var(--text-2); font-size: 15px; font-weight: 500; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.show-tab:hover { background: var(--surface); }
.show-tab.on { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow-sm); color: var(--text); }

.window {
  margin: 30px auto 0; max-width: 1040px; background: var(--surface); border: 1px solid var(--border);
  border-bottom: 0; border-radius: 14px 14px 0 0; box-shadow: var(--shadow-lg); overflow: hidden; text-align: left;
}
/* animated demo: paste dump -> Run -> scrambled text decodes into Luau */
.window { position: relative; }
.demo-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.demo-bar .grow { flex: 1; }
.demo-chip { opacity: 0; transform: translateX(-6px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.demo-chip.on { opacity: 1; transform: none; }
.seg-sm { padding: 2px; border-radius: 9px; }
.seg-sm button { height: 28px; padding: 0 11px; font-size: 13px; gap: 6px; border-radius: 7px; cursor: default; transition: background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease); }
#demo-run { transition: transform .15s var(--ease), background .15s; }
#demo-run.pressed { transform: scale(.92); background: var(--primary-hover); }
.demo-panes { display: grid; grid-template-columns: 1fr 1fr; height: 470px; }
.demo-pane { display: flex; flex-direction: column; min-width: 0; }
.demo-pane + .demo-pane { border-left: 1px solid var(--border); }
.demo-pane .editor-head { height: 46px; }
.demo-pane .editor-head h3 { font-size: 14px; }
.demo-actions { transition: opacity .3s var(--ease); }
.demo-actions.off { opacity: .45; }
.demo-body { position: relative; flex: 1; overflow: hidden; }
.demo-body::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.demo-body pre { position: absolute; inset: 0; margin: 0; padding: 14px 18px; font-size: 12.5px; line-height: 1.7; white-space: pre; overflow: hidden; transition: opacity .4s var(--ease); }
.demo-body pre > div { min-height: 1.7em; }
.demo-in { color: var(--muted); }
.demo-in > div { animation: line-in .28s var(--ease) both; }
@keyframes line-in { from { opacity: 0; transform: translateY(6px); } }
.demo-body .out-empty { font-size: 13.5px; transition: opacity .3s var(--ease); }
.demo-body .out-empty.off { opacity: 0; }
.scr { color: var(--faint); }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 90px; pointer-events: none; opacity: 0; background: linear-gradient(transparent, color-mix(in srgb, var(--blue) 14%, transparent) 70%, color-mix(in srgb, var(--blue) 30%, transparent)); transition: opacity .3s; }
.scan.on { opacity: 1; animation: scan 1.1s linear infinite; }
@keyframes scan { from { transform: translateY(-90px); } to { transform: translateY(470px); } }
.demo-cursor { position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none; opacity: 0; transition: transform .85s cubic-bezier(.5, 0, .2, 1), opacity .35s var(--ease); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .3)); }
.demo-cursor.click { animation: click .32s var(--ease); }
@keyframes click { 50% { scale: .78; } }
.demo-lic { height: 470px; animation: rise .4s var(--ease) both; }

.mini-lic { padding: 22px; display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.mini-lic .card { padding: 18px; }
.mini-lic .k { font-size: 13px; color: var(--muted); }
.mini-lic .v { margin-top: 4px; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: var(--text); }

/* ---------- sections ---------- */
.section { padding: 110px 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 500; letter-spacing: -0.03em; }
.section-head p { margin-top: 16px; font-size: 17px; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); overflow: hidden; }
.feature { padding: 30px 28px 32px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.feature:nth-child(3n) { border-right: 0; }
.feature:nth-last-child(-n+3) { border-bottom: 0; }
.feature h3 { margin-top: 20px; font-size: 17px; }
.feature p { margin-top: 8px; font-size: 15px; color: var(--muted); }
.feature code { font-size: 13px; padding: 1px 5px; border-radius: 5px; background: var(--surface-3); color: var(--text-2); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; padding: 28px; }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); font-size: 14px; font-weight: 600; }
.step h3 { margin-top: 18px; font-size: 17px; }
.step p { margin-top: 8px; color: var(--muted); font-size: 15px; }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 28px; }
.plan.popular { border-color: var(--text); box-shadow: var(--shadow-lg); }
.plan-top { display: flex; align-items: center; gap: 10px; }
.plan-top h3 { font-size: 18px; }
.plan .price { margin-top: 22px; font-size: 42px; font-weight: 600; letter-spacing: -0.04em; }
.plan .price small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.plan .price .tba { color: var(--faint); }
.plan li.off { color: var(--faint); }
.plan li.off .icon { color: var(--faint); }
.plan.popular .plan-top .badge-accent { margin-left: auto; border: 0; color: #fff; background: linear-gradient(90deg, var(--accent-a), var(--accent-b)); }
.plan, .step, .feature { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease); }
.plan:hover, .step:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature:hover { background: var(--surface-2); }
.plan .desc { margin-top: 6px; color: var(--muted); font-size: 15px; }
.plan ul { list-style: none; margin: 24px 0 28px; padding: 0; display: grid; gap: 11px; font-size: 15px; }
.plan li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); }
.plan li .icon { margin-top: 3px; color: var(--green); }
.plan .btn { margin-top: auto; }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font-weight: 500; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--muted); transition: transform .2s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 22px 20px; color: var(--muted); font-size: 15px; }

.cta-band { text-align: center; padding: 100px 0; }
.cta-band h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 500; letter-spacing: -0.03em; }
.cta-band p { margin-top: 14px; color: var(--muted); font-size: 17px; }
.cta-band .hero-cta { margin-top: 32px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 72px 0 36px; }
.footer-top { display: grid; grid-template-columns: 1.3fr 3fr; gap: 40px; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 600; letter-spacing: -0.035em; }
.footer-brand p { margin-top: 14px; color: var(--muted); font-size: 14.5px; max-width: 260px; }
.footer-social { display: flex; gap: 6px; margin-top: 22px; }
.footer-social a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.footer-social a:hover { background: var(--hover); color: var(--text); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-cols h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 18px; }
.footer-cols a { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 15px; color: var(--muted); }
.footer-cols a:hover { color: var(--text); }
.footer-bottom { display: flex; align-items: center; gap: 14px; margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--border); }
.status-pill { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: 14px; color: var(--text-2); }
.footer-bottom .copy { margin-left: auto; font-size: 14px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav-links, .nav-actions { display: none; }
  .nav-burger { display: inline-flex; margin-left: auto; }
  .sheet { display: block; position: fixed; inset: 68px 0 auto; z-index: 49; padding: 12px 20px 22px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); }
  .sheet a { display: flex; align-items: center; gap: 10px; height: 46px; border-bottom: 1px solid var(--border); font-weight: 500; }
  .sheet .sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
  .sheet .sheet-actions a { border: 0; justify-content: center; }
  .mega, .nav-scrim { display: none; }
  .hero { padding-top: 56px; }
  .hero-row { grid-template-columns: 1fr; gap: 56px; }
  .pipe { width: 100%; max-width: 560px; }
  .demo-panes { grid-template-columns: 1fr; height: auto; }
  .demo-pane { height: 250px; }
  .demo-pane + .demo-pane { border-left: 0; border-top: 1px solid var(--border); }
  .demo-bar .seg { display: none; }
  .demo-lic { height: auto; }
  .features { grid-template-columns: 1fr 1fr; }
  .feature:nth-child(3n) { border-right: 1px solid var(--border); }
  .feature:nth-child(2n) { border-right: 0; }
  .feature:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }
  .feature:nth-last-child(-n+2) { border-bottom: 0; }
  .pricing, .steps { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .footer-top { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding: 72px 0 130px; }
  .features { grid-template-columns: 1fr; }
  .feature { border-right: 0 !important; border-bottom: 1px solid var(--border) !important; }
  .feature:last-child { border-bottom: 0 !important; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-wrap: wrap; }
  .footer-bottom .copy { margin-left: 0; width: 100%; }
  .demo-bar > .btn-outline, .demo-chip { display: none; }
  .demo-actions .btn-outline { display: none; }
  .mini-lic { grid-template-columns: 1fr; }
  .show-tabs-wrap { border-radius: 32px 32px 0 0; }
}
