/* ============================================================
   altform — landing page
   reuses the deploy-console design tokens, adds marketing layout
   ============================================================ */

:root {
  --bg-0: #0a0a0c;
  --bg-1: #0f0f12;
  --bg-2: #15151a;
  --bg-3: #1c1c22;
  --bg-inset: #08080a;

  --line: #232329;
  --line-soft: #1a1a1f;
  --line-strong: #34343c;

  --tx-hi: #f4f4f2;
  --tx-mid: #9d9da8;
  --tx-lo: #63636e;
  --tx-faint: #43434c;

  --acc: #ff6b35;
  --acc-hot: #ff8254;
  --acc-deep: #e2531f;
  --acc-glow: rgba(255, 107, 53, 0.14);
  --acc-line: rgba(255, 107, 53, 0.32);

  --ok: #46d17f;
  --ok-glow: rgba(70, 209, 127, 0.13);
  --warn: #f5b73d;
  --warn-glow: rgba(245, 183, 61, 0.13);
  --err: #f76d6d;
  --err-glow: rgba(247, 109, 109, 0.13);
  --info: #5aa6ff;
  --info-glow: rgba(90, 166, 255, 0.13);
  --vio: #a78bfa;

  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --disp: "Space Grotesk", var(--mono);

  --r-sm: 5px;
  --r: 7px;
  --r-lg: 11px;
  --r-xl: 16px;

  --shadow: 0 1px 0 rgba(255,255,255,0.02) inset, 0 8px 30px -12px rgba(0,0,0,0.7);
  --shadow-pop: 0 30px 70px -22px rgba(0,0,0,0.85), 0 2px 10px -4px rgba(0,0,0,0.6);

  --maxw: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html, body {
  background: var(--bg-0);
  color: var(--tx-hi);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* dotted texture + top glow over the whole page */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.018) 1px, transparent 0);
  background-size: 22px 22px;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
button:focus, a:focus { outline: none; }
::selection { background: var(--acc-line); color: #fff; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; border: 3px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: #45454f; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* type helpers */
.mono { font-family: var(--mono); }
.disp { font-family: var(--disp); }
.tnum { font-variant-numeric: tabular-nums; }
.kicker {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--tx-lo); font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--acc); opacity: .7; }
.acc-tx { color: var(--acc); }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 18px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; color: var(--tx-hi);
  background: var(--bg-2); border: 1px solid var(--line);
  transition: background .15s, border-color .15s, color .15s, transform .07s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-3); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn .ar { transition: transform .18s; }
.btn:hover .ar { transform: translateX(3px); }
.btn.acc {
  background: var(--acc); border-color: var(--acc); color: #1c0d05; font-weight: 600;
  box-shadow: 0 0 0 0 var(--acc-glow);
}
.btn.acc:hover { background: var(--acc-hot); border-color: var(--acc-hot); box-shadow: 0 8px 26px -10px var(--acc); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--bg-2); }
.btn.lg { padding: 13px 22px; font-size: 14.5px; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid transparent;
  transition: background .2s, border-color .2s, backdrop-filter .2s;
}
.nav.stuck {
  background: rgba(10,10,12,0.72); backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--acc-line); border-radius: var(--r-sm);
  background: linear-gradient(180deg, var(--acc-glow), transparent); color: var(--acc);
}
.brand .name { font-family: var(--disp); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand .name b { color: var(--acc); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.nav-links a {
  font-size: 13.5px; color: var(--tx-mid); padding: 7px 12px; border-radius: var(--r-sm);
  transition: color .14s, background .14s;
}
.nav-links a:hover { color: var(--tx-hi); background: var(--bg-2); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-cta .login { font-size: 13.5px; color: var(--tx-mid); padding: 7px 12px; transition: color .14s; }
.nav-cta .login:hover { color: var(--tx-hi); }

/* ============================================================
   Hero
   ============================================================ */
.hero { position: relative; padding: 76px 0 60px; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -120px; transform: translateX(-50%);
  width: 1100px; height: 600px; pointer-events: none; z-index: 0;
  background: radial-gradient(520px 320px at 50% 0%, var(--acc-glow), transparent 70%);
}
.hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 5px 13px 5px 9px; border-radius: 99px;
  background: var(--bg-2); border: 1px solid var(--line);
  font-size: 12px; color: var(--tx-mid); margin-bottom: 26px;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); position: relative; }
.badge .dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; background: var(--ok);
  opacity: .35; animation: ping 1.9s ease-out infinite;
}
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(2.4); opacity: 0; } }

