/* Shared media presentation for the existing deployed dark site. */
:root{--capture-phone-height:560px;--capture-phone-width:calc(var(--capture-phone-height)/2.08);--capture-phone-shell:#0a1119;--capture-phone-radius:42px}
@media(min-width:701px){:root{--capture-phone-height:620px}}
@media(min-width:1280px){:root{--capture-phone-height:660px}}
.phone-frame{position:relative;display:block;flex:none;box-sizing:border-box;width:var(--capture-phone-width);min-width:var(--capture-phone-width);height:var(--capture-phone-height);margin:0;padding:34px 8px 12px;border:1px solid var(--line-bright);border-radius:var(--capture-phone-radius);background:var(--capture-phone-shell);box-shadow:inset 0 0 0 2px var(--capture-phone-shell),var(--shadow-sm);overflow:hidden;transform:none}
.phone-frame::before{content:"";position:absolute;top:10px;left:50%;width:68px;height:16px;border-radius:999px;background:#030609;transform:translateX(-50%);pointer-events:none}
.phone-frame img{display:block;box-sizing:border-box;width:100%;height:100%;min-width:0;min-height:0;padding:12px 8px;border-radius:20px;object-fit:contain;object-position:center;background:var(--bg-deep)}
.phone-film,.android-stack{position:static;display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start;gap:32px;min-width:0;min-height:0;margin:0;padding:0;overflow:visible}
.device-card{display:grid;grid-template-rows:var(--capture-phone-height) auto;align-content:start;flex:0 0 var(--capture-phone-width);width:var(--capture-phone-width);margin:0}
.device-card .media-caption{display:block;min-height:4rem;margin-top:12px;color:var(--muted);font-size:var(--capture-caption-size,14px);line-height:1.5;overflow-wrap:anywhere}
.hero-phone{position:static;width:var(--capture-phone-width);margin:0}
.home-hero .hero-layout{grid-template-columns:minmax(0,1fr);gap:32px}
.home-hero .hero-product{display:grid;grid-template-columns:minmax(0,1fr);align-items:start;justify-items:center;gap:28px;width:100%;margin:0}
.home-hero .hero-product .desktop-frame{grid-area:auto;width:100%;max-width:1100px;margin:0;transform:none}
main .platform-showcase,main .page-media-grid{grid-template-columns:minmax(0,1fr);gap:32px;align-items:start}
main .platform-duet{grid-template-columns:minmax(0,1fr);justify-items:center;align-items:start}
.platform-duet-copy{justify-self:start}
main :is(.platform-showcase,.page-media-grid,.platform-duet) .desktop-frame{width:100%;max-width:1100px;margin-inline:auto}
main .platform-showcase>:has(>.desktop-frame){width:100%}
main .story-row:has(.desktop-frame),main .story-row:nth-child(even):has(.desktop-frame){grid-template-columns:minmax(0,1fr)}
main .story-row:has(.desktop-frame) .story-copy{order:0}
.story-media:has(.phone-frame){display:grid;justify-items:center}
.mobile-module-image{width:100%;max-width:none}
.mobile-module-image .phone-frame{margin-inline:auto}
.platform-grid{grid-template-columns:minmax(0,1fr)}
.module-visual-stack .desktop-frame img{object-fit:contain}
.page-hero-content:not(:has(>.hero-aside)){grid-template-columns:minmax(0,1fr)}
.page-hero.compact:has(.page-hero-content:not(:has(>.hero-aside))){min-height:0}
.gallery-strip[data-gallery-layout="grid"]{display:grid;grid-template-columns:minmax(0,1fr);gap:32px 24px;overflow:visible;scroll-snap-type:none;align-items:stretch}
[data-gallery-layout="grid"] .gallery-item{min-width:0;margin:0}
[data-gallery-layout="grid"] .gallery-item.is-hidden{display:none}
[data-gallery-layout="grid"] .gallery-button{display:grid;grid-template-rows:auto 1fr;align-content:start;width:100%;height:100%;min-width:0}
[data-gallery-layout="grid"] .desktop-frame{display:flex;flex-direction:column;box-sizing:border-box;width:100%;aspect-ratio:4/3;margin:0;padding:10px;background:var(--bg-deep)}
[data-gallery-layout="grid"] .desktop-frame::before{flex:none}
[data-gallery-layout="grid"] .desktop-frame img{flex:1 1 0;width:100%;height:0;min-height:0;object-fit:contain}
[data-gallery-layout="grid"] .phone-frame{margin-inline:auto}
[data-gallery-layout="grid"] .media-caption{display:grid;grid-template-columns:minmax(0,1fr);align-content:start;gap:4px;min-height:4.5rem;margin-top:12px;overflow-wrap:anywhere}
[data-gallery-layout="grid"] .mobile .media-caption{width:var(--capture-phone-width);margin-inline:auto}
[data-gallery-layout="grid"] .media-caption strong{min-width:0}
@media(min-width:701px){.gallery-strip[data-gallery-layout="grid"]{grid-template-columns:repeat(2,minmax(0,1fr))}[data-gallery-layout="grid"] .gallery-item:not(.mobile){grid-column:1/-1}}
@media(min-width:1280px){.home-hero .hero-product{grid-template-columns:minmax(0,1fr) var(--capture-phone-width)}main .platform-duet{grid-template-columns:minmax(0,1fr) var(--capture-phone-width)}main .story-row:has(.desktop-frame),main .story-row:nth-child(even):has(.desktop-frame){grid-template-columns:minmax(0,.65fr) minmax(0,1.35fr)}.gallery-strip[data-gallery-layout="grid"]{grid-template-columns:repeat(6,minmax(0,1fr))}[data-gallery-layout="grid"] .gallery-item:not(.mobile){grid-column:span 3}[data-gallery-layout="grid"] .gallery-item.mobile{grid-column:span 2}}
@media(forced-colors:active){.phone-frame{border-color:CanvasText}.phone-frame::before{background:CanvasText}}

@media(min-width:1280px){[data-gallery-layout="grid"] .gallery-item:not(.mobile)+.gallery-item.mobile{grid-column:1/span 2}}

/* Keep the existing phone ratio inside narrow module cards, including scrollbars. */
@media(max-width:960px){
  .module-tabs{grid-template-columns:minmax(0,1fr)}
  .module-tabs .module-story{min-width:0}
  .module-tabs .mobile-module-image{width:100%;max-width:var(--capture-phone-width)}
  .module-tabs .mobile-module-image .phone-frame{width:100%;min-width:0;height:auto;aspect-ratio:1/2.08}
}
