:root {
  --bg: #121314;
  --bg-2: #18191b;
  --panel: rgba(24, 25, 27, 0.72);
  --edge: rgba(255, 255, 255, 0.09);
  --ink: #ecebe4;
  --muted: #a3a39c;
  --lime: #a7de59;
  --lime-ink: #142006;
  --c-events: #4dba74;
  --c-files: #5d9ae5;
  --c-system: #6284a4;
  --c-input: #46a969;
  --c-detection: #1ab7a2;
  --c-loops: #e59437;
  --c-variables: #9a78cb;
  --c-functions: #b48ae0;
  --font: "Space Grotesk", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
body {
  margin: 0;
  background: radial-gradient(1200px 800px at 75% 20%, #1c2216 0%, transparent 60%), var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 var(--font);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.03em; font-weight: 600; }
h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
em { font-style: normal; color: var(--lime); }
code, kbd, pre { font-family: var(--mono); }
kbd { padding: 0.1em 0.45em; border: 1px solid var(--edge); border-bottom-width: 2px; border-radius: 6px; background: #222426; font-size: 0.85em; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: var(--lime); color: var(--lime-ink); font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip-link:focus { top: 16px; }

/* ---------- 3D stage ---------- */
.stage { position: fixed; inset: 0; z-index: 0; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at center, transparent 55%, rgba(8, 9, 10, 0.65) 100%); }
.no-webgl .stage { background: radial-gradient(600px 400px at 70% 40%, rgba(167, 222, 89, 0.12), transparent 70%); }

.scroll-progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-events), var(--lime)); transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Nav ---------- */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--nav-h); padding: 0 clamp(16px, 4vw, 48px);
  background: linear-gradient(to bottom, rgba(18, 19, 20, 0.85), rgba(18, 19, 20, 0));
  backdrop-filter: blur(6px);
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.02em; }
.nav-brand img { border-radius: 7px; }
.site-nav nav { display: flex; gap: 4px; }
.site-nav nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-size: 0.92rem; text-decoration: none; transition: color 0.2s, background 0.2s; }
.site-nav nav a:hover, .site-nav nav a.active { color: var(--ink); background: rgba(255, 255, 255, 0.06); }

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer; transition: background 0.2s, color 0.2s, box-shadow 0.3s, border-color 0.2s; will-change: transform; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--lime); color: var(--lime-ink); box-shadow: 0 0 0 0 rgba(167, 222, 89, 0.5), 0 10px 30px -10px rgba(167, 222, 89, 0.6); }
.btn-primary:hover { background: #b9ec6c; box-shadow: 0 0 0 6px rgba(167, 222, 89, 0.15), 0 14px 40px -10px rgba(167, 222, 89, 0.8); }
.btn-ghost { border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.03); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.07); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 0.92rem; }
.btn-large { min-height: 58px; padding: 0 32px; font-size: 1.08rem; }

/* ---------- Layout ---------- */
main { position: relative; z-index: 2; }
.section { position: relative; min-height: 100vh; min-height: 100svh; }
.section.tall { height: 190vh; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; }
.wrap { width: min(1240px, 100% - clamp(32px, 8vw, 96px)); margin-inline: auto; }
.split { display: flex; }
.split .copy { width: min(520px, 100%); }
.split.reverse { justify-content: flex-end; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--lime); font: 500 0.82rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.14em; }
.lead { margin: 20px 0 0; color: var(--muted); font-size: clamp(1.02rem, 1.4vw, 1.18rem); max-width: 56ch; }
.meta { margin: 22px 0 0; color: var(--muted); font: 0.85rem var(--mono); }
.fine { margin: 14px 0 0; color: var(--muted); font-size: 0.85rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.cta-row.center { justify-content: center; }
.panel { position: relative; }

/* ---------- Hero ---------- */
.hero { display: flex; align-items: center; padding-top: var(--nav-h); }
.hero-inner { padding-bottom: 120px; }
.hero-title { font-size: clamp(3rem, 8.4vw, 7.2rem); font-weight: 700; max-width: 9.5ch; line-height: 0.95; letter-spacing: -0.045em; }
.hero .lead { max-width: 46ch; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(167, 222, 89, 0.7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(167, 222, 89, 0); } 100% { box-shadow: 0 0 0 0 rgba(167, 222, 89, 0); } }

.scroll-cue { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--muted); font: 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.2em; }
.scroll-cue span { width: 22px; height: 36px; border: 1.5px solid rgba(255, 255, 255, 0.3); border-radius: 12px; position: relative; }
.scroll-cue span::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--lime); animation: wheel 1.8s var(--ease) infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

