/* =========================================================
   The Cubits — landing page
   1. Tokens   2. Base   3. World   4. Nav   5. Buttons
   6. Hero     7. 3D stage   8. IDE mock   9. Downloads
   10. Features 11. Preview 12. Why 13. CTA 14. Footer
   15. Motion & responsive
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #0a0a0a;
  --bg-2: #0e0e0e;
  --panel: #111111;
  --graphite: #161616;
  --graphite-2: #1c1c1c;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --text: #ededed;
  --muted: #a0a0a0;
  --dim: #6b6b6b;
  --accent: #e8e8e8;
  --accent-bright: #ffffff;
  --accent-soft: rgba(255, 255, 255, .10);

  /* Crew: each Cubit's glow accent + shell colour */
  --ask: #7fb4ff;
  --ask-shell: #eef0f4;
  --plan: #ffc53d;
  --plan-shell: #ffc23a;
  --code: #4d8dff;
  --code-shell: #2f7bff;
  --review: #b18cff;
  --review-shell: #8d5cf6;
  --test: #ff5a5a;
  --test-shell: #ff4545;
  --deploy: #44e08c;
  --deploy-shell: #25c168;

  --radius: 12px;
  --radius-lg: 18px;
  --container: 1180px;
  --nav-h: 64px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 18px 40px -22px rgba(0, 0, 0, .9);
  --shadow-2: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 40px 90px -30px rgba(0, 0, 0, .95);
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.028em; line-height: 1.08; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.075rem; letter-spacing: -.015em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section { padding: clamp(72px, 10vw, 130px) 0; position: relative; }
.section--alt {
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, .035), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, .016), rgba(255, 255, 255, 0));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 660px;
  margin: 0 auto clamp(40px, 5vw, 64px);
  text-align: center;
}

.section-lead {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.075rem;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--accent-bright);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--graphite);
  border: 1px solid var(--line-2);
  border-radius: 10px;
}
.skip:focus { left: 16px; }

/* ---------- 3. World background ---------- */
.world {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.world-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 42% at 50% 34%, rgba(255, 255, 255, .06), transparent 62%),
    radial-gradient(90% 60% at 50% 108%, rgba(255, 255, 255, .05), transparent 60%),
    linear-gradient(180deg, #0a0a0a 0%, #0b0b0b 45%, #090909 100%);
}

.world-beams {
  position: absolute;
  inset: -10% -20% 30%;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 148px);
  mask-image: radial-gradient(46% 62% at 50% 30%, #000 0%, transparent 76%);
  opacity: .5;
}

.world-floor {
  position: absolute;
  left: 50%;
  bottom: -6vh;
  width: 210vw;
  aspect-ratio: 1 / 1;
  transform: translateX(-50%) perspective(620px) rotateX(74deg);
  transform-origin: 50% 100%;
  background-image:
    linear-gradient(rgba(255, 255, 255, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .11) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(closest-side, #000 12%, rgba(0, 0, 0, .5) 42%, transparent 72%);
  opacity: .5;
}

.world-grain {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  opacity: .035;
  mix-blend-mode: overlay;
}

main, .footer, .nav { position: relative; z-index: 1; }

/* ---------- 4. Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
}

.nav.is-stuck {
  background: rgba(8, 9, 11, .72);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--graphite-2), var(--panel));
  color: #fff;
  box-shadow: var(--shadow-1);
}
.mark svg { width: 20px; height: 20px; }
.mark-dot { fill: var(--accent); }

/* ---------- Brand logo: external artwork with the SVG mark as fallback ---------- */
.mark-img { width: 20px; height: 20px; object-fit: contain; }
.mark-fallback { display: none; }
.mark--fallback .mark-img { display: none; }
.mark--fallback .mark-fallback { display: block; }

/* Artwork loaded: drop the placeholder tile so the logo is not boxed in */
.mark--img {
  width: auto;
  height: 28px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.mark--img .mark-img { width: auto; height: 28px; max-width: 168px; }

/* A wide asset is a lockup that already carries the wordmark */
.brand--lockup .brand-name { display: none; }

.brand-name {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: .16em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-inline: auto;
  font-size: .93rem;
  color: var(--muted);
}
.nav-links a { transition: color .2s ease; }
.nav-links a:hover { color: var(--text); }

.nav-cta { flex: none; }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: .94rem;
  font-weight: 550;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s ease, background .2s ease, border-color .2s ease, box-shadow .25s ease, opacity .2s ease;
}
.btn .i { width: 17px; height: 17px; flex: none; }

.btn-primary {
  background: #fff;
  color: #0a0a0a;
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .85), 0 1px 0 rgba(255, 255, 255, .6) inset;
}
.btn-primary:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .95);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255, 255, 255, .04);
  border-color: var(--line-2);
  color: var(--text);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .075);
  border-color: rgba(255, 255, 255, .26);
  transform: translateY(-1px);
}