.hero h1 {
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(38px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -0.035em;
  max-width: 16ch;
}
.hero h1 em { font-style: normal; color: var(--acc); position: relative; }
.hero .lede {
  margin: 24px auto 0; max-width: 56ch; font-size: clamp(15px, 1.7vw, 18px);
  color: var(--tx-mid); line-height: 1.6;
}
.hero .lede b { color: var(--tx-hi); font-weight: 500; }
.hero-cta { display: flex; align-items: center; gap: 13px; margin-top: 34px; flex-wrap: wrap; justify-content: center; }
.install {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 22px;
  background: var(--bg-inset); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 12px 9px 14px; font-size: 13px;
}
.install .pr { color: var(--acc); user-select: none; }
.install code { color: var(--tx-hi); }
.install .copy {
  margin-left: 4px; color: var(--tx-lo); padding: 4px 8px; border-radius: 4px;
  border: 1px solid var(--line); font-size: 11px; transition: all .14s;
}
.install .copy:hover { color: var(--tx-hi); border-color: var(--line-strong); background: var(--bg-2); }

/* ============================================================
   Terminal window (hero + walkthrough)
   ============================================================ */
.termwin {
  background: var(--bg-inset); border: 1px solid var(--line-strong);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-pop);
  text-align: left;
}
.hero .termwin { width: 100%; max-width: 760px; margin: 54px auto 0; }
.term-bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); background: var(--bg-1);
}
.term-bar .dots { display: flex; gap: 7px; }
.term-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--bg-3); }
.term-bar .dots i:nth-child(1) { background: #3a2a26; }
.term-bar .dots i:nth-child(2) { background: #3a3526; }
.term-bar .dots i:nth-child(3) { background: #263a2c; }
.term-bar .tt { margin-left: 6px; font-size: 12px; color: var(--tx-lo); }
.term-bar .badge-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; color: var(--ok);
}
.term-bar .badge-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.term-body {
  padding: 18px 20px 22px; font-size: 13.5px; line-height: 1.75;
  min-height: 340px; white-space: pre-wrap; word-break: break-word;
}
.term-body .ln { display: block; }
.term-body .pr { color: var(--acc); }
.term-body .cmd { color: var(--tx-hi); }
.term-body .out { color: var(--tx-mid); }
.term-body .ok { color: var(--ok); }
.term-body .warn { color: var(--warn); }
.term-body .info { color: var(--info); }
.term-body .dim { color: var(--tx-lo); }
.term-body .url { color: var(--acc); }
.cursor {
  display: inline-block; width: 8px; height: 16px; background: var(--acc);
  vertical-align: -3px; margin-left: 1px;
  animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   Section scaffold
   ============================================================ */
section { position: relative; z-index: 1; }
.sec { padding: 84px 0; }
.sec-head { max-width: 60ch; margin-bottom: 48px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head.center .kicker { justify-content: center; }
.sec-head h2 {
  font-family: var(--disp); font-weight: 600; margin-top: 16px;
  font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; line-height: 1.08;
}
.sec-head p { margin-top: 16px; font-size: 16px; color: var(--tx-mid); line-height: 1.6; }
.hr { height: 1px; background: var(--line); border: none; }

/* ============================================================
   Trust / stats strip
   ============================================================ */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-1);
}
.stats .cell { padding: 26px 24px; border-right: 1px solid var(--line-soft); }
.stats .cell:last-child { border-right: none; }
.stats .v { font-family: var(--disp); font-size: 32px; font-weight: 600; letter-spacing: -0.02em; color: var(--tx-hi); }
.stats .v .u { color: var(--acc); }
.stats .k { font-size: 12px; color: var(--tx-lo); margin-top: 6px; text-transform: uppercase; letter-spacing: 0.1em; }

/* ============================================================
   CLI walkthrough — steps + terminal
   ============================================================ */
.cli-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.steps-rail { display: flex; flex-direction: column; }
.step { display: flex; gap: 18px; padding-bottom: 30px; position: relative; cursor: pointer; }
.step:last-child { padding-bottom: 0; }
.step:not(:last-child)::before {
  content: ""; position: absolute; left: 17px; top: 38px; bottom: 4px; width: 1px; background: var(--line);
}
.step .num {
  width: 36px; height: 36px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--tx-mid);
  position: relative; z-index: 1; transition: all .2s;
}
.step .st-body { padding-top: 5px; }
.step .st-body h4 { font-family: var(--disp); font-size: 17px; font-weight: 600; color: var(--tx-mid); margin-bottom: 6px; transition: color .2s; letter-spacing: -0.01em; }
.step .st-body p { font-size: 13.5px; color: var(--tx-lo); line-height: 1.6; transition: color .2s; }
.step .st-body code { color: var(--acc); }
.step.on .num { background: var(--acc-glow); border-color: var(--acc-line); color: var(--acc); box-shadow: 0 0 0 4px var(--acc-glow); }
.step.on .st-body h4 { color: var(--tx-hi); }
.step.on .st-body p { color: var(--tx-mid); }
.cli-grid .termwin { position: sticky; top: 96px; }

/* ============================================================
   Feature grid (bento)
   ============================================================ */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; position: relative; overflow: hidden;
  transition: border-color .18s, background .18s, transform .18s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.card .ic {
  width: 38px; height: 38px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--acc); margin-bottom: 16px;
}
.card h3 { font-family: var(--disp); font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { font-size: 13.5px; color: var(--tx-mid); line-height: 1.6; }
.card.span-2 { grid-column: span 2; }
.card.tall { grid-row: span 2; }
.card .showcase { margin-top: 20px; }

/* logs showcase inside a card */
.mini-logs {
  background: var(--bg-inset); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 0; height: 188px; overflow: hidden; font-size: 12px; line-height: 1.7;
  position: relative; mask-image: linear-gradient(to bottom, transparent, #000 18px, #000 92%, transparent);
}
.mini-logs .logline { display: flex; gap: 12px; padding: 1px 14px; white-space: pre; animation: logIn .3s ease; }
@keyframes logIn { from { opacity: 0; transform: translateX(-5px); } to { opacity: 1; transform: none; } }
.mini-logs .ts { color: var(--tx-faint); flex: none; }
.mini-logs .src { flex: none; width: 54px; }
.mini-logs .msg { color: var(--tx-mid); flex: 1; overflow: hidden; text-overflow: ellipsis; }
.lvl-info .src { color: var(--info); }
.lvl-warn .src { color: var(--warn); } .lvl-warn .msg { color: #d9bd8a; }
.lvl-error .src { color: var(--err); } .lvl-error .msg { color: #e9a5a5; }
.lvl-ok .src { color: var(--ok); }
.lvl-sys .src { color: var(--tx-lo); } .lvl-sys .msg { color: var(--tx-lo); }

/* pods / scale-to-zero showcase */
.pods { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; min-height: 64px; margin-top: 18px; }
.pod {
  width: 46px; height: 54px; border-radius: var(--r-sm);
  border: 1px solid var(--ok); background: var(--ok-glow);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--ok); animation: podIn .32s cubic-bezier(.2,.8,.2,1) backwards;
}
@keyframes podIn { from { opacity: 0; transform: scale(.7) translateY(8px); } to { opacity: 1; transform: none; } }
.pod .pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.pod .pid { font-size: 9px; color: var(--tx-lo); }
.pod.boot { border-color: var(--warn); background: var(--warn-glow); color: var(--warn); }
.pod.boot .pdot { background: var(--warn); animation: blink2 1s steps(2) infinite; }
@keyframes blink2 { 50% { opacity: .3; } }
.pod.zzz { border-color: var(--line-strong); background: var(--bg-2); color: var(--tx-faint); }
.pod.zzz .pdot { background: var(--tx-faint); }
.scale-meta { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12.5px; color: var(--tx-lo); }
.scale-meta .req { color: var(--acc); font-variant-numeric: tabular-nums; }

/* metrics sparkline showcase */
.metric-row { display: flex; gap: 22px; margin-top: 18px; }
.metric { flex: 1; }
.metric .mk { font-size: 11px; color: var(--tx-lo); text-transform: uppercase; letter-spacing: 0.1em; }
.metric .mv { font-family: var(--disp); font-size: 24px; font-weight: 600; margin-top: 3px; color: var(--tx-hi); }
.metric .mv small { font-size: 13px; color: var(--tx-lo); font-weight: 400; }
.spark { width: 100%; height: 44px; display: block; margin-top: 12px; }

/* runtime chips */
.runtimes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.rt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 99px; font-size: 12.5px; color: var(--tx-mid);
  background: var(--bg-2); border: 1px solid var(--line); transition: all .14s;
  text-decoration: none;
}
.rt:hover { border-color: var(--line-strong); color: var(--tx-hi); }
.rt .g { font-size: 13px; }

/* env table */
.env { margin-top: 8px; display: flex; flex-direction: column; gap: 0; }
.env .erow { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; }
.env .erow:last-child { border-bottom: none; }
.env .ek { color: var(--info); flex: none; width: 130px; }
.env .ev { color: var(--tx-lo); letter-spacing: 0.06em; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.env .elock { color: var(--tx-faint); }

/* ============================================================
   Big runtimes strip
   ============================================================ */
.rt-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.rt-strip .rt { padding: 10px 18px; font-size: 14px; }

/* ============================================================
   Final CTA
   ============================================================ */
.cta {
  position: relative; border: 1px solid var(--acc-line); border-radius: var(--r-xl);
  overflow: hidden; padding: 64px 40px; text-align: center;
  background:
    radial-gradient(600px 300px at 50% 0%, var(--acc-glow), transparent 70%),
    var(--bg-1);
}
.cta h2 { font-family: var(--disp); font-size: clamp(30px, 4vw, 46px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.cta p { margin: 18px auto 0; max-width: 50ch; color: var(--tx-mid); font-size: 16px; }
.cta .cta-row { margin-top: 30px; display: flex; gap: 13px; justify-content: center; flex-wrap: wrap; }
.cta .ribbon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--acc), transparent);
  opacity: .7;
}

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: 52px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot-brand .name { font-family: var(--disp); font-weight: 600; font-size: 18px; }
.foot-brand .name b { color: var(--acc); }
.foot-brand p { margin-top: 14px; font-size: 13px; color: var(--tx-lo); max-width: 34ch; line-height: 1.6; }
.foot-col h5 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--tx-faint); margin-bottom: 16px; }
.foot-col a { display: block; font-size: 13.5px; color: var(--tx-mid); padding: 6px 0; transition: color .14s; }
.foot-col a:hover { color: var(--tx-hi); }
.foot-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line-soft);
  font-size: 12.5px; color: var(--tx-lo); flex-wrap: wrap;
}
.foot-bottom .region { display: inline-flex; align-items: center; gap: 8px; }
.foot-bottom .region .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: .001ms !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
  .cli-grid { grid-template-columns: 1fr; gap: 36px; }
  .cli-grid .termwin { position: static; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .card.span-2 { grid-column: span 2; }
  .card.tall { grid-row: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats .cell:nth-child(2) { border-right: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .foot-brand { grid-column: span 2; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .nav-links { display: none; }
  .bento { grid-template-columns: 1fr; }
  .card.span-2 { grid-column: span 1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .sec { padding: 60px 0; }
  .hero { padding: 54px 0 40px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
