@font-face {
  font-family: Outfit;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/outfit-400.woff2') format('woff2');
}

@font-face {
  font-family: Outfit;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/outfit-600.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --primary: #5b3976;
  --primary-pressed: #4a2f60;
  --primary-deep: #35204a;
  --on-primary: #ffffff;
  --on-primary-muted: #e9e0f1;
  --background: #ffffff;
  --text: #1b1720;
  --text-muted: #4f4a56;
  --photo-tint: linear-gradient(rgb(53 32 74 / 14%), rgb(53 32 74 / 14%));
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  min-height: 100%;
}

body {
  background: var(--background);
  color: var(--text);
  font:
    400 16px/24px Outfit,
    system-ui,
    sans-serif;
}

main {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

/* The computer layout is also the one a browser without JavaScript gets. */
main.computer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto 1fr auto;
  justify-items: center;
  row-gap: 24px;
}

main.computer::before {
  background:
    linear-gradient(rgb(53 32 74 / 55%), rgb(53 32 74 / 10%) 28%, rgb(53 32 74 / 12%) 75%, rgb(53 32 74 / 75%)),
    var(--photo-tint),
    url('/hero.jpg') center 40% / cover var(--primary-deep);
  content: '';
  grid-column: 1;
  grid-row: 1 / -1;
  justify-self: stretch;
}

main.computer > .wordmark {
  left: 48px;
  position: absolute;
  top: 48px;
}

main.computer > .card,
main.computer > .legal {
  grid-column: 2;
}

main.computer > .card {
  grid-row: 2;
}

main.computer > .legal {
  grid-row: 4;
  padding: 0 24px 24px;
}

@media (max-width: 900px) {
  main.computer {
    grid-template-columns: 1fr;
    grid-template-rows: 240px auto 1fr auto;
  }

  main.computer::before {
    grid-row: 1;
  }

  main.computer > .wordmark {
    left: 24px;
    top: 24px;
  }

  main.computer > .card,
  main.computer > .legal {
    grid-column: 1;
  }
}

[data-platform='ios'] main.computer,
[data-platform='android'] main.computer {
  display: none;
}

[data-platform='ios'] main.phone,
[data-platform='android'] main.phone {
  display: flex;
}

[data-stores='soon'] main.live,
[data-stores='live'] main.soon {
  display: none;
}

.phone {
  --gutter: max(24px, calc(50% - 280px), env(safe-area-inset-left), env(safe-area-inset-right));
}

.band {
  background:
    linear-gradient(
      rgb(53 32 74 / 60%),
      rgb(53 32 74 / 10%) 30%,
      rgb(53 32 74 / 15%) 60%,
      rgb(53 32 74 / 96%) 84%,
      var(--primary-deep)
    ),
    var(--photo-tint),
    url('/hero.jpg') 0 42% / 118% auto no-repeat var(--primary-deep);
  border-radius: 0 0 28px 28px;
  color: var(--on-primary);
  display: flex;
  flex-direction: column;
  min-height: 340px;
  overflow: hidden;
  padding: calc(24px + env(safe-area-inset-top)) var(--gutter) 24px;
}

.wordmark {
  display: block;
  height: 28px;
  width: 141px;
}

.band .wordmark {
  margin-bottom: auto;
  padding-bottom: 28px;
  box-sizing: content-box;
}

h1 {
  font-size: 28px;
  font-weight: 600;
  line-height: 32px;
  margin-bottom: 8px;
}

.band p {
  color: var(--on-primary-muted);
}

.content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 24px;
  padding: 24px var(--gutter) 0;
}

.company {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 18px;
  margin-top: auto;
  padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  text-align: center;
}

ol.steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.steps li {
  align-items: flex-start;
  counter-increment: step;
  display: flex;
  gap: 12px;
  padding-top: 2px;
}

