:root {
  /* orkynos-web's palette and type (src/landing/styles.css) with the brand kit's fonts */
  --bg: #07090d;
  --panel: rgba(12, 16, 24, 0.78);
  --panel-solid: #0c1018;
  --line: rgba(243, 245, 247, 0.08);
  --line2: rgba(243, 245, 247, 0.14);
  --text: #f3f5f7;
  --muted: rgba(243, 245, 247, 0.55);
  --body: rgba(243, 245, 247, 0.7);
  --accent: #ffb13d;
  --accent-soft: rgba(255, 177, 61, 0.12);
  --cream: #f4f1ea;
  --ok: #8fe3a9;
  --radius: 0.875rem;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: "Instrument Serif", "EB Garamond", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --brand: "Syne", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(120% 90% at 50% 45%, #121824 0%, var(--bg) 62%);
  color: var(--text);
  font: 0.875rem/1.45 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: var(--mono); font-feature-settings: "zero"; }
.muted { color: var(--muted); }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.vignette { position: fixed; inset: 0; pointer-events: none;
  background: radial-gradient(140% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, .55) 100%); }

/* ---------- top bar */
.top { position: fixed; top: 0; left: 0; right: 0; height: 4rem; z-index: 20; display: grid;
  grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 1.375rem;
  background: linear-gradient(to bottom, rgba(11, 12, 14, .85), rgba(11, 12, 14, 0)); }
.brand { display: flex; flex-direction: column; align-items: flex-start; color: var(--text); text-decoration: none; }
.wm-name { display: flex; align-items: center; gap: 0.625rem; font: 500 1.1875rem/1 var(--brand); }
.wm-name img { width: 2.5rem; height: auto; }
.wm-tag { margin: 0.4375rem 0 0 3.125rem; font: 0.625rem var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--body); }
.brand rect { fill: none; stroke: var(--text); stroke-width: 2; }
.brand .dots circle { fill: var(--accent); }
.brand path { fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.steps { display: flex; gap: 0.25rem; padding: 0.25rem; border: 1px solid var(--line); border-radius: 62.4375rem;
  background: rgba(20, 22, 26, .6); backdrop-filter: blur(0.875rem); -webkit-backdrop-filter: blur(0.875rem); }
.steps button { display: flex; align-items: baseline; gap: 0.5rem; padding: 0.4375rem 1rem; border-radius: 62.4375rem;
  color: var(--muted); font-weight: 500; transition: color .25s, background .25s; }
.steps button b { font: 500 0.6875rem var(--mono); opacity: .6; }
.steps button:hover { color: var(--text); }
.steps button.on { background: var(--cream); color: #07090d; }
.steps button.on b { opacity: .5; }
.steps button.done:not(.on) b { color: var(--accent); opacity: 1; }
.project { justify-self: end; display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
.project .muted { font-family: var(--mono); font-size: 0.75rem; }
.live { width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0.25rem rgba(127, 209, 164, .15); }

/* ---------- stage visibility */
.stage-ui { opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .5s var(--ease), transform .6s var(--ease), visibility 0s linear .5s; }
body[data-stage="intro"] #intro,
body[data-stage="processing"] #pipeline,
body[data-stage="scan"] #scanhud,
body[data-stage="model"] #layers,
body[data-stage="model"] #toolbar,
body[data-stage="tour"] #tourhud,
body[data-stage="deliver"] #deliver {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  transition: opacity .6s var(--ease) .1s, transform .7s var(--ease) .1s, visibility 0s;
}

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(1.125rem) saturate(1.2); -webkit-backdrop-filter: blur(1.125rem) saturate(1.2);
  box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, .35); }
.phead { display: flex; justify-content: space-between; align-items: center; padding: 0.875rem 1rem 0.625rem;
  font-weight: 600; font-size: 0.8125rem; }