.btn-sm { padding: 9px 16px; font-size: .88rem; border-radius: 10px; }
.btn-lg { padding: 15px 26px; font-size: 1rem; border-radius: 13px; }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(48px, 7vw, 88px);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 840px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px 13px 6px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .16em;
  color: #d6d6d6;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.accent-text {
  background: linear-gradient(180deg, #ffffff 18%, #bdbdbd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 590px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.6vw, 1.19rem);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 34px;
}

.hero-note {
  margin-top: 26px;
  color: var(--dim);
  font-size: .82rem;
  letter-spacing: .04em;
}

/* ---------- 7. 3D stage ----------
   The IDE sits in flow at the centre of the stage and the crew overlay is
   anchored to its box, so the stage grows with it. The --crew-* reaches say
   how far the crew extends beyond each IDE edge; the stage pads for them. */
.stage {
  --ide-w: 720px;
  --crew-side: clamp(150px, calc(50vw - var(--ide-w) / 2 - 22px), 340px);
  --crew-top: 170px;
  --crew-bottom: 184px;
  --bot-w: calc(var(--crew-side) - 40px);
  --slot-h: 196px;
  position: relative;
  margin-top: clamp(40px, 6vw, 72px);
  padding: calc(var(--crew-top) + 14px) 0 calc(var(--crew-bottom) + 56px);
  perspective: 1500px;
  perspective-origin: 50% 42%;
}

.stage-inner {
  position: relative;
  width: 100%;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--my, 0) * -3.4deg)) rotateY(calc(var(--mx, 0) * 5deg));
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}

.layer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  transform: translate3d(calc(-50% + var(--mx, 0) * var(--d, 0) * 16px), calc(-50% + var(--my, 0) * var(--d, 0) * 13px), calc(var(--d, 0) * 34px));
  transition: transform .55s cubic-bezier(.22, .61, .36, 1);
}

/* The IDE layer stays in flow (it sizes the stage) and tilts with the scene */
.layer.layer--work {
  position: relative;
  top: auto;
  left: auto;
  width: fit-content;
  margin-inline: auto;
  transform: none;
}

.rig { position: relative; }

.stage-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 56px;
  background: linear-gradient(180deg, transparent, var(--bg) 88%);
  z-index: 2;
  pointer-events: none;
}

.ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotateX(72deg);
}
.ring-a { width: 940px; height: 940px; border-color: rgba(255, 255, 255, .08); }
.ring-b { width: 680px; height: 680px; }

.orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 620px;
  height: 620px;
  transform: translate(-50%, -54%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02) 46%, transparent 68%);
  filter: blur(26px);
}

/* ---------- 7b. Crew ----------
   Four Cubits around the IDE. crew.js renders them into the .bot-slot boxes
   on one WebGL canvas and draws the links; the flat .bot-art is what shows
   before that (and instead of it without WebGL). */
.crew {
  --crew-mode: sides;
  position: absolute;
  inset: calc(-1 * var(--crew-top)) calc(-1 * var(--crew-side)) calc(-1 * var(--crew-bottom));
  pointer-events: none;
}

.crew-defs { position: absolute; }

.crew-links,
.crew-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.crew-links { z-index: 1; overflow: visible; }
.crew-gl { z-index: 3; opacity: 0; transition: opacity .9s ease; }
.crew.is-live .crew-gl { opacity: 1; }

.bot {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--bot-w);
  margin: 0;
}
.bot--ask, .bot--plan, .bot--code { left: 0; }
.bot--deploy, .bot--test, .bot--review { right: 0; }
.bot--ask, .bot--deploy { top: 0; }
.bot--plan, .bot--test { top: calc(50% - (var(--slot-h) + 46px) / 2); }
.bot--code, .bot--review { bottom: 0; }

.bot-slot { width: 100%; height: var(--slot-h); }
.bot-art {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .6));
  transition: opacity .7s ease;
}
.bot--deploy .bot-art, .bot--test .bot-art, .bot--review .bot-art { transform: scaleX(-1); }
.crew.is-live .bot-art { opacity: 0; }