.marquee { position: absolute; left: 0; right: 0; bottom: 22px; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 12px; width: max-content; animation: marquee 40s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

.chip, .tag { display: inline-flex; align-items: center; white-space: nowrap; padding: 7px 14px; border-radius: 8px 8px 4px 4px; background: var(--c); color: #fff; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22); }
.c-events { --c: var(--c-events); } .c-files { --c: var(--c-files); } .c-system { --c: var(--c-system); } .c-input { --c: var(--c-input); }
.c-detection { --c: var(--c-detection); } .c-loops { --c: var(--c-loops); } .c-variables { --c: var(--c-variables); } .c-functions { --c: var(--c-functions); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 34px 0 0; padding: 0 0 0 4px; display: grid; gap: 26px; position: relative; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: 18px; transition: opacity 0.4s; }
.js .step { opacity: 0.35; }
.js .step.is-active { opacity: 1; }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--edge); background: #1c1e1f; font: 500 1rem var(--mono); transition: background 0.4s, color 0.4s, border-color 0.4s; }
.step.is-active .step-num { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.step h3 { margin-top: 2px; }
.step p { margin: 6px 0 0; color: var(--muted); }
.steps-rail { position: absolute; left: 25px; top: 230px; bottom: 30px; width: 2px; background: var(--edge); z-index: -1; display: none; }

/* ---------- Categories ---------- */
#blocks { padding: 140px 0 120px; }
.section-head.center { text-align: center; display: flex; flex-direction: column; align-items: center; }
.section-head.center .lead { margin-inline: auto; }
.cat-grid { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; perspective: 900px; }
.cat-card { position: relative; padding: 22px 22px 24px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--panel); backdrop-filter: blur(14px); transform-style: preserve-3d; transition: border-color 0.3s, box-shadow 0.3s; overflow: hidden; }
.cat-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--c); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--c) 22%, transparent), transparent 60%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.cat-card:hover { border-color: color-mix(in srgb, var(--c) 55%, transparent); box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--c) 60%, transparent); }
.cat-card:hover::after { opacity: 1; }
.cat-swatch { display: block; width: 40px; height: 22px; border-radius: 6px 6px 3px 3px; background: var(--c); margin-bottom: 18px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.22); }
.cat-card p { margin: 8px 0 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.stats { margin: 56px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stats div { padding: 22px; border-top: 1px solid var(--edge); border-radius: 0 0 var(--radius) var(--radius); background: linear-gradient(to bottom, rgba(18, 19, 20, 0.7), rgba(18, 19, 20, 0.25)); backdrop-filter: blur(10px); }
.stats dt { color: var(--muted); font: 0.78rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }
.stats dd { margin: 6px 0 0; font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }

/* ---------- Detection scanner ---------- */
.scanner { margin-top: 30px; border: 1px solid var(--edge); border-radius: var(--radius); background: #161718; overflow: hidden; max-width: 460px; }
.scan-screen { position: relative; height: 190px; background: linear-gradient(#2e3131 1px, transparent 1px) 0 0 / 24px 24px, linear-gradient(90deg, #2e3131 1px, transparent 1px) 0 0 / 24px 24px, #202223; overflow: hidden; }
.scan-window { position: absolute; left: 12%; top: 18%; width: 70%; height: 64%; padding: 14px; border-radius: 8px; background: #2a2c2e; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.scan-bar { display: block; height: 8px; width: 70%; border-radius: 4px; background: #3a3d3f; margin-bottom: 8px; }
.scan-bar.short { width: 40%; }
.scan-button { position: absolute; right: 14px; bottom: 14px; padding: 6px 16px; border-radius: 6px; background: #4a4d50; color: #d6d6d0; font-size: 0.8rem; font-weight: 600; transition: background 0.3s, color 0.3s; }
.scan-button.is-green { background: var(--c-events); color: #fff; }
.scan-cross { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 2px solid var(--lime); border-radius: 50%; }
.scan-cross::before, .scan-cross::after { content: ""; position: absolute; background: var(--lime); }
.scan-cross::before { left: 50%; top: -10px; bottom: -10px; width: 1px; }
.scan-cross::after { top: 50%; left: -10px; right: -10px; height: 1px; }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--c-detection); box-shadow: 0 0 18px 4px rgba(26, 183, 162, 0.6); animation: scanline 3s ease-in-out infinite alternate; }
@keyframes scanline { to { transform: translateY(188px); } }
.scan-readout { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 16px; font: 0.8rem var(--mono); color: var(--muted); }
.scan-readout b { color: var(--ink); font-weight: 500; }
.swatch-mini { width: 14px; height: 14px; border-radius: 4px; background: var(--scan-hex, #202223); border: 1px solid var(--edge); }
.scan-status { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); }
.scan-status.is-match { background: var(--lime); color: var(--lime-ink); }

/* ---------- Logic ---------- */
.logic-list { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 14px; }
.logic-list li { display: flex; align-items: baseline; gap: 14px; color: var(--muted); }
.logic-list .tag { flex: none; min-width: 112px; justify-content: center; }
.logic-list code { color: var(--ink); }
.vars { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.var { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--c-variables) 50%, transparent); background: color-mix(in srgb, var(--c-variables) 14%, #161718); font-size: 0.88rem; }
.dice { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--c-variables); color: #fff; font-weight: 500; }

/* ---------- AI ---------- */
.ai-demo { margin-top: 28px; padding: 18px; border: 1px solid var(--edge); border-radius: var(--radius); background: #161718; max-width: 480px; }
.ai-prompt { display: flex; align-items: center; min-height: 52px; padding: 12px 14px; border-radius: 10px; background: #202223; font-size: 0.95rem; }
.ai-spark { flex: none; width: 18px; height: 18px; margin-right: 10px; background: var(--lime); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.caret { width: 2px; height: 1.2em; margin-left: 2px; background: var(--lime); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ai-blocks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 4px; }
.mini { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px 7px 3px 3px; background: var(--c); color: #fff; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.22); }
.mini.indent { margin-left: 22px; }
.mini .field { padding: 2px 8px; border-radius: 4px; background: rgba(20, 20, 20, 0.45); font: 0.76rem var(--mono); text-transform: none; }
.providers { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.providers li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--edge); color: var(--muted); font-size: 0.84rem; }

/* ---------- Code ---------- */
.code-card { margin-top: 28px; border: 1px solid var(--edge); border-radius: var(--radius); background: #141516; overflow: hidden; max-width: 560px; }
.code-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid var(--edge); }
.code-tabs span { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 0.82rem; }
.code-tabs span.active { background: #222426; color: var(--ink); }
.code-card pre { margin: 0; padding: 18px 0; overflow-x: auto; font-size: 0.84rem; line-height: 1.75; }
.code-card pre code { display: flex; flex-direction: column; white-space: pre; }
.ln { display: block; padding: 0 18px; border-left: 2px solid transparent; transition: background 0.3s, border-color 0.3s; }
.ln.is-lit { background: rgba(167, 222, 89, 0.07); border-left-color: var(--lime); }
.kw { color: #db7599; } .st { color: var(--lime); } .nu { color: var(--c-loops); } .cm { color: #6d706b; }

/* ---------- App preview ---------- */
.app-showcase { min-height: 0; padding: 120px 0 40px; }
.app-window { position: relative; margin: 56px auto 0; max-width: 1120px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 14px; background: #111213; overflow: hidden; box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.6), 0 30px 90px -40px rgba(167, 222, 89, 0.35); user-select: none; cursor: default; }
.am-titlebar { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-bottom: 1px solid #292b2c; background: #141516; color: #8d8f89; font-size: 12px; }
.am-titlebar img { border-radius: 3px; }
.am-titlebar i { width: 10px; height: 10px; border-radius: 50%; background: #2e3031; }
.am-titlebar span { margin-right: auto; }
.am-shell { display: grid; grid-template-columns: 190px 225px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 620px; font-size: 12px; line-height: 1.4; letter-spacing: normal; }
.am-shell h3, .am-shell p { margin: 0; }

.am-sidebar { display: flex; flex-direction: column; border-right: 1px solid #303233; background: #171819; min-width: 0; }
.am-brand { display: flex; align-items: center; height: 69px; padding: 0 16px; border-bottom: 1px solid #292b2c; font-weight: 700; font-size: 15px; letter-spacing: 0.4px; }
.am-nav { display: grid; gap: 3px; padding: 13px 8px; }
.am-nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 9px; border-left: 3px solid transparent; text-transform: uppercase; font-weight: 600; font-size: 13px; letter-spacing: 0.25px; white-space: nowrap; }
.am-nav-item b { width: 20px; font-weight: 400; font-size: 18px; text-align: center; }
.am-nav-item.active { border-left-color: var(--lime); background: #252827; }
.am-library { margin-top: auto; padding: 14px 8px 15px; border-top: 1px solid #292b2c; }
.am-library p { margin: 0 7px 8px; color: #747671; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.1px; }
.am-flow { display: block; padding: 7px; border-radius: 4px; font: 12px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-flow.selected { background: #343636; }
.am-flow.am-link { margin-top: 4px; color: var(--lime); }

.am-palette { padding: 18px 11px; border-right: 1px solid #303233; background: #202223; min-width: 0; }
.am-search { display: flex; align-items: center; gap: 7px; height: 33px; padding: 0 10px; border: 1px solid #3a3c3c; border-radius: 5px; color: #777a78; background: #1a1c1d; }
.am-search span { color: #949692; }
.am-palette-head { display: flex; align-items: center; gap: 8px; margin: 28px 7px 12px; text-transform: uppercase; font-weight: 700; font-size: 12px; letter-spacing: 0.4px; }
.am-palette-head i { width: 12px; height: 12px; border-radius: 2px; background: var(--lime); }
.am-pblock { margin-bottom: 8px; padding: 10px; border-left: 4px solid var(--c-files); border-radius: 4px; background: #2b2d2d; color: #eee9df; box-shadow: inset 0 0 0 1px #404241; }
.am-pblock small { display: block; margin-top: 3px; color: #a9aaa5; font-size: 10px; }
.am-hint { margin: 24px 6px 0; color: #a5a8a2; font-size: 11px; line-height: 1.5; }

.am-editor { display: grid; grid-template-rows: 69px minmax(0, 1fr) 43px; min-width: 0; background: #212324; }
.am-topbar { display: flex; align-items: center; justify-content: flex-end; gap: 11px; padding: 0 22px; border-bottom: 1px solid #323435; }
.am-icon { display: grid; place-items: center; width: 32px; height: 32px; color: #a8aba4; font-size: 21px; }
.am-run { display: inline-flex; align-items: center; justify-content: center; min-width: 89px; padding: 8px 15px; border-radius: 4px; background: #3d3f3f; font-size: 12px; font-weight: 600; transition: background 0.3s, color 0.3s; }
.am-run.is-running { background: var(--lime); color: var(--lime-ink); }
.am-workspace { position: relative; overflow: hidden; background: #202223; }
.am-grid { position: absolute; inset: 0; opacity: 0.52; background-image: linear-gradient(#2e3131 1px, transparent 1px), linear-gradient(90deg, #2e3131 1px, transparent 1px), linear-gradient(#252728 1px, transparent 1px), linear-gradient(90deg, #252728 1px, transparent 1px); background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px; }
.am-mode { position: absolute; z-index: 5; top: 10px; left: 50%; display: flex; overflow: hidden; border: 1px solid #3e4040; border-radius: 5px; transform: translateX(-50%); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.28); }
.am-mode span { min-width: 113px; padding: 6px 12px; background: #303232; color: #b4b5ae; font-size: 11px; text-align: center; }
.am-mode span + span { border-left: 1px solid #4b4d4d; }
.am-mode span.active { background: #454747; color: #f2f0e8; }

.am-stack { position: absolute; width: 315px; }
.am-stack-a { left: 28px; top: 62px; }
.am-stack-b { left: 372px; top: 62px; }
.am-stack-title { height: 24px; padding: 0 7px; color: #a7aaa4; font: 10px/24px var(--mono); text-transform: uppercase; letter-spacing: 0.6px; }
.am-block, .am-container { position: relative; transition: outline-color 0.25s; }
.am-block { display: flex; align-items: center; gap: 7px; min-height: 42px; padding: 10px 12px; margin-bottom: 4px; border-radius: 6px 6px 3px 3px; background: var(--c); color: #fff; font-size: 12px; font-weight: 600; text-transform: uppercase; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.24); outline: 2px solid transparent; outline-offset: 2px; }
.am-block::before { content: ""; position: absolute; left: 17px; bottom: -5px; width: 28px; height: 6px; background: inherit; border-radius: 0 0 4px 4px; z-index: 2; }
.am-trigger { background: var(--c-events); border-radius: 4px; }
.am-field { padding: 3px 6px; border-radius: 3px; background: rgba(24, 25, 25, 0.56); font: 11px var(--mono); text-transform: none; white-space: nowrap; }
.am-trigger .am-field { background: rgba(20, 58, 34, 0.52); }
.am-num { padding: 3px 9px; border-radius: 15px; background: #f4eee1; color: #2c2520; font: 11px var(--mono); text-transform: none; }
.am-container { margin-bottom: 4px; border-radius: 5px 5px 2px 2px; background: var(--c); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.26); outline: 2px solid transparent; outline-offset: 2px; }
.am-head { display: flex; align-items: center; gap: 7px; min-height: 43px; padding: 9px 12px; color: #fff; font-weight: 700; text-transform: uppercase; }
.am-body { margin-left: 18px; padding: 7px 8px 3px; background: rgba(33, 27, 21, 0.42); border-left: 3px solid rgba(69, 42, 17, 0.55); }
.am-body .am-block { margin-bottom: 4px; }
.am-container.c-detection .am-body { background: rgba(8, 40, 38, 0.45); border-left-color: rgba(8, 70, 64, 0.7); }
.am-foot { height: 11px; margin-left: 18px; border-radius: 0 0 4px 4px; background: inherit; }
.am-detect { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border: 1px solid rgba(255, 255, 255, 0.38); border-radius: 3px; background: rgba(19, 52, 70, 0.28); font: 10px var(--mono); text-transform: uppercase; }
.am-detect i { width: 18px; height: 18px; border-radius: 2px; background: #4dba74; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75); }
.am-detect em { padding: 2px 5px; border-radius: 2px; background: rgba(8, 27, 38, 0.5); font-style: normal; text-transform: none; }
.is-step-active { outline-color: #edf5c8 !important; }

.am-status { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-top: 1px solid #343637; color: #aaa9a1; font: 10px var(--mono); white-space: nowrap; }
.am-status strong { color: #dfddd4; font-weight: 500; }
.am-status i { width: 1px; height: 13px; background: #555755; }
.am-save { margin-left: auto; min-width: 108px; padding: 7px 13px; border-radius: 4px; background: #3d3f3f; color: var(--ink); font: 600 11px var(--font); text-align: center; }

@media (max-width: 1000px) {
  .am-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .am-palette { display: none; }
}
@media (max-width: 900px) {
  .am-stack-b { display: none; }
}
@media (max-width: 760px) {
  .app-showcase { padding-top: 90px; }
  .am-shell { grid-template-columns: 60px minmax(0, 1fr); height: 520px; }
  .am-brand { justify-content: center; padding: 0; font-size: 0; }
  .am-brand::before { content: ""; width: 23px; height: 23px; background: url("assets/blockt-mark.svg") center / contain no-repeat; }
  .am-nav { padding: 13px 5px; }
  .am-nav-item:not(.active) { display: none; }
  .am-nav-item { justify-content: center; padding: 11px 2px; font-size: 0; gap: 0; }
  .am-library { display: none; }
  .am-topbar { padding: 0 12px; }
  .am-workspace { overflow: hidden; }
  .am-stack { width: 235px; }
  .am-stack-a { left: 14px; }
  .am-block, .am-head { font-size: 11px; white-space: nowrap; }
  .am-field { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
  .am-mode { top: 8px; }
  .am-mode span { min-width: auto; padding: 6px 9px; white-space: nowrap; }
  .am-status span:first-child, .am-status i:first-of-type { display: none; }
}

/* ---------- Final ---------- */
.final { display: flex; flex-direction: column; justify-content: flex-end; min-height: 115vh; }
.final-inner { text-align: center; padding-bottom: 80px; display: flex; flex-direction: column; align-items: center; }
.final h2 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); max-width: 14ch; }
.site-footer { display: flex; justify-content: space-between; padding: 22px clamp(16px, 4vw, 48px); border-top: 1px solid var(--edge); color: var(--muted); font: 0.82rem var(--mono); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- Split text ---------- */
.word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.word > span { display: inline-block; will-change: transform; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cat-grid, .stats { grid-template-columns: repeat(2, 1fr); }
  .site-nav nav { display: none; }
}
@media (max-width: 760px) {
  .split, .split.reverse { justify-content: center; }
  .split .panel { padding: 26px 22px; border: 1px solid var(--edge); border-radius: 20px; background: rgba(18, 19, 20, 0.8); backdrop-filter: blur(12px); }
  /* Phones: no sticky pinning; each section opens with a gap where the 3D formation is shown. */
  .section.tall { height: auto; }
  .sticky { position: relative; display: block; height: auto; padding: 44vh 0 8vh; }
  .hero { align-items: flex-start; padding-top: calc(var(--nav-h) + 34vh); }
  .hero-inner { padding-bottom: 110px; }
  .scroll-cue { display: none; }
  .cat-grid { grid-template-columns: 1fr; }
  .scan-screen { height: 140px; }
  @keyframes scanline { to { transform: translateY(138px); } }
  .logic-list li { flex-direction: column; gap: 6px; }
  .final h2 { font-size: clamp(2.2rem, 10vw, 3.2rem); }
}
@media (max-height: 760px) and (min-width: 761px) {
  .sticky .lead { font-size: 1rem; }
  .steps { gap: 16px; margin-top: 22px; }
  .scan-screen { height: 150px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .marquee-track { animation: none; }
}