.phead b { font-weight: 500; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-left: 0.375rem; }
.eyebrow { margin: 0 0 0.875rem; font: 500 0.6875rem var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.625rem; height: 2.875rem; padding: 0 1.375rem;
  border-radius: 0.375rem; font-weight: 600; font-size: 0.9375rem; transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.btn.primary { background: var(--cream); color: #07090d; box-shadow: 0 0.625rem 1.875rem rgba(0, 0, 0, .35); }
.btn.primary:hover { transform: translateY(-1px); background: #fffdf8; }
.btn.primary:active { transform: translateY(0) scale(.98); }
.btn span { transition: transform .2s var(--ease); }
.btn:hover span { transform: translateX(0.1875rem); }
.cta { display: flex; flex-wrap: wrap; gap: 0.625rem; }
.btn.ghost { color: var(--text); background: rgba(255, 255, 255, .05); border: 1px solid var(--line2); }
.btn.ghost:hover { background: rgba(255, 255, 255, .1); transform: translateY(-1px); }
.play svg { width: 0.75rem; height: 0.75rem; fill: currentColor; }
.btn.play svg { color: var(--accent); }
.playtop { display: inline-flex; align-items: center; gap: 0.4375rem; height: 1.875rem; padding: 0 0.75rem; margin-right: 0.625rem; border-radius: 62.4375rem;
  font-weight: 500; font-size: 0.8125rem; border: 1px solid var(--line2); background: rgba(20, 22, 26, .6); transition: background .2s, border-color .2s; }
.playtop:hover { background: var(--accent-soft); border-color: rgba(255, 177, 61, .5); }
.playtop svg { color: var(--accent); }
body.auto .play { visibility: hidden; }
.btn.play.pulse { border-color: rgba(255, 177, 61, .7); animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 0.5rem rgba(255, 177, 61, .18); } }
.link { color: var(--muted); text-decoration: underline; text-underline-offset: 0.1875rem; }
.link:hover { color: var(--text); }

.seg { display: inline-flex; padding: 0.1875rem; gap: 2px; border-radius: 0.625rem; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.seg button { padding: 0.375rem 0.6875rem; border-radius: 0.4375rem; color: var(--muted); font-weight: 500; font-size: 0.8125rem; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: rgba(255, 255, 255, .12); color: var(--text); }

/* ---------- loader */
#loader { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; justify-items: center; gap: 1.125rem;
  background: var(--bg); transition: opacity .8s var(--ease), visibility 0s linear .8s; }
body:not([data-stage="loading"]) #loader { opacity: 0; visibility: hidden; }
.lmark { width: 4.5rem; height: auto; animation: breathe 1.6s var(--ease) infinite alternate; }
@keyframes breathe { from { opacity: .45; } to { opacity: 1; } }
.lbar { width: 13.75rem; height: 2px; background: var(--line2); border-radius: 2px; overflow: hidden; }
.lbar i { display: block; height: 100%; width: 0; background: var(--text); transition: width .2s; }
.ltext { font: 0.75rem var(--mono); color: var(--muted); letter-spacing: .04em; }

/* ---------- intro */
#intro { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; padding: 0 7vw;
  background: linear-gradient(90deg, rgba(11, 12, 14, .92) 0%, rgba(11, 12, 14, .55) 45%, transparent 70%);
  transform: translateX(-1.5rem); }
.intro-card { max-width: 32.5rem; }
.intro-card h1 { margin: 0; font: 400 clamp(2.75rem, 6.2vw, 5.25rem)/0.98 var(--serif); letter-spacing: -.02em; }
.intro-card h1 em { color: var(--accent); }
.lede { margin: 1.375rem 0 1.875rem; font-size: 1.0625rem; line-height: 1.55; color: var(--body); max-width: 27.5rem; }
/* "real scan": the website's status tag (rounded, accent border, mono) */
.realtag { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 0 1.25rem; padding: 0.375rem 0.875rem;
  border: 1px solid rgba(255, 177, 61, .45); border-radius: 999px; background: var(--accent-soft);
  font: 500 0.6875rem var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.realtag i { width: 0.375rem; height: 0.375rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0.5rem var(--accent); }
.footnote { margin: 1.5rem 0 0; font: 0.6875rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.file { display: flex; align-items: center; gap: 0.875rem; padding: 0.875rem 1rem; margin-bottom: 1.125rem; max-width: 26.25rem;
  border: 1px dashed var(--line2); border-radius: var(--radius); background: rgba(255, 255, 255, .03); }
.ficon { width: 2.625rem; height: 3.125rem; border-radius: 0.375rem; display: grid; place-items: end center; padding-bottom: 0.4375rem;
  font: 600 0.625rem var(--mono); color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(255, 177, 61, .3);
  clip-path: polygon(0 0, 70% 0, 100% 22%, 100% 100%, 0 100%); }
.fmeta { display: grid; gap: 2px; flex: 1; }
.fmeta strong { font-weight: 600; }
.fmeta span { font: 0.75rem var(--mono); color: var(--muted); }
.fok { width: 1.375rem; height: 1.375rem; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- pipeline */
#pipeline { position: fixed; z-index: 10; right: 1.375rem; top: 5.25rem; width: 20.625rem; transform: translateX(1.5rem); }
.pbar { margin: 0 1rem; height: 0.1875rem; border-radius: 0.1875rem; background: var(--line); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 0.75rem var(--accent); transition: width .3s linear; }
#plist { list-style: none; margin: 0.625rem 0 0; padding: 0 0.5rem; max-height: calc(100vh - 14.375rem); overflow-y: auto; scrollbar-width: none; }
#plist::-webkit-scrollbar { display: none; }
#plist li { display: grid; grid-template-columns: 1.125rem 1fr auto; gap: 0.625rem; align-items: center; padding: 0.4375rem 0.5rem;
  border-radius: 0.5rem; color: var(--muted); font-size: 0.8125rem; transition: color .3s, background .3s; }
#plist li .ic { width: 0.875rem; height: 0.875rem; border-radius: 50%; border: 1.5px solid var(--line2); position: relative; }
#plist li .val { font: 0.75rem var(--mono); opacity: 0; transition: opacity .4s; }
#plist li.run { color: var(--text); background: rgba(255, 255, 255, .04); }
#plist li.run .ic { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
#plist li.done { color: var(--text); }
#plist li.done .ic { border-color: var(--ok); background: var(--ok); }
#plist li.done .ic::after { content: ""; position: absolute; left: 0.2188rem; top: 1px; width: 0.1875rem; height: 0.375rem;
  border: solid #0b0c0e; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); }
#plist li.done .val { opacity: 1; }
#plist li .sw { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 2px; margin-right: 0.5rem; vertical-align: 1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.pfoot { display: flex; justify-content: space-between; padding: 0.625rem 1rem 0.875rem; margin-top: 0.375rem; border-top: 1px solid var(--line);
  font-size: 0.75rem; color: var(--muted); }

/* ---------- scan hud */
#scanhud { position: fixed; z-index: 10; left: 50%; bottom: 1.75rem; transform: translate(-50%, 1rem);
  display: flex; align-items: center; gap: 1.125rem; padding: 0.625rem 0.625rem 0.625rem 1.375rem; border-radius: 62.4375rem;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(1.125rem); -webkit-backdrop-filter: blur(1.125rem); }
body[data-stage="scan"] #scanhud { transform: translate(-50%, 0); }
.stats { display: flex; gap: 1.375rem; }
.stat { display: grid; white-space: nowrap; }
.stat b { font: 500 1rem var(--mono); letter-spacing: -.02em; }
.stat span { font-size: 0.6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
#scanhud .btn { height: 2.625rem; white-space: nowrap; }

/* ---------- model tools */
#layers { position: fixed; z-index: 10; left: 1.375rem; top: 5.25rem; width: 14.75rem; transform: translateX(-1.25rem); }
#layerlist { list-style: none; margin: 0; padding: 0 0.375rem 0.5rem; }
#layerlist button { width: 100%; display: grid; grid-template-columns: 0.75rem 1fr auto 1.625rem; gap: 0.625rem; align-items: center;
  padding: 0.4375rem 0.625rem; border-radius: 0.5rem; text-align: left; font-size: 0.8125rem; transition: background .2s, opacity .2s; }
#layerlist button:hover { background: rgba(255, 255, 255, .05); }
#layerlist .sw { width: 0.75rem; height: 0.75rem; border-radius: 0.1875rem; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
#layerlist .n { font: 0.75rem var(--mono); color: var(--muted); }
#layerlist .tg { width: 1.625rem; height: 0.9375rem; border-radius: 0.5625rem; background: var(--line2); position: relative; transition: background .2s; }
#layerlist .tg::after { content: ""; position: absolute; top: 2px; left: 2px; width: 0.6875rem; height: 0.6875rem; border-radius: 50%;
  background: #fff; transition: transform .25s var(--ease); }
#layerlist button[aria-pressed="true"] .tg { background: var(--accent); }
#layerlist button[aria-pressed="true"] .tg::after { transform: translateX(0.6875rem); }
#layerlist button[aria-pressed="false"] { opacity: .5; }

#toolbar, #tourhud { position: fixed; z-index: 10; left: 50%; bottom: 1.625rem; transform: translate(-50%, 1rem);
  display: flex; align-items: center; gap: 0.375rem; padding: 0.4375rem; border-radius: 1rem; max-width: calc(100vw - 2rem);
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(1.125rem); -webkit-backdrop-filter: blur(1.125rem);
  box-shadow: 0 1.25rem 3.75rem rgba(0, 0, 0, .35); }
