/* QIVE: the 3D stage, glass surfaces and motion. Loaded after qive.css, so it wins where they overlap. */
html { background: #03040a; scroll-behavior: auto; }
body, body.has-3d { background: transparent; background-image: none; }
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
#app { position: relative; z-index: 2; }
body::before { content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 45%, rgba(2, 3, 10, .75) 100%),
              linear-gradient(rgba(130, 150, 255, .045) 1px, transparent 1px) 0 0 / 64px 64px,
              linear-gradient(90deg, rgba(130, 150, 255, .045) 1px, transparent 1px) 0 0 / 64px 64px;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 40%, #000 30%, transparent 100%); mask-image: radial-gradient(90% 80% at 50% 40%, #000 30%, transparent 100%); }
#prog { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: var(--grad); box-shadow: 0 0 12px rgba(138, 92, 255, .8); }

.top { background: rgba(5, 6, 20, .55); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
body.scrolled .top { border-bottom-color: rgba(140, 160, 255, .14); }
.sheet { background: rgba(5, 6, 20, .92); }
.foot { background: rgba(4, 5, 15, .6); backdrop-filter: blur(16px); border-top: 1px solid rgba(140, 160, 255, .12); }

h1, h2, h3, .brand, .stats b, .hud b { font-family: var(--head); }
h1, h2 { font-weight: 800; letter-spacing: -.045em; }
.soft { background: linear-gradient(100deg, #22e0d0, #8a5cff, #b06bff, #22e0d0); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hue 7s linear infinite; }
@keyframes hue { to { background-position: 250% 0; } }
.hero { min-height: calc(100vh - 140px); padding: 40px 0 30px; align-items: center; grid-template-columns: 1.05fr .95fr; }
.hero h1 { font-size: clamp(42px, 6.4vw, 92px); line-height: 1.02; text-shadow: 0 0 60px rgba(120, 130, 255, .25); }
.hero .lead { color: #b6c0e6; }
.hero-art::before, .hero-art img { display: none; }

/* glass cards with a pointer spotlight and a gradient edge */
.card { position: relative; background: linear-gradient(160deg, rgba(20, 24, 62, .62), rgba(9, 11, 32, .55)); backdrop-filter: blur(18px) saturate(1.35); -webkit-backdrop-filter: blur(18px) saturate(1.35);
  border: 1px solid rgba(140, 160, 255, .16); transition: transform .35s var(--ease), border-color .3s, box-shadow .3s; will-change: transform; }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(120, 120, 255, .16), transparent 60%); }
.card::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .3s; background: var(--grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.card:hover::before, .card:hover::after { opacity: 1; }
.card:hover { box-shadow: 0 24px 70px rgba(70, 60, 200, .22); }
.tilt { transform-style: preserve-3d; }
.focus-card .ic { background: linear-gradient(135deg, rgba(34, 224, 208, .22), rgba(176, 107, 255, .2)); box-shadow: inset 0 0 0 1px rgba(160, 170, 255, .25); }
.focus-card:nth-child(even) .ic { background: linear-gradient(135deg, rgba(138, 92, 255, .25), rgba(176, 107, 255, .18)); }
.step::before { background: var(--grad); color: #fff; box-shadow: 0 0 22px rgba(138, 92, 255, .55); }

/* buttons: gradient pills with a glow */
.btn { background: var(--grad); border: 0; color: #fff; text-shadow: 0 1px 0 rgba(20, 10, 60, .25); box-shadow: 0 10px 34px rgba(110, 90, 255, .38), inset 0 1px 0 rgba(255, 255, 255, .28); position: relative; }
.btn:hover { background: var(--grad); filter: brightness(1.12); box-shadow: 0 14px 44px rgba(130, 90, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--ink); border: 1px solid rgba(160, 175, 255, .28); box-shadow: none; text-shadow: none; backdrop-filter: blur(10px); }
.btn.ghost:hover { background: rgba(120, 120, 255, .14); border-color: #7fc8ff; color: #fff; filter: none; box-shadow: none; }
.ib, .btn-wallet { background: rgba(255, 255, 255, .04); border-color: rgba(160, 175, 255, .22); }
.ib:hover, .btn-wallet:hover { border-color: #7fc8ff; }
.top-links a.on { background: rgba(120, 120, 255, .16); color: #fff; }
.top-links a:hover { background: rgba(120, 120, 255, .1); }
.kicker { background: rgba(120, 120, 255, .1); border-color: rgba(160, 175, 255, .25); color: #c6d0f5; }
.tag { background: rgba(120, 120, 255, .14); color: #b9c8ff; }
.seg button.on, .fp.on, .chip.on { background: rgba(120, 120, 255, .18); border-color: #7fc8ff; color: #fff; box-shadow: 0 0 0 1px rgba(127, 200, 255, .35), 0 0 24px rgba(120, 110, 255, .22); }
.fp, .chip { background: rgba(255, 255, 255, .03); }
input[type=text], input[type=url], input[type=number], textarea, input:not([type]), .tick-in { background: rgba(5, 7, 24, .6); }
input:focus, textarea:focus { border-color: #7fc8ff; box-shadow: 0 0 0 4px rgba(120, 130, 255, .18); }
.status { background: rgba(120, 120, 255, .12); }
.status.err { background: rgba(255, 90, 80, .12); }
.status.ok { background: rgba(98, 224, 180, .12); color: #7fe9c2; }
.bar i b { background: var(--grad); }
.diagram, pre.qasm, details.more, .metric, .drop { background: rgba(4, 6, 22, .55); }
.empty { background: rgba(255, 255, 255, .02); border-color: rgba(160, 175, 255, .22); }

/* data strip and ticker */
.hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 10px 0 0; border: 1px solid rgba(140, 160, 255, .16); border-radius: 20px; overflow: hidden; background: rgba(140, 160, 255, .12); backdrop-filter: blur(16px); }
.hud > div { background: rgba(7, 9, 30, .72); padding: 22px 24px; display: grid; gap: 2px; }
.hud b { font-size: clamp(28px, 3.4vw, 44px); letter-spacing: -.04em; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hud span { color: var(--mute); font: 500 12px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.marquee { overflow: hidden; margin: 26px 0 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee > div { display: flex; gap: 14px; width: max-content; animation: scrollx 38s linear infinite; }
.marquee span { padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(160, 175, 255, .2); background: rgba(255, 255, 255, .03); color: #b9c4ee; font: 500 13px var(--mono); white-space: nowrap; }
.marquee span:nth-child(3n) { color: #d9b8ff; }
.marquee span:nth-child(3n+1) { color: #7ff0e6; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* reveal: rise and unblur */
[data-fade] { opacity: 0; transform: translateY(34px) scale(.985); filter: blur(8px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
[data-fade].is-in { opacity: 1; transform: none; filter: none; }
.sec { padding: 80px 0; }
.sec-h h2 { font-size: clamp(30px, 4.2vw, 56px); }
::selection { background: rgba(138, 92, 255, .5); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

@media (max-width: 960px) { .hero { min-height: auto; padding-top: 250px; } .hero-art { display: none; } }
@media (max-width: 800px) { .hud { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { [data-fade] { filter: none; } .marquee > div, .soft { animation: none !important; } }

.foot-social { display: flex; gap: 8px; margin-top: 16px; }
.sheet-social { display: flex; gap: 8px; padding: 14px 0 4px; }

/* ---------- the hive: demo on the home page and the trail on a run ---------- */
.swarm { padding: 26px; display: grid; gap: 22px; }
.stages { display: grid; grid-template-columns: 1.05fr 1fr 1fr; gap: 16px; }
.stage { border: 1px solid rgba(140, 160, 255, .16); border-radius: 22px; padding: 20px; background: rgba(4, 6, 22, .55); opacity: .38; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .6s, box-shadow .6s; }
.stage.on { opacity: 1; transform: none; border-color: rgba(34, 224, 208, .45); box-shadow: 0 0 60px rgba(34, 224, 208, .1), inset 0 0 40px rgba(138, 92, 255, .06); }
.st-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.st-h i { width: 30px; height: 30px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; font: 800 14px var(--head); color: #04120f; font-style: normal; }
.st-h b { font: 800 19px var(--head); letter-spacing: -.02em; }
.st-h span { color: var(--mute); font-size: 13px; }
.st-b p { margin: 12px 0 0; color: var(--mute); font-size: 14px; line-height: 1.5; }
.stage .diagram { transform: scale(.86); transform-origin: 0 0; width: 116%; margin-bottom: -14px; }
.gbars { display: grid; gap: 14px; }
.gb { display: grid; gap: 6px; }
.gb span { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.gb i { height: 14px; border-radius: 7px; background: rgba(150, 165, 255, .12); overflow: hidden; }
.gb b { display: block; height: 100%; width: 0; border-radius: 7px; transition: width 1.1s var(--ease); }
.stage.on .gb b { width: var(--w); }
.gb b.g1 { background: rgba(150, 165, 255, .55); } .gb b.g2 { background: linear-gradient(90deg, #5f5cff, #8a5cff); } .gb b.g3 { background: var(--grad); box-shadow: 0 0 18px rgba(34, 224, 208, .5); }
.gb em { font: 500 13px var(--mono); font-style: normal; color: var(--ink); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.checks li { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink); }
.checks li i { width: 18px; height: 18px; border-radius: 50%; border: 1.6px solid var(--dim); position: relative; }
.checks li.ok i { border-color: #22e0d0; background: rgba(34, 224, 208, .16); }
.checks li.ok i::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 9px; border: solid #22e0d0; border-width: 0 2px 2px 0; transform: rotate(40deg); }
.checks li.bad i { border-color: #ff8a80; background: rgba(255, 138, 128, .15); }
.checks li em { font: 500 12px var(--mono); color: var(--mute); font-style: normal; }
.stage .checks li { opacity: 0; transform: translateX(-8px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.stage.on .checks li { opacity: 1; transform: none; }
.stage.on .checks li:nth-child(2) { transition-delay: .25s; } .stage.on .checks li:nth-child(3) { transition-delay: .5s; } .stage.on .checks li:nth-child(4) { transition-delay: .75s; } .stage.on .checks li:nth-child(5) { transition-delay: 1s; }
.verdict { margin-top: 16px; display: inline-block; padding: 9px 18px; border-radius: 999px; font: 700 14px var(--sans); border: 1px solid var(--line2); opacity: 0; transition: opacity .5s 1.2s; }
.stage.on .verdict { opacity: 1; }
.verdict.verified { background: rgba(34, 224, 208, .14); color: #7ff0e6; border-color: rgba(34, 224, 208, .5); box-shadow: 0 0 30px rgba(34, 224, 208, .25); }
.verdict.flagged { background: rgba(255, 138, 128, .12); color: #ff8a80; border-color: rgba(255, 138, 128, .4); }
.trail { display: grid; gap: 0; }
.trail-row { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.trail-row i { width: 30px; height: 30px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; font: 800 14px var(--head); color: #04120f; font-style: normal; }
.trail-row b { font-size: 15px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.trail-row p { margin: 4px 0 0; color: var(--mute); font-size: 14px; line-height: 1.5; }
.trail .checks { margin-top: 6px; padding: 14px 0 4px; border-top: 1px solid var(--line); }
.tag.bad { background: rgba(255, 138, 128, .14); color: #ff8a80; }
@media (max-width: 960px) { .stages { grid-template-columns: 1fr; } .stage { opacity: 1; transform: none; } .stage .gb b { width: var(--w); } .stage .checks li, .stage .verdict { opacity: 1; transform: none; } }
.trail-row > div { min-width: 0; }
.trail-row p, .st-b p { overflow-wrap: anywhere; }
.exp, .exp-inner, .card { min-width: 0; }
