/* ==========================================================================
   Customer solutions (Features & Solutions page) — workflow write-ups and
   their 3D scenes.
   Requires scenes.css (the shared 3D engine) and features.css (jump-nav,
   feature-block, module). Each scene is one 9 s loop on the 440x300 stage.
   ========================================================================== */

/* ---- Page components -------------------------------------------------- */
.feature-block .client {
  display: block;
  margin: -.25rem 0 .75rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ccc-text-muted);
}
.feature-block h3.sub {
  margin: 1.75rem 0 .25rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ccc-red-bright);
}
.steps { list-style: none; counter-reset: step; padding: 0; margin: .75rem 0 0; }
.steps li { counter-increment: step; position: relative; padding: .4rem 0 .4rem 2.4rem; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: .45rem;
  font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--ccc-red-bright);
}
.built-with { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 1.5rem 0 1.25rem; font-size: .85rem; color: var(--ccc-text-muted); }
.built-with .chip {
  display: inline-block;
  padding: .3rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--ccc-border-strong);
  background: var(--ccc-surface-2);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
}
.stat-card .big {
  display: block;
  font-size: clamp(2rem, 1.6rem + 1.6vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.stat-card .big .text-accent { color: var(--ccc-red-bright); }
.stat-card p { margin: .5rem 0 0; color: var(--ccc-text-muted); }

/* ---- Shared scene parts ----------------------------------------------- */
/* dashed boundary on the floor (on-premise site, cloud region) */
.sol-fence {
  position: absolute;
  left: var(--x); top: var(--y); width: var(--w); height: var(--h);
  transform: translateZ(1px);
  border: 2px dashed rgba(240, 72, 72, .65);
  border-radius: 14px;
  background: rgba(240, 72, 72, .04);
  animation: fence 3s ease-in-out infinite;
}
.sol-fence span { position: absolute; left: 14px; bottom: 10px; font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(240, 72, 72, .85); }
.scene .lbl { position: absolute; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; color: rgba(255, 255, 255, .55); transform: translateZ(2px); white-space: nowrap; }
.hud .meter { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.hud .meter i { display: block; height: 100%; width: var(--v, 20%); background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: meter 2.6s ease-in-out infinite; }
@keyframes meter { 0%, 100% { width: calc(var(--v, 20%) - 6%); } 50% { width: calc(var(--v, 20%) + 6%); } }

/* ==========================================================================
   Scene 1: on-premise transcription + embedding.
   A .ts chunk lands in the watch folder -> Whisper -> Converter CLI ->
   CC Embed -> every rendition's chunks light up as 608/708 is written in.
   ========================================================================== */
.s-onprem .sol-fence { --x: 2px; --y: 4px; --w: 436px; --h: 292px; }
.s-onprem .watch   { --x: 22px;  --y: 40px; }
.s-onprem .whisper { --x: 22px;  --y: 196px; }
.s-onprem .engine  { --x: 150px; --y: 114px; --w: 72px; --h: 72px; --d: 48px; }
.s-onprem .engine .face-label { font-size: 18px; }
.s-onprem .embed   { --x: 248px; --y: 125px; --w: 88px; }
.s-onprem .pulse-ring { --rx: 186px; --ry: 150px; }
.s-onprem .w1 { --wx: 64px;  --wy: 90px;  --a: 90deg;   --len: 106px; --speed: 3s; }
.s-onprem .w2 { --wx: 106px; --wy: 221px; --a: -58deg;  --len: 84px;  --delay: .5s; }
.s-onprem .w3 { --wx: 222px; --wy: 150px; --a: 0deg;    --len: 30px;  --speed: 1.2s; }
.s-onprem .w4 { --wx: 336px; --wy: 150px; --a: -77deg;  --len: 94px;  --delay: .2s; }
.s-onprem .w5 { --wx: 336px; --wy: 150px; --a: -6deg;   --len: 22px;  --speed: 1s; }
.s-onprem .w6 { --wx: 336px; --wy: 150px; --a: 76deg;   --len: 83px;  --delay: .6s; }
/* incoming chunk dropping into the watch folder */
.s-onprem .drop { --x: 32px; --y: 45px; --w: 64px; --h: 40px; --z: 14px; animation: onp-drop 9s cubic-bezier(.5, 0, .3, 1) infinite; }
.s-onprem .drop .ext { color: #fff; }
/* HLS renditions: three rows of .ts chunks */
.s-onprem .ts { --w: 20px; --h: 36px; --d: 10px; --c: #2a2a2f; border: 1px solid rgba(255, 255, 255, .08); animation: onp-lit 9s ease-in-out infinite; }
.s-onprem .r1 { --y: 40px; }
.s-onprem .r2 { --y: 126px; }
.s-onprem .r3 { --y: 212px; }
.s-onprem .k1 { --x: 356px; }
.s-onprem .k2 { --x: 382px; }
.s-onprem .k3 { --x: 408px; }
.s-onprem .r1.k2 { animation-delay: .25s; } .s-onprem .r1.k3 { animation-delay: .5s; }
.s-onprem .r2.k1 { animation-delay: .15s; } .s-onprem .r2.k2 { animation-delay: .4s; } .s-onprem .r2.k3 { animation-delay: .65s; }
.s-onprem .r3.k1 { animation-delay: .3s; }  .s-onprem .r3.k2 { animation-delay: .55s; } .s-onprem .r3.k3 { animation-delay: .8s; }
.s-onprem .lbl.l1 { left: 356px; top: 80px; }
.s-onprem .lbl.l2 { left: 356px; top: 166px; }
.s-onprem .lbl.l3 { left: 356px; top: 252px; }
.s-onprem .hud-cpu  { bottom: 8%; left: 2%; }
.s-onprem .hud-re   { bottom: 8%; right: 2%; }
.s-onprem .hud-cc   { top: 10%; right: 2%; }
.s-onprem .hud-mask { top: 10%; left: 2%; }

@keyframes onp-drop {
  0% { translate: 0 0 140px; opacity: 0; }
  6% { opacity: 1; }
  18%, 26% { translate: 0 0 0; opacity: 1; }
  34%, 100% { translate: 0 0 0; opacity: 0; }
}
@keyframes onp-lit {
  0%, 48% { --c: #2a2a2f; box-shadow: none; }
  56%, 88% { --c: #c4251b; box-shadow: 0 0 18px rgba(240, 72, 72, .55); }
  96%, 100% { --c: #2a2a2f; box-shadow: none; }
}

/* ==========================================================================
   Scene 2: Iconik custom action -> translation -> re-ingest.
   The SRT on the Iconik asset travels to the engine, a provider translates
   it, language files fan out and then stack back onto the same asset.
   ========================================================================== */
.s-iconik .mam { --x: 14px; --y: 84px; --w: 140px; --h: 132px; --d: 14px; --c: #202024; border: 1px solid rgba(255, 255, 255, .08); }
.s-iconik .mam > .face-label { align-items: flex-start; justify-content: flex-start; padding: 8px 0 0 10px; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .14em; color: rgba(255, 255, 255, .5); }
.s-iconik .asset { --x: 26px; --y: 104px; --w: 78px; --h: 46px; --d: 6px; --z: 14px; --c: #2e2e34; }
.s-iconik .asset .face-label { font-size: 11px; color: rgba(255, 255, 255, .75); }
.s-iconik .action { --x: 114px; --y: 108px; --w: 30px; --h: 30px; --d: 6px; --z: 14px; --c: #c4251b; border-radius: 6px; animation: ico-press 9s ease-in-out infinite; }
.s-iconik .action .face-label { font-size: 9px; }
.s-iconik .src { --x: 34px; --y: 160px; --w: 62px; --h: 40px; --z: 15px; animation: ico-src 9s cubic-bezier(.5, 0, .3, 1) infinite; }
.s-iconik .engine { --x: 196px; --y: 114px; --w: 72px; --h: 72px; --d: 48px; }
.s-iconik .engine .face-label { font-size: 18px; }
.s-iconik .pulse-ring { --rx: 232px; --ry: 150px; }
.s-iconik .prov { --x: 330px; --y: 22px; --w: 100px; --h: 54px; }
.s-iconik .w1 { --wx: 154px; --wy: 150px; --a: 0deg;   --len: 44px;  --speed: 1.6s; }
.s-iconik .w2 { --wx: 232px; --wy: 150px; --a: -27deg; --len: 158px; --delay: .4s; }
.s-iconik .w3 { --wx: 232px; --wy: 150px; --a: 22deg;  --len: 116px; --delay: .9s; }
/* translated files: --fx/--fy = offset from the engine, --bx/--by/--bz = offset back onto the asset */
.s-iconik .lang { --x: 340px; --w: 62px; --h: 40px; --z: 6px; animation: ico-lang 9s cubic-bezier(.45, 0, .3, 1) infinite; }
.s-iconik .lang .ext { color: #fff; }
.s-iconik .g1 { --y: 104px; --fx: -134px; --fy: 26px;  --bx: -306px; --by: 56px;  --bz: 20px; }
.s-iconik .g2 { --y: 150px; --fx: -134px; --fy: -20px; --bx: -306px; --by: 10px;  --bz: 26px; animation-delay: .15s; }
.s-iconik .g3 { --y: 196px; --fx: -134px; --fy: -66px; --bx: -306px; --by: -36px; --bz: 32px; animation-delay: .3s; }
.s-iconik .g4 { --y: 242px; --fx: -134px; --fy: -112px; --bx: -306px; --by: -82px; --bz: 38px; animation-delay: .45s; }
.s-iconik .hud-act  { top: 10%; left: 2%; }
.s-iconik .hud-fmt  { bottom: 8%; left: 2%; }
.s-iconik .hud-back { bottom: 8%; right: 2%; }

@keyframes ico-press {
  0%, 4% { translate: 0 0 0; box-shadow: 0 0 0 rgba(240, 72, 72, 0); }
  8% { translate: 0 0 -4px; box-shadow: 0 0 30px rgba(240, 72, 72, .9); }
  14%, 100% { translate: 0 0 0; box-shadow: 0 0 10px rgba(240, 72, 72, .35); }
}
@keyframes ico-src {
  0%, 10% { translate: 0 0 0; opacity: 1; }
  18% { translate: 0 0 50px; opacity: 1; }
  30% { translate: 166px -30px 60px; opacity: 1; }
  34%, 88% { translate: 166px -30px 60px; opacity: 0; }
  96%, 100% { translate: 0 0 0; opacity: 1; }
}
@keyframes ico-lang {
  0%, 34% { translate: var(--fx) var(--fy) 40px; opacity: 0; }
  44%, 60% { translate: 0 0 0; opacity: 1; }
  76%, 90% { translate: var(--bx) var(--by) var(--bz); opacity: 1; }
  98%, 100% { translate: var(--bx) var(--by) var(--bz); opacity: 0; }
}

/* ==========================================================================
   Scene 3: extract + retime + convert in one cloud job.
   Caption channels rise out of the MXF master, the timeline is reset to
   00:00:00:00 at 23.976, an iTT file lights up and is delivered.
   ========================================================================== */
.s-extract .sol-fence { --x: 4px; --y: 8px; --w: 330px; --h: 284px; }
.s-extract .master {
  --x: 22px; --y: 178px; --w: 206px; --h: 78px; --d: 22px; --c: #1c1c20;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .12), transparent 55%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .09) 0 2px, transparent 2px 34px),
    var(--c);
  border: 1px solid rgba(255, 255, 255, .08);
}
.s-extract .master .face-label { align-items: flex-end; justify-content: flex-start; padding: 0 0 8px 12px; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .12em; color: rgba(255, 255, 255, .55); }
.s-extract .ch { --y: 186px; --w: 54px; --h: 36px; --z: 22px; animation: ext-rise 9s cubic-bezier(.3, 1.2, .5, 1) infinite; }
.s-extract .ch .ext { top: 7px; left: 9px; font-size: 10px; color: #fff; }
.s-extract .ch .lines { inset: 22px 9px 4px; scale: .4; transform-origin: 0 0; }
.s-extract .c1 { --x: 34px; }
.s-extract .c2 { --x: 98px;  animation-delay: .2s; }
.s-extract .c3 { --x: 162px; animation-delay: .4s; }
/* retime timeline */
.s-extract .timeline { --x: 26px; --y: 34px; --w: 228px; --h: 92px; --z: 6px; border-radius: 8px; background: rgba(20, 20, 22, .85); border: 1px solid rgba(255, 255, 255, .1); }
.s-extract .timeline .tc { position: absolute; left: 12px; top: 10px; display: inline-grid; font: 700 15px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: #fff; }
.s-extract .timeline .tc span { grid-area: 1 / 1; }
.s-extract .timeline .tc .a { animation: ext-tc-a 9s steps(1) infinite; }
.s-extract .timeline .tc .b { color: #4ade80; animation: ext-tc-b 9s steps(1) infinite; }
.s-extract .timeline .fps { position: absolute; right: 12px; top: 12px; font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: rgba(255, 255, 255, .55); }
.s-extract .timeline .lane { position: absolute; left: 12px; right: 12px; bottom: 14px; height: 30px; border-radius: 4px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.s-extract .timeline .lane i {
  position: absolute; top: 7px; height: 16px; width: 30px; border-radius: 3px;
  background: linear-gradient(90deg, #a2160f, #f04848);
  box-shadow: 0 0 10px rgba(240, 72, 72, .6);
  left: var(--l);
  animation: ext-shift 9s ease-in-out infinite;
}
.s-extract .timeline .lane i:nth-child(1) { --l: 70px; }
.s-extract .timeline .lane i:nth-child(2) { --l: 110px; width: 22px; }
.s-extract .timeline .lane i:nth-child(3) { --l: 142px; width: 40px; }
.s-extract .timeline .lane i:nth-child(4) { --l: 188px; width: 14px; }
.s-extract .itt { --x: 252px; --y: 128px; --w: 72px; --h: 52px; --z: 4px; animation: ext-lit 9s ease-in-out infinite; }
.s-extract .itt .ext { top: 9px; left: 12px; font-size: 12px; }
.s-extract .itt .lines { inset: 28px 12px 6px; scale: .5; transform-origin: 0 0; }
.s-extract .dock { --x: 350px; --y: 206px; --w: 82px; --h: 52px; }
.s-extract .w1 { --wx: 154px; --wy: 178px; --a: -90deg; --len: 52px; --speed: 1.8s; --delay: .8s; }
.s-extract .w2 { --wx: 254px; --wy: 92px;  --a: 50deg;  --len: 46px; --speed: 1.6s; --delay: 1.2s; }
.s-extract .w3 { --wx: 300px; --wy: 168px; --a: 50deg;  --len: 80px; --speed: 2s; --delay: 2s; }
.s-extract .hud-job  { top: 10%; right: 2%; }
.s-extract .hud-egr  { bottom: 8%; left: 2%; }
.s-extract .hud-cost { bottom: 8%; right: 2%; }

@keyframes ext-rise {
  0%, 6% { translate: 0 0 0; opacity: 0; }
  12% { opacity: 1; }
  24%, 40% { translate: 0 0 60px; opacity: 1; }
  48%, 100% { translate: 40px -110px 40px; opacity: 0; }
}
@keyframes ext-tc-a { 0% { opacity: 1; } 52% { opacity: 0; } 100% { opacity: 1; } }
@keyframes ext-tc-b { 0% { opacity: 0; } 52% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ext-shift { 0%, 42% { translate: 0 0; } 54%, 92% { translate: -58px 0; } 100% { translate: 0 0; } }
@keyframes ext-lit {
  0%, 54% { --c: #1b1b1f; box-shadow: none; translate: 0 0 0; }
  62%, 90% { --c: #b0201a; box-shadow: 0 0 40px rgba(240, 72, 72, .5); translate: 0 0 10px; }
  98%, 100% { --c: #1b1b1f; box-shadow: none; translate: 0 0 0; }
}

/* ---- Reduced motion: show each scene's finished state ------------------ */
@media (prefers-reduced-motion: reduce) {
  .s-onprem .drop { opacity: 0; }
  .s-onprem .ts { --c: #c4251b; }
  .s-iconik .lang { translate: none; opacity: 1; }
  .s-extract .ch { translate: 0 0 60px; }
  .s-extract .timeline .tc .a { opacity: 0; }
  .s-extract .timeline .lane i { translate: -58px 0; }
  .s-extract .itt { --c: #b0201a; }
  .sol-fence { animation: none; }
}
