/* The home page on the option D frame: the parts only this page has. The pictures are the approved originals
   (website-tools/home). */
.get-app { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding: 6px 8px 6px 20px; border-radius: 999px; background: rgb(255 255 255 / 14%); font-weight: 600; }
.get-app .store { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); border-radius: 50%; background: var(--white); }
.get-app .store svg { width: 22px; height: 22px; }
.home-phone { display: block; width: auto; height: min(300px, 34vh); margin-top: 26px; border-radius: 18px; }

.sheet-in { max-width: 860px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 14px 0 0; padding: 0; list-style: none; }
.tile {
  position: relative; display: flex; flex-direction: column; overflow: hidden; aspect-ratio: 5 / 6; padding: 18px;
  border-radius: 16px; background: var(--ink) center / cover no-repeat; color: var(--white); text-decoration: none;
}
.tile h3 { position: relative; margin: 0; font-size: 1.3rem; font-weight: 500; line-height: 1.2; }
.tile p { position: relative; margin: auto 0 0; font-size: 0.92rem; line-height: 1.4; }
.tile--picture { padding: 0; }
.tile--picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile--sky { background: var(--stage-night); }
.tile--sky img { position: absolute; right: -10px; bottom: 0; width: 60%; height: auto; opacity: 0.9; }

/* ---------- Sheet: the mission card ---------- */
/* The stars are one picture with their grainy shadow (assets/home/mission-stars.png). The card does not clip
   it: the stars stand on the card's bottom right corner and the shadow falls past the edge onto the sheet.
   The sheet clips sideways only, so the spill never makes the page scroll sideways. */
.sheet { overflow-x: clip; }
.mission {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px;
  margin: 40px 0 0; padding: 40px 28px 0; border-radius: 22px; background: var(--ink); color: var(--white);
}
.mission > :not(.mission-stars) { position: relative; z-index: 1; }
.mission h2 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); font-weight: 500; line-height: 1.2; color: var(--gold); }
.mission p { margin: 0; line-height: 1.6; }
.mission h3 { margin: 0 0 8px; font-size: 0.85rem; font-weight: 700; color: var(--gold); }
.mission .mission-small { font-size: 0.85rem; color: var(--date); }
/* Phones: the stars stand under the words (shown last, whatever their place in the page), to the right,
   with the grainy shadow falling past the card's bottom edge onto the sheet. */
.mission-stars { order: 9; display: block; width: min(360px, 96%); height: auto; margin: -8px -6% -72px auto; pointer-events: none; }
/* Room under the card for the shadow that falls past its edge. */
.mission { margin-bottom: 70px; }

@media (min-width: 700px) {
  /* Wider: the words keep to the left 54% of the card; the stars have the right 46%.
     The picture is sized by the card's width so the stars always fit that space, and it is moved by parts of
     its own size: right by its empty right margin, and down so the grainy shadow falls past the card's
     bottom right corner onto the sheet. */
  .mission { padding: 48px clamp(46%, calc(46% + (1280px - 100vw) * 0.016), 56%) 56px 44px; }
  .mission-stars { order: 0; position: absolute; right: 0; bottom: 0; height: auto; max-width: none; margin: 0;
    /* As the window gets smaller the stars grow a little and come forward (less to the right of the card). */
    width: clamp(96%, calc(96% + (1280px - 100vw) * 0.05), 128%);
    transform: translate(clamp(2%, calc(21% - (1280px - 100vw) * 0.035), 21%), 19%); }
  .mission { margin-bottom: 90px; }
}
@media (max-width: 519px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .tile { padding: 14px; }
  .tile h3 { font-size: 1.05rem; }
  .tile p { font-size: 0.82rem; }
}
/* The narrowest cover screens: one tile to a row, wide and short, so the words always fit. */
@media (max-width: 359px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { aspect-ratio: 3 / 2; }
  .tile--picture { aspect-ratio: 5 / 6; }
}
@media (min-width: 900px) {
  /* The headline and the store buttons stay in view. */
  .stage-in { position: sticky; top: 0; }
}