body[data-stage="model"] #toolbar, body[data-stage="tour"] #tourhud { transform: translate(-50%, 0); }
#toolbar .sep, #tourhud .sep { width: 1px; height: 1.5rem; background: var(--line2); margin: 0 0.25rem; }
.tool { display: inline-flex; align-items: center; gap: 0.5rem; height: 2.25rem; padding: 0 0.75rem; border-radius: 0.625rem;
  color: #c9ccd2; font-weight: 500; font-size: 0.8125rem; transition: background .2s, color .2s; white-space: nowrap; }
.tool:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.tool[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.tool svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.tool svg circle { fill: currentColor; stroke: none; }
.tool.icon { padding: 0 0.5625rem; }
.tool.disabled { opacity: .35; pointer-events: none; }
.slider input { width: 7.5rem; accent-color: var(--accent); }

#info { position: fixed; z-index: 11; right: 1.375rem; bottom: 5.75rem; width: 16.25rem; padding: 0.875rem 1rem; }
#info h4 { margin: 0 0 2px; font-size: 0.9375rem; font-weight: 600; }
#info .sub { font: 0.75rem var(--mono); color: var(--muted); margin-bottom: 0.625rem; }
#info dl { display: grid; grid-template-columns: auto 1fr; gap: 0.375rem 0.875rem; margin: 0; font-size: 0.8125rem; }
#info dt { color: var(--muted); }
#info dd { margin: 0; text-align: right; font-family: var(--mono); font-size: 0.7812rem; }
#info dd i { font-style: normal; color: var(--muted); margin-left: 0.375rem; }
#info .x { position: absolute; top: 0.5rem; right: 0.625rem; color: var(--muted); font-size: 1.125rem; line-height: 1; padding: 0.25rem; }

/* ---------- deliver */
#deliver { position: fixed; top: 4rem; right: 0; bottom: 0; z-index: 10; width: min(58rem, 66vw); overflow-y: auto;
  transform: translateX(1.875rem); }
.deliver-panel { margin: 0.75rem 1.375rem 1.75rem; padding: 1.625rem 1.75rem; background: var(--panel); border: 1px solid var(--line);
  border-radius: 1.125rem; backdrop-filter: blur(1.25rem); -webkit-backdrop-filter: blur(1.25rem); }
.deliver-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; align-items: start; }
.dcol + .dcol { padding-top: 4.9rem; }                 /* the tables line up with the deliverables */
.dcol > h3:first-child { margin-top: 0; }
.deliver-panel h2 { margin: 0 0 1.25rem; font: 400 2.5rem/1.05 var(--serif); letter-spacing: -.015em; }
.deliver-panel h3 { margin: 1.625rem 0 0.625rem; font-size: 0.8125rem; font-weight: 600; }
.deliver-panel h3 .muted { font-weight: 400; margin-left: 0.375rem; }
.deliverables { display: grid; gap: 0.5rem; }
.dl { display: grid; grid-template-columns: 2.75rem 1fr auto; gap: 0.875rem; align-items: center; padding: 0.75rem 0.875rem; border-radius: 0.75rem;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.dl .fx { height: 2.75rem; border-radius: 0.5rem; display: grid; place-items: center; font: 600 0.6875rem var(--mono); background: rgba(255, 255, 255, .06); }
.dl.main .fx { background: var(--accent); color: #07090d; }
.dl strong { display: block; font-weight: 600; }
.dl small { color: var(--muted); font-size: 0.7812rem; }
.dl .tick { width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line2); }
.dl .tick svg { width: 0.875rem; height: 0.875rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 1.375rem; }
.kpi { padding: 0.75rem 0.875rem; border-radius: 0.75rem; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.kpi b { display: block; font: 500 1.375rem var(--mono); letter-spacing: -.03em; }
.kpi b small { font-size: 0.75rem; color: var(--muted); margin-left: 0.1875rem; letter-spacing: 0; }
.kpi span { font-size: 0.75rem; color: var(--muted); }
table.storeys { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
table.storeys th { text-align: right; font: 500 0.6562rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  padding: 0.375rem 0.3125rem; white-space: nowrap; border-bottom: 1px solid var(--line2); }
table.storeys td { text-align: right; padding: 0.5625rem 0.3125rem; white-space: nowrap; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.7812rem; }
table.storeys th:first-child, table.storeys td:first-child { text-align: left; font-family: var(--sans); font-size: 0.8125rem; }
table.storeys tr:hover td { background: rgba(255, 255, 255, .03); }
.fit { display: grid; gap: 0.5rem; }
.fitrow { display: grid; grid-template-columns: 5rem 1fr 4rem; gap: 0.75rem; align-items: center; font-size: 0.8125rem; }
.fitrow .bar { height: 0.375rem; border-radius: 0.375rem; background: var(--line); overflow: hidden; }
.fitrow .bar i { display: block; height: 100%; border-radius: 0.375rem; background: linear-gradient(90deg, var(--ok), #c6e9a7);
  width: 0; transition: width 1s var(--ease); }
.fitrow .v { text-align: right; font: 0.7812rem var(--mono); }

/* ---------- labels pinned in 3D: storey levels, measurement callouts */
#labels { position: fixed; inset: 0; z-index: 9; pointer-events: none; overflow: hidden; }
#labels > div { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .5s var(--ease); will-change: transform; }
#labels > div.on { opacity: 1; }
.lvl { display: flex; align-items: baseline; gap: 0.625rem; margin: -0.875rem 0 0 -0.5rem; padding: 0.375rem 0.75rem 0.375rem 0.625rem; white-space: nowrap;
  border-left: 2px solid var(--accent); background: rgba(11, 12, 14, .66); backdrop-filter: blur(0.5rem); -webkit-backdrop-filter: blur(0.5rem);
  translate: -100% 0; }
.lvl b { font-weight: 600; font-size: 0.875rem; }
.lvl span { font: 0.7812rem var(--mono); color: var(--accent); }
.callout i { position: absolute; left: -0.375rem; top: -0.375rem; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0.25rem rgba(255, 177, 61, .25), 0 0 1.125rem var(--accent); }
.callout::before { content: ""; position: absolute; left: 0; top: 0; width: 2.875rem; height: 1.5px; background: var(--accent);
  transform-origin: 0 0; transform: rotate(-40deg); }
.callout .card { position: absolute; left: 2.125rem; top: -4.875rem; display: grid; gap: 1px; padding: 0.5625rem 0.8125rem; white-space: nowrap;
  background: rgba(14, 15, 18, .82); border: 1px solid rgba(255, 177, 61, .45); border-radius: 0.625rem;
  backdrop-filter: blur(0.625rem); -webkit-backdrop-filter: blur(0.625rem); }
.callout .card small { font: 500 0.6562rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.callout .card b { font: 500 1rem var(--mono); letter-spacing: -.02em; }
.callout .card span { font: 0.75rem var(--mono); color: var(--accent); }

/* ---------- captions (the replay and autopilot) */
#caption { position: fixed; z-index: 11; left: 2.125rem; bottom: 2.125rem; max-width: min(38.75rem, 60vw); pointer-events: none;
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s linear .6s; }
body.cap #caption { opacity: 1; visibility: visible; transition: opacity .6s var(--ease); }
body[data-stage="deliver"] #caption { bottom: auto; top: 6rem; }
#caption.in > * { animation: capin .9s var(--ease) both; }
#caption.in > :nth-child(2) { animation-delay: .06s; }
#caption.in > :nth-child(3) { animation-delay: .14s; }
@keyframes capin { from { opacity: 0; transform: translateY(0.75rem); } }
#caption .ck { display: block; margin-bottom: 0.5rem; font: 500 0.75rem var(--mono); letter-spacing: .14em; color: var(--accent); }
#caption .ck:empty { display: none; }
#caption b { display: block; font: 400 clamp(2.125rem, 4.2vw, 3.5rem)/1.02 var(--serif); letter-spacing: -.015em; text-shadow: 0 2px 1.875rem rgba(0, 0, 0, .6); }
#caption #caps { display: block; margin-top: 0.625rem; font-size: 1rem; color: var(--body); text-shadow: 0 1px 0.75rem rgba(0, 0, 0, .7); }
#caption #count { font: 500 1.05em var(--mono); color: var(--text); }
/* autopilot: a clean frame for recording */
body.auto.idle { cursor: none; }
/* the show's own controls: sound and stop, bottom right; they hide with the cursor */
#showctl { position: fixed; z-index: 25; right: 1.375rem; bottom: 1.375rem; display: flex; gap: 0.375rem; padding: 0.3125rem;
  border-radius: 999px; background: var(--panel); border: 1px solid var(--line2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s linear .4s; }
body.auto #showctl { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
body.auto.idle #showctl { opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s linear .6s; }
#showctl button { display: inline-flex; align-items: center; gap: 0.5rem; height: 2.25rem; padding: 0 0.875rem; border-radius: 999px;
  font-weight: 500; font-size: 0.8125rem; color: var(--text); transition: background .2s; }
#showctl button:hover { background: rgba(255, 255, 255, .08); }
#showctl svg, .soundtop svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
#stopShow svg rect { fill: currentColor; stroke: none; }
.sound .mute, .sound.off .wave, .sound .offl, .sound.off .on { display: none; }
.sound.off .mute, .sound.off .offl { display: inline; }
.sound.off { color: var(--muted); }
.soundtop { display: inline-grid; place-items: center; width: 1.875rem; height: 1.875rem; margin-right: 0.5rem; border-radius: 999px;
  border: 1px solid var(--line2); background: rgba(20, 22, 26, .6); color: var(--text); }
.soundtop:hover { border-color: rgba(255, 177, 61, .5); }
/* subtitles: the narration's words when it is not heard */
#sub { position: fixed; z-index: 24; left: 50%; bottom: 5.25rem; transform: translateX(-50%); max-width: min(46rem, 80vw);
  padding: 0.5rem 1rem; border-radius: 0.5rem; background: rgba(7, 9, 13, .78); color: var(--text); text-align: center;
  font-size: 1.125rem; line-height: 1.4; opacity: 0; transition: opacity .3s var(--ease); pointer-events: none; }
body.subs #sub { opacity: 1; }
body.auto #sub { bottom: 2rem; }
body.auto.subs #caption { bottom: 6.5rem; }
body.auto #layers, body.auto #toolbar, body.auto #info, body.auto .pfoot, body.auto #tourhud { opacity: 0 !important; pointer-events: none !important; }

/* ---------- end card: the brand, the line, what goes in */
#endcard { position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 1.5rem;
  background: radial-gradient(90% 80% at 50% 45%, #121824, #07090d); text-align: center;
  opacity: 0; visibility: hidden; transition: opacity 1.2s var(--ease), visibility 0s linear 1.2s; }
body.end #endcard { opacity: 1; visibility: visible; transition: opacity 1.2s var(--ease); }
body.end #caption { opacity: 0; }
.ec-brand { display: flex; align-items: center; gap: 1.25rem; font: 500 4.5rem/1 var(--brand); letter-spacing: -.01em; }
.ec-brand img { width: 7.5rem; height: auto; }
.ec-line { margin: 0; font: 400 3.25rem/1 var(--serif); letter-spacing: -.015em; }
.ec-line em { color: var(--accent); }
.ec-inputs { display: flex; gap: 0.75rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.ec-inputs li { display: grid; gap: 0.25rem; min-width: 12rem; padding: 0.875rem 1.25rem; border: 1px solid var(--line2); border-radius: 0.625rem;
  background: rgba(12, 16, 24, .7); }
.ec-inputs b { font: 500 0.75rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.ec-inputs span { font-size: 0.9375rem; color: var(--body); }
.ec-url { margin: 0.5rem 0 0; font: 500 0.875rem var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
body.end #endcard > * { animation: capin 1.2s var(--ease) both; }
body.end #endcard > :nth-child(2) { animation-delay: .25s; }
body.end #endcard > :nth-child(3) { animation-delay: .5s; }
body.end #endcard > :nth-child(4) { animation-delay: .75s; }
body.end #endcard > :nth-child(5) { animation-delay: 1s; }
#explore { margin-top: 0.75rem; }

/* ---------- small screens: panels become sheets, labels shrink */
@media (max-width: 860px) {
  .top { grid-template-columns: auto 1fr; padding: 0 0.875rem; gap: 0.625rem; }
  .project { display: none; }
  .steps { justify-self: end; }
  .steps button { padding: 0.4375rem 0.625rem; font-size: 0.8125rem; }
  .steps button b { display: none; }
  #intro { padding: 0 1.25rem; align-items: flex-end; padding-bottom: 2.5rem;
    background: linear-gradient(0deg, rgba(11, 12, 14, .96) 0%, rgba(11, 12, 14, .6) 55%, transparent 80%); }
  .lede { font-size: 0.9375rem; margin: 1rem 0 1.25rem; }
  #pipeline { left: 1rem; right: 1rem; top: auto; bottom: 1rem; width: auto; }
  #plist { max-height: 28vh; overflow-y: auto; }
  #scanhud { left: 1rem; right: 1rem; bottom: 1rem; transform: translateY(1rem); flex-wrap: wrap; justify-content: center;
    border-radius: 1.125rem; padding: 0.75rem; }
  body[data-stage="scan"] #scanhud { transform: none; }
  .stats { gap: 0.875rem; }
  #layers { top: auto; bottom: 5.375rem; left: 1rem; right: 1rem; width: auto; max-height: 34vh; overflow-y: auto; }
  #layers .phead { display: none; }
  #layerlist { display: grid; grid-template-columns: 1fr 1fr; padding: 0.375rem; }
  #layerlist button { padding: 0.375rem 0.5rem; font-size: 0.7812rem; grid-template-columns: 0.625rem 1fr 1.625rem; }
  #layerlist .n { display: none; }
  #toolbar { bottom: 1rem; overflow-x: auto; justify-content: flex-start; }
  .slider input { width: 5rem; }
  #info { left: 1rem; right: 1rem; width: auto; bottom: auto; top: 4.75rem; }
  #caption { left: 1.125rem; right: 1.125rem; bottom: auto; top: 4.875rem; max-width: none; }
  #caption b { font-size: 1.875rem; }
  #caption #caps { font-size: 0.875rem; }
  .callout .card { left: 1.125rem; top: -4.375rem; }
  .callout .card b { font-size: 0.8125rem; }
  #deliver { width: 100vw; }
  .deliver-panel { margin: 0.75rem 0.75rem 1.25rem; padding: 1.25rem; background: rgba(16, 17, 20, .94); grid-template-columns: 1fr; }
  .dcol + .dcol { padding-top: 0; }
  .dcol > h3:first-child { margin-top: 1.625rem; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
/* phones in the show: no step list or delivery panel over the house - the captions and the voice tell the story */
@media (max-width: 860px) {
  body.auto #pipeline, body.auto #deliver { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
  .ec-brand { font-size: 2.75rem; gap: 0.75rem; }
  .ec-brand img { width: 4.5rem; }
  .ec-line { font-size: 2.25rem; }
  .ec-inputs { flex-direction: column; width: min(22rem, 86vw); }
  .ec-inputs li { min-width: 0; }
  /* phones: the house first - the few controls that are fun, nothing that fills the screen */
  #intro .realtag, #intro .eyebrow, #intro .lede, #intro .file { display: none; }
  #intro h1 { margin-bottom: 1.5rem; }
  #scanstats, #cmode { display: none; }
  #layers { display: none !important; }
  #storeys, #toolbar .sep, #sectionwrap, #viewIso, #viewTop { display: none; }
  #toolbar { justify-content: center; }
  #tourhud .sep { display: none; }
  #replay { font-size: 0; gap: 0; }
  .deliver-panel .dcol + .dcol { display: none; }
  .deliver-panel .dcol, .deliverables > * { min-width: 0; }
  .kpis > :nth-child(n+5) { display: none; }
  #showctl { left: 50%; right: auto; bottom: 1rem; width: max-content; transform: translateX(-50%); }
  body.auto #sub { bottom: 4.75rem; font-size: 0.9375rem; width: max-content; max-width: 90vw; }
  body.auto .steps button:not(.on) { display: none; }   /* the show: only the step it is on */
  body.auto .steps:not(:has(.on)) { visibility: hidden; }
}
/* touch screens have no mouse to bring the show's controls back: they stay */
@media (hover: none) {
  body.auto.idle #showctl { opacity: 1; visibility: visible; }
}
@media (max-width: 520px) {
  .wm-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* the walk leaves the house through a quick dark, not through its walls */
#fade { position: fixed; inset: 0; z-index: 20; background: var(--bg, #07090d); opacity: 0; pointer-events: none; transition: opacity .6s var(--ease); }
body.fade #fade { opacity: 1; }
