

#hero-slot {
  display: flex;
  min-width: 0;
  overflow: hidden;
  align-items: stretch;
}

.hero-demo {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 650ms cubic-bezier(0.2, 0, 0.2, 1);
}

.hero-demo[data-playback="motion"][data-ready="true"],
.hero-demo[data-frozen="true"] { opacity: 1; }
.hero-demo[data-frozen="true"] { transition: none; }

.hero-demo-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  box-sizing: border-box;
  flex: none;
  border: 1px solid rgba(244, 244, 244, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(rgba(3, 16, 29, 0.42), rgba(3, 16, 29, 0.42)),
    url("../media/hero-demo-desk.jpg") center / cover no-repeat;
  container-type: size;
}

.hero-demo-camera {
  position: absolute;
  left: 0;
  top: 0;
  width: 1440px;
  height: 900px;
  transform-origin: 0 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 18px;
  background: #0d0d0d;
  box-shadow: 0 24px 64px rgba(0,0,0,0.48);
  will-change: transform;
}

.hero-demo-camera::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 34px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  background:
    radial-gradient(circle at 22px 17px, #ff5f57 0 5px, transparent 5.5px),
    radial-gradient(circle at 40px 17px, #febc2e 0 5px, transparent 5.5px),
    radial-gradient(circle at 58px 17px, #28c840 0 5px, transparent 5.5px),
    linear-gradient(180deg, rgba(38,42,48,0.98), rgba(22,24,28,0.98));
  pointer-events: none;
}

.hero-demo-camera iframe,
.hero-demo-still {
  display: block;
  width: 1440px;
  height: 900px;
  border: 0;
  object-fit: contain;
  object-position: center;
  background: #0d0d0d;
}

.hero-demo-camera iframe {
  pointer-events: none;
  color-scheme: dark;
}

.hero-demo-still {
  width: 100%;
  height: 100%;
}

.hero-demo-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s linear;
}

.hero-demo-caption {
  margin: 0;
  padding: 0.7rem 0.15rem 0;
  color: var(--text-secondary, #c6c6c6);
  font: 400 0.9375rem/1.35 var(--font, "IBM Plex Sans", sans-serif);
  min-height: 2.7em;
}

.hero-demo-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #061b2d;
  opacity: 0;
  pointer-events: none;
}

.hero-demo-input-shield {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  pointer-events: auto;
  touch-action: pan-y;
}

.hero-demo-vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.hero-demo[data-playback="motion"][data-ready="true"] .hero-demo-still { visibility: hidden; }
.hero-demo-still.is-visible { opacity: 1; }

@media (max-width: 1200px) {
  #hero {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto auto;
  }

  #hero .hero-copy {
    grid-column: 1;
    grid-row: 1;
    padding: 88px 32px 28px;
  }

  #hero-slot {
    grid-column: 1;
    grid-row: 2;
    height: auto;
    padding: 8px 32px 12px;
  }

  #hero .hero-facts {
    grid-column: 1;
    grid-row: 3;
  }

  .hero-demo {
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .hero-demo-stage {
    aspect-ratio: 16 / 10;
    flex: none;
    min-height: 0;
  }
}

@media (max-width: 900px) {
  #hero-slot {
    padding: 16px 20px 12px;
  }

  .hero-demo {
    min-height: 0;
  }

  .hero-demo-stage {
    max-height: none;
    aspect-ratio: 16 / 10;
  }

  .hero-demo-caption {
    font-size: 1rem;
    padding-top: 0.6rem;
  }
}

@media (max-width: 740px) {
  #hero .hero-copy {
    padding: 80px 20px 24px;
  }

  #hero-slot {
    padding: 12px 16px 8px;
  }
}

@media (min-width: 741px) and (max-width: 1200px) {
  .hero-demo { max-width: min(100%, 64vh); margin-inline: auto; }
}
@media (max-width: 740px) {
  #hero .hero-copy { padding-bottom: 12px; }
  .hero-demo-caption { font-size: 0.875rem; }
}
