/* vidup.co homepage conversion layer (Oct 7): hero App Store row above the demo, desktop QR,
   iPhone sticky "Get the app" bar, deferred demo poster, Google Play toggle. space-v2.css untouched. */

/* Google Play toggle: <html data-gplay="show"> keeps "Google Play · Coming soon" (default).
   Change it to data-gplay="hide" on index.html to remove the label everywhere. */
html[data-gplay="hide"] [data-store="android"] { display: none !important; }

/* MOBILE ONLY (<900px): hero App Store row sits directly under the sub-note, above the demo. */
@media (width < 900px) {
  .store-cta--hero { margin-top: 28px; }
  .hero-demo + .site-works { margin-top: 0; }   /* demo keeps its even 32px above/below (space-v2 .hero-demo margin) */
}
/* Desktop (>=900px) keeps the original order and spacing: demo, then the "Get the app" row, then the
   "Works on sites…" line (DOM order is mobile-first, so restore it with flex order; .hero is a flex column).
   Margins are the original space-v2 values (.store-cta 40px, .site-works 28px auto 18px, .hero-demo unchanged). */
@media (width >= 900px) {
  .hero > .hero-demo { order: 1; }
  .hero > .store-cta--hero { order: 2; }
  .hero > .site-works { order: 3; width: 100%; }
}

/* Desktop-only QR next to the badge row. */
.vp-qr { display: none; }
@media (width >= 900px) and (hover: hover) and (pointer: fine) {
  /* QR card hangs to the right of the badge row (absolutely positioned) so the row keeps its original desktop position. */
  .store-cta--hero .store-row { position: relative; width: max-content; margin-inline: auto; }
  .vp-qr {
    position: absolute; left: calc(100% + 20px); top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; gap: 12px; margin: 0; width: 230px;
    padding: 7px 14px 7px 7px; border: 1px solid #2c3036; border-radius: 14px;
    color: #b4b8be; text-decoration: none; font-size: 13px; line-height: 17px; font-weight: 500;
    text-align: left;
  }
  .vp-qr img { width: 72px; height: 72px; border-radius: 8px; background: #fff; display: block; flex: 0 0 auto; }
  .vp-qr:hover, .vp-qr:focus-visible { border-color: #1685c5; color: #fff; }
}

/* Deferred demo: lightweight poster first, real player iframe on first interaction or tap. */
.hero-demo[data-demo-src] { position: relative; }
.vp-demo-poster {
  display: block; position: relative; width: 100%; max-width: 720px; margin: 0; padding: 0; border: 0;
  aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer;
}
.vp-demo-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.vp-demo-play {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%; background: rgba(11, 12, 14, .62); border: 1.5px solid rgba(255, 255, 255, .55);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.vp-demo-play::after {
  content: ""; position: absolute; left: 26px; top: 20px;
  border-style: solid; border-width: 12px 0 12px 19px; border-color: transparent transparent transparent #fff;
}
.vp-demo-poster:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero-demo.is-loading .vp-demo-play { animation: vp-pulse 1s ease-in-out infinite; }
@keyframes vp-pulse { 50% { opacity: .45; } }
.hero-demo iframe.vp-demo-frame--pending { position: absolute; left: 0; top: 0; opacity: 0; pointer-events: none; }

/* iPhone-only sticky bar (injected by vp-landing.js; never rendered on desktop/Android or in the iOS shell). */
.vp-sticky {
  position: fixed; z-index: 50; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 4px 0 14px;
  border-radius: 16px; background: #1685c5; color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  transform: translateY(calc(100% + 24px + env(safe-area-inset-bottom, 0px)));
  transition: transform .25s ease; will-change: transform;
}
.vp-sticky.is-on { transform: none; }
.vp-sticky-cta {
  flex: 1; display: flex; align-items: center; gap: 10px; height: 100%; min-width: 0;
  color: #fff; text-decoration: none; font: 600 15px/1.2 Inter, system-ui, sans-serif; letter-spacing: -0.01em;
}
.vp-sticky-cta img { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,.85); }
.vp-sticky-cta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vp-sticky-x {
  flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: rgba(255, 255, 255, .9); cursor: pointer;
}
.vp-sticky-x:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
body.vp-sticky-pad { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
@media (width >= 900px) { .vp-sticky { display: none !important; } }
