/* nexus design system v3: flat, modern SaaS. White, ink, one cobalt accent. */

@font-face { font-family:'Hanken'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/hanken-400.woff2') format('woff2'); }
@font-face { font-family:'Hanken'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/hanken-500.woff2') format('woff2'); }
@font-face { font-family:'Hanken'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/hanken-600.woff2') format('woff2'); }
@font-face { font-family:'Hanken'; font-style:normal; font-weight:700; font-display:swap; src:url('/assets/fonts/hanken-700.woff2') format('woff2'); }
@font-face { font-family:'Hanken'; font-style:normal; font-weight:800; font-display:swap; src:url('/assets/fonts/hanken-800.woff2') format('woff2'); }

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg2: #F6F7F9;
  --panel: #FFFFFF;
  --panel-solid: #FFFFFF;
  --line: #E7E9EE;
  --line-bright: #D5D8E0;
  --text: #0B0C0F;
  --dim: #5D6470;
  --faint: #9298A3;
  --accent: #1B3DF0;
  --accent-dark: #1230C4;
  --accent-glow: rgba(27, 61, 240, 0.08);
  --ok: #14804A;
  --warn: #B25E09;
  --bad: #D03A2B;
  --term-bg: #0D0E12;
  --term-line: #26282F;
  --radius: 12px;
  --ease: cubic-bezier(.16, 1, .3, 1);      /* expo-out: fast start, long soft landing */
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --font: 'Hanken', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sans: 'Hanken', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: 'Hanken', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--accent-dark); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, .mono { font-family: var(--mono); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.wrap.narrow { max-width: 860px; }

/* ---- logo ---- */
.logo { display: flex; align-items: center; gap: 9px; font: 700 18px/1 var(--font); letter-spacing: -0.03em; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo svg { display: block; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .4s var(--ease);
}
.nav.scrolled { box-shadow: 0 8px 28px -16px rgba(11,12,15,.18); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav .logo { margin-right: auto; }
.nav a.item { color: var(--dim); font: 500 14px var(--font); position: relative; padding: 4px 0; transition: color .2s var(--ease); }
.nav a.item::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--accent); border-radius: 2px;
  transform: scaleX(0); transform-origin: left center;
  transition: transform .3s var(--ease);
}
.nav a.item:hover { color: var(--text); text-decoration: none; }
.nav a.item:hover::after { transform: scaleX(1); }
.nav a.item.active { color: var(--text); font-weight: 600; }
.nav a.item.active::after { transform: scaleX(1); }
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 10px;
  border: 1px solid var(--line-bright); color: var(--text);
  font: 600 14px var(--font); cursor: pointer;
  background: var(--bg);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease),
              border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn:hover { text-decoration: none; border-color: var(--faint); background: var(--bg2); transform: translateY(-1.5px); box-shadow: 0 6px 18px -8px rgba(11,12,15,.18); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; transition-duration: .08s; }
.btn.primary { background: var(--text); color: #fff; border-color: var(--text); box-shadow: 0 1px 2px rgba(11,12,15,.1); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 8px 22px -8px rgba(27,61,240,.45); }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 8px; }

/* ---- hero & sections ---- */
.hero { padding: 88px 0 64px; position: relative; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(640px 320px at 78% 8%, var(--accent-glow), transparent 70%); }

/* entrance choreography: kicker → headline → sub → CTAs → the artifact */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero .kicker { animation: rise .7s var(--ease) both; }
.hero h1 { animation: rise .85s var(--ease) .08s both; }
.hero .sub { animation: rise .85s var(--ease) .16s both; }
.hero .btn { animation: rise .85s var(--ease) .26s both; }
.hero .term, .hero .heroimg, .hero .spot { animation: rise 1s var(--ease) .3s both; }
.hero .pipeline { animation: rise 1s var(--ease) .42s both; }
h1 {
  font: 800 clamp(38px, 4.8vw, 64px)/1.05 var(--font);
  letter-spacing: -0.035em; margin: 0 0 22px; color: var(--text);
}
h1 .grad, .grad { color: var(--accent); font-style: normal; background: none; -webkit-background-clip: unset; background-clip: unset; }
.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-dark); font: 600 13px var(--font);
  background: var(--accent-glow); border: 1px solid rgba(27,61,240,.2);
  padding: 5px 14px; border-radius: 100px; margin-bottom: 22px;
}
.kicker::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.sub { color: var(--dim); font-size: 19px; max-width: 600px; line-height: 1.6; font-weight: 400; }
section { padding: 84px 0; }
section.tight { padding: 52px 0; }
h2 { font: 700 clamp(28px, 3vw, 40px)/1.12 var(--font); letter-spacing: -0.03em; margin: 0 0 12px; }
.lead { color: var(--dim); font-size: 17px; max-width: 640px; margin: 0 0 36px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---- cards & panels ---- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
  transition: box-shadow .35s var(--ease), border-color .25s var(--ease), transform .35s var(--ease);
  box-shadow: 0 1px 2px rgba(11,12,15,.04);
}
.card:hover { border-color: var(--line-bright); box-shadow: 0 14px 32px -14px rgba(11,12,15,.14); transform: translateY(-3px); }
.card h3 { margin: 0 0 8px; font: 600 16px var(--font); letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--dim); font-size: 14.5px; line-height: 1.6; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

/* ---- code ---- */
pre.code {
  background: var(--term-bg); color: #E6E8ED; border-radius: var(--radius);
  padding: 20px 22px; overflow-x: auto; font-size: 13px; line-height: 1.7; margin: 0;
}
pre.code .cm { color: #6B7280; }
pre.code .kw { color: #8FA8FF; }
pre.code .str { color: #7FD1A0; }
pre.code .fn { color: #7DB8FF; }
pre.code .num { color: #F0A868; }
.codehead {
  display: flex; align-items: center; gap: 8px; background: var(--term-bg);
  border-bottom: 1px solid var(--term-line);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 10px 16px; font: 500 12px var(--mono); color: #6B7280;
}
.codehead + pre.code { border-radius: 0 0 var(--radius) var(--radius); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--term-line); }

/* ---- terminal ---- */
.term {
  background: var(--term-bg); border-radius: var(--radius);
  font: 12.5px/1.75 var(--mono); overflow: hidden; color: #E6E8ED;
  box-shadow: 0 12px 40px -12px rgba(11,12,15,.35);
}
.term-head { display: flex; gap: 6px; padding: 11px 16px; border-bottom: 1px solid var(--term-line); align-items: center; }
.term-head .t { margin-left: 8px; color: #6B7280; font-size: 11.5px; }
.term-body { padding: 16px 20px; min-height: 120px; }
.term .ok { color: #6EE7A0; } .term .warn { color: #FBBF6E; } .term .bad { color: #FB8F7A; }
.term .acc { color: #8FA8FF; } .term .dim { color: #6B7280; }

/* ---- state chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 100px; font: 600 11.5px var(--font); border: 1px solid transparent; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.running { color: var(--accent-dark); background: var(--accent-glow); }
.chip.waiting { color: var(--warn); background: rgba(178,94,9,.1); }
.chip.completed { color: var(--ok); background: rgba(20,128,74,.1); }
.chip.failed, .chip.halted { color: var(--bad); background: rgba(208,58,43,.08); }
.chip.running::before { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ---- scroll reveal ---- */
.rv {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--rvd, 0s);
}
.rv.in { opacity: 1; transform: none; }
.rv.d1 { --rvd: .08s; } .rv.d2 { --rvd: .16s; } .rv.d3 { --rvd: .24s; }

/* ---- stats ---- */
.stat { }
.stat .n { font: 800 44px/1 var(--font); letter-spacing: -0.04em; color: var(--text); }
.stat .n .grad { color: var(--accent); }
.stat .l { color: var(--dim); font-size: 13.5px; margin-top: 8px; }

/* ---- bars (benchmarks) ---- */
.bar-row { display: grid; grid-template-columns: 200px 1fr 110px; gap: 18px; align-items: center; margin: 12px 0; font-size: 14px; }
.bar-row .name { font: 500 13px var(--font); color: var(--dim); }
.bar-track { background: var(--bg2); border-radius: 100px; height: 24px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--line-bright); border-radius: 100px; transition: width 1.4s var(--ease); }
.bar-row.win .bar-fill { background: var(--accent); }
.bar-row .val { font: 600 13px var(--mono); color: var(--dim); text-align: right; }
.bar-row.win .val, .bar-row.win .name { color: var(--text); font-weight: 650; }

/* ---- tables ---- */
table.cmp { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cmp th, .cmp td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.cmp tbody tr { transition: background .18s var(--ease); }
.cmp tbody tr:hover td { background: var(--bg2); }
.cmp tr.hl:hover td { background: var(--accent-glow); }
.cmp tr:last-child td { border-bottom: 0; }
.cmp th { color: var(--faint); font: 600 12px var(--font); letter-spacing: .04em; text-transform: uppercase; background: var(--bg2); }
.cmp td:first-child { white-space: nowrap; font-weight: 550; }
.cmp .y { color: var(--ok); font-weight: 600; } .cmp .n { color: var(--bad); } .cmp .p { color: var(--warn); }
.cmp tr.hl td { background: var(--accent-glow); }

/* ---- pipeline animation ---- */
.pipeline { display: flex; align-items: center; gap: 0; margin: 36px 0 10px; }
.pnode {
  border: 1px solid var(--line); border-radius: 100px; padding: 9px 16px;
  font: 600 12.5px var(--font); background: var(--panel); position: relative;
  transition: border-color .45s var(--ease), color .45s var(--ease),
              background .45s var(--ease), transform .45s var(--ease);
  color: var(--faint); white-space: nowrap;
}
.pnode.active { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-glow); transform: scale(1.05); }
.pnode.warn.active { border-color: var(--warn); color: var(--warn); background: rgba(178,94,9,.08); }
.pnode.ok.active { border-color: var(--ok); color: var(--ok); background: rgba(20,128,74,.08); }
.plink { flex: 1; height: 2px; min-width: 22px; background: var(--line); position: relative; overflow: hidden; }
.plink::after { content: ""; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; background: var(--accent); opacity: 0; }
.plink.flow::after { animation: flow .9s linear infinite; opacity: 1; }
@keyframes flow { to { left: 110%; } }

.honest {
  border: 1px solid var(--line); border-left: 3px solid var(--warn);
  background: var(--bg2); border-radius: 10px;
  padding: 16px 20px; color: var(--dim); font-size: 14px;
}
.honest b { color: var(--text); }

footer { border-top: 1px solid var(--line); padding: 48px 0 60px; color: var(--faint); font-size: 14px; margin-top: 48px; background: var(--bg2); }
.foot-grid { display: flex; gap: 44px; flex-wrap: wrap; justify-content: space-between; }
.foot-col a { display: block; color: var(--dim); font-size: 13.5px; margin: 7px 0; font-weight: 450; transition: color .18s var(--ease), transform .25s var(--ease); }
.foot-col a:hover { color: var(--text); text-decoration: none; transform: translateX(3px); }
.foot-col .h { color: var(--text); font: 600 13px var(--font); margin-bottom: 12px; }

@media (max-width: 900px) {
  .grid3, .grid4 { grid-template-columns: 1fr 1fr; }
  .grid2 { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 130px 1fr 80px; }
}

@media (max-width: 940px) {
  .nav a.item { display: none; }
  .nav-inner { gap: 16px; }
}

/* ---- terminal life ---- */
@keyframes lineIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.term-body .jl.new { animation: lineIn .5s var(--ease) both; }
.sim-line { animation: lineIn .45s var(--ease) both; }
@keyframes blink { 50% { opacity: 0; } }
.term-live::after { content: "▌"; color: #8FA8FF; animation: blink 1.1s steps(1) infinite; margin-left: 2px; }

/* ---- calm for those who asked for it ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .rv { opacity: 1; transform: none; }
}
