/* ==========================================================================
   mif.css - the MIF Finance product page.

   The page reuses Schedule's scene layout (css/schedule.css) and the site's
   shot styles (css/site.css). What lives here is only what that pair does
   not cover: a wide copy-plus-screenshot grid for the Windows app, flat
   Windows screenshots, an Android phone frame that wraps a screenshot
   (Schedule's own phone.css is not loaded here), a side-by-side pair of
   phones, and a text-only scene. Site tokens only; no motion.
   ========================================================================== */

/* --- Wide scenes: copy beside a Windows screenshot ---------------------- */

.scene__shots { min-width: 0; }

@media (min-width: 900px) {
  .scene__grid--wide {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }

  /* Flipped: screenshot first on a wide screen. The copy stays first in the
     source, so it is still first when the grid collapses to one column. */
  .scene__grid--wide.scene__grid--flip {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .scene__grid--wide.scene__grid--flip .scene__shots { order: -1; }
}

/* --- Windows screenshots ------------------------------------------------ */

.win-shot {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-shot);
  background: var(--card);
}

.win-shot + .win-shot { margin-top: 1.25rem; }

.win-shot--dialog {
  max-width: 460px;
  margin-inline: auto;
}

/* --- Android phones ----------------------------------------------------- */

/* Schedule draws its screens as HTML in a 9:19.5 frame. These are
   screenshots at 824 x 1849, so the frame takes the image's own height. */
.stage .phone {
  max-width: 300px;
  aspect-ratio: auto;
}

.phone__shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 27px;
}

/* Two phones side by side; one column, centred, on a narrow screen. */
.stage--pair {
  grid-template-columns: repeat(2, minmax(0, 260px));
  justify-content: center;
  align-items: start;
  gap: clamp(1rem, .5rem + 1.5vw, 1.75rem);
}

.stage--pair .phone { max-width: 260px; }

@media (max-width: 599.98px) {
  .stage--pair { grid-template-columns: minmax(0, 260px); }
}

/* Keep a phone shorter than the space under the header (a screenshot is
   about 2.24 times as tall as it is wide). */
@media (min-width: 900px) {
  .scene__grid .stage .phone {
    max-width: min(300px, max(200px, calc((100svh - var(--nav-h) - 80px) * .4456)));
  }

  .scene__grid .stage--pair .phone {
    max-width: min(260px, max(200px, calc((100svh - var(--nav-h) - 80px) * .4456)));
  }
}

/* A pair needs about 560px beside the copy, so it only sits beside the copy
   on a wide screen and stacks under it otherwise. */
@media (min-width: 900px) and (max-width: 1079.98px) {
  .scene__grid--pair { grid-template-columns: minmax(0, 1fr); }
  .scene__grid--pair .stage { position: static; }
}

@media (min-width: 1080px) {
  .scene__grid--pair {
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  }
}

/* --- Text-only scene ---------------------------------------------------- */

.scene__grid.scene__grid--text { grid-template-columns: minmax(0, 1fr); }

.scene__grid--text .scene__copy,
.scene__grid--text .lead,
.scene__grid--text .notes {
  max-width: 68ch;
}

/* --- Availability card -------------------------------------------------- */

.install-card .notes { margin-top: 0; }