.bot-cap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.bot-num {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .045);
  color: #d4d4d4;
  font-family: var(--mono);
  font-size: .66rem;
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--bot) 55%, transparent);
}
.bot-title {
  color: #f2f2f2;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .22em;
  line-height: 1.35;
  text-transform: uppercase;
}
.bot-title small {
  display: block;
  color: var(--dim);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: none;
}

/* Token riding each link; crew.js places it once the link exists */
.crew-token {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--bot) 50%, transparent);
  border-radius: 7px;
  background: rgba(10, 11, 13, .88);
  color: #e8ecf2;
  font-family: var(--mono);
  font-size: .64rem;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 0 18px -6px var(--bot);
  opacity: 0;
  transition: opacity .6s ease;
}
.crew.is-linked .crew-token { opacity: 1; }

/* Ask's greeting, handwritten like the brand sheet */
.crew-bubble {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 4;
  max-width: 150px;
  color: #eef2f8;
  font: italic 500 .9rem/1.2 "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.crew-bubble.is-on { opacity: 1; }
.crew.is-linked .crew-token.is-off { opacity: 0; }

/* Link strokes (SVG) */
.cl-glow { fill: none; stroke: var(--bot); stroke-width: 8; stroke-linecap: round; opacity: .1; }
.cl-halo { fill: none; stroke: var(--bot); stroke-width: 3.2; stroke-linecap: round; opacity: .26; }
.cl-core { fill: none; stroke: var(--bot); stroke-width: 1.4; stroke-linecap: round; opacity: .85; }
.cl-flow { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1.5 15; opacity: .9; }
.cl-port-glow, .cl-packet-glow { fill: var(--bot); opacity: .3; }
.cl-port, .cl-packet, .cl-plug { fill: #fff; }
.cl-port-ring { fill: #0c0d0f; stroke: var(--bot); stroke-width: 1.6; }
.cl-packet, .cl-packet-glow { opacity: 0; }

.stage.has-hover { cursor: pointer; }

.live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

/* Float animation */
.float-slowest { animation: float 13s ease-in-out infinite; }
.float-slow { animation: float 11s ease-in-out infinite; }
.float-med { animation: float 9s ease-in-out infinite; }
.float-fast { animation: float 7.5s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}

/* ---------- 8. IDE mock ---------- */
.ide {
  width: min(720px, 92vw);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #151515, #0f0f0f 60%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .07) inset,
    0 60px 120px -40px rgba(0, 0, 0, 1),
    0 0 90px -30px rgba(255, 255, 255, .05);
}

.ide-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .012));
}

.dots { display: inline-flex; gap: 6px; flex: none; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .14); }

.ide-title {
  flex: 1;
  text-align: center;
  color: var(--dim);
  font-size: .72rem;
  letter-spacing: .02em;
}

.ide-actions { display: inline-flex; gap: 6px; flex: none; }
.pill {
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .66rem;
}
.pill-run {
  background: var(--accent-soft);
  border-color: rgba(255, 255, 255, .22);
  color: var(--accent-bright);
}

.ide-body {
  display: grid;
  grid-template-columns: 174px 1fr 220px;
  min-height: 300px;
}

/* Hero IDE: fixed body height so the crew around it has a stable frame */
.stage .ide { width: var(--ide-w); }
.stage .ide-body { grid-template-columns: 168px minmax(0, 1fr) 236px; height: 352px; }

.ide-side {
  padding: 12px 8px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  font-size: .74rem;
}

.side-label {
  padding: 0 8px 8px;
  color: var(--dim);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.side-label--mt { padding-top: 18px; }

.tree li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #9a9a9a;
}
.tree li.indent { padding-left: 22px; }
.tree li.indent-2 { padding-left: 34px; }
.tree li.is-active {
  background: rgba(255, 255, 255, .08);
  color: #ededed;
  box-shadow: inset 2px 0 0 var(--accent);
}
.tree--tools li { color: var(--muted); }
.tree--tools .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
}
.tree--tools .dot-on { background: var(--accent); }

