/* AURDON WINGS — the Business Cells and Command environments rebuilt on painted station art that matches the Core.
   Loaded after shell.css; the station (Core) is not touched by anything in this file. */

/* ═══════════ BUSINESS CELLS WING — painted station chambers ═══════════ */
#view-businesses { background: #010306; }
.bw-sky { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(1px 1px at 12% 18%, #fff9, transparent), radial-gradient(1px 1px at 68% 12%, #fff7, transparent), radial-gradient(1.5px 1.5px at 38% 84%, #fff8, transparent), radial-gradient(1px 1px at 88% 70%, #fff6, transparent), radial-gradient(1px 1px at 22% 58%, #fff5, transparent), radial-gradient(1px 1px at 55% 40%, #fff4, transparent), radial-gradient(ellipse at 50% 55%, rgba(10,40,34,.45), #020807 75%);
  background-size: 520px 520px, 610px 610px, 700px 700px, 560px 560px, 480px 480px, 650px 650px, 100% 100%; }
/* a connecting spine: the chambers hang off one corridor, like the station's own modules */
.bw-spine { position: absolute; left: 3%; right: 3%; top: 52%; height: 22px; transform: translateY(-50%); pointer-events: none;
  background: linear-gradient(180deg, #0b3a33, #06221e 45%, #0b3a33); border-top: 1px solid rgba(39,230,193,.35); border-bottom: 1px solid rgba(39,230,193,.25); box-shadow: 0 0 30px rgba(39,230,193,.15), inset 0 0 12px rgba(0,0,0,.6); }
.bw-spine::after { content: ''; position: absolute; inset: 8px 0; background: repeating-linear-gradient(90deg, rgba(255,209,102,.7) 0 18px, transparent 18px 46px); opacity: .5; animation: bwflow 6s linear infinite; }
@keyframes bwflow { to { background-position: 460px 0; } }
.bw-head { position: absolute; top: 18px; left: 52px; z-index: 2; pointer-events: none; }
.bw-head h1 { margin: 2px 0; font: 700 22px var(--f-pix); letter-spacing: 5px; color: #ffd166; text-shadow: 0 0 18px rgba(255,209,102,.45); }
.bw-head .kicker { font: 400 10px var(--f-pix); letter-spacing: 3px; color: rgba(220,255,248,.6); } .bw-head p { margin: 0; color: rgba(220,255,248,.55); font-size: 12px; }
.bw-wing { position: absolute; left: 54px; right: 54px; top: 74px; bottom: 34px; display: grid; gap: 2vw; align-items: center; justify-content: center; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.bw-wing[data-n="1"] { --cols: 1; width: min(62vw, 140vh); margin: 0 auto; } .bw-wing[data-n="3"] { --cols: 3; } .bw-wing[data-n="4"] { --cols: 2; }
.bw-cell { position: relative; display: block; width: 100%; aspect-ratio: 3 / 2; max-height: calc(100vh - 140px); margin: 0 auto; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; font: inherit; text-align: left;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), filter .4s; filter: drop-shadow(0 18px 40px rgba(0,0,0,.7)); }
.bw-cell:hover, .bw-cell:focus-visible { transform: translateY(-6px) scale(1.012); outline: none; filter: drop-shadow(0 22px 50px rgba(0,0,0,.75)) drop-shadow(0 0 28px color-mix(in srgb, var(--p) 45%, transparent)); }
.bw-cell.on { transform: scale(1.02); filter: drop-shadow(0 0 44px color-mix(in srgb, var(--p) 60%, transparent)); }
.bw-frame { position: absolute; inset: 0; overflow: hidden; }
.bw-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.bw-tint { position: absolute; inset: 14% 8% 12%; background: var(--p); mix-blend-mode: color; opacity: .5; pointer-events: none; }
.bw-light { position: absolute; inset: 12% 6%; background: radial-gradient(ellipse at 50% 32%, color-mix(in srgb, var(--p) 26%, transparent), transparent 62%); opacity: 0; transition: opacity .4s; mix-blend-mode: screen; pointer-events: none; }
.bw-cell:hover .bw-light, .bw-cell.on .bw-light { opacity: 1; }
/* holographic identity plate docked on the chamber's lower hull */
.bw-plate { position: absolute; left: 10%; right: 10%; bottom: 2.5%; display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  background: linear-gradient(90deg, rgba(2,10,12,.9), rgba(4,18,20,.8)); border: 1px solid color-mix(in srgb, var(--p) 55%, transparent);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px); box-shadow: 0 0 24px color-mix(in srgb, var(--p) 22%, transparent); backdrop-filter: blur(4px); }
.bw-logo { flex: 0 0 auto; width: clamp(36px, 3.8vw, 56px); height: clamp(36px, 3.8vw, 56px); display: grid; place-items: center; }
.bw-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--p) 60%, transparent)); } .bw-logo b { font: 700 20px var(--f-pix); color: var(--p); }
.bw-id { flex: 1 1 auto; min-width: 0; }
.bw-id b { display: block; font: 700 clamp(11px, 1.05vw, 15px) var(--f-pix); letter-spacing: 2px; color: var(--p); text-shadow: 0 0 10px color-mix(in srgb, var(--p) 50%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bw-id i { font-style: normal; font-size: 11px; color: rgba(220,255,248,.65); letter-spacing: 1px; display: flex; align-items: center; gap: 6px; }
.bw-live { width: 7px; height: 7px; border-radius: 50%; background: #6b7f7a; } .bw-live.on { background: #3dffa2; box-shadow: 0 0 8px #3dffa2; animation: bwpulse 1.6s ease-in-out infinite; } @keyframes bwpulse { 50% { opacity: .35; } }
.bw-stats { display: flex; gap: clamp(8px, 1.1vw, 18px); }
.bw-stats span { display: flex; flex-direction: column; align-items: center; font: 400 8px var(--f-pix); letter-spacing: 1px; color: rgba(220,255,248,.5); }
.bw-stats em { font: 700 clamp(14px, 1.4vw, 20px) var(--f-term); font-style: normal; color: #eafaf6; } .bw-stats .warn em { color: #ffb547; }
.bw-metric { position: absolute; left: 50%; top: 3.5%; transform: translateX(-50%); font: 400 9px var(--f-pix); letter-spacing: 2px; color: rgba(220,255,248,.65); background: rgba(0,0,0,.6); padding: 3px 9px; white-space: nowrap; border: 1px solid rgba(39,230,193,.25); }
.bw-empty { grid-column: 1 / -1; text-align: center; color: #b9d8d0; } .bw-empty h2 { font: 700 16px var(--f-pix); letter-spacing: 3px; color: #ffd166; }
/* the business information overlay: a centred glass panel over the wing */
.bw-overlay { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; background: rgba(0,4,6,.5); backdrop-filter: blur(3px); } .bw-overlay[hidden] { display: none; }
.bw-panel { width: min(1100px, 90vw); max-height: 86vh; overflow: auto; padding: 16px 20px 22px; background: linear-gradient(180deg, rgba(3,18,15,.95), rgba(1,8,6,.97));
  border: 1px solid color-mix(in srgb, var(--p) 50%, transparent); clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
  box-shadow: 0 0 60px color-mix(in srgb, var(--p) 22%, transparent), inset 0 0 50px rgba(0,0,0,.5); animation: bwin .35s cubic-bezier(.2,.8,.2,1); }
@keyframes bwin { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.bw-p-head { position: relative; display: flex; align-items: center; gap: 14px; min-height: 96px; margin: -16px -20px 8px; padding: 14px 20px; overflow: hidden; border-bottom: 1px solid color-mix(in srgb, var(--p) 40%, transparent); }
.bw-p-art { position: absolute; inset: 0; background-size: cover; background-position: center 48%; opacity: .55; }
.bw-p-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(1,8,6,.95) 0%, rgba(1,8,6,.5) 55%, rgba(1,8,6,.85)); }
.bw-p-head > img, .bw-p-head > div, .bw-p-head > button { position: relative; }
.bw-p-head > img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--p) 55%, transparent)); }
.bw-p-head h2 { margin: 0; font: 700 20px var(--f-pix); letter-spacing: 3px; color: var(--p); } .bw-p-head i { font-style: normal; font-size: 12px; color: rgba(220,255,248,.6); }
.bw-p-head .kicker { font: 400 9px var(--f-pix); letter-spacing: 3px; color: rgba(220,255,248,.6); }
.bw-x { margin-left: auto; background: rgba(0,0,0,.5); border: 1px solid color-mix(in srgb, var(--p) 50%, transparent); color: #dff; width: 34px; height: 34px; cursor: pointer; }
.bw-p-body p { color: #d9e9e4; }
@media (max-width: 900px) { .bw-wing { --cols: 1 !important; overflow: auto; align-items: start; } .bw-spine { display: none; } }

/* ═══════════ COMMAND WING — the painted AI command chamber is the environment ═══════════ */
body.hq #view-command { display: block !important; padding: 0 !important; }
#view-command .cm-bg { background: #01050a; }
#view-command .cm-bg::after { background: radial-gradient(ellipse at 50% 44%, transparent 0%, transparent 30%, rgba(1,5,10,.5) 68%, rgba(1,5,10,.85) 100%), linear-gradient(180deg, rgba(1,5,10,.75) 0%, transparent 16%, transparent 72%, rgba(1,5,10,.85) 100%); }
#view-command .cm-head { position: absolute; top: 14px; left: 52px; right: 56px; z-index: 3; } #view-command .cm-head::after { display: none; }
#view-command .cm-evidence, #view-command .cm-console { position: absolute; top: 72px; bottom: 26px; z-index: 3; background: linear-gradient(180deg, rgba(3,14,24,.6), rgba(2,8,16,.74)); backdrop-filter: blur(8px); }
#view-command .cm-evidence { left: 46px; width: clamp(220px, 19vw, 320px); }
#view-command .cm-console { right: 46px; width: clamp(280px, 25vw, 400px); }
#view-command .cm-main { position: absolute !important; left: calc(46px + clamp(220px, 19vw, 320px) + 16px); right: calc(46px + clamp(280px, 25vw, 400px) + 16px); top: 60px; bottom: 26px; z-index: 2; }
#view-command .cm-main > .cm-orbwrap { flex: 1.7 1 0; } #view-command .cm-orbwrap::before { display: none; }
#view-command .cm-transcript { background: linear-gradient(180deg, rgba(3,14,24,.55), rgba(2,8,16,.74)); backdrop-filter: blur(8px); }
@media (max-width: 1100px) { #view-command .cm-evidence { display: none; } #view-command .cm-main { left: 46px; } }
@media (max-width: 760px) { #view-command .cm-console { top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 42vh; } #view-command .cm-main { left: 34px; right: 34px; bottom: 44vh; } }
@media (prefers-reduced-motion: reduce) { .bw-spine::after, .bw-live.on { animation: none; } .bw-cell { transition: none; } }

/* refinement pass: premium type instead of pixel font in the wings, feathered art edges, full names */
:root { --f-hud: "Bahnschrift", "Segoe UI", "Rajdhani", system-ui, sans-serif; }
.bw-head h1, .bw-id b, .bw-p-head h2, .bw-empty h2 { font-family: var(--f-hud); font-weight: 600; letter-spacing: .32em; }
.bw-head h1 { font-size: 26px; background: linear-gradient(180deg, #fff3c4, #e9c46a 55%, #b8862b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bw-head .kicker, .bw-metric, .bw-stats span, .bw-p-head .kicker { font-family: var(--f-hud); letter-spacing: .28em; }
.bw-id b { white-space: normal; font-size: clamp(12px, 1.1vw, 16px); line-height: 1.15; }
.bw-stats { gap: clamp(6px, .8vw, 14px); } .bw-stats span { font-size: 8px; } .bw-stats em { font-family: var(--f-hud); }
.bw-plate { left: 8%; right: 8%; }
.bw-art { -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 78%, transparent 100%); mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 78%, transparent 100%); }

/* COMMAND refinement: the hologram stands on the painted dais; conversation is a floating caption, not a box */
#view-command h1, #view-command h3, #view-command h4, #view-command .kicker, #view-command .cm-chips *, #view-command .cm-console nav button, #view-command [data-cmtab], #view-command .cm-state, #view-command .btn, #view-command .cm-mic { font-family: var(--f-hud) !important; }
#view-command .cm-title h1 { font-size: 22px; font-weight: 600; letter-spacing: .3em; background: linear-gradient(180deg, #fff3c4, #e9c46a 55%, #b8862b); -webkit-background-clip: text; background-clip: text; color: transparent; }
#view-command .cm-evidence, #view-command .cm-console { backdrop-filter: blur(3px); background: linear-gradient(180deg, rgba(3,14,24,.5), rgba(2,8,16,.66)); }
#view-command .cm-evidence { width: clamp(200px, 17vw, 300px); }
#view-command .cm-main { display: block !important; left: calc(46px + clamp(200px, 17vw, 300px) + 16px); }
#view-command .cm-main > .cm-orbwrap { position: absolute; left: 0; right: 0; top: 2%; height: 64%; }
#view-command .cm-main > .cm-transcript { position: absolute; left: 4%; right: 4%; bottom: 84px; max-height: 24%; min-height: 0; overflow: auto; background: none; backdrop-filter: none; border: 0; box-shadow: none; text-shadow: 0 1px 6px #000, 0 0 2px #000; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%); mask-image: linear-gradient(180deg, transparent, #000 30%); }
#view-command .cm-main > .cm-transcript:empty { display: none; }
#view-command .cm-main > .cm-stage { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); z-index: 2; }
#view-command .cm-main > .cm-proposal { position: absolute; left: 4%; right: 4%; bottom: 120px; z-index: 3; }
#view-command .cm-main > .cm-input { position: absolute; left: 0; right: 0; bottom: 40px; }
#view-command .cm-main > .cm-controls { position: absolute; left: 0; right: 0; bottom: 0; flex-wrap: nowrap; overflow: hidden; }
#view-command .cm-main > .cm-settings { position: absolute; left: 0; right: 0; bottom: 84px; z-index: 4; }
#view-command .cm-input input { background: rgba(2,10,18,.72); }
#view-command .cm-main > .cm-stage { top: auto; bottom: 128px; }
#view-command .cm-main > .cm-controls { gap: 6px; } #view-command .cm-controls .btn, #view-command .cm-controls .cm-tog { font-size: 10px; padding: 6px 9px; white-space: nowrap; } #view-command .cm-mic { white-space: nowrap; padding: 8px 14px; font-size: 11px; }
@media (max-height: 640px) { #view-command .cm-main > .cm-orbwrap { height: 58%; } #view-command .cm-controls .cm-tog { display: none; } }
#view-command .cm-main > .cm-transcript { scrollbar-width: none; } #view-command .cm-main > .cm-transcript::-webkit-scrollbar { display: none; }

/* ═══════════ JASON HOLOGRAM on the dais — reacts to his real voice (--v = live audio level 0..1) ═══════════ */
#view-command .cm-orbwrap { --v: 0; }
#view-command #cm-orb { position: absolute; inset: 0; opacity: .55; }
.cm-holo { --v: 0; position: absolute; left: 50%; bottom: -6%; height: 108%; aspect-ratio: 2 / 3; transform: translateX(-50%); pointer-events: none; }
.cm-holo img { position: absolute; mix-blend-mode: screen; user-select: none; }
.cm-holo-beam { left: -60%; right: -60%; width: 220%; bottom: -2%; opacity: calc(.55 + var(--v) * .45); filter: brightness(calc(1 + var(--v) * .6)); }
.cm-holo-fig { inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .45s ease;
  filter: brightness(calc(1.02 + var(--v) * .7)) drop-shadow(0 0 calc(6px + var(--v) * 26px) rgba(58,230,210,.55));
  transform: scale(calc(1 + var(--v) * .012)); transform-origin: 50% 90%; animation: holofloat 6s ease-in-out infinite, holoflick 7s steps(1) infinite; }
.cm-holo-fig.talk { opacity: 0; }
#view-command[data-state="speaking"] .cm-holo-fig.talk, #view-command[data-state="thinking"] .cm-holo-fig.talk, #view-command[data-state="working"] .cm-holo-fig.talk { opacity: 1; }
#view-command[data-state="speaking"] .cm-holo-fig.idle, #view-command[data-state="thinking"] .cm-holo-fig.idle, #view-command[data-state="working"] .cm-holo-fig.idle { opacity: 0; }
/* chest core flares with each syllable */
.cm-holo-core { position: absolute; left: 50%; top: 25.5%; width: 9%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(calc(1 + var(--v) * 1.6)); border-radius: 50%;
  background: radial-gradient(circle, rgba(220,255,250,.95), rgba(58,230,210,.5) 40%, transparent 70%); opacity: calc(.25 + var(--v) * .75); mix-blend-mode: screen; }
#view-command[data-state="listening"] .cm-holo-fig { filter: brightness(calc(1.05 + var(--v) * .5)) hue-rotate(-12deg) drop-shadow(0 0 calc(8px + var(--v) * 20px) rgba(58,184,255,.6)); }
#view-command[data-state="approval"] .cm-holo-core { background: radial-gradient(circle, #fff3c4, rgba(233,196,106,.6) 40%, transparent 70%); }
@keyframes holofloat { 50% { translate: 0 -6px; } }
@keyframes holoflick { 0%, 100% { opacity: inherit; } 61% { clip-path: inset(38% 0 58% 0); } 61.4% { clip-path: none; } }
#view-command .cm-state { position: absolute; left: 50%; bottom: 2%; transform: translateX(-50%); z-index: 2; text-shadow: 0 0 10px #000; }
@media (prefers-reduced-motion: reduce) { .cm-holo-fig { animation: none; } }

/* ═══════════ CORRIDOR fly-through while travelling between wings ═══════════ */
.hq-corridor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; z-index: 0; }
.hq-corridor img { position: absolute; top: 0; height: 100%; width: 150%; left: -25%; object-fit: cover; opacity: 0; }
body.hq-travel .hq-corridor { animation: corrfade 1.1s cubic-bezier(.6, 0, .3, 1); }
body.hq-travel[data-corr="west"] .hq-corridor img[data-corr="west"], body.hq-travel[data-corr="east"] .hq-corridor img[data-corr="east"] { opacity: 1; animation: corrpan 1.1s cubic-bezier(.55, 0, .35, 1) both; }
body.hq-travel[data-dir="left"] .hq-corridor img { animation-direction: reverse; }
@keyframes corrfade { 0% { opacity: 0; } 30%, 62% { opacity: 1; } 100% { opacity: 0; } }
@keyframes corrpan { from { transform: translateX(14%) scale(1.06); filter: blur(1.5px); } 50% { filter: blur(0); } to { transform: translateX(-14%) scale(1.06); filter: blur(1.5px); } }
@media (prefers-reduced-motion: reduce) { .hq-corridor { display: none; } }
/* hologram fixes: alpha art (no blend modes), pose swap not overridden by flicker, figure stands on the dais */
.cm-holo img { mix-blend-mode: normal; }
.cm-holo { bottom: 0; height: 94%; }
.cm-holo-beam { bottom: -14%; }
@keyframes holoflick { 0%, 100% { clip-path: none; } 61% { clip-path: inset(38% 0 58% 0); } 61.4% { clip-path: none; } }
.cm-holo-core { mix-blend-mode: normal; }
.cm-holo { bottom: -9%; height: 100%; } .cm-holo-beam { bottom: -6%; }
#view-command .cm-main > .cm-stage { top: 4px; bottom: auto; }

/* ═══════════ PERFORMANCE: same visuals, less work ═══════════ */
/* the command chamber is fetched/decoded only once the Command wing is approached (shell.js adds warm-command) */
body.warm-command #view-command .cm-bg { background: url('../assets/hq/command-chamber.webp') center 56% / cover no-repeat, #01050a; }
/* environments that are off-screen skip style, layout and paint entirely (and their CSS animations stop rendering) */
body.hq .hq-env.hq-away { content-visibility: hidden; }
/* glass blur only on the panels that need it, at a radius the integrated GPU handles cheaply */
#view-command .cm-evidence, #view-command .cm-console { backdrop-filter: blur(3px); }
.bw-plate { backdrop-filter: none; background: linear-gradient(90deg, rgba(2,10,12,.94), rgba(4,18,20,.88)); }
.hq-corridor img:not([src]) { display: none; }

/* Business Cells — locked state (signed out): chambers visible, dimmed, inline owner sign-in */
.bw-cell.locked { cursor: default; filter: grayscale(.6) brightness(.45) drop-shadow(0 18px 40px rgba(0,0,0,.7)); pointer-events: none; }
.bw-lock { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); z-index: 3; width: min(360px, 80vw); display: grid; gap: 10px; padding: 22px 24px; text-align: center; background: linear-gradient(180deg, rgba(3,14,20,.92), rgba(1,6,10,.95)); border: 1px solid rgba(233,196,106,.45); clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px); box-shadow: 0 0 50px rgba(233,196,106,.15); }
.bw-lock h2 { margin: 0; font: 600 18px var(--f-hud); letter-spacing: .35em; color: #e9c46a; } .bw-lock .kicker { font: 400 9px var(--f-hud); letter-spacing: .4em; color: rgba(220,255,248,.55); }
.bw-lock input { height: 36px; padding: 0 12px; background: rgba(0,0,0,.5); border: 1px solid rgba(143,227,255,.3); color: #e8f6ff; } .bw-lock small { color: #ffb547; min-height: 1em; }
