/* APP PREVIEW section — tablet mockup video */
.app-preview-section {
  position: relative;
}

.app-preview-video-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 90px 20px 72px;
}

/* Tablet frame mockup (Figma export, 2788x2068, transparent screen hole).
   The opaque frame is painted above the video; the video fills only the
   screen-hole region of the frame, clipped to the hole's rounded corners. */
.app-preview-mockup {
  position: relative;
  width: 100%;
  max-width: 1080px;
  aspect-ratio: 2788 / 2068;
}

/* The screen hole in the frame is 2388x1668 at (200, 200) of 2788x2068.
   The video overshoots it by ~0.57% on every side so it tucks under the
   opaque bezel: sitting flush left a sub-pixel seam where the purple section
   background bled through the hole edge, and rounding the video's own corners
   cut a wider arc than the hole did, which showed purple at all four corners.
   The frame is painted on top, so it alone clips the video to the hole. */
.app-preview-video {
  position: absolute;
  left: 6.6%;
  top: 9.1%;
  width: 86.8%;
  height: 81.8%;
  z-index: 1;
  display: block;
  background: #000;
  object-fit: contain;
}

.app-preview-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

/* Phone companion, tucked into the tablet's bottom-right corner: it overlaps
   the last ~13% of the video and hangs just past the tablet's bottom and
   right edges. Sized in % of the mockup so it keeps the same relationship to
   the tablet at every width. The SVG frame is painted above the video and
   its screen is a transparent hole, so the video shows through. */
.app-preview-phone {
  position: absolute;
  right: 0.5%;
  bottom: 1.5%;
  width: 18%;
  aspect-ratio: 407 / 858;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

/* The video fills the whole phone container and is clipped by the exact
   screen-hole path from the frame SVG (clip-path #phone-screen-clip, an
   objectBoundingBox copy of the hole). The hole is a composite cubic curve,
   not a CSS-drawable arc, so border-radius alone always left see-through
   slivers. The opaque frame ring is painted on top as well. */
.app-preview-phone-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
  background: #050505;
  object-fit: cover;
  clip-path: url(#phone-screen-clip);
}

.app-preview-phone-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

@media screen and (max-width: 991px) {
  .app-preview-video-wrap {
    padding: 76px 18px 56px;
  }
}

@media screen and (max-width: 479px) {
  /* the title sits inside the section's own 60px padding on phones, so the
     wrap's 60px on top of it left a 73px gap down to the tablet */
  .app-preview-video-wrap {
    padding: 28px 12px 40px;
  }

  /* at 18% the phone is only ~63px wide next to the tablet, too small to read */
  .app-preview-phone {
    width: 22%;
  }
}
