:root {
  color-scheme: light;
  color: #102c49;
  background: #fceace;
  font-family: system-ui, sans-serif;
  --poster: url("/homepage-assets/asenso-homepage-poster.jpg");
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; }
.poster { width: min(100%, 200vh); width: min(100%, 200svh); position: relative; }
.panorama { display: block; width: 100%; height: auto; }
.portrait-art { display: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Rectangles in the original 1774 × 887 poster, shared by links and portrait crops. */
.ios     { --x: 598;  --y: 766; --w: 350; --h: 96; }
.android { --x: 988;  --y: 766; --w: 387; --h: 96; }
.signin  { --x: 1418; --y: 766; --w: 324; --h: 96; }
.badge {
  position: absolute;
  left: calc(100% * var(--x) / 1774);
  top: calc(100% * (var(--y) + var(--h) / 2) / 887);
  width: calc(100% * var(--w) / 1774);
  height: max(44px, calc(100% * var(--h) / 887));
  transform: translateY(-50%);
  border-radius: .6rem;
  -webkit-tap-highlight-color: rgb(255 255 255 / .22);
}
.badge:focus-visible { outline: 3px solid #142f4e; outline-offset: 3px; }
@media (hover: hover) { .badge:hover { box-shadow: inset 0 0 0 2px #fffaf1; background: rgb(255 255 255 / .1); } }

/* Replace the original printed store badges with the current distribution options. */
.platform { container-type: inline-size; display: grid; align-content: center; text-decoration: none; }
.platform-label {
  display: flex; align-items: center; justify-content: center; gap: 5cqw;
  width: 100%; aspect-ratio: var(--w) / var(--h); border-radius: 5cqw / 5cqw;
  background: #163754; color: #fff1d9; font-size: 12cqw; font-weight: 750; line-height: 1;
}
.platform-label img { width: 19cqw; height: 19cqw; }
.platform-label > span { display: flex; flex-direction: column; }
.platform-label small { font-size: 5.6cqw; font-weight: 550; line-height: 1.25; }
@media (hover: hover) { .platform:hover .platform-label { background: #204867; } }

@media (max-width: 700px) and (orientation: portrait) {
  .poster { width: min(100%, 30rem); padding: max(1rem, env(safe-area-inset-top)) 0 max(1rem, env(safe-area-inset-bottom)); }
  /* Keep the full text alternative while relaying out the authored print artwork. */
  .panorama { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
  .portrait-art { display: grid; justify-items: center; }
  .headline {
    --x: 27; --y: 19; --w: 615; --h: 451; width: 73%;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 97% 100%, 0 100%);
  }
  .scene {
    --x: 462; --y: 0; --w: 1312; --h: 730; width: 100%; margin-top: .3rem;
    clip-path: polygon(14.2% 0, 100% 0, 100% 100%, 0 100%, 0 97.5%, 4% 89%, 7.6% 81%, 10% 75%, 14% 71%, 14.2% 62%);
  }
  .brand { --x: 48; --y: 752; --w: 493; --h: 128; width: 55%; margin: 1rem 0 .5rem; }
  .slice, .badge::before {
    background-image: var(--poster);
    background-repeat: no-repeat;
    background-size: calc(100% * 1774 / var(--w)) calc(100% * 887 / var(--h));
    background-position: calc(100% * var(--x) / (1774 - var(--w))) calc(100% * var(--y) / (887 - var(--h)));
    aspect-ratio: var(--w) / var(--h);
  }
  nav {
    display: grid; grid-template-columns: 350fr 387fr; align-items: center;
    gap: .25rem .75rem; margin: 0 max(1rem, env(safe-area-inset-right)) 0 max(1rem, env(safe-area-inset-left));
  }
  .badge { position: relative; inset: auto; transform: none; display: grid; align-content: center; width: 100%; min-height: 48px; height: auto; }
  .badge::before { content: ""; display: block; width: 100%; border-radius: .6rem; }
  .platform::before { content: none; }
  .signin { grid-column: 1 / -1; justify-self: center; width: 65%; }
}

@media (forced-colors: active) {
  .badge { display: grid; place-content: center; background: Canvas; color: LinkText; border: 1px solid LinkText; }
  .badge .sr-only { position: static; width: auto; height: auto; margin: 0; clip-path: none; white-space: normal; text-align: center; }
  .badge::before { display: none; }
  .platform-label { background: Canvas; color: LinkText; }
}