.ico { width: 12px; height: 13px; flex: none; opacity: .8; }
.ico-folder { background: currentColor; clip-path: polygon(0 14%, 38% 14%, 48% 0, 100% 0, 100% 100%, 0 100%); opacity: .45; }
.ico-file { background: currentColor; clip-path: polygon(0 0, 68% 0, 100% 28%, 100% 100%, 0 100%); opacity: .32; }
.ico-ts { background: #569cd6; opacity: .6; }
.ico-json { background: #d7ba7d; opacity: .5; }
.ico-yml { background: #7ca668; opacity: .5; }

.ide-main { display: flex; flex-direction: column; min-width: 0; }

.tabs {
  display: flex;
  gap: 2px;
  padding: 8px 10px 0;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 9px 12px 6px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: .7rem;
  border-top: 2px solid transparent;
}
.tab.is-active { color: #ffffff; background: rgba(255, 255, 255, .045); border-top-color: var(--accent); }
.tab-add { padding-inline: 10px; }

.code {
  flex: 1;
  margin: 0;
  padding: 14px 16px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: .755rem;
  line-height: 1.85;
  color: #d4d4d4;
  white-space: pre;
  tab-size: 2;
}

.ln {
  display: inline-block;
  width: 1.9em;
  margin-right: .6em;
  color: rgba(255, 255, 255, .18);
  text-align: right;
  user-select: none;
}

.tok-k, .code .k { color: #c586c0; }
.tok-n, .code .n { color: #4ec9b0; }
.tok-f, .code .f { color: #dcdcaa; }
.tok-s, .code .s { color: #ce9178; }
.tok-v, .code .v { color: #9cdcfe; }
.tok-p, .code .p { color: #9cdcfe; }
.tok-a { color: #9cdcfe; }
.tok-dim { color: var(--dim); }
.tok-ok { color: #89d185; }

.caret {
  display: inline-block;
  width: 7px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: -.18em;
  background: var(--accent);
  animation: blink 1.15s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.ide-status {
  display: flex;
  gap: 16px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  font-size: .68rem;
  color: var(--muted);
}
.st { display: inline-flex; align-items: center; gap: 7px; }
.st-dim { color: var(--dim); }

.ide-agent {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
  font-size: .74rem;
}

.agent-head {
  color: var(--dim);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.msg {
  padding: 9px 11px;
  border-radius: 9px;
  line-height: 1.5;
}
.msg-user {
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  color: #dcdcdc;
}
.msg-ai {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #b0b0b0;
}

.step { display: flex; align-items: center; gap: 7px; }
.step code {
  font-family: var(--mono);
  font-size: .68rem;
  color: #e0e0e0;
}
.step-done .live { background: #89d185; box-shadow: 0 0 0 3px rgba(137, 209, 133, .14); animation: none; }
.step-stream { color: var(--accent-bright); }

/* Hero agent window as the crew roster */
.crew-roster { display: flex; flex-direction: column; gap: 2px; margin-inline: -4px; }
.crew-row {
  --pulse: 0;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 6px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 7px;
  font-size: .7rem;
  line-height: 1.3;
}
.crew-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--bot);
  opacity: calc(var(--pulse) * .14);
}
.crew-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bot);
  box-shadow: 0 0 calc(5px + var(--pulse) * 9px) var(--bot);
}
.crew-row b { min-width: 32px; color: #fff; font-weight: 600; }
.crew-act { overflow: hidden; color: #cfcfcf; text-overflow: ellipsis; white-space: nowrap; }
.crew-st { color: var(--dim); font-family: var(--mono); font-size: .6rem; font-style: normal; white-space: nowrap; }

.agent-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, .35);
  color: var(--dim);
  font-size: .7rem;
}
.key {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: .62rem;
}

/* ---------- 9. Downloads ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.dl-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .012));
  box-shadow: var(--shadow-1);
  transition: transform .25s ease, border-color .25s ease, box-shadow .3s ease;
}
.dl-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .22);
  box-shadow: var(--shadow-2), 0 0 60px -26px rgba(255, 255, 255, .05);
}

.dl-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.dl-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: linear-gradient(180deg, var(--graphite-2), var(--panel));
  color: #e6e6e6;
  box-shadow: var(--shadow-1);
}
.dl-icon svg { width: 23px; height: 23px; }

.dl-title h3 { font-size: 1.16rem; }
.dl-ver {
  margin-top: 3px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: .7rem;
}

.dl-list { flex: 1; padding: 8px 0 4px; }
.dl-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .07);
  font-size: .84rem;
}
.dl-list li:last-child { border-bottom: 0; }

.dl-arch { flex: 1; color: #dedede; }
.dl-tag {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
  color: var(--muted);
  font-family: var(--mono);
  font-size: .68rem;
}
.dl-size {
  min-width: 58px;
  text-align: right;
  color: var(--dim);
  font-family: var(--mono);
  font-size: .7rem;
}
.dl-get {
  color: var(--accent-bright);
  font-size: .78rem;
  font-weight: 550;
  transition: color .2s ease;
}
.dl-get:hover { color: #fff; }

.dl-cta { width: 100%; margin-top: 20px; }

.install {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.install-label { color: var(--dim); font-size: .84rem; }

.install-cmd {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, .4);
  font-family: var(--mono);
  font-size: .8rem;
  color: #d8d8d8;
  transition: border-color .2s ease, background .2s ease;
}
.install-cmd:hover { border-color: rgba(255, 255, 255, .24); background: rgba(255, 255, 255, .05); }
.install-copy {
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: var(--dim);
  font-family: var(--font);
  font-size: .72rem;
}
.install-done { color: var(--accent-bright); font-size: .78rem; }

.dl-note {
  margin-top: 22px;
  text-align: center;
  color: var(--dim);
  font-size: .8rem;
}

/* ---------- 10. Features ---------- */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feat {
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .01));
  transition: transform .25s ease, border-color .25s ease, background .3s ease;
}
.feat:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, .2);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
}

.feat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: linear-gradient(180deg, var(--graphite-2), var(--panel));
  color: var(--accent-bright);
  box-shadow: var(--shadow-1);
}
.feat-icon svg { width: 21px; height: 21px; }
.feat h3 { margin-bottom: 9px; }
.feat p { color: var(--muted); font-size: .89rem; line-height: 1.62; }

/* ---------- 11. Preview ---------- */
.preview {
  position: relative;
  display: grid;
  place-items: center;
  perspective: 2000px;
}

.preview-glow {
  position: absolute;
  inset: 8% 2% -6%;
  border-radius: 50%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 255, 255, .07), transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

.preview .ide {
  position: relative;
  width: min(1080px, 100%);
  transform: rotateX(3.2deg);
  transform-origin: 50% 0;
  transition: transform .5s cubic-bezier(.22, .61, .36, 1);
}
.preview .ide:hover { transform: rotateX(0deg); }

.ide--lg .ide-body { grid-template-columns: 200px 1fr 268px; min-height: 460px; }
.ide--lg .code { font-size: .82rem; }

.code-panel {
  margin: 0 14px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, .42);
  overflow: hidden;
}
.cp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: .7rem;
  letter-spacing: .04em;
}
.cp-body {
  margin: 0;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.85;
  color: #c8c8c8;
  white-space: pre;
  overflow: hidden;
}

.agent-diff {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, .025);
}
.diff-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .72rem;
}
.diff-add { color: #89d185; font-family: var(--mono); }
.diff-del { color: #f48771; font-family: var(--mono); }
.diff-bar {
  height: 4px;
  margin-top: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}
.diff-bar i {
  display: block;
  width: 64%;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #b0b0b0, #ffffff);
}

/* ---------- 12. Why ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.why {
  padding: 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .008));
}

.why-num {
  display: block;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--accent);
}

.why h3 { margin-bottom: 10px; font-size: 1.18rem; }
.why p { color: var(--muted); font-size: .92rem; }

/* ---------- 13. CTA ---------- */
.cta { padding: clamp(60px, 8vw, 110px) 0 clamp(72px, 9vw, 120px); }

.cta-card {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 6vw, 76px) 32px;
  border: 1px solid var(--line-2);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .012));
  text-align: center;
  box-shadow: var(--shadow-2);
}

.cta-glow {
  position: absolute;
  left: 50%;
  top: -55%;
  width: 620px;
  height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 255, 255, .09), transparent 72%);
  filter: blur(40px);
  pointer-events: none;
}