.steps li::before {
  align-items: center;
  background: var(--primary);
  border-radius: 50%;
  color: var(--on-primary);
  content: counter(step);
  display: flex;
  flex: none;
  font-size: 14px;
  font-weight: 600;
  height: 28px;
  justify-content: center;
  line-height: 20px;
  margin-top: -2px;
  width: 28px;
}

.button {
  align-items: center;
  border-radius: 12px;
  display: flex;
  font-size: 16px;
  font-weight: 600;
  justify-content: center;
  line-height: 24px;
  min-height: 56px;
  padding: 0 24px;
  text-align: center;
  text-decoration: none;
}

.button:focus-visible,
.stores a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.primary {
  background: var(--primary);
  color: var(--on-primary);
  margin-top: auto;
}

.primary:hover,
.primary:active {
  background: var(--primary-pressed);
}

.secondary {
  border: 2px solid var(--primary);
  color: var(--primary);
}

.ios,
.android {
  display: none;
}

[data-platform='ios'] .ios,
[data-platform='android'] .android {
  display: flex;
}

.card {
  align-items: center;
  display: flex;
  flex-direction: column;
  max-width: 440px;
  padding: 24px 24px 0;
  text-align: center;
  width: 100%;
}

.card .button {
  align-self: stretch;
  margin-top: 24px;
}

.qr {
  display: block;
  height: 200px;
  margin: 16px 0;
  max-width: 100%;
  width: 200px;
}

.scan {
  text-wrap: balance;
}

.address {
  white-space: nowrap;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 24px;
}

.stores a {
  display: block;
}

.stores img {
  display: block;
  height: 48px;
  width: auto;
}

.legal {
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 4px;
  line-height: 18px;
  max-width: 440px;
  text-align: center;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 4px;
}

.links a {
  color: var(--text-muted);
  padding: 3px 4px;
}

.links a:hover {
  color: var(--primary);
}

.links a:focus-visible,
.prose a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.links span {
  padding: 3px 0;
}

main.doc {
  display: flex;
}

.doc {
  --gutter: max(24px, calc(50% - 360px), env(safe-area-inset-left), env(safe-area-inset-right));
}

.band.plain {
  background: var(--primary-deep);
  min-height: 0;
  padding-bottom: 32px;
}

.prose {
  overflow-wrap: break-word;
  padding: 8px var(--gutter) 40px;
}

.prose h2 {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
  margin-top: 40px;
  scroll-margin-top: 16px;
}

.prose p,
.prose ul,
.prose ol,
.prose table {
  margin-top: 12px;
}

.prose ul {
  padding-left: 24px;
}

.prose ul li + li {
  margin-top: 8px;
}

.prose strong,
.prose th {
  font-weight: 600;
}

.prose a {
  color: var(--primary);
  text-underline-offset: 2px;
}

.prose a[href^='tel:'] {
  white-space: nowrap;
}

.prose > :first-child {
  margin-top: 24px;
}

.prose .contents h2 {
  margin-top: 0;
}

.contents {
  border-bottom: 1px solid var(--on-primary-muted);
  padding-bottom: 24px;
}

.contents ol {
  list-style: none;
  padding: 0;
}

.contents li + li {
  margin-top: 4px;
}

.prose ol.steps {
  margin-top: 16px;
}

.prose table {
  border-collapse: collapse;
  font-size: 15px;
  line-height: 22px;
  width: 100%;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--on-primary-muted);
  padding: 12px 16px 12px 0;
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  border-bottom-color: var(--text-muted);
}

/* Narrow screens stack each row; the roles in the markup keep it a table for screen readers. */
@media (max-width: 720px) {
  .prose table,
  .prose tbody,
  .prose tr,
  .prose th,
  .prose td {
    display: block;
  }

  .prose thead {
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
  }

  .prose tr {
    border-bottom: 1px solid var(--on-primary-muted);
    padding: 12px 0;
  }

  .prose tbody th,
  .prose td {
    border: 0;
    padding: 0;
  }

  .prose td {
    padding-top: 8px;
  }

  .prose td::before {
    color: var(--text-muted);
    content: attr(data-label);
    display: block;
  }
}
