/* ==========================================================================
   Component · CTA — home-theater scene + closing pitch + store badges
   ========================================================================== */

.cta {
  padding-top: calc(var(--section-pad) / 2);
  padding-bottom: var(--section-pad);
  text-align: center;
}

.cta__scene {
  width: 100%;
}

.cta__scene img {
  width: 100%;
}

/* Theme-matched scene artwork: dark room by default, light console in
   light mode. Both are lazy-loaded, so only the visible one is fetched
   until the section is scrolled near. */

/* Painted background gives the blended image a backdrop even inside the
   reveal engine's isolated stacking context. Also the positioning context
   for the in-frame video overlay. */
.cta__scene {
  position: relative;
  background: var(--color-bg);
  transition: background-color var(--duration-theme) var(--ease-gentle);
}

/* App showcase video, mapped onto the TV screen. The rect is measured from
   the 2880x1646 scene exports (screen pixels: 543,13 → 2339,1022 — same in
   both themes), expressed as percentages so it scales with the image.
   Invisible until it actually plays; the baked screenshot shows otherwise. */
.cta__scene-video {
  position: absolute;
  /* screen rect + ~2px overscan so edges tuck under the bezel */
  left: 18.78%;
  top: 0.61%;
  width: 62.5%;
  height: 61.66%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--duration-medium) var(--ease-gentle);
}

.cta__scene-video.is-playing {
  opacity: 1;
}

/* Lighten melts the scene's baked blacks into the page background */
.cta__scene-img--dark {
  mix-blend-mode: lighten;
}

.cta__scene-img--light { display: none; }

:root[data-theme="light"] .cta__scene-img--dark  { display: none; }
:root[data-theme="light"] .cta__scene-img--light { display: block; }

.cta__title {
  margin-top: clamp(3.5rem, 2rem + 4vw, 6rem);
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: var(--tracking-hero);
  padding-inline: var(--gutter);
}

.cta__sub {
  margin-top: 1.75rem;
  font-size: var(--text-sub);
  color: var(--color-text-tertiary);
  padding-inline: var(--gutter);
}

.cta__badges {
  margin-top: clamp(2.5rem, 2rem + 2vw, 3.75rem);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.625rem;
  padding-inline: var(--gutter);
}

.cta__badges a {
  display: block;
  border-radius: var(--radius-badge);
  transition: transform var(--duration-fast) var(--ease-spring);
}

.cta__badges a:hover {
  transform: scale(1.045);
}

.cta__badges img {
  height: clamp(52px, 44px + 1.6vw, 66px);
  width: auto;
}
