/* The home page's demo (assets/demo.js builds it into #gs-demo and plays it): one square, one thing
   at a time. A still spider, the agent connected, a request in plain words, the price, the make and
   its checks, the still turning into the animation, its memory, and the three steps. The same page
   renders frame by frame into the 1080 x 1080 MP4 (scripts/render-demo.mjs), so every size is in
   cqw: 1cqw is 1 % of the square (10.8 px in the video), and the page scales it as a whole.
   Every moving value is set by demo.js from one clock; nothing here animates on its own. */
.gs-demo { --gd-bg: #13101d; max-width: 640px; margin: 0 auto; color: var(--text); font-family: var(--gd-sans, Inter, system-ui, sans-serif); }
.gd-sq { position: relative; container-type: inline-size; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: var(--gd-bg); box-shadow: 0 40px 100px rgba(0, 0, 0, .5); }
.gd-scene { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.2cqw; padding: 7cqw 6cqw; text-align: center; opacity: 0; }
.gd-h { margin: 0; text-wrap: balance; font: 800 6.4cqw/1.1 var(--gd-display, Sora, Inter, sans-serif); letter-spacing: -.02em; color: var(--text); }
.gd-p { margin: 0; text-wrap: balance; font-size: 3.6cqw; line-height: 1.35; color: var(--mute); }
.gd-ok { color: var(--accent2); }
.gd-ck { display: inline-block; width: 1em; height: 1em; margin-right: .35em; vertical-align: -.12em; }

/* The spider: a still picture, or the clip over it (a canvas when rendering video). */
.gd-art { position: relative; flex: none; }
.gd-art img, .gd-art canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.gd-clip { opacity: 0; }
.gd-s1 .gd-art { width: 58cqw; height: 58cqw; }
.gd-label { margin: 0; padding: .5cqw 2.4cqw; border: 1px solid var(--line); border-radius: 999px; font: 3.4cqw/1.4 var(--gd-mono, ui-monospace, "Cascadia Code", Consolas, monospace); color: var(--mute); font-variant-ligatures: none; }

/* Connect: one command, two lines. */
.gd-type { display: grid; }
.gd-type > span { grid-area: 1 / 1; }
.gd-ghost { visibility: hidden; }
.gd-s2 { padding-left: 3.5cqw; padding-right: 3.5cqw; }
.gd-code { margin: 0; padding: 3.4cqw 3.6cqw; border: 1px solid var(--line); border-radius: 2.6cqw; background: #0d0b14; text-align: left; white-space: pre; font: 2.8cqw/1.6 var(--gd-mono, ui-monospace, "Cascadia Code", Consolas, monospace); color: var(--text); font-variant-ligatures: none; }
.gd-ps { color: var(--accent); font-weight: 700; }
.gd-caret { display: inline-block; width: .55em; height: 1.1em; margin-left: .08em; vertical-align: -.2em; background: var(--text); border-radius: 1px; }
.gd-done { margin: 0; font-size: 4.2cqw; font-weight: 600; }

/* Ask, and the reply to the price: chat bubbles. */
.gd-bubble { max-width: 80cqw; margin: 0; padding: 2.8cqw 3.6cqw; border-radius: 3.4cqw 3.4cqw 1cqw 3.4cqw; background: #2a2148; border: 1px solid #3d3266; text-align: left; font-size: 4.2cqw; line-height: 1.4; color: var(--text); }
.gd-bubble .gd-caret { width: .08em; margin-left: .06em; }
.gd-yes { align-self: flex-end; margin-right: 8cqw; background: #6b4ef0; border-color: #6b4ef0; color: #fff; font-weight: 600; }
.gd-sp { display: block; height: 0; }

/* The price. */
.gd-big { margin: 0; font: 800 11cqw/1 var(--gd-display, Sora, Inter, sans-serif); letter-spacing: -.03em; color: var(--text); }
.gd-usd { margin: -1cqw 0 0; font: 700 5.2cqw/1.2 var(--gd-display, Sora, Inter, sans-serif); color: var(--accent2); }

/* Made: the still in a progress ring, the clock, the checks. */
.gd-ring { position: relative; flex: none; width: 40cqw; height: 40cqw; }
.gd-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.gd-ring .gd-art { position: absolute; inset: 6.2cqw; overflow: hidden; border-radius: 50%; }
.gd-track { fill: none; stroke: #2a2340; stroke-width: 2.2; }
.gd-arc { fill: none; stroke: url(#gd-grad); stroke-width: 2.2; stroke-linecap: round; }
.gd-clock { margin: -1cqw 0 0; font: 700 5.2cqw/1.1 var(--gd-mono, ui-monospace, "Cascadia Code", Consolas, monospace); font-variant-numeric: tabular-nums; color: var(--text); }
.gd-checks { display: grid; gap: 1.2cqw; margin: 0; padding: 0; list-style: none; text-align: left; font-size: 3.8cqw; font-weight: 600; color: var(--text); }
.gd-checks li { opacity: 0; }
.gd-checks .gd-ck { color: var(--accent2); }

/* The reveal: the still turns into the animation. */
.gd-s6 { justify-content: flex-start; padding-top: 5cqw; gap: 2.4cqw; }
.gd-s6 .gd-art { width: 70cqw; height: 70cqw; }
.gd-tag { position: absolute; top: 2.4cqw; left: 2.4cqw; z-index: 2; margin: 0; padding: .6cqw 2.2cqw; border-radius: 999px; font: 700 3.4cqw/1.3 var(--gd-sans, Inter, sans-serif); letter-spacing: .02em; }
.gd-tag.still { background: #2a2340; color: var(--mute); }
.gd-tag.anim { background: rgba(46, 230, 197, .16); color: var(--accent2); box-shadow: 0 0 0 1px rgba(46, 230, 197, .45) inset; }
.gd-cap { margin: 0; font: 700 5.2cqw/1.25 var(--gd-display, Sora, Inter, sans-serif); color: var(--text); }
.gd-cap span { display: block; }
.gd-cap span + span { color: var(--accent2); }
.gd-static .gd-tag { display: none; }

/* Sharp and smooth: two figures, one under the other. */
.gd-stat { display: grid; justify-items: center; gap: .6cqw; }
.gd-stat + .gd-stat { margin-top: 3.6cqw; }
.gd-stat-n { margin: 0; font: 800 13cqw/1 var(--gd-display, Sora, Inter, sans-serif); letter-spacing: -.03em; }
.gd-stat-n small { font-size: .45em; color: var(--accent2); }
.gd-stat .gd-p { margin: 0; }

/* Light enough for a phone: the memory on the budget. */
.gd-mb { margin: 0; font: 800 14cqw/1 var(--gd-display, Sora, Inter, sans-serif); letter-spacing: -.03em; }
.gd-mb small { font-size: .45em; color: var(--mute); }
.gd-budget { width: 76cqw; }
.gd-bar { height: 2.6cqw; border-radius: 99px; background: #2a2340; overflow: hidden; }
.gd-bar i { display: block; width: 8.84%; min-width: 2.6cqw; height: 100%; border-radius: 99px; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.gd-scale { display: flex; justify-content: space-between; margin-top: 1.2cqw; font-size: 3.4cqw; color: var(--mute); }

/* The end card. */
.gd-mark { display: inline-flex; align-items: center; gap: 2.4cqw; font: 700 7cqw/1 var(--gd-display, Sora, Inter, sans-serif); }
.gd-mark svg { width: 11cqw; height: 11cqw; }
.gd-mark b { color: var(--accent); font-weight: 800; }
.gd-url { margin: 0; font-size: 4.2cqw; font-weight: 600; color: var(--accent2); }

/* Without script, or before it runs: the picture and the three steps. */
.gd-fallback { display: grid; justify-items: center; gap: 16px; padding: 24px; border: 1px solid var(--line); border-radius: 28px; background: var(--gd-bg); text-align: center; }
.gd-fallback img { width: min(320px, 70%); height: auto; border-radius: 16px; }
.gd-fallback p { margin: 0; color: var(--mute); }