.cta-card h2 { position: relative; }
.cta-card p { position: relative; margin-top: 14px; color: var(--muted); }

.cta-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 32px;
}

.cta-note {
  color: var(--dim) !important;
  font-size: .8rem;
  letter-spacing: .04em;
}

/* ---------- 14. Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: rgba(8, 9, 11, .6);
  padding-top: 56px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 44px;
  padding-bottom: 46px;
}

.footer-tag {
  max-width: 300px;
  margin-top: 16px;
  color: var(--dim);
  font-size: .87rem;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: var(--muted);
  font-size: .78rem;
}

.footer-links { display: flex; gap: 72px; }
.footer-links h3 {
  margin-bottom: 14px;
  color: var(--dim);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.footer-links a {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: .89rem;
  transition: color .2s ease;
}
.footer-links a:hover { color: #fff; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  padding-bottom: 30px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: .8rem;
}
.footer-ver { font-family: var(--mono); font-size: .74rem; }

/* ---------- 15. Motion & responsive ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.22, .61, .36, 1), transform .8s cubic-bezier(.22, .61, .36, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 1180px) {
  .stage { --ide-w: 640px; --crew-top: 138px; --crew-bottom: 164px; --slot-h: 232px; }
  .stage .ide-body { grid-template-columns: 148px minmax(0, 1fr) 222px; }
}

@media (max-width: 1130px) {
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .ide-body { grid-template-columns: 158px 1fr 200px; }
  .ide--lg .ide-body { grid-template-columns: 176px 1fr 236px; }
}

/* Narrow sides: smaller robots, and the explorer makes room for the roster */
@media (max-width: 1024px) {
  .stage { --ide-w: 540px; --crew-top: 128px; --crew-bottom: 156px; --slot-h: 214px; --bot-w: calc(var(--crew-side) - 26px); }
  .stage .ide-body { grid-template-columns: minmax(0, 1fr) 224px; }
  .stage .ide-side { display: none; }
}

