/* The banner uses the same compact preview surface across the Academy. */
.hero-band { scroll-margin-top: var(--header-height); }
.hero-stage {
  position: relative;
  width: 100%;
  max-width: 30rem;
  height: 17.5rem;
  justify-self: center;
  container-type: inline-size;
}
.hero-composition { position: absolute; inset: .45rem 1.15rem .2rem 0; pointer-events: none; }
.hero-scene { position: absolute; inset: 0; animation: scene-enter .34s ease-out both; }
.hero-scene[hidden] { display: none; }
.scene-window {
  position: absolute;
  inset: 8% 7% 9% 3%;
  display: flex;
  flex-direction: column;
  gap: .62rem;
  padding: .88rem 1rem;
  overflow: hidden;
  border: 1px solid #dbe5fb;
  border-radius: .65rem;
  background: #f8faff;
  color: #102145;
  box-shadow: 0 15px 34px #00256b45;
}
.scene-heading { flex: none; font-size: .82rem; font-weight: 650; line-height: 1.25; }
.scene-window img, .scene-popover img, .scene-device img { display: block; width: 100%; height: 100%; object-fit: cover; }
.scene-window small, .scene-popover small { display: block; font-size: .73rem; line-height: 1.25; }
.scene-popover {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: .25rem;
  padding: .8rem .92rem;
  border-radius: .52rem;
  background: #11264e;
  color: #fff;
  box-shadow: 0 10px 24px #071a493d;
}
.scene-popover strong { font-size: .82rem; line-height: 1.28; font-weight: 650; }
.scene-popover small { color: #dfeaff; }

.scene-video-window { inset: 3% 11% 7% 3%; }
.scene-film, .scene-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: .37rem;
  background: #132b58;
}
.scene-film > img { object-position: center 45%; }
.scene-timeline { position: relative; flex: none; height: .24rem; border-radius: 8px; background: #d8e2f6; }
.scene-timeline > span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #2860ed;
  transform: scaleX(.66);
  transform-origin: left;
  animation: preview-playhead 7.2s ease-in-out infinite;
}
.scene-timeline > i { position: absolute; top: -.15rem; left: 32%; width: .16rem; height: .53rem; border-radius: .1rem; background: #102d6c; }
.scene-timeline > i + i { left: 74%; }
.scene-scan {
  position: absolute;
  inset: 0 auto 0 0;
  width: 29%;
  border-inline-end: 1px solid #e4eeffb0;
  background: #0041e427;
  animation: identify-context 7.2s ease-in-out infinite;
}
.scene-context { right: 0; bottom: 1%; animation: context-found 7.2s ease-in-out infinite; }

.scene-pipeline-window { inset: 12% 3% 10% 3%; padding-top: 1rem; }
.scene-flow {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(min-content, 1fr) minmax(.4rem, .23fr) minmax(max-content, 1.16fr) minmax(.4rem, .23fr) minmax(min-content, 1fr);
  align-items: center;
}
.scene-node {
  min-width: 0;
  display: grid;
  justify-items: start;
  gap: .27rem;
  padding: .66rem .55rem;
  border: 1px solid #dae4fa;
  border-radius: .42rem;
  background: #fff;
}
.scene-node:nth-child(3) { background: #eaf0ff; border-color: #b7ccff; white-space: nowrap; }
.scene-node strong { font-size: clamp(.67rem, 2.8cqw, .84rem); line-height: 1.16; }
.scene-node small { color: #4b607f; font-size: clamp(.62rem, 2.3cqw, .74rem); }
.scene-node > i { width: 1.1rem; height: .74rem; border: 1.5px solid #3663d3; border-radius: .17rem; }
.scene-node:nth-child(3) > i { background: #3266ef; border-color: #3266ef; }
.scene-wire { position: relative; overflow: hidden; height: 2px; background: #bfcff1; }
.scene-wire i { position: absolute; inset: 0 auto 0 0; width: 33%; background: #0041e4; animation: route-signal 2.4s linear infinite; }
.scene-wire:nth-child(4) i { animation-delay: .56s; }
.scene-flow-result {
  display: grid;
  grid-template-columns: .38rem 1fr auto;
  align-items: center;
  gap: .46rem;
  border-top: 1px solid #dde6fa;
  padding-top: .65rem;
  font-size: .75rem;
  color: #294775;
  animation: signal-arrived 4.8s ease-in-out infinite;
}
.scene-flow-result i, .scene-impression i {
  height: .36rem;
  width: .36rem;
  border-radius: 50%;
  background: #65a9ff;
}
.scene-flow-result strong { color: #0041ba; font-size: .72rem; }

.scene-stock-window { inset: 8% 26% 10% 3%; }
.scene-inventory-row {
  display: flex;
  align-items: center;
  gap: .6rem;
  min-height: 0;
  flex: 1;
  padding: .35rem;
  border: 1px solid #e0e9fa;
  border-radius: .42rem;
  background: #fff;
  animation: stock-gather 6.8s ease-in-out infinite;
}
.scene-inventory-row:nth-of-type(3) { animation-delay: .24s; }
.scene-inventory-row img { width: 30%; min-width: 2rem; align-self: stretch; border-radius: .22rem; }
.scene-inventory-row:nth-of-type(3) img { object-position: right; }
.scene-inventory-row strong { font-size: .8rem; font-weight: 650; }
.scene-inventory-row small { color: #4c6284; }
.scene-proposal { width: min(49%, 12rem); right: 0; bottom: 3%; animation: proposal-ready 6.8s ease-in-out infinite; }
.scene-proposal strong { margin-bottom: .2rem; }
.scene-proposal-row { display: flex; align-items: center; gap: .45rem; font-size: .72rem; min-height: 1.32rem; color: #e9f2ff; }
.scene-proposal-row i { display: block; width: .51rem; height: .3rem; border: solid #9dcbff; border-width: 0 0 1.4px 1.4px; transform: rotate(-45deg); }

.scene-insertion {
  position: absolute;
  inset: auto 4% 8% 4%;
  height: 30%;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .32rem;
  border-radius: .38rem;
  background: #05224edb;
  color: #fff;
  animation: insert-creative 7.2s cubic-bezier(.28,.66,.29,1) infinite;
}
.scene-insertion > img { width: auto; max-width: 23%; height: 100%; aspect-ratio: 1; border-radius: .19rem; }
.scene-insertion > span > strong { display: block; font-size: .76rem; line-height: 1.15; }
.scene-insertion small { color: #e0edff; font-size: .68rem; }
.scene-impression { display: flex; align-items: center; gap: .48rem; bottom: 1%; right: 0; animation: record-impression 7.2s ease-in-out infinite; }

.scene-library-window { inset: 10% 5% 10% 3%; }
.scene-library { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .48rem; }
.scene-tile {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #dbe5f8;
  border-radius: .32rem;
  background: #fff;
  animation: inventory-highlight 6s ease-in-out infinite;
}
.scene-tile img { flex: 1; min-height: 0; }
.scene-tile strong { font-size: .72rem; display: block; padding: .36rem; }
.scene-tile:nth-child(2) { animation-delay: 1.5s; }
.scene-tile:nth-child(2) img { object-position: 15% center; }
.scene-tile:nth-child(3) { animation-delay: 3s; }
.scene-tile:nth-child(3) img { object-position: 83% center; }
.scene-slot-line { display: flex; align-items: center; gap: .45rem; font-size: .7rem; }
.scene-slot-line i { width: .45rem; height: .45rem; border-radius: 50%; background: #5685f9; animation: signal-arrived 3s ease-in-out infinite; }

.scene-brand-window { inset: 8% 7% 10% 6%; }
.scene-brand-preview { display: grid; flex: 1; min-height: 0; grid-template-columns: 1fr 1fr; gap: .7rem; }
.scene-product { overflow: hidden; border-radius: .4rem; background: #f2e6d9; }
.scene-product img { object-fit: contain; }
.scene-review {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: .58rem;
  padding: .54rem;
  animation: preview-match 6.5s ease-in-out infinite;
}
.scene-review strong { font-size: .85rem; line-height: 1.2; }
.scene-review small { color: #485c80; }
.scene-review > span { padding: .32rem .42rem; border-radius: .22rem; font-size: .65rem; background: #e6eeff; color: #153a81; }

.scene-plan-window { inset: 13% 6% 12% 5%; }
.scene-plan { display: grid; gap: .62rem; align-content: center; flex: 1; }
.scene-lane { display: grid; grid-template-columns: 2.2rem 1fr; align-items: center; gap: .42rem; }
.scene-lane b { font-size: .78rem; font-weight: 560; }
.scene-lane > div { display: flex; align-items: center; padding-inline: .25rem; height: 1.37rem; border: 1px solid #dde7fb; border-radius: .29rem; background: #eef3ff; }
.scene-lane span { display: block; height: .75rem; width: 70%; border-radius: .2rem; background: #285beb; transform-origin: left; animation: schedule-line 6.4s ease-in-out infinite; }
.scene-lane:nth-child(2) span { margin-inline-start: 18%; width: 62%; background: #6793ff; animation-delay: .28s; }
.scene-lane:nth-child(3) span { margin-inline-start: 37%; width: 56%; background: #102d6c; animation-delay: .56s; }

.scene-design-window { inset: 4% 22% 10% 3%; }
.scene-canvas > img { opacity: .78; }
.scene-selection {
  position: absolute;
  inset: 25% auto 8% 9%;
  width: 39%;
  outline: 1px solid #b7d0ff;
  outline-offset: 3px;
  background: #f3e7d7;
  transform-origin: left bottom;
  animation: resize-creative 6.8s ease-in-out infinite;
}
.scene-selection img { object-fit: contain; }
.scene-selection i { position: absolute; top: -.31rem; right: -.31rem; width: .35rem; height: .35rem; background: #fff; border: 1px solid #2a60fb; }
.scene-device {
  display: grid;
  position: absolute;
  right: 2%;
  bottom: 2%;
  width: 25%;
  max-width: 6.3rem;
  padding: .32rem;
  border: 1px solid #aac6ff;
  border-radius: .54rem;
  background: #092455;
  color: #fff;
  animation: device-preview 6.8s ease-in-out infinite;
}
.scene-device img { height: auto; aspect-ratio: 4 / 5; border-radius: .27rem; }
.scene-device span { font-size: .68rem; text-align: center; padding: .29rem 0 .08rem; }

.scene-analysis-window { inset: 10% 6% 9% 5%; }
.scene-graph {
  position: relative;
  display: flex;
  align-items: end;
  gap: 5%;
  padding: .36rem 5% 0;
  flex: 1;
  min-height: 0;
  border: solid #dce6fb;
  border-width: 1px 0;
  background: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), #e1e9fa calc(25% - 1px) 25%);
}
.scene-graph > i { width: 11%; height: 47%; background: #6691f9; border-radius: .18rem .18rem 0 0; transform-origin: bottom; animation: plot-event 6.4s ease-in-out infinite; }
.scene-graph > i:nth-child(2n) { background: #285beb; height: 59%; animation-delay: .22s; }
.scene-graph > i:nth-child(3n) { height: 73%; animation-delay: .4s; }
.scene-graph > i:nth-child(5) { height: 67%; }
.scene-graph > i:nth-child(7) { height: 90%; animation-delay: .63s; }
.scene-graph-marker { position: absolute; left: 68%; top: 15%; width: .42rem; height: .42rem; border-radius: 50%; background: #0e2352; animation: chart-marker 6.4s ease-in-out infinite; }
.scene-legend { display: flex; gap: .8rem; }
.scene-legend span { display: flex; align-items: center; gap: .3rem; font-size: .7rem; }
.scene-legend span::before { content: ""; width: .36rem; height: .36rem; border-radius: .12rem; background: #6691f9; }
.scene-legend span + span::before { background: #285beb; }

.motion-control {
  position: absolute;
  display: grid;
  place-items: center;
  top: 0;
  right: 0;
  width: 2rem;
  height: 2rem;
  border: 1px solid #ffffff88;
  border-radius: 50%;
  background: #0041e4;
  cursor: pointer;
}
.motion-control input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.motion-control:focus-within { outline: 2px solid #fff; outline-offset: 3px; }
.motion-symbol { width: .56rem; height: .62rem; border-inline: .13rem solid #fff; }
.motion-control:has(input:checked) .motion-symbol { width: 0; height: 0; border: .33rem solid transparent; border-left: .53rem solid #fff; translate: .16rem 0; }
.hero-stage:has(.motion-control input:checked) .hero-motion,
.hero-stage.is-offscreen .hero-motion { animation-play-state: paused; }

@keyframes scene-enter {
  from { transform: translateY(5px); }
  to { transform: translateY(0); }
}
@keyframes preview-playhead {
  0%, 10% { transform: scaleX(.12); }
  73%, 100% { transform: scaleX(1); }
}
@keyframes identify-context {
  0%, 12% { transform: translateX(-105%); opacity: .36; }
  56%, 81% { transform: translateX(180%); opacity: .9; }
  100% { transform: translateX(273%); opacity: 0; }
}
@keyframes context-found {
  0%, 27% { transform: translateY(6px); opacity: .55; }
  45%, 90% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(6px); opacity: .55; }
}
@keyframes route-signal {
  0%, 13% { transform: translateX(-105%); }
  76%, 100% { transform: translateX(310%); }
}
@keyframes signal-arrived {
  0%, 21%, 100% { opacity: .55; }
  48%, 80% { opacity: 1; }
}
@keyframes stock-gather {
  0%, 100% { transform: translateX(0); }
  45%, 75% { transform: translateX(4px); }
}
@keyframes proposal-ready {
  0%, 19%, 100% { opacity: .75; transform: translate(8px, 7px); }
  42%, 82% { opacity: 1; transform: translate(0, 0); }
}
@keyframes insert-creative {
  0%, 24%, 100% { transform: translateY(120%); opacity: .35; }
  42%, 91% { transform: translateY(0); opacity: 1; }
}
@keyframes record-impression {
  0%, 52%, 100% { transform: translateY(4px); opacity: .55; }
  67%, 89% { transform: translateY(0); opacity: 1; }
}
@keyframes inventory-highlight {
  0%, 100% { transform: translateY(0); box-shadow: inset 0 0 0 1px #dbe5f8; }
  22%, 44% { transform: translateY(-3px); box-shadow: inset 0 0 0 2px #5b83ff; }
  65% { transform: translateY(0); box-shadow: inset 0 0 0 1px #dbe5f8; }
}
@keyframes preview-match {
  0%, 15%, 100% { opacity: .72; transform: translateX(5px); }
  43%, 84% { opacity: 1; transform: translateX(0); }
}
@keyframes schedule-line {
  0%, 12%, 100% { transform: scaleX(.24); }
  43%, 83% { transform: scaleX(1); }
}
@keyframes resize-creative {
  0%, 100% { transform: translateX(0) scale(.88); }
  51%, 79% { transform: translateX(8px) scale(1); }
}
@keyframes device-preview {
  0%, 15%, 100% { transform: translate(4px, 6px); }
  57%, 86% { transform: translate(0, 0); }
}
@keyframes plot-event {
  0%, 12%, 100% { transform: scaleY(.26); }
  57%, 85% { transform: scaleY(1); }
}
@keyframes chart-marker {
  0%, 100% { opacity: .55; transform: translateY(10px); }
  67%, 89% { opacity: 1; transform: translateY(0); }
}

@media (max-width: 48rem) {
  .hero-band { scroll-margin-top: 7rem; }
  .hero-stage { height: clamp(11.3rem, 51vw, 15.3rem); max-width: 25rem; }
}
@container (max-width: 340px) {
  .scene-window { padding: .59rem .63rem; gap: .44rem; }
  .scene-pipeline-window { inset-inline: 1%; padding-inline: .36rem; }
  .scene-node { padding: .45rem .23rem; }
  .scene-popover { padding: .53rem .63rem; }
  .scene-inventory-row { gap: .33rem; }
  .scene-brand-preview { gap: .26rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-stage .hero-motion { animation: none; }
  .motion-control { display: none; }
}
