@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("/fonts/DMSans.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  background: #000;
}

body {
  margin: 0;
  background: #000;
}

/* Grid, not flex: inside a flex column, Chrome reports 0 for the art's cqh. */
.home {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: #fff;
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  font-variation-settings: "opsz" 14;
  text-align: center;
}

.backdrop {
  position: absolute;
  inset: 0;
  background: url("/images/store-narrow.webp") center / cover no-repeat;
}

.brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
}

.app-icon {
  display: none;
}

.wordmark {
  display: block;
  width: 108px;
  height: 24px;
}

.art {
  position: relative;
  container-type: size;
}

/* The phone stays centred; the hand runs off the left and under the words. */
.art img {
  position: absolute;
  left: 50%;
  bottom: -131px;
  width: auto;
  height: min(calc(110cqh + 65px), 168.1cqw);
  transform: translateX(-75.73%);
}

.intro {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 24px;
}

.intro > :not(.intro-blur) {
  position: relative;
  z-index: 1;
}

.intro::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000);
  pointer-events: none;
}

/* Stacked bands: clear at the top, frosted at the bottom. */
.intro-blur {
  position: absolute;
  inset: -56px 0 0;
  pointer-events: none;
}

.intro-blur span {
  position: absolute;
  display: block;
  inset: 0;
  -webkit-backdrop-filter: blur(var(--b));
  backdrop-filter: blur(var(--b));
  -webkit-mask-image: var(--m);
  mask-image: var(--m);
}

.intro-blur span:nth-child(1) { --b: 1px; --m: linear-gradient(to bottom, transparent 0%, #000 12%, #000 20%, transparent 32%); }
.intro-blur span:nth-child(2) { --b: 2px; --m: linear-gradient(to bottom, transparent 12%, #000 24%, #000 36%, transparent 48%); }
.intro-blur span:nth-child(3) { --b: 4px; --m: linear-gradient(to bottom, transparent 28%, #000 40%, #000 52%, transparent 64%); }
.intro-blur span:nth-child(4) { --b: 8px; --m: linear-gradient(to bottom, transparent 44%, #000 56%, #000 68%, transparent 80%); }
.intro-blur span:nth-child(5) { --b: 16px; --m: linear-gradient(to bottom, transparent 60%, #000 76%, #000 100%); }
.intro-blur span:nth-child(6) { --b: 24px; --m: linear-gradient(to bottom, transparent 76%, #000 92%, #000 100%); }

h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  line-height: 0.967;
  letter-spacing: -0.04em;
}

.lede {
  max-width: 327px;
  margin: 0;
  font-size: 12px;
  font-weight: 300;
  line-height: 16px;
  opacity: 0.9;
}

.store {
  display: flex;
  gap: 8px;
}

.store-badge {
  position: relative;
  display: block;
  width: 119.664px;
  height: 40px;
}

.store-badge img {
  position: absolute;
  display: block;
}

.badge-frame { inset: 0; width: 100%; height: 100%; }
.badge-apple { left: 8.03%; top: 19.62%; }
.badge-name { left: 28.77%; top: 44.68%; }
.badge-download { left: 29.81%; top: 21.09%; }

.qr {
  display: none;
}

.links {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 12px;
  font-weight: 300;
  line-height: 22px;
  white-space: nowrap;
}

.links a {
  color: rgba(255, 255, 255, 0.8);
  opacity: 0.9;
  text-decoration: underline;
  text-decoration-thickness: from-font;
  text-decoration-skip-ink: none;
  text-underline-position: from-font;
}

/* Keep in step with the <source media> for the hand picture in index.html. */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .home {
    --pad: max(40px, 8.466vw);
    grid-template-columns: var(--pad) 1fr 1fr var(--pad);
    grid-template-rows: 1fr auto auto 1fr;
    min-height: 100vh;
  }

  .backdrop {
    background: none;
  }

  .backdrop::before,
  .backdrop::after {
    content: "";
    position: absolute;
  }

  .backdrop::before {
    inset: -17.006% -10.053% -9.267% -13.228%;
    background: url("/images/store-wide.webp") center / cover no-repeat;
    transform: scaleX(-1);
    filter: blur(10.45px);
  }

  .backdrop::after {
    inset: 0;
    background: radial-gradient(61.71% 90.24% at 67.63% 47.3%, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
  }

  .brand {
    grid-column: 2;
    grid-row: 2;
    gap: 16px;
    margin-bottom: 40px;
    padding-top: 0;
  }

  .app-icon {
    display: grid;
    place-items: center;
    width: 106px;
    height: 106px;
    overflow: hidden;
    border-radius: 32px;
    background: #000;
  }

  .app-icon img {
    display: block;
    width: 58px;
    height: 58px;
  }

  .wordmark {
    width: 126px;
    height: 28px;
  }

  .art {
    grid-column: 3;
    grid-row: 1 / -1;
  }

  .art img {
    top: 50%;
    bottom: auto;
    height: min(116.09cqh, 181.53cqw);
    transform: translate(-31.8%, -33.68%);
  }

  .intro {
    grid-column: 2;
    grid-row: 3;
    gap: 32px;
    padding: 0;
  }

  .intro-blur,
  .intro::after {
    display: none;
  }

  h1 {
    font-size: 50px;
  }

  h1 span {
    display: block;
  }

  .lede {
    max-width: 389px;
    font-size: 18px;
    line-height: 22px;
  }

  .qr {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 40px;
    height: 40px;
    border: 1px solid #000;
    border-radius: 8px;
    background: #fff;
  }

  .qr img {
    display: block;
  }
}
