/* Real application captures layered over hardware-only raster frames. */
.product-device { display: block; position: relative; width: 100%; }
.product-device .product-device__hardware { display: block; position: relative; width: 100%; height: auto; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.product-device .product-device__screen { display: block; position: absolute; z-index: 1; margin: 0; border: 0; box-shadow: none; object-fit: contain; object-position: center; background: #09090e; }
.product-device--desktop .product-device__screen { left: 10.7422%; top: 4.8828%; width: 78.5807%; height: 68.3594%; border-radius: .35% / .6%; }
.product-device--phone .product-device__screen { left: 12.5399%; top: 3.5885%; width: 74.9203%; height: 93.0024%; border-radius: 12.63% / 5.73%; }
.device-showcase { min-width: 0; width: 100%; margin: 0; align-self: center; }
.device-scene { position: relative; isolation: isolate; width: 100%; aspect-ratio: 1.48; }
.device-scene__desktop { display: block; position: absolute; width: 100%; top: 0; left: -5%; z-index: 0; }
.device-scene__phone { display: block; position: absolute; width: 31%; bottom: 0; right: -1%; z-index: 2; filter: drop-shadow(-.7rem .8rem 1.2rem rgba(0,0,0,.55)); }
.device-scene a { border-radius: 1rem; }
.device-scene a:focus-visible, .device-open:focus-visible, .phone-duo a:focus-visible { outline: 2px solid var(--focus); outline-offset: .3rem; }
.device-showcase figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: 1rem; color: var(--muted); font-size: .875rem; line-height: 1.7; }
.device-caption__links { display: inline-flex; flex-wrap: wrap; gap: 1rem; }
.device-caption__links a { text-underline-offset: .25em; }
.device-caption__links a:hover { color: var(--text); }
.product-detail-hero__devices { min-width: 0; width: 100%; align-self: center; }
.product-detail-hero__inner:has(.product-detail-hero__module-nav) { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
.product-detail-hero__inner:has(.product-detail-hero__module-nav) > .product-detail-hero__devices { grid-column: 2; grid-row: 2; }
.product-detail-hero__inner:has(.product-detail-hero__module-nav) > .product-detail-hero__module-nav { grid-column: 1 / -1; grid-row: 3; grid-template-columns: repeat(4,minmax(0,1fr)); margin-top: 1rem; }
.device-gallery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4rem 3rem; margin-top: 3.5rem; }
.device-gallery-card { min-width: 0; scroll-margin-top: 7rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.device-gallery-card > h3 { margin-bottom: .65rem; font-size: clamp(1.7rem,3vw,2.6rem); letter-spacing: -.035em; }
.device-gallery-card > p { max-width: 48ch; min-height: 3.5em; margin-bottom: 1.8rem; color: var(--text-soft); font-size: 1rem; line-height: 1.7; }
.product-module-capture-link { margin-top: .25rem; }
.phone-duo { position: relative; isolation: isolate; aspect-ratio: 1 / 1.15; max-width: 35rem; margin-inline: auto; }
.phone-duo__front { position: absolute; display: block; width: 64%; right: 0; bottom: 0; z-index: 2; filter: drop-shadow(-.7rem .8rem 1.2rem rgba(0,0,0,.55)); }
.phone-duo__back { position: absolute; display: block; width: 57%; left: 0; top: 0; z-index: 0; }
.device-open { display: block; width: 100%; }
/* NIWA's supplied Android captures use a wider portrait ratio than Insights. */
.product-device--niwa { aspect-ratio: 941 / 1280; }
.product-device--niwa .product-device__hardware { height: 100%; }
.phone-duo--niwa { aspect-ratio: 1 / .94; }
.niwa-showcase__lead { display: grid; grid-template-columns: minmax(0,1fr) minmax(18rem,.55fr); align-items: end; gap: clamp(2rem,7vw,8rem); }
.niwa-showcase__lead .section-heading { margin-bottom: 0; }
.niwa-showcase__lead h2 { max-width: 16ch; }
.niwa-showcase__actions { display: grid; justify-items: start; gap: var(--space-4); }
.niwa-product-preview { background: linear-gradient(180deg,#07030d,var(--void)); border-bottom: 1px solid var(--border); }
.product-phone-gallery { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); align-items: start; gap: clamp(.8rem,1.6vw,1.4rem); margin-top: clamp(3.5rem,7vw,6rem); }
.product-phone-gallery figure { min-width: 0; }
.product-phone-gallery figure:nth-child(even) { margin-top: 3.5rem; }
.product-phone-gallery figcaption { margin-top: .85rem; color: var(--text-soft); font-size: .875rem; line-height: 1.5; text-align: center; }
.product-phone-gallery .device-open { transition: transform .2s ease; }
.product-phone-gallery:focus-visible { outline: 2px solid var(--focus); outline-offset: .3rem; }
.insights-gallery figure { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.insights-gallery .product-device__hardware, .product-insights-preview__gallery .product-device__hardware { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.insights-gallery .product-device__screen, .product-insights-preview__gallery .product-device__screen { border: 0; box-shadow: none; }
.insights-gallery .device-open, .product-insights-preview__gallery .device-open { transition: transform .2s ease; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .device-open:hover { transform: translateY(-.3rem); }
}
@media (max-width: 64rem) {
  .niwa-showcase__lead { grid-template-columns: minmax(0,1fr); gap: 2rem; }
  .product-detail-hero__inner:has(.product-detail-hero__module-nav) { grid-template-columns: minmax(0,1fr); }
  .product-detail-hero__inner:has(.product-detail-hero__module-nav) > .product-detail-hero__devices { grid-column: 1; grid-row: auto; max-width: 48rem; margin-inline: auto; }
  .product-detail-hero__inner:has(.product-detail-hero__module-nav) > .product-detail-hero__module-nav { grid-column: 1; grid-row: auto; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .device-gallery-grid { gap: 3rem 1.5rem; }
}
@media (max-width: 48rem) {
  .product-phone-gallery { display: flex; margin-inline: -1rem; padding: .5rem 1rem 2rem; overflow-x: auto; gap: .9rem; scroll-padding-left: 1rem; scroll-snap-type: x mandatory; scrollbar-width: thin; overscroll-behavior-inline: contain; }
  .product-phone-gallery figure, .product-phone-gallery figure:nth-child(even) { width: min(72vw,18.5rem); margin-top: 0; flex: 0 0 auto; scroll-snap-align: start; }
  .device-gallery-grid { grid-template-columns: minmax(0,1fr); gap: 3rem; }
  .device-gallery-card > p { min-height: 0; }
  .device-scene { aspect-ratio: 1.36; }
  .device-scene__desktop { width: 104%; left: -6%; top: 1%; }
  .device-scene__phone { width: 35%; right: -1%; }
  .product-detail-hero__inner:has(.product-detail-hero__module-nav) > .product-detail-hero__module-nav { grid-template-columns: minmax(0,1fr); }
  .product-detail-hero__devices--phones { max-width: 30rem; margin-inline: auto; }
  .device-showcase figcaption { font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) { .device-open { transition: none !important; } }
