/* Video-only previews. The actual video poster is always visible before playback.
   No obsolete model images; no JavaScript-dependent opacity gate. */
/* Never alter the hero frame's layout position with the generic media class.
   The hero frame is absolutely positioned on desktop and a normal flex item on mobile.
   A former .demo-media { position:relative } overrode this and collapsed the frame to 0px. */
.demo-media{isolation:isolate;overflow:hidden;background:#faf9fb}
.revit-case-media.demo-media{position:relative}
.hero-visual>.hero-revit-frame.demo-media{position:absolute;inset:44px 0 104px;width:auto;height:auto;min-height:0}
.demo-media .demo-video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;display:block;opacity:1;z-index:1;background:#faf9fb}
.revit-case-media.demo-media .demo-video{inset:14px;width:calc(100% - 28px);height:calc(100% - 28px)}
.demo-media .demo-video-control{position:absolute;right:12px;bottom:12px;z-index:4;border:1px solid rgba(255,255,255,.7);background:#2A0647;color:#fff;border-radius:5px;padding:10px 14px;min-width:72px;min-height:44px;font-size:13px;line-height:1.2;cursor:pointer}
.demo-media .demo-video-control[hidden]{display:none!important}
.demo-media .demo-video-control:focus-visible{outline:3px solid #b58cff;outline-offset:3px}
.demo-media .demo-video-control:hover{background:rgba(42,6,71,.98)}
.hero-revit-frame .demo-video-control{bottom:16px;right:16px}
.hero-revit-frame .revit-media-tag{z-index:3}
@media(prefers-reduced-motion:reduce){.demo-media .demo-video{transition:none}}

/* Restore mobile flow. Must have higher specificity than the desktop hero rule. */
@media(max-width:760px){
  .hero-visual>.hero-revit-frame.demo-media{
    position:relative;inset:auto;flex:0 0 auto;
    height:clamp(220px,66vw,350px);width:100%;min-height:0
  }
}

/* Keep the hero recording strictly within its card even if older site CSS is cached. */
.hero-visual{position:relative;min-width:0;overflow:hidden;isolation:isolate}
.hero-visual>.hero-revit-frame.demo-media{overflow:hidden;max-width:100%;z-index:1}
.hero-visual>.hero-revit-frame.demo-media video{max-width:100%;max-height:100%;object-fit:contain}
.hero-visual>.hero-example{position:absolute;z-index:2;left:0;right:0;bottom:0;max-width:100%;overflow-wrap:break-word}
@media(max-width:760px){.hero-visual>.hero-example{position:relative;left:auto;right:auto;bottom:auto}}

/* Keep all previews, including the product example, on one playback policy. */
.product-demo-media.demo-media{position:relative}

