/* crew-holo.css — Hologram look for the "Build your digital employee" section (realspacedigital.net)
   Add-on to crew.css. Loaded after it. Safe to remove: delete this file + crew-holo.js and the two tags in index.html. */

/* ---------- cast row: never hide the orb, show every look ---------- */
.rsdcrew .cw-cast{scroll-padding-left:2px}
@media (min-width:700px){
  .rsdcrew .cw-cast{flex-wrap:wrap;justify-content:center;overflow:visible;scroll-snap-type:none}
}
.rsdcrew .cw-cp img.cw-mono{object-fit:cover}

/* ---------- hologram thumbnail in the cast row ---------- */
.rsdcrew .cw-th-holo{position:relative;display:block;width:44px;height:44px;border-radius:50%;overflow:hidden;
  border:1.5px solid rgba(120,214,255,.55);
  background:radial-gradient(circle at 50% 110%,rgba(120,214,255,.55),transparent 60%),#0a1726;
  box-shadow:0 0 12px rgba(90,200,255,.45),inset 0 0 10px rgba(120,214,255,.35)}
.rsdcrew .cw-th-holo img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 18%;border:0;border-radius:0;background:none;opacity:.9}
.rsdcrew .cw-th-holo::after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(0deg,rgba(160,230,255,.18) 0 1px,transparent 1px 3px);mix-blend-mode:screen}
.rsdcrew .cw-cp.cw-holo-btn[aria-pressed="true"]{border-color:rgba(120,214,255,.55);background:rgba(90,200,255,.08);color:#bfefff}
.rsdcrew .cw-cp.cw-holo-btn[aria-pressed="true"] .cw-th-holo{border-color:#9be7ff;box-shadow:0 0 16px rgba(120,214,255,.75),inset 0 0 12px rgba(120,214,255,.45)}

/* ---------- the hologram stage (inside .cw-avatar) ---------- */
.rsdcrew .cw-holo{position:absolute;inset:0;display:none;pointer-events:none;z-index:2;--hc:120,214,255}
.rsdcrew .cw-avatar.is-holo .cw-holo{display:block}
.rsdcrew .cw-avatar.is-holo canvas.cw-orb,
.rsdcrew .cw-avatar.is-holo .cw-pimg,
.rsdcrew .cw-avatar.is-holo .cw-loop,
.rsdcrew .cw-avatar.is-holo svg.cw-helm{display:none!important}
.rsdcrew .cw-avatar.is-holo .cw-ring::before{border-color:rgba(var(--hc),.45);box-shadow:0 0 18px rgba(var(--hc),.25),inset 0 0 18px rgba(var(--hc),.12)}

/* projector beam + floor disc */
.rsdcrew .cw-holo .hl-beam{position:absolute;left:22%;right:22%;bottom:12%;height:78%;
  background:linear-gradient(to top,rgba(var(--hc),.30),rgba(var(--hc),.06) 55%,transparent);
  clip-path:polygon(38% 100%,62% 100%,100% 0,0 0);filter:blur(2px);opacity:.75;animation:hl-beam 4.5s ease-in-out infinite}
.rsdcrew .cw-holo .hl-base{position:absolute;left:28%;right:28%;bottom:10%;height:6%;border-radius:50%;
  background:radial-gradient(closest-side,rgba(var(--hc),.95),rgba(var(--hc),.35) 55%,transparent);
  box-shadow:0 0 28px rgba(var(--hc),.65);animation:hl-pulse 2.6s ease-in-out infinite}

/* the Cortana-style halo: two counter-rotating rings behind the head */
.rsdcrew .cw-holo .hl-halo{position:absolute;left:50%;top:30%;width:42%;aspect-ratio:1;translate:-50% -50%;
  scale:calc(1 + var(--vol,0) * .22);transition:scale .08s linear}
.rsdcrew .cw-holo .hl-halo i{position:absolute;inset:0;border-radius:50%}
.rsdcrew .cw-holo .hl-halo i:nth-child(1){border:2px solid rgba(var(--hc),.9);
  background:radial-gradient(closest-side,rgba(var(--hc),.18),transparent 75%);
  box-shadow:0 0 22px rgba(var(--hc),.55),inset 0 0 18px rgba(var(--hc),.35);
  mask:conic-gradient(#000 0 70%,transparent 70% 76%,#000 76% 90%,transparent 90%);animation:hl-spin 14s linear infinite}
.rsdcrew .cw-holo .hl-halo i:nth-child(2){inset:-12%;border:1px dashed rgba(var(--hc),.45);animation:hl-spin 22s linear infinite reverse}
.rsdcrew .cw-holo .hl-halo i:nth-child(3){inset:-26%;border:1px solid rgba(var(--hc),.18);
  mask:conic-gradient(transparent 0 12%,#000 12% 38%,transparent 38% 62%,#000 62% 88%,transparent 88%);animation:hl-spin 30s linear infinite}

/* the figure: image/video in hologram treatment */
.rsdcrew .cw-holo .hl-fig{position:absolute;left:14%;right:14%;top:6%;bottom:13%;
  animation:hl-float 6s ease-in-out infinite;
  mask:linear-gradient(to bottom,#000 62%,rgba(0,0,0,.55) 82%,transparent);-webkit-mask:linear-gradient(to bottom,#000 62%,rgba(0,0,0,.55) 82%,transparent)}
.rsdcrew .cw-holo .hl-fig img,.rsdcrew .cw-holo .hl-fig video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:50% 100%;
  opacity:.9;mix-blend-mode:screen;
  mask:radial-gradient(ellipse 54% 68% at 50% 48%,#000 55%,transparent 100%);-webkit-mask:radial-gradient(ellipse 54% 68% at 50% 48%,#000 55%,transparent 100%);filter:drop-shadow(0 0 10px rgba(var(--hc),.55)) brightness(calc(1 + var(--vol,0) * .45));
  transition:filter .08s linear}
.rsdcrew .cw-holo.is-tint .hl-fig img,.rsdcrew .cw-holo.is-tint .hl-fig video{
  filter:grayscale(1) sepia(1) hue-rotate(160deg) saturate(3.2) brightness(calc(1.05 + var(--vol,0) * .45)) drop-shadow(0 0 10px rgba(var(--hc),.6))}
/* scanlines + shimmer stay inside the figure's soft oval */
.rsdcrew .cw-holo .hl-fig::before,.rsdcrew .cw-holo .hl-fig::after{mask:radial-gradient(ellipse 50% 60% at 50% 48%,#000 55%,transparent 100%);-webkit-mask:radial-gradient(ellipse 50% 60% at 50% 48%,#000 55%,transparent 100%)}
/* scanlines */
.rsdcrew .cw-holo .hl-fig::before{content:"";position:absolute;inset:0;z-index:1;
  background:repeating-linear-gradient(0deg,rgba(var(--hc),.16) 0 1px,transparent 1px 3px);
  mix-blend-mode:screen;animation:hl-scan 7s linear infinite}
/* shimmer sweep */
.rsdcrew .cw-holo .hl-fig::after{content:"";position:absolute;inset:-10% -30%;z-index:2;
  background:linear-gradient(105deg,transparent 40%,rgba(210,245,255,.0) 44%,rgba(210,245,255,.45) 50%,rgba(210,245,255,0) 56%,transparent 60%);
  mix-blend-mode:screen;animation:hl-shimmer 3.8s ease-in-out infinite}

/* voice bars under the figure: visibly speaks with Genie Vee's live voice */
.rsdcrew .cw-holo .hl-eq{position:absolute;left:50%;bottom:17%;z-index:3;translate:-50% 0;display:flex;gap:3px;align-items:center;height:32px;opacity:.35;transition:opacity .2s}
.rsdcrew .cw-holo .hl-eq i{display:block;width:3px;border-radius:2px;background:rgb(var(--hc));box-shadow:0 0 6px rgba(var(--hc),.8);height:3px}
.rsdcrew[data-voice="speaking"] .cw-holo .hl-eq{opacity:1}
.rsdcrew[data-voice="speaking"] .cw-holo .hl-eq i{animation:hl-eq .42s ease-in-out infinite alternate;height:calc(6px + var(--vol,0) * 20px)}
.rsdcrew[data-voice="speaking"] .cw-holo .hl-eq i:nth-child(2n){animation-duration:.33s;height:calc(6px + var(--vol,0) * 26px)}
.rsdcrew[data-voice="speaking"] .cw-holo .hl-eq i:nth-child(3n){animation-duration:.51s;height:calc(6px + var(--vol,0) * 16px)}
.rsdcrew[data-voice="listening"] .cw-holo .hl-eq{opacity:.8}
.rsdcrew[data-voice="listening"] .cw-holo .hl-eq i{background:#5FD08A;box-shadow:0 0 6px rgba(95,208,138,.8)}

/* speaking: halo + figure light up with her voice volume */
.rsdcrew[data-voice="speaking"] .cw-holo .hl-halo i:nth-child(1){box-shadow:0 0 calc(22px + var(--vol,0) * 40px) rgba(var(--hc),.8),inset 0 0 22px rgba(var(--hc),.45)}
.rsdcrew[data-voice="speaking"] .cw-holo .hl-beam{opacity:calc(.75 + var(--vol,0) * .25)}
.rsdcrew[data-voice="speaking"] .cw-holo .hl-fig{animation-duration:3s}

/* materialize when selected */
.rsdcrew .cw-avatar.is-holo.hl-in .cw-holo .hl-fig{animation:hl-materialize 1.1s cubic-bezier(.2,.7,.1,1) both,hl-float 6s ease-in-out 1.1s infinite}
.rsdcrew .cw-avatar.is-holo.hl-in .cw-holo .hl-halo{animation:hl-halo-in 1.2s cubic-bezier(.2,.7,.1,1) both}

/* caption under the stage */
.rsdcrew .cw-holo-note{margin:6px auto 0;text-align:center;font-size:11.5px;color:#9fdcf3;letter-spacing:.02em;display:none}
.rsdcrew .cw-stage.is-holo .cw-holo-note{display:block}

@keyframes hl-spin{to{rotate:360deg}}
@keyframes hl-float{0%,100%{translate:0 0}50%{translate:0 -1.6%}}
@keyframes hl-pulse{0%,100%{opacity:.75}50%{opacity:1}}
@keyframes hl-beam{0%,100%{opacity:.6}50%{opacity:.85}}
@keyframes hl-scan{to{background-position:0 120px}}
@keyframes hl-shimmer{0%{translate:-60% 0}55%,100%{translate:60% 0}}
@keyframes hl-eq{from{scale:1 .55}to{scale:1 1.25}}
@keyframes hl-materialize{
  0%{opacity:0;clip-path:inset(100% 0 0 0);filter:brightness(3) blur(3px)}
  35%{opacity:.6;filter:brightness(2) blur(1px)}
  45%{opacity:.25}
  55%{opacity:.85}
  100%{opacity:1;clip-path:inset(0 0 0 0);filter:none}}
@keyframes hl-halo-in{0%{opacity:0;scale:.4}60%{opacity:1;scale:1.12}100%{scale:1}}

@media (prefers-reduced-motion:reduce){
  .rsdcrew .cw-holo *,.rsdcrew .cw-holo *::before,.rsdcrew .cw-holo *::after{animation:none!important}
  .rsdcrew .cw-holo .hl-halo{scale:1}
}

/* ---------- one-tap talk flow ---------- */
.rsdcrew .cw-avwrap{position:relative;display:grid;justify-items:center}
.rsdcrew .cw-avwrap .cw-avatar{margin-left:auto;margin-right:auto}
/* consent card floats over the lower part of the stage */
.rsdcrew .cw-avwrap .cw-gate{position:absolute;left:50%;bottom:6%;translate:-50% 0;z-index:6;width:min(92%,380px);
  background:rgba(13,10,24,.88);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  border:1px solid rgba(231,207,145,.35);box-shadow:0 18px 50px rgba(0,0,0,.5),0 0 0 1px rgba(255,255,255,.04);
  animation:cw-gate-in .32s cubic-bezier(.2,.7,.1,1) both}
.rsdcrew .cw-avwrap .cw-gate[hidden]{display:none}
.rsdcrew .cw-avwrap .cw-gate p{font-size:12.5px;line-height:1.45;margin:0}
.rsdcrew .cw-avwrap .cw-gate .cw-vgo{flex:1}
.rsdcrew .cw-avatar.is-holo~.cw-gate{border-color:rgba(120,214,255,.45)}
/* live-call bar right under the figure */
.rsdcrew .cw-avwrap .cw-vbar-stage{width:min(100%,380px);margin:10px auto 0}
.rsdcrew .cw-avwrap .cw-vbar-stage[hidden]{display:none}
@keyframes cw-gate-in{from{opacity:0;translate:-50% 12px}to{opacity:1;translate:-50% 0}}
@media (prefers-reduced-motion:reduce){.rsdcrew .cw-avwrap .cw-gate{animation:none}}