/* Too narrow beside the IDE: the crew moves to two rows, Plan + Ship above,
   Code + Test below. Top captions sit above their robots so links drop straight in. */
@media (max-width: 960px) {
  .stage {
    --ide-w: min(640px, calc(100vw - 40px));
    --crew-side: 12px;
    --crew-top: 262px;
    --crew-bottom: 262px;
    --bot-w: calc(50% - 6px);
    --slot-h: 196px;
  }
  .crew { --crew-mode: rows; }
  .bot--plan, .bot--ship { flex-direction: column-reverse; }
  .bot--plan .bot-cap, .bot--ship .bot-cap { margin: 0 0 4px; }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }

  .why-grid { grid-template-columns: 1fr; gap: 18px; }

  .ring-a { width: 700px; height: 700px; }
  .ring-b { width: 500px; height: 500px; }

  .ide-body { grid-template-columns: 148px 1fr; }
  .ide--lg .ide-body { grid-template-columns: 140px 1fr 200px; }

  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-links { gap: 48px; }
}

@media (max-width: 640px) {
  .container { padding-inline: 18px; }
  .feat-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .ide-title { font-size: .66rem; }
  .ide-actions .pill:not(.pill-run) { display: none; }
  .code { font-size: .68rem; }
  .ide--lg .code { font-size: .72rem; }

  .stage { --ide-w: calc(100vw - 32px); --crew-top: 216px; --crew-bottom: 216px; --slot-h: 164px; }
  .crew-token { font-size: .58rem; padding: 2px 6px; }
  .bot-cap { gap: 8px; }
  .bot-title { font-size: .66rem; letter-spacing: .18em; }
  .bot-title small { font-size: .62rem; }

  /* Hero IDE stacks: a few lines of code over a 2 x 2 roster */
  .stage .ide-body { grid-template-columns: 1fr; height: auto; }
  .stage .code { max-height: 136px; padding-block: 10px; }
  .stage .ide-status, .stage .agent-input { display: none; }
  .stage .ide-crew { gap: 6px; padding: 10px 12px 12px; border-left: 0; border-top: 1px solid var(--line); }
  .stage .crew-roster { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
  .stage .crew-row { grid-template-columns: 6px auto minmax(0, 1fr); gap: 6px; padding: 6px; }
  .stage .crew-st { display: none; }

  .ide-body { grid-template-columns: 1fr; }
  .ide-side { display: none; }
  .ide--lg .ide-body { grid-template-columns: 1fr; }
  .ide--lg .ide-agent { display: none; }
  .footer-links { gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-slowest, .float-slow, .float-med, .float-fast,
  .live, .caret { animation: none; }
  .stage-inner, .layer { transition: none; transform: none; }
  .stage-inner { transform: rotateX(0) rotateY(0); }
  .layer { transform: translate3d(-50%, -50%, calc(var(--d, 0) * 34px)); }
  .crew-gl, .bot-art, .crew-token { transition: none; }
  .btn:hover, .dl-card:hover, .feat:hover { transform: none; }
}
